diff --git a/examples/go/hello_world/README.md b/examples/go/hello_world/README.md index a83fb2d..e01f62a 100644 --- a/examples/go/hello_world/README.md +++ b/examples/go/hello_world/README.md @@ -17,4 +17,51 @@ $ go run main.go $ http://localhost:3000/hello Hello world! +``` + +```toml +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "GET /hello" +service = "hello_world" +``` + +```go +package main + +import ( + "github.com/lithdew/flatend" + "os" + "os/signal" +) + +func check(err error) { + if err != nil { + panic(err) + } +} + +func helloWorld(ctx *flatend.Context) { + ctx.WriteHeader("Content-Type", "text/plain; charset=utf-8") + ctx.Write([]byte("Hello world!")) +} + +func main() { + node := &flatend.Node{ + Services: map[string]flatend.Handler{ + "hello_world": helloWorld, + }, + } + check(node.Start("127.0.0.1:9000")) + + ch := make(chan os.Signal, 1) + signal.Notify(ch, os.Interrupt) + <-ch + + node.Shutdown() +} ``` \ No newline at end of file diff --git a/examples/go/pipe/README.md b/examples/go/pipe/README.md index 9928b4e..d6aadfa 100644 --- a/examples/go/pipe/README.md +++ b/examples/go/pipe/README.md @@ -12,4 +12,51 @@ $ go run main.go 2020/06/17 01:07:17 You are now connected to 127.0.0.1:9000. Services: [] $ POST /pipe (1.6MiB GIF) +``` + +```toml +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "POST /pipe" +service = "pipe" +``` + +```go +package main + +import ( + "github.com/lithdew/flatend" + "io" + "os" + "os/signal" +) + +func check(err error) { + if err != nil { + panic(err) + } +} + +func pipe(ctx *flatend.Context) { + _, _ = io.Copy(ctx, ctx.Body) +} + +func main() { + node := &flatend.Node{ + Services: map[string]flatend.Handler{ + "pipe": pipe, + }, + } + check(node.Start("127.0.0.1:9000")) + + ch := make(chan os.Signal, 1) + signal.Notify(ch, os.Interrupt) + <-ch + + node.Shutdown() +} ``` \ No newline at end of file diff --git a/examples/nodejs/hello_world/README.md b/examples/nodejs/hello_world/README.md index 19d104c..ce224c9 100644 --- a/examples/nodejs/hello_world/README.md +++ b/examples/nodejs/hello_world/README.md @@ -17,4 +17,27 @@ Successfully dialed 127.0.0.1:9000. Services: [] $ http://localhost:3000/hello Hello world! +``` + +```toml +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "GET /hello" +service = "hello_world" +``` + +```js +const {Node} = require("flatend"); + +const main = async () => { + const node = new Node(); + node.register('hello_world', ctx => ctx.send("Hello world!")); + await node.dial("127.0.0.1:9000"); +} + +main().catch(err => console.error(err)); ``` \ No newline at end of file diff --git a/examples/nodejs/pipe/README.md b/examples/nodejs/pipe/README.md index 451549e..0ce5865 100644 --- a/examples/nodejs/pipe/README.md +++ b/examples/nodejs/pipe/README.md @@ -12,4 +12,27 @@ $ node index.js Successfully dialed 127.0.0.1:9000. Services: [] $ POST /pipe (1.6MiB GIF) +``` + +```toml +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "POST /pipe" +service = "pipe" +``` + +```js +const {Node} = require("flatend"); + +const main = async () => { + const node = new Node(); + node.register('pipe', ctx => ctx.pipe(ctx)); + await node.dial("127.0.0.1:9000"); +} + +main().catch(err => console.error(err)); ``` \ No newline at end of file diff --git a/examples/nodejs/pipe/config.toml b/examples/nodejs/pipe/config.toml new file mode 100644 index 0000000..5b2244d --- /dev/null +++ b/examples/nodejs/pipe/config.toml @@ -0,0 +1,8 @@ +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "POST /pipe" +service = "pipe" \ No newline at end of file diff --git a/examples/nodejs/todo/README.md b/examples/nodejs/todo/README.md new file mode 100644 index 0000000..ef8b5ea --- /dev/null +++ b/examples/nodejs/todo/README.md @@ -0,0 +1,80 @@ +# todo + +Ye 'ole todo list example using SQLite. + +``` +$ flatend +2020/06/17 01:27:03 Listening for microservices on '127.0.0.1:9000'. +2020/06/17 01:27:03 Listening for HTTP requests on '[::]:3000'. +2020/06/17 01:27:10 ??? has connected to you. Services: [all_todos add_todo remove_todo done_todo] + +$ node index.js +Successfully dialed 127.0.0.1:9000. Services: [] + +$ http://localhost:3000/ +``` + +```toml +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "GET /" +static = "./public" + +[[http.routes]] +path = "GET /todos" +service = "all_todos" + +[[http.routes]] +path = "GET /todos/add/:content" +service = "add_todo" + +[[http.routes]] +path = "GET /todos/remove/:id" +service = "remove_todo" + +[[http.routes]] +path = "GET /todos/done/:id" +service = "done_todo" +``` + +```js +const {Node} = require("flatend"); +const Database = require("better-sqlite3"); + +const db = new Database(":memory:"); +db.exec(`CREATE TABLE todo (id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT, state TEXT)`); + +const all = async ctx => ctx.json(await db.prepare(`SELECT id, content, state FROM todo`).all()); + +const add = async ctx => { + const content = ctx.headers["params.content"]; + ctx.json(await db.prepare(`INSERT INTO todo (content, state) VALUES (?, '')`).run(content)); +} + +const remove = async ctx => { + const id = ctx.headers["params.id"] + ctx.json(await db.prepare(`DELETE FROM todo WHERE id = ?`).run(id)) +} + +const done = async ctx => { + const id = ctx.headers["params.id"] + ctx.json(await db.prepare(`UPDATE todo SET state = 'done' WHERE id = ?`).run(id)); +} + +const main = async () => { + const node = new Node(); + + node.register('all_todos', all); + node.register('add_todo', add); + node.register('remove_todo', remove); + node.register('done_todo', done); + + await node.dial("127.0.0.1:9000"); +} + +main().catch(err => console.error(err)); +``` \ No newline at end of file diff --git a/examples/nodejs/todo/config.toml b/examples/nodejs/todo/config.toml new file mode 100644 index 0000000..efea894 --- /dev/null +++ b/examples/nodejs/todo/config.toml @@ -0,0 +1,24 @@ +addr = "127.0.0.1:9000" + +[[http]] +addr = ":3000" + +[[http.routes]] +path = "GET /" +static = "./public" + +[[http.routes]] +path = "GET /todos" +service = "all_todos" + +[[http.routes]] +path = "GET /todos/add/:content" +service = "add_todo" + +[[http.routes]] +path = "GET /todos/remove/:id" +service = "remove_todo" + +[[http.routes]] +path = "GET /todos/done/:id" +service = "done_todo" \ No newline at end of file diff --git a/examples/nodejs/todo/index.js b/examples/nodejs/todo/index.js new file mode 100644 index 0000000..8e300bb --- /dev/null +++ b/examples/nodejs/todo/index.js @@ -0,0 +1,35 @@ +const {Node} = require("flatend"); +const Database = require("better-sqlite3"); + +const db = new Database(":memory:"); +db.exec(`CREATE TABLE todo (id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT, state TEXT)`); + +const all = async ctx => ctx.json(await db.prepare(`SELECT id, content, state FROM todo`).all()); + +const add = async ctx => { + const content = ctx.headers["params.content"]; + ctx.json(await db.prepare(`INSERT INTO todo (content, state) VALUES (?, '')`).run(content)); +} + +const remove = async ctx => { + const id = ctx.headers["params.id"] + ctx.json(await db.prepare(`DELETE FROM todo WHERE id = ?`).run(id)) +} + +const done = async ctx => { + const id = ctx.headers["params.id"] + ctx.json(await db.prepare(`UPDATE todo SET state = 'done' WHERE id = ?`).run(id)); +} + +const main = async () => { + const node = new Node(); + + node.register('all_todos', all); + node.register('add_todo', add); + node.register('remove_todo', remove); + node.register('done_todo', done); + + await node.dial("127.0.0.1:9000"); +} + +main().catch(err => console.error(err)); \ No newline at end of file diff --git a/examples/nodejs/todo/package.json b/examples/nodejs/todo/package.json new file mode 100644 index 0000000..8af1a2f --- /dev/null +++ b/examples/nodejs/todo/package.json @@ -0,0 +1,10 @@ +{ + "name": "todo", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "better-sqlite3": "^7.1.0", + "flatend": "^0.0.1" + } +} diff --git a/examples/nodejs/todo/public/index.html b/examples/nodejs/todo/public/index.html new file mode 100644 index 0000000..374b868 --- /dev/null +++ b/examples/nodejs/todo/public/index.html @@ -0,0 +1,15 @@ + + + + + + + Flatend Demo - Todo + + + + +
+ + + \ No newline at end of file diff --git a/examples/nodejs/todo/public/main.js b/examples/nodejs/todo/public/main.js new file mode 100644 index 0000000..a3bcdfc --- /dev/null +++ b/examples/nodejs/todo/public/main.js @@ -0,0 +1,4 @@ +(()=>{let Nf=Object.defineProperty,Ii=Object.prototype.hasOwnProperty,Ib=p=>{let na;return()=>(na||(na={exports:{}},p(na.exports,na)),na.exports)},Of=p=>{if(p&&p.__esModule)return p;let na={};Nf(na,"default",{value:p,enumerable:!0});for(let ea in p)Ii.call(p,ea)&&ea!=="default"&&Nf(na,ea,{get:()=>p[ea],enumerable:!0});return na};var u=Ib((p,ea)=>{"use strict";var P=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;function q(U){if(U===null||U===void 0)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(U)}function db(){try{if(!Object.assign)return!1;var U=new String("abc");U[5]="de";if(Object.getOwnPropertyNames(U)[0]==="5")return!1;for(var qa={},V=0;V<10;V++)qa["_"+String.fromCharCode(V)]=V;var va=Object.getOwnPropertyNames(qa).map(function(ja){return qa[ja]});if(va.join("")!=="0123456789")return!1;var ia={};return"abcdefghijklmnopqrst".split("").forEach(function(ja){ia[ja]=ja}),Object.keys(Object.assign({},ia)).join("")!=="abcdefghijklmnopqrst"?!1:!0}catch(ja){return!1}}ea.exports=db()?Object.assign:function(U,qa){for(var V,va=q(U),ia,ja=1;ja{"use strict";var P=u(),I="function"===typeof Symbol&&Symbol.for,N=I?Symbol.for("react.element"):60103,q=I?Symbol.for("react.portal"):60106,db=I?Symbol.for("react.fragment"):60107,U=I?Symbol.for("react.strict_mode"):60108,qa=I?Symbol.for("react.profiler"):60114,V=I?Symbol.for("react.provider"):60109,va=I?Symbol.for("react.context"):60110,ia=I?Symbol.for("react.forward_ref"):60112,ja=I?Symbol.for("react.suspense"):60113,eb=I?Symbol.for("react.memo"):60115,wa=I?Symbol.for("react.lazy"):60116,Jb="function"===typeof Symbol&&Symbol.iterator;function Sa(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,x=1;xR.length&&R.push(i)}function pa(i,o,x,G){var D=typeof i;("undefined"===D||"boolean"===D)&&(i=null);var O=!1;if(null===i)O=!0;else switch(D){case"string":case"number":O=!0;break;case"object":switch(i.$$typeof){case N:case q:O=!0}}if(O)return x(G,i,""===o?"."+Ha(i,0):o),1;O=0,o=""===o?".":o+":";if(Array.isArray(i))for(var J=0;J{"use strict";ea.exports=zi()});var Ai=Ib(p=>{"use strict";var P,I,N,q,db;if("undefined"===typeof window||"function"!==typeof MessageChannel){var U=null,qa=null,V=function(){if(null!==U)try{var r=p.unstable_now();U(!0,r),U=null}catch(A){throw setTimeout(V,0),A}},va=Date.now();p.unstable_now=function(){return Date.now()-va},P=function(r){null!==U?setTimeout(P,0,r):(U=r,setTimeout(V,0))},I=function(r,A){qa=setTimeout(r,A)},N=function(){clearTimeout(qa)},q=function(){return!1},db=p.unstable_forceFrameRate=function(){}}else{var ia=window.performance,ja=window.Date,eb=window.setTimeout,wa=window.clearTimeout;if("undefined"!==typeof console){var Jb=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof Jb&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof ia&&"function"===typeof ia.now)p.unstable_now=function(){return ia.now()};else{var Sa=ja.now();p.unstable_now=function(){return ja.now()-Sa}}var Ta=!1,Fa=null,fa=-1,ob=5,fb=0;q=function(){return p.unstable_now()>=fb},db=function(){},p.unstable_forceFrameRate=function(r){0>r||125>>1,x=r[o];if(void 0!==x&&0oa(D,i))void 0!==J&&0>oa(J,D)?(r[o]=J,r[O]=i,o=O):(r[o]=D,r[G]=i,o=G);else if(void 0!==J&&0>oa(J,i))r[o]=J,r[O]=i,o=O;else break u}}return A}return null}function oa(r,A){var i=r.sortIndex-A.sortIndex;return 0!==i?i:r.id-A.id}var _=[],ga=[],Oa=1,R=null,W=3,Va=!1,pa=!1,Ga=!1;function Ha(r){for(var A=Z(ga);null!==A;){if(null===A.callback)Ua(ga);else if(A.startTime<=r)Ua(ga),A.sortIndex=A.expirationTime,xa(_,A);else break;A=Z(ga)}}function pb(r){Ga=!1,Ha(r);if(!pa)if(null!==Z(_))pa=!0,P(ya);else{var A=Z(ga);null!==A&&I(pb,A.startTime-r)}}function ya(r,A){pa=!1,Ga&&(Ga=!1,N()),Va=!0;var i=W;try{for(Ha(A),R=Z(_);null!==R&&(!(R.expirationTime>A)||r&&!q());){var o=R.callback;if(null!==o){R.callback=null,W=R.priorityLevel;var x=o(R.expirationTime<=A);A=p.unstable_now(),"function"===typeof x?R.callback=x:R===Z(_)&&Ua(_),Ha(A)}else Ua(_);R=Z(_)}if(null!==R)var G=!0;else{var D=Z(ga);null!==D&&I(pb,D.startTime-A),G=!1}return G}finally{R=null,W=i,Va=!1}}function Wa(r){switch(r){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var qb=db;p.unstable_IdlePriority=5;p.unstable_ImmediatePriority=1;p.unstable_LowPriority=4;p.unstable_NormalPriority=3;p.unstable_Profiling=null;p.unstable_UserBlockingPriority=2;p.unstable_cancelCallback=function(r){r.callback=null};p.unstable_continueExecution=function(){pa||Va||(pa=!0,P(ya))};p.unstable_getCurrentPriorityLevel=function(){return W};p.unstable_getFirstCallbackNode=function(){return Z(_)};p.unstable_next=function(r){switch(W){case 1:case 2:case 3:var A=3;break;default:A=W}var i=W;W=A;try{return r()}finally{W=i}};p.unstable_pauseExecution=function(){};p.unstable_requestPaint=qb;p.unstable_runWithPriority=function(r,A){switch(r){case 1:case 2:case 3:case 4:case 5:break;default:r=3}var i=W;W=r;try{return A()}finally{W=i}};p.unstable_scheduleCallback=function(r,A,i){var o=p.unstable_now();if("object"===typeof i&&null!==i){var x=i.delay;x="number"===typeof x&&0o?(r.sortIndex=x,xa(ga,r),null===Z(_)&&r===Z(ga)&&(Ga?N():Ga=!0,I(pb,x-o))):(r.sortIndex=i,xa(_,r),pa||Va||(pa=!0,P(ya))),r};p.unstable_shouldYield=function(){var r=p.unstable_now();Ha(r);var A=Z(_);return A!==R&&null!==R&&null!==A&&null!==A.callback&&A.startTime<=r&&A.expirationTime{"use strict";ea.exports=Ai()});var cb=Ib(p=>{"use strict";var P=Mf(),I=u(),N=Bi();function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return!1}function J(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b,this.attributeName=d,this.attributeNamespace=e,this.mustUseProperty=c,this.propertyName=a,this.type=b,this.sanitizeURL=f}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){E[a]=new J(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];E[b]=new J(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new J(a,2,!1,a.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new J(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){E[a]=new J(a,3,!1,a.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(a){E[a]=new J(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){E[a]=new J(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){E[a]=new J(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){E[a]=new J(a,5,!1,a.toLowerCase(),null,!1)});var aa=/[\-:]([a-z])/g;function za(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(aa,za);E[b]=new J(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(aa,za);E[b]=new J(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(aa,za);E[b]=new J(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){E[a]=new J(a,1,!1,a.toLowerCase(),null,!1)});E.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){E[a]=new J(a,1,!1,a.toLowerCase(),null,!0)});var Pa=P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Pa.hasOwnProperty("ReactCurrentDispatcher")||(Pa.ReactCurrentDispatcher={current:null});Pa.hasOwnProperty("ReactCurrentBatchConfig")||(Pa.ReactCurrentBatchConfig={suspense:null});function $d(a,b,c,d){var e=E.hasOwnProperty(b)?E[b]:null,f=null!==e?0===e.type:d?!1:!(2=c.length))throw Error(q(93));c=c[0]}b=c}null==b&&(b=""),c=b}a._wrapperState={initialValue:rb(c)}}function $f(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c)),null!=d&&(a.defaultValue=""+d)}function ag(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var bg={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function cg(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function je(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?cg(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}var $c,dg=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==bg.svg||"innerHTML"in a)a.innerHTML=b;else{for($c=$c||document.createElement("div"),$c.innerHTML=""+b.valueOf().toString()+"",b=$c.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});function qc(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function ad(a,b){var c={};return c[a.toLowerCase()]=b.toLowerCase(),c["Webkit"+a]="webkit"+b,c["Moz"+a]="moz"+b,c}var ac={animationend:ad("Animation","AnimationEnd"),animationiteration:ad("Animation","AnimationIteration"),animationstart:ad("Animation","AnimationStart"),transitionend:ad("Transition","TransitionEnd")},ke={},eg={};oa&&(eg=document.createElement("div").style,"AnimationEvent"in window||(delete ac.animationend.animation,delete ac.animationiteration.animation,delete ac.animationstart.animation),"TransitionEvent"in window||delete ac.transitionend.transition);function bd(a){if(ke[a])return ke[a];if(!ac[a])return a;var b=ac[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in eg)return ke[a]=b[c];return a}var fg=bd("animationend"),gg=bd("animationiteration"),hg=bd("animationstart"),ig=bd("transitionend"),rc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jg=new("function"===typeof WeakMap?WeakMap:Map)();function le(a){var b=jg.get(a);return void 0===b&&(b=new Map(),jg.set(a,b)),b}function Lb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function kg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function lg(a){if(Lb(a)!==a)throw Error(q(188))}function Oi(a){var b=a.alternate;if(!b){b=Lb(a);if(null===b)throw Error(q(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return lg(e),a;if(f===d)return lg(e),b;f=f.sibling}throw Error(q(188))}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0,c=e,d=f;break}if(h===d){g=!0,d=e,c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0,c=f,d=e;break}if(h===d){g=!0,d=f,c=e;break}h=h.sibling}if(!g)throw Error(q(189))}}if(c.alternate!==d)throw Error(q(190))}if(3!==c.tag)throw Error(q(188));return c.stateNode.current===c?a:b}function mg(a){a=Oi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return,b=b.sibling}}return null}function bc(a,b){if(null==b)throw Error(q(30));return null==a?b:Array.isArray(a)?Array.isArray(b)?(a.push.apply(a,b),a):(a.push(b),a):Array.isArray(b)?[a].concat(b):[a,b]}function me(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var sc=null;function Pi(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;ddd.length&&dd.push(a)}function pg(a,b,c,d){if(dd.length){var e=dd.pop();return e.topLevelType=a,e.eventSystemFlags=d,e.nativeEvent=b,e.targetInst=c,e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}function qg(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag,5!==b&&6!==b||a.ancestors.push(c),c=Bc(d)}while(c);for(c=0;c=b)return{node:c,offset:b-a};a=d}u:{for(;c;){if(c.nextSibling){c=c.nextSibling;break u}c=c.parentNode}c=void 0}c=Cg(c)}}function Eg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Eg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Fg(){for(var a=window,b=ze();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=ze(a.document)}return b}function Ae(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var Gg="$",Hg="/$",Be="$?",Ce="$!",De=null,Ee=null;function Ig(a,b){switch(a){case"button":case"input":case"select":case"textarea":return!!b.autoFocus}return!1}function Fe(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Ge="function"===typeof setTimeout?setTimeout:void 0,aj="function"===typeof clearTimeout?clearTimeout:void 0;function cc(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function Jg(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Gg||c===Ce||c===Be){if(0===b)return a;b--}else c===Hg&&b++}a=a.previousSibling}return null}var He=Math.random().toString(36).slice(2),vb="__reactInternalInstance$"+He,id="__reactEventHandlers$"+He,Ac="__reactContainere$"+He;function Bc(a){var b=a[vb];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Ac]||c[vb]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Jg(a);null!==a;){if(c=a[vb])return c;a=Jg(a)}return b}a=c,c=a.parentNode}return null}function Cc(a){return a=a[vb]||a[Ac],!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Mb(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(q(33))}function Ie(a){return a[id]||null}function ib(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Kg(a,b){var c=a.stateNode;if(!c)return null;var d=wa(c);if(!d)return null;c=d[b];u:switch(b){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a)),a=!d;break u;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(q(231,b,typeof c));return c}function Lg(a,b,c){(b=Kg(a,c.dispatchConfig.phasedRegistrationNames[b]))&&(c._dispatchListeners=bc(c._dispatchListeners,b),c._dispatchInstances=bc(c._dispatchInstances,a))}function bj(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=ib(b);for(b=c.length;0this.eventPool.length&&this.eventPool.push(a)}function Ng(a){a.eventPool=[],a.getPooled=dj,a.release=ej}var fj=Aa.extend({data:null}),gj=Aa.extend({data:null}),hj=[9,13,27,32],Le=oa&&"CompositionEvent"in window,Dc=null;oa&&"documentMode"in document&&(Dc=document.documentMode);var ij=oa&&"TextEvent"in window&&!Dc,Og=oa&&(!Le||Dc&&8=Dc),Pg=String.fromCharCode(32),jb={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Qg=!1;function Rg(a,b){switch(a){case"keyup":return-1!==hj.indexOf(b.keyCode);case"keydown":return 229!==b.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Sg(a){return a=a.detail,"object"===typeof a&&"data"in a?a.data:null}var ec=!1;function jj(a,b){switch(a){case"compositionend":return Sg(b);case"keypress":return 32!==b.which?null:(Qg=!0,Pg);case"textInput":return a=b.data,a===Pg&&Qg?null:a;default:return null}}function kj(a,b){if(ec)return"compositionend"===a||!Le&&Rg(a,b)?(a=Mg(),jd=Ke=wb=null,ec=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,bh={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},fc=null,Oe=null,Kc=null,Pe=!1;function ch(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;return Pe||null==fc||fc!==ze(c)?null:(c=fc,"selectionStart"in c&&Ae(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Kc&&Jc(Kc,c)?null:(Kc=c,a=Aa.getPooled(bh.select,Oe,a,b),a.type="select",a.target=fc,dc(a),a))}var Aj={eventTypes:bh,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){u:{e=le(e),f=Z.onSelect;for(var g=0;ggc||(a.current=Qe[gc],Qe[gc]=null,gc--)}function Y(a,b){gc++,Qe[gc]=a.current,a.current=b}var xb={},ka={current:xb},sa={current:!1},Ob=xb;function hc(a,b){var c=a.type.contextTypes;if(!c)return xb;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];return d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e),e}function ta(a){return a=a.childContextTypes,null!==a&&void 0!==a}function od(){Q(sa),Q(ka)}function dh(a,b,c){if(ka.current!==xb)throw Error(q(168));Y(ka,b),Y(sa,c)}function eh(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(q(108,gb(b)||"Unknown",e));return I({},c,{},d)}function pd(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||xb,Ob=ka.current,Y(ka,a),Y(sa,sa.current),!0}function fh(a,b,c){var d=a.stateNode;if(!d)throw Error(q(169));c?(a=eh(a,b,Ob),d.__reactInternalMemoizedMergedChildContext=a,Q(sa),Q(ka),Y(ka,a)):Q(sa),Y(sa,c)}var Nj=N.unstable_runWithPriority,Re=N.unstable_scheduleCallback,gh=N.unstable_cancelCallback,hh=N.unstable_requestPaint,Se=N.unstable_now,Oj=N.unstable_getCurrentPriorityLevel,qd=N.unstable_ImmediatePriority,ih=N.unstable_UserBlockingPriority,jh=N.unstable_NormalPriority,kh=N.unstable_LowPriority,lh=N.unstable_IdlePriority,mh={},Pj=N.unstable_shouldYield,Qj=void 0!==hh?hh:function(){},kb=null,rd=null,Te=!1,nh=Se(),Ia=1e4>nh?Se:function(){return Se()-nh};function sd(){switch(Oj()){case qd:return 99;case ih:return 98;case jh:return 97;case kh:return 96;case lh:return 95;default:throw Error(q(332))}}function oh(a){switch(a){case 99:return qd;case 98:return ih;case 97:return jh;case 96:return kh;case 95:return lh;default:throw Error(q(332))}}function yb(a,b){return a=oh(a),Nj(a,b)}function ph(a,b,c){return a=oh(a),Re(a,b,c)}function qh(a){return null===kb?(kb=[a],rd=Re(qd,rh)):kb.push(a),mh}function Ya(){if(null!==rd){var a=rd;rd=null,gh(a)}rh()}function rh(){if(!Te&&null!==kb){Te=!0;var a=0;try{var b=kb;yb(99,function(){for(;a=b&&(_a=!0),a.firstContext=null)}function Ja(a,b){if(wd!==a&&!1!==b&&0!==b){("number"!==typeof b||1073741823===b)&&(wd=a,b=1073741823),b={context:a,observedBits:b,next:null};if(null===ic){if(null===vd)throw Error(q(308));ic=b,vd.dependencies={expirationTime:0,firstContext:b,responders:null}}else ic=ic.next=b}return a._currentValue}var zb=!1;function We(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function Xe(a,b){a=a.updateQueue,b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function Ab(a,b){return a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null},a.next=a}function Bb(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b),a.pending=b}}function th(a,b){var c=a.alternate;null!==c&&Xe(c,a),a=a.updateQueue,c=a.baseQueue,null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}function Lc(a,b,c,d){var e=a.updateQueue;zb=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next,g.next=h}f=g,e.shared.pending=null,h=a.alternate,null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var l=e.baseState,m=0,v=null,w=null,K=null;if(null!==h){var M=h;do{g=M.expirationTime;if(gm&&(m=g)}else{null!==K&&(K=K.next={expirationTime:1073741823,suspenseConfig:M.suspenseConfig,tag:M.tag,payload:M.payload,callback:M.callback,next:null}),pi(g,M.suspenseConfig);u:{var ha=a,k=M;g=b,La=c;switch(k.tag){case 1:ha=k.payload;if("function"===typeof ha){l=ha.call(La,l,g);break u}l=ha;break u;case 3:ha.effectTag=ha.effectTag&-4097|64;case 0:ha=k.payload,g="function"===typeof ha?ha.call(La,l,g):ha;if(null===g||void 0===g)break u;l=I({},l,g);break u;case 2:zb=!0}}null!==M.callback&&(a.effectTag|=32,g=e.effects,null===g?e.effects=[M]:g.push(M))}M=M.next;if(null===M||M===h){if(g=e.shared.pending,null===g)break;M=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}}while(1)}null===K?v=l:K.next=w,e.baseState=v,e.baseQueue=K,Xd(m),a.expirationTime=m,a.memoizedState=l}}function uh(a,b,c){a=b.effects,b.effects=null;if(null!==a)for(b=0;bL?(T=B,B=null):T=B.sibling;var H=K(k,B,n[L],s);if(null===H){null===B&&(B=T);break}a&&B&&null===H.alternate&&b(k,B),j=f(H,j,L),null===y?t=H:y.sibling=H,y=H,B=T}if(L===n.length)return c(k,B),t;if(null===B){for(;LL?(T=B,B=null):T=B.sibling;var Hb=K(k,B,H.value,s);if(null===Hb){null===B&&(B=T);break}a&&B&&null===Hb.alternate&&b(k,B),j=f(Hb,j,L),null===y?t=Hb:y.sibling=Hb,y=Hb,B=T}if(H.done)return c(k,B),t;if(null===B){for(;!H.done;L++,H=n.next())H=w(k,H.value,s),null!==H&&(j=f(H,j,L),null===y?t=H:y.sibling=H,y=H);return t}for(B=d(k,B);!H.done;L++,H=n.next())H=M(B,k,L,H.value,s),null!==H&&(a&&null!==H.alternate&&B.delete(null===H.key?L:H.key),j=f(H,j,L),null===y?t=H:y.sibling=H,y=H);return a&&B.forEach(function(qk){return b(k,qk)}),t}return function(k,j,n,s){var t="object"===typeof n&&null!==n&&n.type===Kb&&null===n.key;t&&(n=n.props.children);var y="object"===typeof n&&null!==n;if(y)switch(n.$$typeof){case Xc:u:{for(y=n.key,t=j;null!==t;){if(t.key===y){switch(t.tag){case 7:if(n.type===Kb){c(k,t.sibling),j=e(t,n.props.children),j.return=k,k=j;break u}break;default:if(t.elementType===n.type){c(k,t.sibling),j=e(t,n.props),j.ref=Nc(k,t,n),j.return=k,k=j;break u}}c(k,t);break}else b(k,t);t=t.sibling}n.type===Kb?(j=Gb(n.props.children,k.mode,s,n.key),j.return=k,k=j):(s=Yd(n.type,n.key,n.props,null,k.mode,s),s.ref=Nc(k,j,n),s.return=k,k=s)}return g(k);case _b:u:{for(t=n.key;null!==j;){if(j.key===t)if(4===j.tag&&j.stateNode.containerInfo===n.containerInfo&&j.stateNode.implementation===n.implementation){c(k,j.sibling),j=e(j,n.children||[]),j.return=k,k=j;break u}else{c(k,j);break}else b(k,j);j=j.sibling}j=Hf(n,k.mode,s),j.return=k,k=j}return g(k)}if("string"===typeof n||"number"===typeof n)return n=""+n,null!==j&&6===j.tag?(c(k,j.sibling),j=e(j,n),j.return=k,k=j):(c(k,j),j=Gf(n,k.mode,s),j.return=k,k=j),g(k);if(zd(n))return La(k,j,n,s);if(pc(n))return ha(k,j,n,s);y&&Ad(k,n);if("undefined"===typeof n&&!t)switch(k.tag){case 1:case 0:throw k=k.type,Error(q(152,k.displayName||k.name||"Component"))}return c(k,j)}}var kc=zh(!0),Ze=zh(!1),Oc={},Za={current:Oc},Pc={current:Oc},Qc={current:Oc};function Pb(a){if(a===Oc)throw Error(q(174));return a}function _e(a,b){Y(Qc,b),Y(Pc,a),Y(Za,Oc),a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:je(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=je(b,a)}Q(Za),Y(Za,b)}function lc(){Q(Za),Q(Pc),Q(Qc)}function Ah(a){Pb(Qc.current);var b=Pb(Za.current),c=je(b,a.type);b!==c&&(Y(Pc,a),Y(Za,c))}function $e(a){Pc.current===a&&(Q(Za),Q(Pc))}var X={current:0};function Bd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Be||c.data===Ce))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b,b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return,b=b.sibling}return null}function af(a,b){return{responder:a,props:b}}var Cd=Pa.ReactCurrentDispatcher,Ka=Pa.ReactCurrentBatchConfig,Cb=0,$=null,la=null,ma=null,Dd=!1;function Ba(){throw Error(q(321))}function bf(a,b){if(null===b)return!1;for(var c=0;cf))throw Error(q(301));f+=1,ma=la=null,b.updateQueue=null,Cd.current=Tj,a=c(d,e)}while(b.expirationTime===Cb)}Cd.current=Id,b=null!==la&&null!==la.next,Cb=0,ma=la=$=null,Dd=!1;if(b)throw Error(q(300));return a}function mc(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ma?$.memoizedState=ma=a:ma=ma.next=a,ma}function nc(){if(null===la){var a=$.alternate;a=null!==a?a.memoizedState:null}else a=la.next;var b=null===ma?$.memoizedState:ma.next;if(null!==b)ma=b,la=a;else{if(null===a)throw Error(q(310));la=a,a={memoizedState:la.memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ma?$.memoizedState=ma=a:ma=ma.next=a}return ma}function Qb(a,b){return"function"===typeof b?b(a):b}function Ed(a){var b=nc(),c=b.queue;if(null===c)throw Error(q(311));c.lastRenderedReducer=a;var d=la,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next,f.next=g}d.baseQueue=e=f,c.pending=null}if(null!==e){e=e.next,d=d.baseState;var h=g=f=null,l=e;do{var m=l.expirationTime;if(m$.expirationTime&&($.expirationTime=m,Xd(m))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),pi(m,l.suspenseConfig),d=l.eagerReducer===a?l.eagerState:a(d,l.action);l=l.next}while(null!==l&&l!==e);null===h?f=d:h.next=g,Nb(d,b.memoizedState)||(_a=!0),b.memoizedState=d,b.baseState=f,b.baseQueue=h,c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}function Fd(a){var b=nc(),c=b.queue;if(null===c)throw Error(q(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Nb(f,b.memoizedState)||(_a=!0),b.memoizedState=f,null===b.baseQueue&&(b.baseState=f),c.lastRenderedState=f}return[f,d]}function df(a){var b=mc();return"function"===typeof a&&(a=a()),b.memoizedState=b.baseState=a,a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Qb,lastRenderedState:a},a=a.dispatch=Ih.bind(null,$,a),[b.memoizedState,a]}function ef(a,b,c,d){return a={tag:a,create:b,destroy:c,deps:d,next:null},b=$.updateQueue,null===b?(b={lastEffect:null},$.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a)),a}function Bh(){return nc().memoizedState}function ff(a,b,c,d){var e=mc();$.effectTag|=a,e.memoizedState=ef(1|b,c,void 0,void 0===d?null:d)}function gf(a,b,c,d){var e=nc();d=void 0===d?null:d;var f=void 0;if(null!==la){var g=la.memoizedState;f=g.destroy;if(null!==d&&bf(d,g.deps)){ef(b,c,f,d);return}}$.effectTag|=a,e.memoizedState=ef(1|b,c,f,d)}function Ch(a,b){return ff(516,4,a,b)}function Gd(a,b){return gf(516,4,a,b)}function Dh(a,b){return gf(4,2,a,b)}function Eh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Fh(a,b,c){return c=null!==c&&void 0!==c?c.concat([a]):null,gf(4,2,Eh.bind(null,b,a),c)}function hf(){}function Gh(a,b){return mc().memoizedState=[a,void 0===b?null:b],a}function Hd(a,b){var c=nc();b=void 0===b?null:b;var d=c.memoizedState;return null!==d&&null!==b&&bf(b,d[1])?d[0]:(c.memoizedState=[a,b],a)}function Hh(a,b){var c=nc();b=void 0===b?null:b;var d=c.memoizedState;return null!==d&&null!==b&&bf(b,d[1])?d[0]:(a=a(),c.memoizedState=[a,b],a)}function jf(a,b,c){var d=sd();yb(98>d?98:d,function(){a(!0)}),yb(97",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e),a[vb]=b,a[id]=d,Vh(a,b,!1,!1),b.stateNode=a,g=ye(e,d);switch(e){case"iframe":case"object":case"embed":S("load",a),h=d;break;case"video":case"audio":for(h=0;hd.tailExpiration&&1b)&&Tb.set(a,b)))}}function Vd(a,b){a.expirationTimea?c:a,2>=a&&b!==a?0:a}function Ea(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=qh(Bf.bind(null,a));else{var b=Wd(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=ab();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==mh&&gh(c)}a.callbackExpirationTime=b,a.callbackPriority=d,b=1073741823===b?qh(Bf.bind(null,a)):ph(d,ki.bind(null,a),{timeout:10*(1073741821-b)-Ia()}),a.callbackNode=b}}}function ki(a,b){Ud=0;if(b)return b=ab(),If(a,b),Ea(a),null;var c=Wd(a);if(0!==c){b=a.callbackNode;if((C&(Ra|$a))!==ba)throw Error(q(327));oc(),a===Da&&c===ua||Vb(a,c);if(null!==F){var d=C;C|=Ra;var e=oi();do try{dk();break}catch(h){ni(a,h)}while(1);Ue(),C=d,Ld.current=e;if(ca===Md)throw b=Pd,Vb(a,c),Zb(a,c),Ea(a),b;if(null===F)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=ca,Da=null,d){case Sb:case Md:throw Error(q(345));case ii:If(a,2=c){a.lastPingedTime=c,Vb(a,c);break}}f=Wd(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Ge(Wb.bind(null,a),e);break}Wb(a);break;case Od:Zb(a,c),d=a.lastSuspendedTime,c===d&&(a.nextKnownPendingLevel=Cf(e));if(Rd&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c,Vb(a,c);break}e=Wd(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}1073741823!==Rc?d=10*(1073741821-Rc)-Ia():1073741823===nb?d=0:(d=10*(1073741821-nb)-5e3,e=Ia(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*ak(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=Ia()-(10*(1073741821-f)-(g.timeoutMs|0||5e3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display.`+de(g))}ca!==xf&&(ca=ii),h=rf(h,g),w=f;do{switch(w.tag){case 3:l=h,w.effectTag|=4096,w.expirationTime=b;var t=fi(w,l,b);th(w,t);break u;case 1:l=h;var y=w.type,B=w.stateNode;if(0===(w.effectTag&64)&&("function"===typeof y.getDerivedStateFromError||null!==B&&"function"===typeof B.componentDidCatch&&(null===Eb||!Eb.has(B)))){w.effectTag|=4096,w.expirationTime=b;var L=gi(w,l,b);th(w,L);break u}}w=w.return}while(null!==w)}F=ri(F)}catch(T){b=T;continue}break}while(1)}function oi(){var a=Ld.current;return Ld.current=Id,null===a?Id:a}function pi(a,b){aSc&&(Sc=a)}function ck(){for(;null!==F;)F=qi(F)}function dk(){for(;null!==F&&!Pj();)F=qi(F)}function qi(a){var b=ti(a.alternate,a,ua);return a.memoizedProps=a.pendingProps,null===b&&(b=ri(a)),hi.current=null,b}function ri(a){F=a;do{var b=F.alternate;a=F.return;if(0===(F.effectTag&2048)){b=Vj(b,F,ua);if(1===ua||1!==F.childExpirationTime){for(var c=0,d=F.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e),f>c&&(c=f),d=d.sibling}F.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=F.firstEffect),null!==F.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=F.firstEffect),a.lastEffect=F.lastEffect),1a?b:a}function Wb(a){var b=sd();return yb(99,ek.bind(null,a,b)),null}function ek(a,b){do oc();while(null!==Tc);if((C&(Ra|$a))!==ba)throw Error(q(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null,a.finishedExpirationTime=0;if(c===a.current)throw Error(q(177));a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90,a.nextKnownPendingLevel=0;var e=Cf(c);a.firstPendingTime=e,d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=d-1),d<=a.lastPingedTime&&(a.lastPingedTime=0),d<=a.lastExpiredTime&&(a.lastExpiredTime=0),a===Da&&(F=Da=null,ua=0),1h&&(m=h,h=g,g=m),m=Dg(s,g),v=Dg(s,h),m&&v&&(1!==y.rangeCount||y.anchorNode!==m.node||y.anchorOffset!==m.offset||y.focusNode!==v.node||y.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(m.node,m.offset),y.removeAllRanges(),g>h?(y.addRange(t),y.extend(v.node,v.offset)):(t.setEnd(v.node,v.offset),y.addRange(t)))))),t=[],y=s;y=y.parentNode;)1===y.nodeType&&t.push({element:y,left:y.scrollLeft,top:y.scrollTop});for("function"===typeof s.focus&&s.focus(),s=0;s=c?Sh(a,b,c):(Y(X,X.current&1),b=mb(a,b,c),null!==b?b.sibling:null);Y(X,X.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return Uh(a,b,c);b.effectTag|=64}e=b.memoizedState,null!==e&&(e.rendering=null,e.tail=null),Y(X,X.current);if(!d)return null}return mb(a,b,c)}_a=!1}}else _a=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type,null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),a=b.pendingProps,e=hc(b,ka.current),jc(b,c),e=cf(null,b,d,a,e,c),b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1,b.memoizedState=null,b.updateQueue=null;if(ta(d)){var f=!0;pd(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,We(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&xd(b,d,g,a),e.updater=yd,b.stateNode=e,e._reactInternalFiber=b,Ye(b,d,a,c),b=nf(null,b,d,!0,f,c)}else b.tag=0,Ca(null,b,e,c),b=b.child;return b;case 16:u:{e=b.elementType,null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),a=b.pendingProps,Li(e);if(1!==e._status)throw e._result;e=e._result,b.type=e,f=b.tag=lk(e),a=Qa(e,a);switch(f){case 0:b=mf(null,b,e,a,c);break u;case 1:b=Qh(null,b,e,a,c);break u;case 11:b=Mh(null,b,e,a,c);break u;case 14:b=Nh(null,b,e,Qa(e.type,a),d,c);break u}throw Error(q(306,e,""))}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Qa(d,e),mf(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Qa(d,e),Qh(a,b,d,e,c);case 3:Rh(b),d=b.updateQueue;if(null===a||null===d)throw Error(q(282));d=b.pendingProps,e=b.memoizedState,e=null!==e?e.element:null,Xe(a,b),Lc(b,d,null,c),d=b.memoizedState.element;if(d===e)lf(),b=mb(a,b,c);else{(e=b.stateNode.hydrate)&&(Db=cc(b.stateNode.containerInfo.firstChild),lb=b,e=Rb=!0);if(e)for(c=Ze(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else Ca(a,b,d,c),lf();b=b.child}return b;case 5:return Ah(b),null===a&&kf(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Fe(d,e)?g=null:null!==f&&Fe(d,f)&&(b.effectTag|=16),Ph(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(Ca(a,b,g,c),b=b.child),b;case 6:return null===a&&kf(b),null;case 13:return Sh(a,b,c);case 4:return _e(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=kc(b,null,d,c):Ca(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Qa(d,e),Mh(a,b,d,e,c);case 7:return Ca(a,b,b.pendingProps,c),b.child;case 8:return Ca(a,b,b.pendingProps.children,c),b.child;case 12:return Ca(a,b,b.pendingProps.children,c),b.child;case 10:u:{d=b.type._context,e=b.pendingProps,g=b.memoizedProps,f=e.value;var h=b.type._context;Y(ud,h._currentValue),h._currentValue=f;if(null!==g)if(h=g.value,f=Nb(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!sa.current){b=mb(a,b,c);break u}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var l=h.dependencies;if(null!==l){g=h.child;for(var m=l.firstContext;null!==m;){if(m.context===d&&0!==(m.observedBits&f)){1===h.tag&&(m=Ab(c,null),m.tag=2,Bb(h,m)),h.expirationTime=b&&a<=b}function Zb(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)&&(a.lastSuspendedTime=b),b<=a.lastPingedTime&&(a.lastPingedTime=0),b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}function vi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function If(a,b){var c=a.lastExpiredTime;(0===c||c>b)&&(a.lastExpiredTime=b)}function Zd(a,b,c,d){var e=b.current,f=ab(),g=Mc.suspense;f=Ub(f,e,g);u:if(c){c=c._reactInternalFiber;cb:{if(Lb(c)!==c||1!==c.tag)throw Error(q(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break cb;case 1:if(ta(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break cb}}h=h.return}while(null!==h);throw Error(q(171))}if(1===c.tag){var l=c.type;if(ta(l)){c=eh(c,l,h);break u}}c=h}else c=xb;return null===b.context?b.context=c:b.pendingContext=c,b=Ab(f,g),b.payload={element:a},d=void 0===d?null:d,null!==d&&(b.callback=d),Bb(e,b),Fb(e,f),f}function Jf(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function wi(a,b){a=a.memoizedState,null!==a&&null!==a.dehydrated&&a.retryTime{"use strict";function P(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P)}catch(I){console.error(I)}}P(),ea.exports=cb()});const vk=Of(Mf()),wk=Of(yi());class Di extends vk.default.Component{state={tasks:[]};componentDidMount(){fetch("/todos").then(p=>p.json()).then(p=>{this.setState({tasks:p.map(na=>na.content)})})}handleSubmit=p=>{fetch(`/todos/add/${p}`).then(na=>{this.setState({tasks:[...this.state.tasks,p]})})};handleDelete=p=>{fetch(`/todos/remove/${p}`).then(na=>{const ea=[...this.state.tasks];ea.splice(p,1),this.setState({tasks:ea})})};render(){return vk.default.createElement("div",{className:"wrapper"},vk.default.createElement("div",{className:"card frame"},vk.default.createElement(Fi,{numTodos:this.state.tasks.length}),vk.default.createElement(Gi,{tasks:this.state.tasks,onDelete:this.handleDelete}),vk.default.createElement(Ei,{onFormSubmit:this.handleSubmit})))}}class Ei extends vk.default.Component{state={term:""};handleSubmit=p=>{p.preventDefault();if(this.state.term==="")return;this.props.onFormSubmit(this.state.term),this.setState({term:""})};render(){return vk.default.createElement("form",{onSubmit:this.handleSubmit},vk.default.createElement("input",{type:"text",className:"input",placeholder:"Enter Item",value:this.state.term,onChange:p=>this.setState({term:p.target.value})}),vk.default.createElement("button",{className:"button"},"Submit"))}}const Fi=p=>vk.default.createElement("div",{className:"card-header"},vk.default.createElement("h1",{className:"card-header-title header"},"You have ",p.numTodos," Todos")),Gi=p=>{const na=p.tasks.map((ea,P)=>vk.default.createElement(Hi,{content:ea,key:P,id:P,onDelete:p.onDelete}));return vk.default.createElement("div",{className:"list-wrapper"},na)},Hi=p=>vk.default.createElement("div",{className:"list-item"},p.content,vk.default.createElement("button",{class:"delete is-pulled-right",onClick:()=>{p.onDelete(p.id)}}));wk.default.render(vk.default.createElement(Di,null),document.querySelector("#root"));})(); \ No newline at end of file diff --git a/examples/nodejs/todo/public/style.css b/examples/nodejs/todo/public/style.css new file mode 100644 index 0000000..6566176 --- /dev/null +++ b/examples/nodejs/todo/public/style.css @@ -0,0 +1,31 @@ +form { + display: flex; + padding: 10px; +} + +.wrapper { + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"%3E%3Cpath fill="%239C92AC" fill-opacity="0.4" d="M1 3h1v1H1V3zm2-2h1v1H3V1z"%3E%3C/path%3E%3C/svg%3E'); +} + +.input { + margin-right: 10px; +} + +.frame { + width: 40vw; + max-width: 400px; +} + +.header { + display: inline; + text-align: center; +} + +.list-wrapper { + max-height: 200px; + overflow-y: auto; +} \ No newline at end of file diff --git a/examples/nodejs/todo/yarn.lock b/examples/nodejs/todo/yarn.lock new file mode 100644 index 0000000..3b62e50 --- /dev/null +++ b/examples/nodejs/todo/yarn.lock @@ -0,0 +1,534 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +better-sqlite3@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-7.1.0.tgz#4894d0fa4002bd7859a0a539577f14f24b245f6a" + integrity sha512-FV/snQ8F/kyqhdxsevzbojVtMowDWOfe1A5N3lYu1KJwoho2t7JgITmdlSc7DkOh3Zq65I+ZyeNWXQrkLEDFTg== + dependencies: + bindings "^1.5.0" + prebuild-install "^5.3.3" + tar "4.4.10" + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bl@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a" + integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +blake2b-wasm@^1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz#e4d075da10068e5d4c3ec1fb9accc4d186c55d81" + integrity sha512-oFIHvXhlz/DUgF0kq5B1CqxIDjIJwh9iDeUUGQUcvgiGz7Wdw03McEO7CfLBy7QKGdsydcMCgO9jFNBAFCtFcA== + dependencies: + nanoassert "^1.0.0" + +blake2b@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/blake2b/-/blake2b-2.1.3.tgz#f5388be424768e7c6327025dad0c3c6d83351bca" + integrity sha512-pkDss4xFVbMb4270aCyGD3qLv92314Et+FsKzilCLxDz5DuZ2/1g3w4nmBbu6nKApPspnjG7JcwTjGZnduB1yg== + dependencies: + blake2b-wasm "^1.1.0" + nanoassert "^1.0.0" + +buffer@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" + integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +flatend@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/flatend/-/flatend-0.0.1.tgz#b4d4155dccf7ad696f585929accb8c9196e57b0f" + integrity sha512-QtIEOOCvWhl22KUdpRVgkvJK4ztYutXaGw9Dgyy4++h0esNoQ+pFek8JwyGbyiUXMO++0Lt/mR9IOsPLsHmn5Q== + dependencies: + blake2b "^2.1.3" + ip "^1.1.5" + tweetnacl "^1.0.3" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp-classic@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +nanoassert@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d" + integrity sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40= + +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +node-abi@^2.7.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.18.0.tgz#1f5486cfd7d38bd4f5392fa44a4ad4d9a0dffbf4" + integrity sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw== + dependencies: + semver "^5.4.1" + +noop-logger@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= + +npmlog@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +prebuild-install@^5.3.3: + version "5.3.4" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.4.tgz#6982d10084269d364c1856550b7d090ea31fa293" + integrity sha512-AkKN+pf4fSEihjapLEEj8n85YIw/tN6BQqkhzbDc0RvEZGdkpJBGMUYx66AAMcPG2KzmPQS7Cm16an4HVBRRMA== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp "^0.5.1" + napi-build-utils "^1.0.1" + node-abi "^2.7.0" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +signal-exit@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +simple-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" + integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= + +simple-get@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" + integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +tar-fs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" + integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.0.0" + +tar-stream@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" + integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== + dependencies: + bl "^4.0.1" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +tar@4.4.10: + version "4.4.10" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" + integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.5" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +which-pm-runs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" + integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== diff --git a/nodejs/example/package.json b/nodejs/example/package.json deleted file mode 100644 index 1c364c6..0000000 --- a/nodejs/example/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "example", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "devDependencies": { - "typescript": "^3.9.5" - } -} diff --git a/nodejs/example/src/index.ts b/nodejs/example/src/index.ts deleted file mode 100644 index a4221b2..0000000 --- a/nodejs/example/src/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Context, Node} from "flatend"; -import * as fs from "fs"; - -async function main() { - const node = new Node(); - - node.register("get_todos", (ctx: Context) => ctx.json(ctx.headers)); - node.register("all_todos", (ctx: Context) => fs.createReadStream("./nodejs/package.json").pipe(ctx)); - - node.register('pipe', async (ctx: Context) => { - const body = await ctx.body({limit: 65536}); - ctx.json(JSON.parse(body.toString("utf8"))); - }); - - await node.dial("127.0.0.1:9000"); -} - -main().catch(err => console.error(err)); \ No newline at end of file diff --git a/nodejs/example/tsconfig.json b/nodejs/example/tsconfig.json deleted file mode 100644 index 52cc8c8..0000000 --- a/nodejs/example/tsconfig.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "dist", /* Redirect output structure to the directory. */ - "rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - }, - "exclude": ["node_modules", "dist"] -} diff --git a/nodejs/example/yarn.lock b/nodejs/example/yarn.lock deleted file mode 100644 index c54b73f..0000000 --- a/nodejs/example/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -typescript@^3.9.5: - version "3.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" - integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==