parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c0;)e.queue.shift()(t);e.scheduled=!1,e.queue.length&&e.schedule()})}},i.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})},module.exports=n; },{"assert":"Yjno"}],"XNjw":[function(require,module,exports) { var r,e=require("nanoscheduler")(),a=require("assert");n.disabled=!0;try{r=window.performance,n.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!r.mark}catch(i){}function n(u){if(a.equal(typeof u,"string","nanotiming: name should be type string"),n.disabled)return t;var o=(1e4*r.now()).toFixed()%Number.MAX_SAFE_INTEGER,s="start-"+o+"-"+u;function c(a){var n="end-"+o+"-"+u;r.mark(n),e.push(function(){var e=null;try{var t=u+" ["+o+"]";r.measure(t,s,n),r.clearMarks(s),r.clearMarks(n)}catch(i){e=i}a&&a(e,u)})}return r.mark(s),c.uuid=o,c}function t(r){r&&e.push(function(){r(new Error("nanotiming: performance API unavailable"))})}module.exports=n; },{"nanoscheduler":"WJwS","assert":"Yjno"}],"ccGh":[function(require,module,exports) { var e=require("assert");function n(){if(!(this instanceof n))return new n;this.trie={nodes:{}}}function t(e,n){return Object.prototype.hasOwnProperty.call(e,n)}module.exports=n,n.prototype.create=function(n){e.equal(typeof n,"string","route should be a string");var r=n.replace(/^\//,"").split("/");return function e(n,o){var s=t(r,n)&&r[n];if(!1===s)return o;var i=null;return/^:|^\*/.test(s)?(t(o.nodes,"$$")?i=o.nodes.$$:(i={nodes:{}},o.nodes.$$=i),"*"===s[0]&&(o.wildcard=!0),o.name=s.replace(/^:|^\*/,"")):t(o.nodes,s)?i=o.nodes[s]:(i={nodes:{}},o.nodes[s]=i),e(n+1,i)}(0,this.trie)},n.prototype.match=function(n){e.equal(typeof n,"string","route should be a string");var r=n.replace(/^\//,"").split("/"),o={};var s=function e(n,s){if(void 0!==s){var i=r[n];if(void 0===i)return s;if(t(s.nodes,i))return e(n+1,s.nodes[i]);if(s.name){try{o[s.name]=decodeURIComponent(i)}catch(a){return e(n,void 0)}return e(n+1,s.nodes.$$)}if(s.wildcard){try{o.wildcard=decodeURIComponent(r.slice(n).join("/"))}catch(a){return e(n,void 0)}return s.nodes.$$}return e(n+1)}}(0,this.trie);if(s)return(s=Object.assign({},s)).params=o,s},n.prototype.mount=function(n,t){e.equal(typeof n,"string","route should be a string"),e.equal(typeof t,"object","trie should be a object");var r=n.replace(/^\//,"").split("/"),o=null,s=null;if(1===r.length)s=r[0],o=this.create(s);else{var i=r.join("/");s=r[0],o=this.create(i)}Object.assign(o.nodes,t.nodes),t.name&&(o.name=t.name),o.nodes[""]&&(Object.keys(o.nodes[""]).forEach(function(e){"nodes"!==e&&(o[e]=o.nodes[""][e])}),Object.assign(o.nodes,o.nodes[""].nodes),delete o.nodes[""].nodes)}; },{"assert":"Yjno"}],"RgNL":[function(require,module,exports) { var r=require("assert"),e=require("./trie");function t(n){if(!(this instanceof t))return new t(n);var a=(n||"").replace(/^\//,""),i=e();return u._trie=i,u.on=function(e,t){if(r.equal(typeof e,"string"),r.equal(typeof t,"function"),e=e||"/",t._wayfarer&&t._trie)i.mount(e,t._trie.trie);else{var n=i.create(e);n.cb=t,n.route=e}return u},u.emit=u,u.match=o,u._wayfarer=!0,u;function u(r){var e=o(r),t=new Array(arguments.length);t[0]=e.params;for(var n=1;n=0;--o)n=(r=l[o]).name,a=r.namespaceURI,i=r.value,a?(n=r.localName||n,t.getAttributeNS(a,n)!==i&&t.setAttributeNS(a,n,i)):t.hasAttribute(n)?t.getAttribute(n)!==i&&("null"===i||"undefined"===i?t.removeAttribute(n):t.setAttribute(n,i)):t.setAttribute(n,i);for(var v=u.length-1;v>=0;--v)!1!==(r=u[v]).specified&&(n=r.name,(a=r.namespaceURI)?(n=r.localName||n,e.hasAttributeNS(a,n)||t.removeAttributeNS(a,n)):e.hasAttributeNS(null,n)||t.removeAttribute(n))}function r(u,l){for(var a=0;a=o||0===r)){var f=o-(r=e+r>o?o-e:r);for(n=e;n0&&this._emit(this._listeners[e],n),this._starListeners.length>0&&this._emit(this._starListeners,e,n,o.uuid),o(),this},n.prototype.on=n.prototype.addListener=function(e,t){return s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.on: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.on: listener should be type function"),"*"===e?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this},n.prototype.prependListener=function(e,t){return s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependListener: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.prependListener: listener should be type function"),"*"===e?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this},n.prototype.once=function(e,t){s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.once: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.once: listener should be type function");var n=this;return this.on(e,function s(){t.apply(n,arguments);n.removeListener(e,s)}),this},n.prototype.prependOnceListener=function(e,t){s.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependOnceListener: eventName should be type string or symbol"),s.equal(typeof t,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(e,function s(){t.apply(n,arguments);n.removeListener(e,s)}),this},n.prototype.removeListener=function(t,n){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.removeListener: eventName should be type string or symbol"),s.equal(typeof n,"function","nanobus.removeListener: listener should be type function"),"*"===t?(this._starListeners=this._starListeners.slice(),i(this._starListeners,n)):(void 0!==this._listeners[t]&&(this._listeners[t]=this._listeners[t].slice()),i(this._listeners[t],n));function i(t,s){if(t){var n=t.indexOf(s);return-1!==n?(e(t,n,1),!0):void 0}}},n.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this},n.prototype.listeners=function(e){var t="*"!==e?this._listeners[e]:this._starListeners,s=[];if(t)for(var n=t.length,i=0;ithis.maxAge)||(this.remove(t),!1)},t.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},t.prototype.evict=function(){this.tail&&this.remove(this.tail)}; },{}],"D2q2":[function(require,module,exports) { var e=require("assert"),t=require("nanolru");function o(n,h,r){e.ok(this instanceof o,"ChooComponentCache should be created with `new`"),e.equal(typeof n,"object","ChooComponentCache: state should be type object"),e.equal(typeof h,"function","ChooComponentCache: emit should be type function"),this.cache="number"==typeof r?new t(r):r||new t(100),this.state=n,this.emit=h}function n(e){return new(e.bind.apply(e,arguments))}module.exports=o,o.prototype.render=function(t,o){e.equal(typeof t,"function","ChooComponentCache.render: Component should be type function"),e.ok("string"==typeof o||"number"==typeof o,"ChooComponentCache.render: id should be type string or type number");var h=this.cache.get(o);if(!h){for(var r=[],i=2,u=arguments.length;i is not the same type as the new node <"+t.nodeName.toLowerCase()+">.");var n=o("choo.morph");r(i._tree,t),n(),e()})),t(function(){i.emitter.emit(i._events.DOMCONTENTLOADED),i._loaded=!0}),n(),this._tree},l.prototype.mount=function(e){var n=o("choo.mount('"+e+"')");if("object"!=typeof window)return u.ok("string"==typeof e,"choo.mount: selector should be type String"),this.selector=e,n(),this;u.ok("string"==typeof e||"object"==typeof e,"choo.mount: selector should be type String or HTMLElement");var i=this;t(function(){var t=o("choo.render"),n=i.start();i._tree="string"==typeof e?document.querySelector(e):e,u.ok(i._tree,"choo.mount: could not query selector: "+e),u.equal(i._tree.nodeName,n.nodeName,"choo.mount: The target node <"+i._tree.nodeName.toLowerCase()+"> is not the same type as the new node <"+n.nodeName.toLowerCase()+">.");var s=o("choo.morph");r(i._tree,n),s(),t()}),n()},l.prototype.toString=function(e,t){(t=t||{}).components=t.components||{},t.events=Object.assign({},t.events,this._events),u.notEqual(typeof window,"object","choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser"),u.equal(typeof e,"string","choo.toString: location should be type string"),u.equal(typeof t,"object","choo.toString: state should be type object"),this._setCache(t),this._matchRoute(t,e),this.emitter.removeAllListeners(),this._stores.forEach(function(e){e(t)});var o=this._prerender(t);return u.ok(o,"choo.toString: no valid value returned for the route "+e),u(!Array.isArray(o),"choo.toString: return value was an array for the route "+e),"string"==typeof o.outerHTML?o.outerHTML:o.toString()},l.prototype._matchRoute=function(e,t){var o,n;t?(o=t.replace(/\?.+$/,"").replace(/\/$/,""),this._hashEnabled||(o=o.replace(/#.+$/,"")),n=t):(o=window.location.pathname.replace(/\/$/,""),this._hashEnabled&&(o+=window.location.hash.replace(/^#/,"/")),n=window.location.search);var r=this.router.match(o);this._handler=r.cb,e.href=o,e.query=i(n),e.route=r.route,e.params=r.params},l.prototype._prerender=function(e){var t=o("choo.prerender('"+e.route+"')"),n=this._handler(e,this.emit);return t(),n},l.prototype._setCache=function(e){var t=new c(e,this.emitter.emit.bind(this.emitter),this._cache);function o(e,o){u.equal(typeof e,"function","choo.state.cache: Component should be type function");for(var n=[],r=0,i=arguments.length;r1&&($.pop(),$[$.length-1][0][2][D]=y(j[0],j[1],j[2].length?j[2]:void 0))}else if(B===r){var E=[M[1],{},[]];j[2].push(E),$.push([E,j[2].length-1])}else if(B===l||B===t&&M[1]===l){for(var P,R="";S1&&/^\s*$/.test(T[2][0])&&T[2].shift(),T[2].length>2||2===T[2].length&&/\S/.test(T[2][1])){if(d.createFragment)return d.createFragment(T[2]);throw new Error("multiple root elements must be wrapped in an enclosing tag")}return Array.isArray(T[2][0])&&"string"==typeof T[2][0][0]&&Array.isArray(T[2][0][2])&&(T[2][0]=y(T[2][0][0],T[2][0][1],T[2][0][2])),T[2][0];function O(e){var t=[];A===o&&(A=h);for(var y=0;y"!==v||m(A)||A===c?A===c&&/-$/.test(k)&&"-"===v?(d.comments&&t.push([f,k.substr(0,k.length-1)]),k="",A=n):A===r&&/^!--$/.test(k)?(d.comments&&t.push([r,k],[l,"comment"],[a]),k=v,A=c):A===n||A===c?k+=v:A===r&&"/"===v&&k.length||(A===r&&/\s/.test(v)?(k.length&&t.push([r,k]),k="",A=h):A===r?k+=v:A===h&&/[^\s"'=/]/.test(v)?(A=l,k=v):A===h&&/\s/.test(v)?(k.length&&t.push([l,k]),t.push([g])):A===l&&/\s/.test(v)?(t.push([l,k]),k="",A=i):A===l&&"="===v?(t.push([l,k],[a]),k="",A=o):A===l?k+=v:A!==i&&A!==h||"="!==v?A!==i&&A!==h||/\s/.test(v)?A===o&&'"'===v?A=u:A===o&&"'"===v?A=p:A===u&&'"'===v?(t.push([f,k],[g]),k="",A=h):A===p&&"'"===v?(t.push([f,k],[g]),k="",A=h):A!==o||/\s/.test(v)?A===f&&/\s/.test(v)?(t.push([f,k],[g]),k="",A=h):A!==f&&A!==p&&A!==u||(k+=v):(A=f,y--):(t.push([g]),/[\w-]/.test(v)?(k+=v,A=l):A=h):(t.push([a]),A=o)):(A===r&&k.length?t.push([r,k]):A===l?t.push([l,k]):A===f&&k.length&&t.push([f,k]),t.push([s]),k="",A=n)}return A===n&&k.length?(t.push([n,k]),k=""):A===f&&k.length?(t.push([f,k]),k=""):A===u&&k.length?(t.push([f,k]),k=""):A===p&&k.length?(t.push([f,k]),k=""):A===l&&(t.push([l,k]),k=""),t}};function w(e){return"function"==typeof e?e:"string"==typeof e?e:e&&"object"==typeof e?e:null==e?e:b("",e)}};var y=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$");function v(e){return y.test(e)} },{"hyperscript-attribute-to-property":"yDLr"}],"Fyt9":[function(require,module,exports) { "use strict";var e=/\n[\s]+$/,a=/^\n[\s]+/,r=/[\s]+$/,n=/^[\s]+/,o=/[\n\s]+/g,l=["a","abbr","b","bdi","bdo","br","cite","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","amp","small","span","strong","sub","sup","time","u","var","wbr"],d=["code","pre","textarea"];module.exports=function p(t,i){if(Array.isArray(i))for(var c,s,f=t.nodeName.toLowerCase(),u=!1,m=0,b=i.length;m\n ',"\n \n "])),t.draggingElement?"dragging":"",l,i,t.draggingElement)}; },{"choo/html":"IYKM"}],"zqNQ":[function(require,module,exports) { var e;function r(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var n=require("choo/html");module.exports=function(c){var i=c.iconName;return n(e||(e=r(['\n \n '])),i)}; },{"choo/html":"IYKM"}],"pUEq":[function(require,module,exports) { var o,n;function e(o,n){return n||(n=o.slice(0)),Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(n)}}))}var c=require("choo/html"),i=require("./icon.js");module.exports=function(t){var r=t.type,u=void 0===r?"square":r,d=t.size,a=void 0===d?"medium":d,s=t.color,l=void 0===s?"mediumgrey":s,v=t.noIconBackground,p=void 0!==v&&v,b=t.icon,m=void 0===b?null:b,f=t.tooltip,k=void 0!==f&&f,j=t.selected,O=void 0!==j&&j,g=t.disabled,q=void 0!==g&&g,w=t.pickable,z=void 0!==w&&w,M=t.onClick,h=void 0===M?function(){return!1}:M,x=t.onMouseDown,y=void 0===x?function(){return!1}:x,B=t.onMouseUp,C=void 0===B?function(){return!1}:B,D=t.onMouseOver,I=void 0===D?function(){return!1}:D,N=O?"selected":"",P=q?"disabled":"",U=p?"no-background":"",A=z?"pickable":"",E=k?"tooltip":"",F=k?c(o||(o=e(['
',"
"])),k):"",G="".concat(u," ").concat(a," ").concat(l," \n ").concat(N," ").concat(P," ").concat(A," ").concat(E);return c(n||(n=e(["\n \n \n ',"\n \n ","\n \n "])),h,y,C,I,G,U,i({iconName:m}),F)}; },{"choo/html":"IYKM","./icon.js":"zqNQ"}],"i6WV":[function(require,module,exports) { var e=require("../elements/buttonicon.js");module.exports=function(n,r){return e({size:"big",icon:n.isMenuOpen?"cross":"hamburger",onClick:function(){return r("toggle-main-menu")}})}; },{"../elements/buttonicon.js":"pUEq"}],"OWVn":[function(require,module,exports) { var e;function r(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var i=require("choo/html");module.exports=function(t){var c=t.children,s=void 0===c?[]:c;return i(e||(e=r(['\n
\n
\n
\n
\n
\n ',"\n
\n "])),s)}; },{"choo/html":"IYKM"}],"TouA":[function(require,module,exports) { var e=require("../elements/chip.js"),n=require("../elements/buttonicon.js");module.exports=function(i,r){return e({children:[n({icon:"rewind",disabled:0===i.history.length||i.isMenuOpen,onClick:function(){return r("pop-history")}}),n({icon:i.isGamePlaying?"pause":"play",onClick:function(){return r("toggle-play")}}),n({icon:"fastforward",disabled:0===i.future.length||i.isMenuOpen,onClick:function(){return r("pop-future")}})]})}; },{"../elements/chip.js":"OWVn","../elements/buttonicon.js":"pUEq"}],"TtQ4":[function(require,module,exports) { var n,i,e,o;function c(n,i){return i||(i=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(i)}}))}var s=require("choo/html"),t=require("./icon.js");module.exports=function(r){var a=r.icon,l=void 0===a?null:a,u=r.image,d=void 0===u?null:u,v=r.spriteImage,p=void 0===v?null:v,m=r.text,g=void 0===m?null:m,b=r.size,h=void 0===b?"medium":b,f=r.type,k=void 0===f?"tight":f,y=r.color,z=void 0===y?"mediumgrey":y,j=r.iconSize,x=void 0===j?"":j,O=r.iconAlign,q=void 0===O?"":O,w=r.onClick,A=void 0===w?function(){return!1}:w,C=null;return d?C=s(n||(n=c(['\n \n \n "])),d):l?C=s(i||(i=c(['\n ',"\n "])),x,q,t({iconName:l})):p&&(C=s(e||(e=c(['\n \n \n ','\n ',"\n\n\n \n "])),A,k,h,z,C,q,g)}; },{"choo/html":"IYKM","./icon.js":"zqNQ"}],"DgQB":[function(require,module,exports) { var n;function e(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var o=require("choo/html");module.exports=function(u){var t=u.label,i=u.value,r=u.placeholder,l=u.disabled,d=void 0!==l&&l,c=u.greyedOut,a=void 0!==c&&c,v=u.onFocus,p=void 0===v?function(){return!1}:v,s=u.onBlur,f=void 0===s?function(){return!1}:s,b=u.onChange,y=void 0===b?function(){return!1}:b,h=u.onKeyUp,O=void 0===h?null:h,g=u.onKeyDown,k=void 0===g?null:g,j=u.onInput,w=void 0===j?function(){return!1}:j,x=u.onClick,m=void 0===x?function(){return!1}:x,z="";return d?z="disabled":a&&(z="greyedOut"),o(n||(n=e(['\n
\n \n \n ',"\n ","\n ","\n ","\n ","\n
\n "])),c,i,a,h,u)}; },{"choo/html":"IYKM"}],"SqB9":[function(require,module,exports) { var e=require("../elements/toolbar.js"),t=require("../elements/buttonicon.js");module.exports=function(r,o){return!r.glitchEditorContentLoaded||r.selectedPartId||r.selectedTargetId&&!r.selectedGlitchApplicationId?null:e({categoryA:t({icon:"target",onClick:function(){return o("glitch-editor-select-target")}}),categoryB:t({icon:"stack",onClick:function(){return o("glitch-editor-select-others")}}),categoryC:[]})}; },{"../elements/toolbar.js":"mKQB","../elements/buttonicon.js":"pUEq"}],"FBdD":[function(require,module,exports) { var n,o;function e(n,o){return o||(o=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(o)}}))}var t=require("choo/html");module.exports=function(c){var i=c.type,r=void 0===i?"square":i,u=c.size,a=void 0===u?"medium":u,d=c.image,s=void 0===d?null:d,l=c.selected,v=void 0!==l&&l,b=c.disabled,p=void 0!==b&&b,f=c.onClick,m=void 0===f?function(){return!1}:f,k=c.onMouseUp,g=void 0===k?function(){return!1}:k,z=c.onMouseDown,O=void 0===z?function(){return!1}:z,j=c.onMouseOver,w=void 0===j?function(){return!1}:j,M=c.tooltip,h=void 0!==M&&M,q=c.pickable,x=v?"selected":"",y=p?"disabled":"",C=void 0!==q&&q?"pickable":"",D=h?"tooltip":"",P=h?t(n||(n=e(['
',"
"])),h):"",U="".concat(r," ").concat(a," ").concat(x," \n ").concat(y," ").concat(C," ").concat(D),A="\n background-position: center;\n background-size: contain;\n background-image: url('".concat(s,"');\n background-repeat: no-repeat;\n ");return t(o||(o=e(["\n \n
\n
\n \n '])),k):w?d(e||(e=o(['\n
\n
\n\n
\n '])),k):y?d(t||(t=o(['\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '])),k):d(i||(i=o(['\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
',"
"])),r)});return c(t||(t=o(['\n
\n '])),o,e[0].x,e[0].y,e[1].x,e[1].y,n)});return a(e||(e=i(['\n \n ',"\n "])),l)}function x(t){return{left:{x:t.left,y:t.top+t.height/2,axis:"horizontal"},right:{x:t.left+t.width,y:t.top+t.height/2,axis:"horizontal"},top:{x:t.left+t.width/2,y:t.top,axis:"vertical"},bottom:{x:t.left+t.width/2,y:t.top+t.height,axis:"vertical"}}}function m(t,e){function i(t){return{x:t.x/e.width*100,y:t.y/e.height*100,axis:t.axis}}return{left:i({x:t.left-e.left,y:t.top+t.height/2-e.top,axis:"horizontal"}),right:i({x:t.left+t.width-e.left,y:t.top+t.height/2-e.top,axis:"horizontal"}),top:i({x:t.left+t.width/2-e.left,y:t.top-e.top,axis:"vertical"}),bottom:i({x:t.left+t.width/2-e.left,y:t.top+t.height-e.top,axis:"vertical"})}}function w(t){return t.exposedVariables.filter(function(t){return"sprite"===t.input.type}).map(function(t){return t.variableName})}module.exports=function(t,e){if(!t.selectedGlitchApplicationId)return null;var i=t.glitchApplications.find(function(e){return e.id===t.selectedGlitchApplicationId}),r=t.availableGlitches.find(function(t){return t.id===i.glitchId}),o=w(r);if(0===o.length)return null;var a=h(t.vm,t.selectedTargetId),l=Object.values(a.variables).filter(function(t){return o.includes(t.name)}).map(function(t){return{spriteName:t.value,variableId:t.id}}),c=s(a,t.canvas),g=c.top+c.height,O=document.querySelector(".sticker > button.selected");if(!O)return null;var j=O.getBoundingClientRect(),P=t.canvas.getBoundingClientRect(),S=j.top/P.height*1000&&s(t[u].childNodes,e)}}module.exports=function t(e,o,i,a){return o=o||function(){},i=i||function(){},e.setAttribute(r,"o"+u),n["o"+u]=[o,i,0,a||t.caller],u+=1,e},module.exports.KEY_ATTR=r,module.exports.KEY_ID=o; },{"global/document":"qqXr","global/window":"tALL"}],"fcAz":[function(require,module,exports) { module.exports=e;class r extends Error{}function e(o,t){if(!o){var a=new r(t);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}}r.prototype.name="AssertionError"; },{}],"WqFa":[function(require,module,exports) { const e=require("global/document"),t=require("nanotiming"),n=require("nanomorph"),o=require("on-load"),r=require("assert"),i=o.KEY_ID,s=o.KEY_ATTR;function d(){return"ncid-"+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function h(t){this._hasWindow="undefined"!=typeof window,this._id=null,this._ncID=null,this._olID=null,this._proxy=null,this._loaded=!1,this._rootNodeName=null,this._name=t||"nanocomponent",this._rerender=!1,this._handleLoad=this._handleLoad.bind(this),this._handleUnload=this._handleUnload.bind(this),this._arguments=[];const n=this;Object.defineProperty(this,"element",{get:function(){const t=e.getElementById(n._id);if(t)return t.dataset.nanocomponent===n._ncID?t:void 0}})}module.exports=h,h.makeID=d,h.prototype.render=function(){const e=t(this._name+".render"),r=this,s=new Array(arguments.length);let d;for(let t=0;t\n \n '])))}},{key:"update",value:function(){return!1}}]),u}();module.exports=h; },{"choo/component":"rh5m","choo/html":"IYKM"}],"UQXY":[function(require,module,exports) { var e=require("../elements/gamescreen.js"),o=require("./spriteselector.js"),n=require("./spritehighlights.js"),r=require("./glitch-wires.js"),t=require("../nanocomponents/glitch-editor.js");module.exports=function(n,r){var t=[];if(!n.spriteOperationsAllowed)return t=[n.canvas],n.projectMetadata.hideCursor&&(n.canvas.style.cursor="none"),e({children:t,onMouseMove:function(e){return r("playMouseMove",e)},onMouseUp:function(e){return r("playMouseUp",e)},onMouseLeave:function(e){return r("playMouseMove",e)},onMouseDown:function(e){return r("playMouseDown",e)}});var u=o(n,r);return t=[n.canvas,u],e({children:t,onMouseMove:function(e){return r("playMouseMove",e)},onMouseUp:function(e){return r("playMouseUp",e)},onMouseLeave:function(e){r("playMouseMove",e),r("clear-hovering-target"),n.movingSelectedTarget&&r("remove-target-from-play-area",e),n.draggingGlitchApplication&&r("drag-glitch-off-play-area")},onMouseDown:function(e){r("click-on-game",e),r("playMouseDown",e)}})}; },{"../elements/gamescreen.js":"lVtb","./spriteselector.js":"msC8","./spritehighlights.js":"K6Es","./glitch-wires.js":"mSWf","../nanocomponents/glitch-editor.js":"gGdA"}],"bU4V":[function(require,module,exports) { var e;function n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var o=require("choo/html");module.exports=function(t){var c=t.text,i=void 0===c?null:c,r=t.size,u=void 0===r?"medium":r,d=t.type,s=void 0===d?"tight":d,a=t.color,l=void 0===a?"mediumgrey":a,v=t.pickable,b=void 0!==v&&v,f=t.selected,m=void 0!==f&&f,p=t.disabled,k=void 0!==p&&p,O=t.onClick,h=void 0===O?function(){return!1}:O,j=t.onMouseUp,w=void 0===j?function(){return!1}:j,x=t.onMouseDown,z=void 0===x?function(){return!1}:x,M=t.onMouseOver,g=void 0===M?function(){return!1}:M,y=m?"selected":"",q=k?"disabled":"",C=b?"pickable":"",D="".concat(s," ").concat(u," ").concat(l," ").concat(y," ").concat(q," ").concat(C);return o(e||(e=n(["\n \n ',"\n \n "])),h,z,w,g,D,i)}; },{"choo/html":"IYKM"}],"tdM9":[function(require,module,exports) { var e;function t(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var r=require("choo/html"),n=require("../elements/button.js"),i=require("../elements/inputtext.js");module.exports=function(o,c){var l=o.selectedInventoryCategory,a=[n({color:"glitch"===l?"lightgrey":"darkgrey",text:"GLITCHES",size:"big",type:"tight",onClick:function(){return c("select-inventory-category","glitch")}}),n({color:"part"===l?"lightgrey":"darkgrey",text:"PARTS",size:"big",type:"tight",onClick:function(){return c("select-inventory-category","part")}}),n({color:"packs"===l?"lightgrey":"darkgrey",text:"PACKS",size:"big",type:"tight",onClick:function(){return c("select-inventory-category","packs")}})],g=i({placeholder:"SEARCH",value:o.inventoryFilter,onChange:function(e){return c("change-inventory-filter",e.target.value)},onKeyUp:function(e){return c("change-inventory-filter",e.target.value)}});return r(e||(e=t(['\n
\n
','
\n \n
\n "])),a,g)}; },{"choo/html":"IYKM","../elements/button.js":"bU4V","../elements/inputtext.js":"DgQB"}],"UXY5":[function(require,module,exports) { var e,i;function n(e,i){return i||(i=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(i)}}))}var t=require("choo/html"),r=require("../elements/buttonicon.js"),a=require("../elements/buttonimage.js"),c=require("../elements/button.js");module.exports=function(l,s){var o=[],d=l.availablePacks;return l.sceneMetadata.allowedPacks&&(d=d.filter(function(e){return l.sceneMetadata.allowedPacks.includes(e.id)})),d.forEach(function(i){var d=l.availableGlitches.filter(function(e){return i.glitches.includes(e.id)}).map(function(e){return r({disabled:l.toolbar.glitches.find(function(i){return i===e.id}),selected:l.selectedGlitchId===e.id,size:"big",icon:e.icon,color:e.color,onMouseDown:function(i){var n=r({icon:e.icon,color:e.color});s("start-drag",n,i),s("start-picking-glitch",e.id)}})}),u=l.availableParts.filter(function(e){return i.parts.includes(e.id)}).map(function(e){return a({disabled:l.toolbar.parts.find(function(i){return i===e.id}),selected:l.selectedPartId===e.id,type:"circle",size:"big",image:e.image,onMouseDown:function(i){var n=a({type:"circle",image:e.image});s("start-drag",n,i),s("start-picking-part",e.id)}})}),v=c({color:"lightgrey",text:"LOAD",size:"small",type:"tight",onClick:function(){return s("load-pack-to-toolbar",i.id)}});o.push(t(e||(e=n(['\n
\n
\n
\n ',"\n ",'\n
\n
\n \n
\n
\n ',"\n ",'\n
\n
\n
\n '])),i.title,v,i.image,d,u))}),t(i||(i=n(['\n
\n ',"\n
\n "])),o)}; },{"choo/html":"IYKM","../elements/buttonicon.js":"pUEq","../elements/buttonimage.js":"FBdD","../elements/button.js":"bU4V"}],"tZlk":[function(require,module,exports) { var e,t;function i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var r=require("choo/html"),n=require("../elements/buttonicon.js"),l=require("../elements/buttonimage.js"),a=require("./inventorypacks.js"),o=require("../elements/button.js");module.exports=function(c,s){if("packs"===c.selectedInventoryCategory)return a(c,s);var d,u,v,g=[],f="square";function m(e){var t=e.title.toLowerCase(),i=c.inventoryFilter.toLowerCase();return-1!==t.indexOf(i)}"glitch"===c.selectedInventoryCategory?(u=n,v="start-picking-glitch",d=c.toolbar.glitches,g=c.sceneMetadata.allowedGlitches?(g=c.availableGlitches.filter(function(e){return c.sceneMetadata.allowedGlitches.includes(e.id)})).filter(m):c.availableGlitches.filter(m)):"part"===c.selectedInventoryCategory&&(u=l,v="start-picking-part",f="circle",d=c.toolbar.parts,g=c.sceneMetadata.allowedParts?(g=c.availableParts.filter(function(e){return c.sceneMetadata.allowedParts.includes(e.id)})).filter(m):c.availableParts.filter(m));var y=null,b=c.glitchCategories;return"glitch"===c.selectedInventoryCategory&&(g=g.filter(function(e){return c.selectedGlitchCategories.includes(e.category)}),y=b.map(function(e){return o({selected:c.selectedGlitchCategories.includes(e.id),text:e.id,color:e.color,onMouseDown:function(){s("toggle-glitch-category",e.id)}})})),g=g.map(function(e){return u({disabled:d.find(function(t){return t===e.id}),selected:c.selectedGlitchId===e.id,size:"big",icon:e.icon,image:e.image,type:f,color:e.color,pickable:!0,tooltip:e.title,onMouseDown:function(t){var i=u({icon:e.icon,color:e.color,image:e.image,type:f});s("start-drag",i,t),s(v,e.id)}})}),y?r(e||(e=i(['\n
\n
','
\n
',"
\n
\n "])),y,g):r(t||(t=i(['\n
\n
\n
','
\n
\n
\n '])),g)}; },{"choo/html":"IYKM","../elements/buttonicon.js":"pUEq","../elements/buttonimage.js":"FBdD","./inventorypacks.js":"UXY5","../elements/button.js":"bU4V"}],"abuW":[function(require,module,exports) { var e;function r(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var n=require("choo/html"),t=require("./inventorymenu.js"),o=require("./inventoryitems.js");module.exports=function(i,u){var c;return c=i.movingGlitch?function(){return u("remove-glitch-from-toolbar",i.selectedGlitchId)}:i.movingPart?function(){return u("remove-part-from-toolbar",i.selectedPartId)}:function(){return!1},n(e||(e=r(['\n
\n \n
\n
\n \n \n
\n
\n '])),z,o,q,C,j,O,v,p,f,l,function(n){return n.target.blur()},j,O,M,I)}; },{"choo/html":"IYKM"}],"ecx9":[function(require,module,exports) { var e,n;function t(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var r=require("choo/html"),o=require("../elements/gamescreen.js"),i=require("../elements/button.js"),u=require("../elements/inputslider.js");module.exports=function(a,c){var l=i({text:"RESET",onClick:function(){return c("reset-game")}}),s=i({text:"Back to Browser",onClick:function(){return c("back-to-browser")}}),m=i({text:"import",onClick:function(){return c("open-import-dialog")}}),f=i({text:"Share",onClick:function(){return c("share")}}),p=i({text:"Return to Game",onClick:function(){return c("close-menu")}});function v(e){c("set-volume",e)}var d,j=parseFloat(a.masterVolume),x=u({label:"Volume",value:j,min:0,max:100,step:1,onInput:function(e){return v(e.target.value)},onChange:function(e){return v(e.target.value)}}),g=i({text:"Export Project",onClick:function(){return c("export-scene")}}),h="";return a.projectMetadata.projectInfo&&(h=r([a.projectMetadata.projectInfo])),d=a.isFullscreen?r(e||(e=t(['\n \n "])),l,x,p,h):r(n||(n=t(['\n \n "])),s,l,x,p,f,m,g),o({children:d})}; },{"choo/html":"IYKM","../elements/gamescreen.js":"lVtb","../elements/button.js":"bU4V","../elements/inputslider.js":"uqLM"}],"qYNH":[function(require,module,exports) { var e=require("./gamescreen.js"),n=require("./inventory.js"),r=require("./mainmenu.js");module.exports=function(i,u){return i.isMenuOpen?r(i,u):i.isInventoryOpen?n(i,u):e(i,u)}; },{"./gamescreen.js":"UQXY","./inventory.js":"abuW","./mainmenu.js":"ecx9"}],"SgMs":[function(require,module,exports) { var e;function n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var r=require("choo/html");module.exports=function(i){var o=i.color,a=void 0===o?"purple":o,d=i.noPadding,l=void 0!==d&&d,c=i.children,t=i.size,v=void 0===t?"large":t,p="";return l&&(p="no-padding"),r(e||(e=n(['\n
\n ',"\n
\n "])),a,v,p,c)}; },{"choo/html":"IYKM"}],"A2lI":[function(require,module,exports) { var n,e;function i(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var r=require("choo/html");module.exports=function(t){var c=t.selectedItem,o=void 0===c?0:c,a=t.disabled,v=t.items,u=void 0===v?[]:v,d=t.onChange,s=void 0===d?function(){return!1}:d;return r(e||(e=i(['\n \n "])),u.slice(o,o+1),u.map(function(e,t){return function(e,t){var c=!0;return(a||t!==o)&&(c=!1),r(n||(n=i(['\n \n \n \n \n
\n \n \n
\n \n \n \n ',"
"])),n)})}function y(e,t){return e.reduce(function(e,n){var r=Object.values(t.variables).find(function(e){return e.name===n.variableName});return r&&(n.id=r.id,e.push(n)),e},[])}function O(e,t,n){return y(n.find(function(e){return e.id===t.glitchId}).exposedVariables.filter(function(e){return"$glitch_target"===e.spriteName}).map(function(t){return r(r({},t),{},{spriteName:e.sprite.name})}),e)}function j(e,t,n){var r=t.exposedVariables,a=[];r.forEach(function(t){t.spriteName===e.sprite.name&&t.condition&&(Object.values(e.variables).find(function(e){return e.name===t.condition.varName}).value!==t.condition.value&&a.push(t))});var i=r.filter(function(e){return!a.includes(e)}),u=n.find(function(t){return t.spriteName===e.sprite.name});return u&&(i=u.exposedVariables),y(i=i?i.filter(function(t){return t.spriteName===e.sprite.name}):[],e)}function w(e,t,n){if(e.isStage)return[];var a=[];return t.forEach(function(t){n.find(function(e){return e.id===t.glitchId}).exposedVariables.filter(function(e){return"$other_sprites"===e.spriteName}).map(function(t){return r(r({},t),{},{spriteName:e.sprite.name})}).forEach(function(e){a.find(function(t){return t.variableName===e.variableName})||a.push(e)})}),y(a,e)}module.exports=function(e,t){var n=e.vm.runtime.targets.find(function(t){return t.id===e.selectedTargetId});if(!n&&!(n=e.vm.runtime.getTargetForStage()))return"";var r="purple",a=[];if(e.selectedGlitchApplicationId){var i=e.glitchApplications.find(function(t){return t.id===e.selectedGlitchApplicationId});r=e.availableGlitches.find(function(e){return e.id===i.glitchId}).color,a=O(n,i,e.availableGlitches)}else{var o=j(n,e.sceneMetadata,e.addedParts),c=w(n,e.glitchApplications,e.availableGlitches);a=o.concat(c)}var s=a.map(function(r){return m(r,n,e,t)});return u({color:r,size:e.isFullscreen?"fullscreen-large":"large",children:l({selectedItem:e.currentVariablePage,items:h(s,5),disabled:null!==e.selectedVariableId||e.isMenuOpen,onChange:e.selectedVariableId?function(){return!1}:function(e){return t("select-variable-page",e)}})})}; },{"choo/html":"IYKM","../elements/panel.js":"SgMs","../elements/carousel.js":"A2lI","../elements/inputoption.js":"KMaC","../elements/inputtext.js":"DgQB","../elements/inputslider.js":"uqLM","../elements/inputsprite.js":"M84i","../elements/inputtime.js":"dpgm","../elements/button.js":"bU4V"}],"ZNwQ":[function(require,module,exports) { var e;function r(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var n=require("../elements/buttonicon.js"),o=require("../elements/panel.js"),t=require("choo/html");module.exports=function(i,a){var c=n({icon:"trash",type:"tight",size:"large",noIconBackground:!0,onMouseUp:function(){return a("drop-to-trash")}}),u=n({icon:"expand",type:"tight",size:"large",noIconBackground:!0,onMouseUp:function(){return a("drop-to-all")}}),l=t(e||(e=r(['\n
\n ',"\n ","\n
"])),c,u);return o({color:"purple",size:"small",noPadding:!1,children:l})}; },{"../elements/buttonicon.js":"pUEq","../elements/panel.js":"SgMs","choo/html":"IYKM"}],"nNmB":[function(require,module,exports) { var e;function r(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var n=require("../elements/buttonicon.js"),t=require("../elements/panel.js"),i=require("choo/html");module.exports=function(o,c){var l=n({icon:"trash",type:"tight",size:"large",noIconBackground:!0,onMouseUp:function(){return c("delete-selected-sprite")}}),s=n({icon:"duplicate",type:"tight",size:"large",noIconBackground:!0,onMouseUp:function(){return c("duplicate-selected-sprite")}}),u=i(e||(e=r(['\n
\n ',"\n ","\n
"])),s,l);return t({color:"purple",size:"small",noPadding:!1,children:u})}; },{"../elements/buttonicon.js":"pUEq","../elements/panel.js":"SgMs","choo/html":"IYKM"}],"vxM8":[function(require,module,exports) { var e=require("../components/variablespanel.js"),r=require("../components/codepanel.js"),n=require("../components/glitchdropareas.js"),o=require("./spritedropareas.js"),i=require("choo/html");module.exports=function(i,s){var a;return a=i.isFullscreen?null:i.draggingGlitchApplication?n(i,s):i.movingSelectedTarget?o(i,s):r(i,s),[e(i,s),a]}; },{"../components/variablespanel.js":"KhbZ","../components/codepanel.js":"DYLj","../components/glitchdropareas.js":"ZNwQ","./spritedropareas.js":"nNmB","choo/html":"IYKM"}],"PKDz":[function(require,module,exports) { var e;function t(e){return l(e)||i(e)||r(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return a(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n',"
"])),t)})}function m(e,n,r){var i=n.findIndex(function(t){return t.value===e.variableName}),l=t(n);return p({label:"Variable to Expose",options:l,selectedItem:i,onChange:function(t){r("glitch-editor-pick-variable",e,l[t].value)}})}function y(e,t){var n=b.findIndex(function(t){return t.value===e.input.type});return p({options:b,label:"Input Type",selectedItem:n,onChange:function(n){t("glitch-editor-pick-type",e,b[n].value)}})}function I(e,t){return d({label:"Starting Value",value:e.value,onInput:function(n){t("glitch-editor-set-variable-value",e,n.target.value)}})}function x(e,t){var n=f.findIndex(function(t){return t.value===e.spriteName});return-1===n&&(n=0),p({options:f,label:"SpriteName",selectedItem:n,onChange:function(n){t("glitch-editor-pick-sprite",e,f[n].value)}})}function j(e,t,n){return d({value:t.input[e],label:e,onInput:function(r){n("glitch-editor-set-slider-param",t,r.target.value,e)}})}function A(e,t,n,r){var i="";return 0===r&&(i="options"),d({value:t.value,label:i,onChange:function(r){n("glitch-editor-set-option-choice",e,t,r.target.value)}})}module.exports=function(e,n){var r=[],i=[],l="purple",a=e.selectedGlitchId;if(e.selectedGlitchApplicationId){var o=e.glitchApplications.find(function(t){return t.id===e.selectedGlitchApplicationId});a=o.glitchId}a&&(l=e.availableGlitches.find(function(e){return e.id===a}).color);if(e.glitchEditorContentLoaded){var u=[],p=[];e.glitchEditorVariables&&(u=t(e.glitchEditorVariables),e.glitchEditor.vm.runtime.targets.forEach(function(e){p=p.concat(Object.values(e.variables))})),(i=u.map(function(t){var r=p.map(function(e){return{label:e.name,value:e.name}}),i=m(t,r,n),l=y(t,n),a=null;e.selectedGlitchApplicationId&&(a=x(t,n));var o=[i,a,I(t,n),l],u=[];"slider"===t.input.type&&(u=[j("min",t,n),j("max",t,n),j("step",t,n)]);return"option"===t.input.type&&(u=t.input.options.map(function(e,r){return A(t,e,n,r)})).push(d({value:"new",greyedOut:!0,onClick:function(){return n("glitch-editor-add-new-option",t)}})),u.push(new v({text:"hide this variable",onClick:function(){return n("glitch-editor-hide-variable",t)}})),o.concat(u)})).push(new v({text:"expose new variable",onClick:function(){return n("glitch-editor-expose-variable")}})),r=s({selectedItem:e.currentVariablePage,items:g(i),disabled:null!==e.selectedVariableId||e.isMenuOpen,onChange:e.selectedVariableId?function(){return!1}:function(e){return n("select-variable-page",e)}})}var f=c({color:l,children:r});return f.classList.add("code-editor-panel"),f}; },{"choo/html":"IYKM","../elements/panel.js":"SgMs","../elements/carousel.js":"A2lI","../elements/inputoption.js":"KMaC","../elements/inputtext.js":"DgQB","../elements/button.js":"bU4V"}],"afnd":[function(require,module,exports) { var e;function n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var t=require("../elements/panel.js"),o=require("../elements/button.js"),i=require("choo/html");module.exports=function(c,r){var l="purple",d=[],a=c.selectedGlitchId;if(c.selectedGlitchApplicationId){var s=c.glitchApplications.find(function(e){return e.id===c.selectedGlitchApplicationId});a=s.glitchId}a&&(l=c.availableGlitches.find(function(e){return e.id===a}).color);if(c.glitchEditorContentLoaded){var u=o({text:"close editor",noIconBackground:!0,onMouseDown:function(){return r("close-glitch-editor")}}),p=o({text:"save changes",noIconBackground:!0,onMouseDown:function(){r("save-and-apply-changes"),r("close-glitch-editor")}}),h="";(c.selectedGlitchApplicationId||c.selectedGlitchId)&&(h=o({text:"new remix",noIconBackground:!0,onMouseDown:function(){return r("remix-glitch")}}));var f=o({text:"export",noIconBackground:!0,onMouseDown:function(){return r("glitch-editor-export")}});d=i(e||(e=n(['\n
\n ',"\n ","\n ","\n ","\n
"])),u,p,h,f)}return t({color:l,size:"small",noPadding:!1,children:d})}; },{"../elements/panel.js":"SgMs","../elements/button.js":"bU4V","choo/html":"IYKM"}],"ihhC":[function(require,module,exports) { var e=require("./code-editor-variables-panel.js"),r=require("./code-editor-panel.js");module.exports=function(o,i){return[e(o,i),r(o,i)]}; },{"./code-editor-variables-panel.js":"PKDz","./code-editor-panel.js":"afnd"}],"dD0u":[function(require,module,exports) { var e=require("./glitchcontext.js"),t=require("./partcontext.js"),r=require("./gamecontext.js"),n=require("./code-editor-context.js");module.exports=function(c,i){return c.isInventoryOpen?null:c.glitchEditorOpen?n(c,i):c.selectedGlitchId?e(c,i):c.selectedPartId?t(c,i):r(c,i)}; },{"./glitchcontext.js":"RRa1","./partcontext.js":"kXLx","./gamecontext.js":"vxM8","./code-editor-context.js":"ihhC"}],"LClE":[function(require,module,exports) { var e,n;function t(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var a=require("choo/html"),c=require("./components/draggingelement.js"),r=require("./components/menu.js"),i=require("./components/gamecontrols.js"),o=require("./components/screentitle.js"),s=require("./components/toolbar.js"),d=require("./components/screen.js"),l=require("./components/contextmenu.js");function m(n){return a(e||(e=t(['\n
\n
\n
\n ',"\n
\n
\n
"])),n)}module.exports=function(e,u){return e.glitchesLoaded?e.partsLoaded?e.query.shareData&&!e.sceneData?(u("load-from-share-url",e.query.shareData),m("Loading From URL Data")):e.projectMetadata?e.sceneMetadata?e.sceneData?e.loadedVM?a(n||(n=t(['\n
\n
\n
\n ','\n
\n
\n ','\n
\n
\n ','\n
\n
\n
\n \n
\n ','\n
\n
\n ',"\n
\n\n
\n ","\n
\n "])),r(e,u),i(e,u),o(e,u),s(e,u),l(e,u),d(e,u),c(e,u)):(u("load-scene"),m("Loading Project into Scratch VM")):(u("fetch-scene-sb3","main"),m("Fetching Project sb3")):(u("fetch-scene-metadata","main"),m("Fetching Scene Metadata")):(u("fetch-project-metadata",e.params.project_id),m("Fetching Project Metadata")):(u("load-parts"),m("Loading Parts")):(u("load-vm"),u("load-glitches"),m("Loading Glitches"))}; },{"choo/html":"IYKM","./components/draggingelement.js":"ieVo","./components/menu.js":"i6WV","./components/gamecontrols.js":"TouA","./components/screentitle.js":"bTQH","./components/toolbar.js":"dQHD","./components/screen.js":"qYNH","./components/contextmenu.js":"dD0u"}],"n1gG":[function(require,module,exports) { var e,i;function t(e,i){return i||(i=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(i)}}))}var r=require("choo/html"),n=require("./elements/display.js");module.exports=function(o,a){var c=o.availableProjects;o.query.category&&(c=c.filter(function(e){return e.category===o.query.category}));var d=c.map(function(e){return n({image:"/v2".concat(e.thumbnail),text:e.title,size:"huge",onClick:function(){return a("pushState","/v2/#".concat(e.id))}})});return-1===window.location.href.indexOf("/dev")&&-1===window.location.href.indexOf("localhost")&&-1===window.location.href.indexOf("127.0.0.1")?(window.location.href="https://www.makeymakey.com/apps",r(e||(e=t(['
'])))):r(i||(i=t(['
\n
\n ',"\n
\n
"])),d)}; },{"choo/html":"IYKM","./elements/display.js":"TtQ4"}],"FulC":[function(require,module,exports) { var e=[];module.exports=e; },{}],"TMlM":[function(require,module,exports) { module.exports={id:"pixel sketch",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/pixel-sketch-sticky-note-art-with-makey-max-backpack",title:"Pixel Sketch",scenes:[{id:"main",metadata:"main.json",sb3:"pixel sketch.sb3"}],projectInfo:"",levels:["main"],exposedVariables:[{variableName:"grid size",spriteName:"Stage",value:5,input:{type:"option",options:[{value:"5",label:"5"},{value:"8",label:"8"}]}},{variableName:"# of colors",spriteName:"Stage",value:4,input:{type:"option",options:[{value:"2",label:"2"},{value:"4",label:"4"},{value:"8",label:"8"},{value:"16",label:"16"}]}}],startingGlitches:[],thumbnail:"/provision/projects/pixel sketch/pixel sketch.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"g8BA":[function(require,module,exports) { module.exports={id:"bubble pop",title:"Bubble Pop",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/bubble-pop-controller-for-makey-mouse-backpack",hideCursor:!0,scenes:[{id:"main",metadata:"main.json",sb3:"bubble pop.sb3"}],levels:["main"],exposedVariables:[{variableName:"grid size",spriteName:"Stage",value:5,input:{type:"option",options:[{value:"5",label:"5"},{value:"8",label:"8"}]}},{variableName:"# of colors",spriteName:"Stage",value:4,input:{type:"option",options:[{value:"2",label:"2"},{value:"4",label:"4"},{value:"8",label:"8"},{value:"16",label:"16"}]}}],startingGlitches:[],thumbnail:"/provision/projects/bubble pop/bubble pop.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"yhwj":[function(require,module,exports) { module.exports={id:"fuzzy face",title:"Fuzzy Face",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/fuzzy-face-mouse-control-for-makey-mouse-backpack",projectInfo:"Illustrations are by Pablo Stanley from the Open Peeps project. ",scenes:[{id:"main",metadata:"main.json",sb3:"fuzzy face.sb3"}],levels:["main"],exposedVariables:[],startingGlitches:[],thumbnail:"/provision/projects/fuzzy face/fuzzy face.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"c8IJ":[function(require,module,exports) { module.exports={id:"match the beat",title:"Match the Beat",category:"other",tutorialLink:"https://www.youtube.com/watch?v=syaonxa6Ank",thumbnail:"/provision/projects/match the beat/match the beat.png",toolbar:{glitches:[],parts:[]},scenes:[{id:"main",metadata:"main.json",sb3:"match the beat.sb3"}],levels:["main"]}; },{}],"Je5t":[function(require,module,exports) { module.exports={id:"fruit catcher",title:"Fruit Catcher",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/fruit-catcher-controller-for-makey-max-backpack",scenes:[{id:"main",metadata:"main.json",sb3:"fruit catcher.sb3"}],levels:["main"],exposedVariables:[{variableName:"grid size",spriteName:"Stage",value:5,input:{type:"option",options:[{value:"5",label:"5"},{value:"8",label:"8"}]}},{variableName:"# of colors",spriteName:"Stage",value:4,input:{type:"option",options:[{value:"2",label:"2"},{value:"4",label:"4"},{value:"8",label:"8"},{value:"16",label:"16"}]}}],startingGlitches:[],thumbnail:"/provision/projects/fruit catcher/fruit catcher.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"iE3p":[function(require,module,exports) { module.exports={id:"makey soccer",title:"Makey Soccer",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/doorstop-joystick-for-player-2-backpack",scenes:[{id:"main",metadata:"main.json",sb3:"makey soccer.sb3"}],levels:["main"],exposedVariables:[{variableName:"grid size",spriteName:"Stage",value:5,input:{type:"option",options:[{value:"5",label:"5"},{value:"8",label:"8"}]}},{variableName:"# of colors",spriteName:"Stage",value:4,input:{type:"option",options:[{value:"2",label:"2"},{value:"4",label:"4"},{value:"8",label:"8"},{value:"16",label:"16"}]}}],startingGlitches:[],thumbnail:"/provision/projects/makey soccer/makey soccer.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"WGaO":[function(require,module,exports) { module.exports={id:"alarm",title:"alarm",hideCursor:!1,scenes:[{id:"main",metadata:"main.json",sb3:"alarm.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/alarm/alarm.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"SZ2P":[function(require,module,exports) { module.exports={id:"buzzer",title:"buzzer",hideCursor:!1,tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/buzzer-app-creating-quiz-show-buttons",scenes:[{id:"main",metadata:"main.json",sb3:"buzzer.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/buzzer/buzzer.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"QyoF":[function(require,module,exports) { module.exports={id:"counter",title:"counter",tutorialLink:"https://makeymakey.com/blogs/blog/introducing-new-plug-and-play-apps",hideCursor:!1,scenes:[{id:"main",metadata:"main.json",sb3:"counter.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/counter/counter.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"V6vN":[function(require,module,exports) { module.exports={id:"is it conductive",title:"is it conductive",tutorialLink:"https://makeymakey.com/blogs/how-to-instructions/is-it-conductive-makey-makey-experiment",hideCursor:!1,scenes:[{id:"main",metadata:"main.json",sb3:"is it conductive.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/is it conductive/is it conductive.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"MP5p":[function(require,module,exports) { module.exports={id:"make-a-sketch",title:"make-a-sketch",hideCursor:!1,tutorialLink:"https://makeymakey.com/blogs/blog/introducing-new-plug-and-play-apps",scenes:[{id:"main",metadata:"main.json",sb3:"make-a-sketch.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/make-a-sketch/make-a-sketch.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"OCWf":[function(require,module,exports) { module.exports={id:"piano",title:"piano",hideCursor:!1,tutorialLink:"https://makeymakey.com/blogs/blog/new-project-november-invent-with-new-apps",noPause:!0,scenes:[{id:"main",metadata:"main.json",sb3:"piano.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/piano/piano.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"Lfzb":[function(require,module,exports) { module.exports={id:"scoreboard",tutorialLink:"https://makeymakey.com/blogs/blog/new-project-november-invent-with-new-apps",title:"scoreboard",hideCursor:!1,scenes:[{id:"main",metadata:"main.json",sb3:"scoreboard.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/scoreboard/scoreboard.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"sw1w":[function(require,module,exports) { module.exports={id:"timer",title:"timer",tutorialLink:"https://makeymakey.com/blogs/blog/new-project-november-invent-with-new-apps",hideCursor:!1,scenes:[{id:"main",metadata:"main.json",sb3:"timer.sb3"}],levels:["main"],startingGlitches:[],thumbnail:"/provision/projects/timer/timer.png",category:"games",toolbar:{glitches:[],parts:[]}}; },{}],"FYKi":[function(require,module,exports) { var e=[require("../../../provision/projects/pixel sketch/pixel sketch.json"),require("../../../provision/projects/bubble pop/bubble pop.json"),require("../../../provision/projects/fuzzy face/fuzzy face.json"),require("../../../provision/projects/match the beat/match the beat.json"),require("../../../provision/projects/fruit catcher/fruit catcher.json"),require("../../../provision/projects/makey soccer/makey soccer.json"),require("../../../provision/projects/alarm/alarm.json"),require("../../../provision/projects/buzzer/buzzer.json"),require("../../../provision/projects/counter/counter.json"),require("../../../provision/projects/is it conductive/is it conductive.json"),require("../../../provision/projects/make-a-sketch/make-a-sketch.json"),require("../../../provision/projects/piano/piano.json"),require("../../../provision/projects/scoreboard/scoreboard.json"),require("../../../provision/projects/timer/timer.json")];module.exports=e; },{"../../../provision/projects/pixel sketch/pixel sketch.json":"TMlM","../../../provision/projects/bubble pop/bubble pop.json":"g8BA","../../../provision/projects/fuzzy face/fuzzy face.json":"yhwj","../../../provision/projects/match the beat/match the beat.json":"c8IJ","../../../provision/projects/fruit catcher/fruit catcher.json":"Je5t","../../../provision/projects/makey soccer/makey soccer.json":"iE3p","../../../provision/projects/alarm/alarm.json":"WGaO","../../../provision/projects/buzzer/buzzer.json":"SZ2P","../../../provision/projects/counter/counter.json":"QyoF","../../../provision/projects/is it conductive/is it conductive.json":"V6vN","../../../provision/projects/make-a-sketch/make-a-sketch.json":"MP5p","../../../provision/projects/piano/piano.json":"OCWf","../../../provision/projects/scoreboard/scoreboard.json":"Lfzb","../../../provision/projects/timer/timer.json":"sw1w"}],"o535":[function(require,module,exports) { var e=require("./initial-data/glitches.js"),t=require("./initial-data/parts.js"),l=require("./initial-data/packs.js"),i=require("./initial-data/projects.js");module.exports={availablePacks:l,availableProjects:i,availableGlitches:e,availableParts:t,packs:[],toolbar:{glitches:[],parts:[]},draggingGlitchOutOfPlayArea:!1,selectedGlitchCategories:[],glitchesLoaded:!1,partsLoaded:!1,projectData:null,loadedVM:!1,vm:null,vmInterval:0,canvas:null,selectedTargetId:null,selectedGlitchId:null,selectedPartId:null,rotatingSelectedTarget:!1,resizingSelectedTarget:!1,resizingHandle:null,movingSelectedTarget:!1,movingSpriteOffset:{x:0,y:0},hoverRotation:0,rotationStartingDirection:0,selectedInventoryCategory:"glitch",currentVariablePage:0,isInventoryOpen:null,inventoryFilter:"",disabledToolbarIcons:[],highlightToolbarIcons:[],isMenuOpen:!1,masterVolume:65,unmuteVolume:65,isGamePlaying:!1,wasGamePlaying:!1,history:[],future:[],currentHistoryItem:null,glitchApplications:[],selectedGlitchApplicationId:null,addedParts:[],applyingGlitch:!1,draggingGlitchApplication:!1,hoveringTargetId:null,selectedVariableId:null,settingSpriteVariable:!1,changingVariable:!1,pickingGlitch:!1,pickingPart:!1,draggingElement:null,draggingPosition:{top:0,left:0},projectMetadata:null,sceneId:"main",documentEventListeners:[],glitchEditorVariables:null,gameOver:!1,glitchEditorOpen:!1,showGlitches:!0,spriteOperationsAllowed:!0,isFullscreen:!1}; },{"./initial-data/glitches.js":"FulC","./initial-data/parts.js":"FulC","./initial-data/packs.js":"FulC","./initial-data/projects.js":"FYKi"}],"NsK2":[function(require,module,exports) { var r="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function n(){for(var n=r.length,o=[],t=0;t<20;t++)o[t]=r.charAt(Math.random()*n);return o.join("")}module.exports=n; },{}],"U0ui":[function(require,module,exports) { function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function r(r){for(var n=1;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.length)&&(r=e.length);for(var t=0,a=new Array(r);t0){var c=t.runtime.targets.find(function(e){return e.id===n.targetId}),u=o.code.targets.find(function(e){return"$other_sprites"===e.name}),l=i(u,e,t);a(u,e,o.exposedVariables),n.otherSpritesBlockIds=n.otherSpritesBlockIds.concat(l),e.blocks.updateAssetName("$glitch_target",c.sprite.name,"sprite")}o.exposedVariables.filter(function(e){return"$other_sprites"===e.spriteName}).forEach(function(t){e.lookupOrCreateVariable(s(),t.variableName).value=t.value})}),e}module.exports={addPartToVM:n,addAppliedGlitchesCodeToPart:o}; },{"./apply-glitch.js":"fFe5","./uuid.js":"NsK2"}],"LkIq":[function(require,module,exports) { function e(e,a){return i(e)||n(e,a)||r(e,a)||t()}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r0&&(u=t[0],t.push(!0)),u};exports.requestVideoStream=u;var o=function(){return t.pop(),!(t.length>0)};exports.requestDisableVideo=o; },{"get-user-media-promise":"WclK"}],"UJ2K":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("./camera.js");function t(e,t){return o(e)||a(e,t)||n(e,t)||r()}function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0;){var a=i.pop().split(",").map(function(e){return e.trim()});u.includes(a[0])&&r.emit.apply(r,e(a))}}module.exports={updateAppliedGlitchesLists:s,updateSpriteList:l,handleMessages:f}; },{"./uuid.js":"NsK2"}],"ulDt":[function(require,module,exports) { var e=require("./arcade-vm-hooks"),t=e.updateAppliedGlitchesLists,r=e.updateSpriteList;function i(e,i){return r(e),t(e,i),e.runtime.targets.forEach(function(e){e.getBounds()}),e.runtime._step(),e}module.exports=i; },{"./arcade-vm-hooks":"PhLG"}],"oMmR":[function(require,module,exports) { module.exports=function(e){for(var i in e.ioDevices)if(i){var o=e.ioDevices[i];o&&(e.ioDevices[i]=new o.constructor(e))}}; },{}],"N01V":[function(require,module,exports) { var e=console,t=e.log,n=require("./utils/get-vm.js"),a=require("./utils/game-step.js"),i=require("./utils/clear-io-devices.js"),s=require("./utils/arcade-vm-hooks"),r=s.handleMessages,m=require("./utils/sanitize-state.js"),v=m.sanitizeSelections,o=m.sanitizeVariables,l=33;module.exports=function(e,s){s.on("load-vm",function(){t("load-vm");e.canvas=document.createElement("canvas"),e.canvas.id="scratch-canvas",e.canvas.width=480,e.canvas.height=360,e.canvas.classList.add("game"),e.vm=n(e.canvas),e.vm.renderer.resize(960,720),s.emit("render")}),s.on("load-complete",function(){s.emit("add-document-event-listeners"),i(e.vm.runtime),e.vm.runtime.currentStepTime=1,e.vm.greenFlag(),e.loadedVM=!0,s.emit("play")}),s.on("start-vm",function(){t("start-vm"),clearInterval(e.vmInterval),e.vm.runtime._cloneCounter=-1e4,e.vmInterval=setInterval(function(){s.emit("game-step")},l),o(e);var n=e.vm.runtime.audioEngine.getInputNode(),a=e.masterVolume/100,i=a*a;n.gain.setValueAtTime(i,0),s.emit("render")}),s.on("stop-vm",function(){t("stop-vm"),clearInterval(e.vmInterval),e.vm.runtime.audioEngine.getInputNode().gain.setValueAtTime(0,0)}),s.on("game-step",function(){e.isGamePlaying&&(e.vm=a(e.vm,e.glitchApplications),r(e.vm,s),v(e)),s.emit("render")})}; },{"./utils/get-vm.js":"QnwN","./utils/game-step.js":"ulDt","./utils/clear-io-devices.js":"oMmR","./utils/arcade-vm-hooks":"PhLG","./utils/sanitize-state.js":"LkIq"}],"F5sK":[function(require,module,exports) { var e=console,t=e.log,l=require("./utils/coordinates.js"),i=l.getTargetAtClientPosition;module.exports=function(e,l){l.on("click-on-game",function(a){if(t("",a),a.target===e.canvas){var n=i(a.clientX,a.clientY,e.vm);n&&e.sceneMetadata.exposedVariables.find(function(e){return e.spriteName===n.sprite.name})?e.selectedVariableId?l.emit("set-selected-sprite-variable",n):(l.emit("select-target",n.id),l.emit("render")):l.emit("deselect-target")}}),l.on("select-target",function(i){t("select-target",i),e.selectedGlitchApplicationId=null,e.selectedGlitchId=null,e.selectedPartId=null,i?(e.selectedTargetId=i,e.currentVariablePage=0,e.selectedVariableId=null,l.emit("render")):l.emit("deselect-target")}),l.on("deselect-target",function(){t("deselect-target"),e.selectedGlitchApplicationId=null,e.selectedVariableId=null,e.settingSpriteVariable=!1,e.selectedTargetId=null,l.emit("render")})}; },{"./utils/coordinates.js":"RmLT"}],"cHDP":[function(require,module,exports) { var o=console,y=o.log;module.exports=function(o,a){a.on("play-key-up",function(a){y("play-key-up",a),o.isGamePlaying&&o.vm.postIOData("keyboard",{key:a.key,isDown:!1})}),a.on("play-key-down",function(a){y("play-key-down",a),o.isGamePlaying&&o.vm.postIOData("keyboard",{key:a.key,isDown:!0})})}; },{}],"P0Qn":[function(require,module,exports) { var e;function t(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var r=console,a=r.log,i=require("./utils/history-item.js"),n=180,s=90,o=5,g=15,c=20,d=require("./utils/coordinates.js"),l=d.getScratchPointOfMouseEvent,u=d.getAbsoluteTargetBounds,f=require("choo/html"),m=require("./utils/find-target.js"),h=m.findTargetById;function y(e,t){return Math.round(e/t)*t}function v(e){return e*n/Math.PI}module.exports=function(r,n){n.on("put-target-back-in-play-area",function(){a("put-target-back-in-play-area"),h(r.vm,r.selectedTargetId).setVisible(!0),r.draggingTargetOutOfPlayArea=!1,n.emit("cleanup-drag")}),n.on("remove-target-from-play-area",function(i){a("remove-target-from-play-area",i),r.draggingTargetOutOfPlayArea=!0;var o=h(r.vm,r.selectedTargetId);o.setVisible(!1);var g=o.sprite.costumes[o.currentCostume].asset.encodeDataURI(),c=f(e||(e=t(['\n '])),g,o.direction-s);n.emit("start-drag",c,i)}),n.on("move-selected-target",function(e){a("move-selected-target");var t=e.shiftKey;if(r.draggingTargetOutOfPlayArea&&n.emit("put-target-back-in-play-area"),r.selectedTargetId){var i=r.vm.runtime.targets.find(function(e){return e.id===r.selectedTargetId}),s=l(e,r.canvas);t&&(s.x=y(s.x,o),s.y=y(s.y,o)),i.setXY(s.x+r.movingSpriteOffset.x,r.movingSpriteOffset.y+s.y),i.runtime.renderer.draw(),n.emit("render")}}),n.on("start-moving-target",function(e){a("startMovingSprite");var t=r.vm.runtime.targets.find(function(e){return e.id===r.selectedTargetId}),s=i({actionType:"move-target",targetId:t.id});n.emit("push-history",s);var o=l(e,r.canvas);r.movingSpriteOffset={x:t.x-o.x,y:t.y-o.y},r.movingSelectedTarget=!0,n.emit("render")}),n.on("resize-selected-target",function(e){var t,a=e.shiftKey,i=r.vm.runtime.targets.find(function(e){return e.id===r.selectedTargetId}),s=u(i,r.canvas),o={},g=Math.abs(e.clientX-r.resizeTargetClickEvent.clientX),d=Math.abs(e.clientY-r.resizeTargetClickEvent.clientY);switch(r.resizingHandle){case"topRight":o.x=s.left+s.width,o.y=s.top,t=g>d?"x":"y";break;case"topLeft":o.x=s.left,o.y=s.top,t=g>d?"-x":"y";break;case"bottomRight":o.x=s.left+s.width,o.y=s.top+s.height,t=g>d?"x":"-y";break;case"bottomLeft":o.x=s.left,o.y=s.top+s.height,t=g>d?"-x":"-y";break;case"top":t="y",o.x=s.left+s.width/2,o.y=s.top;break;case"bottom":t="-y",o.x=s.left+s.width/2,o.y=s.top+s.height;break;case"left":t="-x",o.x=s.left,o.y=s.top+s.height/2;break;case"right":t="x",o.x=s.left+s.width,o.y=s.top+s.height/2}var l,f=e.clientX-o.x,m=e.clientY-o.y;switch(t){case"x":l=f/s.width;break;case"y":l=-m/s.height;break;case"-x":l=-f/s.width;break;case"-y":l=m/s.height}var h=i.size+i.size*l;a&&(h=y(h,c)),i.setSize(h),i.runtime.renderer.draw(),n.emit("render")}),n.on("start-resizing-target",function(e,t){a("start-resizing-target",e,t);var s=i({actionType:"resize-target",targetId:r.selectedTargetId});n.emit("push-history",s),r.resizeTargetClickEvent=e,r.resizingHandle=t,r.resizingSelectedTarget=!0,n.emit("render")}),n.on("end-resize",function(){r.resizingSelectedSprite=!1,n.emit("render")}),n.on("rotate-selected-target",function(e){var t=e.shiftKey,a=r.vm.runtime.targets.find(function(e){return e.id===r.selectedTargetId}),i=l(e,r.canvas),s=i.x-a.x,o=i.y-a.y;r.hoverRotation=-v(Math.atan2(o,s));var c=r.rotationStartingDirection-v(Math.atan2(o,s));t&&(c=y(c,g)),a.setDirection(c),a.runtime.renderer.draw(),n.emit("render")}),n.on("start-rotating-target",function(){a("start-rotating-target");var e=i({actionType:"rotate-target",targetId:r.selectedTargetId});n.emit("push-history",e);var t=r.vm.runtime.targets.find(function(e){return e.id===r.selectedTargetId});r.rotationStartingDirection=t.direction,r.rotatingSelectedTarget=!0,n.emit("render")})}; },{"./utils/history-item.js":"U0ui","./utils/coordinates.js":"RmLT","choo/html":"IYKM","./utils/find-target.js":"w9MN"}],"TrTs":[function(require,module,exports) { function t(t){return i(t)||n(t)||r(t)||e()}function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function n(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function i(t){if(Array.isArray(t))return o(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(i=t.length);for(var e=0,n=new Array(i);e=t.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof t&&t.global===t?t:void 0,i=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,r){var s=a.URL||a.webkitURL,c=document.createElement("a");i=i||t.name||"download",c.download=i,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?o(c):n(c.href)?e(t,i,r):o(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){o(c)},0))}:"msSaveOrOpenBlob"in navigator?function(t,a,i){if(a=a||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(t,i),a);else if(n(t))e(t,a,i);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){o(r)})}}:function(t,n,o,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var s="application/octet-stream"===t.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||i)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(t)}else{var f=a.URL||a.webkitURL,d=f.createObjectURL(t);r?r.location=d:location.href=d,r=null,setTimeout(function(){f.revokeObjectURL(d)},4e4)}});a.saveAs=r.saveAs=r,"undefined"!=typeof module&&(module.exports=r)}); },{}],"gX76":[function(require,module,exports) { function t(t,e){for(var n=0;nt.length)&&(e=t.length);for(var i=0,r=new Array(e);it.length)&&(e=t.length);for(var i=0,r=new Array(e);ie.length)&&(t=e.length);for(var r=0,a=new Array(t);ro-1&&(c=a%o-1)<0&&(c=o-1),n=t.projectMetadata.levels[c]}if(l.lookupOrCreateVariable(i(),"level #").value=a,n){var v=[];v.push(f(n,t.projectMetadata)),v.push(s(n,t.projectMetadata)),Promise.all(v).then(function(a){var n=e(a,2);t.sceneData=n[0],t.sceneMetadata=n[1],r.emit("load-scene")})}else r.emit("load-scene")})}; },{"./utils/uuid.js":"NsK2","./utils/fetch-and-parse.js":"yvNu"}],"TuC0":[function(require,module,exports) { var define; var t;!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof t&&t.amd?t([],r):"object"==typeof exports?exports.JsonUrl=r():e.JsonUrl=r()}(window,function(){return function(t){function e(e){for(var r,n,o=e[0],a=e[1],u=0,f=[];u=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function l(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return C(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(t).length;default:if(n)return C(t).length;e=(""+e).toLowerCase(),n=!0}}function h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:p(t,e,r,n,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):p(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function p(t,e,r,n,i){function o(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var a,u=1,s=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,s/=2,f/=2,r/=2}if(i){var c=-1;for(a=r;as&&(r=s-f),a=r;a>=0;a--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?D.fromByteArray(t):D.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&f)<<6|63&o)>127&&(c=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&f)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(c=s)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=F)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function O(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function A(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function R(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,i){return i||R(t,0,r,4),N.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||R(t,0,r,8),N.write(t,e,r,n,52,8),r+8}function L(t){return t<16?"0"+t.toString(16):t.toString(16)}function C(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function I(t){return D.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}var D=r(35),N=r(36),q=r(15);e.Buffer=o,e.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==window.TYPED_ARRAY_SUPPORT?window.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return function(t,e,r,n){return u(e),e<=0?i(t,e):void 0!==r?"string"==typeof n?i(t,e).fill(r,n):i(t,e).fill(r):i(t,e)}(null,t,e,r)},o.allocUnsafe=function(t){return s(null,t)},o.allocUnsafeSlow=function(t){return s(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);ithis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),u=(r>>>=0)-(e>>>=0),s=Math.min(a,u),f=this.slice(n,i),c=t.slice(e,r),l=0;li)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return g(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return v(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;o.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||T(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),N.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),N.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),N.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),N.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):A(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):A(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a1)for(var r=1;rthis.length||t<0)){var e=this._offset(t);return this._bufs[e[0]][e[1]]}},n.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},n.prototype.copy=function(t,e,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return t||a.alloc(0);if(n<=0)return t||a.alloc(0);var i,o,u=!!t,s=this._offset(r),f=n-r,c=f,l=u&&e||0,h=s[1];if(0===r&&n==this.length){if(!u)return 1===this._bufs.length?this._bufs[0]:a.concat(this._bufs,this.length);for(o=0;o(i=this._bufs[o].length-h))){this._bufs[o].copy(t,l,h,h+c),l+=i;break}this._bufs[o].copy(t,l,h),l+=i,c-=i,h&&(h=0)}return t.length>l?t.slice(0,l):t},n.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return new n;var r=this._offset(t),i=this._offset(e),o=this._bufs.slice(r[0],i[0]+1);return 0==i[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,i[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new n(o)},n.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},n.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},n.prototype.duplicate=function(){for(var t=0,e=new n;tthis.length?this.length:e;for(var i=this._offset(e),o=i[0],u=i[1];o=t.length){var f=s.indexOf(t,u);if(-1!==f)return this._reverseOffset([o,f]);u=s.length-t.length+1}else{var c=this._reverseOffset([o,u]);if(this._match(c,t))return c;u++}u=0}return-1},n.prototype._match=function(t,e){if(this.length-t0&&s.length>a&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,function(t){console&&console.warn&&console.warn(t)}(f)}return t}function u(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(n);return i.listener=r,n.wrapFn=i,i}function s(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)d(u,this,e);else{var s=u.length,f=c(u,s);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){u=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},n.prototype.listeners=function(t){return s(this,t,!0)},n.prototype.rawListeners=function(t){return s(this,t,!1)},n.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},n.prototype.listenerCount=f,n.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]}},function(t,e,r){"use strict";function n(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(h.isEncoding===d||!d(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=a,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=s,this.end=f,e=3;break;default:return this.write=c,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(e)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function a(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function s(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}var h=r(9).Buffer,d=h.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=n,n.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(t.lastNeed=o-1),o):--n=0?(o>0&&(t.lastNeed=o-2),o):--n=0?(o>0&&(2===o?o=0:t.lastNeed=o-3),o):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},n.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,u=arguments.length;switch(u){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(u-1),a=0;a=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),l(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t,e){return t}function a(t,r,n){if(t.customInspect&&r&&m(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return p(i)||(i=a(t,i,n)),i}var o=u(t,r);if(o)return o;var l=Object.keys(r),h=function(t){var e={};return l.forEach(function(t,r){e[t]=!0}),e}();if(t.showHidden&&(l=Object.getOwnPropertyNames(r)),w(r)&&(l.indexOf("message")>=0||l.indexOf("description")>=0))return s(r);if(0===l.length){if(m(r)){var d=r.name?": "+r.name:"";return t.stylize("[Function"+d+"]","special")}if(g(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return s(r)}var b,y="",_=!1,E=["{","}"];return c(r)&&(_=!0,E=["[","]"]),m(r)&&(y=" [Function"+(r.name?": "+r.name:"")+"]"),g(r)&&(y=" "+RegExp.prototype.toString.call(r)),v(r)&&(y=" "+Date.prototype.toUTCString.call(r)),w(r)&&(y=" "+s(r)),0!==l.length||_&&0!=r.length?n<0?g(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),b=_?function(t,e,r,n,i){for(var o=[],a=0,u=e.length;a60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(b,y,E)):E[0]+y+E[1]}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(p(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return d(e)?t.stylize(""+e,"number"):l(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function s(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var u,s,f;if((f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(s=t.stylize("[Setter]","special")),x(n,i)||(u="["+i+"]"),s||(t.seen.indexOf(f.value)<0?(s=h(r)?a(t,f.value,null):a(t,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),b(u)){if(o&&i.match(/^\d+$/))return s;(u=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+s}function c(t){return Array.isArray(t)}function l(t){return"boolean"==typeof t}function h(t){return null===t}function d(t){return"number"==typeof t}function p(t){return"string"==typeof t}function b(t){return void 0===t}function g(t){return y(t)&&"[object RegExp]"===_(t)}function y(t){return"object"==typeof t&&null!==t}function v(t){return y(t)&&"[object Date]"===_(t)}function w(t){return y(t)&&("[object Error]"===_(t)||t instanceof Error)}function m(t){return"function"==typeof t}function _(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function S(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}var k=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}}),u=i[r];r=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(45),e.setImmediate="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof window&&window.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof window&&window.clearImmediate||this&&this.clearImmediate},function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return a(t,e,r)}var o=r(5),a=o.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=o:(n(o,e),e.Buffer=i),n(a,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return a(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=a(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return a(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o.SlowBuffer(t)}},function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return a(t,e,r)}var o=r(5),a=o.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=o:(n(o,e),e.Buffer=i),i.prototype=Object.create(a.prototype),n(a,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return a(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=a(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return a(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e){function n(t,e){t=t||{};var n=e instanceof(m=m||r(7));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(O||(O=r(13).StringDecoder),this.decoder=new O(t.encoding),this.encoding=t.encoding)}function i(t){if(m=m||r(7),!(this instanceof i))return new i(t);this._readableState=new n(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),x.call(this)}function o(t,e,r,n,i){var o,u=t._readableState;return null===e?(u.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,s(t)}}(t,u)):(i||(o=function(t,e){var r;return function(t){return S.isBuffer(t)||t instanceof k}(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(u,e)),o?t.emit("error",o):u.objectMode||e&&e.length>0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===S.prototype||(e=function(t){return S.from(t)}(e)),n?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):a(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?a(t,u,e,!1):c(t,u)):a(t,u,e,!1))):n||(u.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=U?t=U:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function s(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(M("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?w.nextTick(f,t):f(t))}function f(t){M("emit readable"),t.emit("readable"),p(t)}function c(t,e){e.readingMore||(e.readingMore=!0,w.nextTick(l,t,e))}function l(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0==(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=S.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0==(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e),n}(t,e.buffer,e.decoder),r);var r}function g(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,w.nextTick(y,e,t))}function y(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function v(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return M("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?g(this):s(this),null;if(0===(t=u(t,e))&&e.ended)return 0===e.length&&g(this),null;var n,i=e.needReadable;return M("need readable",i),(0===e.length||e.length-t0?b(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&g(this)),null!==n&&this.emit("data",n),n},i.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(t,r){function n(t,e){M("onunpipe"),t===l&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,o())}function i(){M("onend"),t.end()}function o(){M("cleanup"),t.removeListener("close",s),t.removeListener("finish",f),t.removeListener("drain",b),t.removeListener("error",u),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",c),l.removeListener("data",a),g=!0,!h.awaitDrain||t._writableState&&!t._writableState.needDrain||b()}function a(e){M("ondata"),y=!1,!1!==t.write(e)||y||((1===h.pipesCount&&h.pipes===t||h.pipesCount>1&&-1!==v(h.pipes,t))&&!g&&(M("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,y=!0),l.pause())}function u(e){M("onerror",e),c(),t.removeListener("error",u),0===E(t,"error")&&t.emit("error",e)}function s(){t.removeListener("finish",f),c()}function f(){M("onfinish"),t.removeListener("close",s),c()}function c(){M("unpipe"),l.unpipe(t)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=t;break;case 1:h.pipes=[h.pipes,t];break;default:h.pipes.push(t)}h.pipesCount+=1,M("pipe count=%d opts=%j",h.pipesCount,r);var d=r&&!1===r.end||t===e.stdout||t===e.stderr?c:i;h.endEmitted?w.nextTick(d):l.once("end",d),t.on("unpipe",n);var b=function(t){return function(){var e=t._readableState;M("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E(t,"data")&&(e.flowing=!0,p(t))}}(l);t.on("drain",b);var g=!1,y=!1;return l.on("data",a),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?_(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",u),t.once("close",s),t.once("finish",f),t.emit("pipe",l),h.flowing||(M("pipe resume"),l.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1?n:p.nextTick;u.WritableState=a;var y=Object.create(r(4));y.inherits=r(3);var v,w={deprecate:r(24)},m=r(21),_=r(9).Buffer,E=window.Uint8Array||function(){},x=r(22);y.inherits(u,m),a.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(a.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(v=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(t){return!!v.call(this,t)||this===u&&t&&t._writableState instanceof a}})):v=function(t){return t instanceof this},u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},u.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(t){return _.isBuffer(t)||t instanceof E}(t);return a&&!_.isBuffer(t)&&(t=function(t){return _.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=o),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),p.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),p.nextTick(n,o),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=_.from(e,r)),e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=e.objectMode?1:n.length;e.length+=u;var f=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),u.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},u.prototype._writev=null,u.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,d(t,e),r&&(e.finished?p.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),u.prototype.destroy=x.destroy,u.prototype._undestroy=x.undestroy,u.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(6),r(17).setImmediate)},function(t,e){function r(t){try{if(!window.localStorage)return!1}catch(t){return!1}var e=window.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}},function(t,e,r){"use strict";function n(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===S.prototype||(e=function(t){return S.from(t)}(e)),n?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):a(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?a(t,u,e,!1):c(t,u)):a(t,u,e,!1))):n||(u.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=U?t=U:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function s(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(M("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?w.nextTick(f,t):f(t))}function f(t){M("emit readable"),t.emit("readable"),p(t)}function c(t,e){e.readingMore||(e.readingMore=!0,w.nextTick(l,t,e))}function l(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0==(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=S.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0==(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e),n}(t,e.buffer,e.decoder),r);var r}function g(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,w.nextTick(y,e,t))}function y(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function v(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return M("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?g(this):s(this),null;if(0===(t=u(t,e))&&e.ended)return 0===e.length&&g(this),null;var n,i=e.needReadable;return M("need readable",i),(0===e.length||e.length-t0?b(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&g(this)),null!==n&&this.emit("data",n),n},i.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(t,r){function n(t,e){M("onunpipe"),t===l&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,o())}function i(){M("onend"),t.end()}function o(){M("cleanup"),t.removeListener("close",s),t.removeListener("finish",f),t.removeListener("drain",b),t.removeListener("error",u),t.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",c),l.removeListener("data",a),g=!0,!h.awaitDrain||t._writableState&&!t._writableState.needDrain||b()}function a(e){M("ondata"),y=!1,!1!==t.write(e)||y||((1===h.pipesCount&&h.pipes===t||h.pipesCount>1&&-1!==v(h.pipes,t))&&!g&&(M("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,y=!0),l.pause())}function u(e){M("onerror",e),c(),t.removeListener("error",u),0===E(t,"error")&&t.emit("error",e)}function s(){t.removeListener("finish",f),c()}function f(){M("onfinish"),t.removeListener("close",s),c()}function c(){M("unpipe"),l.unpipe(t)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=t;break;case 1:h.pipes=[h.pipes,t];break;default:h.pipes.push(t)}h.pipesCount+=1,M("pipe count=%d opts=%j",h.pipesCount,r);var d=r&&!1===r.end||t===e.stdout||t===e.stderr?c:i;h.endEmitted?w.nextTick(d):l.once("end",d),t.on("unpipe",n);var b=function(t){return function(){var e=t._readableState;M("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E(t,"data")&&(e.flowing=!0,p(t))}}(l);t.on("drain",b);var g=!1,y=!1;return l.on("data",a),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?_(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",u),t.once("close",s),t.once("finish",f),t.emit("pipe",l),h.flowing||(M("pipe resume"),l.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1?n:p.nextTick;u.WritableState=a;var y=Object.create(r(4));y.inherits=r(3);var v,w={deprecate:r(24)},m=r(27),_=r(18).Buffer,E=window.Uint8Array||function(){},x=r(28);y.inherits(u,m),a.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(a.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(v=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(t){return!!v.call(this,t)||this===u&&t&&t._writableState instanceof a}})):v=function(t){return t instanceof this},u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},u.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(t){return _.isBuffer(t)||t instanceof E}(t);return a&&!_.isBuffer(t)&&(t=function(t){return _.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=o),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),p.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),p.nextTick(n,o),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=_.from(e,r)),e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var u=e.objectMode?1:n.length;e.length+=u;var f=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),u.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},u.prototype._writev=null,u.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,d(t,e),r&&(e.finished?p.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),u.prototype.destroy=x.destroy,u.prototype._undestroy=x.undestroy,u.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(6),r(17).setImmediate)},function(t,e,r){"use strict";function n(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),u=y.call(i,"finallyLoc");if(a&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),l(r),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;l(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:d(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=b),j}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function i(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}function o(t,e,r){for(var n,o=[],a=e;a0?o-4:o;for(r=0;r>16&255,f[c++]=e>>8&255,f[c++]=255&e;return 2===a&&(e=u[t.charCodeAt(r)]<<2|u[t.charCodeAt(r+1)]>>4,f[c++]=255&e),1===a&&(e=u[t.charCodeAt(r)]<<10|u[t.charCodeAt(r+1)]<<4|u[t.charCodeAt(r+2)]>>2,f[c++]=e>>8&255,f[c++]=255&e),f},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i=[],u=0,s=r-n;us?s:u+16383));return 1===n?(e=t[r-1],i.push(a[e>>2]+a[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"=")),i.join("")};for(var a=[],u=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,l=f.length;c>1,c=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-c)-1,d>>=-c,c+=u;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,u,s,f=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=c?(u=0,a=c):a+l>=1?(u=(e*s-1)*Math.pow(2,i),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&u,d+=p,u/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,f-=8);t[r+d-p]|=128*b}},function(t,e,r){"use strict";var n=r(19).Buffer,i=r(38),o=r(10),a=r(47),u=r(53),s=r(54);t.exports=function(t){var e=[],r=[];return{encode:s(e,(t=t||{forceFloat64:!1,compatibilityMode:!1,disableTimestampEncoding:!1,protoAction:"error"}).forceFloat64,t.compatibilityMode,t.disableTimestampEncoding),decode:u(r,t),register:function(t,e,r,a){return i(e,"must have a constructor"),i(r,"must have an encode function"),i(t>=0,"must have a non-negative type"),i(a,"must have a decode function"),this.registerEncoder(function(t){return t instanceof e},function(e){var i=o(),a=n.allocUnsafe(1);return a.writeInt8(t,0),i.append(a),i.append(r(e)),i}),this.registerDecoder(t,a),this},registerEncoder:function(t,r){return i(t,"must have an encode function"),i(r,"must have an encode function"),e.push({check:t,encode:r}),this},registerDecoder:function(t,e){return i(t>=0,"must have a non-negative type"),i(e,"must have a decode function"),r.push({type:t,decode:e}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:u.IncompleteBufferError}}},function(t,e,r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;u--)if(s[u]!==f[u])return!1;for(u=s.length-1;u>=0;u--)if(!h(t[a=s[u]],e[a],r,n))return!1;return!0}(t,e,r,u))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function p(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function b(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&c(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&i&&!r;if((!t&&y.isError(i)&&o&&p(i,r)||a)&&c(i,r,"Got unwanted exception"+n),t&&i&&r&&!p(i,r)||!t&&i)throw i}var g=r(39),y=r(16),v=Object.prototype.hasOwnProperty,w=Array.prototype.slice,m="foo"===function(){}.name,_=t.exports=l,E=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return s(f(t.actual),128)+" "+t.operator+" "+s(f(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=u(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},y.inherits(_.AssertionError,Error),_.fail=c,_.ok=l,_.equal=function(t,e,r){t!=e&&c(t,e,r,"==",_.equal)},_.notEqual=function(t,e,r){t==e&&c(t,e,r,"!=",_.notEqual)},_.deepEqual=function(t,e,r){h(t,e,!1)||c(t,e,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(t,e,r){h(t,e,!0)||c(t,e,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(t,e,r){h(t,e,!1)&&c(t,e,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function t(e,r,n){h(e,r,!0)&&c(e,r,n,"notDeepStrictEqual",t)},_.strictEqual=function(t,e,r){t!==e&&c(t,e,r,"===",_.strictEqual)},_.notStrictEqual=function(t,e,r){t===e&&c(t,e,r,"!==",_.notStrictEqual)},_.throws=function(t,e,r){b(!0,t,e,r)},_.doesNotThrow=function(t,e,r){b(!1,t,e,r)},_.ifError=function(t){if(t)throw t},_.strict=g(function t(e,r){e||c(e,!0,r,"==",t)},_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict;var x=Object.keys||function(t){var e=[];for(var r in t)v.call(t,r)&&e.push(r);return e}},function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)n(r.data,e,o),o+=r.data.length,r=r.next;return e},t}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){!function(e,r){"use strict";function n(t){delete u[t]}function i(t){if(s)setTimeout(i,0,t);else{var e=u[t];if(e){s=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{n(t),s=!1}}}}if(!e.setImmediate){var o,a=1,u={},s=!1,f=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick(function(){i(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?function(){var t="setImmediate$"+Math.random()+"$",r=function(r){r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&i(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),o=function(r){e.postMessage(t+r,"*")}}():e.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){i(t.data)},o=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;o=function(e){var r=f.createElement("script");r.onreadystatechange=function(){i(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():o=function(t){setTimeout(i,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r0?this._transform(null,e,r):r()},t.exports.decoder=o,t.exports.encoder=i},function(t,e,r){(e=t.exports=r(26)).Stream=e,e.Readable=e,e.Writable=r(29),e.Duplex=r(8),e.Transform=r(30),e.PassThrough=r(52)},function(t,e){},function(t,e,r){"use strict";function n(t,e,r){t.copy(e,r)}var i=r(18).Buffer,o=r(51);t.exports=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),r=this.head,o=0;r;)n(r.data,e,o),o+=r.data.length,r=r.next;return e},t}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}t.exports=n;var i=r(30),o=Object.create(r(4));o.inherits=r(3),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";function n(t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=t||"unable to decode"}var i=r(10);r(16).inherits(n,Error),t.exports=function(t,e){function r(t,e,r){return e>=r+t}function o(t,e){return{value:t,bytesConsumed:e}}function a(t,e){e=void 0===e?0:e;var n=t.length-e;if(n<=0)return null;var i,a,l,h=t.readUInt8(e),d=0;if(!function(t,e){var r=function(t){switch(t){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(t);return!(-1!==r&&e=0;l--)d+=t.readUInt8(e+l+1)*Math.pow(2,8*(7-l));return o(d,9);case 208:return o(d=t.readInt8(e+1),2);case 209:return o(d=t.readInt16BE(e+1),3);case 210:return o(d=t.readInt32BE(e+1),5);case 211:return o(d=function(t,e){var r=128==(128&t[0]);if(r)for(var n=1,i=7;i>=0;i--){var o=(255^t[i])+n;t[i]=255&o,n=o>>8}return(4294967296*t.readUInt32BE(0)+t.readUInt32BE(4))*(r?-1:1)}(t.slice(e+1,e+9)),9);case 202:return o(d=t.readFloatBE(e+1),5);case 203:return o(d=t.readDoubleBE(e+1),9);case 217:return r(i=t.readUInt8(e+1),n,2)?o(d=t.toString("utf8",e+2,e+2+i),2+i):null;case 218:return r(i=t.readUInt16BE(e+1),n,3)?o(d=t.toString("utf8",e+3,e+3+i),3+i):null;case 219:return r(i=t.readUInt32BE(e+1),n,5)?o(d=t.toString("utf8",e+5,e+5+i),5+i):null;case 196:return r(i=t.readUInt8(e+1),n,2)?o(d=t.slice(e+2,e+2+i),2+i):null;case 197:return r(i=t.readUInt16BE(e+1),n,3)?o(d=t.slice(e+3,e+3+i),3+i):null;case 198:return r(i=t.readUInt32BE(e+1),n,5)?o(d=t.slice(e+5,e+5+i),5+i):null;case 220:return n<3?null:(i=t.readUInt16BE(e+1),u(t,e,i,3));case 221:return n<5?null:(i=t.readUInt32BE(e+1),u(t,e,i,5));case 222:return i=t.readUInt16BE(e+1),s(t,e,i,3);case 223:return i=t.readUInt32BE(e+1),s(t,e,i,5);case 212:return f(t,e,1);case 213:return f(t,e,2);case 214:return f(t,e,4);case 215:return f(t,e,8);case 216:return f(t,e,16);case 199:return i=t.readUInt8(e+1),a=t.readUInt8(e+2),r(i,n,3)?c(t,e,a,i,3):null;case 200:return i=t.readUInt16BE(e+1),a=t.readUInt8(e+3),r(i,n,4)?c(t,e,a,i,4):null;case 201:return i=t.readUInt32BE(e+1),a=t.readUInt8(e+5),r(i,n,6)?c(t,e,a,i,6):null}if(144==(240&h))return u(t,e,i=15&h,1);if(128==(240&h))return s(t,e,i=15&h,1);if(160==(224&h))return r(i=31&h,n,1)?o(d=t.toString("utf8",e+1,e+i+1),i+1):null;if(h>=224)return o(d=h-256,1);if(h<128)return o(h,1);throw new Error("not implemented yet")}function u(t,e,r,n){var i,u=[],s=0;for(e+=n,i=0;i>8),u.push(255&a)):(u.push(201),u.push(a>>24),u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)),o().append(i.from(u)).append(n)):null}return function t(s,f){var c,l;if(void 0===s)throw new Error("undefined is not encodable in msgpack!");if(function(t){return t!=t&&"number"==typeof t}(s))throw new Error("NaN is not encodable in msgpack!");if(null===s)(c=i.allocUnsafe(1))[0]=192;else if(!0===s)(c=i.allocUnsafe(1))[0]=195;else if(!1===s)(c=i.allocUnsafe(1))[0]=194;else if("string"==typeof s)(l=i.byteLength(s))<32?((c=i.allocUnsafe(1+l))[0]=160|l,l>0&&c.write(s,1)):l<=255&&!r?((c=i.allocUnsafe(2+l))[0]=217,c[1]=l,c.write(s,2)):l<=65535?((c=i.allocUnsafe(3+l))[0]=218,c.writeUInt16BE(l,1),c.write(s,3)):((c=i.allocUnsafe(5+l))[0]=219,c.writeUInt32BE(l,1),c.write(s,5));else if(s&&(s.readUInt32LE||s instanceof Uint8Array))s instanceof Uint8Array&&(s=i.from(s)),s.length<=255?((c=i.allocUnsafe(2))[0]=196,c[1]=s.length):s.length<=65535?((c=i.allocUnsafe(3))[0]=197,c.writeUInt16BE(s.length,1)):((c=i.allocUnsafe(5))[0]=198,c.writeUInt32BE(s.length,1)),c=o([c,s]);else if(Array.isArray(s))s.length<16?(c=i.allocUnsafe(1))[0]=144|s.length:s.length<65536?((c=i.allocUnsafe(3))[0]=220,c.writeUInt16BE(s.length,1)):((c=i.allocUnsafe(5))[0]=221,c.writeUInt32BE(s.length,1)),c=s.reduce(function(e,r){return e.append(t(r,!0)),e},o().append(c));else{if(!a&&"function"==typeof s.getDate)return function(t){var e,r=1*t,n=Math.floor(r/1e3),a=1e6*(r-1e3*n);if(a||n>4294967295){(e=i.allocUnsafe(10))[0]=215,e[1]=-1;var u=4*a+n/Math.pow(2,32)&4294967295,s=4294967295&n;e.writeInt32BE(u,2),e.writeInt32BE(s,6)}else(e=i.allocUnsafe(6))[0]=214,e[1]=-1,e.writeUInt32BE(Math.floor(r/1e3),2);return o().append(e)}(s);if("object"==typeof s)c=u(s)||function(e){var r,n,a=[],u=0;for(r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&"function"!=typeof e[r]&&(++u,a.push(t(r,!0)),a.push(t(e[r],!0)));return u<16?(n=i.allocUnsafe(1))[0]=128|u:u<65535?((n=i.allocUnsafe(3))[0]=222,n.writeUInt16BE(u,1)):((n=i.allocUnsafe(5))[0]=223,n.writeUInt32BE(u,1)),a.unshift(n),a.reduce(function(t,e){return t.append(e)},o())}(s);else if("number"==typeof s){if(function(t){return t%1!=0}(s))return n(s,e);if(s>=0)if(s<128)(c=i.allocUnsafe(1))[0]=s;else if(s<256)(c=i.allocUnsafe(2))[0]=204,c[1]=s;else if(s<65536)(c=i.allocUnsafe(3))[0]=205,c.writeUInt16BE(s,1);else if(s<=4294967295)(c=i.allocUnsafe(5))[0]=206,c.writeUInt32BE(s,1);else{if(!(s<=9007199254740991))return n(s,!0);(c=i.allocUnsafe(9))[0]=207,function(t,e){for(var r=7;r>=0;r--)t[r+1]=255&e,e/=256}(c,s)}else if(s>=-32)(c=i.allocUnsafe(1))[0]=256+s;else if(s>=-128)(c=i.allocUnsafe(2))[0]=208,c.writeInt8(s,1);else if(s>=-32768)(c=i.allocUnsafe(3))[0]=209,c.writeInt16BE(s,1);else if(s>-214748365)(c=i.allocUnsafe(5))[0]=210,c.writeInt32BE(s,1);else{if(!(s>=-9007199254740991))return n(s,!0);(c=i.allocUnsafe(9))[0]=211,function(t,e,r){var n=r<0;n&&(r=Math.abs(r));var i=r%4294967296,o=r/4294967296;if(t.writeUInt32BE(Math.floor(o),1),t.writeUInt32BE(i,5),n)for(var a=1,u=8;u>=1;u--){var s=(255^t[u])+a;t[u]=255&s,a=s>>8}}(c,0,s)}}}if(!c)throw new Error("not implemented yet");return f?c:c.slice()}}},function(t,e,r){t.exports=r(56)},function(t,e,r){(function(t){e.version="1.0.0",e.encode=function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},e.decode=function(e){return e=(e+=Array(5-e.length%4).join("=")).replace(/\-/g,"+").replace(/\_/g,"/"),new t(e,"base64")},e.validate=function(t){return/^[A-Za-z0-9\-_]+$/.test(t)}}).call(this,r(5).Buffer)},function(t,e,r){(function(t){var e=function(){"use strict";function r(t,e){postMessage({action:Dt,cbn:e,result:t})}function n(t){var e=[];return e[t-1]=void 0,e}function i(t,e){return u(t[0]+e[0],t[1]+e[1])}function o(t,e){return function(t,e){var r;return r=e,0>e&&(r+=qt),[r,t*qt]}(~~Math.max(Math.min(t[1]/qt,2147483647),-2147483648)&~~Math.max(Math.min(e[1]/qt,2147483647),-2147483648),c(t)&c(e))}function a(t,e){var r,n;return t[0]==e[0]&&t[1]==e[1]?0:(r=0>t[1],n=0>e[1],r&&!n?-1:!r&&n?1:p(t,e)[1]<0?-1:1)}function u(t,e){var r,n;for(t%=0x10000000000000000,e=(e%=0x10000000000000000)-(r=e%qt)+(n=Math.floor(t/qt)*qt),t=t-n+r;0>t;)t+=qt,e-=qt;for(;t>4294967295;)t-=qt,e+=qt;for(e%=0x10000000000000000;e>0x7fffffff00000000;)e-=0x10000000000000000;for(;-0x8000000000000000>e;)e+=0x10000000000000000;return[t,e]}function s(t,e){return t[0]==e[0]&&t[1]==e[1]}function f(t){return t>=0?[t,0]:[t+qt,-qt]}function c(t){return t[0]>=2147483648?~~Math.max(Math.min(t[0]-qt,2147483647),-2147483648):~~Math.max(Math.min(t[0],2147483647),-2147483648)}function l(t){return 30>=t?1<t[1])throw Error("Neg");return o=l(e),n=t[1]*o%0x10000000000000000,(n+=r=(i=t[0]*o)-i%qt)>=0x8000000000000000&&(n-=0x10000000000000000),[i-=r,n]}function d(t,e){var r;return r=l(e&=63),u(Math.floor(t[0]/r),t[1]/r)}function p(t,e){return u(t[0]-e[0],t[1]-e[1])}function b(t,e){return t.Mc=e,t.Lc=0,t.Yb=e.length,t}function g(t){return t.Lc>=t.Yb?-1:255&t.Mc[t.Lc++]}function y(t,e,r,n){return t.Lc>=t.Yb?-1:(n=Math.min(n,t.Yb-t.Lc),E(t.Mc,t.Lc,e,r,n),t.Lc+=n,n)}function v(t){return t.Mc=n(32),t.Yb=0,t}function w(t){var e=t.Mc;return e.length=t.Yb,e}function m(t,e){t.Mc[t.Yb++]=e<<24>>24}function _(t,e,r,n){E(e,r,t.Mc,t.Yb,n),t.Yb+=n}function E(t,e,r,n,i){for(var o=0;i>o;++o)r[n+o]=t[e+o]}function x(t,r,n,i,o){var u,s;if(a(i,Ft)<0)throw Error("invalid length "+i);for(t.Tb=i,function(t,e){(function(t,e){t.ab=e;for(var r=0;e>1<>24;for(var r=0;4>r;++r)t.fc[1+r]=t.ab>>8*r<<24>>24;_(e,t.fc,0,5)}(u,n),s=0;64>s;s+=8)m(n,255&c(d(i,s)));t.yb=(u.W=0,u.oc=r,u.pc=0,function(t){var e,r;t.b||(e={},r=4,t.X||(r=2),function(t,e){t.qb=e>2,t.qb?(t.w=0,t.xb=4,t.R=66560):(t.w=2,t.xb=3,t.R=0)}(e,r),t.b=e),ht(t.A,t.eb,t.fb),(t.ab!=t.wb||t.Hb!=t.n)&&(R(t.b,t.ab,4096,t.n,274),t.wb=t.ab,t.Hb=t.n)}(u),u.d.Ab=n,function(t){(function(t){t.l=0,t.J=0;for(var e=0;4>e;++e)t.v[e]=0})(t),function(t){t.mc=Wt,t.xc=Wt,t.E=-1,t.Jb=1,t.Oc=0}(t.d),Ot(t.C),Ot(t._),Ot(t.bb),Ot(t.hb),Ot(t.Ub),Ot(t.vc),Ot(t.Sb),function(t){var e,r=1<e;++e)Ot(t.V[e].tb)}(t.A);for(var e=0;4>e;++e)Ot(t.K[e].G);at(t.$,1<i;++i){if(-1==(o=g(e)))throw Error("truncated input");s[i]=o<<24>>24}if(!function(t,e){var r,n,i,o,a,u,s;if(5>e.length)return 0;for(i=(s=255&e[0])%9,o=(u=~~(s/9))%5,a=~~(u/5),r=0,n=0;4>n;++n)r+=(255&e[1+n])<<8*n;return r>99999999||!function(t,e,r,n){if(e>8||r>4||n>4)return 0;H(t.gb,r,e);var i=1<e?0:(t.Ob!=e&&(t.Ob=e,t.nb=Math.max(t.Ob,1),L(t.B,Math.max(t.nb,4096))),1)}(t,r)}(n=F({}),s))throw Error("corrupted input");for(i=0;64>i;i+=8){if(-1==(o=g(e)))throw Error("truncated input");1==(o=o.toString(16)).length&&(o="0"+o),u=o+""+u}/^0+$|^f+$/i.test(u)?t.Tb=Ft:(a=parseInt(u,16),t.Tb=a>4294967295?Ft:f(a)),t.yb=function(t,e,r,n){return t.e.Ab=e,P(t.B),t.B.cc=r,function(t){t.B.h=0,t.B.o=0,Ot(t.Gb),Ot(t.pb),Ot(t.Zb),Ot(t.Cb),Ot(t.Db),Ot(t.Eb),Ot(t.kc),function(t){var e,r;for(r=1<e;++e)Ot(t.V[e].Ib)}(t.gb);for(var e=0;4>e;++e)Ot(t.kb[e].G);G(t.Rb),G(t.sb),Ot(t.Fb.G),function(t){t.Bb=0,t.E=-1;for(var e=0;5>e;++e)t.Bb=t.Bb<<8|g(t.Ab)}(t.e)}(t),t.U=0,t.ib=0,t.Jc=0,t.Ic=0,t.Qc=0,t.Nc=n,t.g=Wt,t.jc=0,function(t,e){return t.Z=e,t.cb=null,t.zc=1,t}({},t)}(n,e,r,t.Tb)}(t,b({},e),t.Nb),t}function j(t,e){return t.c[t.f+t.o+e]}function T(t,e,r,n){var i,o;for(t.T&&t.o+e+n>t.h&&(n=t.h-(t.o+e)),++r,o=t.f+t.o+e,i=0;n>i&&t.c[o+i]==t.c[o+i-r];++i);return i}function M(t){return t.h-t.o}function O(t){var e,r;if(!t.T)for(;;){if(!(r=-t.f+t.Kb-t.h))return;if(-1==(e=y(t.cc,t.c,t.f+t.h,r)))return t.zb=t.h,t.f+t.zb>t.H&&(t.zb=t.H-t.f),void(t.T=1);t.h+=e,t.h>=t.o+t._b&&(t.zb=t.h-t._b)}}function A(t,e){t.f+=e,t.zb-=e,t.o-=e,t.h-=e}function R(t,e,r,i,o){var a,u;1073741567>e&&(t.Fc=16+(i>>1),function(t,e,r,i){var o;t.Bc=e,t._b=r,o=e+r+i,(null==t.c||t.Kb!=o)&&(t.c=null,t.Kb=o,t.c=n(t.Kb)),t.H=t.Kb-r}(t,e+r,i+o,256+~~((e+r+i+o)/2)),t.ob=i,a=e+1,t.p!=a&&(t.L=n(2*(t.p=a))),u=65536,t.qb&&(u=e-1,u|=u>>1,u|=u>>2,u|=u>>4,u|=u>>8,u>>=1,(u|=65535)>16777216&&(u>>=1),t.Ec=u,++u,u+=t.R),u!=t.rc&&(t.ub=n(t.rc=u)))}function B(t){var e;++t.k>=t.p&&(t.k=0),function(t){++t.o>t.zb&&(t.f+t.o>t.H&&function(t){var e,r,n;for((n=t.f+t.o-t.Bc)>0&&--n,r=t.f+t.h-n,e=0;r>e;++e)t.c[e]=t.c[n+e];t.f-=n}(t),O(t))}(t),1073741823==t.o&&(e=t.o-t.p,U(t.L,2*t.p,e),U(t.ub,t.rc,e),A(t,e))}function U(t,e,r){var n,i;for(n=0;e>n;++n)r>=(i=t[n]||0)?i=0:i-=r,t[n]=i}function L(t,e){(null==t.Lb||t.M!=e)&&(t.Lb=n(e)),t.M=e,t.o=0,t.h=0}function C(t){var e=t.o-t.h;e&&(_(t.cc,t.Lb,t.h,e),t.o>=t.M&&(t.o=0),t.h=t.o)}function I(t,e){var r=t.o-e-1;return 0>r&&(r+=t.M),t.Lb[r]}function P(t){C(t),t.cc=null}function D(t){return 4>(t-=2)?t:3}function N(t){return 4>t?0:10>t?t-3:t-6}function q(t){if(!t.zc)throw Error("bad state");return t.cb?function(t){(function(t,e,r,n){var o,u,l,h,d,b,g,y,v,w,m,_,E,x,S;if(e[0]=Wt,r[0]=Wt,n[0]=1,t.oc&&(t.b.cc=t.oc,function(t){t.f=0,t.o=0,t.h=0,t.T=0,O(t),t.k=0,A(t,-1)}(t.b),t.W=1,t.oc=null),!t.pc){if(t.pc=1,x=t.g,s(t.g,Wt)){if(!M(t.b))return void K(t,c(t.g));nt(t),E=c(t.g)&t.y,At(t.d,t.C,(t.l<<4)+E,0),t.l=N(t.l),l=j(t.b,-t.s),pt(dt(t.A,c(t.g),t.J),t.d,l),t.J=l,--t.s,t.g=i(t.g,Yt)}if(!M(t.b))return void K(t,c(t.g));for(;;){if(g=X(t,c(t.g)),w=t.mb,E=c(t.g)&t.y,u=(t.l<<4)+E,1==g&&-1==w)At(t.d,t.C,u,0),l=j(t.b,-t.s),S=dt(t.A,c(t.g),t.J),7>t.l?pt(S,t.d,l):(v=j(t.b,-t.v[0]-1-t.s),bt(S,t.d,v,l)),t.J=l,t.l=N(t.l);else{if(At(t.d,t.C,u,1),4>w){if(At(t.d,t.bb,t.l,1),w?(At(t.d,t.hb,t.l,1),1==w?At(t.d,t.Ub,t.l,0):(At(t.d,t.Ub,t.l,1),At(t.d,t.vc,t.l,w-2))):(At(t.d,t.hb,t.l,0),At(t.d,t._,u,1==g?0:1)),1==g?t.l=7>t.l?9:11:(st(t.i,t.d,g-2,E),t.l=7>t.l?8:11),h=t.v[w],0!=w){for(b=w;b>=1;--b)t.v[b]=t.v[b-1];t.v[0]=h}}else{for(At(t.d,t.bb,t.l,0),t.l=7>t.l?7:10,st(t.$,t.d,g-2,E),_=ot(w-=4),y=D(g),Et(t.K[y],t.d,_),_>=4&&(m=w-(o=(2|1&_)<<(d=(_>>1)-1)),14>_?jt(t.Sb,o-_-1,t.d,d,m):(Rt(t.d,m>>4,d-4),St(t.S,t.d,15&m),++t.Qb)),h=w,b=3;b>=1;--b)t.v[b]=t.v[b-1];t.v[0]=h,++t.Mb}t.J=j(t.b,g-1-t.s)}if(t.s-=g,t.g=i(t.g,f(g)),!t.s){if(t.Mb>=128&&Q(t),t.Qb>=16&&$(t),e[0]=t.g,r[0]=Bt(t.d),!M(t.b))return void K(t,c(t.g));if(a(p(t.g,x),[4096,0])>=0)return t.pc=0,void(n[0]=0)}}}})(t.cb,t.cb.Xb,t.cb.uc,t.cb.Kc),t.Pb=t.cb.Xb[0],t.cb.Kc[0]&&(function(t){it(t),t.d.Ab=null}(t.cb),t.zc=0)}(t):function(t){var e=function(t){var e,r,n,o,u,s;if(s=c(t.g)&t.Dc,Mt(t.e,t.Gb,(t.U<<4)+s)){if(Mt(t.e,t.Zb,t.U))n=0,Mt(t.e,t.Cb,t.U)?(Mt(t.e,t.Db,t.U)?(Mt(t.e,t.Eb,t.U)?(r=t.Qc,t.Qc=t.Ic):r=t.Ic,t.Ic=t.Jc):r=t.Jc,t.Jc=t.ib,t.ib=r):Mt(t.e,t.pb,(t.U<<4)+s)||(t.U=7>t.U?9:11,n=1),n||(n=W(t.sb,t.e,s)+2,t.U=7>t.U?8:11);else if(t.Qc=t.Ic,t.Ic=t.Jc,t.Jc=t.ib,n=2+W(t.Rb,t.e,s),t.U=7>t.U?7:10,(u=mt(t.kb[D(n)],t.e))>=4){if(o=(u>>1)-1,t.ib=(2|1&u)<u)t.ib+=function(t,e,r,n){var i,o,a=1,u=0;for(o=0;n>o;++o)i=Mt(r,t,e+a),a<<=1,a+=i,u|=i<>>=1,n=t.Bb-t.E>>>31,t.Bb-=t.E&n-1,i=i<<1|1-n,-16777216&t.E||(t.Bb=t.Bb<<8|g(t.Ab),t.E<<=8);return i}(t.e)<<4,t.ib+=function(t,e){var r,n,i=1,o=0;for(n=0;t.F>n;++n)r=Mt(e,t.G,i),i<<=1,i+=r,o|=r<t.ib)return-1==t.ib?1:-1}else t.ib=u;if(a(f(t.ib),t.g)>=0||t.ib>=t.nb)return-1;(function(t,e,r){var n=t.o-e-1;for(0>n&&(n+=t.M);0!=r;--r)n>=t.M&&(n=0),t.Lb[t.o++]=t.Lb[n++],t.o>=t.M&&C(t)})(t.B,t.ib,n),t.g=i(t.g,f(n)),t.jc=I(t.B,0)}else e=function(t,e,r){return t.V[((e&t.qc)<>>8-t.u)]}(t.gb,c(t.g),t.jc),t.jc=7>t.U?function(t,e){var r=1;do{r=r<<1|Mt(e,t.Ib,r)}while(256>r);return r<<24>>24}(e,t.e):function(t,e,r){var n,i,o=1;do{if(i=r>>7&1,r<<=1,o=o<<1|(n=Mt(e,t.Ib,(1+i<<8)+o)),i!=n){for(;256>o;)o=o<<1|Mt(e,t.Ib,o);break}}while(256>o);return o<<24>>24}(e,t.e,I(t.B,t.ib)),function(t,e){t.Lb[t.o++]=e,t.o>=t.M&&C(t)}(t.B,t.jc),t.U=N(t.U),t.g=i(t.g,Yt);return 0}(t.Z);if(-1==e)throw Error("corrupted input");t.Pb=Ft,t.Pc=t.Z.g,(e||a(t.Z.Nc,Wt)>=0&&a(t.Z.g,t.Z.Nc)>=0)&&(C(t.Z.B),P(t.Z.B),t.Z.e.Ab=null,t.zc=0)}(t),t.zc}function F(t){t.B={},t.e={},t.Gb=n(192),t.Zb=n(12),t.Cb=n(12),t.Db=n(12),t.Eb=n(12),t.pb=n(192),t.kb=n(4),t.kc=n(114),t.Fb=wt({},4),t.Rb=Y({}),t.sb=Y({}),t.gb={};for(var e=0;4>e;++e)t.kb[e]=wt({},6);return t}function z(t,e){for(;e>t.O;++t.O)t.ec[t.O]=wt({},3),t.hc[t.O]=wt({},3)}function W(t,e,r){return Mt(e,t.wc,0)?8+(Mt(e,t.wc,1)?8+mt(t.tc,e):mt(t.hc[r],e)):mt(t.ec[r],e)}function Y(t){return t.wc=n(2),t.ec=n(16),t.hc=n(16),t.tc=wt({},8),t.O=0,t}function G(t){Ot(t.wc);for(var e=0;t.O>e;++e)Ot(t.ec[e].G),Ot(t.hc[e].G);Ot(t.tc.G)}function H(t,e,r){var i,o;if(null==t.V||t.u!=r||t.I!=e)for(t.I=e,t.qc=(1<i;++i)t.V[i]=J({})}function J(t){return t.Ib=n(768),t}function Z(t,e){var r,n,i,o;t.jb=e,i=t.a[e].r,n=t.a[e].j;do{t.a[e].t&&(vt(t.a[i]),t.a[i].r=i-1,t.a[e].Ac&&(t.a[i-1].t=0,t.a[i-1].r=t.a[e].r2,t.a[i-1].j=t.a[e].j2)),o=i,r=n,n=t.a[o].j,i=t.a[o].r,t.a[o].j=r,t.a[o].r=e,e=o}while(e>0);return t.mb=t.a[0].j,t.q=t.a[0].r}function V(t){var e;for(t.v=n(4),t.a=[],t.d={},t.C=n(192),t.bb=n(12),t.hb=n(12),t.Ub=n(12),t.vc=n(12),t._=n(192),t.K=[],t.Sb=n(114),t.S=_t({},4),t.$=ft({}),t.i=ft({}),t.A={},t.m=[],t.P=[],t.lb=[],t.nc=n(16),t.x=n(4),t.Q=n(4),t.Xb=[Wt],t.uc=[Wt],t.Kc=[0],t.fc=n(5),t.yc=n(128),t.vb=0,t.X=1,t.D=0,t.Hb=-1,t.mb=0,e=0;4096>e;++e)t.a[e]={};for(e=0;4>e;++e)t.K[e]=_t({},6);return t}function $(t){for(var e=0;16>e;++e)t.nc[e]=kt(t.S,e);t.Qb=0}function Q(t){var e,r,n,i,o,a,u,s;for(i=4;128>i;++i)e=(2|1&(a=ot(i)))<<(n=(a>>1)-1),t.yc[i]=Tt(t.Sb,e-a-1,n,i-e);for(o=0;4>o;++o){for(r=t.K[o],u=o<<6,a=0;t.$b>a;++a)t.P[u+a]=xt(r,a);for(a=14;t.$b>a;++a)t.P[u+a]+=(a>>1)-1-4<<6;for(s=128*o,i=0;4>i;++i)t.lb[s+i]=t.P[u+i];for(;128>i;++i)t.lb[s+i]=t.P[u+ot(i)]+t.yc[i]}t.Mb=0}function K(t,e){it(t),function(t,e){if(t.Gc){At(t.d,t.C,(t.l<<4)+e,1),At(t.d,t.bb,t.l,0),t.l=7>t.l?7:10,st(t.$,t.d,0,e);var r=D(2);Et(t.K[r],t.d,63),Rt(t.d,67108863,26),St(t.S,t.d,15)}}(t,e&t.y);for(var r=0;5>r;++r)Ut(t.d)}function X(t,e){var r,n,i,o,a,u,s,f,c,l,h,d,p,b,g,y,v,w,m,_,E,x,S,k,O,A,R,B,U,L,C,I,P,D,q,F,z,W,Y,G,H,J,V,$;if(t.jb!=t.q)return p=t.a[t.q].r-t.q,t.mb=t.a[t.q].j,t.q=t.a[t.q].r,p;if(t.q=t.jb=0,t.N?(d=t.vb,t.N=0):d=nt(t),A=t.D,2>(k=M(t.b)+1))return t.mb=-1,1;for(k>273&&(k=273),Y=0,c=0;4>c;++c)t.x[c]=t.v[c],t.Q[c]=T(t.b,-1,t.x[c],273),t.Q[c]>t.Q[Y]&&(Y=c);if(t.Q[Y]>=t.n)return t.mb=Y,rt(t,(p=t.Q[Y])-1),p;if(d>=t.n)return t.mb=t.m[A-1]+4,rt(t,d-1),d;if(s=j(t.b,-1),v=j(t.b,-t.v[0]-1-1),2>d&&s!=v&&2>t.Q[Y])return t.mb=-1,1;if(t.a[0].Hc=t.l,P=e&t.y,t.a[1].z=Jt[t.C[(t.l<<4)+P]>>>2]+yt(dt(t.A,e,t.J),t.l>=7,v,s),vt(t.a[1]),W=(w=Jt[2048-t.C[(t.l<<4)+P]>>>2])+Jt[2048-t.bb[t.l]>>>2],v==s&&(G=W+function(t,e,r){return Jt[t.hb[e]>>>2]+Jt[t._[(e<<4)+r]>>>2]}(t,t.l,P),t.a[1].z>G&&(t.a[1].z=G,function(t){t.j=0,t.t=0}(t.a[1]))),2>(h=d>=t.Q[Y]?d:t.Q[Y]))return t.mb=t.a[1].j,1;t.a[1].r=0,t.a[0].bc=t.x[0],t.a[0].ac=t.x[1],t.a[0].dc=t.x[2],t.a[0].lc=t.x[3],l=h;do{t.a[l--].z=268435455}while(l>=2);for(c=0;4>c;++c)if(!(2>(z=t.Q[c]))){q=W+et(t,c,t.l,P);do{o=q+ct(t.i,z-2,P),(L=t.a[z]).z>o&&(L.z=o,L.r=0,L.j=c,L.t=0)}while(--z>=2)}if(S=w+Jt[t.bb[t.l]>>>2],d>=(l=t.Q[0]>=2?t.Q[0]+1:2)){for(R=0;l>t.m[R];)R+=2;for(;o=S+tt(t,f=t.m[R+1],l,P),(L=t.a[l]).z>o&&(L.z=o,L.r=0,L.j=f+4,L.t=0),l!=t.m[R]||(R+=2)!=A;++l);}for(r=0;;){if(++r==h)return Z(t,r);if(m=nt(t),A=t.D,m>=t.n)return t.vb=m,t.N=1,Z(t,r);if(++e,I=t.a[r].r,t.a[r].t?(--I,t.a[r].Ac?(J=t.a[t.a[r].r2].Hc,J=4>t.a[r].j2?7>J?8:11:7>J?7:10):J=t.a[I].Hc,J=N(J)):J=t.a[I].Hc,I==r-1?J=t.a[r].j?N(J):7>J?9:11:(t.a[r].t&&t.a[r].Ac?(I=t.a[r].r2,C=t.a[r].j2,J=7>J?8:11):J=4>(C=t.a[r].j)?7>J?8:11:7>J?7:10,U=t.a[I],4>C?C?1==C?(t.x[0]=U.ac,t.x[1]=U.bc,t.x[2]=U.dc,t.x[3]=U.lc):2==C?(t.x[0]=U.dc,t.x[1]=U.bc,t.x[2]=U.ac,t.x[3]=U.lc):(t.x[0]=U.lc,t.x[1]=U.bc,t.x[2]=U.ac,t.x[3]=U.dc):(t.x[0]=U.bc,t.x[1]=U.ac,t.x[2]=U.dc,t.x[3]=U.lc):(t.x[0]=C-4,t.x[1]=U.bc,t.x[2]=U.ac,t.x[3]=U.dc)),t.a[r].Hc=J,t.a[r].bc=t.x[0],t.a[r].ac=t.x[1],t.a[r].dc=t.x[2],t.a[r].lc=t.x[3],u=t.a[r].z,s=j(t.b,-1),v=j(t.b,-t.x[0]-1-1),P=e&t.y,n=u+Jt[t.C[(J<<4)+P]>>>2]+yt(dt(t.A,e,j(t.b,-2)),J>=7,v,s),_=0,(E=t.a[r+1]).z>n&&(E.z=n,E.r=r,E.j=-1,E.t=0,_=1),W=(w=u+Jt[2048-t.C[(J<<4)+P]>>>2])+Jt[2048-t.bb[J]>>>2],v!=s||r>E.r&&!E.j||(G=W+(Jt[t.hb[J]>>>2]+Jt[t._[(J<<4)+P]>>>2]),E.z>=G&&(E.z=G,E.r=r,E.j=0,E.t=0,_=1)),!(2>(k=O=(O=M(t.b)+1)>4095-r?4095-r:O))){if(k>t.n&&(k=t.n),!_&&v!=s&&($=Math.min(O-1,t.n),(g=T(t.b,0,t.x[0],$))>=2)){for(V=N(J),D=e+1&t.y,x=n+Jt[2048-t.C[(V<<4)+D]>>>2]+Jt[2048-t.bb[V]>>>2],B=r+1+g;B>h;)t.a[++h].z=268435455;o=x+(ct(t.i,g-2,D)+et(t,0,V,D)),(L=t.a[B]).z>o&&(L.z=o,L.r=r+1,L.j=0,L.t=1,L.Ac=0)}for(H=2,F=0;4>F;++F)if(!(2>(b=T(t.b,-1,t.x[F],k)))){y=b;do{for(;r+b>h;)t.a[++h].z=268435455;o=W+(ct(t.i,b-2,P)+et(t,F,J,P)),(L=t.a[r+b]).z>o&&(L.z=o,L.r=r,L.j=F,L.t=0)}while(--b>=2);if(b=y,F||(H=b+1),O>b&&($=Math.min(O-1-b,t.n),(g=T(t.b,b,t.x[F],$))>=2)){for(V=7>J?8:11,D=e+b&t.y,i=W+(ct(t.i,b-2,P)+et(t,F,J,P))+Jt[t.C[(V<<4)+D]>>>2]+yt(dt(t.A,e+b,j(t.b,b-1-1)),1,j(t.b,b-1-(t.x[F]+1)),j(t.b,b-1)),V=N(V),D=e+b+1&t.y,x=i+Jt[2048-t.C[(V<<4)+D]>>>2]+Jt[2048-t.bb[V]>>>2],B=b+1+g;r+B>h;)t.a[++h].z=268435455;o=x+(ct(t.i,g-2,D)+et(t,0,V,D)),(L=t.a[r+B]).z>o&&(L.z=o,L.r=r+b+1,L.j=0,L.t=1,L.Ac=1,L.r2=r,L.j2=F)}}if(m>k){for(m=k,A=0;m>t.m[A];A+=2);t.m[A]=m,A+=2}if(m>=H){for(S=w+Jt[t.bb[J]>>>2];r+m>h;)t.a[++h].z=268435455;for(R=0;H>t.m[R];)R+=2;for(b=H;;++b)if(o=S+tt(t,a=t.m[R+1],b,P),(L=t.a[r+b]).z>o&&(L.z=o,L.r=r,L.j=a+4,L.t=0),b==t.m[R]){if(O>b&&($=Math.min(O-1-b,t.n),(g=T(t.b,b,a,$))>=2)){for(V=7>J?7:10,D=e+b&t.y,i=o+Jt[t.C[(V<<4)+D]>>>2]+yt(dt(t.A,e+b,j(t.b,b-1-1)),1,j(t.b,b-(a+1)-1),j(t.b,b-1)),V=N(V),D=e+b+1&t.y,x=i+Jt[2048-t.C[(V<<4)+D]>>>2]+Jt[2048-t.bb[V]>>>2],B=b+1+g;r+B>h;)t.a[++h].z=268435455;o=x+(ct(t.i,g-2,D)+et(t,0,V,D)),(L=t.a[r+B]).z>o&&(L.z=o,L.r=r+b+1,L.j=0,L.t=1,L.Ac=1,L.r2=r,L.j2=a+4)}if((R+=2)==A)break}}}}}function tt(t,e,r,n){var i=D(r);return(128>e?t.lb[128*i+e]:t.P[(i<<6)+function(t){return 131072>t?Ht[t>>6]+12:134217728>t?Ht[t>>16]+32:Ht[t>>26]+52}(e)]+t.nc[15&e])+ct(t.$,r-2,n)}function et(t,e,r,n){var i;return e?(i=Jt[2048-t.hb[r]>>>2],1==e?i+=Jt[t.Ub[r]>>>2]:(i+=Jt[2048-t.Ub[r]>>>2],i+=Lt(t.vc[r],e-2))):(i=Jt[t.hb[r]>>>2],i+=Jt[2048-t._[(r<<4)+n]>>>2]),i}function rt(t,e){e>0&&(function(t,e){var r,n,i,o,a,u,s,f,c,l,h,d,p,b,g,y,v;do{if(t.h>=t.o+t.ob)d=t.ob;else if(d=t.h-t.o,t.xb>d){B(t);continue}for(p=t.o>t.p?t.o-t.p:0,n=t.f+t.o,t.qb?(u=1023&(v=Gt[255&t.c[n]]^255&t.c[n+1]),t.ub[u]=t.o,s=65535&(v^=(255&t.c[n+2])<<8),t.ub[1024+s]=t.o,f=(v^Gt[255&t.c[n+3]]<<5)&t.Ec):f=255&t.c[n]^(255&t.c[n+1])<<8,i=t.ub[t.R+f],t.ub[t.R+f]=t.o,g=1+(t.k<<1),y=t.k<<1,l=h=t.w,r=t.Fc;;){if(p>=i||0==r--){t.L[g]=t.L[y]=0;break}if(a=t.o-i,o=(t.k>=a?t.k-a:t.k-a+t.p)<<1,b=t.f+i,c=h>l?l:h,t.c[b+c]==t.c[n+c]){for(;++c!=d&&t.c[b+c]==t.c[n+c];);if(c==d){t.L[y]=t.L[o],t.L[g]=t.L[o+1];break}}(255&t.c[n+c])>(255&t.c[b+c])?(t.L[y]=i,y=o+1,i=t.L[y],h=c):(t.L[g]=i,g=o,i=t.L[g],l=c)}B(t)}while(0!=--e)}(t.b,e),t.s+=e)}function nt(t){var e=0;return t.D=function(t,e){var r,n,i,o,a,u,s,f,c,l,h,d,p,b,g,y,v,w,m,_,E;if(t.h>=t.o+t.ob)b=t.ob;else if(b=t.h-t.o,t.xb>b)return B(t),0;for(v=0,g=t.o>t.p?t.o-t.p:0,n=t.f+t.o,y=1,f=0,c=0,t.qb?(f=1023&(E=Gt[255&t.c[n]]^255&t.c[n+1]),c=65535&(E^=(255&t.c[n+2])<<8),l=(E^Gt[255&t.c[n+3]]<<5)&t.Ec):l=255&t.c[n]^(255&t.c[n+1])<<8,i=t.ub[t.R+l]||0,t.qb&&(o=t.ub[f]||0,a=t.ub[1024+c]||0,t.ub[f]=t.o,t.ub[1024+c]=t.o,o>g&&t.c[t.f+o]==t.c[n]&&(e[v++]=y=2,e[v++]=t.o-o-1),a>g&&t.c[t.f+a]==t.c[n]&&(a==o&&(v-=2),e[v++]=y=3,e[v++]=t.o-a-1,o=a),0!=v&&o==i&&(v-=2,y=1)),t.ub[t.R+l]=t.o,m=1+(t.k<<1),_=t.k<<1,d=p=t.w,0!=t.w&&i>g&&t.c[t.f+i+t.w]!=t.c[n+t.w]&&(e[v++]=y=t.w,e[v++]=t.o-i-1),r=t.Fc;;){if(g>=i||0==r--){t.L[m]=t.L[_]=0;break}if(s=t.o-i,u=(t.k>=s?t.k-s:t.k-s+t.p)<<1,w=t.f+i,h=p>d?d:p,t.c[w+h]==t.c[n+h]){for(;++h!=b&&t.c[w+h]==t.c[n+h];);if(h>y&&(e[v++]=y=h,e[v++]=s-1,h==b)){t.L[_]=t.L[u],t.L[m]=t.L[u+1];break}}(255&t.c[n+h])>(255&t.c[w+h])?(t.L[_]=i,_=u+1,i=t.L[_],p=h):(t.L[m]=i,m=u,i=t.L[m],d=h)}return B(t),v}(t.b,t.m),t.D>0&&(e=t.m[t.D-2])==t.n&&(e+=T(t.b,e-1,t.m[t.D-1],273-e)),++t.s,e}function it(t){t.b&&t.W&&(t.b.cc=null,t.W=0)}function ot(t){return 2048>t?Ht[t]:2097152>t?Ht[t>>10]+20:Ht[t>>20]+40}function at(t,e){Ot(t.db);for(var r=0;e>r;++r)Ot(t.Vb[r].G),Ot(t.Wb[r].G);Ot(t.ic.G)}function ut(t,e,r,n,i){var o,a,u,s,f;for(o=Jt[t.db[0]>>>2],u=(a=Jt[2048-t.db[0]>>>2])+Jt[t.db[1]>>>2],s=a+Jt[2048-t.db[1]>>>2],f=0,f=0;8>f;++f){if(f>=r)return;n[i+f]=o+xt(t.Vb[e],f)}for(;16>f;++f){if(f>=r)return;n[i+f]=u+xt(t.Wb[e],f-8)}for(;r>f;++f)n[i+f]=s+xt(t.ic,f-8-8)}function st(t,e,r,n){(function(t,e,r,n){8>r?(At(e,t.db,0,0),Et(t.Vb[n],e,r)):(r-=8,At(e,t.db,0,1),8>r?(At(e,t.db,1,0),Et(t.Wb[n],e,r)):(At(e,t.db,1,1),Et(t.ic,e,r-8)))})(t,e,r,n),0==--t.sc[n]&&(ut(t,n,t.rb,t.Cc,272*n),t.sc[n]=t.rb)}function ft(t){return function(t){t.db=n(2),t.Vb=n(16),t.Wb=n(16),t.ic=_t({},8);for(var e=0;16>e;++e)t.Vb[e]=_t({},3),t.Wb[e]=_t({},3)}(t),t.Cc=[],t.sc=[],t}function ct(t,e,r){return t.Cc[272*r+e]}function lt(t,e){for(var r=0;e>r;++r)ut(t,r,t.rb,t.Cc,272*r),t.sc[r]=t.rb}function ht(t,e,r){var i,o;if(null==t.V||t.u!=r||t.I!=e)for(t.I=e,t.qc=(1<i;++i)t.V[i]=gt({})}function dt(t,e,r){return t.V[((e&t.qc)<>>8-t.u)]}function pt(t,e,r){var n,i,o=1;for(i=7;i>=0;--i)n=r>>i&1,At(e,t.tb,o,n),o=o<<1|n}function bt(t,e,r,n){var i,o,a,u,s=1,f=1;for(o=7;o>=0;--o)i=n>>o&1,u=f,s&&(u+=1+(a=r>>o&1)<<8,s=a==i),At(e,t.tb,u,i),f=f<<1|i}function gt(t){return t.tb=n(768),t}function yt(t,e,r,n){var i,o,a=1,u=7,s=0;if(e)for(;u>=0;--u)if(o=r>>u&1,i=n>>u&1,s+=Lt(t.tb[(1+o<<8)+a],i),a=a<<1|i,o!=i){--u;break}for(;u>=0;--u)i=n>>u&1,s+=Lt(t.tb[a],i),a=a<<1|i;return s}function vt(t){t.j=-1,t.t=0}function wt(t,e){return t.F=e,t.G=n(1<>>--i&1,At(e,t.G,o,n),o=o<<1|n}function xt(t,e){var r,n,i=1,o=0;for(n=t.F;0!=n;)r=e>>>--n&1,o+=Lt(t.G[i],r),i=(i<<1)+r;return o}function St(t,e,r){var n,i,o=1;for(i=0;t.F>i;++i)n=1&r,At(e,t.G,o,n),o=o<<1|n,r>>=1}function kt(t,e){var r,n,i=1,o=0;for(n=t.F;0!=n;--n)r=1&e,e>>>=1,o+=Lt(t.G[i],r),i=i<<1|r;return o}function jt(t,e,r,n,i){var o,a,u=1;for(a=0;n>a;++a)At(r,t,e+u,o=1&i),u=u<<1|o,i>>=1}function Tt(t,e,r,n){var i,o,a=1,u=0;for(o=r;0!=o;--o)i=1&n,n>>>=1,u+=Jt[(2047&(t[e+a]-i^-i))>>>2],a=a<<1|i;return u}function Mt(t,e,r){var n,i=e[r];return(-2147483648^(n=(t.E>>>11)*i))>(-2147483648^t.Bb)?(t.E=n,e[r]=i+(2048-i>>>5)<<16>>16,-16777216&t.E||(t.Bb=t.Bb<<8|g(t.Ab),t.E<<=8),0):(t.E-=n,t.Bb-=n,e[r]=i-(i>>>5)<<16>>16,-16777216&t.E||(t.Bb=t.Bb<<8|g(t.Ab),t.E<<=8),1)}function Ot(t){for(var e=t.length-1;e>=0;--e)t[e]=1024}function At(t,e,r,n){var a,u=e[r];a=(t.E>>>11)*u,n?(t.xc=i(t.xc,o(f(a),[4294967295,0])),t.E-=a,e[r]=u-(u>>>5)<<16>>16):(t.E=a,e[r]=u+(2048-u>>>5)<<16>>16),-16777216&t.E||(t.E<<=8,Ut(t))}function Rt(t,e,r){for(var n=r-1;n>=0;--n)t.E>>>=1,1==(e>>>n&1)&&(t.xc=i(t.xc,f(t.E))),-16777216&t.E||(t.E<<=8,Ut(t))}function Bt(t){return i(i(f(t.Jb),t.mc),[4,0])}function Ut(t){var e,r=c(function(t,e){var r;return r=d(t,e&=63),0>t[1]&&(r=i(r,h([2,0],31))),r}(t.xc,32));if(0!=r||a(t.xc,[4278190080,0])<0){t.mc=i(t.mc,f(t.Jb)),e=t.Oc;do{m(t.Ab,e+r),e=255}while(0!=--t.Jb);t.Oc=c(t.xc)>>>24}++t.Jb,t.xc=h(o(t.xc,[16777215,0]),8)}function Lt(t,e){return Jt[(2047&(t-e^-e))>>>2]}function Ct(t){for(var e,r,n,i=0,o=0,a=t.length,u=[],s=[];a>i;++i,++o){if(128&(e=255&t[i]))if(192==(224&e)){if(i+1>=a)return t;if(128!=(192&(r=255&t[++i])))return t;s[o]=(31&e)<<6|63&r}else{if(224!=(240&e))return t;if(i+2>=a)return t;if(128!=(192&(r=255&t[++i])))return t;if(128!=(192&(n=255&t[++i])))return t;s[o]=(15&e)<<12|(63&r)<<6|63&n}else{if(!e)return t;s[o]=e}16383==o&&(u.push(String.fromCharCode.apply(String,s)),o=-1)}return o>0&&(s.length=o,u.push(String.fromCharCode.apply(String,s))),u.join("")}function It(t){var e,r,n,i=[],o=0,a=t.length;if("object"==typeof t)return t;for(function(t,e,r,n,i){var o;for(o=0;r>o;++o)n[i++]=t.charCodeAt(o)}(t,0,a,i,0),n=0;a>n;++n)(e=i[n])>=1&&127>=e?++o:o+=!e||e>=128&&2047>=e?2:3;for(r=[],o=0,n=0;a>n;++n)(e=i[n])>=1&&127>=e?r[o++]=e<<24>>24:!e||e>=128&&2047>=e?(r[o++]=(192|e>>6&31)<<24>>24,r[o++]=(128|63&e)<<24>>24):(r[o++]=(224|e>>12&15)<<24>>24,r[o++]=(128|e>>6&63)<<24>>24,r[o++]=(128|63&e)<<24>>24);return r}function Pt(t){return t[1]+t[0]}var Dt=3,Nt="function"==typeof t?t:setTimeout,qt=4294967296,Ft=[4294967295,-qt],zt=[0,-0x8000000000000000],Wt=[0,0],Yt=[1,0],Gt=function(){var t,e,r,n=[];for(t=0;256>t;++t){for(r=t,e=0;8>e;++e)0!=(1&r)?r=r>>>1^-306674912:r>>>=1;n[t]=r}return n}(),Ht=function(){var t,e,r,n=2,i=[0,1];for(r=2;22>r;++r)for(e=1<<(r>>1)-1,t=0;e>t;++t,++n)i[n]=r<<24>>24;return i}(),Jt=function(){var t,e,r,n=[];for(e=8;e>=0;--e)for(t=1<<9-e,r=1<<9-e-1;t>r;++r)n[r]=(e<<6)+(t-r<<6>>>9-e-1);return n}(),Zt=function(){var t=[{s:16,f:64,m:0},{s:20,f:64,m:0},{s:19,f:64,m:1},{s:20,f:64,m:1},{s:21,f:128,m:1},{s:22,f:128,m:1},{s:23,f:128,m:1},{s:24,f:255,m:1},{s:25,f:255,m:1}];return function(e){return t[e-1]||t[6]}}();return"undefined"==typeof onmessage||"undefined"!=typeof window&&void 0!==window.document||(onmessage=function(t){t&&t.gc&&(2==t.gc.action?e.decompress(t.gc.gc,t.gc.cbn):1==t.gc.action&&e.compress(t.gc.gc,t.gc.Rc,t.gc.cbn))}),{compress:function(t,e,n,i){var o,a,u={},s=void 0===n&&void 0===i;if("function"!=typeof n&&(a=n,n=i=0),i=i||function(t){return void 0!==a?r(t,a):void 0},n=n||function(t,e){return void 0!==a?postMessage({action:1,cbn:a,result:t,error:e}):void 0},s){for(u.c=S({},It(t),Zt(e));q(u.c.yb););return w(u.c.Nb)}try{u.c=S({},It(t),Zt(e)),i(0)}catch(t){return n(null,t)}Nt(function t(){try{for(var e,r=(new Date).getTime();q(u.c.yb);)if(o=Pt(u.c.yb.Pb)/Pt(u.c.Tb),(new Date).getTime()-r>200)return i(o),Nt(t,0),0;i(1),e=w(u.c.Nb),Nt(n.bind(null,e),0)}catch(e){n(null,e)}},0)},decompress:function(t,e,n){var i,o,a,u,s={},f=void 0===e&&void 0===n;if("function"!=typeof e&&(o=e,e=n=0),n=n||function(t){return void 0!==o?r(a?t:-1,o):void 0},e=e||function(t,e){return void 0!==o?postMessage({action:2,cbn:o,result:t,error:e}):void 0},f){for(s.d=k({},t);q(s.d.yb););return Ct(w(s.d.Nb))}try{s.d=k({},t),u=Pt(s.d.Tb),a=u>-1,n(0)}catch(t){return e(null,t)}Nt(function t(){try{for(var r,o=0,f=(new Date).getTime();q(s.d.yb);)if(++o%1e3==0&&(new Date).getTime()-f>200)return a&&(i=Pt(s.d.yb.Z.g)/u,n(i)),Nt(t,0),0;n(1),r=Ct(w(s.d.Nb)),Nt(e.bind(null,r),0)}catch(r){e(null,r)}},0)}}}();this.LZMA=this.LZMA_WORKER=e}).call(this,r(17).setImmediate)},function(t,e,r){var n,i=function(){function t(t,e){if(!i[t]){i[t]={};for(var r=0;r>>8,r[2*n+1]=a%256}return r},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var r=new Array(t.length/2),n=0,i=r.length;n>=1}else{for(i=1,n=0;n>=1}0==--l&&(l=Math.pow(2,d),d++),delete u[c]}else for(i=a[c],n=0;n>=1;0==--l&&(l=Math.pow(2,d),d++),a[f]=h++,c=String(s)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(n=0;n>=1}else{for(i=1,n=0;n>=1}0==--l&&(l=Math.pow(2,d),d++),delete u[c]}else for(i=a[c],n=0;n>=1;0==--l&&(l=Math.pow(2,d),d++)}for(i=2,n=0;n>=1;for(;;){if(b<<=1,g==e-1){p.push(r(b));break}g++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:o._decompress(t.length,32768,function(e){return t.charCodeAt(e)})},_decompress:function(t,r,n){var i,o,a,u,s,f,c,l=[],h=4,d=4,p=3,b="",g=[],y={val:n(0),position:r,index:1};for(i=0;i<3;i+=1)l[i]=i;for(a=0,s=Math.pow(2,2),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;switch(a){case 0:for(a=0,s=Math.pow(2,8),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;c=e(a);break;case 1:for(a=0,s=Math.pow(2,16),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;c=e(a);break;case 2:return""}for(l[3]=c,o=c,g.push(c);;){if(y.index>t)return"";for(a=0,s=Math.pow(2,p),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;switch(c=a){case 0:for(a=0,s=Math.pow(2,8),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;l[d++]=e(a),c=d-1,h--;break;case 1:for(a=0,s=Math.pow(2,16),f=1;f!=s;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(u>0?1:0)*f,f<<=1;l[d++]=e(a),c=d-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,p),p++),l[c])b=l[c];else{if(c!==d)return null;b=o+o.charAt(0)}g.push(b),l[d++]=o+b.charAt(0),o=b,0==--h&&(h=Math.pow(2,p),p++)}}};return o}();void 0!==(n=function(){return i}.call(e,r,e,t))&&(t.exports=n)},function(t,e,r){"use strict";var n=function(){};n.prototype.encode=function(t){for(var e,r={},n=(t+"").split(""),i=[],o=n[0],a=256,u=1;u1?r[o]:o.charCodeAt(0)),r[o+e]=a,a++,o=e);for(i.push(o.length>1?r[o]:o.charCodeAt(0)),u=0;u0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; },{}],"JgNJ":[function(require,module,exports) { exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],"REa7":[function(require,module,exports) { var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; },{}],"dskh":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"pBGv":[function(require,module,exports) { var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a1)for(var n=1;n>2,o=(3&t)<<4|r>>4,h=1>6:64,u=2>4,r=(15&a)<<4|(o=s.indexOf(e.charAt(u++)))>>2,n=(3&o)<<6|(h=s.indexOf(e.charAt(u++))),c[l++]=t,64!==o&&(c[l++]=r),64!==h&&(c[l++]=n);return c}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var s=i,a=0+r;e^=-1;for(var o=0;o>>8^s[255&(e^t[o])];return-1^e}(0|t,e,e.length):function(e,t,r,n){var s=i,a=0+r;e^=-1;for(var o=0;o>>8^s[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function n(e,t){var r,n="";for(r=0;r>>=8;return n}function i(e,t,r,i,a,l){var f,c,d=e.file,p=e.compression,m=l!==o.utf8encode,_=s.transformTo("string",l(d.name)),g=s.transformTo("string",o.utf8encode(d.name)),b=d.comment,v=s.transformTo("string",l(b)),y=s.transformTo("string",o.utf8encode(b)),w=g.length!==d.name.length,k=y.length!==b.length,x="",S="",z="",C=d.dir,E=d.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var I=0;t&&(I|=8),m||!w&&!k||(I|=2048);var O=0,B=0;C&&(O|=16),"UNIX"===a?(B=798,O|=function(e,t){var r=e;return e||(r=C?16893:33204),(65535&r)<<16}(d.unixPermissions)):(B=20,O|=63&(d.dosPermissions||0)),f=E.getUTCHours(),f<<=6,f|=E.getUTCMinutes(),f<<=5,f|=E.getUTCSeconds()/2,c=E.getUTCFullYear()-1980,c<<=4,c|=E.getUTCMonth()+1,c<<=5,c|=E.getUTCDate(),w&&(S=n(1,1)+n(h(_),4)+g,x+="up"+n(S.length,2)+S),k&&(z=n(1,1)+n(h(v),4)+y,x+="uc"+n(z.length,2)+z);var R="";return R+="\n\0",R+=n(I,2),R+=p.magic,R+=n(f,2),R+=n(c,2),R+=n(A.crc32,4),R+=n(A.compressedSize,4),R+=n(A.uncompressedSize,4),R+=n(_.length,2),R+=n(x.length,2),{fileRecord:u.LOCAL_FILE_HEADER+R+_+x,dirRecord:u.CENTRAL_FILE_HEADER+n(B,2)+R+n(v.length,2)+"\0\0\0\0"+n(O,4)+n(i,4)+_+x+v}}var s=e("../utils"),a=e("../stream/GenericWorker"),o=e("../utf8"),h=e("../crc32"),u=e("../signature");function l(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(l,a),l.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return u.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],29:[function(e,t,n){"use strict";var i=e("../utils"),s=e("./ConvertWorker"),a=e("./GenericWorker"),o=e("../base64"),h=e("../support"),u=e("../external"),l=null;if(h.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function f(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,i.checkSupport(n),this._worker=e.pipe(new s(n)),e.lock()}catch(e){this._worker=new a("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return function(e,t){return new u.Promise(function(n,s){var a=[],h=e._internalType,u=e._outputType,l=e._mimeType;e.on("data",function(e,r){a.push(e),t&&t(r)}).on("error",function(e){a=[],s(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return i.transformTo(e,t)}}(u,function(e,t){var n,i=0,s=null,a=0;for(n=0;n>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,s,a=e.length,h=new Array(2*a);for(t=r=0;t>10&1023,h[r++]=56320|1023&i)}return h.length!==r&&(h.subarray?h=h.subarray(0,r):h.length=r),n.applyFromCharCode(h)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,a),u.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+o[e[r]]>t?r:t}(t),h=t;a!==t.length&&(i.uint8array?(h=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(h=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(h),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,n.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var n=e("./support"),i=e("./base64"),s=e("./nodejsUtils"),a=e("./external");function o(e){return e}function h(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return h(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r>10&1023,u[n++]=56320|1023&i)}return h(u,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var s=n,a=i+r;e^=-1;for(var o=i;o>>8^s[255&(e^t[o])];return-1^e}},{}],46:[function(e,t,r){"use strict";var n,i=e("../utils/common"),s=e("./trees"),a=e("./adler32"),o=e("./crc32"),h=e("./messages"),u=0,l=4,f=0,c=-2,d=-1,p=4,m=2,_=8,g=9,b=286,v=30,y=19,w=2*b+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=h[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,s,h,u,l,f,c,d,p=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-z)){for(i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;n=e.head[--t],e.head[t]=p<=n?n-p:0,--r;);for(t=r=p;n=e.prev[--t],e.prev[t]=p<=n?n-p:0,--r;);s+=p}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,f=e.strstart+e.lookahead,d=void 0,(c=s)<(d=u.avail_in)&&(d=c),r=0===d?0:(u.avail_in-=d,i.arraySet(l,u.input,u.next_in,d,f),1===u.state.wrap?u.adler=a(u.adler,l,d,f):2===u.state.wrap&&(u.adler=o(u.adler,l,d,f)),u.next_in+=d,u.total_in+=d,d),e.lookahead+=r,e.lookahead+e.insert>=x)for(h=e.strstart-e.insert,e.ins_h=e.window[h],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===u)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,_,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,f):c},r.deflate=function(e,t){var r,i,a,h;if(!e||!e.state||5>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else{var d=_+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=E,P(i,d),0!==i.strstart&&(P(i,e.adler>>>16),P(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),F(e),a=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),F(e),a=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindexa&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===h&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),F(e),a=i.pending,i.pending===i.pending_buf_size)){h=1;break}h=i.gzindexa&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===h&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(U(i,255&e.adler),U(i,e.adler>>8&255),e.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(e),0===e.avail_out)return i.last_flush=-1,f}else if(0===e.avail_in&&T(t)<=T(r)&&t!==l)return R(e,-5);if(666===i.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&666!==i.status){var p=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===u)return A;break}if(e.match_length=0,r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,o=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===u)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=s._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===l?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(i,t):n[i.level].func(i,t);if(p!==O&&p!==B||(i.status=666),p===A||p===O)return 0===e.avail_out&&(i.last_flush=-1),f;if(p===I&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),0===e.avail_out))return i.last_flush=-1,f}return t!==l?f:i.wrap<=0?1:(2===i.wrap?(U(i,255&e.adler),U(i,e.adler>>8&255),U(i,e.adler>>16&255),U(i,e.adler>>24&255),U(i,255&e.total_in),U(i,e.total_in>>8&255),U(i,e.total_in>>16&255),U(i,e.total_in>>24&255)):(P(i,e.adler>>>16),P(i,65535&e.adler)),F(e),0=r.w_size&&(0===o&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,p-r.w_size,r.w_size,0),t=d,p=r.w_size),h=e.avail_in,u=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,s=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0==(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function g(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=c,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(d),t.distcode=t.distdyn=new n.Buf32(p),t.sane=1,t.back=-1,l):f}function b(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,g(e)):f}function v(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(s=a.wsize-a.wnext)&&(s=i),n.arraySet(a.window,t,r-i,s,a.wnext),(i-=s)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=s(r.check,j,2,0),w=y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){e.msg="unknown compression method",r.mode=30;break}if(w-=4,F=8+(15&(y>>>=4)),0===r.wbits)r.wbits=F;else if(F>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0)),w=y=0,r.mode=3;case 3:for(;w<32;){if(0===b)break e;b--,y+=d[_++]<>>8&255,j[2]=y>>>16&255,j[3]=y>>>24&255,r.check=s(r.check,j,4,0)),w=y=0,r.mode=4;case 4:for(;w<16;){if(0===b)break e;b--,y+=d[_++]<>8),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0)),w=y=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===b)break e;b--,y+=d[_++]<>>8&255,r.check=s(r.check,j,2,0)),w=y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(b<(C=r.length)&&(C=b),C&&(r.head&&(F=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,d,_,C,F)),512&r.flags&&(r.check=s(r.check,d,C,_)),b-=C,_+=C,r.length-=C),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break e;for(C=0;F=d[_+C++],r.head&&F&&r.length<65536&&(r.head.name+=String.fromCharCode(F)),F&&C>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;w<32;){if(0===b)break e;b--,y+=d[_++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===b)break e;b--,y+=d[_++]<>>=1)){case 0:r.mode=14;break;case 1:if(S(r),r.mode=20,6!==t)break;y>>>=2,w-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}y>>>=2,w-=2;break;case 14:for(y>>>=7&w,w-=7&w;w<32;){if(0===b)break e;b--,y+=d[_++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,w=y=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(C=r.length){if(b>>=5,w-=5,r.ndist=1+(31&y),y>>>=5,w-=5,r.ncode=4+(15&y),y>>>=4,w-=4,286>>=3,w-=3}for(;r.have<19;)r.lens[Z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,U={bits:r.lenbits},N=o(0,r.lens,0,19,r.lencode,0,r.work,U),r.lenbits=U.bits,N){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break e;b--,y+=d[_++]<>>=I,w-=I,r.lens[r.have++]=B;else{if(16===B){for(P=I+2;w>>=I,w-=I,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}F=r.lens[r.have-1],C=3+(3&y),y>>>=2,w-=2}else if(17===B){for(P=I+3;w>>=I)),y>>>=3,w-=3}else{for(P=I+7;w>>=I)),y>>>=7,w-=7}if(r.have+C>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;C--;)r.lens[r.have++]=F}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,U={bits:r.lenbits},N=o(h,r.lens,0,r.nlen,r.lencode,0,r.work,U),r.lenbits=U.bits,N){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,U={bits:r.distbits},N=o(u,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,U),r.distbits=U.bits,N){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=b&&258<=v){e.next_out=g,e.avail_out=v,e.next_in=_,e.avail_in=b,r.hold=y,r.bits=w,a(e,x),g=e.next_out,p=e.output,v=e.avail_out,_=e.next_in,d=e.input,b=e.avail_in,y=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;O=(L=r.lencode[y&(1<>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break e;b--,y+=d[_++]<>R)])>>>16&255,B=65535&L,!(R+(I=L>>>24)<=w);){if(0===b)break e;b--,y+=d[_++]<>>=R,w-=R,r.back+=R}if(y>>>=I,w-=I,r.back+=I,r.length=B,0===O){r.mode=26;break}if(32&O){r.back=-1,r.mode=12;break}if(64&O){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&O,r.mode=22;case 22:if(r.extra){for(P=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;O=(L=r.distcode[y&(1<>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break e;b--,y+=d[_++]<>R)])>>>16&255,B=65535&L,!(R+(I=L>>>24)<=w);){if(0===b)break e;b--,y+=d[_++]<>>=R,w-=R,r.back+=R}if(y>>>=I,w-=I,r.back+=I,64&O){e.msg="invalid distance code",r.mode=30;break}r.offset=B,r.extra=15&O,r.mode=24;case 24:if(r.extra){for(P=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===v)break e;if(C=x-v,r.offset>C){if((C=r.offset-C)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}E=C>r.wnext?(C-=r.wnext,r.wsize-C):r.wnext-C,C>r.length&&(C=r.length),A=r.window}else A=p,E=g-r.offset,C=r.length;for(vb?(y=U[P+f[S]],T[D+f[S]]):(y=96,0),d=1<>I)+(p-=d)]=v<<24|y<<16|w|0,0!==p;);for(d=1<>=1;if(0!==d?(R&=d-1,R+=d):R=0,S++,0==--F[x]){if(x===C)break;x=t[r+f[S]]}if(E>>7)]}function T(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function D(e,t,r){e.bi_valid>c-r?(e.bi_buf|=t<>c-e.bi_valid,e.bi_valid+=r-c):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function U(e,t,r){var n,i,s=new Array(f+1),a=0;for(n=1;n<=f;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=N(s[o]++,o))}}function P(e){var t;for(t=0;t>1;1<=r;r--)Z(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Z(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,Z(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,_=t.stat_desc.max_length,g=0;for(s=0;s<=f;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?Y(e,t,r,n):4===e.strategy||s===i?(D(e,2+(n?1:0),3),W(e,w,k)):(D(e,4+(n?1:0),3),function(e,t,r,n){var i;for(D(e,t-257,5),D(e,r-1,5),D(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(S[r]+a+1)]++,e.dyn_dtree[2*R(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){D(e,2,3),F(e,d,w),function(e){16===e.bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,r,i){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,i,s,a,o=1,h={},u=!1,l=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,r="[object process]"==={}.toString.call(e.process)?function(e){n.nextTick(function(){d(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(a="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",p,!1):e.attachEvent("onmessage",p),function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){s.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):function(e){setTimeout(d,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r\n
\n
\n ',"\n
\n
\n
"])),t)}module.exports=function(e,l){if(!e.glitchesLoaded)return l("set-fullscreen-flags"),l("load-vm"),l("load-glitches"),d("Loading Glitches");if(!e.partsLoaded)return l("load-parts"),d("Loading Parts");if(e.query.shareData&&!e.sceneData)return l("load-from-share-url",e.query.shareData),d("Loading From URL Data");if(!e.projectMetadata)return l("fetch-project-metadata",e.params.project_id),d("Fetching Project Metadata");if(!e.sceneMetadata)return l("fetch-scene-metadata","main"),d("Fetching Scene Metadata");if(!e.sceneData)return l("fetch-scene-sb3","main"),d("Fetching Project sb3");if(!e.loadedVM)return l("load-scene"),d("Loading Project into Scratch VM");var u="graphics/logos/".concat(e.projectMetadata.id,".png"),m=i(t||(t=a(['\n \n '])),u),h="https://www.makeymakey.com";e.projectMetadata.tutorialLink&&(h=e.projectMetadata.tutorialLink);var g=s({children:[o({icon:0===e.masterVolume?"mute":"unmute",onClick:function(){return l("toggle-mute")}}),o({icon:e.isMenuOpen?"cross":"question",onClick:function(){window.open(h,"_blank").focus()}})]});return i(n||(n=a(['\n
\n
\n
\n ','\n
\n
\n ','\n
\n
\n
\n ','\n
\n ',"\n
\n
\n
\n
\n
\n "])),m,r(e,l),c(e,l),65,35,g)}; },{"choo/html":"IYKM","./components/screen.js":"qYNH","./components/contextmenu.js":"dD0u","./elements/chip.js":"OWVn","./elements/buttonicon.js":"pUEq"}],"A2T1":[function(require,module,exports) { var e=require("choo"),r=require("./views/play.js"),o=require("./views/scaffold-project-browser.js"),s=require("./store.js"),u=require("./views/fullscreen-player.js"),i=e({hash:!0});i.use(s),i.route("/v2/:project_id",u),i.route("/play/:project_id",u),i.route("/v2",o),i.route("/play",o),i.mount("#app"); },{"choo":"vRvq","./views/play.js":"LClE","./views/scaffold-project-browser.js":"n1gG","./store.js":"iz0v","./views/fullscreen-player.js":"zYXz"}]},{},["A2T1"], null) //# sourceMappingURL=app.ce666d86.js.map