diff --git a/static/spiele/Flappy-Witch/FlappyWitch.html b/static/spiele/Flappy-Witch/FlappyWitch.html index dec2e83..7ef3827 100644 --- a/static/spiele/Flappy-Witch/FlappyWitch.html +++ b/static/spiele/Flappy-Witch/FlappyWitch.html @@ -131,7 +131,7 @@ .sc-canvas { cursor: auto; } - .sc-monitor-root[opcode^="data_"] .sc-monitor-value-color { + .sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color { background-color: #00aa9b; } .sc-monitor-row-value-outer { @@ -204,20 +204,20 @@ Redistribution and use in source and binary forms, with or without modification, THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -!function(A){function B(B){for(var t,g,i=B[0],Q=B[1],s=0,r=[];s{if("string"!=typeof A)return!1;for(let B=0;Be?1:0}return t===1/0&&e===1/0||t===-1/0&&e===-1/0?0:t-e}static isInt(A){return"number"==typeof A?!!isNaN(A)||A===Math.floor(A):"boolean"==typeof A||"string"==typeof A&&A.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(A,B,t){if("number"!=typeof A){if("all"===A)return t?i.LIST_ALL:i.LIST_INVALID;if("last"===A)return B>0?B:i.LIST_INVALID;if("random"===A||"any"===A)return B>0?1+Math.floor(Math.random()*B):i.LIST_INVALID}return(A=Math.floor(i.toNumber(A)))<1||A>B?i.LIST_INVALID:A}}A.exports=i},function(A,B){A.exports={BOOLEAN:"Boolean",BUTTON:"button",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter"}},function(A,B){A.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(A,B){A.exports=class{static degToRad(A){return A*Math.PI/180}static radToDeg(A){return 180*A/Math.PI}static clamp(A,B,t){return Math.min(Math.max(A,B),t)}static wrapClamp(A,B,t){const e=t-B+1;return A-Math.floor((A-B)/e)*e}static tan(A){switch(A%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*A/180))/1e10}}static reducedSortOrdering(A){const B=A.slice(0).sort((A,B)=>A-B);return A.map(A=>B.indexOf(A))}static inclusiveRandIntWithout(A,B,t){const e=B-A,g=A+Math.floor(Math.random()*e);return g>=t?g+1:g}static scale(A,B,t,e,g){return(A-B)/(t-B)*(g-e)+e}}},function(A,B,t){"use strict";var e=t(126),g=t(127),i=t(59),Q=t(58),s=t(57);function n(A,B){return Object.keys(B).forEach((function(t){A[t]=B[t]})),A}A.exports=function A(){var B=n({},s),t="en",r={},c=function(A){return A},E=null,o="warning",w={};function C(A,B,i){var Q="string"==typeof A?A:A.default,s=Y(Q,"object"==typeof A&&A.id||c(Q),i||t);return(s.format||(s.format=g(e(s.message),i||t,w)))(B)}C.rich=function(A,B,i){var Q="string"==typeof A?A:A.default,s=Y(Q,"object"==typeof A&&A.id||c(Q),i||t);return(s.toParts||(s.toParts=g.toParts(e(s.message,{tagsType:a}),i||t,w)))(B)};var a="<>";function I(A,B){var t=A[2];return function(A,B){var e="object"==typeof t?function(A,B){return Object.keys(A).reduce((function(t,e){return t[e]=A[e](B),t}),{})}(t,B):t;return"function"==typeof A?A(e):A}}function Y(A,B,t){var e=Q(t,r)||"en",g=r[e]||(r[e]={}),i=g[B];if("string"==typeof i&&(i=g[B]={message:i}),!i){var s='Translation for "'+B+'" in "'+e+'" is missing';if("warning"===o)"undefined"!=typeof console&&console.warn(s);else if("ignore"!==o)throw new Error(s);var n="function"==typeof E?E(A,B,e)||A:E||A;i=g[B]={message:n}}return i}function h(A,B,e,g,s){"object"==typeof e&&"object"!=typeof g&&(s=g,g=e,e=0);var n=Q(s||t,i),r=n&&i[n][A]||M;return g["="+ +B]||g[r(B-e)]||g.other}function M(){return"other"}return w[a]=I,C.setup=function(A){return(A=A||{}).locale&&(t=A.locale),"translations"in A&&(r=A.translations||{}),A.generateId&&(c=A.generateId),"missingReplacement"in A&&(E=A.missingReplacement),A.missingTranslation&&(o=A.missingTranslation),A.formats&&(A.formats.number&&n(B.number,A.formats.number),A.formats.date&&n(B.date,A.formats.date),A.formats.time&&n(B.time,A.formats.time)),A.types&&((w=A.types)[a]=I),{locale:t,translations:r,generateId:c,missingReplacement:E,missingTranslation:o,formats:B,types:w}},C.number=function(A,e,g){var i=e&&B.number[e]||B.parseNumberPattern(e)||B.number.default;return new Intl.NumberFormat(g||t,i).format(A)},C.date=function(A,e,g){var i=e&&B.date[e]||B.parseDatePattern(e)||B.date.default;return new Intl.DateTimeFormat(g||t,i).format(A)},C.time=function(A,e,g){var i=e&&B.time[e]||B.parseDatePattern(e)||B.time.default;return new Intl.DateTimeFormat(g||t,i).format(A)},C.select=function(A,B){return B[A]||B.other},C.custom=function(A,B,t,e){return A[1]in w?w[A[1]](A,B)(t,e):t},C.plural=h.bind(null,"cardinal"),C.selectordinal=h.bind(null,"ordinal"),C.namespace=A,C}()},function(A,B){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,B=[];for(let e=0;e<20;e++)B[e]=t.charAt(Math.random()*A);return B.join("")}},function(A,B,t){const e=t(0);class g{static withoutTrailingDigits(A){let B=A.length-1;for(;B>=0&&"0123456789".indexOf(A.charAt(B))>-1;)B--;return A.slice(0,B+1)}static unusedName(A,B){if(B.indexOf(A)<0)return A;A=g.withoutTrailingDigits(A);let t=2;for(;B.indexOf(A+t)>=0;)t++;return A+t}static splitFirst(A,B){const t=A.indexOf(B);return t>=0?[A.substring(0,t),A.substring(t+1)]:[A,null]}static stringify(A){return JSON.stringify(A,(A,B)=>"number"!=typeof B||B!==1/0&&B!==-1/0&&!isNaN(B)?B:0)}static replaceUnsafeChars(A){if("string"!=typeof A){if(!Array.isArray(A))return e.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}})}}A.exports=g},function(A,B){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,B,t){const e=t(6),g=t(27);class i{constructor(A,B,t,g){switch(this.id=A||e(),this.name=B,this.type=t,this.isCloud=g,this.type){case i.SCALAR_TYPE:this.value=0;break;case i.LIST_TYPE:this.value=[];break;case i.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(A){return A=!0===A,'').concat(g(this.name),"")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}A.exports=i},function(A,B,t){ +!function(A){function B(B){for(var t,g,i=B[0],n=B[1],Q=0,r=[];Q{if("string"!=typeof A)return!1;for(let B=0;Be?1:0}return t===1/0&&e===1/0||t===-1/0&&e===-1/0?0:t-e}static isInt(A){return"number"==typeof A?!!isNaN(A)||A===Math.floor(A):"boolean"==typeof A||"string"==typeof A&&A.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(A,B,t){if("number"!=typeof A){if("all"===A)return t?i.LIST_ALL:i.LIST_INVALID;if("last"===A)return B>0?B:i.LIST_INVALID;if("random"===A||"any"===A)return B>0?1+Math.floor(Math.random()*B):i.LIST_INVALID}return(A=Math.floor(i.toNumber(A)))<1||A>B?i.LIST_INVALID:A}}A.exports=i},function(A,B){A.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter"}},function(A,B){A.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(A,B){A.exports=class{static degToRad(A){return A*Math.PI/180}static radToDeg(A){return 180*A/Math.PI}static clamp(A,B,t){return Math.min(Math.max(A,B),t)}static wrapClamp(A,B,t){const e=t-B+1;return A-Math.floor((A-B)/e)*e}static tan(A){switch(A%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*A/180))/1e10}}static reducedSortOrdering(A){const B=A.slice(0).sort((A,B)=>A-B);return A.map(A=>B.indexOf(A))}static inclusiveRandIntWithout(A,B,t){const e=B-A,g=A+Math.floor(Math.random()*e);return g>=t?g+1:g}static scale(A,B,t,e,g){return(A-B)/(t-B)*(g-e)+e}}},function(A,B,t){"use strict";var e=t(127),g=t(128),i=t(61),n=t(60),Q=t(59);function s(A,B){return Object.keys(B).forEach((function(t){A[t]=B[t]})),A}A.exports=function A(){var B=s({},Q),t="en",r={},c=function(A){return A},E=null,o="warning",w={};function C(A,B,i){var n="string"==typeof A?A:A.default,Q=h(n,"object"==typeof A&&A.id||c(n),i||t);return(Q.format||(Q.format=g(e(Q.message),i||t,w)))(B)}C.rich=function(A,B,i){var n="string"==typeof A?A:A.default,Q=h(n,"object"==typeof A&&A.id||c(n),i||t);return(Q.toParts||(Q.toParts=g.toParts(e(Q.message,{tagsType:a}),i||t,w)))(B)};var a="<>";function I(A,B){var t=A[2];return function(A,B){var e="object"==typeof t?function(A,B){return Object.keys(A).reduce((function(t,e){return t[e]=A[e](B),t}),{})}(t,B):t;return"function"==typeof A?A(e):A}}function h(A,B,t){var e=n(t,r)||"en",g=r[e]||(r[e]={}),i=g[B];if("string"==typeof i&&(i=g[B]={message:i}),!i){var Q='Translation for "'+B+'" in "'+e+'" is missing';if("warning"===o)"undefined"!=typeof console&&console.warn(Q);else if("ignore"!==o)throw new Error(Q);var s="function"==typeof E?E(A,B,e)||A:E||A;i=g[B]={message:s}}return i}function Y(A,B,e,g,Q){"object"==typeof e&&"object"!=typeof g&&(Q=g,g=e,e=0);var s=n(Q||t,i),r=s&&i[s][A]||M;return g["="+ +B]||g[r(B-e)]||g.other}function M(){return"other"}return w[a]=I,C.setup=function(A){return(A=A||{}).locale&&(t=A.locale),"translations"in A&&(r=A.translations||{}),A.generateId&&(c=A.generateId),"missingReplacement"in A&&(E=A.missingReplacement),A.missingTranslation&&(o=A.missingTranslation),A.formats&&(A.formats.number&&s(B.number,A.formats.number),A.formats.date&&s(B.date,A.formats.date),A.formats.time&&s(B.time,A.formats.time)),A.types&&((w=A.types)[a]=I),{locale:t,translations:r,generateId:c,missingReplacement:E,missingTranslation:o,formats:B,types:w}},C.number=function(A,e,g){var i=e&&B.number[e]||B.parseNumberPattern(e)||B.number.default;return new Intl.NumberFormat(g||t,i).format(A)},C.date=function(A,e,g){var i=e&&B.date[e]||B.parseDatePattern(e)||B.date.default;return new Intl.DateTimeFormat(g||t,i).format(A)},C.time=function(A,e,g){var i=e&&B.time[e]||B.parseDatePattern(e)||B.time.default;return new Intl.DateTimeFormat(g||t,i).format(A)},C.select=function(A,B){return B[A]||B.other},C.custom=function(A,B,t,e){return A[1]in w?w[A[1]](A,B)(t,e):t},C.plural=Y.bind(null,"cardinal"),C.selectordinal=Y.bind(null,"ordinal"),C.namespace=A,C}()},function(A,B){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,B=[];for(let e=0;e<20;e++)B[e]=t.charAt(Math.random()*A);return B.join("")}},function(A,B,t){const e=t(0);class g{static withoutTrailingDigits(A){let B=A.length-1;for(;B>=0&&"0123456789".indexOf(A.charAt(B))>-1;)B--;return A.slice(0,B+1)}static unusedName(A,B){if(B.indexOf(A)<0)return A;A=g.withoutTrailingDigits(A);let t=2;for(;B.indexOf(A+t)>=0;)t++;return A+t}static splitFirst(A,B){const t=A.indexOf(B);return t>=0?[A.substring(0,t),A.substring(t+1)]:[A,null]}static stringify(A){return JSON.stringify(A,(A,B)=>"number"!=typeof B||B!==1/0&&B!==-1/0&&!isNaN(B)?B:0)}static replaceUnsafeChars(A){if("string"!=typeof A){if(!Array.isArray(A))return e.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"lt";case">":return"gt";case"&":return"amp";case"'":return"apos";case'"':return"quot"}})}}A.exports=g},function(A,B){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,B,t){const e=t(6),g=t(28);class i{constructor(A,B,t,g){switch(this.id=A||e(),this.name=B,this.type=t,this.isCloud=g,this.type){case i.SCALAR_TYPE:this.value=0;break;case i.LIST_TYPE:this.value=[];break;case i.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(A){return A=!0===A,'').concat(g(this.name),"")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}A.exports=i},function(A,B,t){ /*! * @license twgl.js 4.4.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved. * Available via the MIT license. * see: http://github.com/greggman/twgl.js for details */ -var e;"undefined"!=typeof self&&self,e=function(){return function(A){var B={};function t(e){if(B[e])return B[e].exports;var g=B[e]={i:e,l:!1,exports:{}};return A[e].call(g.exports,g,g.exports,t),g.l=!0,g.exports}return t.m=A,t.c=B,t.d=function(A,B,e){t.o(A,B)||Object.defineProperty(A,B,{configurable:!1,enumerable:!0,get:e})},t.n=function(A){var B=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(B,"a",B),B},t.o=function(A,B){return Object.prototype.hasOwnProperty.call(A,B)},t.p="",t(t.s=9)}([function(A,B,t){"use strict";B.__esModule=!0,B.copyExistingProperties=function(A,B){Object.keys(B).forEach((function(t){B.hasOwnProperty(t)&&A.hasOwnProperty(t)&&(B[t]=A[t])}))},B.copyNamedProperties=function(A,B,t){A.forEach((function(A){var e=B[A];void 0!==e&&(t[A]=e)}))},B.isBuffer=function(A,B){return Q||(Q=A.createBuffer()),B instanceof Q.constructor},B.isRenderbuffer=function(A,B){return s||(s=A.createRenderbuffer()),B instanceof s.constructor},B.isShader=function(A,B){return n||(n=A.createShader(A.VERTEX_SHADER)),B instanceof n.constructor},B.isTexture=function(A,B){return r||(r=A.createTexture()),B instanceof r.constructor},B.isSampler=function(A,B){if(!c){if(!A.createSampler)return!1;c=A.createSampler()}return B instanceof c.constructor},B.warn=B.error=void 0;var e,g=(e=t(2))&&e.__esModule?e:{default:e},i=g.default.console&&g.default.console.error&&"function"==typeof g.default.console.error?g.default.console.error.bind(g.default.console):function(){};B.error=i;var Q,s,n,r,c,E=g.default.console&&g.default.console.warn&&"function"==typeof g.default.console.warn?g.default.console.warn.bind(g.default.console):function(){};B.warn=E},function(A,B,t){"use strict";B.__esModule=!0,B.getGLTypeForTypedArray=function(A){if(A instanceof Int8Array)return 5120;if(A instanceof Uint8Array)return 5121;if(A instanceof Uint8ClampedArray)return 5121;if(A instanceof Int16Array)return 5122;if(A instanceof Uint16Array)return 5123;if(A instanceof Int32Array)return 5124;if(A instanceof Uint32Array)return 5125;if(A instanceof Float32Array)return 5126;throw"unsupported typed array type"},B.getGLTypeForTypedArrayType=function(A){if(A===Int8Array)return 5120;if(A===Uint8Array)return 5121;if(A===Uint8ClampedArray)return 5121;if(A===Int16Array)return 5122;if(A===Uint16Array)return 5123;if(A===Int32Array)return 5124;if(A===Uint32Array)return 5125;if(A===Float32Array)return 5126;throw"unsupported typed array type"},B.getTypedArrayTypeForGLType=function(A){var B=i[A];if(!B)throw"unknown gl type";return B},B.isArrayBuffer=void 0;var e,g=(e=t(2))&&e.__esModule?e:{default:e},i={},Q=i;Q[5120]=Int8Array,Q[5121]=Uint8Array,Q[5122]=Int16Array,Q[5123]=Uint16Array,Q[5124]=Int32Array,Q[5125]=Uint32Array,Q[5126]=Float32Array,Q[32819]=Uint16Array,Q[32820]=Uint16Array,Q[33635]=Uint16Array,Q[5131]=Uint16Array,Q[33640]=Uint32Array,Q[35899]=Uint32Array,Q[35902]=Uint32Array,Q[36269]=Uint32Array,Q[34042]=Uint32Array;var s=g.default.SharedArrayBuffer?function(A){return A&&A.buffer&&(A.buffer instanceof ArrayBuffer||A.buffer instanceof g.default.SharedArrayBuffer)}:function(A){return A&&A.buffer&&A.buffer instanceof ArrayBuffer};B.isArrayBuffer=s},function(A,B,t){"use strict";B.__esModule=!0,B.default=void 0;var e=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};B.default=e},function(A,B,t){"use strict";B.__esModule=!0,B.add=function(A,B,t){return(t=t||new e(3))[0]=A[0]+B[0],t[1]=A[1]+B[1],t[2]=A[2]+B[2],t},B.copy=function(A,B){return(B=B||new e(3))[0]=A[0],B[1]=A[1],B[2]=A[2],B},B.create=function(A,B,t){var g=new e(3);return A&&(g[0]=A),B&&(g[1]=B),t&&(g[2]=t),g},B.cross=function(A,B,t){t=t||new e(3);var g=A[2]*B[0]-A[0]*B[2],i=A[0]*B[1]-A[1]*B[0];return t[0]=A[1]*B[2]-A[2]*B[1],t[1]=g,t[2]=i,t},B.distance=function(A,B){var t=A[0]-B[0],e=A[1]-B[1],g=A[2]-B[2];return Math.sqrt(t*t+e*e+g*g)},B.distanceSq=function(A,B){var t=A[0]-B[0],e=A[1]-B[1],g=A[2]-B[2];return t*t+e*e+g*g},B.divide=function(A,B,t){return(t=t||new e(3))[0]=A[0]/B[0],t[1]=A[1]/B[1],t[2]=A[2]/B[2],t},B.divScalar=function(A,B,t){return(t=t||new e(3))[0]=A[0]/B,t[1]=A[1]/B,t[2]=A[2]/B,t},B.dot=function(A,B){return A[0]*B[0]+A[1]*B[1]+A[2]*B[2]},B.lerp=function(A,B,t,g){return(g=g||new e(3))[0]=(1-t)*A[0]+t*B[0],g[1]=(1-t)*A[1]+t*B[1],g[2]=(1-t)*A[2]+t*B[2],g},B.length=function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])},B.lengthSq=function(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]},B.mulScalar=function(A,B,t){return(t=t||new e(3))[0]=A[0]*B,t[1]=A[1]*B,t[2]=A[2]*B,t},B.multiply=function(A,B,t){return(t=t||new e(3))[0]=A[0]*B[0],t[1]=A[1]*B[1],t[2]=A[2]*B[2],t},B.negate=function(A,B){return(B=B||new e(3))[0]=-A[0],B[1]=-A[1],B[2]=-A[2],B},B.normalize=function(A,B){B=B||new e(3);var t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],g=Math.sqrt(t);return g>1e-5?(B[0]=A[0]/g,B[1]=A[1]/g,B[2]=A[2]/g):(B[0]=0,B[1]=0,B[2]=0),B},B.setDefaultType=function(A){var B=e;return e=A,B},B.subtract=function(A,B,t){return(t=t||new e(3))[0]=A[0]-B[0],t[1]=A[1]-B[1],t[2]=A[2]-B[2],t};var e=Float32Array},function(A,B,t){"use strict";B.__esModule=!0,B.isWebGL1=function(A){return!A.texStorage2D},B.isWebGL2=function(A){return!!A.texStorage2D},B.glEnumToString=void 0;var e,g,i=(e={},g={},function(A,B){return function(A){var B=A.constructor.name;if(!e[B]){for(var t in A)if("number"==typeof A[t]){var i=g[A[t]];g[A[t]]=i?"".concat(i," | ").concat(t):t}e[B]=!0}}(A),g[B]||"0x"+B.toString(16)});B.glEnumToString=i},function(A,B,t){"use strict";B.__esModule=!0,B.createAttributeSetters=z,B.createProgram=H,B.createProgramFromScripts=function(A,B,t,e,g){for(var i=N(t,e,g),Q=[],s=0;s=0?(void 0).FRAGMENT_SHADER:A.indexOf("vert")>=0?(void 0).VERTEX_SHADER:void 0}function f(A,B){B.forEach((function(B){A.deleteShader(B)}))}function H(A,B,t,e,g){for(var Q=N(t,e,g),s=[],n=[],r=0;r1&&"[0]"===e.name.substr(-3),s=e.type,n=E[s];if(!n)throw"unknown type: 0x"+s.toString(16);if(n.bindPoint){var r=t;t+=e.size,g=Q?n.arraySetter(A,s,r,i,e.size):n.setter(A,s,r,i,e.size)}else g=n.arraySetter&&Q?n.arraySetter(A,i):n.setter(A,i);return g.location=i,g}for(var g={},i=A.getProgramParameter(B,A.ACTIVE_UNIFORMS),Q=0;Q0)throw"numComponents "+i+" not correct for length "+g;return Q}(B),t},B.createBufferFromArray=h,B.createBufferFromTypedArray=n,B.createBufferInfoFromArrays=function(A,B){var t={attribs:I(A,B)},g=B.indices;if(g){var i=a(g,"indices");t.indices=n(A,i,A.ELEMENT_ARRAY_BUFFER),t.numElements=i.length,t.elementType=e.getGLTypeForTypedArray(i)}else t.numElements=function(A,B){var t,e;for(e=0;e0)throw"Can not guess numComponents for attribute '"+A+"'. Tried "+t+" but "+B+" values is not evenly divisible by "+t+". You should specify it.";return t}function C(A,B){return A.numComponents||A.size||w(B,c(A).length)}function a(A,B){if(e.isArrayBuffer(A))return A;if(e.isArrayBuffer(A.data))return A.data;Array.isArray(A)&&(A={data:A});var t=A.type;return t||(t=r(B)?Uint16Array:Float32Array),new t(A.data)}function I(A,B){var t={};return Object.keys(B).forEach((function(g){if(!r(g)){var i,s,c,E,o,I=B[g],Y=I.attrib||I.name||I.attribName||Q.attribPrefix+g;if("number"==typeof I||"number"==typeof I.data){o=I.data||I;var h=I.type||Float32Array,M=o*h.BYTES_PER_ELEMENT;s=e.getGLTypeForTypedArrayType(h),c=void 0!==I.normalize?I.normalize:(D=h)===Int8Array||D===Uint8Array,E=I.numComponents||I.size||w(g,o),i=A.createBuffer(),A.bindBuffer(A.ARRAY_BUFFER,i),A.bufferData(A.ARRAY_BUFFER,M,I.drawType||A.STATIC_DRAW)}else{var F=a(I,g);i=n(A,F,void 0,I.drawType),s=e.getGLTypeForTypedArray(F),c=void 0!==I.normalize?I.normalize:function(A){return A instanceof Int8Array||A instanceof Uint8Array}(F),E=C(I,g),o=F.length}t[Y]={buffer:i,numComponents:E,type:s,normalize:c,stride:I.stride||0,offset:I.offset||0,divisor:void 0===I.divisor?void 0:I.divisor,drawType:I.drawType}}var D})),A.bindBuffer(A.ARRAY_BUFFER,null),t}var Y=["position","positions","a_position"];function h(A,B,t){var e="indices"===t?A.ELEMENT_ARRAY_BUFFER:A.ARRAY_BUFFER;return n(A,a(B,t),e)}},function(A,B,t){"use strict";B.__esModule=!0,B.setTextureDefaults_=function(A){Q.copyExistingProperties(A,r),A.textureColor&&l(A.textureColor)},B.createSampler=p,B.createSamplers=function(A,B){var t={};return Object.keys(B).forEach((function(e){t[e]=p(A,B[e])})),t},B.setSamplerParameters=R,B.createTexture=K,B.setEmptyTexture=V,B.setTextureFromArray=W,B.loadTextureFromUrl=L,B.setTextureFromElement=j,B.setTextureFilteringForSize=y,B.setTextureParameters=H,B.setDefaultTextureColor=l,B.createTextures=function(A,B,t){t=t||x;var e=0,g=[],i={},Q={};function s(){0===e&&setTimeout((function(){t(g.length?g:void 0,i,Q)}),0)}return Object.keys(B).forEach((function(t){var n,r,c=B[t];("string"==typeof(r=c.src)||Array.isArray(r)&&"string"==typeof r[0])&&(n=function(A,B,i){Q[t]=i,--e,A&&g.push(A),s()},++e),i[t]=K(A,c,n)})),s(),i},B.resizeTexture=function(A,B,t,e,g){e=e||t.width,g=g||t.height;var i=t.target||A.TEXTURE_2D;A.bindTexture(i,B);var Q,s=t.level||0,n=t.internalFormat||t.format||A.RGBA,r=M(n),E=t.format||r.format,o=t.src;if(Q=o&&(c(o)||Array.isArray(o)&&"number"==typeof o[0])?t.type||D(A,o,r.type):t.type||r.type,i===A.TEXTURE_CUBE_MAP)for(var w=0;w<6;++w)A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_X+w,s,n,e,g,0,E,Q,null);else A.texImage2D(i,s,n,e,g,0,E,Q,null)},B.getNumComponentsForFormat=function(A){var B=C[A];if(!B)throw"unknown format: "+A;return B.numColorComponents},B.getBytesPerElementForInternalFormat=h;var e,g=n(t(4)),i=n(t(1)),Q=n(t(0)),s=(e=t(2))&&e.__esModule?e:{default:e};function n(A){if(A&&A.__esModule)return A;var B={};if(null!=A)for(var t in A)if(Object.prototype.hasOwnProperty.call(A,t)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(A,t):{};e.get||e.set?Object.defineProperty(B,t,e):B[t]=A[t]}return B.default=A,B}var r={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},c=i.isArrayBuffer,E=s.default.document&&s.default.document.createElement?s.default.document.createElement("canvas").getContext("2d"):null,o=6407,w=33319,C={},a=C;a[6406]={numColorComponents:1},a[6409]={numColorComponents:1},a[6410]={numColorComponents:2},a[o]={numColorComponents:3},a[6408]={numColorComponents:4},a[6403]={numColorComponents:1},a[36244]={numColorComponents:1},a[w]={numColorComponents:2},a[33320]={numColorComponents:2},a[o]={numColorComponents:3},a[36248]={numColorComponents:3},a[6408]={numColorComponents:4},a[36249]={numColorComponents:4},a[6402]={numColorComponents:1},a[34041]={numColorComponents:2};var I={},Y=I;function h(A,B){var t=I[A];if(!t)throw"unknown internal format";var e=t.bytesPerElementMap[B];if(void 0===e)throw"unknown internal format";return e}function M(A){var B=I[A];if(!B)throw"unknown internal format";return{format:B.textureFormat,type:Array.isArray(B.type)?B.type[0]:B.type}}function F(A){return 0==(A&A-1)}function D(A,B,t){return c(B)?i.getGLTypeForTypedArray(B):t||A.UNSIGNED_BYTE}function u(A,B,t,e,g){if(g%1!=0)throw"can't guess dimensions";if(t||e){if(e){if(!t&&(t=g/e)%1)throw"can't guess dimensions"}else if((e=g/t)%1)throw"can't guess dimensions"}else{var i=Math.sqrt(g/(B===A.TEXTURE_CUBE_MAP?6:1));i%1==0?(t=i,e=i):(t=g,e=1)}return{width:t,height:e}}function l(A){r.textureColor=new Uint8Array([255*A[0],255*A[1],255*A[2],255*A[3]])}Y[6406]={textureFormat:6406,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},Y[6409]={textureFormat:6409,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},Y[6410]={textureFormat:6410,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[5121,5131,36193,5126]},Y[o]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[5121,5131,36193,5126,33635]},Y[6408]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[5121,5131,36193,5126,32819,32820]},Y[33321]={textureFormat:6403,colorRenderable:!0,textureFilterable:!0,bytesPerElement:1,type:5121},Y[36756]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:1,type:5120},Y[33325]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[5126,5131]},Y[33326]={textureFormat:6403,colorRenderable:!1,textureFilterable:!1,bytesPerElement:4,type:5126},Y[33330]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5121},Y[33329]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5120},Y[33332]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5123},Y[33331]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5122},Y[33334]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},Y[33333]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5124},Y[33323]={textureFormat:w,colorRenderable:!0,textureFilterable:!0,bytesPerElement:2,type:5121},Y[36757]={textureFormat:w,colorRenderable:!1,textureFilterable:!0,bytesPerElement:2,type:5120},Y[33327]={textureFormat:w,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[5126,5131]},Y[33328]={textureFormat:w,colorRenderable:!1,textureFilterable:!1,bytesPerElement:8,type:5126},Y[33336]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5121},Y[33335]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5120},Y[33338]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5123},Y[33337]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5122},Y[33340]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5125},Y[33339]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5124},Y[32849]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:3,type:5121},Y[35905]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5121},Y[36194]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[5121,33635]},Y[36758]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5120},Y[35898]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35899]},Y[35901]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35902]},Y[34843]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[5126,5131]},Y[34837]={textureFormat:o,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5126},Y[36221]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5121},Y[36239]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5120},Y[36215]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5123},Y[36233]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5122},Y[36209]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5125},Y[36227]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5124},Y[32856]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},Y[35907]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},Y[36759]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:4,type:5120},Y[32855]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[5121,32820,33640]},Y[32854]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[5121,32819]},Y[32857]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:33640},Y[34842]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[5126,5131]},Y[34836]={textureFormat:6408,colorRenderable:!1,textureFilterable:!1,bytesPerElement:16,type:5126},Y[36220]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5121},Y[36238]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5120},Y[36975]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:33640},Y[36214]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5123},Y[36232]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5122},Y[36226]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5124},Y[36208]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5125},Y[33189]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[5123,5125]},Y[33190]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},Y[36012]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5126},Y[35056]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:34042},Y[36013]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:36269},Object.keys(Y).forEach((function(A){var B=Y[A];if(B.bytesPerElementMap={},Array.isArray(B.bytesPerElement))B.bytesPerElement.forEach((function(A,t){var e=B.type[t];B.bytesPerElementMap[e]=A}));else{var t=B.type;B.bytesPerElementMap[t]=B.bytesPerElement}}));var d={};function U(A,B){void 0!==B.colorspaceConversion&&(d.colorspaceConversion=A.getParameter(A.UNPACK_COLORSPACE_CONVERSION_WEBGL),A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,B.colorspaceConversion)),void 0!==B.premultiplyAlpha&&(d.premultiplyAlpha=A.getParameter(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha)),void 0!==B.flipY&&(d.flipY=A.getParameter(A.UNPACK_FLIP_Y_WEBGL),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,B.flipY))}function N(A,B){void 0!==B.colorspaceConversion&&A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,d.colorspaceConversion),void 0!==B.premultiplyAlpha&&A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d.premultiplyAlpha),void 0!==B.flipY&&A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,d.flipY)}function m(A){d.unpackAlignment=A.getParameter(A.UNPACK_ALIGNMENT),g.isWebGL2(A)&&(d.unpackRowLength=A.getParameter(A.UNPACK_ROW_LENGTH),d.unpackImageHeight=A.getParameter(A.UNPACK_IMAGE_HEIGHT),d.unpackSkipPixels=A.getParameter(A.UNPACK_SKIP_PIXELS),d.unpackSkipRows=A.getParameter(A.UNPACK_SKIP_ROWS),d.unpackSkipImages=A.getParameter(A.UNPACK_SKIP_IMAGES))}function G(A){A.pixelStorei(A.UNPACK_ALIGNMENT,d.unpackAlignment),g.isWebGL2(A)&&(A.pixelStorei(A.UNPACK_ROW_LENGTH,d.unpackRowLength),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,d.unpackImageHeight),A.pixelStorei(A.UNPACK_SKIP_PIXELS,d.unpackSkipPixels),A.pixelStorei(A.UNPACK_SKIP_ROWS,d.unpackSkipRows),A.pixelStorei(A.UNPACK_SKIP_IMAGES,d.unpackSkipImages))}function f(A,B,t,e){e.minMag&&(t.call(A,B,A.TEXTURE_MIN_FILTER,e.minMag),t.call(A,B,A.TEXTURE_MAG_FILTER,e.minMag)),e.min&&t.call(A,B,A.TEXTURE_MIN_FILTER,e.min),e.mag&&t.call(A,B,A.TEXTURE_MAG_FILTER,e.mag),e.wrap&&(t.call(A,B,A.TEXTURE_WRAP_S,e.wrap),t.call(A,B,A.TEXTURE_WRAP_T,e.wrap),(B===A.TEXTURE_3D||Q.isSampler(A,B))&&t.call(A,B,A.TEXTURE_WRAP_R,e.wrap)),e.wrapR&&t.call(A,B,A.TEXTURE_WRAP_R,e.wrapR),e.wrapS&&t.call(A,B,A.TEXTURE_WRAP_S,e.wrapS),e.wrapT&&t.call(A,B,A.TEXTURE_WRAP_T,e.wrapT),e.minLod&&t.call(A,B,A.TEXTURE_MIN_LOD,e.minLod),e.maxLod&&t.call(A,B,A.TEXTURE_MAX_LOD,e.maxLod),e.baseLevel&&t.call(A,B,A.TEXTURE_BASE_LEVEL,e.baseLevel),e.maxLevel&&t.call(A,B,A.TEXTURE_MAX_LEVEL,e.maxLevel)}function H(A,B,t){var e=t.target||A.TEXTURE_2D;A.bindTexture(e,B),f(A,e,A.texParameteri,t)}function R(A,B,t){f(A,B,A.samplerParameteri,t)}function p(A,B){var t=A.createSampler();return R(A,t,B),t}function y(A,B,t,e,i,Q,s){t=t||r.textureOptions,Q=Q||A.RGBA,s=s||A.UNSIGNED_BYTE;var n=t.target||A.TEXTURE_2D;if(e=e||t.width,i=i||t.height,A.bindTexture(n,B),function(A,B,t,e){if(!g.isWebGL2(A))return F(B)&&F(t);var i=I[e];if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}(A,e,i,Q))A.generateMipmap(n);else{var c=function(A){var B=I[A];if(!B)throw"unknown internal format";return B.textureFilterable}(Q)?A.LINEAR:A.NEAREST;A.texParameteri(n,A.TEXTURE_MIN_FILTER,c),A.texParameteri(n,A.TEXTURE_MAG_FILTER,c),A.texParameteri(n,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(n,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE)}}function J(A){return!0===A.auto||void 0===A.auto&&void 0===A.level}function k(A,B){return(B=B||{}).cubeFaceOrder||[A.TEXTURE_CUBE_MAP_POSITIVE_X,A.TEXTURE_CUBE_MAP_NEGATIVE_X,A.TEXTURE_CUBE_MAP_POSITIVE_Y,A.TEXTURE_CUBE_MAP_NEGATIVE_Y,A.TEXTURE_CUBE_MAP_POSITIVE_Z,A.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function T(A,B){var t=k(A,B).map((function(A,B){return{face:A,ndx:B}}));return t.sort((function(A,B){return A.face-B.face})),t}function j(A,B,t,e){var g=(e=e||r.textureOptions).target||A.TEXTURE_2D,i=e.level||0,Q=t.width,n=t.height,c=e.internalFormat||e.format||A.RGBA,o=M(c),w=e.format||o.format,C=e.type||o.type;if(U(A,e),A.bindTexture(g,B),g===A.TEXTURE_CUBE_MAP){var a,I,Y=t.width,h=t.height;if(Y/6===h)a=h,I=[0,0,1,0,2,0,3,0,4,0,5,0];else if(h/6===Y)a=Y,I=[0,0,0,1,0,2,0,3,0,4,0,5];else if(Y/3==h/2)a=Y/3,I=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(Y/2!=h/3)throw"can't figure out cube map from element: "+(t.src?t.src:t.nodeName);a=Y/2,I=[0,0,1,0,0,1,1,1,0,2,1,2]}E?(E.canvas.width=a,E.canvas.height=a,Q=a,n=a,T(A,e).forEach((function(B){var e=I[2*B.ndx+0]*a,g=I[2*B.ndx+1]*a;E.drawImage(t,e,g,a,a,0,0,a,a),A.texImage2D(B.face,i,c,w,C,E.canvas)})),E.canvas.width=1,E.canvas.height=1):s.default.createImageBitmap&&(Q=a,n=a,T(A,e).forEach((function(r){var E=I[2*r.ndx+0]*a,o=I[2*r.ndx+1]*a;A.texImage2D(r.face,i,c,a,a,0,w,C,null),s.default.createImageBitmap(t,E,o,a,a,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(t){U(A,e),A.bindTexture(g,B),A.texImage2D(r.face,i,c,w,C,t),N(A,e),J(e)&&y(A,B,e,Q,n,c,C)}))})))}else if(g===A.TEXTURE_3D||g===A.TEXTURE_2D_ARRAY){var F=Math.min(t.width,t.height),D=Math.max(t.width,t.height),u=D/F;if(u%1!=0)throw"can not compute 3D dimensions of element";var l=t.width===D?1:0,d=t.height===D?1:0;m(A),A.pixelStorei(A.UNPACK_ALIGNMENT,1),A.pixelStorei(A.UNPACK_ROW_LENGTH,t.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,0),A.pixelStorei(A.UNPACK_SKIP_IMAGES,0),A.texImage3D(g,i,c,F,F,F,0,w,C,null);for(var f=0;f=0?h(e,B):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?I(e,B):t.indexOf("norm")>=0&&Y(e,B)})),A}function F(A,B,t){return A=A||2,{position:{numComponents:2,data:[(B=B||0)+-1*(A*=.5),(t=t||0)+-1*A,B+1*A,t+-1*A,B+-1*A,t+1*A,B+1*A,t+1*A]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function D(A,B,t,e,g){A=A||1,B=B||1,t=t||1,e=e||1,g=g||Q.identity();for(var i=(t+1)*(e+1),s=o(3,i),n=o(3,i),r=o(2,i),c=0;c<=e;c++)for(var E=0;E<=t;E++){var w=E/t,C=c/e;s.push(A*w-.5*A,0,B*C-.5*B),n.push(0,1,0),r.push(w,C)}for(var a=t+1,I=o(3,t*e*2,Uint16Array),Y=0;Y 0");e=e||0,i=i||0;for(var s=(g=g||Math.PI)-e,n=(Q=Q||2*Math.PI)-i,r=(B+1)*(t+1),c=o(3,r),E=o(3,r),w=o(2,r),C=0;C<=t;C++)for(var a=0;a<=B;a++){var I=a/B,Y=C/t,h=n*I,M=s*Y,F=Math.sin(h),D=Math.cos(h),u=Math.sin(M),l=D*u,d=Math.cos(M),U=F*u;c.push(A*l,A*d,A*U),E.push(l,d,U),w.push(1-I,Y)}for(var N=B+1,m=o(3,B*t*2,Uint16Array),G=0;Gg?(l=t,u=1,d=B):d=A+D/g*(B-A),-2!==D&&D!==g+2||(d=0,u=0),l-=t/2;for(var U=0;Ug?0:N*h,D<0?-1:D>g?1:M,D<0||D>g?0:m*h),C.push(U/e,1-u)}}for(var G=0;G 0");var n=(Q=Q||1)-(i=i||0),r=2*(g+1)*4,c=o(3,r),E=o(3,r),w=o(2,r);function C(A,B,t){return A+(B-A)*t}function a(B,t,Q,r,o,a){for(var I=0;I<=g;I++){var Y=t/1,h=I/g,M=2*(Y-.5),F=(i+h*n)*Math.PI,D=Math.sin(F),u=Math.cos(F),l=C(A,B,D),d=M*e,U=u*A,N=D*l;c.push(d,U,N);var m=s.add(s.multiply([0,D,u],Q),r);E.push(m),w.push(Y*o+a,h)}}for(var I=0;I<2;I++){var Y=2*(I/1-.5);a(B,I,[1,1,1],[0,0,0],1,0),a(B,I,[0,0,0],[Y,0,0],0,0),a(t,I,[1,1,1],[0,0,0],1,0),a(t,I,[0,0,0],[Y,0,0],0,1)}var h=o(3,2*g*4,Uint16Array);function M(A,B){for(var t=0;t0&&I!==B){var F=c+(I+1),D=c+I,u=c+I-w,l=c+(I+1)-w;r.push(F,D,u),r.push(F,u,l)}}c+=B+1}return{position:Q,normal:s,texcoord:n,indices:r}}function p(A){return function(B){var t=A.apply(this,Array.prototype.slice.call(arguments,1));return e.createBuffersFromArrays(B,t)}}function y(A){return function(B){var t=A.apply(null,Array.prototype.slice.call(arguments,1));return e.createBufferInfoFromArrays(B,t)}}var J=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function k(A,B,t,e){e=e||0;for(var g=A.length,i=0;i1e-5?(B[0]=A[0]/g,B[1]=A[1]/g,B[2]=A[2]/g):(B[0]=0,B[1]=0,B[2]=0),B},B.setDefaultType=function(A){var B=e;return e=A,B},B.subtract=function(A,B,t){return(t=t||new e(3))[0]=A[0]-B[0],t[1]=A[1]-B[1],t[2]=A[2]-B[2],t};var e=Float32Array},function(A,B,t){"use strict";B.__esModule=!0,B.isWebGL1=function(A){return!A.texStorage2D},B.isWebGL2=function(A){return!!A.texStorage2D},B.glEnumToString=void 0;var e,g,i=(e={},g={},function(A,B){return function(A){var B=A.constructor.name;if(!e[B]){for(var t in A)if("number"==typeof A[t]){var i=g[A[t]];g[A[t]]=i?"".concat(i," | ").concat(t):t}e[B]=!0}}(A),g[B]||"0x"+B.toString(16)});B.glEnumToString=i},function(A,B,t){"use strict";B.__esModule=!0,B.createAttributeSetters=z,B.createProgram=H,B.createProgramFromScripts=function(A,B,t,e,g){for(var i=N(t,e,g),n=[],Q=0;Q=0?(void 0).FRAGMENT_SHADER:A.indexOf("vert")>=0?(void 0).VERTEX_SHADER:void 0}function f(A,B){B.forEach((function(B){A.deleteShader(B)}))}function H(A,B,t,e,g){for(var n=N(t,e,g),Q=[],s=[],r=0;r1&&"[0]"===e.name.substr(-3),Q=e.type,s=E[Q];if(!s)throw"unknown type: 0x"+Q.toString(16);if(s.bindPoint){var r=t;t+=e.size,g=n?s.arraySetter(A,Q,r,i,e.size):s.setter(A,Q,r,i,e.size)}else g=s.arraySetter&&n?s.arraySetter(A,i):s.setter(A,i);return g.location=i,g}for(var g={},i=A.getProgramParameter(B,A.ACTIVE_UNIFORMS),n=0;n0)throw"numComponents "+i+" not correct for length "+g;return n}(B),t},B.createBufferFromArray=Y,B.createBufferFromTypedArray=s,B.createBufferInfoFromArrays=function(A,B){var t={attribs:I(A,B)},g=B.indices;if(g){var i=a(g,"indices");t.indices=s(A,i,A.ELEMENT_ARRAY_BUFFER),t.numElements=i.length,t.elementType=e.getGLTypeForTypedArray(i)}else t.numElements=function(A,B){var t,e;for(e=0;e0)throw"Can not guess numComponents for attribute '"+A+"'. Tried "+t+" but "+B+" values is not evenly divisible by "+t+". You should specify it.";return t}function C(A,B){return A.numComponents||A.size||w(B,c(A).length)}function a(A,B){if(e.isArrayBuffer(A))return A;if(e.isArrayBuffer(A.data))return A.data;Array.isArray(A)&&(A={data:A});var t=A.type;return t||(t=r(B)?Uint16Array:Float32Array),new t(A.data)}function I(A,B){var t={};return Object.keys(B).forEach((function(g){if(!r(g)){var i,Q,c,E,o,I=B[g],h=I.attrib||I.name||I.attribName||n.attribPrefix+g;if("number"==typeof I||"number"==typeof I.data){o=I.data||I;var Y=I.type||Float32Array,M=o*Y.BYTES_PER_ELEMENT;Q=e.getGLTypeForTypedArrayType(Y),c=void 0!==I.normalize?I.normalize:(D=Y)===Int8Array||D===Uint8Array,E=I.numComponents||I.size||w(g,o),i=A.createBuffer(),A.bindBuffer(A.ARRAY_BUFFER,i),A.bufferData(A.ARRAY_BUFFER,M,I.drawType||A.STATIC_DRAW)}else{var F=a(I,g);i=s(A,F,void 0,I.drawType),Q=e.getGLTypeForTypedArray(F),c=void 0!==I.normalize?I.normalize:function(A){return A instanceof Int8Array||A instanceof Uint8Array}(F),E=C(I,g),o=F.length}t[h]={buffer:i,numComponents:E,type:Q,normalize:c,stride:I.stride||0,offset:I.offset||0,divisor:void 0===I.divisor?void 0:I.divisor,drawType:I.drawType}}var D})),A.bindBuffer(A.ARRAY_BUFFER,null),t}var h=["position","positions","a_position"];function Y(A,B,t){var e="indices"===t?A.ELEMENT_ARRAY_BUFFER:A.ARRAY_BUFFER;return s(A,a(B,t),e)}},function(A,B,t){"use strict";B.__esModule=!0,B.setTextureDefaults_=function(A){n.copyExistingProperties(A,r),A.textureColor&&l(A.textureColor)},B.createSampler=R,B.createSamplers=function(A,B){var t={};return Object.keys(B).forEach((function(e){t[e]=R(A,B[e])})),t},B.setSamplerParameters=p,B.createTexture=K,B.setEmptyTexture=V,B.setTextureFromArray=W,B.loadTextureFromUrl=L,B.setTextureFromElement=j,B.setTextureFilteringForSize=y,B.setTextureParameters=H,B.setDefaultTextureColor=l,B.createTextures=function(A,B,t){t=t||x;var e=0,g=[],i={},n={};function Q(){0===e&&setTimeout((function(){t(g.length?g:void 0,i,n)}),0)}return Object.keys(B).forEach((function(t){var s,r,c=B[t];("string"==typeof(r=c.src)||Array.isArray(r)&&"string"==typeof r[0])&&(s=function(A,B,i){n[t]=i,--e,A&&g.push(A),Q()},++e),i[t]=K(A,c,s)})),Q(),i},B.resizeTexture=function(A,B,t,e,g){e=e||t.width,g=g||t.height;var i=t.target||A.TEXTURE_2D;A.bindTexture(i,B);var n,Q=t.level||0,s=t.internalFormat||t.format||A.RGBA,r=M(s),E=t.format||r.format,o=t.src;if(n=o&&(c(o)||Array.isArray(o)&&"number"==typeof o[0])?t.type||D(A,o,r.type):t.type||r.type,i===A.TEXTURE_CUBE_MAP)for(var w=0;w<6;++w)A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_X+w,Q,s,e,g,0,E,n,null);else A.texImage2D(i,Q,s,e,g,0,E,n,null)},B.getNumComponentsForFormat=function(A){var B=C[A];if(!B)throw"unknown format: "+A;return B.numColorComponents},B.getBytesPerElementForInternalFormat=Y;var e,g=s(t(4)),i=s(t(1)),n=s(t(0)),Q=(e=t(2))&&e.__esModule?e:{default:e};function s(A){if(A&&A.__esModule)return A;var B={};if(null!=A)for(var t in A)if(Object.prototype.hasOwnProperty.call(A,t)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(A,t):{};e.get||e.set?Object.defineProperty(B,t,e):B[t]=A[t]}return B.default=A,B}var r={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},c=i.isArrayBuffer,E=Q.default.document&&Q.default.document.createElement?Q.default.document.createElement("canvas").getContext("2d"):null,o=6407,w=33319,C={},a=C;a[6406]={numColorComponents:1},a[6409]={numColorComponents:1},a[6410]={numColorComponents:2},a[o]={numColorComponents:3},a[6408]={numColorComponents:4},a[6403]={numColorComponents:1},a[36244]={numColorComponents:1},a[w]={numColorComponents:2},a[33320]={numColorComponents:2},a[o]={numColorComponents:3},a[36248]={numColorComponents:3},a[6408]={numColorComponents:4},a[36249]={numColorComponents:4},a[6402]={numColorComponents:1},a[34041]={numColorComponents:2};var I={},h=I;function Y(A,B){var t=I[A];if(!t)throw"unknown internal format";var e=t.bytesPerElementMap[B];if(void 0===e)throw"unknown internal format";return e}function M(A){var B=I[A];if(!B)throw"unknown internal format";return{format:B.textureFormat,type:Array.isArray(B.type)?B.type[0]:B.type}}function F(A){return 0==(A&A-1)}function D(A,B,t){return c(B)?i.getGLTypeForTypedArray(B):t||A.UNSIGNED_BYTE}function u(A,B,t,e,g){if(g%1!=0)throw"can't guess dimensions";if(t||e){if(e){if(!t&&(t=g/e)%1)throw"can't guess dimensions"}else if((e=g/t)%1)throw"can't guess dimensions"}else{var i=Math.sqrt(g/(B===A.TEXTURE_CUBE_MAP?6:1));i%1==0?(t=i,e=i):(t=g,e=1)}return{width:t,height:e}}function l(A){r.textureColor=new Uint8Array([255*A[0],255*A[1],255*A[2],255*A[3]])}h[6406]={textureFormat:6406,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},h[6409]={textureFormat:6409,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},h[6410]={textureFormat:6410,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[5121,5131,36193,5126]},h[o]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[5121,5131,36193,5126,33635]},h[6408]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[5121,5131,36193,5126,32819,32820]},h[33321]={textureFormat:6403,colorRenderable:!0,textureFilterable:!0,bytesPerElement:1,type:5121},h[36756]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:1,type:5120},h[33325]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[5126,5131]},h[33326]={textureFormat:6403,colorRenderable:!1,textureFilterable:!1,bytesPerElement:4,type:5126},h[33330]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5121},h[33329]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:1,type:5120},h[33332]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5123},h[33331]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5122},h[33334]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},h[33333]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5124},h[33323]={textureFormat:w,colorRenderable:!0,textureFilterable:!0,bytesPerElement:2,type:5121},h[36757]={textureFormat:w,colorRenderable:!1,textureFilterable:!0,bytesPerElement:2,type:5120},h[33327]={textureFormat:w,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[5126,5131]},h[33328]={textureFormat:w,colorRenderable:!1,textureFilterable:!1,bytesPerElement:8,type:5126},h[33336]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5121},h[33335]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:2,type:5120},h[33338]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5123},h[33337]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5122},h[33340]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5125},h[33339]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5124},h[32849]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:3,type:5121},h[35905]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5121},h[36194]={textureFormat:o,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[5121,33635]},h[36758]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:3,type:5120},h[35898]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35899]},h[35901]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35902]},h[34843]={textureFormat:o,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[5126,5131]},h[34837]={textureFormat:o,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5126},h[36221]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5121},h[36239]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:3,type:5120},h[36215]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5123},h[36233]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:6,type:5122},h[36209]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5125},h[36227]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:12,type:5124},h[32856]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},h[35907]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:5121},h[36759]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:4,type:5120},h[32855]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[5121,32820,33640]},h[32854]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[5121,32819]},h[32857]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:4,type:33640},h[34842]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[5126,5131]},h[34836]={textureFormat:6408,colorRenderable:!1,textureFilterable:!1,bytesPerElement:16,type:5126},h[36220]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5121},h[36238]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5120},h[36975]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:33640},h[36214]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5123},h[36232]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:8,type:5122},h[36226]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5124},h[36208]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:16,type:5125},h[33189]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[5123,5125]},h[33190]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5125},h[36012]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:5126},h[35056]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:34042},h[36013]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:4,type:36269},Object.keys(h).forEach((function(A){var B=h[A];if(B.bytesPerElementMap={},Array.isArray(B.bytesPerElement))B.bytesPerElement.forEach((function(A,t){var e=B.type[t];B.bytesPerElementMap[e]=A}));else{var t=B.type;B.bytesPerElementMap[t]=B.bytesPerElement}}));var d={};function U(A,B){void 0!==B.colorspaceConversion&&(d.colorspaceConversion=A.getParameter(A.UNPACK_COLORSPACE_CONVERSION_WEBGL),A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,B.colorspaceConversion)),void 0!==B.premultiplyAlpha&&(d.premultiplyAlpha=A.getParameter(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha)),void 0!==B.flipY&&(d.flipY=A.getParameter(A.UNPACK_FLIP_Y_WEBGL),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,B.flipY))}function N(A,B){void 0!==B.colorspaceConversion&&A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,d.colorspaceConversion),void 0!==B.premultiplyAlpha&&A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d.premultiplyAlpha),void 0!==B.flipY&&A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,d.flipY)}function m(A){d.unpackAlignment=A.getParameter(A.UNPACK_ALIGNMENT),g.isWebGL2(A)&&(d.unpackRowLength=A.getParameter(A.UNPACK_ROW_LENGTH),d.unpackImageHeight=A.getParameter(A.UNPACK_IMAGE_HEIGHT),d.unpackSkipPixels=A.getParameter(A.UNPACK_SKIP_PIXELS),d.unpackSkipRows=A.getParameter(A.UNPACK_SKIP_ROWS),d.unpackSkipImages=A.getParameter(A.UNPACK_SKIP_IMAGES))}function G(A){A.pixelStorei(A.UNPACK_ALIGNMENT,d.unpackAlignment),g.isWebGL2(A)&&(A.pixelStorei(A.UNPACK_ROW_LENGTH,d.unpackRowLength),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,d.unpackImageHeight),A.pixelStorei(A.UNPACK_SKIP_PIXELS,d.unpackSkipPixels),A.pixelStorei(A.UNPACK_SKIP_ROWS,d.unpackSkipRows),A.pixelStorei(A.UNPACK_SKIP_IMAGES,d.unpackSkipImages))}function f(A,B,t,e){e.minMag&&(t.call(A,B,A.TEXTURE_MIN_FILTER,e.minMag),t.call(A,B,A.TEXTURE_MAG_FILTER,e.minMag)),e.min&&t.call(A,B,A.TEXTURE_MIN_FILTER,e.min),e.mag&&t.call(A,B,A.TEXTURE_MAG_FILTER,e.mag),e.wrap&&(t.call(A,B,A.TEXTURE_WRAP_S,e.wrap),t.call(A,B,A.TEXTURE_WRAP_T,e.wrap),(B===A.TEXTURE_3D||n.isSampler(A,B))&&t.call(A,B,A.TEXTURE_WRAP_R,e.wrap)),e.wrapR&&t.call(A,B,A.TEXTURE_WRAP_R,e.wrapR),e.wrapS&&t.call(A,B,A.TEXTURE_WRAP_S,e.wrapS),e.wrapT&&t.call(A,B,A.TEXTURE_WRAP_T,e.wrapT),e.minLod&&t.call(A,B,A.TEXTURE_MIN_LOD,e.minLod),e.maxLod&&t.call(A,B,A.TEXTURE_MAX_LOD,e.maxLod),e.baseLevel&&t.call(A,B,A.TEXTURE_BASE_LEVEL,e.baseLevel),e.maxLevel&&t.call(A,B,A.TEXTURE_MAX_LEVEL,e.maxLevel)}function H(A,B,t){var e=t.target||A.TEXTURE_2D;A.bindTexture(e,B),f(A,e,A.texParameteri,t)}function p(A,B,t){f(A,B,A.samplerParameteri,t)}function R(A,B){var t=A.createSampler();return p(A,t,B),t}function y(A,B,t,e,i,n,Q){t=t||r.textureOptions,n=n||A.RGBA,Q=Q||A.UNSIGNED_BYTE;var s=t.target||A.TEXTURE_2D;if(e=e||t.width,i=i||t.height,A.bindTexture(s,B),function(A,B,t,e){if(!g.isWebGL2(A))return F(B)&&F(t);var i=I[e];if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}(A,e,i,n))A.generateMipmap(s);else{var c=function(A){var B=I[A];if(!B)throw"unknown internal format";return B.textureFilterable}(n)?A.LINEAR:A.NEAREST;A.texParameteri(s,A.TEXTURE_MIN_FILTER,c),A.texParameteri(s,A.TEXTURE_MAG_FILTER,c),A.texParameteri(s,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(s,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE)}}function J(A){return!0===A.auto||void 0===A.auto&&void 0===A.level}function k(A,B){return(B=B||{}).cubeFaceOrder||[A.TEXTURE_CUBE_MAP_POSITIVE_X,A.TEXTURE_CUBE_MAP_NEGATIVE_X,A.TEXTURE_CUBE_MAP_POSITIVE_Y,A.TEXTURE_CUBE_MAP_NEGATIVE_Y,A.TEXTURE_CUBE_MAP_POSITIVE_Z,A.TEXTURE_CUBE_MAP_NEGATIVE_Z]}function T(A,B){var t=k(A,B).map((function(A,B){return{face:A,ndx:B}}));return t.sort((function(A,B){return A.face-B.face})),t}function j(A,B,t,e){var g=(e=e||r.textureOptions).target||A.TEXTURE_2D,i=e.level||0,n=t.width,s=t.height,c=e.internalFormat||e.format||A.RGBA,o=M(c),w=e.format||o.format,C=e.type||o.type;if(U(A,e),A.bindTexture(g,B),g===A.TEXTURE_CUBE_MAP){var a,I,h=t.width,Y=t.height;if(h/6===Y)a=Y,I=[0,0,1,0,2,0,3,0,4,0,5,0];else if(Y/6===h)a=h,I=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3==Y/2)a=h/3,I=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(h/2!=Y/3)throw"can't figure out cube map from element: "+(t.src?t.src:t.nodeName);a=h/2,I=[0,0,1,0,0,1,1,1,0,2,1,2]}E?(E.canvas.width=a,E.canvas.height=a,n=a,s=a,T(A,e).forEach((function(B){var e=I[2*B.ndx+0]*a,g=I[2*B.ndx+1]*a;E.drawImage(t,e,g,a,a,0,0,a,a),A.texImage2D(B.face,i,c,w,C,E.canvas)})),E.canvas.width=1,E.canvas.height=1):Q.default.createImageBitmap&&(n=a,s=a,T(A,e).forEach((function(r){var E=I[2*r.ndx+0]*a,o=I[2*r.ndx+1]*a;A.texImage2D(r.face,i,c,a,a,0,w,C,null),Q.default.createImageBitmap(t,E,o,a,a,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(t){U(A,e),A.bindTexture(g,B),A.texImage2D(r.face,i,c,w,C,t),N(A,e),J(e)&&y(A,B,e,n,s,c,C)}))})))}else if(g===A.TEXTURE_3D||g===A.TEXTURE_2D_ARRAY){var F=Math.min(t.width,t.height),D=Math.max(t.width,t.height),u=D/F;if(u%1!=0)throw"can not compute 3D dimensions of element";var l=t.width===D?1:0,d=t.height===D?1:0;m(A),A.pixelStorei(A.UNPACK_ALIGNMENT,1),A.pixelStorei(A.UNPACK_ROW_LENGTH,t.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,0),A.pixelStorei(A.UNPACK_SKIP_IMAGES,0),A.texImage3D(g,i,c,F,F,F,0,w,C,null);for(var f=0;f=0?Y(e,B):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?I(e,B):t.indexOf("norm")>=0&&h(e,B)})),A}function F(A,B,t){return A=A||2,{position:{numComponents:2,data:[(B=B||0)+-1*(A*=.5),(t=t||0)+-1*A,B+1*A,t+-1*A,B+-1*A,t+1*A,B+1*A,t+1*A]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function D(A,B,t,e,g){A=A||1,B=B||1,t=t||1,e=e||1,g=g||n.identity();for(var i=(t+1)*(e+1),Q=o(3,i),s=o(3,i),r=o(2,i),c=0;c<=e;c++)for(var E=0;E<=t;E++){var w=E/t,C=c/e;Q.push(A*w-.5*A,0,B*C-.5*B),s.push(0,1,0),r.push(w,C)}for(var a=t+1,I=o(3,t*e*2,Uint16Array),h=0;h 0");e=e||0,i=i||0;for(var Q=(g=g||Math.PI)-e,s=(n=n||2*Math.PI)-i,r=(B+1)*(t+1),c=o(3,r),E=o(3,r),w=o(2,r),C=0;C<=t;C++)for(var a=0;a<=B;a++){var I=a/B,h=C/t,Y=s*I,M=Q*h,F=Math.sin(Y),D=Math.cos(Y),u=Math.sin(M),l=D*u,d=Math.cos(M),U=F*u;c.push(A*l,A*d,A*U),E.push(l,d,U),w.push(1-I,h)}for(var N=B+1,m=o(3,B*t*2,Uint16Array),G=0;Gg?(l=t,u=1,d=B):d=A+D/g*(B-A),-2!==D&&D!==g+2||(d=0,u=0),l-=t/2;for(var U=0;Ug?0:N*Y,D<0?-1:D>g?1:M,D<0||D>g?0:m*Y),C.push(U/e,1-u)}}for(var G=0;G 0");var s=(n=n||1)-(i=i||0),r=2*(g+1)*4,c=o(3,r),E=o(3,r),w=o(2,r);function C(A,B,t){return A+(B-A)*t}function a(B,t,n,r,o,a){for(var I=0;I<=g;I++){var h=t/1,Y=I/g,M=2*(h-.5),F=(i+Y*s)*Math.PI,D=Math.sin(F),u=Math.cos(F),l=C(A,B,D),d=M*e,U=u*A,N=D*l;c.push(d,U,N);var m=Q.add(Q.multiply([0,D,u],n),r);E.push(m),w.push(h*o+a,Y)}}for(var I=0;I<2;I++){var h=2*(I/1-.5);a(B,I,[1,1,1],[0,0,0],1,0),a(B,I,[0,0,0],[h,0,0],0,0),a(t,I,[1,1,1],[0,0,0],1,0),a(t,I,[0,0,0],[h,0,0],0,1)}var Y=o(3,2*g*4,Uint16Array);function M(A,B){for(var t=0;t0&&I!==B){var F=c+(I+1),D=c+I,u=c+I-w,l=c+(I+1)-w;r.push(F,D,u),r.push(F,u,l)}}c+=B+1}return{position:n,normal:Q,texcoord:s,indices:r}}function R(A){return function(B){var t=A.apply(this,Array.prototype.slice.call(arguments,1));return e.createBuffersFromArrays(B,t)}}function y(A){return function(B){var t=A.apply(null,Array.prototype.slice.call(arguments,1));return e.createBufferInfoFromArrays(B,t)}}var J=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function k(A,B,t,e){e=e||0;for(var g=A.length,i=0;i * @license MIT */ -var e=t(110),g=t(111),i=t(112);function Q(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(A,B){if(Q()=Q())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q().toString(16)+" bytes");return 0|A}function C(A,B){if(n.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var e=!1;;)switch(B){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return b(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(e)return b(A).length;B=(""+B).toLowerCase(),e=!0}}function a(A,B,t){var e=!1;if((void 0===B||B<0)&&(B=0),B>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(B>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return f(this,B,t);case"utf8":case"utf-8":return N(this,B,t);case"ascii":return m(this,B,t);case"latin1":case"binary":return G(this,B,t);case"base64":return U(this,B,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,B,t);default:if(e)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),e=!0}}function I(A,B,t){var e=A[B];A[B]=A[t],A[t]=e}function Y(A,B,t,e,g){if(0===A.length)return-1;if("string"==typeof t?(e=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=g?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(g)return-1;t=A.length-1}else if(t<0){if(!g)return-1;t=0}if("string"==typeof B&&(B=n.from(B,e)),n.isBuffer(B))return 0===B.length?-1:h(A,B,t,e,g);if("number"==typeof B)return B&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?g?Uint8Array.prototype.indexOf.call(A,B,t):Uint8Array.prototype.lastIndexOf.call(A,B,t):h(A,[B],t,e,g);throw new TypeError("val must be string, number or Buffer")}function h(A,B,t,e,g){var i,Q=1,s=A.length,n=B.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(A.length<2||B.length<2)return-1;Q=2,s/=2,n/=2,t/=2}function r(A,B){return 1===Q?A[B]:A.readUInt16BE(B*Q)}if(g){var c=-1;for(i=t;is&&(t=s-n),i=t;i>=0;i--){for(var E=!0,o=0;og&&(e=g):e=g;var i=B.length;if(i%2!=0)throw new TypeError("Invalid hex string");e>i/2&&(e=i/2);for(var Q=0;Q>8,g=t%256,i.push(g),i.push(e);return i}(B,A.length-t),A,t,e)}function U(A,B,t){return 0===B&&t===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(B,t))}function N(A,B,t){t=Math.min(A.length,t);for(var e=[],g=B;g239?4:r>223?3:r>191?2:1;if(g+E<=t)switch(E){case 1:r<128&&(c=r);break;case 2:128==(192&(i=A[g+1]))&&(n=(31&r)<<6|63&i)>127&&(c=n);break;case 3:i=A[g+1],Q=A[g+2],128==(192&i)&&128==(192&Q)&&(n=(15&r)<<12|(63&i)<<6|63&Q)>2047&&(n<55296||n>57343)&&(c=n);break;case 4:i=A[g+1],Q=A[g+2],s=A[g+3],128==(192&i)&&128==(192&Q)&&128==(192&s)&&(n=(15&r)<<18|(63&i)<<12|(63&Q)<<6|63&s)>65535&&n<1114112&&(c=n)}null===c?(c=65533,E=1):c>65535&&(c-=65536,e.push(c>>>10&1023|55296),c=56320|1023&c),e.push(c),g+=E}return function(A){var B=A.length;if(B<=4096)return String.fromCharCode.apply(String,A);var t="",e=0;for(;e0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),""},n.prototype.compare=function(A,B,t,e,g){if(!n.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===B&&(B=0),void 0===t&&(t=A?A.length:0),void 0===e&&(e=0),void 0===g&&(g=this.length),B<0||t>A.length||e<0||g>this.length)throw new RangeError("out of range index");if(e>=g&&B>=t)return 0;if(e>=g)return-1;if(B>=t)return 1;if(this===A)return 0;for(var i=(g>>>=0)-(e>>>=0),Q=(t>>>=0)-(B>>>=0),s=Math.min(i,Q),r=this.slice(e,g),c=A.slice(B,t),E=0;Eg)&&(t=g),A.length>0&&(t<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var i=!1;;)switch(e){case"hex":return M(this,A,B,t);case"utf8":case"utf-8":return F(this,A,B,t);case"ascii":return D(this,A,B,t);case"latin1":case"binary":return u(this,A,B,t);case"base64":return l(this,A,B,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,A,B,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),i=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(A,B,t){var e="";t=Math.min(A.length,t);for(var g=B;ge)&&(t=e);for(var g="",i=B;it)throw new RangeError("Trying to access beyond buffer length")}function p(A,B,t,e,g,i){if(!n.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>g||BA.length)throw new RangeError("Index out of range")}function y(A,B,t,e){B<0&&(B=65535+B+1);for(var g=0,i=Math.min(A.length-t,2);g>>8*(e?g:1-g)}function J(A,B,t,e){B<0&&(B=4294967295+B+1);for(var g=0,i=Math.min(A.length-t,4);g>>8*(e?g:3-g)&255}function k(A,B,t,e,g,i){if(t+e>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function T(A,B,t,e,i){return i||k(A,0,t,4),g.write(A,B,t,e,23,4),t+4}function j(A,B,t,e,i){return i||k(A,0,t,8),g.write(A,B,t,e,52,8),t+8}n.prototype.slice=function(A,B){var t,e=this.length;if((A=~~A)<0?(A+=e)<0&&(A=0):A>e&&(A=e),(B=void 0===B?e:~~B)<0?(B+=e)<0&&(B=0):B>e&&(B=e),B0&&(g*=256);)e+=this[A+--B]*g;return e},n.prototype.readUInt8=function(A,B){return B||R(A,1,this.length),this[A]},n.prototype.readUInt16LE=function(A,B){return B||R(A,2,this.length),this[A]|this[A+1]<<8},n.prototype.readUInt16BE=function(A,B){return B||R(A,2,this.length),this[A]<<8|this[A+1]},n.prototype.readUInt32LE=function(A,B){return B||R(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},n.prototype.readUInt32BE=function(A,B){return B||R(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},n.prototype.readIntLE=function(A,B,t){A|=0,B|=0,t||R(A,B,this.length);for(var e=this[A],g=1,i=0;++i=(g*=128)&&(e-=Math.pow(2,8*B)),e},n.prototype.readIntBE=function(A,B,t){A|=0,B|=0,t||R(A,B,this.length);for(var e=B,g=1,i=this[A+--e];e>0&&(g*=256);)i+=this[A+--e]*g;return i>=(g*=128)&&(i-=Math.pow(2,8*B)),i},n.prototype.readInt8=function(A,B){return B||R(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},n.prototype.readInt16LE=function(A,B){B||R(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},n.prototype.readInt16BE=function(A,B){B||R(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},n.prototype.readInt32LE=function(A,B){return B||R(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},n.prototype.readInt32BE=function(A,B){return B||R(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},n.prototype.readFloatLE=function(A,B){return B||R(A,4,this.length),g.read(this,A,!0,23,4)},n.prototype.readFloatBE=function(A,B){return B||R(A,4,this.length),g.read(this,A,!1,23,4)},n.prototype.readDoubleLE=function(A,B){return B||R(A,8,this.length),g.read(this,A,!0,52,8)},n.prototype.readDoubleBE=function(A,B){return B||R(A,8,this.length),g.read(this,A,!1,52,8)},n.prototype.writeUIntLE=function(A,B,t,e){(A=+A,B|=0,t|=0,e)||p(this,A,B,t,Math.pow(2,8*t)-1,0);var g=1,i=0;for(this[B]=255&A;++i=0&&(i*=256);)this[B+g]=A/i&255;return B+t},n.prototype.writeUInt8=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,1,255,0),n.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[B]=255&A,B+1},n.prototype.writeUInt16LE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):y(this,A,B,!0),B+2},n.prototype.writeUInt16BE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):y(this,A,B,!1),B+2},n.prototype.writeUInt32LE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[B+3]=A>>>24,this[B+2]=A>>>16,this[B+1]=A>>>8,this[B]=255&A):J(this,A,B,!0),B+4},n.prototype.writeUInt32BE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):J(this,A,B,!1),B+4},n.prototype.writeIntLE=function(A,B,t,e){if(A=+A,B|=0,!e){var g=Math.pow(2,8*t-1);p(this,A,B,t,g-1,-g)}var i=0,Q=1,s=0;for(this[B]=255&A;++i>0)-s&255;return B+t},n.prototype.writeIntBE=function(A,B,t,e){if(A=+A,B|=0,!e){var g=Math.pow(2,8*t-1);p(this,A,B,t,g-1,-g)}var i=t-1,Q=1,s=0;for(this[B+i]=255&A;--i>=0&&(Q*=256);)A<0&&0===s&&0!==this[B+i+1]&&(s=1),this[B+i]=(A/Q>>0)-s&255;return B+t},n.prototype.writeInt8=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,1,127,-128),n.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[B]=255&A,B+1},n.prototype.writeInt16LE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):y(this,A,B,!0),B+2},n.prototype.writeInt16BE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):y(this,A,B,!1),B+2},n.prototype.writeInt32LE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8,this[B+2]=A>>>16,this[B+3]=A>>>24):J(this,A,B,!0),B+4},n.prototype.writeInt32BE=function(A,B,t){return A=+A,B|=0,t||p(this,A,B,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),n.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):J(this,A,B,!1),B+4},n.prototype.writeFloatLE=function(A,B,t){return T(this,A,B,!0,t)},n.prototype.writeFloatBE=function(A,B,t){return T(this,A,B,!1,t)},n.prototype.writeDoubleLE=function(A,B,t){return j(this,A,B,!0,t)},n.prototype.writeDoubleBE=function(A,B,t){return j(this,A,B,!1,t)},n.prototype.copy=function(A,B,t,e){if(t||(t=0),e||0===e||(e=this.length),B>=A.length&&(B=A.length),B||(B=0),e>0&&e=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),A.length-B=0;--g)A[g+B]=this[g+t];else if(i<1e3||!n.TYPED_ARRAY_SUPPORT)for(g=0;g>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(i=B;i55295&&t<57344){if(!g){if(t>56319){(B-=3)>-1&&i.push(239,191,189);continue}if(Q+1===e){(B-=3)>-1&&i.push(239,191,189);continue}g=t;continue}if(t<56320){(B-=3)>-1&&i.push(239,191,189),g=t;continue}t=65536+(g-55296<<10|t-56320)}else g&&(B-=3)>-1&&i.push(239,191,189);if(g=null,t<128){if((B-=1)<0)break;i.push(t)}else if(t<2048){if((B-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((B-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function z(A){return e.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(x,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function L(A,B,t,e){for(var g=0;g=B.length||g>=A.length);++g)B[g+t]=A[g];return g}}).call(this,t(8))},function(A,B,t){function e(){}t(117).mixin(e),e.prototype.write=function(A,B,t){this.emit("item",A,B,t)},e.prototype.end=function(){this.emit("end"),this.removeAllListeners()},e.prototype.pipe=function(A){var B=this;function t(){A.write.apply(A,Array.prototype.slice.call(arguments))}function e(){!A._isStdio&&A.end()}return B.emit("unpipe",A),A.emit("pipe",B),B.on("item",t),B.on("end",e),B.when("unpipe",(function(g){var i=g===A||void 0===g;return i&&(B.removeListener("item",t),B.removeListener("end",e),A.emit("unpipe")),i})),A},e.prototype.unpipe=function(A){return this.emit("unpipe",A),this},e.prototype.format=function(A){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},e.mixin=function(A){var B,t=e.prototype;for(B in t)t.hasOwnProperty(B)&&(A.prototype[B]=t[B])},A.exports=e},function(A,B){A.exports=class{static simple(A){return JSON.parse(JSON.stringify(A))}}},function(A,B){class t{static get BACKGROUND_LAYER(){return"background"}static get VIDEO_LAYER(){return"video"}static get PEN_LAYER(){return"pen"}static get SPRITE_LAYER(){return"sprite"}static get LAYER_GROUPS(){return[t.BACKGROUND_LAYER,t.VIDEO_LAYER,t.PEN_LAYER,t.SPRITE_LAYER]}}A.exports=t},function(A,B,t){(function(B){class t{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.nowObj;this.startTime=0,this.nowObj=A}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return t.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:t.legacyDateCode}time(){return this.nowObj.now()}relativeTime(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(A,t){return B.setTimeout(A,t)}clearTimeout(A){B.clearTimeout(A)}}A.exports=t}).call(this,t(8))},function(A,B,t){const e=t(202),g=t(65),i=t(27),Q=t(39),s=t(13),{Map:n}=t(24),r=t(67),c=t(68),E=t(0),o=t(9),w=t(40);class C{constructor(A,B){this.runtime=A,this._blocks={},this._scripts=[],Object.defineProperty(this,"_cache",{writable:!0,enumerable:!1}),this._cache={inputs:{},procedureParamNames:{},procedureDefinitions:{},_executeCached:{},_monitored:null,scripts:{},compiledScripts:{},compiledProcedures:{},proceduresPopulated:!1},this.forceNoGlow=B||!1}getCachedCompileResult(A){return this._cache.compiledScripts.hasOwnProperty(A)?this._cache.compiledScripts[A]:null}cacheCompileResult(A,B){this._cache.compiledScripts[A]={success:!0,value:B}}cacheCompileError(A,B){this._cache.compiledScripts[A]={success:!1,value:B}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(A){return this._blocks[A]}getScripts(){return this._scripts}getNextBlock(A){const B=this._blocks[A];return void 0===B?null:B.next}getBranch(A,B){const t=this._blocks[A];if(void 0===t)return null;B||(B=1);let e=C.BRANCH_INPUT_PREFIX;B>1&&(e+=B);const g=t.inputs[e];return void 0===g?null:g.block}getOpcode(A){return void 0===A?null:A.opcode}getFields(A){return void 0===A?null:A.fields}getInputs(A){if(void 0===A)return null;let B=this._cache.inputs[A.id];if(void 0!==B)return B;B={};for(const t in A.inputs)t.substring(0,C.BRANCH_INPUT_PREFIX.length)!==C.BRANCH_INPUT_PREFIX&&(B[t]=A.inputs[t]);return this._cache.inputs[A.id]=B,B}getMutation(A){return void 0===A?null:A.mutation}getTopLevelScript(A){let B=this._blocks[A];if(void 0===B)return null;for(;null!==B.parent;)B=this._blocks[B.parent];return B.id}getProcedureDefinition(A){const B=this._cache.procedureDefinitions[A];if(void 0!==B)return B;for(const B in this._blocks){if(!this._blocks.hasOwnProperty(B))continue;const t=this._blocks[B];if("procedures_definition"===t.opcode){const e=this._getCustomBlockInternal(t);if(e&&e.mutation.proccode===A)return this._cache.procedureDefinitions[A]=B,B}}return this._cache.procedureDefinitions[A]=null,null}getProcedureParamNamesAndIds(A){return this.getProcedureParamNamesIdsAndDefaults(A).slice(0,2)}getProcedureParamNamesIdsAndDefaults(A){const B=this._cache.procedureParamNames[A];if(void 0!==B)return B;for(const B in this._blocks){if(!this._blocks.hasOwnProperty(B))continue;const t=this._blocks[B];if("procedures_prototype"===t.opcode&&t.mutation.proccode===A){const B=JSON.parse(t.mutation.argumentnames),e=JSON.parse(t.mutation.argumentids),g=JSON.parse(t.mutation.argumentdefaults);return this._cache.procedureParamNames[A]=[B,e,g],this._cache.procedureParamNames[A]}}const t=this.runtime.getAddonBlock(A);return t?(this._cache.procedureParamNames[A]=t.namesIdsDefaults,t.namesIdsDefaults):(this._cache.procedureParamNames[A]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const A in this._blocks){if(!this._blocks.hasOwnProperty(A))continue;const B=this._blocks[A];if("procedures_prototype"!==B.opcode){if("procedures_definition"===B.opcode){const t=this._getCustomBlockInternal(B);if(t){const B=t.mutation.proccode;this._cache.procedureDefinitions[B]||(this._cache.procedureDefinitions[B]=A);continue}}}else{const A=B.mutation.proccode;if(!this._cache.procedureParamNames[A]){const t=JSON.parse(B.mutation.argumentnames),e=JSON.parse(B.mutation.argumentids),g=JSON.parse(B.mutation.argumentdefaults);this._cache.procedureParamNames[A]=[t,e,g]}}}this._cache.proceduresPopulated=!0}}duplicate(){const A=new C(this.runtime,this.forceNoGlow);return A._blocks=s.simple(this._blocks),A._scripts=s.simple(this._scripts),A}blocklyListen(A){if("object"!=typeof A)return;if("string"!=typeof A.blockId&&"string"!=typeof A.varId&&"string"!=typeof A.commentId)return;const B=this.runtime.getTargetForStage(),t=this.runtime.getEditingTarget();if("stackclick"!==A.element)switch(A.type){case"create":{const B=e(A);for(let A=0;AA.isOriginal);for(const B of t)if(B.lookupVariableByNameAndType(A.varName,A.varType,!0))return;B.createVariable(A.varId,A.varName,A.varType,A.isCloud),this.emitProjectChanged()}break;case"var_rename":if(t&&t.variables.hasOwnProperty(A.varId))t.renameVariable(A.varId,A.newName),t.blocks.updateBlocksAfterVarRename(A.varId,A.newName);else{B.renameVariable(A.varId,A.newName);const t=this.runtime.targets;for(let B=0;B0&&"data_variable"!==B.opcode&&"data_listcontents"!==B.opcode){const A=w(B.id,B.fields);let t=this.runtime.monitorBlocks.getBlock(A);t||(t=JSON.parse(JSON.stringify(B)),t.id=A,this.runtime.monitorBlocks.createBlock(t)),B=t}const t=B.isMonitored;B.isMonitored=A.value;let e=!1;"data_variable"===B.opcode?e=!this.runtime.getTargetForStage().variables[B.fields.VARIABLE.id]:"data_listcontents"===B.opcode&&(e=!this.runtime.getTargetForStage().variables[B.fields.LIST.id]);const g=e||this.runtime.monitorBlockInfo.hasOwnProperty(B.opcode)&&this.runtime.monitorBlockInfo[B.opcode].isSpriteSpecific;B.targetId=g?B.targetId||this.runtime.getEditingTarget().id:null,t&&!B.isMonitored?this.runtime.requestHideMonitor(B.id):!t&&B.isMonitored&&(this.runtime.requestShowMonitor(B.id)||this.runtime.requestAddMonitor(Q({id:B.id,targetId:B.targetId,spriteName:B.targetId?this.runtime.getTargetById(B.targetId).getName():null,opcode:B.opcode,params:this._getBlockParams(B),value:"",mode:"data_listcontents"===B.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(A){if(!this._blocks.hasOwnProperty(A.id))return;const B=this._blocks[A.id];let t=!1;if(A.newCoordinate&&(t=B.x!==A.newCoordinate.x||B.y!==A.newCoordinate.y,B.x=A.newCoordinate.x,B.y=A.newCoordinate.y),void 0!==A.oldParent){const B=this._blocks[A.oldParent];void 0!==A.oldInput&&B.inputs[A.oldInput].block===A.id?B.inputs[A.oldInput].block=null:B.next===A.id&&(B.next=null),this._blocks[A.id].parent=null,t=!0}if(void 0===A.newParent)this._addScript(A.id);else{if(this._deleteScript(A.id),void 0===A.newInput)this._blocks[A.newParent].next=A.id;else{let B=null;this._blocks[A.newParent].inputs.hasOwnProperty(A.newInput)&&(B=this._blocks[A.newParent].inputs[A.newInput].shadow),this._blocks[A.id].shadow&&(B=A.id),this._blocks[A.newParent].inputs[A.newInput]={name:A.newInput,block:A.id,shadow:B}}this._blocks[A.id].parent=A.newParent,t=!0}this.resetCache(),t&&this.emitProjectChanged()}runAllMonitored(A){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter(A=>this.getBlock(A).isMonitored).map(B=>{const t=this.getBlock(B).targetId;return{blockId:B,target:t?A.getTargetById(t):null}}));const B=this._cache._monitored;for(let t=0;tthis.blockToXML(B,A)).join()}blockToXML(A,B){const t=this._blocks[A];if(!t)return;const e=t.shadow?"shadow":"block";let g="<".concat(e,'\n id="').concat(i(t.id),'"\n type="').concat(i(t.opcode),'"\n ').concat(t.topLevel?'x="'.concat(t.x,'" y="').concat(t.y,'"'):"","\n >");const Q=t.comment;Q&&(B?B.hasOwnProperty(Q)?g+=B[Q].toXML():E.warn("Could not find comment with id: ".concat(Q," in provided comment descriptions.")):E.warn("Cannot serialize comment with id: ".concat(Q,"; no comment descriptions provided."))),t.mutation&&(g+=this.mutationToXML(t.mutation));for(const A in t.inputs){if(!t.inputs.hasOwnProperty(A))continue;const e=t.inputs[A];(e.block||e.shadow)&&(g+=''),e.block&&(g+=this.blockToXML(e.block,B)),e.shadow&&e.shadow!==e.block&&(g+=this.blockToXML(e.shadow,B)),g+="")}for(const A in t.fields){if(!t.fields.hasOwnProperty(A))continue;const B=t.fields[A];g+='".concat(s,"")}return t.next&&(g+="".concat(this.blockToXML(t.next,B),"")),g+=""),g}mutationToXML(A){let B="<".concat(A.tagName);for(const t in A){if("children"===t||"tagName"===t)continue;let e="string"==typeof A[t]?i(A[t]):A[t];"blockInfo"===t&&(e=i(JSON.stringify(A[t]))),B+=" ".concat(t,'="').concat(e,'"')}B+=">";for(let t=0;t"),B}_getBlockParams(A){const B={};for(const t in A.fields)B[t]=A.fields[t].value;for(const t in A.inputs){const e=this._blocks[A.inputs[t].block];for(const A in e.fields)B[A]=e.fields[A].value}return B}_getCustomBlockInternal(A){if(A.inputs&&A.inputs.custom_block)return this._blocks[A.inputs.custom_block.block]}_addScript(A){this._scripts.indexOf(A)>-1||(this._scripts.push(A),this._blocks[A].topLevel=!0)}_deleteScript(A){const B=this._scripts.indexOf(A);B>-1&&this._scripts.splice(B,1),this._blocks[A]&&(this._blocks[A].topLevel=!1)}}r.getCached=function(A,B,t){let e=A._cache._executeCached[B];if(void 0!==e)return e;const g=A.getBlock(B);return void 0===g?null:(e=void 0===t?{id:B,opcode:A.getOpcode(g),fields:A.getFields(g),inputs:A.getInputs(g),mutation:A.getMutation(g)}:new t(A,{id:B,opcode:A.getOpcode(g),fields:A.getFields(g),inputs:A.getInputs(g),mutation:A.getMutation(g)}),A._cache._executeCached[B]=e,e)};const a=c._RuntimeScriptCache;c.getScripts=function(A,B){let t=A._cache.scripts[B];if(!t){t=A._cache.scripts[B]=[];const e=A._scripts;for(let g=0;g=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|A}function C(A,B){if(s.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var e=!1;;)switch(B){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return b(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(e)return b(A).length;B=(""+B).toLowerCase(),e=!0}}function a(A,B,t){var e=!1;if((void 0===B||B<0)&&(B=0),B>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(B>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return f(this,B,t);case"utf8":case"utf-8":return N(this,B,t);case"ascii":return m(this,B,t);case"latin1":case"binary":return G(this,B,t);case"base64":return U(this,B,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,B,t);default:if(e)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),e=!0}}function I(A,B,t){var e=A[B];A[B]=A[t],A[t]=e}function h(A,B,t,e,g){if(0===A.length)return-1;if("string"==typeof t?(e=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=g?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(g)return-1;t=A.length-1}else if(t<0){if(!g)return-1;t=0}if("string"==typeof B&&(B=s.from(B,e)),s.isBuffer(B))return 0===B.length?-1:Y(A,B,t,e,g);if("number"==typeof B)return B&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?g?Uint8Array.prototype.indexOf.call(A,B,t):Uint8Array.prototype.lastIndexOf.call(A,B,t):Y(A,[B],t,e,g);throw new TypeError("val must be string, number or Buffer")}function Y(A,B,t,e,g){var i,n=1,Q=A.length,s=B.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(A.length<2||B.length<2)return-1;n=2,Q/=2,s/=2,t/=2}function r(A,B){return 1===n?A[B]:A.readUInt16BE(B*n)}if(g){var c=-1;for(i=t;iQ&&(t=Q-s),i=t;i>=0;i--){for(var E=!0,o=0;og&&(e=g):e=g;var i=B.length;if(i%2!=0)throw new TypeError("Invalid hex string");e>i/2&&(e=i/2);for(var n=0;n>8,g=t%256,i.push(g),i.push(e);return i}(B,A.length-t),A,t,e)}function U(A,B,t){return 0===B&&t===A.length?e.fromByteArray(A):e.fromByteArray(A.slice(B,t))}function N(A,B,t){t=Math.min(A.length,t);for(var e=[],g=B;g239?4:r>223?3:r>191?2:1;if(g+E<=t)switch(E){case 1:r<128&&(c=r);break;case 2:128==(192&(i=A[g+1]))&&(s=(31&r)<<6|63&i)>127&&(c=s);break;case 3:i=A[g+1],n=A[g+2],128==(192&i)&&128==(192&n)&&(s=(15&r)<<12|(63&i)<<6|63&n)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=A[g+1],n=A[g+2],Q=A[g+3],128==(192&i)&&128==(192&n)&&128==(192&Q)&&(s=(15&r)<<18|(63&i)<<12|(63&n)<<6|63&Q)>65535&&s<1114112&&(c=s)}null===c?(c=65533,E=1):c>65535&&(c-=65536,e.push(c>>>10&1023|55296),c=56320|1023&c),e.push(c),g+=E}return function(A){var B=A.length;if(B<=4096)return String.fromCharCode.apply(String,A);var t="",e=0;for(;e0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),""},s.prototype.compare=function(A,B,t,e,g){if(!s.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===B&&(B=0),void 0===t&&(t=A?A.length:0),void 0===e&&(e=0),void 0===g&&(g=this.length),B<0||t>A.length||e<0||g>this.length)throw new RangeError("out of range index");if(e>=g&&B>=t)return 0;if(e>=g)return-1;if(B>=t)return 1;if(this===A)return 0;for(var i=(g>>>=0)-(e>>>=0),n=(t>>>=0)-(B>>>=0),Q=Math.min(i,n),r=this.slice(e,g),c=A.slice(B,t),E=0;Eg)&&(t=g),A.length>0&&(t<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var i=!1;;)switch(e){case"hex":return M(this,A,B,t);case"utf8":case"utf-8":return F(this,A,B,t);case"ascii":return D(this,A,B,t);case"latin1":case"binary":return u(this,A,B,t);case"base64":return l(this,A,B,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,A,B,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(A,B,t){var e="";t=Math.min(A.length,t);for(var g=B;ge)&&(t=e);for(var g="",i=B;it)throw new RangeError("Trying to access beyond buffer length")}function R(A,B,t,e,g,i){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>g||BA.length)throw new RangeError("Index out of range")}function y(A,B,t,e){B<0&&(B=65535+B+1);for(var g=0,i=Math.min(A.length-t,2);g>>8*(e?g:1-g)}function J(A,B,t,e){B<0&&(B=4294967295+B+1);for(var g=0,i=Math.min(A.length-t,4);g>>8*(e?g:3-g)&255}function k(A,B,t,e,g,i){if(t+e>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function T(A,B,t,e,i){return i||k(A,0,t,4),g.write(A,B,t,e,23,4),t+4}function j(A,B,t,e,i){return i||k(A,0,t,8),g.write(A,B,t,e,52,8),t+8}s.prototype.slice=function(A,B){var t,e=this.length;if((A=~~A)<0?(A+=e)<0&&(A=0):A>e&&(A=e),(B=void 0===B?e:~~B)<0?(B+=e)<0&&(B=0):B>e&&(B=e),B0&&(g*=256);)e+=this[A+--B]*g;return e},s.prototype.readUInt8=function(A,B){return B||p(A,1,this.length),this[A]},s.prototype.readUInt16LE=function(A,B){return B||p(A,2,this.length),this[A]|this[A+1]<<8},s.prototype.readUInt16BE=function(A,B){return B||p(A,2,this.length),this[A]<<8|this[A+1]},s.prototype.readUInt32LE=function(A,B){return B||p(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},s.prototype.readUInt32BE=function(A,B){return B||p(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},s.prototype.readIntLE=function(A,B,t){A|=0,B|=0,t||p(A,B,this.length);for(var e=this[A],g=1,i=0;++i=(g*=128)&&(e-=Math.pow(2,8*B)),e},s.prototype.readIntBE=function(A,B,t){A|=0,B|=0,t||p(A,B,this.length);for(var e=B,g=1,i=this[A+--e];e>0&&(g*=256);)i+=this[A+--e]*g;return i>=(g*=128)&&(i-=Math.pow(2,8*B)),i},s.prototype.readInt8=function(A,B){return B||p(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},s.prototype.readInt16LE=function(A,B){B||p(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt16BE=function(A,B){B||p(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt32LE=function(A,B){return B||p(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},s.prototype.readInt32BE=function(A,B){return B||p(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},s.prototype.readFloatLE=function(A,B){return B||p(A,4,this.length),g.read(this,A,!0,23,4)},s.prototype.readFloatBE=function(A,B){return B||p(A,4,this.length),g.read(this,A,!1,23,4)},s.prototype.readDoubleLE=function(A,B){return B||p(A,8,this.length),g.read(this,A,!0,52,8)},s.prototype.readDoubleBE=function(A,B){return B||p(A,8,this.length),g.read(this,A,!1,52,8)},s.prototype.writeUIntLE=function(A,B,t,e){(A=+A,B|=0,t|=0,e)||R(this,A,B,t,Math.pow(2,8*t)-1,0);var g=1,i=0;for(this[B]=255&A;++i=0&&(i*=256);)this[B+g]=A/i&255;return B+t},s.prototype.writeUInt8=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,1,255,0),s.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[B]=255&A,B+1},s.prototype.writeUInt16LE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):y(this,A,B,!0),B+2},s.prototype.writeUInt16BE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):y(this,A,B,!1),B+2},s.prototype.writeUInt32LE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[B+3]=A>>>24,this[B+2]=A>>>16,this[B+1]=A>>>8,this[B]=255&A):J(this,A,B,!0),B+4},s.prototype.writeUInt32BE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):J(this,A,B,!1),B+4},s.prototype.writeIntLE=function(A,B,t,e){if(A=+A,B|=0,!e){var g=Math.pow(2,8*t-1);R(this,A,B,t,g-1,-g)}var i=0,n=1,Q=0;for(this[B]=255&A;++i>0)-Q&255;return B+t},s.prototype.writeIntBE=function(A,B,t,e){if(A=+A,B|=0,!e){var g=Math.pow(2,8*t-1);R(this,A,B,t,g-1,-g)}var i=t-1,n=1,Q=0;for(this[B+i]=255&A;--i>=0&&(n*=256);)A<0&&0===Q&&0!==this[B+i+1]&&(Q=1),this[B+i]=(A/n>>0)-Q&255;return B+t},s.prototype.writeInt8=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,1,127,-128),s.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[B]=255&A,B+1},s.prototype.writeInt16LE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):y(this,A,B,!0),B+2},s.prototype.writeInt16BE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):y(this,A,B,!1),B+2},s.prototype.writeInt32LE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8,this[B+2]=A>>>16,this[B+3]=A>>>24):J(this,A,B,!0),B+4},s.prototype.writeInt32BE=function(A,B,t){return A=+A,B|=0,t||R(this,A,B,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),s.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):J(this,A,B,!1),B+4},s.prototype.writeFloatLE=function(A,B,t){return T(this,A,B,!0,t)},s.prototype.writeFloatBE=function(A,B,t){return T(this,A,B,!1,t)},s.prototype.writeDoubleLE=function(A,B,t){return j(this,A,B,!0,t)},s.prototype.writeDoubleBE=function(A,B,t){return j(this,A,B,!1,t)},s.prototype.copy=function(A,B,t,e){if(t||(t=0),e||0===e||(e=this.length),B>=A.length&&(B=A.length),B||(B=0),e>0&&e=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),A.length-B=0;--g)A[g+B]=this[g+t];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(g=0;g>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(i=B;i55295&&t<57344){if(!g){if(t>56319){(B-=3)>-1&&i.push(239,191,189);continue}if(n+1===e){(B-=3)>-1&&i.push(239,191,189);continue}g=t;continue}if(t<56320){(B-=3)>-1&&i.push(239,191,189),g=t;continue}t=65536+(g-55296<<10|t-56320)}else g&&(B-=3)>-1&&i.push(239,191,189);if(g=null,t<128){if((B-=1)<0)break;i.push(t)}else if(t<2048){if((B-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((B-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function z(A){return e.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(x,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function L(A,B,t,e){for(var g=0;g=B.length||g>=A.length);++g)B[g+t]=A[g];return g}}).call(this,t(8))},function(A,B,t){function e(){}t(118).mixin(e),e.prototype.write=function(A,B,t){this.emit("item",A,B,t)},e.prototype.end=function(){this.emit("end"),this.removeAllListeners()},e.prototype.pipe=function(A){var B=this;function t(){A.write.apply(A,Array.prototype.slice.call(arguments))}function e(){!A._isStdio&&A.end()}return B.emit("unpipe",A),A.emit("pipe",B),B.on("item",t),B.on("end",e),B.when("unpipe",(function(g){var i=g===A||void 0===g;return i&&(B.removeListener("item",t),B.removeListener("end",e),A.emit("unpipe")),i})),A},e.prototype.unpipe=function(A){return this.emit("unpipe",A),this},e.prototype.format=function(A){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require('minilog');","Minilog"," .pipe(Minilog.backends.console.formatClean)"," .pipe(Minilog.backends.console);"].join("\n"))},e.mixin=function(A){var B,t=e.prototype;for(B in t)t.hasOwnProperty(B)&&(A.prototype[B]=t[B])},A.exports=e},function(A,B){A.exports=class{static simple(A){return JSON.parse(JSON.stringify(A))}}},function(A,B){class t{static get BACKGROUND_LAYER(){return"background"}static get VIDEO_LAYER(){return"video"}static get PEN_LAYER(){return"pen"}static get SPRITE_LAYER(){return"sprite"}static get LAYER_GROUPS(){return[t.BACKGROUND_LAYER,t.VIDEO_LAYER,t.PEN_LAYER,t.SPRITE_LAYER]}}A.exports=t},function(A,B,t){(function(B){class t{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.nowObj;this.startTime=0,this.nowObj=A}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return t.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:t.legacyDateCode}time(){return this.nowObj.now()}relativeTime(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(A,t){return B.setTimeout(A,t)}clearTimeout(A){B.clearTimeout(A)}}A.exports=t}).call(this,t(8))},function(A,B,t){const e=t(203),g=t(67),i=t(28),n=t(39),Q=t(13),{Map:s}=t(24),r=t(69),c=t(70),E=t(0),o=t(9),w=t(40);class C{constructor(A,B){this.runtime=A,this._blocks={},this._scripts=[],Object.defineProperty(this,"_cache",{writable:!0,enumerable:!1}),this._cache={inputs:{},procedureParamNames:{},procedureDefinitions:{},_executeCached:{},_monitored:null,scripts:{},compiledScripts:{},compiledProcedures:{},proceduresPopulated:!1},this.forceNoGlow=B||!1}getCachedCompileResult(A){return this._cache.compiledScripts.hasOwnProperty(A)?this._cache.compiledScripts[A]:null}cacheCompileResult(A,B){this._cache.compiledScripts[A]={success:!0,value:B}}cacheCompileError(A,B){this._cache.compiledScripts[A]={success:!1,value:B}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(A){return this._blocks[A]}getScripts(){return this._scripts}getNextBlock(A){const B=this._blocks[A];return void 0===B?null:B.next}getBranch(A,B){const t=this._blocks[A];if(void 0===t)return null;B||(B=1);let e=C.BRANCH_INPUT_PREFIX;B>1&&(e+=B);const g=t.inputs[e];return void 0===g?null:g.block}getOpcode(A){return void 0===A?null:A.opcode}getFields(A){return void 0===A?null:A.fields}getInputs(A){if(void 0===A)return null;let B=this._cache.inputs[A.id];if(void 0!==B)return B;B={};for(const t in A.inputs)t.substring(0,C.BRANCH_INPUT_PREFIX.length)!==C.BRANCH_INPUT_PREFIX&&(B[t]=A.inputs[t]);return this._cache.inputs[A.id]=B,B}getMutation(A){return void 0===A?null:A.mutation}getTopLevelScript(A){let B=this._blocks[A];if(void 0===B)return null;for(;null!==B.parent;)B=this._blocks[B.parent];return B.id}getProcedureDefinition(A){const B=this._cache.procedureDefinitions[A];if(void 0!==B)return B;for(const B in this._blocks){if(!this._blocks.hasOwnProperty(B))continue;const t=this._blocks[B];if("procedures_definition"===t.opcode){const e=this._getCustomBlockInternal(t);if(e&&e.mutation.proccode===A)return this._cache.procedureDefinitions[A]=B,B}}return this._cache.procedureDefinitions[A]=null,null}getProcedureParamNamesAndIds(A){return this.getProcedureParamNamesIdsAndDefaults(A).slice(0,2)}getProcedureParamNamesIdsAndDefaults(A){const B=this._cache.procedureParamNames[A];if(void 0!==B)return B;for(const B in this._blocks){if(!this._blocks.hasOwnProperty(B))continue;const t=this._blocks[B];if("procedures_prototype"===t.opcode&&t.mutation.proccode===A){const B=JSON.parse(t.mutation.argumentnames),e=JSON.parse(t.mutation.argumentids),g=JSON.parse(t.mutation.argumentdefaults);return this._cache.procedureParamNames[A]=[B,e,g],this._cache.procedureParamNames[A]}}const t=this.runtime.getAddonBlock(A);return t?(this._cache.procedureParamNames[A]=t.namesIdsDefaults,t.namesIdsDefaults):(this._cache.procedureParamNames[A]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const A in this._blocks){if(!this._blocks.hasOwnProperty(A))continue;const B=this._blocks[A];if("procedures_prototype"!==B.opcode){if("procedures_definition"===B.opcode){const t=this._getCustomBlockInternal(B);if(t){const B=t.mutation.proccode;this._cache.procedureDefinitions[B]||(this._cache.procedureDefinitions[B]=A);continue}}}else{const A=B.mutation.proccode;if(!this._cache.procedureParamNames[A]){const t=JSON.parse(B.mutation.argumentnames),e=JSON.parse(B.mutation.argumentids),g=JSON.parse(B.mutation.argumentdefaults);this._cache.procedureParamNames[A]=[t,e,g]}}}this._cache.proceduresPopulated=!0}}duplicate(){const A=new C(this.runtime,this.forceNoGlow);return A._blocks=Q.simple(this._blocks),A._scripts=Q.simple(this._scripts),A}blocklyListen(A){if("object"!=typeof A)return;if("string"!=typeof A.blockId&&"string"!=typeof A.varId&&"string"!=typeof A.commentId)return;const B=this.runtime.getTargetForStage(),t=this.runtime.getEditingTarget();if("stackclick"!==A.element)switch(A.type){case"create":{const B=e(A);for(let A=0;AA.isOriginal);for(const B of t)if(B.lookupVariableByNameAndType(A.varName,A.varType,!0))return;B.createVariable(A.varId,A.varName,A.varType,A.isCloud),this.emitProjectChanged()}break;case"var_rename":if(t&&t.variables.hasOwnProperty(A.varId))t.renameVariable(A.varId,A.newName),t.blocks.updateBlocksAfterVarRename(A.varId,A.newName);else{B.renameVariable(A.varId,A.newName);const t=this.runtime.targets;for(let B=0;B0&&"data_variable"!==B.opcode&&"data_listcontents"!==B.opcode){const A=w(B.id,B.fields);let t=this.runtime.monitorBlocks.getBlock(A);t||(t=JSON.parse(JSON.stringify(B)),t.id=A,this.runtime.monitorBlocks.createBlock(t)),B=t}const t=B.isMonitored;B.isMonitored=A.value;let e=!1;"data_variable"===B.opcode?e=!this.runtime.getTargetForStage().variables[B.fields.VARIABLE.id]:"data_listcontents"===B.opcode&&(e=!this.runtime.getTargetForStage().variables[B.fields.LIST.id]);const g=e||this.runtime.monitorBlockInfo.hasOwnProperty(B.opcode)&&this.runtime.monitorBlockInfo[B.opcode].isSpriteSpecific;B.targetId=g?B.targetId||this.runtime.getEditingTarget().id:null,t&&!B.isMonitored?this.runtime.requestHideMonitor(B.id):!t&&B.isMonitored&&(this.runtime.requestShowMonitor(B.id)||this.runtime.requestAddMonitor(n({id:B.id,targetId:B.targetId,spriteName:B.targetId?this.runtime.getTargetById(B.targetId).getName():null,opcode:B.opcode,params:this._getBlockParams(B),value:"",mode:"data_listcontents"===B.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(A){if(!this._blocks.hasOwnProperty(A.id))return;const B=this._blocks[A.id];let t=!1;if(A.newCoordinate&&(t=B.x!==A.newCoordinate.x||B.y!==A.newCoordinate.y,B.x=A.newCoordinate.x,B.y=A.newCoordinate.y),void 0!==A.oldParent){const B=this._blocks[A.oldParent];void 0!==A.oldInput&&B.inputs[A.oldInput].block===A.id?B.inputs[A.oldInput].block=null:B.next===A.id&&(B.next=null),this._blocks[A.id].parent=null,t=!0}if(void 0===A.newParent)this._addScript(A.id);else{if(this._deleteScript(A.id),void 0===A.newInput)this._blocks[A.newParent].next=A.id;else{let B=null;this._blocks[A.newParent].inputs.hasOwnProperty(A.newInput)&&(B=this._blocks[A.newParent].inputs[A.newInput].shadow),this._blocks[A.id].shadow&&(B=A.id),this._blocks[A.newParent].inputs[A.newInput]={name:A.newInput,block:A.id,shadow:B}}this._blocks[A.id].parent=A.newParent,t=!0}this.resetCache(),t&&this.emitProjectChanged()}runAllMonitored(A){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter(A=>this.getBlock(A).isMonitored).map(B=>{const t=this.getBlock(B).targetId;return{blockId:B,target:t?A.getTargetById(t):null}}));const B=this._cache._monitored;for(let t=0;tthis.blockToXML(B,A)).join()}blockToXML(A,B){const t=this._blocks[A];if(!t)return;const e=t.shadow?"shadow":"block";let g="<".concat(e,'\n id="').concat(i(t.id),'"\n type="').concat(i(t.opcode),'"\n ').concat(t.topLevel?'x="'.concat(t.x,'" y="').concat(t.y,'"'):"","\n >");const n=t.comment;n&&(B?B.hasOwnProperty(n)?g+=B[n].toXML():E.warn("Could not find comment with id: ".concat(n," in provided comment descriptions.")):E.warn("Cannot serialize comment with id: ".concat(n,"; no comment descriptions provided."))),t.mutation&&(g+=this.mutationToXML(t.mutation));for(const A in t.inputs){if(!t.inputs.hasOwnProperty(A))continue;const e=t.inputs[A];(e.block||e.shadow)&&(g+=''),e.block&&(g+=this.blockToXML(e.block,B)),e.shadow&&e.shadow!==e.block&&(g+=this.blockToXML(e.shadow,B)),g+="")}for(const A in t.fields){if(!t.fields.hasOwnProperty(A))continue;const B=t.fields[A];g+='".concat(Q,"")}return t.next&&(g+="".concat(this.blockToXML(t.next,B),"")),g+=""),g}mutationToXML(A){let B="<".concat(A.tagName);for(const t in A){if("children"===t||"tagName"===t)continue;let e="string"==typeof A[t]?i(A[t]):A[t];"blockInfo"===t&&(e=i(JSON.stringify(A[t]))),B+=" ".concat(t,'="').concat(e,'"')}B+=">";for(let t=0;t"),B}_getBlockParams(A){const B={};for(const t in A.fields)B[t]=A.fields[t].value;for(const t in A.inputs){const e=this._blocks[A.inputs[t].block];for(const A in e.fields)B[A]=e.fields[A].value}return B}_getCustomBlockInternal(A){if(A.inputs&&A.inputs.custom_block)return this._blocks[A.inputs.custom_block.block]}_addScript(A){this._scripts.indexOf(A)>-1||(this._scripts.push(A),this._blocks[A].topLevel=!0)}_deleteScript(A){const B=this._scripts.indexOf(A);B>-1&&this._scripts.splice(B,1),this._blocks[A]&&(this._blocks[A].topLevel=!1)}}r.getCached=function(A,B,t){let e=A._cache._executeCached[B];if(void 0!==e)return e;const g=A.getBlock(B);return void 0===g?null:(e=void 0===t?{id:B,opcode:A.getOpcode(g),fields:A.getFields(g),inputs:A.getInputs(g),mutation:A.getMutation(g)}:new t(A,{id:B,opcode:A.getOpcode(g),fields:A.getFields(g),inputs:A.getInputs(g),mutation:A.getMutation(g)}),A._cache._executeCached[B]=e,e)};const a=c._RuntimeScriptCache;c.getScripts=function(A,B){let t=A._cache.scripts[B];if(!t){t=A._cache.scripts[B]=[];const e=A._scripts;for(let g=0;g>2]|=A[i]<>6,n[g++]=128|63&e):e<55296||e>=57344?(n[g++]=224|e>>12,n[g++]=128|e>>6&63,n[g++]=128|63&e):(e=65536+((1023&e)<<10|1023&A.charCodeAt(++i)),n[g++]=240|e>>18,n[g++]=128|e>>12&63,n[g++]=128|e>>6&63,n[g++]=128|63&e);else for(g=this.start;i>2]|=e<>2]|=(192|e>>6)<>2]|=(128|63&e)<=57344?(s[g>>2]|=(224|e>>12)<>2]|=(128|e>>6&63)<>2]|=(128|63&e)<>2]|=(240|e>>18)<>2]|=(128|e>>12&63)<>2]|=(128|e>>6&63)<>2]|=(128|63&e)<=64?(this.start=g-64,this.hash(),this.hashed=!0):this.start=g}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,B=this.lastByteIndex;A[B>>2]|=EXTRA[3&B],B>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,B,t,e,g,i,Q=this.blocks;this.first?B=((B=((A=((A=Q[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(e=((e=(-1732584194^2004318071&A)+Q[1]-117830708)<<12|e>>>20)+A<<0)&(-271733879^A))+Q[2]-1126478375)<<17|t>>>15)+e<<0)&(e^A))+Q[3]-1316259209)<<22|B>>>10)+t<<0:(A=this.h0,B=this.h1,t=this.h2,B=((B+=((A=((A+=((e=this.h3)^B&(t^e))+Q[0]-680876936)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+Q[1]-389564586)<<12|e>>>20)+A<<0)&(A^B))+Q[2]+606105819)<<17|t>>>15)+e<<0)&(e^A))+Q[3]-1044525330)<<22|B>>>10)+t<<0),B=((B+=((A=((A+=(e^B&(t^e))+Q[4]-176418897)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+Q[5]+1200080426)<<12|e>>>20)+A<<0)&(A^B))+Q[6]-1473231341)<<17|t>>>15)+e<<0)&(e^A))+Q[7]-45705983)<<22|B>>>10)+t<<0,B=((B+=((A=((A+=(e^B&(t^e))+Q[8]+1770035416)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+Q[9]-1958414417)<<12|e>>>20)+A<<0)&(A^B))+Q[10]-42063)<<17|t>>>15)+e<<0)&(e^A))+Q[11]-1990404162)<<22|B>>>10)+t<<0,B=((B+=((A=((A+=(e^B&(t^e))+Q[12]+1804603682)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+Q[13]-40341101)<<12|e>>>20)+A<<0)&(A^B))+Q[14]-1502002290)<<17|t>>>15)+e<<0)&(e^A))+Q[15]+1236535329)<<22|B>>>10)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+Q[1]-165796510)<<5|A>>>27)+B<<0)^B))+Q[6]-1069501632)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+Q[11]+643717713)<<14|t>>>18)+e<<0)^e))+Q[0]-373897302)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+Q[5]-701558691)<<5|A>>>27)+B<<0)^B))+Q[10]+38016083)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+Q[15]-660478335)<<14|t>>>18)+e<<0)^e))+Q[4]-405537848)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+Q[9]+568446438)<<5|A>>>27)+B<<0)^B))+Q[14]-1019803690)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+Q[3]-187363961)<<14|t>>>18)+e<<0)^e))+Q[8]+1163531501)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+Q[13]-1444681467)<<5|A>>>27)+B<<0)^B))+Q[2]-51403784)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+Q[7]+1735328473)<<14|t>>>18)+e<<0)^e))+Q[12]-1926607734)<<20|B>>>12)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+Q[5]-378558)<<4|A>>>28)+B<<0))+Q[8]-2022574463)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+Q[11]+1839030562)<<16|t>>>16)+e<<0))+Q[14]-35309556)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+Q[1]-1530992060)<<4|A>>>28)+B<<0))+Q[4]+1272893353)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+Q[7]-155497632)<<16|t>>>16)+e<<0))+Q[10]-1094730640)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+Q[13]+681279174)<<4|A>>>28)+B<<0))+Q[0]-358537222)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+Q[3]-722521979)<<16|t>>>16)+e<<0))+Q[6]+76029189)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+Q[9]-640364487)<<4|A>>>28)+B<<0))+Q[12]-421815835)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+Q[15]+530742520)<<16|t>>>16)+e<<0))+Q[2]-995338651)<<23|B>>>9)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+Q[0]-198630844)<<6|A>>>26)+B<<0)|~t))+Q[7]+1126891415)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+Q[14]-1416354905)<<15|t>>>17)+e<<0)|~A))+Q[5]-57434055)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+Q[12]+1700485571)<<6|A>>>26)+B<<0)|~t))+Q[3]-1894986606)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+Q[10]-1051523)<<15|t>>>17)+e<<0)|~A))+Q[1]-2054922799)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+Q[8]+1873313359)<<6|A>>>26)+B<<0)|~t))+Q[15]-30611744)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+Q[6]-1560198380)<<15|t>>>17)+e<<0)|~A))+Q[13]+1309151649)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+Q[4]-145523070)<<6|A>>>26)+B<<0)|~t))+Q[11]-1120210379)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+Q[2]+718787259)<<15|t>>>17)+e<<0)|~A))+Q[9]-343485551)<<21|B>>>11)+t<<0,this.first?(this.h0=A+1732584193<<0,this.h1=B-271733879<<0,this.h2=t-1732584194<<0,this.h3=e+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+B<<0,this.h2=this.h2+t<<0,this.h3=this.h3+e<<0)},Md5.prototype.hex=function(){this.finalize();var A=this.h0,B=this.h1,t=this.h2,e=this.h3;return HEX_CHARS[A>>4&15]+HEX_CHARS[15&A]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+HEX_CHARS[B>>4&15]+HEX_CHARS[15&B]+HEX_CHARS[B>>12&15]+HEX_CHARS[B>>8&15]+HEX_CHARS[B>>20&15]+HEX_CHARS[B>>16&15]+HEX_CHARS[B>>28&15]+HEX_CHARS[B>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var A=this.h0,B=this.h1,t=this.h2,e=this.h3;return[255&A,A>>8&255,A>>16&255,A>>24&255,255&B,B>>8&255,B>>16&255,B>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),B=new Uint32Array(A);return B[0]=this.h0,B[1]=this.h1,B[2]=this.h2,B[3]=this.h3,A},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var A,B,t,e="",g=this.array(),i=0;i<15;)A=g[i++],B=g[i++],t=g[i++],e+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[63&(A<<4|B>>>4)]+BASE64_ENCODE_CHAR[63&(B<<2|t>>>6)]+BASE64_ENCODE_CHAR[63&t];return A=g[i],e+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[A<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(36),__webpack_require__(8))},function(A,B,t){"use strict";var e,g="object"==typeof Reflect?Reflect:null,i=g&&"function"==typeof g.apply?g.apply:function(A,B,t){return Function.prototype.apply.call(A,B,t)};e=g&&"function"==typeof g.ownKeys?g.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var Q=Number.isNaN||function(A){return A!=A};function s(){s.init.call(this)}A.exports=s,A.exports.once=function(A,B){return new Promise((function(t,e){function g(t){A.removeListener(B,i),e(t)}function i(){"function"==typeof A.removeListener&&A.removeListener("error",g),t([].slice.call(arguments))}Y(A,B,i,{once:!0}),"error"!==B&&function(A,B,t){"function"==typeof A.on&&Y(A,"error",B,t)}(A,g,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var n=10;function r(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function c(A){return void 0===A._maxListeners?s.defaultMaxListeners:A._maxListeners}function E(A,B,t,e){var g,i,Q,s;if(r(t),void 0===(i=A._events)?(i=A._events=Object.create(null),A._eventsCount=0):(void 0!==i.newListener&&(A.emit("newListener",B,t.listener?t.listener:t),i=A._events),Q=i[B]),void 0===Q)Q=i[B]=t,++A._eventsCount;else if("function"==typeof Q?Q=i[B]=e?[t,Q]:[Q,t]:e?Q.unshift(t):Q.push(t),(g=c(A))>0&&Q.length>g&&!Q.warned){Q.warned=!0;var n=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");n.name="MaxListenersExceededWarning",n.emitter=A,n.type=B,n.count=Q.length,s=n,console&&console.warn&&console.warn(s)}return A}function o(){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)}function w(A,B,t){var e={fired:!1,wrapFn:void 0,target:A,type:B,listener:t},g=o.bind(e);return g.listener=t,e.wrapFn=g,g}function C(A,B,t){var e=A._events;if(void 0===e)return[];var g=e[B];return void 0===g?[]:"function"==typeof g?t?[g.listener||g]:[g]:t?function(A){for(var B=new Array(A.length),t=0;t0&&(Q=B[0]),Q instanceof Error)throw Q;var s=new Error("Unhandled error."+(Q?" ("+Q.message+")":""));throw s.context=Q,s}var n=g[A];if(void 0===n)return!1;if("function"==typeof n)i(n,this,B);else{var r=n.length,c=I(n,r);for(t=0;t=0;i--)if(t[i]===B||t[i].listener===B){Q=t[i].listener,g=i;break}if(g<0)return this;0===g?t.shift():function(A,B){for(;B+1=0;e--)this.removeListener(A,B[e]);return this},s.prototype.listeners=function(A){return C(this,A,!0)},s.prototype.rawListeners=function(A){return C(this,A,!1)},s.listenerCount=function(A,B){return"function"==typeof A.listenerCount?A.listenerCount(B):a.call(A,B)},s.prototype.listenerCount=a,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},function(A,B,t){(function(B,t,e,g){A.exports=function A(B,t,e){function g(Q,s){if(!t[Q]){if(!B[Q]){if(i)return i(Q,!0);var n=new Error("Cannot find module '"+Q+"'");throw n.code="MODULE_NOT_FOUND",n}var r=t[Q]={exports:{}};B[Q][0].call(r.exports,(function(A){return g(B[Q][1][A]||A)}),r,r.exports,A,B,t,e)}return t[Q].exports}for(var i=!1,Q=0;Q>2,s=(3&B)<<4|t>>4,n=1>6:64,r=2>4,t=(15&Q)<<4|(s=i.indexOf(A.charAt(r++)))>>2,e=(3&s)<<6|(n=i.indexOf(A.charAt(r++))),o[c++]=B,64!==s&&(o[c++]=t),64!==n&&(o[c++]=e);return o}},{"./support":30,"./utils":32}],2:[function(A,B,t){"use strict";var e=A("./external"),g=A("./stream/DataWorker"),i=A("./stream/Crc32Probe"),Q=A("./stream/DataLengthProbe");function s(A,B,t,e,g){this.compressedSize=A,this.uncompressedSize=B,this.crc32=t,this.compression=e,this.compressedContent=g}s.prototype={getContentWorker:function(){var A=new g(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Q("data_length")),B=this;return A.on("end",(function(){if(this.streamInfo.data_length!==B.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new g(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(A,B,t){return A.pipe(new i).pipe(new Q("uncompressedSize")).pipe(B.compressWorker(t)).pipe(new Q("compressedSize")).withStreamInfo("compression",B)},B.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,B,t){"use strict";var e=A("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new e("STORE compression")},uncompressWorker:function(){return new e("STORE decompression")}},t.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,B,t){"use strict";var e=A("./utils"),g=function(){for(var A,B=[],t=0;t<256;t++){A=t;for(var e=0;e<8;e++)A=1&A?3988292384^A>>>1:A>>>1;B[t]=A}return B}();B.exports=function(A,B){return void 0!==A&&A.length?"string"!==e.getTypeOf(A)?function(A,B,t,e){var i=g,Q=0+t;A^=-1;for(var s=0;s>>8^i[255&(A^B[s])];return-1^A}(0|B,A,A.length):function(A,B,t,e){var i=g,Q=0+t;A^=-1;for(var s=0;s>>8^i[255&(A^B.charCodeAt(s))];return-1^A}(0|B,A,A.length):0}},{"./utils":32}],5:[function(A,B,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(A,B,t){"use strict";var e;e="undefined"!=typeof Promise?Promise:A("lie"),B.exports={Promise:e}},{lie:37}],7:[function(A,B,t){"use strict";var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,g=A("pako"),i=A("./utils"),Q=A("./stream/GenericWorker"),s=e?"uint8array":"array";function n(A,B){Q.call(this,"FlateWorker/"+A),this._pako=null,this._pakoAction=A,this._pakoOptions=B,this.meta={}}t.magic="\b\0",i.inherits(n,Q),n.prototype.processChunk=function(A){this.meta=A.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(s,A.data),!1)},n.prototype.flush=function(){Q.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},n.prototype.cleanUp=function(){Q.prototype.cleanUp.call(this),this._pako=null},n.prototype._createPako=function(){this._pako=new g[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var A=this;this._pako.onData=function(B){A.push({data:B,meta:A.meta})}},t.compressWorker=function(A){return new n("Deflate",A)},t.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,B,t){"use strict";function e(A,B){var t,e="";for(t=0;t>>=8;return e}function g(A,B,t,g,Q,c){var E,o,w=A.file,C=A.compression,a=c!==s.utf8encode,I=i.transformTo("string",c(w.name)),Y=i.transformTo("string",s.utf8encode(w.name)),h=w.comment,M=i.transformTo("string",c(h)),F=i.transformTo("string",s.utf8encode(h)),D=Y.length!==w.name.length,u=F.length!==h.length,l="",d="",U="",N=w.dir,m=w.date,G={crc32:0,compressedSize:0,uncompressedSize:0};B&&!t||(G.crc32=A.crc32,G.compressedSize=A.compressedSize,G.uncompressedSize=A.uncompressedSize);var f=0;B&&(f|=8),a||!D&&!u||(f|=2048);var H=0,R=0;N&&(H|=16),"UNIX"===Q?(R=798,H|=function(A,B){var t=A;return A||(t=B?16893:33204),(65535&t)<<16}(w.unixPermissions,N)):(R=20,H|=function(A){return 63&(A||0)}(w.dosPermissions)),E=m.getUTCHours(),E<<=6,E|=m.getUTCMinutes(),E<<=5,E|=m.getUTCSeconds()/2,o=m.getUTCFullYear()-1980,o<<=4,o|=m.getUTCMonth()+1,o<<=5,o|=m.getUTCDate(),D&&(d=e(1,1)+e(n(I),4)+Y,l+="up"+e(d.length,2)+d),u&&(U=e(1,1)+e(n(M),4)+F,l+="uc"+e(U.length,2)+U);var p="";return p+="\n\0",p+=e(f,2),p+=C.magic,p+=e(E,2),p+=e(o,2),p+=e(G.crc32,4),p+=e(G.compressedSize,4),p+=e(G.uncompressedSize,4),p+=e(I.length,2),p+=e(l.length,2),{fileRecord:r.LOCAL_FILE_HEADER+p+I+l,dirRecord:r.CENTRAL_FILE_HEADER+e(R,2)+p+e(M.length,2)+"\0\0\0\0"+e(H,4)+e(g,4)+I+l+M}}var i=A("../utils"),Q=A("../stream/GenericWorker"),s=A("../utf8"),n=A("../crc32"),r=A("../signature");function c(A,B,t,e){Q.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=t,this.encodeFileName=e,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,Q),c.prototype.push=function(A){var B=A.meta.percent||0,t=this.entriesCount,e=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,Q.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:t?(B+100*(t-e-1))/t:100}}))},c.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var B=this.streamFiles&&!A.file.dir;if(B){var t=g(A,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(A){this.accumulate=!1;var B=this.streamFiles&&!A.file.dir,t=g(A,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),B)this.push({data:function(A){return r.DATA_DESCRIPTOR+e(A.crc32,4)+e(A.compressedSize,4)+e(A.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var A=this.bytesWritten,B=0;B=this.index;B--)t=(t<<8)+this.byteAt(B);return this.index+=A,t},readString:function(A){return e.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},B.exports=g},{"../utils":32}],19:[function(A,B,t){"use strict";var e=A("./Uint8ArrayReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.readData=function(A){this.checkOffset(A);var B=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,B,t){"use strict";var e=A("./DataReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},g.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},g.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},g.prototype.readData=function(A){this.checkOffset(A);var B=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./DataReader":18}],21:[function(A,B,t){"use strict";var e=A("./ArrayReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.readData=function(A){if(this.checkOffset(A),0===A)return new Uint8Array(0);var B=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./ArrayReader":17}],22:[function(A,B,t){"use strict";var e=A("../utils"),g=A("../support"),i=A("./ArrayReader"),Q=A("./StringReader"),s=A("./NodeBufferReader"),n=A("./Uint8ArrayReader");B.exports=function(A){var B=e.getTypeOf(A);return e.checkSupport(B),"string"!==B||g.uint8array?"nodebuffer"===B?new s(A):g.uint8array?new n(e.transformTo("uint8array",A)):new i(e.transformTo("array",A)):new Q(A)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,B,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},{}],24:[function(A,B,t){"use strict";var e=A("./GenericWorker"),g=A("../utils");function i(A){e.call(this,"ConvertWorker to "+A),this.destType=A}g.inherits(i,e),i.prototype.processChunk=function(A){this.push({data:g.transformTo(this.destType,A.data),meta:A.meta})},B.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(A,B,t){"use strict";var e=A("./GenericWorker"),g=A("../crc32");function i(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(i,e),i.prototype.processChunk=function(A){this.streamInfo.crc32=g(A.data,this.streamInfo.crc32||0),this.push(A)},B.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,B,t){"use strict";var e=A("../utils"),g=A("./GenericWorker");function i(A){g.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}e.inherits(i,g),i.prototype.processChunk=function(A){if(A){var B=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=B+A.data.length}g.prototype.processChunk.call(this,A)},B.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(A,B,t){"use strict";var e=A("../utils"),g=A("./GenericWorker");function i(A){g.call(this,"DataWorker");var B=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then((function(A){B.dataIsReady=!0,B.data=A,B.max=A&&A.length||0,B.type=e.getTypeOf(A),B.isPaused||B._tickAndRepeat()}),(function(A){B.error(A)}))}e.inherits(i,g),i.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,B=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,B);break;case"uint8array":A=this.data.subarray(this.index,B);break;case"array":case"nodebuffer":A=this.data.slice(this.index,B)}return this.index=B,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},B.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(A,B,t){"use strict";function e(A){this.name=A||"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}e.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,B){return this._listeners[A].push(B),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,B){if(this._listeners[A])for(var t=0;t "+A:A}},B.exports=e},{}],29:[function(A,t,e){"use strict";var g=A("../utils"),i=A("./ConvertWorker"),Q=A("./GenericWorker"),s=A("../base64"),n=A("../support"),r=A("../external"),c=null;if(n.nodestream)try{c=A("../nodejs/NodejsStreamOutputAdapter")}catch(A){}function E(A,B,t){var e=B;switch(B){case"blob":case"arraybuffer":e="uint8array";break;case"base64":e="string"}try{this._internalType=e,this._outputType=B,this._mimeType=t,g.checkSupport(e),this._worker=A.pipe(new i(e)),A.lock()}catch(A){this._worker=new Q("error"),this._worker.error(A)}}E.prototype={accumulate:function(A){return function(A,t){return new r.Promise((function(e,i){var Q=[],n=A._internalType,r=A._outputType,c=A._mimeType;A.on("data",(function(A,B){Q.push(A),t&&t(B)})).on("error",(function(A){Q=[],i(A)})).on("end",(function(){try{var A=function(A,B,t){switch(A){case"blob":return g.newBlob(g.transformTo("arraybuffer",B),t);case"base64":return s.encode(B);default:return g.transformTo(A,B)}}(r,function(A,t){var e,g=0,i=null,Q=0;for(e=0;e>>6:(t<65536?B[Q++]=224|t>>>12:(B[Q++]=240|t>>>18,B[Q++]=128|t>>>12&63),B[Q++]=128|t>>>6&63),B[Q++]=128|63&t);return B}(A)},t.utf8decode=function(A){return g.nodebuffer?e.transformTo("nodebuffer",A).toString("utf-8"):function(A){var B,t,g,i,Q=A.length,n=new Array(2*Q);for(B=t=0;B>10&1023,n[t++]=56320|1023&g)}return n.length!==t&&(n.subarray?n=n.subarray(0,t):n.length=t),e.applyFromCharCode(n)}(A=e.transformTo(g.uint8array?"uint8array":"array",A))},e.inherits(r,Q),r.prototype.processChunk=function(A){var B=e.transformTo(g.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var i=B;(B=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),B.set(i,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var Q=function(A,B){var t;for((B=B||A.length)>A.length&&(B=A.length),t=B-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?B:t+s[A[t]]>B?t:B}(B),n=B;Q!==B.length&&(g.uint8array?(n=B.subarray(0,Q),this.leftOver=B.subarray(Q,B.length)):(n=B.slice(0,Q),this.leftOver=B.slice(Q,B.length))),this.push({data:t.utf8decode(n),meta:A.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,e.inherits(c,Q),c.prototype.processChunk=function(A){this.push({data:t.utf8encode(A.data),meta:A.meta})},t.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,B,e){"use strict";var g=A("./support"),i=A("./base64"),Q=A("./nodejsUtils"),s=A("./external");function n(A){return A}function r(A,B){for(var t=0;t>8;this.dir=!!(16&this.externalFileAttributes),0==A&&(this.dosPermissions=63&this.externalFileAttributes),3==A&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=e(this.extraFields[1].value);this.uncompressedSize===g.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===g.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===g.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===g.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var B,t,e,g=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4>>6:(t<65536?B[Q++]=224|t>>>12:(B[Q++]=240|t>>>18,B[Q++]=128|t>>>12&63),B[Q++]=128|t>>>6&63),B[Q++]=128|63&t);return B},t.buf2binstring=function(A){return n(A,A.length)},t.binstring2buf=function(A){for(var B=new e.Buf8(A.length),t=0,g=B.length;t>10&1023,r[e++]=56320|1023&g)}return n(r,e)},t.utf8border=function(A,B){var t;for((B=B||A.length)>A.length&&(B=A.length),t=B-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?B:t+Q[A[t]]>B?t:B}},{"./common":41}],43:[function(A,B,t){"use strict";B.exports=function(A,B,t,e){for(var g=65535&A|0,i=A>>>16&65535|0,Q=0;0!==t;){for(t-=Q=2e3>>1:A>>>1;B[t]=A}return B}();B.exports=function(A,B,t,g){var i=e,Q=g+t;A^=-1;for(var s=g;s>>8^i[255&(A^B[s])];return-1^A}},{}],46:[function(A,B,t){"use strict";var e,g=A("../utils/common"),i=A("./trees"),Q=A("./adler32"),s=A("./crc32"),n=A("./messages"),r=-2,c=258,E=262,o=113;function w(A,B){return A.msg=n[B],B}function C(A){return(A<<1)-(4A.avail_out&&(t=A.avail_out),0!==t&&(g.arraySet(A.output,B.pending_buf,B.pending_out,t,A.next_out),A.next_out+=t,B.pending_out+=t,A.total_out+=t,A.avail_out-=t,B.pending-=t,0===B.pending&&(B.pending_out=0))}function Y(A,B){i._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,B),A.block_start=A.strstart,I(A.strm)}function h(A,B){A.pending_buf[A.pending++]=B}function M(A,B){A.pending_buf[A.pending++]=B>>>8&255,A.pending_buf[A.pending++]=255&B}function F(A,B){var t,e,g=A.max_chain_length,i=A.strstart,Q=A.prev_length,s=A.nice_match,n=A.strstart>A.w_size-E?A.strstart-(A.w_size-E):0,r=A.window,o=A.w_mask,w=A.prev,C=A.strstart+c,a=r[i+Q-1],I=r[i+Q];A.prev_length>=A.good_match&&(g>>=2),s>A.lookahead&&(s=A.lookahead);do{if(r[(t=B)+Q]===I&&r[t+Q-1]===a&&r[t]===r[i]&&r[++t]===r[i+1]){i+=2,t++;do{}while(r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&in&&0!=--g);return Q<=A.lookahead?Q:A.lookahead}function D(A){var B,t,e,i,n,r,c,o,w,C,a=A.w_size;do{if(i=A.window_size-A.lookahead-A.strstart,A.strstart>=a+(a-E)){for(g.arraySet(A.window,A.window,a,a,0),A.match_start-=a,A.strstart-=a,A.block_start-=a,B=t=A.hash_size;e=A.head[--B],A.head[B]=a<=e?e-a:0,--t;);for(B=t=a;e=A.prev[--B],A.prev[B]=a<=e?e-a:0,--t;);i+=a}if(0===A.strm.avail_in)break;if(r=A.strm,c=A.window,o=A.strstart+A.lookahead,C=void 0,(w=i)<(C=r.avail_in)&&(C=w),t=0===C?0:(r.avail_in-=C,g.arraySet(c,r.input,r.next_in,C,o),1===r.state.wrap?r.adler=Q(r.adler,c,C,o):2===r.state.wrap&&(r.adler=s(r.adler,c,C,o)),r.next_in+=C,r.total_in+=C,C),A.lookahead+=t,A.lookahead+A.insert>=3)for(n=A.strstart-A.insert,A.ins_h=A.window[n],A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3)if(e=i._tr_tally(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3&&A.match_length<=A.prev_length){for(g=A.strstart+A.lookahead-3,e=i._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=g&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(t=A.pending_buf_size-5);;){if(A.lookahead<=1){if(D(A),0===A.lookahead&&0===B)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;var e=A.block_start+t;if((0===A.strstart||A.strstart>=e)&&(A.lookahead=A.strstart-e,A.strstart=e,Y(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-E&&(Y(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(Y(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(Y(A,!1),A.strm.avail_out),1)})),new d(4,4,8,4,u),new d(4,5,16,8,u),new d(4,6,32,32,u),new d(4,4,16,16,l),new d(8,16,32,32,l),new d(8,16,128,128,l),new d(8,32,128,256,l),new d(32,128,258,1024,l),new d(32,258,258,4096,l)],t.deflateInit=function(A,B){return G(A,B,8,15,8,0)},t.deflateInit2=G,t.deflateReset=m,t.deflateResetKeep=N,t.deflateSetHeader=function(A,B){return A&&A.state?2!==A.state.wrap?r:(A.state.gzhead=B,0):r},t.deflate=function(A,B){var t,g,Q,n;if(!A||!A.state||5>8&255),h(g,g.gzhead.time>>16&255),h(g,g.gzhead.time>>24&255),h(g,9===g.level?2:2<=g.strategy||g.level<2?4:0),h(g,255&g.gzhead.os),g.gzhead.extra&&g.gzhead.extra.length&&(h(g,255&g.gzhead.extra.length),h(g,g.gzhead.extra.length>>8&255)),g.gzhead.hcrc&&(A.adler=s(A.adler,g.pending_buf,g.pending,0)),g.gzindex=0,g.status=69):(h(g,0),h(g,0),h(g,0),h(g,0),h(g,0),h(g,9===g.level?2:2<=g.strategy||g.level<2?4:0),h(g,3),g.status=o);else{var E=8+(g.w_bits-8<<4)<<8;E|=(2<=g.strategy||g.level<2?0:g.level<6?1:6===g.level?2:3)<<6,0!==g.strstart&&(E|=32),E+=31-E%31,g.status=o,M(g,E),0!==g.strstart&&(M(g,A.adler>>>16),M(g,65535&A.adler)),A.adler=1}if(69===g.status)if(g.gzhead.extra){for(Q=g.pending;g.gzindex<(65535&g.gzhead.extra.length)&&(g.pending!==g.pending_buf_size||(g.gzhead.hcrc&&g.pending>Q&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),I(A),Q=g.pending,g.pending!==g.pending_buf_size));)h(g,255&g.gzhead.extra[g.gzindex]),g.gzindex++;g.gzhead.hcrc&&g.pending>Q&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),g.gzindex===g.gzhead.extra.length&&(g.gzindex=0,g.status=73)}else g.status=73;if(73===g.status)if(g.gzhead.name){Q=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>Q&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),I(A),Q=g.pending,g.pending===g.pending_buf_size)){n=1;break}n=g.gzindexQ&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),0===n&&(g.gzindex=0,g.status=91)}else g.status=91;if(91===g.status)if(g.gzhead.comment){Q=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>Q&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),I(A),Q=g.pending,g.pending===g.pending_buf_size)){n=1;break}n=g.gzindexQ&&(A.adler=s(A.adler,g.pending_buf,g.pending-Q,Q)),0===n&&(g.status=103)}else g.status=103;if(103===g.status&&(g.gzhead.hcrc?(g.pending+2>g.pending_buf_size&&I(A),g.pending+2<=g.pending_buf_size&&(h(g,255&A.adler),h(g,A.adler>>8&255),A.adler=0,g.status=o)):g.status=o),0!==g.pending){if(I(A),0===A.avail_out)return g.last_flush=-1,0}else if(0===A.avail_in&&C(B)<=C(t)&&4!==B)return w(A,-5);if(666===g.status&&0!==A.avail_in)return w(A,-5);if(0!==A.avail_in||0!==g.lookahead||0!==B&&666!==g.status){var F=2===g.strategy?function(A,B){for(var t;;){if(0===A.lookahead&&(D(A),0===A.lookahead)){if(0===B)return 1;break}if(A.match_length=0,t=i._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(Y(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(Y(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(Y(A,!1),0===A.strm.avail_out)?1:2}(g,B):3===g.strategy?function(A,B){for(var t,e,g,Q,s=A.window;;){if(A.lookahead<=c){if(D(A),A.lookahead<=c&&0===B)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&0A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(t=i._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=i._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(Y(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(Y(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(Y(A,!1),0===A.strm.avail_out)?1:2}(g,B):e[g.level].func(g,B);if(3!==F&&4!==F||(g.status=666),1===F||3===F)return 0===A.avail_out&&(g.last_flush=-1),0;if(2===F&&(1===B?i._tr_align(g):5!==B&&(i._tr_stored_block(g,0,0,!1),3===B&&(a(g.head),0===g.lookahead&&(g.strstart=0,g.block_start=0,g.insert=0))),I(A),0===A.avail_out))return g.last_flush=-1,0}return 4!==B?0:g.wrap<=0?1:(2===g.wrap?(h(g,255&A.adler),h(g,A.adler>>8&255),h(g,A.adler>>16&255),h(g,A.adler>>24&255),h(g,255&A.total_in),h(g,A.total_in>>8&255),h(g,A.total_in>>16&255),h(g,A.total_in>>24&255)):(M(g,A.adler>>>16),M(g,65535&A.adler)),I(A),0=t.w_size&&(0===s&&(a(t.head),t.strstart=0,t.block_start=0,t.insert=0),o=new g.Buf8(t.w_size),g.arraySet(o,B,w-t.w_size,t.w_size,0),B=o,w=t.w_size),n=A.avail_in,c=A.next_in,E=A.input,A.avail_in=w,A.next_in=0,A.input=B,D(t);t.lookahead>=3;){for(e=t.strstart,i=t.lookahead-2;t.ins_h=(t.ins_h<>>=F=M>>>24,C-=F,0==(F=M>>>16&255))N[i++]=65535&M;else{if(!(16&F)){if(0==(64&F)){M=a[(65535&M)+(w&(1<>>=F,C-=F),C<15&&(w+=U[e++]<>>=F=M>>>24,C-=F,!(16&(F=M>>>16&255))){if(0==(64&F)){M=I[(65535&M)+(w&(1<>>=F,C-=F,(F=i-Q)>3,w&=(1<<(C-=D<<3))-1,A.next_in=e,A.next_out=i,A.avail_in=e>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function c(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(A){var B;return A&&A.state?(B=A.state,A.total_in=A.total_out=B.total=0,A.msg="",B.wrap&&(A.adler=1&B.wrap),B.mode=1,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new e.Buf32(852),B.distcode=B.distdyn=new e.Buf32(592),B.sane=1,B.back=-1,0):n}function o(A){var B;return A&&A.state?((B=A.state).wsize=0,B.whave=0,B.wnext=0,E(A)):n}function w(A,B){var t,e;return A&&A.state?(e=A.state,B<0?(t=0,B=-B):(t=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15=Q.wsize?(e.arraySet(Q.window,B,t-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(g<(i=Q.wsize-Q.wnext)&&(i=g),e.arraySet(Q.window,B,t-g,i,Q.wnext),(g-=i)?(e.arraySet(Q.window,B,t-g,g,0),Q.wnext=g,Q.whave=Q.wsize):(Q.wnext+=i,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave>>8&255,t.check=i(t.check,T,2,0),Y=I=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&I)<<8)+(I>>8))%31){A.msg="incorrect header check",t.mode=30;break}if(8!=(15&I)){A.msg="unknown compression method",t.mode=30;break}if(Y-=4,R=8+(15&(I>>>=4)),0===t.wbits)t.wbits=R;else if(R>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(T[0]=255&I,T[1]=I>>>8&255,t.check=i(t.check,T,2,0)),Y=I=0,t.mode=3;case 3:for(;Y<32;){if(0===C)break A;C--,I+=c[o++]<>>8&255,T[2]=I>>>16&255,T[3]=I>>>24&255,t.check=i(t.check,T,4,0)),Y=I=0,t.mode=4;case 4:for(;Y<16;){if(0===C)break A;C--,I+=c[o++]<>8),512&t.flags&&(T[0]=255&I,T[1]=I>>>8&255,t.check=i(t.check,T,2,0)),Y=I=0,t.mode=5;case 5:if(1024&t.flags){for(;Y<16;){if(0===C)break A;C--,I+=c[o++]<>>8&255,t.check=i(t.check,T,2,0)),Y=I=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(C<(u=t.length)&&(u=C),u&&(t.head&&(R=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),e.arraySet(t.head.extra,c,o,u,R)),512&t.flags&&(t.check=i(t.check,c,u,o)),C-=u,o+=u,t.length-=u),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===C)break A;for(u=0;R=c[o+u++],t.head&&R&&t.length<65536&&(t.head.name+=String.fromCharCode(R)),R&&u>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;Y<32;){if(0===C)break A;C--,I+=c[o++]<>>=7&Y,Y-=7&Y,t.mode=27;break}for(;Y<3;){if(0===C)break A;C--,I+=c[o++]<>>=1)){case 0:t.mode=14;break;case 1:if(h(t),t.mode=20,6!==B)break;I>>>=2,Y-=2;break A;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}I>>>=2,Y-=2;break;case 14:for(I>>>=7&Y,Y-=7&Y;Y<32;){if(0===C)break A;C--,I+=c[o++]<>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&I,Y=I=0,t.mode=15,6===B)break A;case 15:t.mode=16;case 16:if(u=t.length){if(C>>=5,Y-=5,t.ndist=1+(31&I),I>>>=5,Y-=5,t.ncode=4+(15&I),I>>>=4,Y-=4,286>>=3,Y-=3}for(;t.have<19;)t.lens[j[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,y={bits:t.lenbits},p=s(0,t.lens,0,19,t.lencode,0,t.work,y),t.lenbits=y.bits,p){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,m=65535&k,!((U=k>>>24)<=Y);){if(0===C)break A;C--,I+=c[o++]<>>=U,Y-=U,t.lens[t.have++]=m;else{if(16===m){for(J=U+2;Y>>=U,Y-=U,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}R=t.lens[t.have-1],u=3+(3&I),I>>>=2,Y-=2}else if(17===m){for(J=U+3;Y>>=U)),I>>>=3,Y-=3}else{for(J=U+7;Y>>=U)),I>>>=7,Y-=7}if(t.have+u>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;u--;)t.lens[t.have++]=R}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,y={bits:t.lenbits},p=s(1,t.lens,0,t.nlen,t.lencode,0,t.work,y),t.lenbits=y.bits,p){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,y={bits:t.distbits},p=s(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,y),t.distbits=y.bits,p){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===B)break A;case 20:t.mode=21;case 21:if(6<=C&&258<=a){A.next_out=w,A.avail_out=a,A.next_in=o,A.avail_in=C,t.hold=I,t.bits=Y,Q(A,D),w=A.next_out,E=A.output,a=A.avail_out,o=A.next_in,c=A.input,C=A.avail_in,I=t.hold,Y=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;N=(k=t.lencode[I&(1<>>16&255,m=65535&k,!((U=k>>>24)<=Y);){if(0===C)break A;C--,I+=c[o++]<>G)])>>>16&255,m=65535&k,!(G+(U=k>>>24)<=Y);){if(0===C)break A;C--,I+=c[o++]<>>=G,Y-=G,t.back+=G}if(I>>>=U,Y-=U,t.back+=U,t.length=m,0===N){t.mode=26;break}if(32&N){t.back=-1,t.mode=12;break}if(64&N){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&N,t.mode=22;case 22:if(t.extra){for(J=t.extra;Y>>=t.extra,Y-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;N=(k=t.distcode[I&(1<>>16&255,m=65535&k,!((U=k>>>24)<=Y);){if(0===C)break A;C--,I+=c[o++]<>G)])>>>16&255,m=65535&k,!(G+(U=k>>>24)<=Y);){if(0===C)break A;C--,I+=c[o++]<>>=G,Y-=G,t.back+=G}if(I>>>=U,Y-=U,t.back+=U,64&N){A.msg="invalid distance code",t.mode=30;break}t.offset=m,t.extra=15&N,t.mode=24;case 24:if(t.extra){for(J=t.extra;Y>>=t.extra,Y-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===a)break A;if(u=D-a,t.offset>u){if((u=t.offset-u)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}l=u>t.wnext?(u-=t.wnext,t.wsize-u):t.wnext-u,u>t.length&&(u=t.length),d=t.window}else d=E,l=w-t.offset,u=t.length;for(ah?(F=j[x+E[d]],y[J+E[d]]):(F=96,0),w=1<>f)+(C-=w)]=M<<24|F<<16|D|0,0!==C;);for(w=1<>=1;if(0!==w?(p&=w-1,p+=w):p=0,d++,0==--k[l]){if(l===N)break;l=B[t+E[d]]}if(m>>7)]}function U(A,B){A.pending_buf[A.pending++]=255&B,A.pending_buf[A.pending++]=B>>>8&255}function N(A,B,t){A.bi_valid>16-t?(A.bi_buf|=B<>16-A.bi_valid,A.bi_valid+=t-16):(A.bi_buf|=B<>>=1,t<<=1,0<--B;);return t>>>1}function f(A,B,t){var e,g,i=new Array(16),Q=0;for(e=1;e<=n;e++)i[e]=Q=Q+t[e-1]<<1;for(g=0;g<=B;g++){var s=A[2*g+1];0!==s&&(A[2*g]=G(i[s]++,s))}}function H(A){var B;for(B=0;B>1;1<=t;t--)y(A,i,t);for(g=r;t=A.heap[1],A.heap[1]=A.heap[A.heap_len--],y(A,i,1),e=A.heap[1],A.heap[--A.heap_max]=t,A.heap[--A.heap_max]=e,i[2*g]=i[2*t]+i[2*e],A.depth[g]=(A.depth[t]>=A.depth[e]?A.depth[t]:A.depth[e])+1,i[2*t+1]=i[2*e+1]=g,A.heap[1]=g++,y(A,i,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],function(A,B){var t,e,g,i,Q,s,r=B.dyn_tree,c=B.max_code,E=B.stat_desc.static_tree,o=B.stat_desc.has_stree,w=B.stat_desc.extra_bits,C=B.stat_desc.extra_base,a=B.stat_desc.max_length,I=0;for(i=0;i<=n;i++)A.bl_count[i]=0;for(r[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)a<(i=r[2*r[2*(e=A.heap[t])+1]+1]+1)&&(i=a,I++),r[2*e+1]=i,c>=7;e>>=1)if(1&t&&0!==A.dyn_ltree[2*B])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(B=32;B>>3,(Q=A.static_len+3+7>>>3)<=g&&(g=Q)):g=Q=t+5,t+4<=g&&-1!==B?S(A,B,t,e):4===A.strategy||Q===g?(N(A,2+(e?1:0),3),J(A,w,C)):(N(A,4+(e?1:0),3),function(A,B,t,e){var g;for(N(A,B-257,5),N(A,t-1,5),N(A,e-4,4),g=0;g>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&B,A.pending_buf[A.l_buf+A.last_lit]=255&t,A.last_lit++,0===B?A.dyn_ltree[2*t]++:(A.matches++,B--,A.dyn_ltree[2*(I[t]+i+1)]++,A.dyn_dtree[2*d(B)]++),A.last_lit===A.lit_bufsize-1},t._tr_align=function(A){N(A,2,3),m(A,256,w),function(A){16===A.bi_valid?(U(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):8<=A.bi_valid&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)}(A)}},{"../utils/common":41}],53:[function(A,B,t){"use strict";B.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(A,B,t){(function(A){!function(A,B){"use strict";if(!A.setImmediate){var t,e,i,Q,s=1,n={},r=!1,c=A.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(A);E=E&&E.setTimeout?E:A,t="[object process]"==={}.toString.call(A.process)?function(A){g.nextTick((function(){w(A)}))}:function(){if(A.postMessage&&!A.importScripts){var B=!0,t=A.onmessage;return A.onmessage=function(){B=!1},A.postMessage("","*"),A.onmessage=t,B}}()?(Q="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",C,!1):A.attachEvent("onmessage",C),function(B){A.postMessage(Q+B,"*")}):A.MessageChannel?((i=new MessageChannel).port1.onmessage=function(A){w(A.data)},function(A){i.port2.postMessage(A)}):c&&"onreadystatechange"in c.createElement("script")?(e=c.documentElement,function(A){var B=c.createElement("script");B.onreadystatechange=function(){w(A),B.onreadystatechange=null,e.removeChild(B),B=null},e.appendChild(B)}):function(A){setTimeout(w,0,A)},E.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var B=new Array(arguments.length-1),e=0;e>24&255;return{r:A>>16&255,g:A>>8&255,b:255&A,a:B>0?B:255}}static hexToRgb(A){A.startsWith("#")&&(A=A.substring(1));const B=parseInt(A,16);if(isNaN(B))return null;if(6===A.length)return{r:B>>16&255,g:B>>8&255,b:255&B};if(3===A.length){const A=B>>8&15,t=B>>4&15,e=15&B;return{r:A<<4|A,g:t<<4|t,b:e<<4|e}}return null}static rgbToHex(A){return t.decimalToHex(t.rgbToDecimal(A))}static rgbToDecimal(A){return(A.r<<16)+(A.g<<8)+A.b}static hexToDecimal(A){return t.rgbToDecimal(t.hexToRgb(A))}static hsvToRgb(A){let B=A.h%360;B<0&&(B+=360);const t=Math.max(0,Math.min(A.s,1)),e=Math.max(0,Math.min(A.v,1)),g=Math.floor(B/60),i=B/60-g,Q=e*(1-t),s=e*(1-t*i),n=e*(1-t*(1-i));let r,c,E;switch(g){default:case 0:r=e,c=n,E=Q;break;case 1:r=s,c=e,E=Q;break;case 2:r=Q,c=e,E=n;break;case 3:r=Q,c=s,E=e;break;case 4:r=n,c=Q,E=e;break;case 5:r=e,c=Q,E=s}return{r:Math.floor(255*r),g:Math.floor(255*c),b:Math.floor(255*E)}}static rgbToHsv(A){const B=A.r/255,t=A.g/255,e=A.b/255,g=Math.min(Math.min(B,t),e),i=Math.max(Math.max(B,t),e);let Q=0,s=0;if(g!==i){Q=60*((B===g?3:t===g?5:1)-(B===g?t-e:t===g?e-B:B-t)/(i-g))%360,s=(i-g)/i}return{h:Q,s:s,v:i}}static mixRgb(A,B,t){if(t<=0)return A;if(t>=1)return B;const e=1-t;return{r:e*A.r+t*B.r,g:e*A.g+t*B.g,b:e*A.b+t*B.b}}}A.exports=t},function(A,B,t){A.exports=function(){"use strict";var A=Array.prototype.slice;function B(A,B){B&&(A.prototype=Object.create(B.prototype)),A.prototype.constructor=A}function t(A){return Q(A)?A:L(A)}function e(A){return s(A)?A:P(A)}function g(A){return n(A)?A:v(A)}function i(A){return Q(A)&&!r(A)?A:W(A)}function Q(A){return!(!A||!A[E])}function s(A){return!(!A||!A[o])}function n(A){return!(!A||!A[w])}function r(A){return s(A)||n(A)}function c(A){return!(!A||!A[C])}B(e,t),B(g,t),B(i,t),t.isIterable=Q,t.isKeyed=s,t.isIndexed=n,t.isAssociative=r,t.isOrdered=c,t.Keyed=e,t.Indexed=g,t.Set=i;var E="@@__IMMUTABLE_ITERABLE__@@",o="@@__IMMUTABLE_KEYED__@@",w="@@__IMMUTABLE_INDEXED__@@",C="@@__IMMUTABLE_ORDERED__@@",a={},I={value:!1},Y={value:!1};function h(A){return A.value=!1,A}function M(A){A&&(A.value=!0)}function F(){}function D(A,B){B=B||0;for(var t=Math.max(0,A.length-B),e=new Array(t),g=0;g>>0;if(""+t!==B||4294967295===t)return NaN;B=t}return B<0?u(A)+B:B}function d(){return!0}function U(A,B,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===B||void 0!==t&&B>=t)}function N(A,B){return G(A,B,0)}function m(A,B){return G(A,B,B)}function G(A,B,t){return void 0===A?t:A<0?Math.max(0,B+A):void 0===B?A:Math.min(B,A)}var f,H,R,p="function"==typeof Symbol&&Symbol.iterator,y=p||"@@iterator";function J(A){this.next=A}function k(A,B,t,e){var g=0===A?B:1===A?t:[B,t];return e?e.value=g:e={value:g,done:!1},e}function T(){return{value:void 0,done:!0}}function j(A){return!!b(A)}function x(A){return A&&"function"==typeof A.next}function S(A){var B=b(A);return B&&B.call(A)}function b(A){var B=A&&(p&&A[p]||A["@@iterator"]);if("function"==typeof B)return B}function z(A){return A&&"number"==typeof A.length}function L(A){return null==A?_():Q(A)?A.toSeq():function(A){var B=AA(A)||"object"==typeof A&&new K(A);if(!B)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return B}(A)}function P(A){return null==A?_().toKeyedSeq():Q(A)?s(A)?A.toSeq():A.fromEntrySeq():q(A)}function v(A){return null==A?_():Q(A)?s(A)?A.entrySeq():A.toIndexedSeq():$(A)}function W(A){return(null==A?_():Q(A)?s(A)?A.entrySeq():A:$(A)).toSetSeq()}function V(A){this._array=A,this.size=A.length}function K(A){var B=Object.keys(A);this._object=A,this._keys=B,this.size=B.length}function O(A){this._iterable=A,this.size=A.length||A.size}function X(A){this._iterator=A,this._iteratorCache=[]}function Z(A){return!(!A||!A["@@__IMMUTABLE_SEQ__@@"])}function _(){return f||(f=new V([]))}function q(A){var B=Array.isArray(A)?new V(A).fromEntrySeq():x(A)?new X(A).fromEntrySeq():j(A)?new O(A).fromEntrySeq():"object"==typeof A?new K(A):void 0;if(!B)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return B}function $(A){var B=AA(A);if(!B)throw new TypeError("Expected Array or iterable object of values: "+A);return B}function AA(A){return z(A)?new V(A):x(A)?new X(A):j(A)?new O(A):void 0}function BA(A,B,t,e){var g=A._cache;if(g){for(var i=g.length-1,Q=0;Q<=i;Q++){var s=g[t?i-Q:Q];if(!1===B(s[1],e?s[0]:Q,A))return Q+1}return Q}return A.__iterateUncached(B,t)}function tA(A,B,t,e){var g=A._cache;if(g){var i=g.length-1,Q=0;return new J((function(){var A=g[t?i-Q:Q];return Q++>i?{value:void 0,done:!0}:k(B,e?A[0]:Q-1,A[1])}))}return A.__iteratorUncached(B,t)}function eA(A,B){return B?function A(B,t,e,g){return Array.isArray(t)?B.call(g,e,v(t).map((function(e,g){return A(B,e,g,t)}))):iA(t)?B.call(g,e,P(t).map((function(e,g){return A(B,e,g,t)}))):t}(B,A,"",{"":A}):gA(A)}function gA(A){return Array.isArray(A)?v(A).map(gA).toList():iA(A)?P(A).map(gA).toMap():A}function iA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function QA(A,B){if(A===B||A!=A&&B!=B)return!0;if(!A||!B)return!1;if("function"==typeof A.valueOf&&"function"==typeof B.valueOf){if((A=A.valueOf())===(B=B.valueOf())||A!=A&&B!=B)return!0;if(!A||!B)return!1}return!("function"!=typeof A.equals||"function"!=typeof B.equals||!A.equals(B))}function sA(A,B){if(A===B)return!0;if(!Q(B)||void 0!==A.size&&void 0!==B.size&&A.size!==B.size||void 0!==A.__hash&&void 0!==B.__hash&&A.__hash!==B.__hash||s(A)!==s(B)||n(A)!==n(B)||c(A)!==c(B))return!1;if(0===A.size&&0===B.size)return!0;var t=!r(A);if(c(A)){var e=A.entries();return B.every((function(A,B){var g=e.next().value;return g&&QA(g[1],A)&&(t||QA(g[0],B))}))&&e.next().done}var g=!1;if(void 0===A.size)if(void 0===B.size)"function"==typeof A.cacheResult&&A.cacheResult();else{g=!0;var i=A;A=B,B=i}var E=!0,o=B.__iterate((function(B,e){if(t?!A.has(B):g?!QA(B,A.get(e,a)):!QA(A.get(e,a),B))return E=!1,!1}));return E&&A.size===o}function nA(A,B){if(!(this instanceof nA))return new nA(A,B);if(this._value=A,this.size=void 0===B?1/0:Math.max(0,B),0===this.size){if(H)return H;H=this}}function rA(A,B){if(!A)throw new Error(B)}function cA(A,B,t){if(!(this instanceof cA))return new cA(A,B,t);if(rA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===B&&(B=1/0),t=void 0===t?1:Math.abs(t),Be?{value:void 0,done:!0}:k(A,g,t[B?e-g++:g++])}))},B(K,P),K.prototype.get=function(A,B){return void 0===B||this.has(A)?this._object[A]:B},K.prototype.has=function(A){return this._object.hasOwnProperty(A)},K.prototype.__iterate=function(A,B){for(var t=this._object,e=this._keys,g=e.length-1,i=0;i<=g;i++){var Q=e[B?g-i:i];if(!1===A(t[Q],Q,this))return i+1}return i},K.prototype.__iterator=function(A,B){var t=this._object,e=this._keys,g=e.length-1,i=0;return new J((function(){var Q=e[B?g-i:i];return i++>g?{value:void 0,done:!0}:k(A,Q,t[Q])}))},K.prototype[C]=!0,B(O,v),O.prototype.__iterateUncached=function(A,B){if(B)return this.cacheResult().__iterate(A,B);var t=S(this._iterable),e=0;if(x(t))for(var g;!(g=t.next()).done&&!1!==A(g.value,e++,this););return e},O.prototype.__iteratorUncached=function(A,B){if(B)return this.cacheResult().__iterator(A,B);var t=S(this._iterable);if(!x(t))return new J(T);var e=0;return new J((function(){var B=t.next();return B.done?B:k(A,e++,B.value)}))},B(X,v),X.prototype.__iterateUncached=function(A,B){if(B)return this.cacheResult().__iterate(A,B);for(var t,e=this._iterator,g=this._iteratorCache,i=0;i=e.length){var B=t.next();if(B.done)return B;e[g]=B.value}return k(A,g,e[g++])}))},B(nA,v),nA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},nA.prototype.get=function(A,B){return this.has(A)?this._value:B},nA.prototype.includes=function(A){return QA(this._value,A)},nA.prototype.slice=function(A,B){var t=this.size;return U(A,B,t)?this:new nA(this._value,m(B,t)-N(A,t))},nA.prototype.reverse=function(){return this},nA.prototype.indexOf=function(A){return QA(this._value,A)?0:-1},nA.prototype.lastIndexOf=function(A){return QA(this._value,A)?this.size:-1},nA.prototype.__iterate=function(A,B){for(var t=0;t=0&&B=0&&tt?{value:void 0,done:!0}:k(A,i++,Q)}))},cA.prototype.equals=function(A){return A instanceof cA?this._start===A._start&&this._end===A._end&&this._step===A._step:sA(this,A)},B(EA,t),B(oA,EA),B(wA,EA),B(CA,EA),EA.Keyed=oA,EA.Indexed=wA,EA.Set=CA;var aA="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(A,B){var t=65535&(A|=0),e=65535&(B|=0);return t*e+((A>>>16)*e+t*(B>>>16)<<16>>>0)|0};function IA(A){return A>>>1&1073741824|3221225471&A}function YA(A){if(!1===A||null==A)return 0;if("function"==typeof A.valueOf&&(!1===(A=A.valueOf())||null==A))return 0;if(!0===A)return 1;var B=typeof A;if("number"===B){if(A!=A||A===1/0)return 0;var t=0|A;for(t!==A&&(t^=4294967295*A);A>4294967295;)t^=A/=4294967295;return IA(t)}if("string"===B)return A.length>UA?function(A){var B=GA[A];return void 0===B&&(B=hA(A),mA===NA&&(mA=0,GA={}),mA++,GA[A]=B),B}(A):hA(A);if("function"==typeof A.hashCode)return A.hashCode();if("object"===B)return function(A){var B;if(uA&&void 0!==(B=MA.get(A)))return B;if(void 0!==(B=A[dA]))return B;if(!DA){if(void 0!==(B=A.propertyIsEnumerable&&A.propertyIsEnumerable[dA]))return B;if(void 0!==(B=function(A){if(A&&A.nodeType>0)switch(A.nodeType){case 1:return A.uniqueID;case 9:return A.documentElement&&A.documentElement.uniqueID}}(A)))return B}if(B=++lA,1073741824&lA&&(lA=0),uA)MA.set(A,B);else{if(void 0!==FA&&!1===FA(A))throw new Error("Non-extensible objects are not allowed as keys.");if(DA)Object.defineProperty(A,dA,{enumerable:!1,configurable:!1,writable:!1,value:B});else if(void 0!==A.propertyIsEnumerable&&A.propertyIsEnumerable===A.constructor.prototype.propertyIsEnumerable)A.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},A.propertyIsEnumerable[dA]=B;else{if(void 0===A.nodeType)throw new Error("Unable to set a non-enumerable property on object.");A[dA]=B}}return B}(A);if("function"==typeof A.toString)return hA(A.toString());throw new Error("Value type "+B+" cannot be hashed.")}function hA(A){for(var B=0,t=0;t=B.length)throw new Error("Missing value for key: "+B[t]);A.set(B[t],B[t+1])}}))},HA.prototype.toString=function(){return this.__toString("Map {","}")},HA.prototype.get=function(A,B){return this._root?this._root.get(0,void 0,A,B):B},HA.prototype.set=function(A,B){return WA(this,A,B)},HA.prototype.setIn=function(A,B){return this.updateIn(A,a,(function(){return B}))},HA.prototype.remove=function(A){return WA(this,A,a)},HA.prototype.deleteIn=function(A){return this.updateIn(A,(function(){return a}))},HA.prototype.update=function(A,B,t){return 1===arguments.length?A(this):this.updateIn([A],B,t)},HA.prototype.updateIn=function(A,B,t){t||(t=B,B=void 0);var e=function A(B,t,e,g){var i=B===a,Q=t.next();if(Q.done){var s=i?e:B,n=g(s);return n===s?B:n}rA(i||B&&B.set,"invalid keyPath");var r=Q.value,c=i?a:B.get(r,a),E=A(c,t,e,g);return E===c?B:E===a?B.remove(r):(i?vA():B).set(r,E)}(this,XB(A),B,t);return e===a?void 0:e},HA.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vA()},HA.prototype.merge=function(){return XA(this,void 0,arguments)},HA.prototype.mergeWith=function(B){var t=A.call(arguments,1);return XA(this,B,t)},HA.prototype.mergeIn=function(B){var t=A.call(arguments,1);return this.updateIn(B,vA(),(function(A){return"function"==typeof A.merge?A.merge.apply(A,t):t[t.length-1]}))},HA.prototype.mergeDeep=function(){return XA(this,ZA,arguments)},HA.prototype.mergeDeepWith=function(B){var t=A.call(arguments,1);return XA(this,_A(B),t)},HA.prototype.mergeDeepIn=function(B){var t=A.call(arguments,1);return this.updateIn(B,vA(),(function(A){return"function"==typeof A.mergeDeep?A.mergeDeep.apply(A,t):t[t.length-1]}))},HA.prototype.sort=function(A){return DB(xB(this,A))},HA.prototype.sortBy=function(A,B){return DB(xB(this,B,A))},HA.prototype.withMutations=function(A){var B=this.asMutable();return A(B),B.wasAltered()?B.__ensureOwner(this.__ownerID):this},HA.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new F)},HA.prototype.asImmutable=function(){return this.__ensureOwner()},HA.prototype.wasAltered=function(){return this.__altered},HA.prototype.__iterator=function(A,B){return new bA(this,A,B)},HA.prototype.__iterate=function(A,B){var t=this,e=0;return this._root&&this._root.iterate((function(B){return e++,A(B[1],B[0],t)}),B),e},HA.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?PA(this.size,this._root,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},HA.isMap=RA;var pA,yA="@@__IMMUTABLE_MAP__@@",JA=HA.prototype;function kA(A,B){this.ownerID=A,this.entries=B}function TA(A,B,t){this.ownerID=A,this.bitmap=B,this.nodes=t}function jA(A,B,t){this.ownerID=A,this.count=B,this.nodes=t}function xA(A,B,t){this.ownerID=A,this.keyHash=B,this.entries=t}function SA(A,B,t){this.ownerID=A,this.keyHash=B,this.entry=t}function bA(A,B,t){this._type=B,this._reverse=t,this._stack=A._root&&LA(A._root)}function zA(A,B){return k(A,B[0],B[1])}function LA(A,B){return{node:A,index:0,__prev:B}}function PA(A,B,t,e){var g=Object.create(JA);return g.size=A,g._root=B,g.__ownerID=t,g.__hash=e,g.__altered=!1,g}function vA(){return pA||(pA=PA(0))}function WA(A,B,t){var e,g;if(A._root){var i=h(I),Q=h(Y);if(e=VA(A._root,A.__ownerID,0,void 0,B,t,i,Q),!Q.value)return A;g=A.size+(i.value?t===a?-1:1:0)}else{if(t===a)return A;g=1,e=new kA(A.__ownerID,[[B,t]])}return A.__ownerID?(A.size=g,A._root=e,A.__hash=void 0,A.__altered=!0,A):e?PA(g,e):vA()}function VA(A,B,t,e,g,i,Q,s){return A?A.update(B,t,e,g,i,Q,s):i===a?A:(M(s),M(Q),new SA(B,e,[g,i]))}function KA(A){return A.constructor===SA||A.constructor===xA}function OA(A,B,t,e,g){if(A.keyHash===e)return new xA(B,e,[A.entry,g]);var i,Q=31&(0===t?A.keyHash:A.keyHash>>>t),s=31&(0===t?e:e>>>t);return new TA(B,1<>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135,A+=A>>8,127&(A+=A>>16)}function AB(A,B,t,e){var g=e?A:D(A);return g[B]=t,g}JA[yA]=!0,JA.delete=JA.remove,JA.removeIn=JA.deleteIn,kA.prototype.get=function(A,B,t,e){for(var g=this.entries,i=0,Q=g.length;i=BB)return function(A,B,t,e){A||(A=new F);for(var g=new SA(A,YA(t),[t,e]),i=0;i>>A)),i=this.bitmap;return 0==(i&g)?e:this.nodes[$A(i&g-1)].get(A+5,B,t,e)},TA.prototype.update=function(A,B,t,e,g,i,Q){void 0===t&&(t=YA(e));var s=31&(0===B?t:t>>>B),n=1<=tB)return function(A,B,t,e,g){for(var i=0,Q=new Array(32),s=0;0!==t;s++,t>>>=1)Q[s]=1&t?B[i++]:void 0;return Q[e]=g,new jA(A,i+1,Q)}(A,o,r,s,C);if(c&&!C&&2===o.length&&KA(o[1^E]))return o[1^E];if(c&&C&&1===o.length&&KA(C))return C;var I=A&&A===this.ownerID,Y=c?C?r:r^n:r|n,h=c?C?AB(o,E,C,I):function(A,B,t){var e=A.length-1;if(t&&B===e)return A.pop(),A;for(var g=new Array(e),i=0,Q=0;Q>>A),i=this.nodes[g];return i?i.get(A+5,B,t,e):e},jA.prototype.update=function(A,B,t,e,g,i,Q){void 0===t&&(t=YA(e));var s=31&(0===B?t:t>>>B),n=g===a,r=this.nodes,c=r[s];if(n&&!c)return this;var E=VA(c,A,B+5,t,e,g,i,Q);if(E===c)return this;var o=this.count;if(c){if(!E&&--o0&&e<32?wB(0,e,5,null,new nB(t.toArray())):B.withMutations((function(A){A.setSize(e),t.forEach((function(B,t){return A.set(t,B)}))})))}function iB(A){return!(!A||!A[QB])}B(gB,wA),gB.of=function(){return this(arguments)},gB.prototype.toString=function(){return this.__toString("List [","]")},gB.prototype.get=function(A,B){if((A=l(this,A))>=0&&A=A.size||B<0)return A.withMutations((function(A){B<0?hB(A,B).set(0,t):hB(A,0,B+1).set(B,t)}));B+=A._origin;var e=A._tail,g=A._root,i=h(Y);return B>=FB(A._capacity)?e=aB(e,A.__ownerID,0,B,t,i):g=aB(g,A.__ownerID,A._level,B,t,i),i.value?A.__ownerID?(A._root=g,A._tail=e,A.__hash=void 0,A.__altered=!0,A):wB(A._origin,A._capacity,A._level,g,e):A}(this,A,B)},gB.prototype.remove=function(A){return this.has(A)?0===A?this.shift():A===this.size-1?this.pop():this.splice(A,1):this},gB.prototype.insert=function(A,B){return this.splice(A,0,B)},gB.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):CB()},gB.prototype.push=function(){var A=arguments,B=this.size;return this.withMutations((function(t){hB(t,0,B+A.length);for(var e=0;e>>B&31;if(e>=this.array.length)return new nB([],A);var g,i=0===e;if(B>0){var Q=this.array[e];if((g=Q&&Q.removeBefore(A,B-5,t))===Q&&i)return this}if(i&&!g)return this;var s=IB(this,A);if(!i)for(var n=0;n>>B&31;if(g>=this.array.length)return this;if(B>0){var i=this.array[g];if((e=i&&i.removeAfter(A,B-5,t))===i&&g===this.array.length-1)return this}var Q=IB(this,A);return Q.array.splice(g+1),e&&(Q.array[g]=e),Q};var rB,cB,EB={};function oB(A,B){var t=A._origin,e=A._capacity,g=FB(e),i=A._tail;return Q(A._root,A._level,0);function Q(A,s,n){return 0===s?function(A,Q){var s=Q===g?i&&i.array:A&&A.array,n=Q>t?0:t-Q,r=e-Q;return r>32&&(r=32),function(){if(n===r)return EB;var A=B?--r:n++;return s&&s[A]}}(A,n):function(A,g,i){var s,n=A&&A.array,r=i>t?0:t-i>>g,c=1+(e-i>>g);return c>32&&(c=32),function(){for(;;){if(s){var A=s();if(A!==EB)return A;s=null}if(r===c)return EB;var t=B?--c:r++;s=Q(n&&n[t],g-5,i+(t<>>t&31,n=A&&s0){var r=A&&A.array[s],c=aB(r,B,t-5,e,g,i);return c===r?A:((Q=IB(A,B)).array[s]=c,Q)}return n&&A.array[s]===g?A:(M(i),Q=IB(A,B),void 0===g&&s===Q.array.length-1?Q.array.pop():Q.array[s]=g,Q)}function IB(A,B){return B&&A&&B===A.ownerID?A:new nB(A?A.array.slice():[],B)}function YB(A,B){if(B>=FB(A._capacity))return A._tail;if(B<1<0;)t=t.array[B>>>e&31],e-=5;return t}}function hB(A,B,t){void 0!==B&&(B|=0),void 0!==t&&(t|=0);var e=A.__ownerID||new F,g=A._origin,i=A._capacity,Q=g+B,s=void 0===t?i:t<0?i+t:g+t;if(Q===g&&s===i)return A;if(Q>=s)return A.clear();for(var n=A._level,r=A._root,c=0;Q+c<0;)r=new nB(r&&r.array.length?[void 0,r]:[],e),c+=1<<(n+=5);c&&(Q+=c,g+=c,s+=c,i+=c);for(var E=FB(i),o=FB(s);o>=1<E?new nB([],e):w;if(w&&o>E&&Q5;I-=5){var Y=E>>>I&31;a=a.array[Y]=IB(a.array[Y],e)}a.array[E>>>5&31]=w}if(s=o)Q-=o,s-=o,n=5,r=null,C=C&&C.removeBefore(e,0,Q);else if(Q>g||o>>n&31;if(h!==o>>>n&31)break;h&&(c+=(1<g&&(r=r.removeBefore(e,n,Q-c)),r&&oi&&(i=r.size),Q(n)||(r=r.map((function(A){return eA(A)}))),e.push(r)}return i>A.size&&(A=A.setSize(i)),qA(A,B,e)}function FB(A){return A<32?0:A-1>>>5<<5}function DB(A){return null==A?dB():uB(A)?A:dB().withMutations((function(B){var t=e(A);fA(t.size),t.forEach((function(A,t){return B.set(t,A)}))}))}function uB(A){return RA(A)&&c(A)}function lB(A,B,t,e){var g=Object.create(DB.prototype);return g.size=A?A.size:0,g._map=A,g._list=B,g.__ownerID=t,g.__hash=e,g}function dB(){return cB||(cB=lB(vA(),CB()))}function UB(A,B,t){var e,g,i=A._map,Q=A._list,s=i.get(B),n=void 0!==s;if(t===a){if(!n)return A;Q.size>=32&&Q.size>=2*i.size?(e=(g=Q.filter((function(A,B){return void 0!==A&&s!==B}))).toKeyedSeq().map((function(A){return A[0]})).flip().toMap(),A.__ownerID&&(e.__ownerID=g.__ownerID=A.__ownerID)):(e=i.remove(B),g=s===Q.size-1?Q.pop():Q.set(s,void 0))}else if(n){if(t===Q.get(s)[1])return A;e=i,g=Q.set(s,[B,t])}else e=i.set(B,Q.size),g=Q.set(Q.size,[B,t]);return A.__ownerID?(A.size=e.size,A._map=e,A._list=g,A.__hash=void 0,A):lB(e,g)}function NB(A,B){this._iter=A,this._useKeys=B,this.size=A.size}function mB(A){this._iter=A,this.size=A.size}function GB(A){this._iter=A,this.size=A.size}function fB(A){this._iter=A,this.size=A.size}function HB(A){var B=VB(A);return B._iter=A,B.size=A.size,B.flip=function(){return A},B.reverse=function(){var B=A.reverse.apply(this);return B.flip=function(){return A.reverse()},B},B.has=function(B){return A.includes(B)},B.includes=function(B){return A.has(B)},B.cacheResult=KB,B.__iterateUncached=function(B,t){var e=this;return A.__iterate((function(A,t){return!1!==B(t,A,e)}),t)},B.__iteratorUncached=function(B,t){if(2===B){var e=A.__iterator(B,t);return new J((function(){var A=e.next();if(!A.done){var B=A.value[0];A.value[0]=A.value[1],A.value[1]=B}return A}))}return A.__iterator(1===B?0:1,t)},B}function RB(A,B,t){var e=VB(A);return e.size=A.size,e.has=function(B){return A.has(B)},e.get=function(e,g){var i=A.get(e,a);return i===a?g:B.call(t,i,e,A)},e.__iterateUncached=function(e,g){var i=this;return A.__iterate((function(A,g,Q){return!1!==e(B.call(t,A,g,Q),g,i)}),g)},e.__iteratorUncached=function(e,g){var i=A.__iterator(2,g);return new J((function(){var g=i.next();if(g.done)return g;var Q=g.value,s=Q[0];return k(e,s,B.call(t,Q[1],s,A),g)}))},e}function pB(A,B){var t=VB(A);return t._iter=A,t.size=A.size,t.reverse=function(){return A},A.flip&&(t.flip=function(){var B=HB(A);return B.reverse=function(){return A.flip()},B}),t.get=function(t,e){return A.get(B?t:-1-t,e)},t.has=function(t){return A.has(B?t:-1-t)},t.includes=function(B){return A.includes(B)},t.cacheResult=KB,t.__iterate=function(B,t){var e=this;return A.__iterate((function(A,t){return B(A,t,e)}),!t)},t.__iterator=function(B,t){return A.__iterator(B,!t)},t}function yB(A,B,t,e){var g=VB(A);return e&&(g.has=function(e){var g=A.get(e,a);return g!==a&&!!B.call(t,g,e,A)},g.get=function(e,g){var i=A.get(e,a);return i!==a&&B.call(t,i,e,A)?i:g}),g.__iterateUncached=function(g,i){var Q=this,s=0;return A.__iterate((function(A,i,n){if(B.call(t,A,i,n))return s++,g(A,e?i:s-1,Q)}),i),s},g.__iteratorUncached=function(g,i){var Q=A.__iterator(2,i),s=0;return new J((function(){for(;;){var i=Q.next();if(i.done)return i;var n=i.value,r=n[0],c=n[1];if(B.call(t,c,r,A))return k(g,e?r:s++,c,i)}}))},g}function JB(A,B,t,e){var g=A.size;if(void 0!==B&&(B|=0),void 0!==t&&(t===1/0?t=g:t|=0),U(B,t,g))return A;var i=N(B,g),Q=m(t,g);if(i!=i||Q!=Q)return JB(A.toSeq().cacheResult(),B,t,e);var s,n=Q-i;n==n&&(s=n<0?0:n);var r=VB(A);return r.size=0===s?s:A.size&&s||void 0,!e&&Z(A)&&s>=0&&(r.get=function(B,t){return(B=l(this,B))>=0&&Bs)return{value:void 0,done:!0};var A=g.next();return e||1===B?A:k(B,n-1,0===B?void 0:A.value[1],A)}))},r}function kB(A,B,t,e){var g=VB(A);return g.__iterateUncached=function(g,i){var Q=this;if(i)return this.cacheResult().__iterate(g,i);var s=!0,n=0;return A.__iterate((function(A,i,r){if(!s||!(s=B.call(t,A,i,r)))return n++,g(A,e?i:n-1,Q)})),n},g.__iteratorUncached=function(g,i){var Q=this;if(i)return this.cacheResult().__iterator(g,i);var s=A.__iterator(2,i),n=!0,r=0;return new J((function(){var A,i,c;do{if((A=s.next()).done)return e||1===g?A:k(g,r++,0===g?void 0:A.value[1],A);var E=A.value;i=E[0],c=E[1],n&&(n=B.call(t,c,i,Q))}while(n);return 2===g?A:k(g,i,c,A)}))},g}function TB(A,B){var t=s(A),g=[A].concat(B).map((function(A){return Q(A)?t&&(A=e(A)):A=t?q(A):$(Array.isArray(A)?A:[A]),A})).filter((function(A){return 0!==A.size}));if(0===g.length)return A;if(1===g.length){var i=g[0];if(i===A||t&&s(i)||n(A)&&n(i))return i}var r=new V(g);return t?r=r.toKeyedSeq():n(A)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=g.reduce((function(A,B){if(void 0!==A){var t=B.size;if(void 0!==t)return A+t}}),0),r}function jB(A,B,t){var e=VB(A);return e.__iterateUncached=function(e,g){var i=0,s=!1;return function A(n,r){var c=this;n.__iterate((function(g,n){return(!B||r0}function zB(A,B,e){var g=VB(A);return g.size=new V(e).map((function(A){return A.size})).min(),g.__iterate=function(A,B){for(var t,e=this.__iterator(1,B),g=0;!(t=e.next()).done&&!1!==A(t.value,g++,this););return g},g.__iteratorUncached=function(A,g){var i=e.map((function(A){return A=t(A),S(g?A.reverse():A)})),Q=0,s=!1;return new J((function(){var t;return s||(t=i.map((function(A){return A.next()})),s=t.some((function(A){return A.done}))),s?{value:void 0,done:!0}:k(A,Q++,B.apply(null,t.map((function(A){return A.value}))))}))},g}function LB(A,B){return Z(A)?B:A.constructor(B)}function PB(A){if(A!==Object(A))throw new TypeError("Expected [K, V] tuple: "+A)}function vB(A){return fA(A.size),u(A)}function WB(A){return s(A)?e:n(A)?g:i}function VB(A){return Object.create((s(A)?P:n(A)?v:W).prototype)}function KB(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):L.prototype.cacheResult.call(this)}function OB(A,B){return A>B?1:A=0;t--)B={value:arguments[t],next:B};return this.__ownerID?(this.size=A,this._head=B,this.__hash=void 0,this.__altered=!0,this):Ft(A,B)},at.prototype.pushAll=function(A){if(0===(A=g(A)).size)return this;fA(A.size);var B=this.size,t=this._head;return A.reverse().forEach((function(A){B++,t={value:A,next:t}})),this.__ownerID?(this.size=B,this._head=t,this.__hash=void 0,this.__altered=!0,this):Ft(B,t)},at.prototype.pop=function(){return this.slice(1)},at.prototype.unshift=function(){return this.push.apply(this,arguments)},at.prototype.unshiftAll=function(A){return this.pushAll(A)},at.prototype.shift=function(){return this.pop.apply(this,arguments)},at.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dt()},at.prototype.slice=function(A,B){if(U(A,B,this.size))return this;var t=N(A,this.size);if(m(B,this.size)!==this.size)return wA.prototype.slice.call(this,A,B);for(var e=this.size-t,g=this._head;t--;)g=g.next;return this.__ownerID?(this.size=e,this._head=g,this.__hash=void 0,this.__altered=!0,this):Ft(e,g)},at.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?Ft(this.size,this._head,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},at.prototype.__iterate=function(A,B){if(B)return this.reverse().__iterate(A);for(var t=0,e=this._head;e&&!1!==A(e.value,t++,this);)e=e.next;return t},at.prototype.__iterator=function(A,B){if(B)return this.reverse().__iterator(A);var t=0,e=this._head;return new J((function(){if(e){var B=e.value;return e=e.next,k(A,t++,B)}return{value:void 0,done:!0}}))},at.isStack=It;var Yt,ht="@@__IMMUTABLE_STACK__@@",Mt=at.prototype;function Ft(A,B,t,e){var g=Object.create(Mt);return g.size=A,g._head=B,g.__ownerID=t,g.__hash=e,g.__altered=!1,g}function Dt(){return Yt||(Yt=Ft(0))}function ut(A,B){var t=function(t){A.prototype[t]=B[t]};return Object.keys(B).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(B).forEach(t),A}Mt[ht]=!0,Mt.withMutations=JA.withMutations,Mt.asMutable=JA.asMutable,Mt.asImmutable=JA.asImmutable,Mt.wasAltered=JA.wasAltered,t.Iterator=J,ut(t,{toArray:function(){fA(this.size);var A=new Array(this.size||0);return this.valueSeq().__iterate((function(B,t){A[t]=B})),A},toIndexedSeq:function(){return new mB(this)},toJS:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJS?A.toJS():A})).__toJS()},toJSON:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJSON?A.toJSON():A})).__toJS()},toKeyedSeq:function(){return new NB(this,!0)},toMap:function(){return HA(this.toKeyedSeq())},toObject:function(){fA(this.size);var A={};return this.__iterate((function(B,t){A[t]=B})),A},toOrderedMap:function(){return DB(this.toKeyedSeq())},toOrderedSet:function(){return rt(s(this)?this.valueSeq():this)},toSet:function(){return Bt(s(this)?this.valueSeq():this)},toSetSeq:function(){return new GB(this)},toSeq:function(){return n(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return at(s(this)?this.valueSeq():this)},toList:function(){return gB(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(A,B){return 0===this.size?A+B:A+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+B},concat:function(){var B=A.call(arguments,0);return LB(this,TB(this,B))},includes:function(A){return this.some((function(B){return QA(B,A)}))},entries:function(){return this.__iterator(2)},every:function(A,B){fA(this.size);var t=!0;return this.__iterate((function(e,g,i){if(!A.call(B,e,g,i))return t=!1,!1})),t},filter:function(A,B){return LB(this,yB(this,A,B,!0))},find:function(A,B,t){var e=this.findEntry(A,B);return e?e[1]:t},forEach:function(A,B){return fA(this.size),this.__iterate(B?A.bind(B):A)},join:function(A){fA(this.size),A=void 0!==A?""+A:",";var B="",t=!0;return this.__iterate((function(e){t?t=!1:B+=A,B+=null!=e?e.toString():""})),B},keys:function(){return this.__iterator(0)},map:function(A,B){return LB(this,RB(this,A,B))},reduce:function(A,B,t){var e,g;return fA(this.size),arguments.length<2?g=!0:e=B,this.__iterate((function(B,i,Q){g?(g=!1,e=B):e=A.call(t,e,B,i,Q)})),e},reduceRight:function(A,B,t){var e=this.toKeyedSeq().reverse();return e.reduce.apply(e,arguments)},reverse:function(){return LB(this,pB(this,!0))},slice:function(A,B){return LB(this,JB(this,A,B,!0))},some:function(A,B){return!this.every(mt(A),B)},sort:function(A){return LB(this,xB(this,A))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(A,B){return u(A?this.toSeq().filter(A,B):this)},countBy:function(A,B){return function(A,B,t){var e=HA().asMutable();return A.__iterate((function(g,i){e.update(B.call(t,g,i,A),0,(function(A){return A+1}))})),e.asImmutable()}(this,A,B)},equals:function(A){return sA(this,A)},entrySeq:function(){var A=this;if(A._cache)return new V(A._cache);var B=A.toSeq().map(Nt).toIndexedSeq();return B.fromEntrySeq=function(){return A.toSeq()},B},filterNot:function(A,B){return this.filter(mt(A),B)},findEntry:function(A,B,t){var e=t;return this.__iterate((function(t,g,i){if(A.call(B,t,g,i))return e=[g,t],!1})),e},findKey:function(A,B){var t=this.findEntry(A,B);return t&&t[0]},findLast:function(A,B,t){return this.toKeyedSeq().reverse().find(A,B,t)},findLastEntry:function(A,B,t){return this.toKeyedSeq().reverse().findEntry(A,B,t)},findLastKey:function(A,B){return this.toKeyedSeq().reverse().findKey(A,B)},first:function(){return this.find(d)},flatMap:function(A,B){return LB(this,function(A,B,t){var e=WB(A);return A.toSeq().map((function(g,i){return e(B.call(t,g,i,A))})).flatten(!0)}(this,A,B))},flatten:function(A){return LB(this,jB(this,A,!0))},fromEntrySeq:function(){return new fB(this)},get:function(A,B){return this.find((function(B,t){return QA(t,A)}),void 0,B)},getIn:function(A,B){for(var t,e=this,g=XB(A);!(t=g.next()).done;){var i=t.value;if((e=e&&e.get?e.get(i,a):a)===a)return B}return e},groupBy:function(A,B){return function(A,B,t){var e=s(A),g=(c(A)?DB():HA()).asMutable();A.__iterate((function(i,Q){g.update(B.call(t,i,Q,A),(function(A){return(A=A||[]).push(e?[Q,i]:i),A}))}));var i=WB(A);return g.map((function(B){return LB(A,i(B))}))}(this,A,B)},has:function(A){return this.get(A,a)!==a},hasIn:function(A){return this.getIn(A,a)!==a},isSubset:function(A){return A="function"==typeof A.includes?A:t(A),this.every((function(B){return A.includes(B)}))},isSuperset:function(A){return(A="function"==typeof A.isSubset?A:t(A)).isSubset(this)},keyOf:function(A){return this.findKey((function(B){return QA(B,A)}))},keySeq:function(){return this.toSeq().map(Ut).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(A){return this.toKeyedSeq().reverse().keyOf(A)},max:function(A){return SB(this,A)},maxBy:function(A,B){return SB(this,B,A)},min:function(A){return SB(this,A?Gt(A):Rt)},minBy:function(A,B){return SB(this,B?Gt(B):Rt,A)},rest:function(){return this.slice(1)},skip:function(A){return this.slice(Math.max(0,A))},skipLast:function(A){return LB(this,this.toSeq().reverse().skip(A).reverse())},skipWhile:function(A,B){return LB(this,kB(this,A,B,!0))},skipUntil:function(A,B){return this.skipWhile(mt(A),B)},sortBy:function(A,B){return LB(this,xB(this,B,A))},take:function(A){return this.slice(0,Math.max(0,A))},takeLast:function(A){return LB(this,this.toSeq().reverse().take(A).reverse())},takeWhile:function(A,B){return LB(this,function(A,B,t){var e=VB(A);return e.__iterateUncached=function(e,g){var i=this;if(g)return this.cacheResult().__iterate(e,g);var Q=0;return A.__iterate((function(A,g,s){return B.call(t,A,g,s)&&++Q&&e(A,g,i)})),Q},e.__iteratorUncached=function(e,g){var i=this;if(g)return this.cacheResult().__iterator(e,g);var Q=A.__iterator(2,g),s=!0;return new J((function(){if(!s)return{value:void 0,done:!0};var A=Q.next();if(A.done)return A;var g=A.value,n=g[0],r=g[1];return B.call(t,r,n,i)?2===e?A:k(e,n,r,A):(s=!1,{value:void 0,done:!0})}))},e}(this,A,B))},takeUntil:function(A,B){return this.takeWhile(mt(A),B)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(A){if(A.size===1/0)return 0;var B=c(A),t=s(A),e=B?1:0;return function(A,B){return B=aA(B,3432918353),B=aA(B<<15|B>>>-15,461845907),B=aA(B<<13|B>>>-13,5),B=aA((B=(B+3864292196|0)^A)^B>>>16,2246822507),B=IA((B=aA(B^B>>>13,3266489909))^B>>>16)}(A.__iterate(t?B?function(A,B){e=31*e+pt(YA(A),YA(B))|0}:function(A,B){e=e+pt(YA(A),YA(B))|0}:B?function(A){e=31*e+YA(A)|0}:function(A){e=e+YA(A)|0}),e)}(this))}});var lt=t.prototype;lt[E]=!0,lt[y]=lt.values,lt.__toJS=lt.toArray,lt.__toStringMapper=ft,lt.inspect=lt.toSource=function(){return this.toString()},lt.chain=lt.flatMap,lt.contains=lt.includes,ut(e,{flip:function(){return LB(this,HB(this))},mapEntries:function(A,B){var t=this,e=0;return LB(this,this.toSeq().map((function(g,i){return A.call(B,[i,g],e++,t)})).fromEntrySeq())},mapKeys:function(A,B){var t=this;return LB(this,this.toSeq().flip().map((function(e,g){return A.call(B,e,g,t)})).flip())}});var dt=e.prototype;function Ut(A,B){return B}function Nt(A,B){return[B,A]}function mt(A){return function(){return!A.apply(this,arguments)}}function Gt(A){return function(){return-A.apply(this,arguments)}}function ft(A){return"string"==typeof A?JSON.stringify(A):String(A)}function Ht(){return D(arguments)}function Rt(A,B){return AB?-1:0}function pt(A,B){return A^B+2654435769+(A<<6)+(A>>2)|0}return dt[o]=!0,dt[y]=lt.entries,dt.__toJS=lt.toObject,dt.__toStringMapper=function(A,B){return JSON.stringify(B)+": "+ft(A)},ut(g,{toKeyedSeq:function(){return new NB(this,!1)},filter:function(A,B){return LB(this,yB(this,A,B,!1))},findIndex:function(A,B){var t=this.findEntry(A,B);return t?t[0]:-1},indexOf:function(A){var B=this.keyOf(A);return void 0===B?-1:B},lastIndexOf:function(A){var B=this.lastKeyOf(A);return void 0===B?-1:B},reverse:function(){return LB(this,pB(this,!1))},slice:function(A,B){return LB(this,JB(this,A,B,!1))},splice:function(A,B){var t=arguments.length;if(B=Math.max(0|B,0),0===t||2===t&&!B)return this;A=N(A,A<0?this.count():this.size);var e=this.slice(0,A);return LB(this,1===t?e:e.concat(D(arguments,2),this.slice(A+B)))},findLastIndex:function(A,B){var t=this.findLastEntry(A,B);return t?t[0]:-1},first:function(){return this.get(0)},flatten:function(A){return LB(this,jB(this,A,!1))},get:function(A,B){return(A=l(this,A))<0||this.size===1/0||void 0!==this.size&&A>this.size?B:this.find((function(B,t){return t===A}),void 0,B)},has:function(A){return(A=l(this,A))>=0&&(void 0!==this.size?this.size===1/0||AA/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:A=>Math.max(0,(A+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:A=>-A*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:A=>Math.abs(A)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:A=>(A=Math.round((Math.abs(A)+10)/10),Math.max(1,Math.min(A,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:A=>Math.max(-100,Math.min(A,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:A=>1-Math.max(0,Math.min(A,100))/100,shapeChanges:!1}},g.EFFECTS=Object.keys(g.EFFECT_INFO),g.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},A.exports=g},function(A,B,t){const e=t(60);A.exports=class extends e{constructor(A,B,t,e){let g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this._socket=A.getScratchLinkSocket("BLE"),this._socket.setOnOpen(this.requestPeripheral.bind(this)),this._socket.setOnClose(this.handleDisconnectError.bind(this)),this._socket.setOnError(this._handleRequestError.bind(this)),this._socket.setHandleMessage(this._handleMessage.bind(this)),this._sendMessage=this._socket.sendMessage.bind(this._socket),this._availablePeripherals={},this._connectCallback=e,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=g,this._discoverTimeoutID=null,this._extensionId=B,this._peripheralOptions=t,this._runtime=A,this._socket.open()}requestPeripheral(){this._availablePeripherals={},this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._discoverTimeoutID=window.setTimeout(this._handleDiscoverTimeout.bind(this),15e3),this.sendRemoteRequest("discover",this._peripheralOptions).catch(A=>{this._handleRequestError(A)})}connectPeripheral(A){this.sendRemoteRequest("connect",{peripheralId:A}).then(()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()}).catch(A=>{this._handleRequestError(A)})}disconnect(){this._connected&&(this._connected=!1),this._socket.isOpen()&&this._socket.close(),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECTED)}isConnected(){return this._connected}startNotifications(A,B){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const e={serviceId:A,characteristicId:B};return this._characteristicDidChangeCallback=t,this.sendRemoteRequest("startNotifications",e).catch(A=>{this.handleDisconnectError(A)})}read(A,B){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const e={serviceId:A,characteristicId:B};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(e.startNotifications=!0),t&&(this._characteristicDidChangeCallback=t),this.sendRemoteRequest("read",e).catch(A=>{this.handleDisconnectError(A)})}write(A,B,t){let e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i={serviceId:A,characteristicId:B,message:t};return e&&(i.encoding=e),null!==g&&(i.withResponse=g),this.sendRemoteRequest("write",i).catch(A=>{this.handleDisconnectError(A)})}didReceiveCall(A,B){switch(A){case"didDiscoverPeripheral":this._availablePeripherals[B.peripheralId]=B,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[B.peripheralId]=B,this._runtime.emit(this._runtime.constructor.USER_PICKED_PERIPHERAL,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidNotPickPeripheral":this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"characteristicDidChange":this._characteristicDidChangeCallback&&this._characteristicDidChangeCallback(B.message);break;case"ping":return 42}}handleDisconnectError(){this._connected&&(this.disconnect(),this._resetCallback&&this._resetCallback(),this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTION_LOST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId}))}_handleRequestError(){this._runtime.emit(this._runtime.constructor.PERIPHERAL_REQUEST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId})}_handleDiscoverTimeout(){this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT)}}},function(A,B,t){const e=t(0);A.exports=function(A){if("string"!=typeof A){if(!Array.isArray(A))return e.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})}},function(A,B,t){const e=t(0),g=[];class i{constructor(A){this.isLoop=!1,this.warpMode=A,this.justReported=null,this.reporting="",this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null}reset(){return this.isLoop=!1,this.warpMode=!1,this.justReported=null,this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null,this}reuse(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(A),this}static create(A){const B=g.pop();return void 0!==B?(B.warpMode=Boolean(A),B):new i(A)}static release(A){void 0!==A&&g.push(A.reset())}}class Q{constructor(A){this.topBlock=A,this.stack=[],this.stackFrames=[],this.status=0,this.isKilled=!1,this.target=null,this.blockContainer=null,this.requestScriptGlowInFrame=!1,this.blockGlowInFrame=null,this.warpTimer=null,this.justReported=null,this.triedToCompile=!1,this.isCompiled=!1,this.timer=null,this.generator=null,this.procedures=null}static get STATUS_RUNNING(){return 0}static get STATUS_PROMISE_WAIT(){return 1}static get STATUS_YIELD(){return 2}static get STATUS_YIELD_TICK(){return 3}static get STATUS_DONE(){return 4}static getIdFromTargetAndBlock(A,B){return"".concat(A.id,"&").concat(B)}getId(){return Q.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(A){if(this.stack.push(A),this.stack.length>this.stackFrames.length){const A=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(i.create(void 0!==A&&A.warpMode))}}reuseStackForNextBlock(A){this.stack[this.stack.length-1]=A,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return i.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let A=this.peekStack();for(;null!==A;){const B=this.target.blocks.getBlock(A);if(void 0!==B&&"procedures_call"===B.opcode)break;this.popStack(),A=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=Q.STATUS_DONE)}peekStack(){return this.stack.length>0?this.stack[this.stack.length-1]:null}peekStackFrame(){return this.stackFrames.length>0?this.stackFrames[this.stackFrames.length-1]:null}peekParentStackFrame(){return this.stackFrames.length>1?this.stackFrames[this.stackFrames.length-2]:null}pushReportedValue(A){this.justReported=void 0===A?null:A}initParams(){const A=this.peekStackFrame();null===A.params&&(A.params={})}pushParam(A,B){this.peekStackFrame().params[A]=B}getParam(A){for(let B=this.stackFrames.length-1;B>=0;B--){const t=this.stackFrames[B];if(null!==t.params)return t.params.hasOwnProperty(A)?t.params[A]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const A=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(A)}isRecursiveCall(A){let B=5;for(let t=this.stack.length-1-1;t>=0;t--){const e=this.target.blocks.getBlock(this.stack[t]);if("procedures_call"===e.opcode&&e.mutation.proccode===A)return!0;if(--B<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const A=t(206);this.triedToCompile=!0;const B=this.topBlock,g=this.blockContainer.getBlock(B)?this.blockContainer:this.target.runtime.flyoutBlocks,i=g.getCachedCompileResult(B);if(i&&!i.success)return;let Q;if(i)Q=i.value;else try{Q=A(this),g.cacheCompileResult(B,Q)}catch(A){return e.error("cannot compile script",this.target.getName(),A),g.cacheCompileError(B,A),void this.target.runtime.emitCompileError(this.target,A)}this.procedures={};for(const A of Object.keys(Q.procedures))this.procedures[A]=Q.procedures[A](this);this.generator=Q.startingFunction(this)(),this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}A.exports=Q},function(A,B,t){const e=t(7),g=t(0),i=t(74),{loadSvgString:Q,serializeSvgToString:s}=t(50),{parseVectorMetadata:n}=t(85),r=function(A,B,t,e){return new Promise(g=>{let i=A.asset.decodeText();if(void 0===t){const B=n(i);B&&(t=B,A.rotationCenterX=t[0],A.rotationCenterY=t[1])}if(e&&2===e){const t=s(Q(i,!0));if(i!==t){i=t;const e=B.storage;A.asset.encodeTextData(t,e.DataFormat.SVG,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}}A.skinId=B.renderer.createSVGSkin(i,t),A.size=B.renderer.getSkinSize(A.skinId),t||(t=B.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=t[0],A.rotationCenterY=t[1],A.bitmapResolution=1),B.isPackaged&&(A.asset=null),g(A)})},c=new class{constructor(){this.pool=[],this.clearSoon=null}clear(){this.clearSoon||(this.clearSoon=new Promise(A=>setTimeout(A,1e3)).then(()=>{this.pool.length=0,this.clearSoon=null}))}create(){return this.pool.pop()||document.createElement("canvas")}release(A){this.clear(),this.pool.push(A)}},E=A=>new Promise((B,t)=>{const e=new Image;e.onload=function(){B(e),e.onload=null,e.onerror=null},e.onerror=function(){t(new Error("Costume load failed. Asset could not be read.")),e.onload=null,e.onerror=null},e.src=A}),o=new i(async A=>{let B;for(let t=0;t<3;t++)try{if("function"==typeof createImageBitmap){const B=await createImageBitmap(new Blob([A.data.buffer],{type:A.assetType.contentType}));if(!B)throw new Error("createImageBitmap resolved with ".concat(B));return B}return await E(A.encodeDataURI())}catch(A){B||(B=A),g.warn(A),await new Promise(A=>setTimeout(A,2e3*Math.random()))}throw B},25),w=function(A,B,t){return function(A,B,t){return A&&A.asset?B.v2BitmapAdapter?Promise.all([A.asset,A.textLayerAsset].map(A=>A?o.do(A):null)).then(e=>{let[g,i]=e;if(!g)throw new Error("Loading bitmap costume base failed.");const Q=1===A.bitmapResolution?2:1;let s,n;if(i){n=c.create(),n.width=g.width,n.height=g.height;const A=n.getContext("2d");A.drawImage(g,0,0),A.drawImage(i,0,0),s=n}else s=g;return 1!==Q&&(s=B.v2BitmapAdapter.resize(s,s.width*Q,s.height*Q),n&&c.release(n)),s.reusable=!1,t&&(t[0]=t[0]*Q,t[1]=t[1]*Q,A.rotationCenterX=t[0],A.rotationCenterY=t[1]),A.bitmapResolution=2,delete A.textLayerMD5,delete A.textLayerAsset,{image:s,rotationCenter:t,assetMatchesBase:1===Q&&!i}}).finally(()=>{delete A.textLayerMD5,delete A.textLayerAsset}):Promise.reject("No V2 Bitmap adapter present."):Promise.reject("Costume load failed. Assets were missing.")}(A,B,t).then(t=>(t.assetMatchesBase||function(t){if(!B.v2BitmapAdapter)return Promise.reject("No V2 Bitmap adapter present.");const e=B.storage;A.asset=e.createAsset(e.AssetType.ImageBitmap,e.DataFormat.PNG,B.v2BitmapAdapter.convertDataURIToBinary(t),null,!0),A.dataFormat=e.DataFormat.PNG,A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}((A=>{if(A instanceof HTMLCanvasElement)return A.toDataURL();const B=c.create();B.width=A.width,B.height=A.height;B.getContext("2d").drawImage(A,0,0);const t=B.toDataURL();return c.release(B),t})(t.image)),t)).then(t=>{let e,{image:g,rotationCenter:i}=t;i&&(e=[i[0]/2,i[1]/2]),A.skinId=B.renderer.createBitmapSkin(g,A.bitmapResolution,e);const Q=B.renderer.getSkinSize(A.skinId);return A.size=[2*Q[0],2*Q[1]],i||(i=B.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=2*i[0],A.rotationCenterY=2*i[1],A.bitmapResolution=2),B.isPackaged&&(A.asset=null),A})},C=function(A,B){const t=A.asset,e=A.assetId,g=A.rotationCenterX,i=A.rotationCenterY,Q=A.bitmapResolution,s=A.dataFormat,n=B.storage.AssetType,c=A.dataFormat===n.ImageVector.runtimeFormat;A.assetId=c?B.storage.defaultAssetId.ImageVector:B.storage.defaultAssetId.ImageBitmap,A.asset=B.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat);return(c?r(A,B):w(A,B)).then(A=>(A.broken={},A.broken.assetId=e,A.broken.md5="".concat(e,".").concat(s),A.broken.asset=t,A.broken.dataFormat=s,A.broken.rotationCenterX=g,A.broken.rotationCenterY=i,A.broken.bitmapResolution=Q,A))},a=function(A,B,t){A.assetId=A.asset.assetId;if(!B.renderer)return g.warn("No rendering module present; cannot load costume: ",A.name),Promise.resolve(A);const e=B.storage.AssetType;let i;return"number"!=typeof A.rotationCenterX||isNaN(A.rotationCenterX)||"number"!=typeof A.rotationCenterY||isNaN(A.rotationCenterY)||(i=[A.rotationCenterX,A.rotationCenterY]),A.asset.assetType.runtimeFormat===e.ImageVector.runtimeFormat?r(A,B,i,t).catch(t=>(g.warn("Error loading vector image: ".concat(t)),C(A,B))):w(A,B,i).catch(t=>(g.warn("Error loading bitmap image: ".concat(t)),C(A,B)))};A.exports={loadCostume:function(A,B,t,i){const Q=e.splitFirst(A,"."),s=Q[0],n=Q[1].toLowerCase();if(B.dataFormat=n,B.asset)return a(B,t,i);if(!t.storage)return g.warn("No storage module present; cannot load costume asset: ",A),Promise.resolve(B);if(!t.storage.defaultAssetId)return g.warn("No default assets found"),Promise.resolve(B);const r=t.storage.AssetType,c="svg"===n?r.ImageVector:r.ImageBitmap,E=t.storage.load(c,s,n);let o;return o=B.textLayerMD5?t.storage.load(r.ImageBitmap,B.textLayerMD5,"png"):Promise.resolve(null),Promise.all([E,o]).then(A=>A[0]?(B.asset=A[0],A[1]&&(B.textLayerAsset=A[1]),a(B,t,i)):C(B,t)).catch(A=>(g.warn("Error loading costume: ",A),C(B,t)))},loadCostumeFromAsset:a}},function(A,B,t){const e=t(7),g=t(0),i=function(A,B,t,e){return A.assetId=B.assetId,t.audioEngine?t.audioEngine.decodeSoundPlayer(Object.assign({},A,{data:B.data})).then(B=>{A.soundId=B.id;const g=B.buffer;return A.rate=g.sampleRate,A.sampleCount=g.length,null!==e&&e.addSoundPlayer(B),t.isPackaged&&(A.asset=null),A}):(g.warn("No audio engine present; cannot load sound asset: ",A.md5),Promise.resolve(A))},Q=function(A,B,t){const e=A.asset,g=A.assetId,Q=A.sampleCount,s=A.rate,n=A.format,r=A.dataFormat;return A.assetId=B.storage.defaultAssetId.Sound,A.asset=B.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat),i(A,A.asset,B,t).then(A=>(A.broken={},A.broken.assetId=g,A.broken.md5="".concat(g,".").concat(r),A.broken.asset=e,A.broken.sampleCount=Q,A.broken.rate=s,A.broken.format=n,A.broken.dataFormat=r,A))};A.exports={loadSound:function(A,B,t){if(!B.storage)return g.warn("No storage module present; cannot load sound asset: ",A.md5),Promise.resolve(A);const s=e.splitFirst(A.md5,"."),n=s[0],r=s[1].toLowerCase();return A.dataFormat=r,(A.asset&&Promise.resolve(A.asset)||B.storage.load(B.storage.AssetType.Sound,n,r)).then(e=>(A.asset=e,e?i(A,e,B,t):(g.warn("Failed to find sound data: ",A.md5),Q(A,B,t)))).catch(e=>(g.warn("Failed to load sound: ".concat(A.md5," with error: ").concat(e)),Q(A,B,t)))},loadSoundFromAsset:i}},function(A,B,t){const e=t(16),g=t(87),i=t(9),Q=t(43),s=t(39),n=t(14),r=t(0),c=t(6),E=t(4),o=t(7),w=t(89),C=t(267),{loadCostume:a}=t(29),{loadSound:I}=t(30),{deserializeCostume:Y,deserializeSound:h}=t(90),M=Object.prototype.hasOwnProperty,F=["argument","colour","control","data","event","looks","math","motion","operator","procedures","sensing","sound"],D=12,u=13,l={math_number:[4,"NUM"],math_positive_number:[5,"NUM"],math_whole_number:[6,"NUM"],math_integer:[7,"NUM"],math_angle:[8,"NUM"],colour_picker:[9,"COLOUR"],text:[10,"TEXT"],event_broadcast_menu:[11,"BROADCAST_OPTION"],data_variable:[D,"VARIABLE"],data_listcontents:[u,"LIST"]},d=function(A){const B=function(A){if(M.call(l,A.opcode)){const B=l[A.opcode],t=B[0],e=B[1],g=A.fields[e],i=[t,g.value];return"event_broadcast_menu"===A.opcode?i.push(g.id):"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode||(i.push(g.id),A.topLevel&&(i.push(A.x?Math.round(A.x):0),i.push(A.y?Math.round(A.y):0))),i}return null}(A);if(B)return B;const t=Object.create(null);return t.opcode=A.opcode,t.next=A.next,t.parent=A.parent,t.inputs=function(A){const B=Object.create(null);for(const t in A)M.call(A,t)&&(A[t].block===A[t].shadow?B[t]=[1,A[t].block]:null===A[t].shadow?B[t]=[2,A[t].block]:B[t]=[3,A[t].block,A[t].shadow]);return B}(A.inputs),t.fields=function(A){const B=Object.create(null);for(const t in A)M.call(A,t)&&(B[t]=[A[t].value],A[t].hasOwnProperty("id")&&B[t].push(A[t].id));return B}(A.fields),t.shadow=A.shadow,A.topLevel?(t.topLevel=!0,t.x=A.x?Math.round(A.x):0,t.y=A.y?Math.round(A.y):0):t.topLevel=!1,A.mutation&&(t.mutation=A.mutation),A.comment&&(t.comment=A.comment),t},U=function(A,B){const t=A.inputs;for(const A in t){const e=t[A];for(let A=1;A"number"==typeof A||"string"==typeof A||"boolean"==typeof A,R=A=>{if(Array.isArray(A)){let B=null;for(let t=0;t=A.costumes.length)&&(r.warn("currentCostume property for target ".concat(A.name," is out of range")),A.currentCostume=E.clamp(A.currentCostume,0,A.costumes.length-1)),t.currentCostume=A.currentCostume,t.costumes=A.costumes.map(G),t.sounds=A.sounds.map(f),A.hasOwnProperty("volume")&&(t.volume=A.volume),A.hasOwnProperty("layerOrder")&&(t.layerOrder=A.layerOrder),t.isStage?(A.hasOwnProperty("tempo")&&(t.tempo=A.tempo),A.hasOwnProperty("videoTransparency")&&(t.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(t.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(t.textToSpeechLanguage=A.textToSpeechLanguage)):(t.visible=A.visible,t.x=A.x,t.y=A.y,t.size=A.size,t.direction=A.direction,t.draggable=A.draggable,t.rotationStyle=A.rotationStyle),e.forEach(A=>{B.add(A)}),t},y=function(A){const B=A.map(A=>A.getLayerOrder());return E.reducedSortOrdering(B)},J=function(A,B){const t=(B.stageWidth-480)/2,e=(B.stageHeight-360)/2;return A.valueSeq().filter(A=>!N(A.opcode)||A.visible).map(A=>{const B={id:A.id,mode:A.mode,opcode:A.opcode,params:A.params,spriteName:A.spriteName,value:Array.isArray(A.value)?[]:0,width:A.width,height:A.height,x:A.x-t,y:A.y-e,visible:A.visible};return"list"!==A.mode&&(B.sliderMin=A.sliderMin,B.sliderMax=A.sliderMax,B.isDiscrete=A.isDiscrete),B})},k=function(A,B,t,e){if(!Array.isArray(A))return A;const g=Object.create(null),Q=c();switch(g.id=Q,g.next=null,g.parent=B,g.shadow=t,g.inputs=Object.create(null),A[0]){case 4:g.opcode="math_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 5:g.opcode="math_positive_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 6:g.opcode="math_whole_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 7:g.opcode="math_integer",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 8:g.opcode="math_angle",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 9:g.opcode="colour_picker",g.fields={COLOUR:{name:"COLOUR",value:A[1]}},g.topLevel=!1;break;case 10:g.opcode="text",g.fields={TEXT:{name:"TEXT",value:A[1]}},g.topLevel=!1;break;case 11:g.opcode="event_broadcast_menu",g.fields={BROADCAST_OPTION:{name:"BROADCAST_OPTION",value:A[1],id:A[2],variableType:i.BROADCAST_MESSAGE_TYPE}},g.topLevel=!1;break;case D:g.opcode="data_variable",g.fields={VARIABLE:{name:"VARIABLE",value:A[1],id:A[2],variableType:i.SCALAR_TYPE}},A.length>3&&(g.topLevel=!0,g.x=A[3],g.y=A[4]);break;case u:g.opcode="data_listcontents",g.fields={LIST:{name:"LIST",value:A[1],id:A[2],variableType:i.LIST_TYPE}},A.length>3&&(g.topLevel=!0,g.x=A[3],g.y=A[4]);break;default:return r.error("Found unknown primitive type during deserialization: ".concat(JSON.stringify(A))),null}return e[Q]=g,Q},T=function(A,B,t){const e={};for(const g in A){if(!M.call(A,g))continue;const i=A[g];if(!Array.isArray(i))continue;let Q=null,s=null;const n=i[0];1===n?Q=s=k(i[1],B,!0,t):2===n?Q=k(i[1],B,!1,t):(Q=k(i[1],B,!1,t),s=k(i[2],B,!0,t)),e[g]={name:g,block:Q,shadow:s}}return e},j=function(A){const B={};for(const t in A){if(!M.call(A,t))continue;const e=A[t];Array.isArray(e)&&(B[t]={name:t,value:e[0]},e.length>1&&(B[t].id=e[1]),"BROADCAST_OPTION"===t?B[t].variableType=i.BROADCAST_MESSAGE_TYPE:"VARIABLE"===t?B[t].variableType=i.SCALAR_TYPE:"LIST"===t&&(B[t].variableType=i.LIST_TYPE))}return B},x=function(A){for(const B in A){if(!Object.prototype.hasOwnProperty.call(A,B))continue;const t=A[B];Array.isArray(t)?(delete A[B],k(t,null,!1,A)):(t.id=B,t.inputs=T(t.inputs,B,A),t.fields=j(t.fields))}return A};A.exports={serialize:function(A,B){let{allowOptimization:t=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const e=Object.create(null),g=new Set,i=B?[A.getTargetById(B)]:A.targets.filter(A=>A.isOriginal),Q=y(i),s=i.map(A=>A.toJSON());A.renderer&&!B&&s.forEach((A,B)=>{A.layerOrder=Q[B]});const n=s.map(A=>p(A,g));if(B)return n[0];if(e.targets=n,e.monitors=J(A.getMonitorState(),A),e.extensions=Array.from(g),A.extensionManager){const B=A.extensionManager.getExtensionURLs(),t={};for(const A of g){const e=B[A];"string"==typeof e&&(t[A]=e)}0!==Object.keys(t).length&&(e.extensionURLs=t)}const r=Object.create(null);return r.semver="3.0.0",r.vm="0.2.0",A.origin&&(r.origin=A.origin),r.agent="",e.meta=r,t&&C(e),e},deserialize:function(A,B,t,c){const C={extensionIDs:new Set,extensionURLs:new Map};A.meta&&A.meta.origin?B.origin=A.meta.origin:B.origin=null,A.extensionURLs&&(C.extensionURLs=new Map(Object.entries(A.extensionURLs)));const M=((c?[A]:A.targets)||[]).map((A,B)=>Object.assign(A,{targetPaneOrder:B})).sort((A,B)=>A.layerOrder-B.layerOrder),F=A.monitors||[];return Promise.resolve(M.map(A=>function(A,B,t){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const e={costumePromises:null,soundPromises:null,soundBank:B.audioEngine&&B.audioEngine.createBank()};return e.costumePromises=(A.costumes||[]).map(A=>{const e={asset:A.asset,assetId:A.assetId,skinId:null,name:A.name,bitmapResolution:A.bitmapResolution,rotationCenterX:A.rotationCenterX,rotationCenterY:A.rotationCenterY},g=A.dataFormat||A.assetType&&A.assetType.runtimeFormat||"png",i=A.hasOwnProperty("md5ext")?A.md5ext:"".concat(A.assetId,".").concat(g);return e.md5=i,e.dataFormat=g,Y(e,B,t).then(()=>a(i,e,B))}),e.soundPromises=(A.sounds||[]).map(A=>{const g={assetId:A.assetId,format:A.format,rate:A.rate,sampleCount:A.sampleCount,name:A.name,md5:A.md5ext,dataFormat:A.dataFormat,data:null};return h(g,B,t).then(()=>I(g,B,e.soundBank))}),e}(A,B,t))).then(A=>Promise.resolve(A)).then(A=>Promise.all(M.map((t,s)=>function(A,B,t,s,r){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const c=new e(B),o=new g(c,B);if(A.hasOwnProperty("name")&&(o.name=A.name),A.hasOwnProperty("blocks")){x(A.blocks);for(const B in A.blocks){if(!A.blocks.hasOwnProperty(B))continue;const e=A.blocks[B];c.createBlock(e);const g=N(e.opcode);g&&t.extensionIDs.add(g)}}const{costumePromises:w}=r,{soundBank:C,soundPromises:a}=r,I=o.createClone(A.isStage?n.BACKGROUND_LAYER:n.SPRITE_LAYER);if(A.hasOwnProperty("tempo")&&(I.tempo=A.tempo),A.hasOwnProperty("volume")&&(I.volume=A.volume),A.hasOwnProperty("videoTransparency")&&(I.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(I.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(I.textToSpeechLanguage=A.textToSpeechLanguage),A.hasOwnProperty("variables"))for(const t in A.variables){const e=A.variables[t],g=3===e.length&&e[2]&&A.isStage&&B.canAddCloudVariable(),Q=new i(t,e[0],i.SCALAR_TYPE,g);g&&B.addCloudVariable(),Q.value=e[1],I.variables[Q.id]=Q}if(A.hasOwnProperty("lists"))for(const B in A.lists){const t=A.lists[B],e=new i(B,t[0],i.LIST_TYPE,!1);e.value=t[1],I.variables[e.id]=e}if(A.hasOwnProperty("broadcasts"))for(const B in A.broadcasts){const t=A.broadcasts[B],e=new i(B,t,i.BROADCAST_MESSAGE_TYPE,!1);I.variables[e.id]=e}if(A.hasOwnProperty("comments"))for(const B in A.comments){const t=A.comments[B],e=new Q(B,t.text,t.x,t.y,t.width,t.height,t.minimized);t.blockId&&(e.blockId=t.blockId),I.comments[e.id]=e}return A.hasOwnProperty("x")&&(I.x=A.x),A.hasOwnProperty("y")&&(I.y=A.y),A.hasOwnProperty("direction")&&(I.direction=A.direction),A.hasOwnProperty("size")&&(I.size=A.size),A.hasOwnProperty("visible")&&(I.visible=A.visible),A.hasOwnProperty("currentCostume")&&(I.currentCostume=E.clamp(A.currentCostume,0,A.costumes.length-1)),A.hasOwnProperty("rotationStyle")&&(I.rotationStyle=A.rotationStyle),A.hasOwnProperty("isStage")&&(I.isStage=A.isStage),A.hasOwnProperty("targetPaneOrder")&&(I.targetPaneOrder=A.targetPaneOrder),A.hasOwnProperty("draggable")&&(I.draggable=A.draggable),Promise.all(w).then(A=>{o.costumes=A}),Promise.all(a).then(A=>{o.sounds=A,o.soundBank=C||null}),Promise.all(w.concat(a)).then(()=>I)}(t,B,C,0,A[s])))).then(A=>A.map((A,B)=>(A.layerOrder=B,A)).sort((A,B)=>A.targetPaneOrder-B.targetPaneOrder).map(A=>(delete A.targetPaneOrder,A))).then(A=>function(A){const B=w.getAllVarRefsForTargets(A,!0);A.forEach(A=>{Object.keys(A.variables).forEach(B=>{const t=o.replaceUnsafeChars(B);t!==B&&(A.variables[B].id=t,A.variables[t]=A.variables[B],delete A.variables[B])})});for(const A in B){const t=o.replaceUnsafeChars(A);A!==t&&w.updateVariableIdentifiers(B[A],t)}return A}(A)).then(A=>(F.map(t=>function(A,B,t,e){const g=(B.stageWidth-480)/2,Q=(B.stageHeight-360)/2;if(A.x+=g,A.y+=Q,A.x=E.clamp(A.x,0,B.stageWidth),A.y=E.clamp(A.y,0,B.stageHeight),A.spriteName){const B=t.filter(B=>B.sprite.name===A.spriteName);B&&B.length>0?A.targetId=B[0].id:r.warn("Tried to deserialize sprite specific monitor ".concat(A.opcode," but could not find sprite ").concat(A.spriteName,"."))}const n=B.monitorBlockInfo[A.opcode];if("data_listcontents"===A.opcode){const B=A.targetId?t.find(B=>B.id===A.targetId):t.find(A=>A.isStage);B&&Object.prototype.hasOwnProperty.call(B.variables,A.id)&&(A.params.LIST=B.variables[A.id].name)}const c={};for(const B in A.params){const t={name:B,value:A.params[B]};c[B]=t}"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode&&n&&n.isSpriteSpecific?A.id=n.getId(A.targetId,c):A.id=o.replaceUnsafeChars(A.id);const w=B.monitorBlocks._blocks[A.id];if(w)w.isMonitored=A.visible,w.targetId=A.targetId;else{const t={id:A.id,opcode:A.opcode,inputs:{},fields:c,topLevel:!0,next:null,parent:null,shadow:!1,x:0,y:0,isMonitored:A.visible,targetId:A.targetId};if("data_variable"===A.opcode){const B=t.fields.VARIABLE;B.id=A.id,B.variableType=i.SCALAR_TYPE}else if("data_listcontents"===A.opcode){const B=t.fields.LIST;B.id=A.id,B.variableType=i.LIST_TYPE}B.monitorBlocks.createBlock(t);const g=N(t.opcode);g&&e.extensionIDs.add(g)}B.requestAddMonitor(s(A))}(t,B,A,C)),A)).then(A=>({targets:A,extensions:C}))},deserializeBlocks:x,serializeBlocks:m,getExtensionIdForOpcode:N}},function(A,B,t){const e=t(10),g=t(33),i=t(276);A.exports=class{constructor(A,B){this._renderer=B,this._id=A,this._rotationCenter=e.v3.create(0,0),this._texture=null,this._uniforms={u_skinSize:[0,0],u_skin:null},this._silhouette=new i,this.private=!1}dispose(){this._id=g.ID_NONE}get id(){return this._id}get rotationCenter(){return this._rotationCenter}get size(){return[0,0]}useNearest(A,B){return!0}calculateRotationCenter(){return[this.size[0]/2,this.size[1]/2]}getTexture(A){return this._emptyImageTexture}getFenceBounds(A,B){return A.getAABB(B)}getUniforms(A){return this._uniforms.u_skin=this.getTexture(A),this._uniforms.u_skinSize=this.size,this._uniforms}emitWasAltered(){this._renderer.skinWasAltered(this)}updateSilhouette(){this._silhouette.unlazy()}_setTexture(A){const B=this._renderer.gl;B.bindTexture(B.TEXTURE_2D,this._texture),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),B.texImage2D(B.TEXTURE_2D,0,B.RGBA,B.RGBA,B.UNSIGNED_BYTE,A),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),this._silhouette.update(A)}setEmptyImageData(){if(this._texture=null,!this._emptyImageData){this._emptyImageData=new ImageData(1,1);const A=this._renderer.gl,B={auto:!0,wrap:A.CLAMP_TO_EDGE,src:this._emptyImageData};this._emptyImageTexture=e.createTexture(A,B)}this._rotationCenter[0]=0,this._rotationCenter[1]=0,this._silhouette.update(this._emptyImageData),this.emitWasAltered()}isTouchingNearest(A){return this._silhouette.isTouchingNearest(A)}isTouchingLinear(A){return this._silhouette.isTouchingLinear(A)}}},function(A,B){A.exports={ID_NONE:-1,Events:{UseHighQualityRenderChanged:"UseHighQualityRenderChanged",AllowPrivateSkinAccessChanged:"AllowPrivateSkinAccessChanged",NativeSizeChanged:"NativeSizeChanged"}}},function(A,B,t){const e=t(22);e.enable(),A.exports=e("scratch-audioengine")},function(A,B,t){"use strict";(function(A){!function(A){function B(){}function t(){}var e=String.fromCharCode,g={}.toString,i=g.call(A.SharedArrayBuffer),Q=g(),s=A.Uint8Array,n=s||Array,r=s?ArrayBuffer:n,c=r.isView||function(A){return A&&"length"in A},E=g.call(r.prototype);r=t.prototype;var o=A.TextEncoder,w=new(s?Uint16Array:n)(32);B.prototype.decode=function(A){if(!c(A)){var B=g.call(A);if(B!==E&&B!==i&&B!==Q)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");A=s?new n(A):A||[]}for(var t,r,o,C=B="",a=0,I=0|A.length,Y=I-32|0,h=0,M=0,F=0,D=-1;a>4){case 15:if(2!=(o=255&A[a=a+1|0])>>6||247>6?M+4|0:24,r=r+256&768;case 13:case 12:h<<=6,h|=(31&r)<<6|63&(o=255&A[a=a+1|0]),M=M+7|0,a>6&&h>>M&&1114112>h?(r=h,0<=(h=h-65536|0)&&(D=55296+(h>>10)|0,r=56320+(1023&h)|0,31>F?(w[F]=D,F=F+1|0,D=-1):(o=D,D=r,r=o))):(a=a-(r>>=8)-1|0,r=65533),h=M=0,t=a<=Y?32:I-a|0;default:w[F]=r;continue;case 11:case 10:case 9:case 8:}w[F]=65533}if(C+=e(w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],w[8],w[9],w[10],w[11],w[12],w[13],w[14],w[15],w[16],w[17],w[18],w[19],w[20],w[21],w[22],w[23],w[24],w[25],w[26],w[27],w[28],w[29],w[30],w[31]),32>F&&(C=C.slice(0,F-32|0)),a>>31,D=-1,C.length=Q)e[g]=Q;else{if(2047>=Q)e[g]=192|Q>>6;else{A:{if(55296<=Q)if(56319>=Q){var r=0|A.charCodeAt(B=B+1|0);if(56320<=r&&57343>=r){if(65535<(Q=(Q<<10)+r-56613888|0)){e[g]=240|Q>>18,e[g=g+1|0]=128|Q>>12&63,e[g=g+1|0]=128|Q>>6&63,e[g=g+1|0]=128|63&Q;continue}break A}Q=65533}else 57343>=Q&&(Q=65533);!i&&B<<1>12,e[g=g+1|0]=128|Q>>6&63}e[g=g+1|0]=128|63&Q}}return s?e.subarray(0,g):e.slice(0,g)},o||(A.TextDecoder=B,A.TextEncoder=t)}(""+void 0==typeof A?""+void 0==typeof self?this:self:A)}).call(this,t(8))},function(A,B){var t,e,g=A.exports={};function i(){throw new Error("setTimeout has not been defined")}function Q(){throw new Error("clearTimeout has not been defined")}function s(A){if(t===setTimeout)return setTimeout(A,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch(B){try{return t.call(null,A,0)}catch(B){return t.call(this,A,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(A){t=i}try{e="function"==typeof clearTimeout?clearTimeout:Q}catch(A){e=Q}}();var n,r=[],c=!1,E=-1;function o(){c&&n&&(c=!1,n.length?r=n.concat(r):E=-1,r.length&&w())}function w(){if(!c){var A=s(o);c=!0;for(var B=r.length;B;){for(n=r,r=[];++E1)for(var t=1;t0&&(this._lastUpdateTime=A),this._count=Math.min(this._maxTokens,this._count+t),this._count>0&&(this._count--,!0)}}},function(A,B,t){const{Record:e}=t(24),g=e({id:null,spriteName:null,targetId:null,opcode:null,value:null,params:null,mode:"default",sliderMin:0,sliderMax:100,isDiscrete:!0,x:null,y:null,width:0,height:0,visible:!0});A.exports=g},function(A,B){A.exports=function(A,B){let t="";for(const A in B){let e=B[A].value;"CURRENTMENU"===A&&(e=e.toLowerCase()),t+="_".concat(e)}return"".concat(A).concat(t)}},function(A,B,t){ + */!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(268),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(A){return"[object Array]"===Object.prototype.toString.call(A)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(A){return"object"==typeof A&&A.buffer&&A.buffer.constructor===ArrayBuffer});var createOutputMethod=function(A){return function(B){return new Md5(!0).update(B)[A]()}},createMethod=function(){var A=createOutputMethod("hex");NODE_JS&&(A=nodeWrap(A)),A.create=function(){return new Md5},A.update=function(B){return A.create().update(B)};for(var B=0;B>2]|=A[i]<>6,s[g++]=128|63&e):e<55296||e>=57344?(s[g++]=224|e>>12,s[g++]=128|e>>6&63,s[g++]=128|63&e):(e=65536+((1023&e)<<10|1023&A.charCodeAt(++i)),s[g++]=240|e>>18,s[g++]=128|e>>12&63,s[g++]=128|e>>6&63,s[g++]=128|63&e);else for(g=this.start;i>2]|=e<>2]|=(192|e>>6)<>2]|=(128|63&e)<=57344?(Q[g>>2]|=(224|e>>12)<>2]|=(128|e>>6&63)<>2]|=(128|63&e)<>2]|=(240|e>>18)<>2]|=(128|e>>12&63)<>2]|=(128|e>>6&63)<>2]|=(128|63&e)<=64?(this.start=g-64,this.hash(),this.hashed=!0):this.start=g}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,B=this.lastByteIndex;A[B>>2]|=EXTRA[3&B],B>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,B,t,e,g,i,n=this.blocks;this.first?B=((B=((A=((A=n[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(e=((e=(-1732584194^2004318071&A)+n[1]-117830708)<<12|e>>>20)+A<<0)&(-271733879^A))+n[2]-1126478375)<<17|t>>>15)+e<<0)&(e^A))+n[3]-1316259209)<<22|B>>>10)+t<<0:(A=this.h0,B=this.h1,t=this.h2,B=((B+=((A=((A+=((e=this.h3)^B&(t^e))+n[0]-680876936)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+n[1]-389564586)<<12|e>>>20)+A<<0)&(A^B))+n[2]+606105819)<<17|t>>>15)+e<<0)&(e^A))+n[3]-1044525330)<<22|B>>>10)+t<<0),B=((B+=((A=((A+=(e^B&(t^e))+n[4]-176418897)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+n[5]+1200080426)<<12|e>>>20)+A<<0)&(A^B))+n[6]-1473231341)<<17|t>>>15)+e<<0)&(e^A))+n[7]-45705983)<<22|B>>>10)+t<<0,B=((B+=((A=((A+=(e^B&(t^e))+n[8]+1770035416)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+n[9]-1958414417)<<12|e>>>20)+A<<0)&(A^B))+n[10]-42063)<<17|t>>>15)+e<<0)&(e^A))+n[11]-1990404162)<<22|B>>>10)+t<<0,B=((B+=((A=((A+=(e^B&(t^e))+n[12]+1804603682)<<7|A>>>25)+B<<0)^(t=((t+=(B^(e=((e+=(t^A&(B^t))+n[13]-40341101)<<12|e>>>20)+A<<0)&(A^B))+n[14]-1502002290)<<17|t>>>15)+e<<0)&(e^A))+n[15]+1236535329)<<22|B>>>10)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+n[1]-165796510)<<5|A>>>27)+B<<0)^B))+n[6]-1069501632)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+n[11]+643717713)<<14|t>>>18)+e<<0)^e))+n[0]-373897302)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+n[5]-701558691)<<5|A>>>27)+B<<0)^B))+n[10]+38016083)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+n[15]-660478335)<<14|t>>>18)+e<<0)^e))+n[4]-405537848)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+n[9]+568446438)<<5|A>>>27)+B<<0)^B))+n[14]-1019803690)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+n[3]-187363961)<<14|t>>>18)+e<<0)^e))+n[8]+1163531501)<<20|B>>>12)+t<<0,B=((B+=((e=((e+=(B^t&((A=((A+=(t^e&(B^t))+n[13]-1444681467)<<5|A>>>27)+B<<0)^B))+n[2]-51403784)<<9|e>>>23)+A<<0)^A&((t=((t+=(A^B&(e^A))+n[7]+1735328473)<<14|t>>>18)+e<<0)^e))+n[12]-1926607734)<<20|B>>>12)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+n[5]-378558)<<4|A>>>28)+B<<0))+n[8]-2022574463)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+n[11]+1839030562)<<16|t>>>16)+e<<0))+n[14]-35309556)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+n[1]-1530992060)<<4|A>>>28)+B<<0))+n[4]+1272893353)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+n[7]-155497632)<<16|t>>>16)+e<<0))+n[10]-1094730640)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+n[13]+681279174)<<4|A>>>28)+B<<0))+n[0]-358537222)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+n[3]-722521979)<<16|t>>>16)+e<<0))+n[6]+76029189)<<23|B>>>9)+t<<0,B=((B+=((i=(e=((e+=((g=B^t)^(A=((A+=(g^e)+n[9]-640364487)<<4|A>>>28)+B<<0))+n[12]-421815835)<<11|e>>>21)+A<<0)^A)^(t=((t+=(i^B)+n[15]+530742520)<<16|t>>>16)+e<<0))+n[2]-995338651)<<23|B>>>9)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+n[0]-198630844)<<6|A>>>26)+B<<0)|~t))+n[7]+1126891415)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+n[14]-1416354905)<<15|t>>>17)+e<<0)|~A))+n[5]-57434055)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+n[12]+1700485571)<<6|A>>>26)+B<<0)|~t))+n[3]-1894986606)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+n[10]-1051523)<<15|t>>>17)+e<<0)|~A))+n[1]-2054922799)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+n[8]+1873313359)<<6|A>>>26)+B<<0)|~t))+n[15]-30611744)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+n[6]-1560198380)<<15|t>>>17)+e<<0)|~A))+n[13]+1309151649)<<21|B>>>11)+t<<0,B=((B+=((e=((e+=(B^((A=((A+=(t^(B|~e))+n[4]-145523070)<<6|A>>>26)+B<<0)|~t))+n[11]-1120210379)<<10|e>>>22)+A<<0)^((t=((t+=(A^(e|~B))+n[2]+718787259)<<15|t>>>17)+e<<0)|~A))+n[9]-343485551)<<21|B>>>11)+t<<0,this.first?(this.h0=A+1732584193<<0,this.h1=B-271733879<<0,this.h2=t-1732584194<<0,this.h3=e+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+B<<0,this.h2=this.h2+t<<0,this.h3=this.h3+e<<0)},Md5.prototype.hex=function(){this.finalize();var A=this.h0,B=this.h1,t=this.h2,e=this.h3;return HEX_CHARS[A>>4&15]+HEX_CHARS[15&A]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+HEX_CHARS[B>>4&15]+HEX_CHARS[15&B]+HEX_CHARS[B>>12&15]+HEX_CHARS[B>>8&15]+HEX_CHARS[B>>20&15]+HEX_CHARS[B>>16&15]+HEX_CHARS[B>>28&15]+HEX_CHARS[B>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var A=this.h0,B=this.h1,t=this.h2,e=this.h3;return[255&A,A>>8&255,A>>16&255,A>>24&255,255&B,B>>8&255,B>>16&255,B>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),B=new Uint32Array(A);return B[0]=this.h0,B[1]=this.h1,B[2]=this.h2,B[3]=this.h3,A},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var A,B,t,e="",g=this.array(),i=0;i<15;)A=g[i++],B=g[i++],t=g[i++],e+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[63&(A<<4|B>>>4)]+BASE64_ENCODE_CHAR[63&(B<<2|t>>>6)]+BASE64_ENCODE_CHAR[63&t];return A=g[i],e+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[A<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(36),__webpack_require__(8))},function(A,B,t){"use strict";var e,g="object"==typeof Reflect?Reflect:null,i=g&&"function"==typeof g.apply?g.apply:function(A,B,t){return Function.prototype.apply.call(A,B,t)};e=g&&"function"==typeof g.ownKeys?g.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var n=Number.isNaN||function(A){return A!=A};function Q(){Q.init.call(this)}A.exports=Q,A.exports.once=function(A,B){return new Promise((function(t,e){function g(t){A.removeListener(B,i),e(t)}function i(){"function"==typeof A.removeListener&&A.removeListener("error",g),t([].slice.call(arguments))}h(A,B,i,{once:!0}),"error"!==B&&function(A,B,t){"function"==typeof A.on&&h(A,"error",B,t)}(A,g,{once:!0})}))},Q.EventEmitter=Q,Q.prototype._events=void 0,Q.prototype._eventsCount=0,Q.prototype._maxListeners=void 0;var s=10;function r(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function c(A){return void 0===A._maxListeners?Q.defaultMaxListeners:A._maxListeners}function E(A,B,t,e){var g,i,n,Q;if(r(t),void 0===(i=A._events)?(i=A._events=Object.create(null),A._eventsCount=0):(void 0!==i.newListener&&(A.emit("newListener",B,t.listener?t.listener:t),i=A._events),n=i[B]),void 0===n)n=i[B]=t,++A._eventsCount;else if("function"==typeof n?n=i[B]=e?[t,n]:[n,t]:e?n.unshift(t):n.push(t),(g=c(A))>0&&n.length>g&&!n.warned){n.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=A,s.type=B,s.count=n.length,Q=s,console&&console.warn&&console.warn(Q)}return A}function o(){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)}function w(A,B,t){var e={fired:!1,wrapFn:void 0,target:A,type:B,listener:t},g=o.bind(e);return g.listener=t,e.wrapFn=g,g}function C(A,B,t){var e=A._events;if(void 0===e)return[];var g=e[B];return void 0===g?[]:"function"==typeof g?t?[g.listener||g]:[g]:t?function(A){for(var B=new Array(A.length),t=0;t0&&(n=B[0]),n instanceof Error)throw n;var Q=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw Q.context=n,Q}var s=g[A];if(void 0===s)return!1;if("function"==typeof s)i(s,this,B);else{var r=s.length,c=I(s,r);for(t=0;t=0;i--)if(t[i]===B||t[i].listener===B){n=t[i].listener,g=i;break}if(g<0)return this;0===g?t.shift():function(A,B){for(;B+1=0;e--)this.removeListener(A,B[e]);return this},Q.prototype.listeners=function(A){return C(this,A,!0)},Q.prototype.rawListeners=function(A){return C(this,A,!1)},Q.listenerCount=function(A,B){return"function"==typeof A.listenerCount?A.listenerCount(B):a.call(A,B)},Q.prototype.listenerCount=a,Q.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},function(A,B,t){(function(B,t,e,g){A.exports=function A(B,t,e){function g(n,Q){if(!t[n]){if(!B[n]){if(i)return i(n,!0);var s=new Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}var r=t[n]={exports:{}};B[n][0].call(r.exports,(function(A){return g(B[n][1][A]||A)}),r,r.exports,A,B,t,e)}return t[n].exports}for(var i=!1,n=0;n>2,Q=(3&B)<<4|t>>4,s=1>6:64,r=2>4,t=(15&n)<<4|(Q=i.indexOf(A.charAt(r++)))>>2,e=(3&Q)<<6|(s=i.indexOf(A.charAt(r++))),o[c++]=B,64!==Q&&(o[c++]=t),64!==s&&(o[c++]=e);return o}},{"./support":30,"./utils":32}],2:[function(A,B,t){"use strict";var e=A("./external"),g=A("./stream/DataWorker"),i=A("./stream/Crc32Probe"),n=A("./stream/DataLengthProbe");function Q(A,B,t,e,g){this.compressedSize=A,this.uncompressedSize=B,this.crc32=t,this.compression=e,this.compressedContent=g}Q.prototype={getContentWorker:function(){var A=new g(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new n("data_length")),B=this;return A.on("end",(function(){if(this.streamInfo.data_length!==B.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new g(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Q.createWorkerFrom=function(A,B,t){return A.pipe(new i).pipe(new n("uncompressedSize")).pipe(B.compressWorker(t)).pipe(new n("compressedSize")).withStreamInfo("compression",B)},B.exports=Q},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,B,t){"use strict";var e=A("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new e("STORE compression")},uncompressWorker:function(){return new e("STORE decompression")}},t.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,B,t){"use strict";var e=A("./utils"),g=function(){for(var A,B=[],t=0;t<256;t++){A=t;for(var e=0;e<8;e++)A=1&A?3988292384^A>>>1:A>>>1;B[t]=A}return B}();B.exports=function(A,B){return void 0!==A&&A.length?"string"!==e.getTypeOf(A)?function(A,B,t,e){var i=g,n=0+t;A^=-1;for(var Q=0;Q>>8^i[255&(A^B[Q])];return-1^A}(0|B,A,A.length):function(A,B,t,e){var i=g,n=0+t;A^=-1;for(var Q=0;Q>>8^i[255&(A^B.charCodeAt(Q))];return-1^A}(0|B,A,A.length):0}},{"./utils":32}],5:[function(A,B,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(A,B,t){"use strict";var e;e="undefined"!=typeof Promise?Promise:A("lie"),B.exports={Promise:e}},{lie:37}],7:[function(A,B,t){"use strict";var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,g=A("pako"),i=A("./utils"),n=A("./stream/GenericWorker"),Q=e?"uint8array":"array";function s(A,B){n.call(this,"FlateWorker/"+A),this._pako=null,this._pakoAction=A,this._pakoOptions=B,this.meta={}}t.magic="\b\0",i.inherits(s,n),s.prototype.processChunk=function(A){this.meta=A.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(Q,A.data),!1)},s.prototype.flush=function(){n.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this._pako=null},s.prototype._createPako=function(){this._pako=new g[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var A=this;this._pako.onData=function(B){A.push({data:B,meta:A.meta})}},t.compressWorker=function(A){return new s("Deflate",A)},t.uncompressWorker=function(){return new s("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,B,t){"use strict";function e(A,B){var t,e="";for(t=0;t>>=8;return e}function g(A,B,t,g,n,c){var E,o,w=A.file,C=A.compression,a=c!==Q.utf8encode,I=i.transformTo("string",c(w.name)),h=i.transformTo("string",Q.utf8encode(w.name)),Y=w.comment,M=i.transformTo("string",c(Y)),F=i.transformTo("string",Q.utf8encode(Y)),D=h.length!==w.name.length,u=F.length!==Y.length,l="",d="",U="",N=w.dir,m=w.date,G={crc32:0,compressedSize:0,uncompressedSize:0};B&&!t||(G.crc32=A.crc32,G.compressedSize=A.compressedSize,G.uncompressedSize=A.uncompressedSize);var f=0;B&&(f|=8),a||!D&&!u||(f|=2048);var H=0,p=0;N&&(H|=16),"UNIX"===n?(p=798,H|=function(A,B){var t=A;return A||(t=B?16893:33204),(65535&t)<<16}(w.unixPermissions,N)):(p=20,H|=function(A){return 63&(A||0)}(w.dosPermissions)),E=m.getUTCHours(),E<<=6,E|=m.getUTCMinutes(),E<<=5,E|=m.getUTCSeconds()/2,o=m.getUTCFullYear()-1980,o<<=4,o|=m.getUTCMonth()+1,o<<=5,o|=m.getUTCDate(),D&&(d=e(1,1)+e(s(I),4)+h,l+="up"+e(d.length,2)+d),u&&(U=e(1,1)+e(s(M),4)+F,l+="uc"+e(U.length,2)+U);var R="";return R+="\n\0",R+=e(f,2),R+=C.magic,R+=e(E,2),R+=e(o,2),R+=e(G.crc32,4),R+=e(G.compressedSize,4),R+=e(G.uncompressedSize,4),R+=e(I.length,2),R+=e(l.length,2),{fileRecord:r.LOCAL_FILE_HEADER+R+I+l,dirRecord:r.CENTRAL_FILE_HEADER+e(p,2)+R+e(M.length,2)+"\0\0\0\0"+e(H,4)+e(g,4)+I+l+M}}var i=A("../utils"),n=A("../stream/GenericWorker"),Q=A("../utf8"),s=A("../crc32"),r=A("../signature");function c(A,B,t,e){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=t,this.encodeFileName=e,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(c,n),c.prototype.push=function(A){var B=A.meta.percent||0,t=this.entriesCount,e=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,n.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:t?(B+100*(t-e-1))/t:100}}))},c.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var B=this.streamFiles&&!A.file.dir;if(B){var t=g(A,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(A){this.accumulate=!1;var B=this.streamFiles&&!A.file.dir,t=g(A,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),B)this.push({data:function(A){return r.DATA_DESCRIPTOR+e(A.crc32,4)+e(A.compressedSize,4)+e(A.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var A=this.bytesWritten,B=0;B=this.index;B--)t=(t<<8)+this.byteAt(B);return this.index+=A,t},readString:function(A){return e.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},B.exports=g},{"../utils":32}],19:[function(A,B,t){"use strict";var e=A("./Uint8ArrayReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.readData=function(A){this.checkOffset(A);var B=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,B,t){"use strict";var e=A("./DataReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},g.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},g.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},g.prototype.readData=function(A){this.checkOffset(A);var B=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./DataReader":18}],21:[function(A,B,t){"use strict";var e=A("./ArrayReader");function g(A){e.call(this,A)}A("../utils").inherits(g,e),g.prototype.readData=function(A){if(this.checkOffset(A),0===A)return new Uint8Array(0);var B=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,B},B.exports=g},{"../utils":32,"./ArrayReader":17}],22:[function(A,B,t){"use strict";var e=A("../utils"),g=A("../support"),i=A("./ArrayReader"),n=A("./StringReader"),Q=A("./NodeBufferReader"),s=A("./Uint8ArrayReader");B.exports=function(A){var B=e.getTypeOf(A);return e.checkSupport(B),"string"!==B||g.uint8array?"nodebuffer"===B?new Q(A):g.uint8array?new s(e.transformTo("uint8array",A)):new i(e.transformTo("array",A)):new n(A)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,B,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},{}],24:[function(A,B,t){"use strict";var e=A("./GenericWorker"),g=A("../utils");function i(A){e.call(this,"ConvertWorker to "+A),this.destType=A}g.inherits(i,e),i.prototype.processChunk=function(A){this.push({data:g.transformTo(this.destType,A.data),meta:A.meta})},B.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(A,B,t){"use strict";var e=A("./GenericWorker"),g=A("../crc32");function i(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(i,e),i.prototype.processChunk=function(A){this.streamInfo.crc32=g(A.data,this.streamInfo.crc32||0),this.push(A)},B.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,B,t){"use strict";var e=A("../utils"),g=A("./GenericWorker");function i(A){g.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}e.inherits(i,g),i.prototype.processChunk=function(A){if(A){var B=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=B+A.data.length}g.prototype.processChunk.call(this,A)},B.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(A,B,t){"use strict";var e=A("../utils"),g=A("./GenericWorker");function i(A){g.call(this,"DataWorker");var B=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then((function(A){B.dataIsReady=!0,B.data=A,B.max=A&&A.length||0,B.type=e.getTypeOf(A),B.isPaused||B._tickAndRepeat()}),(function(A){B.error(A)}))}e.inherits(i,g),i.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,B=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,B);break;case"uint8array":A=this.data.subarray(this.index,B);break;case"array":case"nodebuffer":A=this.data.slice(this.index,B)}return this.index=B,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},B.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(A,B,t){"use strict";function e(A){this.name=A||"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}e.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,B){return this._listeners[A].push(B),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,B){if(this._listeners[A])for(var t=0;t "+A:A}},B.exports=e},{}],29:[function(A,t,e){"use strict";var g=A("../utils"),i=A("./ConvertWorker"),n=A("./GenericWorker"),Q=A("../base64"),s=A("../support"),r=A("../external"),c=null;if(s.nodestream)try{c=A("../nodejs/NodejsStreamOutputAdapter")}catch(A){}function E(A,B,t){var e=B;switch(B){case"blob":case"arraybuffer":e="uint8array";break;case"base64":e="string"}try{this._internalType=e,this._outputType=B,this._mimeType=t,g.checkSupport(e),this._worker=A.pipe(new i(e)),A.lock()}catch(A){this._worker=new n("error"),this._worker.error(A)}}E.prototype={accumulate:function(A){return function(A,t){return new r.Promise((function(e,i){var n=[],s=A._internalType,r=A._outputType,c=A._mimeType;A.on("data",(function(A,B){n.push(A),t&&t(B)})).on("error",(function(A){n=[],i(A)})).on("end",(function(){try{var A=function(A,B,t){switch(A){case"blob":return g.newBlob(g.transformTo("arraybuffer",B),t);case"base64":return Q.encode(B);default:return g.transformTo(A,B)}}(r,function(A,t){var e,g=0,i=null,n=0;for(e=0;e>>6:(t<65536?B[n++]=224|t>>>12:(B[n++]=240|t>>>18,B[n++]=128|t>>>12&63),B[n++]=128|t>>>6&63),B[n++]=128|63&t);return B}(A)},t.utf8decode=function(A){return g.nodebuffer?e.transformTo("nodebuffer",A).toString("utf-8"):function(A){var B,t,g,i,n=A.length,s=new Array(2*n);for(B=t=0;B>10&1023,s[t++]=56320|1023&g)}return s.length!==t&&(s.subarray?s=s.subarray(0,t):s.length=t),e.applyFromCharCode(s)}(A=e.transformTo(g.uint8array?"uint8array":"array",A))},e.inherits(r,n),r.prototype.processChunk=function(A){var B=e.transformTo(g.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var i=B;(B=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),B.set(i,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var n=function(A,B){var t;for((B=B||A.length)>A.length&&(B=A.length),t=B-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?B:t+Q[A[t]]>B?t:B}(B),s=B;n!==B.length&&(g.uint8array?(s=B.subarray(0,n),this.leftOver=B.subarray(n,B.length)):(s=B.slice(0,n),this.leftOver=B.slice(n,B.length))),this.push({data:t.utf8decode(s),meta:A.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,e.inherits(c,n),c.prototype.processChunk=function(A){this.push({data:t.utf8encode(A.data),meta:A.meta})},t.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,B,e){"use strict";var g=A("./support"),i=A("./base64"),n=A("./nodejsUtils"),Q=A("./external");function s(A){return A}function r(A,B){for(var t=0;t>8;this.dir=!!(16&this.externalFileAttributes),0==A&&(this.dosPermissions=63&this.externalFileAttributes),3==A&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=e(this.extraFields[1].value);this.uncompressedSize===g.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===g.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===g.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===g.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var B,t,e,g=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4>>6:(t<65536?B[n++]=224|t>>>12:(B[n++]=240|t>>>18,B[n++]=128|t>>>12&63),B[n++]=128|t>>>6&63),B[n++]=128|63&t);return B},t.buf2binstring=function(A){return s(A,A.length)},t.binstring2buf=function(A){for(var B=new e.Buf8(A.length),t=0,g=B.length;t>10&1023,r[e++]=56320|1023&g)}return s(r,e)},t.utf8border=function(A,B){var t;for((B=B||A.length)>A.length&&(B=A.length),t=B-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?B:t+n[A[t]]>B?t:B}},{"./common":41}],43:[function(A,B,t){"use strict";B.exports=function(A,B,t,e){for(var g=65535&A|0,i=A>>>16&65535|0,n=0;0!==t;){for(t-=n=2e3>>1:A>>>1;B[t]=A}return B}();B.exports=function(A,B,t,g){var i=e,n=g+t;A^=-1;for(var Q=g;Q>>8^i[255&(A^B[Q])];return-1^A}},{}],46:[function(A,B,t){"use strict";var e,g=A("../utils/common"),i=A("./trees"),n=A("./adler32"),Q=A("./crc32"),s=A("./messages"),r=-2,c=258,E=262,o=113;function w(A,B){return A.msg=s[B],B}function C(A){return(A<<1)-(4A.avail_out&&(t=A.avail_out),0!==t&&(g.arraySet(A.output,B.pending_buf,B.pending_out,t,A.next_out),A.next_out+=t,B.pending_out+=t,A.total_out+=t,A.avail_out-=t,B.pending-=t,0===B.pending&&(B.pending_out=0))}function h(A,B){i._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,B),A.block_start=A.strstart,I(A.strm)}function Y(A,B){A.pending_buf[A.pending++]=B}function M(A,B){A.pending_buf[A.pending++]=B>>>8&255,A.pending_buf[A.pending++]=255&B}function F(A,B){var t,e,g=A.max_chain_length,i=A.strstart,n=A.prev_length,Q=A.nice_match,s=A.strstart>A.w_size-E?A.strstart-(A.w_size-E):0,r=A.window,o=A.w_mask,w=A.prev,C=A.strstart+c,a=r[i+n-1],I=r[i+n];A.prev_length>=A.good_match&&(g>>=2),Q>A.lookahead&&(Q=A.lookahead);do{if(r[(t=B)+n]===I&&r[t+n-1]===a&&r[t]===r[i]&&r[++t]===r[i+1]){i+=2,t++;do{}while(r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&r[++i]===r[++t]&&is&&0!=--g);return n<=A.lookahead?n:A.lookahead}function D(A){var B,t,e,i,s,r,c,o,w,C,a=A.w_size;do{if(i=A.window_size-A.lookahead-A.strstart,A.strstart>=a+(a-E)){for(g.arraySet(A.window,A.window,a,a,0),A.match_start-=a,A.strstart-=a,A.block_start-=a,B=t=A.hash_size;e=A.head[--B],A.head[B]=a<=e?e-a:0,--t;);for(B=t=a;e=A.prev[--B],A.prev[B]=a<=e?e-a:0,--t;);i+=a}if(0===A.strm.avail_in)break;if(r=A.strm,c=A.window,o=A.strstart+A.lookahead,C=void 0,(w=i)<(C=r.avail_in)&&(C=w),t=0===C?0:(r.avail_in-=C,g.arraySet(c,r.input,r.next_in,C,o),1===r.state.wrap?r.adler=n(r.adler,c,C,o):2===r.state.wrap&&(r.adler=Q(r.adler,c,C,o)),r.next_in+=C,r.total_in+=C,C),A.lookahead+=t,A.lookahead+A.insert>=3)for(s=A.strstart-A.insert,A.ins_h=A.window[s],A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3)if(e=i._tr_tally(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<=3&&(A.ins_h=(A.ins_h<=3&&A.match_length<=A.prev_length){for(g=A.strstart+A.lookahead-3,e=i._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=g&&(A.ins_h=(A.ins_h<A.pending_buf_size-5&&(t=A.pending_buf_size-5);;){if(A.lookahead<=1){if(D(A),0===A.lookahead&&0===B)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;var e=A.block_start+t;if((0===A.strstart||A.strstart>=e)&&(A.lookahead=A.strstart-e,A.strstart=e,h(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-E&&(h(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(h(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(h(A,!1),A.strm.avail_out),1)})),new d(4,4,8,4,u),new d(4,5,16,8,u),new d(4,6,32,32,u),new d(4,4,16,16,l),new d(8,16,32,32,l),new d(8,16,128,128,l),new d(8,32,128,256,l),new d(32,128,258,1024,l),new d(32,258,258,4096,l)],t.deflateInit=function(A,B){return G(A,B,8,15,8,0)},t.deflateInit2=G,t.deflateReset=m,t.deflateResetKeep=N,t.deflateSetHeader=function(A,B){return A&&A.state?2!==A.state.wrap?r:(A.state.gzhead=B,0):r},t.deflate=function(A,B){var t,g,n,s;if(!A||!A.state||5>8&255),Y(g,g.gzhead.time>>16&255),Y(g,g.gzhead.time>>24&255),Y(g,9===g.level?2:2<=g.strategy||g.level<2?4:0),Y(g,255&g.gzhead.os),g.gzhead.extra&&g.gzhead.extra.length&&(Y(g,255&g.gzhead.extra.length),Y(g,g.gzhead.extra.length>>8&255)),g.gzhead.hcrc&&(A.adler=Q(A.adler,g.pending_buf,g.pending,0)),g.gzindex=0,g.status=69):(Y(g,0),Y(g,0),Y(g,0),Y(g,0),Y(g,0),Y(g,9===g.level?2:2<=g.strategy||g.level<2?4:0),Y(g,3),g.status=o);else{var E=8+(g.w_bits-8<<4)<<8;E|=(2<=g.strategy||g.level<2?0:g.level<6?1:6===g.level?2:3)<<6,0!==g.strstart&&(E|=32),E+=31-E%31,g.status=o,M(g,E),0!==g.strstart&&(M(g,A.adler>>>16),M(g,65535&A.adler)),A.adler=1}if(69===g.status)if(g.gzhead.extra){for(n=g.pending;g.gzindex<(65535&g.gzhead.extra.length)&&(g.pending!==g.pending_buf_size||(g.gzhead.hcrc&&g.pending>n&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),I(A),n=g.pending,g.pending!==g.pending_buf_size));)Y(g,255&g.gzhead.extra[g.gzindex]),g.gzindex++;g.gzhead.hcrc&&g.pending>n&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),g.gzindex===g.gzhead.extra.length&&(g.gzindex=0,g.status=73)}else g.status=73;if(73===g.status)if(g.gzhead.name){n=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>n&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),I(A),n=g.pending,g.pending===g.pending_buf_size)){s=1;break}s=g.gzindexn&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),0===s&&(g.gzindex=0,g.status=91)}else g.status=91;if(91===g.status)if(g.gzhead.comment){n=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>n&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),I(A),n=g.pending,g.pending===g.pending_buf_size)){s=1;break}s=g.gzindexn&&(A.adler=Q(A.adler,g.pending_buf,g.pending-n,n)),0===s&&(g.status=103)}else g.status=103;if(103===g.status&&(g.gzhead.hcrc?(g.pending+2>g.pending_buf_size&&I(A),g.pending+2<=g.pending_buf_size&&(Y(g,255&A.adler),Y(g,A.adler>>8&255),A.adler=0,g.status=o)):g.status=o),0!==g.pending){if(I(A),0===A.avail_out)return g.last_flush=-1,0}else if(0===A.avail_in&&C(B)<=C(t)&&4!==B)return w(A,-5);if(666===g.status&&0!==A.avail_in)return w(A,-5);if(0!==A.avail_in||0!==g.lookahead||0!==B&&666!==g.status){var F=2===g.strategy?function(A,B){for(var t;;){if(0===A.lookahead&&(D(A),0===A.lookahead)){if(0===B)return 1;break}if(A.match_length=0,t=i._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(h(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(h(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(h(A,!1),0===A.strm.avail_out)?1:2}(g,B):3===g.strategy?function(A,B){for(var t,e,g,n,Q=A.window;;){if(A.lookahead<=c){if(D(A),A.lookahead<=c&&0===B)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&0A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(t=i._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=i._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(h(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===B?(h(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(h(A,!1),0===A.strm.avail_out)?1:2}(g,B):e[g.level].func(g,B);if(3!==F&&4!==F||(g.status=666),1===F||3===F)return 0===A.avail_out&&(g.last_flush=-1),0;if(2===F&&(1===B?i._tr_align(g):5!==B&&(i._tr_stored_block(g,0,0,!1),3===B&&(a(g.head),0===g.lookahead&&(g.strstart=0,g.block_start=0,g.insert=0))),I(A),0===A.avail_out))return g.last_flush=-1,0}return 4!==B?0:g.wrap<=0?1:(2===g.wrap?(Y(g,255&A.adler),Y(g,A.adler>>8&255),Y(g,A.adler>>16&255),Y(g,A.adler>>24&255),Y(g,255&A.total_in),Y(g,A.total_in>>8&255),Y(g,A.total_in>>16&255),Y(g,A.total_in>>24&255)):(M(g,A.adler>>>16),M(g,65535&A.adler)),I(A),0=t.w_size&&(0===Q&&(a(t.head),t.strstart=0,t.block_start=0,t.insert=0),o=new g.Buf8(t.w_size),g.arraySet(o,B,w-t.w_size,t.w_size,0),B=o,w=t.w_size),s=A.avail_in,c=A.next_in,E=A.input,A.avail_in=w,A.next_in=0,A.input=B,D(t);t.lookahead>=3;){for(e=t.strstart,i=t.lookahead-2;t.ins_h=(t.ins_h<>>=F=M>>>24,C-=F,0==(F=M>>>16&255))N[i++]=65535&M;else{if(!(16&F)){if(0==(64&F)){M=a[(65535&M)+(w&(1<>>=F,C-=F),C<15&&(w+=U[e++]<>>=F=M>>>24,C-=F,!(16&(F=M>>>16&255))){if(0==(64&F)){M=I[(65535&M)+(w&(1<>>=F,C-=F,(F=i-n)>3,w&=(1<<(C-=D<<3))-1,A.next_in=e,A.next_out=i,A.avail_in=e>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function c(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(A){var B;return A&&A.state?(B=A.state,A.total_in=A.total_out=B.total=0,A.msg="",B.wrap&&(A.adler=1&B.wrap),B.mode=1,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new e.Buf32(852),B.distcode=B.distdyn=new e.Buf32(592),B.sane=1,B.back=-1,0):s}function o(A){var B;return A&&A.state?((B=A.state).wsize=0,B.whave=0,B.wnext=0,E(A)):s}function w(A,B){var t,e;return A&&A.state?(e=A.state,B<0?(t=0,B=-B):(t=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15=n.wsize?(e.arraySet(n.window,B,t-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(g<(i=n.wsize-n.wnext)&&(i=g),e.arraySet(n.window,B,t-g,i,n.wnext),(g-=i)?(e.arraySet(n.window,B,t-g,g,0),n.wnext=g,n.whave=n.wsize):(n.wnext+=i,n.wnext===n.wsize&&(n.wnext=0),n.whave>>8&255,t.check=i(t.check,T,2,0),h=I=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&I)<<8)+(I>>8))%31){A.msg="incorrect header check",t.mode=30;break}if(8!=(15&I)){A.msg="unknown compression method",t.mode=30;break}if(h-=4,p=8+(15&(I>>>=4)),0===t.wbits)t.wbits=p;else if(p>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(T[0]=255&I,T[1]=I>>>8&255,t.check=i(t.check,T,2,0)),h=I=0,t.mode=3;case 3:for(;h<32;){if(0===C)break A;C--,I+=c[o++]<>>8&255,T[2]=I>>>16&255,T[3]=I>>>24&255,t.check=i(t.check,T,4,0)),h=I=0,t.mode=4;case 4:for(;h<16;){if(0===C)break A;C--,I+=c[o++]<>8),512&t.flags&&(T[0]=255&I,T[1]=I>>>8&255,t.check=i(t.check,T,2,0)),h=I=0,t.mode=5;case 5:if(1024&t.flags){for(;h<16;){if(0===C)break A;C--,I+=c[o++]<>>8&255,t.check=i(t.check,T,2,0)),h=I=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(C<(u=t.length)&&(u=C),u&&(t.head&&(p=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),e.arraySet(t.head.extra,c,o,u,p)),512&t.flags&&(t.check=i(t.check,c,u,o)),C-=u,o+=u,t.length-=u),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===C)break A;for(u=0;p=c[o+u++],t.head&&p&&t.length<65536&&(t.head.name+=String.fromCharCode(p)),p&&u>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;h<32;){if(0===C)break A;C--,I+=c[o++]<>>=7&h,h-=7&h,t.mode=27;break}for(;h<3;){if(0===C)break A;C--,I+=c[o++]<>>=1)){case 0:t.mode=14;break;case 1:if(Y(t),t.mode=20,6!==B)break;I>>>=2,h-=2;break A;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}I>>>=2,h-=2;break;case 14:for(I>>>=7&h,h-=7&h;h<32;){if(0===C)break A;C--,I+=c[o++]<>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&I,h=I=0,t.mode=15,6===B)break A;case 15:t.mode=16;case 16:if(u=t.length){if(C>>=5,h-=5,t.ndist=1+(31&I),I>>>=5,h-=5,t.ncode=4+(15&I),I>>>=4,h-=4,286>>=3,h-=3}for(;t.have<19;)t.lens[j[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,y={bits:t.lenbits},R=Q(0,t.lens,0,19,t.lencode,0,t.work,y),t.lenbits=y.bits,R){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,m=65535&k,!((U=k>>>24)<=h);){if(0===C)break A;C--,I+=c[o++]<>>=U,h-=U,t.lens[t.have++]=m;else{if(16===m){for(J=U+2;h>>=U,h-=U,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}p=t.lens[t.have-1],u=3+(3&I),I>>>=2,h-=2}else if(17===m){for(J=U+3;h>>=U)),I>>>=3,h-=3}else{for(J=U+7;h>>=U)),I>>>=7,h-=7}if(t.have+u>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;u--;)t.lens[t.have++]=p}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,y={bits:t.lenbits},R=Q(1,t.lens,0,t.nlen,t.lencode,0,t.work,y),t.lenbits=y.bits,R){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,y={bits:t.distbits},R=Q(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,y),t.distbits=y.bits,R){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===B)break A;case 20:t.mode=21;case 21:if(6<=C&&258<=a){A.next_out=w,A.avail_out=a,A.next_in=o,A.avail_in=C,t.hold=I,t.bits=h,n(A,D),w=A.next_out,E=A.output,a=A.avail_out,o=A.next_in,c=A.input,C=A.avail_in,I=t.hold,h=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;N=(k=t.lencode[I&(1<>>16&255,m=65535&k,!((U=k>>>24)<=h);){if(0===C)break A;C--,I+=c[o++]<>G)])>>>16&255,m=65535&k,!(G+(U=k>>>24)<=h);){if(0===C)break A;C--,I+=c[o++]<>>=G,h-=G,t.back+=G}if(I>>>=U,h-=U,t.back+=U,t.length=m,0===N){t.mode=26;break}if(32&N){t.back=-1,t.mode=12;break}if(64&N){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&N,t.mode=22;case 22:if(t.extra){for(J=t.extra;h>>=t.extra,h-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;N=(k=t.distcode[I&(1<>>16&255,m=65535&k,!((U=k>>>24)<=h);){if(0===C)break A;C--,I+=c[o++]<>G)])>>>16&255,m=65535&k,!(G+(U=k>>>24)<=h);){if(0===C)break A;C--,I+=c[o++]<>>=G,h-=G,t.back+=G}if(I>>>=U,h-=U,t.back+=U,64&N){A.msg="invalid distance code",t.mode=30;break}t.offset=m,t.extra=15&N,t.mode=24;case 24:if(t.extra){for(J=t.extra;h>>=t.extra,h-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===a)break A;if(u=D-a,t.offset>u){if((u=t.offset-u)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}l=u>t.wnext?(u-=t.wnext,t.wsize-u):t.wnext-u,u>t.length&&(u=t.length),d=t.window}else d=E,l=w-t.offset,u=t.length;for(aY?(F=j[x+E[d]],y[J+E[d]]):(F=96,0),w=1<>f)+(C-=w)]=M<<24|F<<16|D|0,0!==C;);for(w=1<>=1;if(0!==w?(R&=w-1,R+=w):R=0,d++,0==--k[l]){if(l===N)break;l=B[t+E[d]]}if(m>>7)]}function U(A,B){A.pending_buf[A.pending++]=255&B,A.pending_buf[A.pending++]=B>>>8&255}function N(A,B,t){A.bi_valid>16-t?(A.bi_buf|=B<>16-A.bi_valid,A.bi_valid+=t-16):(A.bi_buf|=B<>>=1,t<<=1,0<--B;);return t>>>1}function f(A,B,t){var e,g,i=new Array(16),n=0;for(e=1;e<=s;e++)i[e]=n=n+t[e-1]<<1;for(g=0;g<=B;g++){var Q=A[2*g+1];0!==Q&&(A[2*g]=G(i[Q]++,Q))}}function H(A){var B;for(B=0;B>1;1<=t;t--)y(A,i,t);for(g=r;t=A.heap[1],A.heap[1]=A.heap[A.heap_len--],y(A,i,1),e=A.heap[1],A.heap[--A.heap_max]=t,A.heap[--A.heap_max]=e,i[2*g]=i[2*t]+i[2*e],A.depth[g]=(A.depth[t]>=A.depth[e]?A.depth[t]:A.depth[e])+1,i[2*t+1]=i[2*e+1]=g,A.heap[1]=g++,y(A,i,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],function(A,B){var t,e,g,i,n,Q,r=B.dyn_tree,c=B.max_code,E=B.stat_desc.static_tree,o=B.stat_desc.has_stree,w=B.stat_desc.extra_bits,C=B.stat_desc.extra_base,a=B.stat_desc.max_length,I=0;for(i=0;i<=s;i++)A.bl_count[i]=0;for(r[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)a<(i=r[2*r[2*(e=A.heap[t])+1]+1]+1)&&(i=a,I++),r[2*e+1]=i,c>=7;e>>=1)if(1&t&&0!==A.dyn_ltree[2*B])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(B=32;B>>3,(n=A.static_len+3+7>>>3)<=g&&(g=n)):g=n=t+5,t+4<=g&&-1!==B?S(A,B,t,e):4===A.strategy||n===g?(N(A,2+(e?1:0),3),J(A,w,C)):(N(A,4+(e?1:0),3),function(A,B,t,e){var g;for(N(A,B-257,5),N(A,t-1,5),N(A,e-4,4),g=0;g>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&B,A.pending_buf[A.l_buf+A.last_lit]=255&t,A.last_lit++,0===B?A.dyn_ltree[2*t]++:(A.matches++,B--,A.dyn_ltree[2*(I[t]+i+1)]++,A.dyn_dtree[2*d(B)]++),A.last_lit===A.lit_bufsize-1},t._tr_align=function(A){N(A,2,3),m(A,256,w),function(A){16===A.bi_valid?(U(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):8<=A.bi_valid&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)}(A)}},{"../utils/common":41}],53:[function(A,B,t){"use strict";B.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(A,B,t){(function(A){!function(A,B){"use strict";if(!A.setImmediate){var t,e,i,n,Q=1,s={},r=!1,c=A.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(A);E=E&&E.setTimeout?E:A,t="[object process]"==={}.toString.call(A.process)?function(A){g.nextTick((function(){w(A)}))}:function(){if(A.postMessage&&!A.importScripts){var B=!0,t=A.onmessage;return A.onmessage=function(){B=!1},A.postMessage("","*"),A.onmessage=t,B}}()?(n="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",C,!1):A.attachEvent("onmessage",C),function(B){A.postMessage(n+B,"*")}):A.MessageChannel?((i=new MessageChannel).port1.onmessage=function(A){w(A.data)},function(A){i.port2.postMessage(A)}):c&&"onreadystatechange"in c.createElement("script")?(e=c.documentElement,function(A){var B=c.createElement("script");B.onreadystatechange=function(){w(A),B.onreadystatechange=null,e.removeChild(B),B=null},e.appendChild(B)}):function(A){setTimeout(w,0,A)},E.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var B=new Array(arguments.length-1),e=0;e>24&255;return{r:A>>16&255,g:A>>8&255,b:255&A,a:B>0?B:255}}static hexToRgb(A){A.startsWith("#")&&(A=A.substring(1));const B=parseInt(A,16);if(isNaN(B))return null;if(6===A.length)return{r:B>>16&255,g:B>>8&255,b:255&B};if(3===A.length){const A=B>>8&15,t=B>>4&15,e=15&B;return{r:A<<4|A,g:t<<4|t,b:e<<4|e}}return null}static rgbToHex(A){return t.decimalToHex(t.rgbToDecimal(A))}static rgbToDecimal(A){return(A.r<<16)+(A.g<<8)+A.b}static hexToDecimal(A){return t.rgbToDecimal(t.hexToRgb(A))}static hsvToRgb(A){let B=A.h%360;B<0&&(B+=360);const t=Math.max(0,Math.min(A.s,1)),e=Math.max(0,Math.min(A.v,1)),g=Math.floor(B/60),i=B/60-g,n=e*(1-t),Q=e*(1-t*i),s=e*(1-t*(1-i));let r,c,E;switch(g){default:case 0:r=e,c=s,E=n;break;case 1:r=Q,c=e,E=n;break;case 2:r=n,c=e,E=s;break;case 3:r=n,c=Q,E=e;break;case 4:r=s,c=n,E=e;break;case 5:r=e,c=n,E=Q}return{r:Math.floor(255*r),g:Math.floor(255*c),b:Math.floor(255*E)}}static rgbToHsv(A){const B=A.r/255,t=A.g/255,e=A.b/255,g=Math.min(Math.min(B,t),e),i=Math.max(Math.max(B,t),e);let n=0,Q=0;if(g!==i){n=60*((B===g?3:t===g?5:1)-(B===g?t-e:t===g?e-B:B-t)/(i-g))%360,Q=(i-g)/i}return{h:n,s:Q,v:i}}static mixRgb(A,B,t){if(t<=0)return A;if(t>=1)return B;const e=1-t;return{r:e*A.r+t*B.r,g:e*A.g+t*B.g,b:e*A.b+t*B.b}}}A.exports=t},function(A,B,t){A.exports=function(){"use strict";var A=Array.prototype.slice;function B(A,B){B&&(A.prototype=Object.create(B.prototype)),A.prototype.constructor=A}function t(A){return n(A)?A:L(A)}function e(A){return Q(A)?A:P(A)}function g(A){return s(A)?A:v(A)}function i(A){return n(A)&&!r(A)?A:W(A)}function n(A){return!(!A||!A[E])}function Q(A){return!(!A||!A[o])}function s(A){return!(!A||!A[w])}function r(A){return Q(A)||s(A)}function c(A){return!(!A||!A[C])}B(e,t),B(g,t),B(i,t),t.isIterable=n,t.isKeyed=Q,t.isIndexed=s,t.isAssociative=r,t.isOrdered=c,t.Keyed=e,t.Indexed=g,t.Set=i;var E="@@__IMMUTABLE_ITERABLE__@@",o="@@__IMMUTABLE_KEYED__@@",w="@@__IMMUTABLE_INDEXED__@@",C="@@__IMMUTABLE_ORDERED__@@",a={},I={value:!1},h={value:!1};function Y(A){return A.value=!1,A}function M(A){A&&(A.value=!0)}function F(){}function D(A,B){B=B||0;for(var t=Math.max(0,A.length-B),e=new Array(t),g=0;g>>0;if(""+t!==B||4294967295===t)return NaN;B=t}return B<0?u(A)+B:B}function d(){return!0}function U(A,B,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===B||void 0!==t&&B>=t)}function N(A,B){return G(A,B,0)}function m(A,B){return G(A,B,B)}function G(A,B,t){return void 0===A?t:A<0?Math.max(0,B+A):void 0===B?A:Math.min(B,A)}var f,H,p,R="function"==typeof Symbol&&Symbol.iterator,y=R||"@@iterator";function J(A){this.next=A}function k(A,B,t,e){var g=0===A?B:1===A?t:[B,t];return e?e.value=g:e={value:g,done:!1},e}function T(){return{value:void 0,done:!0}}function j(A){return!!b(A)}function x(A){return A&&"function"==typeof A.next}function S(A){var B=b(A);return B&&B.call(A)}function b(A){var B=A&&(R&&A[R]||A["@@iterator"]);if("function"==typeof B)return B}function z(A){return A&&"number"==typeof A.length}function L(A){return null==A?_():n(A)?A.toSeq():function(A){var B=AA(A)||"object"==typeof A&&new K(A);if(!B)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return B}(A)}function P(A){return null==A?_().toKeyedSeq():n(A)?Q(A)?A.toSeq():A.fromEntrySeq():q(A)}function v(A){return null==A?_():n(A)?Q(A)?A.entrySeq():A.toIndexedSeq():$(A)}function W(A){return(null==A?_():n(A)?Q(A)?A.entrySeq():A:$(A)).toSetSeq()}function V(A){this._array=A,this.size=A.length}function K(A){var B=Object.keys(A);this._object=A,this._keys=B,this.size=B.length}function O(A){this._iterable=A,this.size=A.length||A.size}function X(A){this._iterator=A,this._iteratorCache=[]}function Z(A){return!(!A||!A["@@__IMMUTABLE_SEQ__@@"])}function _(){return f||(f=new V([]))}function q(A){var B=Array.isArray(A)?new V(A).fromEntrySeq():x(A)?new X(A).fromEntrySeq():j(A)?new O(A).fromEntrySeq():"object"==typeof A?new K(A):void 0;if(!B)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return B}function $(A){var B=AA(A);if(!B)throw new TypeError("Expected Array or iterable object of values: "+A);return B}function AA(A){return z(A)?new V(A):x(A)?new X(A):j(A)?new O(A):void 0}function BA(A,B,t,e){var g=A._cache;if(g){for(var i=g.length-1,n=0;n<=i;n++){var Q=g[t?i-n:n];if(!1===B(Q[1],e?Q[0]:n,A))return n+1}return n}return A.__iterateUncached(B,t)}function tA(A,B,t,e){var g=A._cache;if(g){var i=g.length-1,n=0;return new J((function(){var A=g[t?i-n:n];return n++>i?{value:void 0,done:!0}:k(B,e?A[0]:n-1,A[1])}))}return A.__iteratorUncached(B,t)}function eA(A,B){return B?function A(B,t,e,g){return Array.isArray(t)?B.call(g,e,v(t).map((function(e,g){return A(B,e,g,t)}))):iA(t)?B.call(g,e,P(t).map((function(e,g){return A(B,e,g,t)}))):t}(B,A,"",{"":A}):gA(A)}function gA(A){return Array.isArray(A)?v(A).map(gA).toList():iA(A)?P(A).map(gA).toMap():A}function iA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function nA(A,B){if(A===B||A!=A&&B!=B)return!0;if(!A||!B)return!1;if("function"==typeof A.valueOf&&"function"==typeof B.valueOf){if((A=A.valueOf())===(B=B.valueOf())||A!=A&&B!=B)return!0;if(!A||!B)return!1}return!("function"!=typeof A.equals||"function"!=typeof B.equals||!A.equals(B))}function QA(A,B){if(A===B)return!0;if(!n(B)||void 0!==A.size&&void 0!==B.size&&A.size!==B.size||void 0!==A.__hash&&void 0!==B.__hash&&A.__hash!==B.__hash||Q(A)!==Q(B)||s(A)!==s(B)||c(A)!==c(B))return!1;if(0===A.size&&0===B.size)return!0;var t=!r(A);if(c(A)){var e=A.entries();return B.every((function(A,B){var g=e.next().value;return g&&nA(g[1],A)&&(t||nA(g[0],B))}))&&e.next().done}var g=!1;if(void 0===A.size)if(void 0===B.size)"function"==typeof A.cacheResult&&A.cacheResult();else{g=!0;var i=A;A=B,B=i}var E=!0,o=B.__iterate((function(B,e){if(t?!A.has(B):g?!nA(B,A.get(e,a)):!nA(A.get(e,a),B))return E=!1,!1}));return E&&A.size===o}function sA(A,B){if(!(this instanceof sA))return new sA(A,B);if(this._value=A,this.size=void 0===B?1/0:Math.max(0,B),0===this.size){if(H)return H;H=this}}function rA(A,B){if(!A)throw new Error(B)}function cA(A,B,t){if(!(this instanceof cA))return new cA(A,B,t);if(rA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===B&&(B=1/0),t=void 0===t?1:Math.abs(t),Be?{value:void 0,done:!0}:k(A,g,t[B?e-g++:g++])}))},B(K,P),K.prototype.get=function(A,B){return void 0===B||this.has(A)?this._object[A]:B},K.prototype.has=function(A){return this._object.hasOwnProperty(A)},K.prototype.__iterate=function(A,B){for(var t=this._object,e=this._keys,g=e.length-1,i=0;i<=g;i++){var n=e[B?g-i:i];if(!1===A(t[n],n,this))return i+1}return i},K.prototype.__iterator=function(A,B){var t=this._object,e=this._keys,g=e.length-1,i=0;return new J((function(){var n=e[B?g-i:i];return i++>g?{value:void 0,done:!0}:k(A,n,t[n])}))},K.prototype[C]=!0,B(O,v),O.prototype.__iterateUncached=function(A,B){if(B)return this.cacheResult().__iterate(A,B);var t=S(this._iterable),e=0;if(x(t))for(var g;!(g=t.next()).done&&!1!==A(g.value,e++,this););return e},O.prototype.__iteratorUncached=function(A,B){if(B)return this.cacheResult().__iterator(A,B);var t=S(this._iterable);if(!x(t))return new J(T);var e=0;return new J((function(){var B=t.next();return B.done?B:k(A,e++,B.value)}))},B(X,v),X.prototype.__iterateUncached=function(A,B){if(B)return this.cacheResult().__iterate(A,B);for(var t,e=this._iterator,g=this._iteratorCache,i=0;i=e.length){var B=t.next();if(B.done)return B;e[g]=B.value}return k(A,g,e[g++])}))},B(sA,v),sA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},sA.prototype.get=function(A,B){return this.has(A)?this._value:B},sA.prototype.includes=function(A){return nA(this._value,A)},sA.prototype.slice=function(A,B){var t=this.size;return U(A,B,t)?this:new sA(this._value,m(B,t)-N(A,t))},sA.prototype.reverse=function(){return this},sA.prototype.indexOf=function(A){return nA(this._value,A)?0:-1},sA.prototype.lastIndexOf=function(A){return nA(this._value,A)?this.size:-1},sA.prototype.__iterate=function(A,B){for(var t=0;t=0&&B=0&&tt?{value:void 0,done:!0}:k(A,i++,n)}))},cA.prototype.equals=function(A){return A instanceof cA?this._start===A._start&&this._end===A._end&&this._step===A._step:QA(this,A)},B(EA,t),B(oA,EA),B(wA,EA),B(CA,EA),EA.Keyed=oA,EA.Indexed=wA,EA.Set=CA;var aA="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(A,B){var t=65535&(A|=0),e=65535&(B|=0);return t*e+((A>>>16)*e+t*(B>>>16)<<16>>>0)|0};function IA(A){return A>>>1&1073741824|3221225471&A}function hA(A){if(!1===A||null==A)return 0;if("function"==typeof A.valueOf&&(!1===(A=A.valueOf())||null==A))return 0;if(!0===A)return 1;var B=typeof A;if("number"===B){if(A!=A||A===1/0)return 0;var t=0|A;for(t!==A&&(t^=4294967295*A);A>4294967295;)t^=A/=4294967295;return IA(t)}if("string"===B)return A.length>UA?function(A){var B=GA[A];return void 0===B&&(B=YA(A),mA===NA&&(mA=0,GA={}),mA++,GA[A]=B),B}(A):YA(A);if("function"==typeof A.hashCode)return A.hashCode();if("object"===B)return function(A){var B;if(uA&&void 0!==(B=MA.get(A)))return B;if(void 0!==(B=A[dA]))return B;if(!DA){if(void 0!==(B=A.propertyIsEnumerable&&A.propertyIsEnumerable[dA]))return B;if(void 0!==(B=function(A){if(A&&A.nodeType>0)switch(A.nodeType){case 1:return A.uniqueID;case 9:return A.documentElement&&A.documentElement.uniqueID}}(A)))return B}if(B=++lA,1073741824&lA&&(lA=0),uA)MA.set(A,B);else{if(void 0!==FA&&!1===FA(A))throw new Error("Non-extensible objects are not allowed as keys.");if(DA)Object.defineProperty(A,dA,{enumerable:!1,configurable:!1,writable:!1,value:B});else if(void 0!==A.propertyIsEnumerable&&A.propertyIsEnumerable===A.constructor.prototype.propertyIsEnumerable)A.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},A.propertyIsEnumerable[dA]=B;else{if(void 0===A.nodeType)throw new Error("Unable to set a non-enumerable property on object.");A[dA]=B}}return B}(A);if("function"==typeof A.toString)return YA(A.toString());throw new Error("Value type "+B+" cannot be hashed.")}function YA(A){for(var B=0,t=0;t=B.length)throw new Error("Missing value for key: "+B[t]);A.set(B[t],B[t+1])}}))},HA.prototype.toString=function(){return this.__toString("Map {","}")},HA.prototype.get=function(A,B){return this._root?this._root.get(0,void 0,A,B):B},HA.prototype.set=function(A,B){return WA(this,A,B)},HA.prototype.setIn=function(A,B){return this.updateIn(A,a,(function(){return B}))},HA.prototype.remove=function(A){return WA(this,A,a)},HA.prototype.deleteIn=function(A){return this.updateIn(A,(function(){return a}))},HA.prototype.update=function(A,B,t){return 1===arguments.length?A(this):this.updateIn([A],B,t)},HA.prototype.updateIn=function(A,B,t){t||(t=B,B=void 0);var e=function A(B,t,e,g){var i=B===a,n=t.next();if(n.done){var Q=i?e:B,s=g(Q);return s===Q?B:s}rA(i||B&&B.set,"invalid keyPath");var r=n.value,c=i?a:B.get(r,a),E=A(c,t,e,g);return E===c?B:E===a?B.remove(r):(i?vA():B).set(r,E)}(this,XB(A),B,t);return e===a?void 0:e},HA.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vA()},HA.prototype.merge=function(){return XA(this,void 0,arguments)},HA.prototype.mergeWith=function(B){var t=A.call(arguments,1);return XA(this,B,t)},HA.prototype.mergeIn=function(B){var t=A.call(arguments,1);return this.updateIn(B,vA(),(function(A){return"function"==typeof A.merge?A.merge.apply(A,t):t[t.length-1]}))},HA.prototype.mergeDeep=function(){return XA(this,ZA,arguments)},HA.prototype.mergeDeepWith=function(B){var t=A.call(arguments,1);return XA(this,_A(B),t)},HA.prototype.mergeDeepIn=function(B){var t=A.call(arguments,1);return this.updateIn(B,vA(),(function(A){return"function"==typeof A.mergeDeep?A.mergeDeep.apply(A,t):t[t.length-1]}))},HA.prototype.sort=function(A){return DB(xB(this,A))},HA.prototype.sortBy=function(A,B){return DB(xB(this,B,A))},HA.prototype.withMutations=function(A){var B=this.asMutable();return A(B),B.wasAltered()?B.__ensureOwner(this.__ownerID):this},HA.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new F)},HA.prototype.asImmutable=function(){return this.__ensureOwner()},HA.prototype.wasAltered=function(){return this.__altered},HA.prototype.__iterator=function(A,B){return new bA(this,A,B)},HA.prototype.__iterate=function(A,B){var t=this,e=0;return this._root&&this._root.iterate((function(B){return e++,A(B[1],B[0],t)}),B),e},HA.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?PA(this.size,this._root,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},HA.isMap=pA;var RA,yA="@@__IMMUTABLE_MAP__@@",JA=HA.prototype;function kA(A,B){this.ownerID=A,this.entries=B}function TA(A,B,t){this.ownerID=A,this.bitmap=B,this.nodes=t}function jA(A,B,t){this.ownerID=A,this.count=B,this.nodes=t}function xA(A,B,t){this.ownerID=A,this.keyHash=B,this.entries=t}function SA(A,B,t){this.ownerID=A,this.keyHash=B,this.entry=t}function bA(A,B,t){this._type=B,this._reverse=t,this._stack=A._root&&LA(A._root)}function zA(A,B){return k(A,B[0],B[1])}function LA(A,B){return{node:A,index:0,__prev:B}}function PA(A,B,t,e){var g=Object.create(JA);return g.size=A,g._root=B,g.__ownerID=t,g.__hash=e,g.__altered=!1,g}function vA(){return RA||(RA=PA(0))}function WA(A,B,t){var e,g;if(A._root){var i=Y(I),n=Y(h);if(e=VA(A._root,A.__ownerID,0,void 0,B,t,i,n),!n.value)return A;g=A.size+(i.value?t===a?-1:1:0)}else{if(t===a)return A;g=1,e=new kA(A.__ownerID,[[B,t]])}return A.__ownerID?(A.size=g,A._root=e,A.__hash=void 0,A.__altered=!0,A):e?PA(g,e):vA()}function VA(A,B,t,e,g,i,n,Q){return A?A.update(B,t,e,g,i,n,Q):i===a?A:(M(Q),M(n),new SA(B,e,[g,i]))}function KA(A){return A.constructor===SA||A.constructor===xA}function OA(A,B,t,e,g){if(A.keyHash===e)return new xA(B,e,[A.entry,g]);var i,n=31&(0===t?A.keyHash:A.keyHash>>>t),Q=31&(0===t?e:e>>>t);return new TA(B,1<>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135,A+=A>>8,127&(A+=A>>16)}function AB(A,B,t,e){var g=e?A:D(A);return g[B]=t,g}JA[yA]=!0,JA.delete=JA.remove,JA.removeIn=JA.deleteIn,kA.prototype.get=function(A,B,t,e){for(var g=this.entries,i=0,n=g.length;i=BB)return function(A,B,t,e){A||(A=new F);for(var g=new SA(A,hA(t),[t,e]),i=0;i>>A)),i=this.bitmap;return 0==(i&g)?e:this.nodes[$A(i&g-1)].get(A+5,B,t,e)},TA.prototype.update=function(A,B,t,e,g,i,n){void 0===t&&(t=hA(e));var Q=31&(0===B?t:t>>>B),s=1<=tB)return function(A,B,t,e,g){for(var i=0,n=new Array(32),Q=0;0!==t;Q++,t>>>=1)n[Q]=1&t?B[i++]:void 0;return n[e]=g,new jA(A,i+1,n)}(A,o,r,Q,C);if(c&&!C&&2===o.length&&KA(o[1^E]))return o[1^E];if(c&&C&&1===o.length&&KA(C))return C;var I=A&&A===this.ownerID,h=c?C?r:r^s:r|s,Y=c?C?AB(o,E,C,I):function(A,B,t){var e=A.length-1;if(t&&B===e)return A.pop(),A;for(var g=new Array(e),i=0,n=0;n>>A),i=this.nodes[g];return i?i.get(A+5,B,t,e):e},jA.prototype.update=function(A,B,t,e,g,i,n){void 0===t&&(t=hA(e));var Q=31&(0===B?t:t>>>B),s=g===a,r=this.nodes,c=r[Q];if(s&&!c)return this;var E=VA(c,A,B+5,t,e,g,i,n);if(E===c)return this;var o=this.count;if(c){if(!E&&--o0&&e<32?wB(0,e,5,null,new sB(t.toArray())):B.withMutations((function(A){A.setSize(e),t.forEach((function(B,t){return A.set(t,B)}))})))}function iB(A){return!(!A||!A[nB])}B(gB,wA),gB.of=function(){return this(arguments)},gB.prototype.toString=function(){return this.__toString("List [","]")},gB.prototype.get=function(A,B){if((A=l(this,A))>=0&&A=A.size||B<0)return A.withMutations((function(A){B<0?YB(A,B).set(0,t):YB(A,0,B+1).set(B,t)}));B+=A._origin;var e=A._tail,g=A._root,i=Y(h);return B>=FB(A._capacity)?e=aB(e,A.__ownerID,0,B,t,i):g=aB(g,A.__ownerID,A._level,B,t,i),i.value?A.__ownerID?(A._root=g,A._tail=e,A.__hash=void 0,A.__altered=!0,A):wB(A._origin,A._capacity,A._level,g,e):A}(this,A,B)},gB.prototype.remove=function(A){return this.has(A)?0===A?this.shift():A===this.size-1?this.pop():this.splice(A,1):this},gB.prototype.insert=function(A,B){return this.splice(A,0,B)},gB.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):CB()},gB.prototype.push=function(){var A=arguments,B=this.size;return this.withMutations((function(t){YB(t,0,B+A.length);for(var e=0;e>>B&31;if(e>=this.array.length)return new sB([],A);var g,i=0===e;if(B>0){var n=this.array[e];if((g=n&&n.removeBefore(A,B-5,t))===n&&i)return this}if(i&&!g)return this;var Q=IB(this,A);if(!i)for(var s=0;s>>B&31;if(g>=this.array.length)return this;if(B>0){var i=this.array[g];if((e=i&&i.removeAfter(A,B-5,t))===i&&g===this.array.length-1)return this}var n=IB(this,A);return n.array.splice(g+1),e&&(n.array[g]=e),n};var rB,cB,EB={};function oB(A,B){var t=A._origin,e=A._capacity,g=FB(e),i=A._tail;return n(A._root,A._level,0);function n(A,Q,s){return 0===Q?function(A,n){var Q=n===g?i&&i.array:A&&A.array,s=n>t?0:t-n,r=e-n;return r>32&&(r=32),function(){if(s===r)return EB;var A=B?--r:s++;return Q&&Q[A]}}(A,s):function(A,g,i){var Q,s=A&&A.array,r=i>t?0:t-i>>g,c=1+(e-i>>g);return c>32&&(c=32),function(){for(;;){if(Q){var A=Q();if(A!==EB)return A;Q=null}if(r===c)return EB;var t=B?--c:r++;Q=n(s&&s[t],g-5,i+(t<>>t&31,s=A&&Q0){var r=A&&A.array[Q],c=aB(r,B,t-5,e,g,i);return c===r?A:((n=IB(A,B)).array[Q]=c,n)}return s&&A.array[Q]===g?A:(M(i),n=IB(A,B),void 0===g&&Q===n.array.length-1?n.array.pop():n.array[Q]=g,n)}function IB(A,B){return B&&A&&B===A.ownerID?A:new sB(A?A.array.slice():[],B)}function hB(A,B){if(B>=FB(A._capacity))return A._tail;if(B<1<0;)t=t.array[B>>>e&31],e-=5;return t}}function YB(A,B,t){void 0!==B&&(B|=0),void 0!==t&&(t|=0);var e=A.__ownerID||new F,g=A._origin,i=A._capacity,n=g+B,Q=void 0===t?i:t<0?i+t:g+t;if(n===g&&Q===i)return A;if(n>=Q)return A.clear();for(var s=A._level,r=A._root,c=0;n+c<0;)r=new sB(r&&r.array.length?[void 0,r]:[],e),c+=1<<(s+=5);c&&(n+=c,g+=c,Q+=c,i+=c);for(var E=FB(i),o=FB(Q);o>=1<E?new sB([],e):w;if(w&&o>E&&n5;I-=5){var h=E>>>I&31;a=a.array[h]=IB(a.array[h],e)}a.array[E>>>5&31]=w}if(Q=o)n-=o,Q-=o,s=5,r=null,C=C&&C.removeBefore(e,0,n);else if(n>g||o>>s&31;if(Y!==o>>>s&31)break;Y&&(c+=(1<g&&(r=r.removeBefore(e,s,n-c)),r&&oi&&(i=r.size),n(s)||(r=r.map((function(A){return eA(A)}))),e.push(r)}return i>A.size&&(A=A.setSize(i)),qA(A,B,e)}function FB(A){return A<32?0:A-1>>>5<<5}function DB(A){return null==A?dB():uB(A)?A:dB().withMutations((function(B){var t=e(A);fA(t.size),t.forEach((function(A,t){return B.set(t,A)}))}))}function uB(A){return pA(A)&&c(A)}function lB(A,B,t,e){var g=Object.create(DB.prototype);return g.size=A?A.size:0,g._map=A,g._list=B,g.__ownerID=t,g.__hash=e,g}function dB(){return cB||(cB=lB(vA(),CB()))}function UB(A,B,t){var e,g,i=A._map,n=A._list,Q=i.get(B),s=void 0!==Q;if(t===a){if(!s)return A;n.size>=32&&n.size>=2*i.size?(e=(g=n.filter((function(A,B){return void 0!==A&&Q!==B}))).toKeyedSeq().map((function(A){return A[0]})).flip().toMap(),A.__ownerID&&(e.__ownerID=g.__ownerID=A.__ownerID)):(e=i.remove(B),g=Q===n.size-1?n.pop():n.set(Q,void 0))}else if(s){if(t===n.get(Q)[1])return A;e=i,g=n.set(Q,[B,t])}else e=i.set(B,n.size),g=n.set(n.size,[B,t]);return A.__ownerID?(A.size=e.size,A._map=e,A._list=g,A.__hash=void 0,A):lB(e,g)}function NB(A,B){this._iter=A,this._useKeys=B,this.size=A.size}function mB(A){this._iter=A,this.size=A.size}function GB(A){this._iter=A,this.size=A.size}function fB(A){this._iter=A,this.size=A.size}function HB(A){var B=VB(A);return B._iter=A,B.size=A.size,B.flip=function(){return A},B.reverse=function(){var B=A.reverse.apply(this);return B.flip=function(){return A.reverse()},B},B.has=function(B){return A.includes(B)},B.includes=function(B){return A.has(B)},B.cacheResult=KB,B.__iterateUncached=function(B,t){var e=this;return A.__iterate((function(A,t){return!1!==B(t,A,e)}),t)},B.__iteratorUncached=function(B,t){if(2===B){var e=A.__iterator(B,t);return new J((function(){var A=e.next();if(!A.done){var B=A.value[0];A.value[0]=A.value[1],A.value[1]=B}return A}))}return A.__iterator(1===B?0:1,t)},B}function pB(A,B,t){var e=VB(A);return e.size=A.size,e.has=function(B){return A.has(B)},e.get=function(e,g){var i=A.get(e,a);return i===a?g:B.call(t,i,e,A)},e.__iterateUncached=function(e,g){var i=this;return A.__iterate((function(A,g,n){return!1!==e(B.call(t,A,g,n),g,i)}),g)},e.__iteratorUncached=function(e,g){var i=A.__iterator(2,g);return new J((function(){var g=i.next();if(g.done)return g;var n=g.value,Q=n[0];return k(e,Q,B.call(t,n[1],Q,A),g)}))},e}function RB(A,B){var t=VB(A);return t._iter=A,t.size=A.size,t.reverse=function(){return A},A.flip&&(t.flip=function(){var B=HB(A);return B.reverse=function(){return A.flip()},B}),t.get=function(t,e){return A.get(B?t:-1-t,e)},t.has=function(t){return A.has(B?t:-1-t)},t.includes=function(B){return A.includes(B)},t.cacheResult=KB,t.__iterate=function(B,t){var e=this;return A.__iterate((function(A,t){return B(A,t,e)}),!t)},t.__iterator=function(B,t){return A.__iterator(B,!t)},t}function yB(A,B,t,e){var g=VB(A);return e&&(g.has=function(e){var g=A.get(e,a);return g!==a&&!!B.call(t,g,e,A)},g.get=function(e,g){var i=A.get(e,a);return i!==a&&B.call(t,i,e,A)?i:g}),g.__iterateUncached=function(g,i){var n=this,Q=0;return A.__iterate((function(A,i,s){if(B.call(t,A,i,s))return Q++,g(A,e?i:Q-1,n)}),i),Q},g.__iteratorUncached=function(g,i){var n=A.__iterator(2,i),Q=0;return new J((function(){for(;;){var i=n.next();if(i.done)return i;var s=i.value,r=s[0],c=s[1];if(B.call(t,c,r,A))return k(g,e?r:Q++,c,i)}}))},g}function JB(A,B,t,e){var g=A.size;if(void 0!==B&&(B|=0),void 0!==t&&(t===1/0?t=g:t|=0),U(B,t,g))return A;var i=N(B,g),n=m(t,g);if(i!=i||n!=n)return JB(A.toSeq().cacheResult(),B,t,e);var Q,s=n-i;s==s&&(Q=s<0?0:s);var r=VB(A);return r.size=0===Q?Q:A.size&&Q||void 0,!e&&Z(A)&&Q>=0&&(r.get=function(B,t){return(B=l(this,B))>=0&&BQ)return{value:void 0,done:!0};var A=g.next();return e||1===B?A:k(B,s-1,0===B?void 0:A.value[1],A)}))},r}function kB(A,B,t,e){var g=VB(A);return g.__iterateUncached=function(g,i){var n=this;if(i)return this.cacheResult().__iterate(g,i);var Q=!0,s=0;return A.__iterate((function(A,i,r){if(!Q||!(Q=B.call(t,A,i,r)))return s++,g(A,e?i:s-1,n)})),s},g.__iteratorUncached=function(g,i){var n=this;if(i)return this.cacheResult().__iterator(g,i);var Q=A.__iterator(2,i),s=!0,r=0;return new J((function(){var A,i,c;do{if((A=Q.next()).done)return e||1===g?A:k(g,r++,0===g?void 0:A.value[1],A);var E=A.value;i=E[0],c=E[1],s&&(s=B.call(t,c,i,n))}while(s);return 2===g?A:k(g,i,c,A)}))},g}function TB(A,B){var t=Q(A),g=[A].concat(B).map((function(A){return n(A)?t&&(A=e(A)):A=t?q(A):$(Array.isArray(A)?A:[A]),A})).filter((function(A){return 0!==A.size}));if(0===g.length)return A;if(1===g.length){var i=g[0];if(i===A||t&&Q(i)||s(A)&&s(i))return i}var r=new V(g);return t?r=r.toKeyedSeq():s(A)||(r=r.toSetSeq()),(r=r.flatten(!0)).size=g.reduce((function(A,B){if(void 0!==A){var t=B.size;if(void 0!==t)return A+t}}),0),r}function jB(A,B,t){var e=VB(A);return e.__iterateUncached=function(e,g){var i=0,Q=!1;return function A(s,r){var c=this;s.__iterate((function(g,s){return(!B||r0}function zB(A,B,e){var g=VB(A);return g.size=new V(e).map((function(A){return A.size})).min(),g.__iterate=function(A,B){for(var t,e=this.__iterator(1,B),g=0;!(t=e.next()).done&&!1!==A(t.value,g++,this););return g},g.__iteratorUncached=function(A,g){var i=e.map((function(A){return A=t(A),S(g?A.reverse():A)})),n=0,Q=!1;return new J((function(){var t;return Q||(t=i.map((function(A){return A.next()})),Q=t.some((function(A){return A.done}))),Q?{value:void 0,done:!0}:k(A,n++,B.apply(null,t.map((function(A){return A.value}))))}))},g}function LB(A,B){return Z(A)?B:A.constructor(B)}function PB(A){if(A!==Object(A))throw new TypeError("Expected [K, V] tuple: "+A)}function vB(A){return fA(A.size),u(A)}function WB(A){return Q(A)?e:s(A)?g:i}function VB(A){return Object.create((Q(A)?P:s(A)?v:W).prototype)}function KB(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):L.prototype.cacheResult.call(this)}function OB(A,B){return A>B?1:A=0;t--)B={value:arguments[t],next:B};return this.__ownerID?(this.size=A,this._head=B,this.__hash=void 0,this.__altered=!0,this):Ft(A,B)},at.prototype.pushAll=function(A){if(0===(A=g(A)).size)return this;fA(A.size);var B=this.size,t=this._head;return A.reverse().forEach((function(A){B++,t={value:A,next:t}})),this.__ownerID?(this.size=B,this._head=t,this.__hash=void 0,this.__altered=!0,this):Ft(B,t)},at.prototype.pop=function(){return this.slice(1)},at.prototype.unshift=function(){return this.push.apply(this,arguments)},at.prototype.unshiftAll=function(A){return this.pushAll(A)},at.prototype.shift=function(){return this.pop.apply(this,arguments)},at.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dt()},at.prototype.slice=function(A,B){if(U(A,B,this.size))return this;var t=N(A,this.size);if(m(B,this.size)!==this.size)return wA.prototype.slice.call(this,A,B);for(var e=this.size-t,g=this._head;t--;)g=g.next;return this.__ownerID?(this.size=e,this._head=g,this.__hash=void 0,this.__altered=!0,this):Ft(e,g)},at.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?Ft(this.size,this._head,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},at.prototype.__iterate=function(A,B){if(B)return this.reverse().__iterate(A);for(var t=0,e=this._head;e&&!1!==A(e.value,t++,this);)e=e.next;return t},at.prototype.__iterator=function(A,B){if(B)return this.reverse().__iterator(A);var t=0,e=this._head;return new J((function(){if(e){var B=e.value;return e=e.next,k(A,t++,B)}return{value:void 0,done:!0}}))},at.isStack=It;var ht,Yt="@@__IMMUTABLE_STACK__@@",Mt=at.prototype;function Ft(A,B,t,e){var g=Object.create(Mt);return g.size=A,g._head=B,g.__ownerID=t,g.__hash=e,g.__altered=!1,g}function Dt(){return ht||(ht=Ft(0))}function ut(A,B){var t=function(t){A.prototype[t]=B[t]};return Object.keys(B).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(B).forEach(t),A}Mt[Yt]=!0,Mt.withMutations=JA.withMutations,Mt.asMutable=JA.asMutable,Mt.asImmutable=JA.asImmutable,Mt.wasAltered=JA.wasAltered,t.Iterator=J,ut(t,{toArray:function(){fA(this.size);var A=new Array(this.size||0);return this.valueSeq().__iterate((function(B,t){A[t]=B})),A},toIndexedSeq:function(){return new mB(this)},toJS:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJS?A.toJS():A})).__toJS()},toJSON:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJSON?A.toJSON():A})).__toJS()},toKeyedSeq:function(){return new NB(this,!0)},toMap:function(){return HA(this.toKeyedSeq())},toObject:function(){fA(this.size);var A={};return this.__iterate((function(B,t){A[t]=B})),A},toOrderedMap:function(){return DB(this.toKeyedSeq())},toOrderedSet:function(){return rt(Q(this)?this.valueSeq():this)},toSet:function(){return Bt(Q(this)?this.valueSeq():this)},toSetSeq:function(){return new GB(this)},toSeq:function(){return s(this)?this.toIndexedSeq():Q(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return at(Q(this)?this.valueSeq():this)},toList:function(){return gB(Q(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(A,B){return 0===this.size?A+B:A+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+B},concat:function(){var B=A.call(arguments,0);return LB(this,TB(this,B))},includes:function(A){return this.some((function(B){return nA(B,A)}))},entries:function(){return this.__iterator(2)},every:function(A,B){fA(this.size);var t=!0;return this.__iterate((function(e,g,i){if(!A.call(B,e,g,i))return t=!1,!1})),t},filter:function(A,B){return LB(this,yB(this,A,B,!0))},find:function(A,B,t){var e=this.findEntry(A,B);return e?e[1]:t},forEach:function(A,B){return fA(this.size),this.__iterate(B?A.bind(B):A)},join:function(A){fA(this.size),A=void 0!==A?""+A:",";var B="",t=!0;return this.__iterate((function(e){t?t=!1:B+=A,B+=null!=e?e.toString():""})),B},keys:function(){return this.__iterator(0)},map:function(A,B){return LB(this,pB(this,A,B))},reduce:function(A,B,t){var e,g;return fA(this.size),arguments.length<2?g=!0:e=B,this.__iterate((function(B,i,n){g?(g=!1,e=B):e=A.call(t,e,B,i,n)})),e},reduceRight:function(A,B,t){var e=this.toKeyedSeq().reverse();return e.reduce.apply(e,arguments)},reverse:function(){return LB(this,RB(this,!0))},slice:function(A,B){return LB(this,JB(this,A,B,!0))},some:function(A,B){return!this.every(mt(A),B)},sort:function(A){return LB(this,xB(this,A))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(A,B){return u(A?this.toSeq().filter(A,B):this)},countBy:function(A,B){return function(A,B,t){var e=HA().asMutable();return A.__iterate((function(g,i){e.update(B.call(t,g,i,A),0,(function(A){return A+1}))})),e.asImmutable()}(this,A,B)},equals:function(A){return QA(this,A)},entrySeq:function(){var A=this;if(A._cache)return new V(A._cache);var B=A.toSeq().map(Nt).toIndexedSeq();return B.fromEntrySeq=function(){return A.toSeq()},B},filterNot:function(A,B){return this.filter(mt(A),B)},findEntry:function(A,B,t){var e=t;return this.__iterate((function(t,g,i){if(A.call(B,t,g,i))return e=[g,t],!1})),e},findKey:function(A,B){var t=this.findEntry(A,B);return t&&t[0]},findLast:function(A,B,t){return this.toKeyedSeq().reverse().find(A,B,t)},findLastEntry:function(A,B,t){return this.toKeyedSeq().reverse().findEntry(A,B,t)},findLastKey:function(A,B){return this.toKeyedSeq().reverse().findKey(A,B)},first:function(){return this.find(d)},flatMap:function(A,B){return LB(this,function(A,B,t){var e=WB(A);return A.toSeq().map((function(g,i){return e(B.call(t,g,i,A))})).flatten(!0)}(this,A,B))},flatten:function(A){return LB(this,jB(this,A,!0))},fromEntrySeq:function(){return new fB(this)},get:function(A,B){return this.find((function(B,t){return nA(t,A)}),void 0,B)},getIn:function(A,B){for(var t,e=this,g=XB(A);!(t=g.next()).done;){var i=t.value;if((e=e&&e.get?e.get(i,a):a)===a)return B}return e},groupBy:function(A,B){return function(A,B,t){var e=Q(A),g=(c(A)?DB():HA()).asMutable();A.__iterate((function(i,n){g.update(B.call(t,i,n,A),(function(A){return(A=A||[]).push(e?[n,i]:i),A}))}));var i=WB(A);return g.map((function(B){return LB(A,i(B))}))}(this,A,B)},has:function(A){return this.get(A,a)!==a},hasIn:function(A){return this.getIn(A,a)!==a},isSubset:function(A){return A="function"==typeof A.includes?A:t(A),this.every((function(B){return A.includes(B)}))},isSuperset:function(A){return(A="function"==typeof A.isSubset?A:t(A)).isSubset(this)},keyOf:function(A){return this.findKey((function(B){return nA(B,A)}))},keySeq:function(){return this.toSeq().map(Ut).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(A){return this.toKeyedSeq().reverse().keyOf(A)},max:function(A){return SB(this,A)},maxBy:function(A,B){return SB(this,B,A)},min:function(A){return SB(this,A?Gt(A):pt)},minBy:function(A,B){return SB(this,B?Gt(B):pt,A)},rest:function(){return this.slice(1)},skip:function(A){return this.slice(Math.max(0,A))},skipLast:function(A){return LB(this,this.toSeq().reverse().skip(A).reverse())},skipWhile:function(A,B){return LB(this,kB(this,A,B,!0))},skipUntil:function(A,B){return this.skipWhile(mt(A),B)},sortBy:function(A,B){return LB(this,xB(this,B,A))},take:function(A){return this.slice(0,Math.max(0,A))},takeLast:function(A){return LB(this,this.toSeq().reverse().take(A).reverse())},takeWhile:function(A,B){return LB(this,function(A,B,t){var e=VB(A);return e.__iterateUncached=function(e,g){var i=this;if(g)return this.cacheResult().__iterate(e,g);var n=0;return A.__iterate((function(A,g,Q){return B.call(t,A,g,Q)&&++n&&e(A,g,i)})),n},e.__iteratorUncached=function(e,g){var i=this;if(g)return this.cacheResult().__iterator(e,g);var n=A.__iterator(2,g),Q=!0;return new J((function(){if(!Q)return{value:void 0,done:!0};var A=n.next();if(A.done)return A;var g=A.value,s=g[0],r=g[1];return B.call(t,r,s,i)?2===e?A:k(e,s,r,A):(Q=!1,{value:void 0,done:!0})}))},e}(this,A,B))},takeUntil:function(A,B){return this.takeWhile(mt(A),B)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(A){if(A.size===1/0)return 0;var B=c(A),t=Q(A),e=B?1:0;return function(A,B){return B=aA(B,3432918353),B=aA(B<<15|B>>>-15,461845907),B=aA(B<<13|B>>>-13,5),B=aA((B=(B+3864292196|0)^A)^B>>>16,2246822507),B=IA((B=aA(B^B>>>13,3266489909))^B>>>16)}(A.__iterate(t?B?function(A,B){e=31*e+Rt(hA(A),hA(B))|0}:function(A,B){e=e+Rt(hA(A),hA(B))|0}:B?function(A){e=31*e+hA(A)|0}:function(A){e=e+hA(A)|0}),e)}(this))}});var lt=t.prototype;lt[E]=!0,lt[y]=lt.values,lt.__toJS=lt.toArray,lt.__toStringMapper=ft,lt.inspect=lt.toSource=function(){return this.toString()},lt.chain=lt.flatMap,lt.contains=lt.includes,ut(e,{flip:function(){return LB(this,HB(this))},mapEntries:function(A,B){var t=this,e=0;return LB(this,this.toSeq().map((function(g,i){return A.call(B,[i,g],e++,t)})).fromEntrySeq())},mapKeys:function(A,B){var t=this;return LB(this,this.toSeq().flip().map((function(e,g){return A.call(B,e,g,t)})).flip())}});var dt=e.prototype;function Ut(A,B){return B}function Nt(A,B){return[B,A]}function mt(A){return function(){return!A.apply(this,arguments)}}function Gt(A){return function(){return-A.apply(this,arguments)}}function ft(A){return"string"==typeof A?JSON.stringify(A):String(A)}function Ht(){return D(arguments)}function pt(A,B){return AB?-1:0}function Rt(A,B){return A^B+2654435769+(A<<6)+(A>>2)|0}return dt[o]=!0,dt[y]=lt.entries,dt.__toJS=lt.toObject,dt.__toStringMapper=function(A,B){return JSON.stringify(B)+": "+ft(A)},ut(g,{toKeyedSeq:function(){return new NB(this,!1)},filter:function(A,B){return LB(this,yB(this,A,B,!1))},findIndex:function(A,B){var t=this.findEntry(A,B);return t?t[0]:-1},indexOf:function(A){var B=this.keyOf(A);return void 0===B?-1:B},lastIndexOf:function(A){var B=this.lastKeyOf(A);return void 0===B?-1:B},reverse:function(){return LB(this,RB(this,!1))},slice:function(A,B){return LB(this,JB(this,A,B,!1))},splice:function(A,B){var t=arguments.length;if(B=Math.max(0|B,0),0===t||2===t&&!B)return this;A=N(A,A<0?this.count():this.size);var e=this.slice(0,A);return LB(this,1===t?e:e.concat(D(arguments,2),this.slice(A+B)))},findLastIndex:function(A,B){var t=this.findLastEntry(A,B);return t?t[0]:-1},first:function(){return this.get(0)},flatten:function(A){return LB(this,jB(this,A,!1))},get:function(A,B){return(A=l(this,A))<0||this.size===1/0||void 0!==this.size&&A>this.size?B:this.find((function(B,t){return t===A}),void 0,B)},has:function(A){return(A=l(this,A))>=0&&(void 0!==this.size?this.size===1/0||AA/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:A=>Math.max(0,(A+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:A=>-A*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:A=>Math.abs(A)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:A=>(A=Math.round((Math.abs(A)+10)/10),Math.max(1,Math.min(A,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:A=>Math.max(-100,Math.min(A,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:A=>1-Math.max(0,Math.min(A,100))/100,shapeChanges:!1}},g.EFFECTS=Object.keys(g.EFFECT_INFO),g.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},A.exports=g},function(A,B,t){const e=t(62);A.exports=class extends e{constructor(A,B,t,e){let g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;super(),this._socket=A.getScratchLinkSocket("BLE"),this._socket.setOnOpen(this.requestPeripheral.bind(this)),this._socket.setOnClose(this.handleDisconnectError.bind(this)),this._socket.setOnError(this._handleRequestError.bind(this)),this._socket.setHandleMessage(this._handleMessage.bind(this)),this._sendMessage=this._socket.sendMessage.bind(this._socket),this._availablePeripherals={},this._connectCallback=e,this._connected=!1,this._characteristicDidChangeCallback=null,this._resetCallback=g,this._discoverTimeoutID=null,this._extensionId=B,this._peripheralOptions=t,this._runtime=A,this._socket.open()}requestPeripheral(){this._availablePeripherals={},this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._discoverTimeoutID=window.setTimeout(this._handleDiscoverTimeout.bind(this),15e3),this.sendRemoteRequest("discover",this._peripheralOptions).catch(A=>{this._handleRequestError(A)})}connectPeripheral(A){this.sendRemoteRequest("connect",{peripheralId:A}).then(()=>{this._connected=!0,this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTED),this._connectCallback()}).catch(A=>{this._handleRequestError(A)})}disconnect(){this._connected&&(this._connected=!1),this._socket.isOpen()&&this._socket.close(),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECTED)}isConnected(){return this._connected}startNotifications(A,B){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const e={serviceId:A,characteristicId:B};return this._characteristicDidChangeCallback=t,this.sendRemoteRequest("startNotifications",e).catch(A=>{this.handleDisconnectError(A)})}read(A,B){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const e={serviceId:A,characteristicId:B};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(e.startNotifications=!0),t&&(this._characteristicDidChangeCallback=t),this.sendRemoteRequest("read",e).catch(A=>{this.handleDisconnectError(A)})}write(A,B,t){let e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i={serviceId:A,characteristicId:B,message:t};return e&&(i.encoding=e),null!==g&&(i.withResponse=g),this.sendRemoteRequest("write",i).catch(A=>{this.handleDisconnectError(A)})}didReceiveCall(A,B){switch(A){case"didDiscoverPeripheral":this._availablePeripherals[B.peripheralId]=B,this._runtime.emit(this._runtime.constructor.PERIPHERAL_LIST_UPDATE,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidPickPeripheral":this._availablePeripherals[B.peripheralId]=B,this._runtime.emit(this._runtime.constructor.USER_PICKED_PERIPHERAL,this._availablePeripherals),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"userDidNotPickPeripheral":this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT),this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID);break;case"characteristicDidChange":this._characteristicDidChangeCallback&&this._characteristicDidChangeCallback(B.message);break;case"ping":return 42}}handleDisconnectError(){this._connected&&(this.disconnect(),this._resetCallback&&this._resetCallback(),this._runtime.emit(this._runtime.constructor.PERIPHERAL_CONNECTION_LOST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId}))}_handleRequestError(){this._runtime.emit(this._runtime.constructor.PERIPHERAL_REQUEST_ERROR,{message:"Scratch lost connection to",extensionId:this._extensionId})}_handleDiscoverTimeout(){this._discoverTimeoutID&&window.clearTimeout(this._discoverTimeoutID),this._runtime.emit(this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT)}}},function(A,B,t){const e=t(0);A.exports=function(A){if("string"!=typeof A){if(!Array.isArray(A))return e.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&'"]/g,A=>{switch(A){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})}},function(A,B,t){const e=t(0),g=[];class i{constructor(A){this.isLoop=!1,this.warpMode=A,this.justReported=null,this.reporting="",this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null}reset(){return this.isLoop=!1,this.warpMode=!1,this.justReported=null,this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null,this}reuse(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(A),this}static create(A){const B=g.pop();return void 0!==B?(B.warpMode=Boolean(A),B):new i(A)}static release(A){void 0!==A&&g.push(A.reset())}}class n{constructor(A){this.topBlock=A,this.stack=[],this.stackFrames=[],this.status=0,this.isKilled=!1,this.target=null,this.blockContainer=null,this.requestScriptGlowInFrame=!1,this.blockGlowInFrame=null,this.warpTimer=null,this.justReported=null,this.triedToCompile=!1,this.isCompiled=!1,this.timer=null,this.generator=null,this.procedures=null}static get STATUS_RUNNING(){return 0}static get STATUS_PROMISE_WAIT(){return 1}static get STATUS_YIELD(){return 2}static get STATUS_YIELD_TICK(){return 3}static get STATUS_DONE(){return 4}static getIdFromTargetAndBlock(A,B){return"".concat(A.id,"&").concat(B)}getId(){return n.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(A){if(this.stack.push(A),this.stack.length>this.stackFrames.length){const A=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(i.create(void 0!==A&&A.warpMode))}}reuseStackForNextBlock(A){this.stack[this.stack.length-1]=A,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return i.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let A=this.peekStack();for(;null!==A;){const B=this.target.blocks.getBlock(A);if(void 0!==B&&"procedures_call"===B.opcode)break;this.popStack(),A=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=n.STATUS_DONE)}peekStack(){return this.stack.length>0?this.stack[this.stack.length-1]:null}peekStackFrame(){return this.stackFrames.length>0?this.stackFrames[this.stackFrames.length-1]:null}peekParentStackFrame(){return this.stackFrames.length>1?this.stackFrames[this.stackFrames.length-2]:null}pushReportedValue(A){this.justReported=void 0===A?null:A}initParams(){const A=this.peekStackFrame();null===A.params&&(A.params={})}pushParam(A,B){this.peekStackFrame().params[A]=B}getParam(A){for(let B=this.stackFrames.length-1;B>=0;B--){const t=this.stackFrames[B];if(null!==t.params)return t.params.hasOwnProperty(A)?t.params[A]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const A=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(A)}isRecursiveCall(A){let B=5;for(let t=this.stack.length-1-1;t>=0;t--){const e=this.target.blocks.getBlock(this.stack[t]);if("procedures_call"===e.opcode&&e.mutation.proccode===A)return!0;if(--B<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const A=t(207);this.triedToCompile=!0;const B=this.topBlock,g=this.blockContainer.getBlock(B)?this.blockContainer:this.target.runtime.flyoutBlocks,i=g.getCachedCompileResult(B);if(i&&!i.success)return;let n;if(i)n=i.value;else try{n=A(this),g.cacheCompileResult(B,n)}catch(A){return e.error("cannot compile script",this.target.getName(),A),g.cacheCompileError(B,A),void this.target.runtime.emitCompileError(this.target,A)}this.procedures={};for(const A of Object.keys(n.procedures))this.procedures[A]=n.procedures[A](this);this.generator=n.startingFunction(this)(),this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}A.exports=n},function(A,B,t){const e=t(7),g=t(0),i=function(A,B,t,e){return A.assetId=B.assetId,t.audioEngine?t.audioEngine.decodeSoundPlayer(Object.assign({},A,{data:B.data})).then(B=>{A.soundId=B.id;const g=B.buffer;return A.rate=g.sampleRate,A.sampleCount=g.length,null!==e&&e.addSoundPlayer(B),t.isPackaged&&(A.asset=null),A}):(g.warn("No audio engine present; cannot load sound asset: ",A.md5),Promise.resolve(A))},n=function(A,B,t){const e=A.asset,g=A.assetId,n=A.sampleCount,Q=A.rate,s=A.format,r=A.dataFormat;return A.assetId=B.storage.defaultAssetId.Sound,A.asset=B.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat),i(A,A.asset,B,t).then(A=>(A.broken={},A.broken.assetId=g,A.broken.md5="".concat(g,".").concat(r),A.broken.asset=e,A.broken.sampleCount=n,A.broken.rate=Q,A.broken.format=s,A.broken.dataFormat=r,A))};A.exports={loadSound:function(A,B,t){if(!B.storage)return g.warn("No storage module present; cannot load sound asset: ",A.md5),Promise.resolve(A);const Q=e.splitFirst(A.md5,"."),s=Q[0],r=Q[1].toLowerCase();return A.dataFormat=r,(A.asset&&Promise.resolve(A.asset)||B.storage.load(B.storage.AssetType.Sound,s,r)).then(e=>(A.asset=e,e?i(A,e,B,t):(g.warn("Failed to find sound data: ",A.md5),n(A,B,t)))).catch(e=>(g.warn("Failed to load sound: ".concat(A.md5," with error: ").concat(e)),n(A,B,t)))},loadSoundFromAsset:i}},function(A,B,t){const e=t(7),g=t(0),i=t(76),{loadSvgString:n,serializeSvgToString:Q}=t(52),{parseVectorMetadata:s}=t(87),r=function(A,B,t,e){return new Promise(g=>{let i=A.asset.decodeText();if(void 0===t){const B=s(i);B&&(t=B,A.rotationCenterX=t[0],A.rotationCenterY=t[1])}if(e&&2===e){const t=Q(n(i,!0));if(i!==t){i=t;const e=B.storage;A.asset.encodeTextData(t,e.DataFormat.SVG,!0),A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}}A.skinId=B.renderer.createSVGSkin(i,t),A.size=B.renderer.getSkinSize(A.skinId),t||(t=B.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=t[0],A.rotationCenterY=t[1],A.bitmapResolution=1),B.isPackaged&&(A.asset=null),g(A)})},c=new class{constructor(){this.pool=[],this.clearSoon=null}clear(){this.clearSoon||(this.clearSoon=new Promise(A=>setTimeout(A,1e3)).then(()=>{this.pool.length=0,this.clearSoon=null}))}create(){return this.pool.pop()||document.createElement("canvas")}release(A){this.clear(),this.pool.push(A)}},E=A=>new Promise((B,t)=>{const e=new Image;e.onload=function(){B(e),e.onload=null,e.onerror=null},e.onerror=function(){t(new Error("Costume load failed. Asset could not be read.")),e.onload=null,e.onerror=null},e.src=A}),o=new i(async A=>{let B;for(let t=0;t<3;t++)try{if("function"==typeof createImageBitmap){const B=await createImageBitmap(new Blob([A.data.buffer],{type:A.assetType.contentType}));if(!B)throw new Error("createImageBitmap resolved with ".concat(B));return B}return await E(A.encodeDataURI())}catch(A){B||(B=A),g.warn(A),await new Promise(A=>setTimeout(A,2e3*Math.random()))}throw B},25),w=function(A,B,t){return function(A,B,t){return A&&A.asset?B.v2BitmapAdapter?Promise.all([A.asset,A.textLayerAsset].map(A=>A?o.do(A):null)).then(e=>{let[g,i]=e;if(!g)throw new Error("Loading bitmap costume base failed.");const n=1===A.bitmapResolution?2:1;let Q,s;if(i){s=c.create(),s.width=g.width,s.height=g.height;const A=s.getContext("2d");A.drawImage(g,0,0),A.drawImage(i,0,0),Q=s}else Q=g;return 1!==n&&(Q=B.v2BitmapAdapter.resize(Q,Q.width*n,Q.height*n),s&&c.release(s)),Q.reusable=!1,t&&(t[0]=t[0]*n,t[1]=t[1]*n,A.rotationCenterX=t[0],A.rotationCenterY=t[1]),A.bitmapResolution=2,delete A.textLayerMD5,delete A.textLayerAsset,{image:Q,rotationCenter:t,assetMatchesBase:1===n&&!i}}).finally(()=>{delete A.textLayerMD5,delete A.textLayerAsset}):Promise.reject("No V2 Bitmap adapter present."):Promise.reject("Costume load failed. Assets were missing.")}(A,B,t).then(t=>(t.assetMatchesBase||function(t){if(!B.v2BitmapAdapter)return Promise.reject("No V2 Bitmap adapter present.");const e=B.storage;A.asset=e.createAsset(e.AssetType.ImageBitmap,e.DataFormat.PNG,B.v2BitmapAdapter.convertDataURIToBinary(t),null,!0),A.dataFormat=e.DataFormat.PNG,A.assetId=A.asset.assetId,A.md5="".concat(A.assetId,".").concat(A.dataFormat)}((A=>{if(A instanceof HTMLCanvasElement)return A.toDataURL();const B=c.create();B.width=A.width,B.height=A.height;B.getContext("2d").drawImage(A,0,0);const t=B.toDataURL();return c.release(B),t})(t.image)),t)).then(t=>{let e,{image:g,rotationCenter:i}=t;i&&(e=[i[0]/2,i[1]/2]),A.skinId=B.renderer.createBitmapSkin(g,A.bitmapResolution,e);const n=B.renderer.getSkinSize(A.skinId);return A.size=[2*n[0],2*n[1]],i||(i=B.renderer.getSkinRotationCenter(A.skinId),A.rotationCenterX=2*i[0],A.rotationCenterY=2*i[1],A.bitmapResolution=2),B.isPackaged&&(A.asset=null),A})},C=function(A,B){const t=A.asset,e=A.assetId,g=A.rotationCenterX,i=A.rotationCenterY,n=A.bitmapResolution,Q=A.dataFormat,s=B.storage.AssetType,c=A.dataFormat===s.ImageVector.runtimeFormat;A.assetId=c?B.storage.defaultAssetId.ImageVector:B.storage.defaultAssetId.ImageBitmap,A.asset=B.storage.get(A.assetId),A.md5="".concat(A.assetId,".").concat(A.asset.dataFormat);return(c?r(A,B):w(A,B)).then(A=>(A.broken={},A.broken.assetId=e,A.broken.md5="".concat(e,".").concat(Q),A.broken.asset=t,A.broken.dataFormat=Q,A.broken.rotationCenterX=g,A.broken.rotationCenterY=i,A.broken.bitmapResolution=n,A))},a=function(A,B,t){A.assetId=A.asset.assetId;if(!B.renderer)return g.warn("No rendering module present; cannot load costume: ",A.name),Promise.resolve(A);const e=B.storage.AssetType;let i;return"number"!=typeof A.rotationCenterX||isNaN(A.rotationCenterX)||"number"!=typeof A.rotationCenterY||isNaN(A.rotationCenterY)||(i=[A.rotationCenterX,A.rotationCenterY]),A.asset.assetType.runtimeFormat===e.ImageVector.runtimeFormat?r(A,B,i,t).catch(t=>(g.warn("Error loading vector image: ".concat(t)),C(A,B))):w(A,B,i).catch(t=>(g.warn("Error loading bitmap image: ".concat(t)),C(A,B)))};A.exports={loadCostume:function(A,B,t,i){const n=e.splitFirst(A,"."),Q=n[0],s=n[1].toLowerCase();if(B.dataFormat=s,B.asset)return a(B,t,i);if(!t.storage)return g.warn("No storage module present; cannot load costume asset: ",A),Promise.resolve(B);if(!t.storage.defaultAssetId)return g.warn("No default assets found"),Promise.resolve(B);const r=t.storage.AssetType,c="svg"===s?r.ImageVector:r.ImageBitmap,E=t.storage.load(c,Q,s);let o;return o=B.textLayerMD5?t.storage.load(r.ImageBitmap,B.textLayerMD5,"png"):Promise.resolve(null),Promise.all([E,o]).then(A=>A[0]?(B.asset=A[0],A[1]&&(B.textLayerAsset=A[1]),a(B,t,i)):C(B,t)).catch(A=>(g.warn("Error loading costume: ",A),C(B,t)))},loadCostumeFromAsset:a}},function(A,B,t){const e=t(16),g=t(43),i=t(9),n=t(42),Q=t(39),s=t(14),r=t(0),c=t(6),E=t(4),o=t(7),w=t(79),C=t(269),a=t(270),{loadCostume:I}=t(31),{loadSound:h}=t(30),{deserializeCostume:Y,deserializeSound:M}=t(90),F=Object.prototype.hasOwnProperty,D=["argument","colour","control","data","event","looks","math","motion","operator","procedures","sensing","sound"],u=12,l=13,d={math_number:[4,"NUM"],math_positive_number:[5,"NUM"],math_whole_number:[6,"NUM"],math_integer:[7,"NUM"],math_angle:[8,"NUM"],colour_picker:[9,"COLOUR"],text:[10,"TEXT"],event_broadcast_menu:[11,"BROADCAST_OPTION"],data_variable:[u,"VARIABLE"],data_listcontents:[l,"LIST"]},U=function(A){const B=function(A){if(F.call(d,A.opcode)){const B=d[A.opcode],t=B[0],e=B[1],g=A.fields[e],i=[t,g.value];return"event_broadcast_menu"===A.opcode?i.push(g.id):"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode||(i.push(g.id),A.topLevel&&(i.push(A.x?Math.round(A.x):0),i.push(A.y?Math.round(A.y):0))),i}return null}(A);if(B)return B;const t=Object.create(null);return t.opcode=A.opcode,t.next=A.next,t.parent=A.parent,t.inputs=function(A){const B=Object.create(null);for(const t in A)F.call(A,t)&&(A[t].block===A[t].shadow?B[t]=[1,A[t].block]:null===A[t].shadow?B[t]=[2,A[t].block]:B[t]=[3,A[t].block,A[t].shadow]);return B}(A.inputs),t.fields=function(A){const B=Object.create(null);for(const t in A)F.call(A,t)&&(B[t]=[A[t].value],A[t].hasOwnProperty("id")&&B[t].push(A[t].id));return B}(A.fields),t.shadow=A.shadow,A.topLevel?(t.topLevel=!0,t.x=A.x?Math.round(A.x):0,t.y=A.y?Math.round(A.y):0):t.topLevel=!1,A.mutation&&(t.mutation=A.mutation),A.comment&&(t.comment=A.comment),t},N=function(A,B){const t=A.inputs;for(const A in t){const e=t[A];for(let A=1;A"number"==typeof A||"string"==typeof A||"boolean"==typeof A,R=A=>{if(Array.isArray(A)){let B=null;for(let t=0;t=A.costumes.length)&&(r.warn("currentCostume property for target ".concat(A.name," is out of range")),A.currentCostume=E.clamp(A.currentCostume,0,A.costumes.length-1)),t.currentCostume=A.currentCostume,t.costumes=A.costumes.map(f),t.sounds=A.sounds.map(H),A.hasOwnProperty("volume")&&(t.volume=A.volume),A.hasOwnProperty("layerOrder")&&(t.layerOrder=A.layerOrder),t.isStage?(A.hasOwnProperty("tempo")&&(t.tempo=A.tempo),A.hasOwnProperty("videoTransparency")&&(t.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(t.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(t.textToSpeechLanguage=A.textToSpeechLanguage)):(t.visible=A.visible,t.x=A.x,t.y=A.y,t.size=A.size,t.direction=A.direction,t.draggable=A.draggable,t.rotationStyle=A.rotationStyle),e.forEach(A=>{B.add(A)}),t},J=function(A){const B=A.map(A=>A.getLayerOrder());return E.reducedSortOrdering(B)},k=function(A,B,t){const e=(B.stageWidth-480)/2,g=(B.stageHeight-360)/2;return A.valueSeq().filter(A=>{const B=m(A.opcode);return!B||!!A.visible&&(t.add(B),!0)}).map(A=>{const B={id:A.id,mode:A.mode,opcode:A.opcode,params:A.params,spriteName:A.spriteName,value:Array.isArray(A.value)?[]:0,width:A.width,height:A.height,x:A.x-e,y:A.y-g,visible:A.visible};return"list"!==A.mode&&(B.sliderMin=A.sliderMin,B.sliderMax=A.sliderMax,B.isDiscrete=A.isDiscrete),B}).toArray()},T=function(A,B,t,e){if(!Array.isArray(A))return A;const g=Object.create(null),n=c();switch(g.id=n,g.next=null,g.parent=B,g.shadow=t,g.inputs=Object.create(null),A[0]){case 4:g.opcode="math_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 5:g.opcode="math_positive_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 6:g.opcode="math_whole_number",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 7:g.opcode="math_integer",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 8:g.opcode="math_angle",g.fields={NUM:{name:"NUM",value:A[1]}},g.topLevel=!1;break;case 9:g.opcode="colour_picker",g.fields={COLOUR:{name:"COLOUR",value:A[1]}},g.topLevel=!1;break;case 10:g.opcode="text",g.fields={TEXT:{name:"TEXT",value:A[1]}},g.topLevel=!1;break;case 11:g.opcode="event_broadcast_menu",g.fields={BROADCAST_OPTION:{name:"BROADCAST_OPTION",value:A[1],id:A[2],variableType:i.BROADCAST_MESSAGE_TYPE}},g.topLevel=!1;break;case u:g.opcode="data_variable",g.fields={VARIABLE:{name:"VARIABLE",value:A[1],id:A[2],variableType:i.SCALAR_TYPE}},A.length>3&&(g.topLevel=!0,g.x=A[3],g.y=A[4]);break;case l:g.opcode="data_listcontents",g.fields={LIST:{name:"LIST",value:A[1],id:A[2],variableType:i.LIST_TYPE}},A.length>3&&(g.topLevel=!0,g.x=A[3],g.y=A[4]);break;default:return r.error("Found unknown primitive type during deserialization: ".concat(JSON.stringify(A))),null}return e[n]=g,n},j=function(A,B,t){const e={};for(const g in A){if(!F.call(A,g))continue;const i=A[g];if(!Array.isArray(i))continue;let n=null,Q=null;const s=i[0];1===s?n=Q=T(i[1],B,!0,t):2===s?n=T(i[1],B,!1,t):(n=T(i[1],B,!1,t),Q=T(i[2],B,!0,t)),e[g]={name:g,block:n,shadow:Q}}return e},x=function(A){const B={};for(const t in A){if(!F.call(A,t))continue;const e=A[t];Array.isArray(e)&&(B[t]={name:t,value:e[0]},e.length>1&&(B[t].id=e[1]),"BROADCAST_OPTION"===t?B[t].variableType=i.BROADCAST_MESSAGE_TYPE:"VARIABLE"===t?B[t].variableType=i.SCALAR_TYPE:"LIST"===t&&(B[t].variableType=i.LIST_TYPE))}return B},S=function(A){for(const B in A){if(!Object.prototype.hasOwnProperty.call(A,B))continue;const t=A[B];Array.isArray(t)?(delete A[B],T(t,null,!1,A)):(t.id=B,t.inputs=j(t.inputs,B,A),t.fields=x(t.fields))}return A};A.exports={serialize:function(A,B){let{allowOptimization:t=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const e=Object.create(null),g=new Set,i=B?[A.getTargetById(B)]:A.targets.filter(A=>A.isOriginal),n=J(i),Q=i.map(A=>A.toJSON());A.renderer&&!B&&Q.forEach((A,B)=>{A.layerOrder=n[B]});const s=Q.map(A=>y(A,g));if(B)return s[0];if(e.targets=s,e.monitors=k(A.getMonitorState(),A,g),e.extensions=Array.from(g),A.extensionManager){const B=A.extensionManager.getExtensionURLs(),t={};for(const A of g){const e=B[A];"string"==typeof e&&(t[A]=e)}0!==Object.keys(t).length&&(e.extensionURLs=t)}const r=Object.create(null);return r.semver="3.0.0",r.vm="0.2.0",A.origin&&(r.origin=A.origin),r.agent="",e.meta=r,t&&C(e),e},deserialize:function(A,B,t,c){const C={extensionIDs:new Set,extensionURLs:new Map(Object.entries(a))};if(A.meta&&A.meta.origin?B.origin=A.meta.origin:B.origin=null,A.extensionURLs)for(const[B,t]of Object.entries(A.extensionURLs))C.extensionURLs.set(B,t);const F=((c?[A]:A.targets)||[]).map((A,B)=>Object.assign(A,{targetPaneOrder:B})).sort((A,B)=>A.layerOrder-B.layerOrder),D=A.monitors||[];return Promise.resolve(F.map(A=>function(A,B,t){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const e={costumePromises:null,soundPromises:null,soundBank:B.audioEngine&&B.audioEngine.createBank()};return e.costumePromises=(A.costumes||[]).map(A=>{const e={asset:A.asset,assetId:A.assetId,skinId:null,name:A.name,bitmapResolution:A.bitmapResolution,rotationCenterX:A.rotationCenterX,rotationCenterY:A.rotationCenterY},g=A.dataFormat||A.assetType&&A.assetType.runtimeFormat||"png",i=A.hasOwnProperty("md5ext")?A.md5ext:"".concat(A.assetId,".").concat(g);return e.md5=i,e.dataFormat=g,Y(e,B,t).then(()=>I(i,e,B))}),e.soundPromises=(A.sounds||[]).map(A=>{const g={assetId:A.assetId,format:A.format,rate:A.rate,sampleCount:A.sampleCount,name:A.name,md5:A.md5ext,dataFormat:A.dataFormat,data:null};return M(g,B,t).then(()=>h(g,B,e.soundBank))}),e}(A,B,t))).then(A=>Promise.resolve(A)).then(A=>Promise.all(F.map((t,Q)=>function(A,B,t,Q,r){if(!A.hasOwnProperty("name"))return Promise.resolve(null);const c=new e(B),o=new g(c,B);if(A.hasOwnProperty("name")&&(o.name=A.name),A.hasOwnProperty("blocks")){S(A.blocks);for(const B in A.blocks){if(!A.blocks.hasOwnProperty(B))continue;const e=A.blocks[B];c.createBlock(e);const g=m(e.opcode);g&&t.extensionIDs.add(g)}}const{costumePromises:w}=r,{soundBank:C,soundPromises:a}=r,I=o.createClone(A.isStage?s.BACKGROUND_LAYER:s.SPRITE_LAYER);if(A.hasOwnProperty("tempo")&&(I.tempo=A.tempo),A.hasOwnProperty("volume")&&(I.volume=A.volume),A.hasOwnProperty("videoTransparency")&&(I.videoTransparency=A.videoTransparency),A.hasOwnProperty("videoState")&&(I.videoState=A.videoState),A.hasOwnProperty("textToSpeechLanguage")&&(I.textToSpeechLanguage=A.textToSpeechLanguage),A.hasOwnProperty("variables"))for(const t in A.variables){const e=A.variables[t],g=3===e.length&&e[2]&&A.isStage&&B.canAddCloudVariable(),n=new i(t,e[0],i.SCALAR_TYPE,g);g&&B.addCloudVariable(),n.value=e[1],I.variables[n.id]=n}if(A.hasOwnProperty("lists"))for(const B in A.lists){const t=A.lists[B],e=new i(B,t[0],i.LIST_TYPE,!1);e.value=t[1],I.variables[e.id]=e}if(A.hasOwnProperty("broadcasts"))for(const B in A.broadcasts){const t=A.broadcasts[B],e=new i(B,t,i.BROADCAST_MESSAGE_TYPE,!1);I.variables[e.id]=e}if(A.hasOwnProperty("comments"))for(const B in A.comments){const t=A.comments[B],e=new n(B,t.text,t.x,t.y,t.width,t.height,t.minimized);t.blockId&&(e.blockId=t.blockId),I.comments[e.id]=e}return A.hasOwnProperty("x")&&(I.x=A.x),A.hasOwnProperty("y")&&(I.y=A.y),A.hasOwnProperty("direction")&&(I.direction=A.direction),A.hasOwnProperty("size")&&(I.size=A.size),A.hasOwnProperty("visible")&&(I.visible=A.visible),A.hasOwnProperty("currentCostume")&&(I.currentCostume=E.clamp(A.currentCostume,0,A.costumes.length-1)),A.hasOwnProperty("rotationStyle")&&(I.rotationStyle=A.rotationStyle),A.hasOwnProperty("isStage")&&(I.isStage=A.isStage),A.hasOwnProperty("targetPaneOrder")&&(I.targetPaneOrder=A.targetPaneOrder),A.hasOwnProperty("draggable")&&(I.draggable=A.draggable),Promise.all(w).then(A=>{o.costumes=A}),Promise.all(a).then(A=>{o.sounds=A,o.soundBank=C||null}),Promise.all(w.concat(a)).then(()=>I)}(t,B,C,0,A[Q])))).then(A=>A.map((A,B)=>(A.layerOrder=B,A)).sort((A,B)=>A.targetPaneOrder-B.targetPaneOrder).map(A=>(delete A.targetPaneOrder,A))).then(A=>function(A){const B=w.getAllVarRefsForTargets(A,!0);A.forEach(A=>{Object.keys(A.variables).forEach(B=>{const t=o.replaceUnsafeChars(B);t!==B&&(A.variables[B].id=t,A.variables[t]=A.variables[B],delete A.variables[B])})});for(const A in B){const t=o.replaceUnsafeChars(A);A!==t&&w.updateVariableIdentifiers(B[A],t)}return A}(A)).then(A=>(D.map(t=>function(A,B,t,e){const g=(B.stageWidth-480)/2,n=(B.stageHeight-360)/2;if(A.x+=g,A.y+=n,A.x=E.clamp(A.x,0,B.stageWidth),A.y=E.clamp(A.y,0,B.stageHeight),A.spriteName){const B=t.filter(B=>B.sprite.name===A.spriteName);B&&B.length>0?A.targetId=B[0].id:r.warn("Tried to deserialize sprite specific monitor ".concat(A.opcode," but could not find sprite ").concat(A.spriteName,"."))}const s=B.monitorBlockInfo[A.opcode];if("data_listcontents"===A.opcode){const B=A.targetId?t.find(B=>B.id===A.targetId):t.find(A=>A.isStage);B&&Object.prototype.hasOwnProperty.call(B.variables,A.id)&&(A.params.LIST=B.variables[A.id].name)}const c={};for(const B in A.params){const t={name:B,value:A.params[B]};c[B]=t}"data_variable"!==A.opcode&&"data_listcontents"!==A.opcode&&s&&s.isSpriteSpecific?A.id=s.getId(A.targetId,c):A.id=o.replaceUnsafeChars(A.id);const w=B.monitorBlocks._blocks[A.id];if(w)w.isMonitored=A.visible,w.targetId=A.targetId;else{const t={id:A.id,opcode:A.opcode,inputs:{},fields:c,topLevel:!0,next:null,parent:null,shadow:!1,x:0,y:0,isMonitored:A.visible,targetId:A.targetId};if("data_variable"===A.opcode){const B=t.fields.VARIABLE;B.id=A.id,B.variableType=i.SCALAR_TYPE}else if("data_listcontents"===A.opcode){const B=t.fields.LIST;B.id=A.id,B.variableType=i.LIST_TYPE}B.monitorBlocks.createBlock(t);const g=m(t.opcode);g&&e.extensionIDs.add(g)}B.requestAddMonitor(Q(A))}(t,B,A,C)),A)).then(A=>({targets:A,extensions:C}))},deserializeBlocks:S,serializeBlocks:G,getExtensionIdForOpcode:m}},function(A,B){A.exports={ID_NONE:-1,Events:{UseHighQualityRenderChanged:"UseHighQualityRenderChanged",AllowPrivateSkinAccessChanged:"AllowPrivateSkinAccessChanged",NativeSizeChanged:"NativeSizeChanged"}}},function(A,B,t){const e=t(22);e.enable(),A.exports=e("scratch-audioengine")},function(A,B,t){"use strict";(function(A){!function(A){function B(){}function t(){}var e=String.fromCharCode,g={}.toString,i=g.call(A.SharedArrayBuffer),n=g(),Q=A.Uint8Array,s=Q||Array,r=Q?ArrayBuffer:s,c=r.isView||function(A){return A&&"length"in A},E=g.call(r.prototype);r=t.prototype;var o=A.TextEncoder,w=new(Q?Uint16Array:s)(32);B.prototype.decode=function(A){if(!c(A)){var B=g.call(A);if(B!==E&&B!==i&&B!==n)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");A=Q?new s(A):A||[]}for(var t,r,o,C=B="",a=0,I=0|A.length,h=I-32|0,Y=0,M=0,F=0,D=-1;a>4){case 15:if(2!=(o=255&A[a=a+1|0])>>6||247>6?M+4|0:24,r=r+256&768;case 13:case 12:Y<<=6,Y|=(31&r)<<6|63&(o=255&A[a=a+1|0]),M=M+7|0,a>6&&Y>>M&&1114112>Y?(r=Y,0<=(Y=Y-65536|0)&&(D=55296+(Y>>10)|0,r=56320+(1023&Y)|0,31>F?(w[F]=D,F=F+1|0,D=-1):(o=D,D=r,r=o))):(a=a-(r>>=8)-1|0,r=65533),Y=M=0,t=a<=h?32:I-a|0;default:w[F]=r;continue;case 11:case 10:case 9:case 8:}w[F]=65533}if(C+=e(w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],w[8],w[9],w[10],w[11],w[12],w[13],w[14],w[15],w[16],w[17],w[18],w[19],w[20],w[21],w[22],w[23],w[24],w[25],w[26],w[27],w[28],w[29],w[30],w[31]),32>F&&(C=C.slice(0,F-32|0)),a>>31,D=-1,C.length=n)e[g]=n;else{if(2047>=n)e[g]=192|n>>6;else{A:{if(55296<=n)if(56319>=n){var r=0|A.charCodeAt(B=B+1|0);if(56320<=r&&57343>=r){if(65535<(n=(n<<10)+r-56613888|0)){e[g]=240|n>>18,e[g=g+1|0]=128|n>>12&63,e[g=g+1|0]=128|n>>6&63,e[g=g+1|0]=128|63&n;continue}break A}n=65533}else 57343>=n&&(n=65533);!i&&B<<1>12,e[g=g+1|0]=128|n>>6&63}e[g=g+1|0]=128|63&n}}return Q?e.subarray(0,g):e.slice(0,g)},o||(A.TextDecoder=B,A.TextEncoder=t)}(""+void 0==typeof A?""+void 0==typeof self?this:self:A)}).call(this,t(8))},function(A,B){var t,e,g=A.exports={};function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function Q(A){if(t===setTimeout)return setTimeout(A,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch(B){try{return t.call(null,A,0)}catch(B){return t.call(this,A,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(A){t=i}try{e="function"==typeof clearTimeout?clearTimeout:n}catch(A){e=n}}();var s,r=[],c=!1,E=-1;function o(){c&&s&&(c=!1,s.length?r=s.concat(r):E=-1,r.length&&w())}function w(){if(!c){var A=Q(o);c=!0;for(var B=r.length;B;){for(s=r,r=[];++E1)for(var t=1;t0&&(this._lastUpdateTime=A),this._count=Math.min(this._maxTokens,this._count+t),this._count>0&&(this._count--,!0)}}},function(A,B,t){const{Record:e}=t(24),g=e({id:null,spriteName:null,targetId:null,opcode:null,value:null,params:null,mode:"default",sliderMin:0,sliderMax:100,isDiscrete:!0,x:null,y:null,width:0,height:0,visible:!0});A.exports=g},function(A,B){A.exports=function(A,B){let t="";for(const A in B){let e=B[A].value;"CURRENTMENU"===A&&(e=e.toLowerCase()),t+="_".concat(e)}return"".concat(A).concat(t)}},function(A,B,t){const e=t(4),g=t(7),i=t(1),n=t(13),Q=t(248),s=t(14);class r extends Q{constructor(A,B){super(B,A.blocks),this.sprite=A,this.renderer=null,this.runtime&&(this.renderer=this.runtime.renderer),this.drawableID=null,this.dragging=!1,this.effects={color:0,fisheye:0,whirl:0,pixelate:0,mosaic:0,brightness:0,ghost:0},this.isOriginal=!0,this.isStage=!1,this.x=0,this.y=0,this.direction=90,this.draggable=!1,this.visible=!0,this.size=100,this.currentCostume=0,this.rotationStyle=r.ROTATION_STYLE_ALL_AROUND,this.volume=100,this.tempo=60,this.videoTransparency=50,this.videoState=r.VIDEO_STATE.ON,this.textToSpeechLanguage=null,this.onTargetMoved=null,this.onTargetVisualChange=null,this.interpolationData=null}initDrawable(A){this.renderer&&(this.drawableID=this.renderer.createDrawable(A)),this.isOriginal||this.runtime.startHats("control_start_as_clone",null,this)}get audioPlayer(){console.warn("get audioPlayer deprecated, please update to use .sprite.soundBank methods"),console.warn(new Error("stack for debug").stack);const A=this.sprite.soundBank,B={playSound:B=>A.play(this,B)};return Object.defineProperty(this,"audioPlayer",{configurable:!1,enumerable:!0,writable:!1,value:B}),B}initAudio(){}static get ROTATION_STYLE_ALL_AROUND(){return"all around"}static get ROTATION_STYLE_LEFT_RIGHT(){return"left-right"}static get ROTATION_STYLE_NONE(){return"don't rotate"}static get VIDEO_STATE(){return{OFF:"off",ON:"on",ON_FLIPPED:"on-flipped"}}emitVisualChange(){this.onTargetVisualChange&&this.onTargetVisualChange(this)}setXY(A,B,t){if(this.isStage)return;if(this.dragging&&!t)return;const e=this.x,g=this.y;if(this.renderer){const t=this.runtime.runtimeOptions.fencing?this.renderer.getFencedPositionOfDrawable(this.drawableID,[A,B]):[A,B];this.x=t[0],this.y=t[1],this.renderer.updateDrawablePosition(this.drawableID,t),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.x=A,this.y=B;this.onTargetMoved&&this.onTargetMoved(this,e,g,t),this.runtime.requestTargetsUpdate(this)}_getRenderedDirectionAndScale(){let A=this.direction,B=[this.size,this.size];if(this.rotationStyle===r.ROTATION_STYLE_NONE)A=90;else if(this.rotationStyle===r.ROTATION_STYLE_LEFT_RIGHT){A=90;B=[(this.direction<0?-1:1)*this.size,this.size]}return{direction:A,scale:B}}setDirection(A){if(!this.isStage&&isFinite(A)){if(this.direction=e.wrapClamp(A,-179,180),this.renderer){const{direction:A,scale:B}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,A,B),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}}setDraggable(A){this.isStage||(this.draggable=!!A,this.runtime.requestTargetsUpdate(this))}setVisible(A){this.isStage||(this.visible=!!A,this.renderer&&(this.renderer.updateDrawableVisible(this.drawableID,this.visible),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())),this.runtime.requestTargetsUpdate(this))}setSize(A){if(!this.isStage){if(this.renderer){const B=this.renderer.getCurrentSkinSize(this.drawableID),t=B[0],g=B[1],i=this.runtime.runtimeOptions.fencing,n=i?Math.min(1,Math.max(5/t,5/g)):0,Q=i?Math.min(1.5*this.runtime.stageWidth/t,1.5*this.runtime.stageHeight/g):1/0;this.size=100*e.clamp(A/100,n,Q);const{direction:s,scale:r}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,s,r),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}else this.size=A;this.runtime.requestTargetsUpdate(this)}}setEffect(A,B){this.effects.hasOwnProperty(A)&&(this.effects[A]=B,this.renderer&&(this.renderer.updateDrawableEffect(this.drawableID,A,B),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())))}clearEffects(){for(const A in this.effects)this.effects.hasOwnProperty(A)&&(this.effects[A]=0);if(this.renderer){for(const A in this.effects)this.effects.hasOwnProperty(A)&&this.renderer.updateDrawableEffect(this.drawableID,A,0);this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}}setCostume(A){if((A=Math.round(A))!==1/0&&A!==-1/0&&A||(A=0),this.currentCostume=e.wrapClamp(A,0,this.sprite.costumes.length-1),this.renderer){const A=this.sprite.costumes[this.currentCostume];this.renderer.updateDrawableSkinId(this.drawableID,A.skinId),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}addCostume(A,B){"number"!=typeof B||isNaN(B)?this.sprite.addCostumeAt(A,this.sprite.costumes.length):this.sprite.addCostumeAt(A,B)}renameCostume(A,B){const t=this.sprite.costumes.filter((B,t)=>A!==t).map(A=>A.name),e=this.getCostumes()[A].name,i=g.unusedName(B,t);if(this.getCostumes()[A].name=i,this.isStage){const A=this.runtime.targets;for(let B=0;B=B)return null;const t=this.sprite.deleteCostumeAt(A);return A===this.currentCostume&&A===B-1?this.setCostume(A-1):AA.name);A.name=g.unusedName(A.name,t),"number"!=typeof B||isNaN(B)?this.sprite.sounds.push(A):this.sprite.sounds.splice(B,0,A)}renameSound(A,B){const t=this.sprite.sounds.filter((B,t)=>A!==t).map(A=>A.name),e=this.sprite.sounds[A].name,i=g.unusedName(B,t);this.sprite.sounds[A].name=i,this.blocks.updateAssetName(e,i,"sound")}deleteSound(A){if(A<0||A>=this.sprite.sounds.length)return null;const B=this.sprite.sounds.splice(A,1)[0];return this.runtime.requestTargetsUpdate(this),B}setRotationStyle(A){if(A===r.ROTATION_STYLE_NONE?this.rotationStyle=r.ROTATION_STYLE_NONE:A===r.ROTATION_STYLE_ALL_AROUND?this.rotationStyle=r.ROTATION_STYLE_ALL_AROUND:A===r.ROTATION_STYLE_LEFT_RIGHT&&(this.rotationStyle=r.ROTATION_STYLE_LEFT_RIGHT),this.renderer){const{direction:A,scale:B}=this._getRenderedDirectionAndScale();this.renderer.updateDrawableDirectionScale(this.drawableID,A,B),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw())}this.runtime.requestTargetsUpdate(this)}getCostumeIndexByName(A){const B=this.getCostumes();for(let t=0;tA/2||t.top>B/2||t.bottom<-B/2)return!0}return!1}isTouchingSprite(A){A=i.toString(A);const B=this.runtime.getSpriteTargetByName(A);if(!B||!this.renderer)return!1;const t=B.sprite.clones.filter(A=>!A.dragging).map(A=>A.drawableID);return this.renderer.isTouchingDrawables(this.drawableID,t)}isTouchingColor(A){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,A)}colorIsTouchingColor(A,B){return!!this.renderer&&this.renderer.isTouchingColor(this.drawableID,A,B)}getLayerOrder(){return this.renderer?this.renderer.getDrawableOrder(this.drawableID):null}goToFront(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,1/0,s.SPRITE_LAYER),this.runtime.setExecutablePosition(this,1/0)}goToBack(){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-1/0,s.SPRITE_LAYER,!1),this.runtime.setExecutablePosition(this,-1/0)}goForwardLayers(A){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,A,s.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,A)}goBackwardLayers(A){this.renderer&&this.renderer.setDrawableOrder(this.drawableID,-A,s.SPRITE_LAYER,!0),this.runtime.moveExecutable(this,-A)}goBehindOther(A){if(this.renderer){const B=this.renderer.setDrawableOrder(A.drawableID,0,s.SPRITE_LAYER,!0);this.renderer.setDrawableOrder(this.drawableID,B,s.SPRITE_LAYER)}const B=this.runtime.executableTargets.indexOf(A);this.runtime.setExecutablePosition(this,B)}keepInFence(A,B,t){let e=t;e||(e={left:-this.runtime.stageWidth/2,right:this.runtime.stageWidth/2,top:this.runtime.stageHeight/2,bottom:-this.runtime.stageHeight/2});const g=this.getBounds();if(!g)return;g.left+=A-this.x,g.right+=A-this.x,g.top+=B-this.y,g.bottom+=B-this.y;let i=0,n=0;return g.lefte.right&&(i+=e.right-g.right),g.top>e.top&&(n+=e.top-g.top),g.bottom{const B=A.createClone();return B.x=400*(Math.random()-.5)/2,B.y=300*(Math.random()-.5)/2,B.direction=this.direction,B.draggable=this.draggable,B.visible=this.visible,B.size=this.size,B.currentCostume=this.currentCostume,B.rotationStyle=this.rotationStyle,B.effects=JSON.parse(JSON.stringify(this.effects)),B.variables=this.duplicateVariables(B.blocks),B.updateAllDrawableProperties(),B})}onGreenFlag(){this.clearEffects()}onStopAll(){this.clearEffects()}postSpriteInfo(A){const B=A.hasOwnProperty("force")?A.force:null,t=A.hasOwnProperty("x"),e=A.hasOwnProperty("y");(t||e)&&this.setXY(t?A.x:this.x,e?A.y:this.y,B),A.hasOwnProperty("direction")&&this.setDirection(A.direction),A.hasOwnProperty("draggable")&&this.setDraggable(A.draggable),A.hasOwnProperty("rotationStyle")&&this.setRotationStyle(A.rotationStyle),A.hasOwnProperty("visible")&&this.setVisible(A.visible),A.hasOwnProperty("size")&&this.setSize(A.size)}startDrag(){this.dragging=!0}stopDrag(){this.dragging=!1}toJSON(){const A=this.getCostumes();return{id:this.id,name:this.getName(),isStage:this.isStage,x:this.x,y:this.y,size:this.size,direction:this.direction,draggable:this.draggable,currentCostume:this.currentCostume,costume:A[this.currentCostume],costumeCount:A.length,visible:this.visible,rotationStyle:this.rotationStyle,comments:this.comments,blocks:this.blocks._blocks,variables:this.variables,costumes:A,sounds:this.getSounds(),textToSpeechLanguage:this.textToSpeechLanguage,tempo:this.tempo,volume:this.volume,videoTransparency:this.videoTransparency,videoState:this.videoState}}dispose(){this.isOriginal||this.runtime.changeCloneCounter(-1),this.runtime.stopForTarget(this),this.runtime.removeExecutable(this),this.sprite.removeClone(this),this.renderer&&null!==this.drawableID&&(this.renderer.destroyDrawable(this.drawableID,this.isStage?s.BACKGROUND_LAYER:s.SPRITE_LAYER),this.visible&&(this.emitVisualChange(),this.runtime.requestRedraw()))}}A.exports=r},function(A,B,t){const e=t(6),g=t(28);class i{constructor(A,B,t,g,n,Q,s){this.id=A||e(),this.text=B,this.x=t,this.y=g,this.width=Math.max(Number(n),i.MIN_WIDTH),this.height=Math.max(Number(Q),i.MIN_HEIGHT),this.minimized=s||!1,this.blockId=null}toXML(){return'').concat(g(this.text),"")}static get MIN_WIDTH(){return 20}static get MIN_HEIGHT(){return 20}static get DEFAULT_WIDTH(){return 100}static get DEFAULT_HEIGHT(){return 100}}A.exports=i},function(A,B,t){const e=t(41),g=t(16),{loadSoundFromAsset:i}=t(30),{loadCostumeFromAsset:n}=t(31),Q=t(88),s=t(7),r=t(14);class c{constructor(A,B){this.runtime=B,A||(A=new g(B)),this.blocks=A,this.name="",this.costumes_=[],this.sounds=[],this.clones=[],this.soundBank=null,this.runtime&&this.runtime.audioEngine&&(this.soundBank=this.runtime.audioEngine.createBank())}set costumes(A){this.costumes_=[];for(const B of A)this.addCostumeAt(B,this.costumes_.length)}get costumes(){return this.costumes_}addCostumeAt(A,B){A.name||(A.name="");const t=this.costumes_.map(A=>A.name);A.name=s.unusedName(A.name,t),this.costumes_.splice(B,0,A)}deleteCostumeAt(A){return this.costumes.splice(A,1)[0]}createClone(A){const B=new e(this,this.runtime);if(B.isOriginal=0===this.clones.length,this.clones.push(B),B.initAudio(),B.isOriginal){const t="string"==typeof A?A:r.SPRITE_LAYER;B.initDrawable(t),this.runtime.fireTargetWasCreated(B)}else this.runtime.fireTargetWasCreated(B,this.clones[0]);return B}removeClone(A){this.runtime.fireTargetWasRemoved(A);const B=this.clones.indexOf(A);B>=0&&this.clones.splice(B,1)}duplicate(){const A=new c(null,this.runtime),B=this.blocks._blocks,t=Object.keys(B).map(A=>B[A]),e=JSON.parse(JSON.stringify(t));Q(e),e.forEach(B=>{A.blocks.createBlock(B)});const g=this.runtime.targets.map(A=>A.sprite.name);A.name=s.unusedName(this.name,g);const r=[];return A.costumes=this.costumes_.map(A=>{const B=Object.assign({},A);return r.push(n(B,this.runtime)),B}),A.sounds=this.sounds.map(B=>{const t=Object.assign({},B),e=B.asset;return r.push(i(t,e,this.runtime,A.soundBank)),t}),Promise.all(r).then(()=>A)}dispose(){this.soundBank&&this.soundBank.dispose()}}A.exports=c},function(A,B,t){ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */ -A.exports=function(){"use strict";var A=Object.hasOwnProperty,B=Object.setPrototypeOf,t=Object.isFrozen,e=Object.getPrototypeOf,g=Object.getOwnPropertyDescriptor,i=Object.freeze,Q=Object.seal,s=Object.create,n="undefined"!=typeof Reflect&&Reflect,r=n.apply,c=n.construct;r||(r=function(A,B,t){return A.apply(B,t)}),i||(i=function(A){return A}),Q||(Q=function(A){return A}),c||(c=function(A,B){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var B=0,t=Array(A.length);B1?t-1:0),g=1;g/gm),S=Q(/^data-[\-\w.\u00B7-\uFFFF]/),b=Q(/^aria-[\-\w]+$/),z=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),L=Q(/^(?:\w+script|data):/i),P=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};function W(A){if(Array.isArray(A)){for(var B=0,t=Array(A.length);B0&&void 0!==arguments[0]?arguments[0]:V(),t=function(B){return A(B)};if(t.version="2.2.7",t.removed=[],!B||!B.document||9!==B.document.nodeType)return t.isSupported=!1,t;var e=B.document,g=B.document,Q=B.DocumentFragment,s=B.HTMLTemplateElement,n=B.Node,r=B.Element,c=B.NodeFilter,E=B.NamedNodeMap,u=void 0===E?B.NamedNodeMap||B.MozNamedAttrMap:E,O=B.Text,X=B.Comment,Z=B.DOMParser,_=B.trustedTypes,q=r.prototype,$=U(q,"cloneNode"),AA=U(q,"nextSibling"),BA=U(q,"childNodes"),tA=U(q,"parentNode");if("function"==typeof s){var eA=g.createElement("template");eA.content&&eA.content.ownerDocument&&(g=eA.content.ownerDocument)}var gA=K(_,e),iA=gA&&jA?gA.createHTML(""):"",QA=g,sA=QA.implementation,nA=QA.createNodeIterator,rA=QA.getElementsByTagName,cA=QA.createDocumentFragment,EA=e.importNode,oA={};try{oA=d(g).documentMode?g.documentMode:{}}catch(A){}var wA={};t.isSupported="function"==typeof tA&&sA&&void 0!==sA.createHTMLDocument&&9!==oA;var CA=j,aA=x,IA=S,YA=b,hA=L,MA=P,FA=z,DA=null,uA=l({},[].concat(W(N),W(m),W(G),W(H),W(p))),lA=null,dA=l({},[].concat(W(y),W(J),W(k),W(T))),UA=null,NA=null,mA=!0,GA=!0,fA=!1,HA=!1,RA=!1,pA=!1,yA=!1,JA=!1,kA=!1,TA=!0,jA=!1,xA=!0,SA=!0,bA=!1,zA={},LA=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),PA=null,vA=l({},["audio","video","img","source","image","track"]),WA=null,VA=l({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),KA=null,OA=g.createElement("form"),XA=function(A){KA&&KA===A||(A&&"object"===(void 0===A?"undefined":v(A))||(A={}),A=d(A),DA="ALLOWED_TAGS"in A?l({},A.ALLOWED_TAGS):uA,lA="ALLOWED_ATTR"in A?l({},A.ALLOWED_ATTR):dA,WA="ADD_URI_SAFE_ATTR"in A?l(d(VA),A.ADD_URI_SAFE_ATTR):VA,PA="ADD_DATA_URI_TAGS"in A?l(d(vA),A.ADD_DATA_URI_TAGS):vA,UA="FORBID_TAGS"in A?l({},A.FORBID_TAGS):{},NA="FORBID_ATTR"in A?l({},A.FORBID_ATTR):{},zA="USE_PROFILES"in A&&A.USE_PROFILES,mA=!1!==A.ALLOW_ARIA_ATTR,GA=!1!==A.ALLOW_DATA_ATTR,fA=A.ALLOW_UNKNOWN_PROTOCOLS||!1,HA=A.SAFE_FOR_TEMPLATES||!1,RA=A.WHOLE_DOCUMENT||!1,JA=A.RETURN_DOM||!1,kA=A.RETURN_DOM_FRAGMENT||!1,TA=!1!==A.RETURN_DOM_IMPORT,jA=A.RETURN_TRUSTED_TYPE||!1,yA=A.FORCE_BODY||!1,xA=!1!==A.SANITIZE_DOM,SA=!1!==A.KEEP_CONTENT,bA=A.IN_PLACE||!1,FA=A.ALLOWED_URI_REGEXP||FA,HA&&(GA=!1),kA&&(JA=!0),zA&&(DA=l({},[].concat(W(p))),lA=[],!0===zA.html&&(l(DA,N),l(lA,y)),!0===zA.svg&&(l(DA,m),l(lA,J),l(lA,T)),!0===zA.svgFilters&&(l(DA,G),l(lA,J),l(lA,T)),!0===zA.mathMl&&(l(DA,H),l(lA,k),l(lA,T))),A.ADD_TAGS&&(DA===uA&&(DA=d(DA)),l(DA,A.ADD_TAGS)),A.ADD_ATTR&&(lA===dA&&(lA=d(lA)),l(lA,A.ADD_ATTR)),A.ADD_URI_SAFE_ATTR&&l(WA,A.ADD_URI_SAFE_ATTR),SA&&(DA["#text"]=!0),RA&&l(DA,["html","head","body"]),DA.table&&(l(DA,["tbody"]),delete UA.tbody),i&&i(A),KA=A)},ZA=l({},["mi","mo","mn","ms","mtext"]),_A=l({},["foreignobject","desc","title","annotation-xml"]),qA=l({},m);l(qA,G),l(qA,f);var $A=l({},H);l($A,R);var AB="http://www.w3.org/1998/Math/MathML",BB="http://www.w3.org/2000/svg",tB="http://www.w3.org/1999/xhtml",eB=function(A){var B=tA(A);B&&B.tagName||(B={namespaceURI:tB,tagName:"template"});var t=a(A.tagName),e=a(B.tagName);if(A.namespaceURI===BB)return B.namespaceURI===tB?"svg"===t:B.namespaceURI===AB?"svg"===t&&("annotation-xml"===e||ZA[e]):Boolean(qA[t]);if(A.namespaceURI===AB)return B.namespaceURI===tB?"math"===t:B.namespaceURI===BB?"math"===t&&_A[e]:Boolean($A[t]);if(A.namespaceURI===tB){if(B.namespaceURI===BB&&!_A[e])return!1;if(B.namespaceURI===AB&&!ZA[e])return!1;var g=l({},["title","style","font","a","script"]);return!$A[t]&&(g[t]||!qA[t])}return!1},gB=function(A){C(t.removed,{element:A});try{A.parentNode.removeChild(A)}catch(B){try{A.outerHTML=iA}catch(B){A.remove()}}},iB=function(A,B){try{C(t.removed,{attribute:B.getAttributeNode(A),from:B})}catch(A){C(t.removed,{attribute:null,from:B})}if(B.removeAttribute(A),"is"===A&&!lA[A])if(JA||kA)try{gB(B)}catch(A){}else try{B.setAttribute(A,"")}catch(A){}},QB=function(A){var B=void 0,t=void 0;if(yA)A=""+A;else{var e=I(A,/^[\r\n\t ]+/);t=e&&e[0]}var i=gA?gA.createHTML(A):A;try{B=(new Z).parseFromString(i,"text/html")}catch(A){}if(!B||!B.documentElement){var Q=(B=sA.createHTMLDocument("")).body;Q.parentNode.removeChild(Q.parentNode.firstElementChild),Q.outerHTML=i}return A&&t&&B.body.insertBefore(g.createTextNode(t),B.body.childNodes[0]||null),rA.call(B,RA?"html":"body")[0]},sB=function(A){return nA.call(A.ownerDocument||A,A,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,(function(){return c.FILTER_ACCEPT}),!1)},nB=function(A){return!(A instanceof O||A instanceof X||"string"==typeof A.nodeName&&"string"==typeof A.textContent&&"function"==typeof A.removeChild&&A.attributes instanceof u&&"function"==typeof A.removeAttribute&&"function"==typeof A.setAttribute&&"string"==typeof A.namespaceURI&&"function"==typeof A.insertBefore)},rB=function(A){return"object"===(void 0===n?"undefined":v(n))?A instanceof n:A&&"object"===(void 0===A?"undefined":v(A))&&"number"==typeof A.nodeType&&"string"==typeof A.nodeName},cB=function(A,B,e){wA[A]&&o(wA[A],(function(A){A.call(t,B,e,KA)}))},EB=function(A){var B=void 0;if(cB("beforeSanitizeElements",A,null),nB(A))return gB(A),!0;if(I(A.nodeName,/[\u0080-\uFFFF]/))return gB(A),!0;var e=a(A.nodeName);if(cB("uponSanitizeElement",A,{tagName:e,allowedTags:DA}),!rB(A.firstElementChild)&&(!rB(A.content)||!rB(A.content.firstElementChild))&&F(/<[/\w]/g,A.innerHTML)&&F(/<[/\w]/g,A.textContent))return gB(A),!0;if(!DA[e]||UA[e]){if(SA&&!LA[e]){var g=tA(A),i=BA(A);if(i&&g)for(var Q=i.length-1;Q>=0;--Q)g.insertBefore($(i[Q],!0),AA(A))}return gB(A),!0}return A instanceof r&&!eB(A)?(gB(A),!0):"noscript"!==e&&"noembed"!==e||!F(/<\/no(script|embed)/i,A.innerHTML)?(HA&&3===A.nodeType&&(B=A.textContent,B=Y(B,CA," "),B=Y(B,aA," "),A.textContent!==B&&(C(t.removed,{element:A.cloneNode()}),A.textContent=B)),cB("afterSanitizeElements",A,null),!1):(gB(A),!0)},oB=function(A,B,t){if(xA&&("id"===B||"name"===B)&&(t in g||t in OA))return!1;if(GA&&F(IA,B));else if(mA&&F(YA,B));else{if(!lA[B]||NA[B])return!1;if(WA[B]);else if(F(FA,Y(t,MA,"")));else if("src"!==B&&"xlink:href"!==B&&"href"!==B||"script"===A||0!==h(t,"data:")||!PA[A])if(fA&&!F(hA,Y(t,MA,"")));else if(t)return!1}return!0},wB=function(A){var B=void 0,e=void 0,g=void 0,i=void 0;cB("beforeSanitizeAttributes",A,null);var Q=A.attributes;if(Q){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lA};for(i=Q.length;i--;){var n=B=Q[i],r=n.name,c=n.namespaceURI;if(e=M(B.value),g=a(r),s.attrName=g,s.attrValue=e,s.keepAttr=!0,s.forceKeepAttr=void 0,cB("uponSanitizeAttribute",A,s),e=s.attrValue,!s.forceKeepAttr&&(iB(r,A),s.keepAttr))if(F(/\/>/i,e))iB(r,A);else{HA&&(e=Y(e,CA," "),e=Y(e,aA," "));var E=A.nodeName.toLowerCase();if(oB(E,g,e))try{c?A.setAttributeNS(c,r,e):A.setAttribute(r,e),w(t.removed)}catch(A){}}}cB("afterSanitizeAttributes",A,null)}},CB=function A(B){var t=void 0,e=sB(B);for(cB("beforeSanitizeShadowDOM",B,null);t=e.nextNode();)cB("uponSanitizeShadowNode",t,null),EB(t)||(t.content instanceof Q&&A(t.content),wB(t));cB("afterSanitizeShadowDOM",B,null)};return t.sanitize=function(A,g){var i=void 0,s=void 0,r=void 0,c=void 0,E=void 0;if(A||(A="\x3c!--\x3e"),"string"!=typeof A&&!rB(A)){if("function"!=typeof A.toString)throw D("toString is not a function");if("string"!=typeof(A=A.toString()))throw D("dirty is not a string, aborting")}if(!t.isSupported){if("object"===v(B.toStaticHTML)||"function"==typeof B.toStaticHTML){if("string"==typeof A)return B.toStaticHTML(A);if(rB(A))return B.toStaticHTML(A.outerHTML)}return A}if(pA||XA(g),t.removed=[],"string"==typeof A&&(bA=!1),bA);else if(A instanceof n)1===(s=(i=QB("\x3c!----\x3e")).ownerDocument.importNode(A,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!JA&&!HA&&!RA&&-1===A.indexOf("<"))return gA&&jA?gA.createHTML(A):A;if(!(i=QB(A)))return JA?null:iA}i&&yA&&gB(i.firstChild);for(var o=sB(bA?A:i);r=o.nextNode();)3===r.nodeType&&r===c||EB(r)||(r.content instanceof Q&&CB(r.content),wB(r),c=r);if(c=null,bA)return A;if(JA){if(kA)for(E=cA.call(i.ownerDocument);i.firstChild;)E.appendChild(i.firstChild);else E=i;return TA&&(E=EA.call(e,E,!0)),E}var w=RA?i.outerHTML:i.innerHTML;return HA&&(w=Y(w,CA," "),w=Y(w,aA," ")),gA&&jA?gA.createHTML(w):w},t.setConfig=function(A){XA(A),pA=!0},t.clearConfig=function(){KA=null,pA=!1},t.isValidAttribute=function(A,B,t){KA||XA({});var e=a(A),g=a(B);return oB(e,g,t)},t.addHook=function(A,B){"function"==typeof B&&(wA[A]=wA[A]||[],C(wA[A],B))},t.removeHook=function(A){wA[A]&&w(wA[A])},t.removeHooks=function(A){wA[A]&&(wA[A]=[])},t.removeAllHooks=function(){wA={}},t}()}()},function(A,B){class t{static get svg(){return"http://www.w3.org/2000/svg"}static get xmlns(){return"http://www.w3.org/2000/xmlns"}static get xlink(){return"http://www.w3.org/1999/xlink"}static attributeNamespace(){return{href:t.xlink,xlink:t.xmlns,xmlns:"".concat(t.xmlns,"/"),"xmlns:xlink":"".concat(t.xmlns,"/")}}static create(A,B,e){return t.set(document.createElementNS(t.svg,A),B,e)}static get(A,B){const e=t.attributeNamespace[B],g=e?A.getAttributeNS(e,B):A.getAttribute(B);return"null"===g?null:g}static set(A,B,e){for(const g in B){let i=B[g];const Q=t.attributeNamespace[g];"number"==typeof i&&e&&(i=e.number(i)),Q?A.setAttributeNS(Q,g,i):A.setAttribute(g,i)}return A}}A.exports=t},function(A,B,t){const e=t(6),g=t(27);class i{constructor(A,B,t,g,Q,s,n){this.id=A||e(),this.text=B,this.x=t,this.y=g,this.width=Math.max(Number(Q),i.MIN_WIDTH),this.height=Math.max(Number(s),i.MIN_HEIGHT),this.minimized=n||!1,this.blockId=null}toXML(){return'').concat(g(this.text),"")}static get MIN_WIDTH(){return 20}static get MIN_HEIGHT(){return 20}static get DEFAULT_WIDTH(){return 100}static get DEFAULT_HEIGHT(){return 100}}A.exports=i},function(A,B){class t{static get svg(){return"http://www.w3.org/2000/svg"}static get xmlns(){return"http://www.w3.org/2000/xmlns"}static get xlink(){return"http://www.w3.org/1999/xlink"}static attributeNamespace(){return{href:t.xlink,xlink:t.xmlns,xmlns:"".concat(t.xmlns,"/"),"xmlns:xlink":"".concat(t.xmlns,"/")}}static create(A,B,e){return t.set(document.createElementNS(t.svg,A),B,e)}static get(A,B){const e=t.attributeNamespace[B],g=e?A.getAttributeNS(e,B):A.getAttribute(B);return"null"===g?null:g}static set(A,B,e){for(const g in B){let i=B[g];const Q=t.attributeNamespace[g];"number"==typeof i&&e&&(i=e.number(i)),Q?A.setAttributeNS(Q,g,i):A.setAttribute(g,i)}return A}}A.exports=t},function(A,B,t){"undefined"!=typeof TextDecoder&&"undefined"!=typeof TextEncoder||t(35);const e=t(19);let g=null;const i={},Q={},s="function"==typeof FinalizationRegistry?new FinalizationRegistry(A=>{const B=Q[A];1===B?(delete Q[A],delete i[A]):Q[A]=B-1}):null,n=s?A=>{const B=A.assetId,t=Q[B]||0;Q[B]=t+1,s.register(A,B)}:()=>{};A.exports=class{constructor(A,B,t,e,g){this.assetType=A,this.assetId=B,this.setData(e,t||A.runtimeFormat,g),this.dependencies=[],n(this)}setData(A,B,t){if(A&&!B)throw new Error("Data provided without specifying its format");this.dataFormat=B,this.data=A,t&&(this.assetId=e(A)),this.clean=!t}decodeText(){return(new TextDecoder).decode(this.data)}encodeTextData(A,B,t){const e=new TextEncoder;this.setData(e.encode(A),B,t)}encodeDataURI(A){return A=A||this.assetType.contentType,"data:".concat(A,";base64,").concat(((A,B)=>{if(!Object.prototype.hasOwnProperty.call(i,A))if("undefined"==typeof btoa){const e=t(302);i[A]=e.fromByteArray(B)}else{if(null===g){g=new Array(256);for(let A=0;A<256;A++)g[A]=String.fromCharCode(A)}const{length:t}=B;let e="";for(let A=0,i=0;A{if(A)return A===this||B(A.target)};if(B(A))throw new Error("Effect cannot connect to itself");this.target=A,null!==this.outputNode&&this.outputNode.disconnect(),(this._isPatch||this._lastPatch+this.audioEngine.DECAY_DURATION * {\n position: absolute;\n}\n.sc-scaled-overlays-outer {\n overflow: hidden;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.sc-scaled-overlays-inner {\n transform-origin: top left;\n}\n.sc-root * {\n box-sizing: border-box;\n}\n.sc-canvas {\n width: 100%;\n height: 100%;\n}\n\n.sc-question-root {\n bottom: 0;\n width: 100%;\n color: black;\n pointer-events: all;\n}\n.sc-question-inner {\n margin: 0.5rem;\n border: 1px solid hsla(0, 0%, 0%, 0.15);\n border-radius: 0.5rem;\n border-width: 2px;\n padding: 1rem;\n background: white;\n}\n.sc-question-text {\n font-size: 12px;\n padding-bottom: 8px;\n font-weight: bold;\n}\n.sc-question-input-outer {\n position: relative;\n}\n.sc-question-input {\n width: 100%;\n height: 2rem;\n padding: 0 12px;\n font-size: 10px;\n border-width: 1px;\n border-style: solid;\n border-color: hsla(0, 0%, 0%, 0.15);\n border-radius: 2rem;\n outline: none;\n transition: 0.25s ease-out;\n box-shadow: none;\n overflow: hidden;\n text-overflow: ellipsis;\n color: inherit;\n}\n.sc-question-input:focus {\n border-color: var(--sc-accent-color);\n box-shadow: 0px 0px 0px 3px var(--sc-accent-color-transparent);\n}\n.sc-question-input:hover {\n border-color: var(--sc-accent-color);\n}\n.sc-question-submit-button {\n top: 4px;\n right: 4px;\n width: 24px;\n height: 24px;\n position: absolute;\n outline: none;\n border: none;\n padding: 2px;\n margin: 0;\n border-radius: 100%;\n background: none;\n cursor: pointer;\n color: white;\n background-color: var(--sc-accent-color);\n background-image: url('+r+');\n overflow: hidden;\n}\n.sc-question-submit-button:focus {\n outline: 2px solid black;\n}\n.sc-question-submit-button-image {\n width: 100%;\n height: 100%;\n}\n\n.sc-monitor-overlay {\n\n}\n.sc-monitor-root {\n position: absolute;\n top: 0;\n left: 0;\n background: hsla(215, 100%, 95%, 1);\n color: #575e75;\n border: 1px solid hsla(0, 0%, 0%, 0.15);\n border-radius: 4px;\n font-size: 12px;\n overflow: hidden;\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n flex-direction: column;\n pointer-events: all;\n}\n.sc-monitor-inner {\n display: flex;\n flex-direction: column;\n padding: 3px;\n}\n.sc-monitor-row {\n display: flex;\n flex-direction: row;\n}\n.sc-monitor-label {\n font-weight: bold;\n text-align: center;\n margin: 0 5px;\n white-space: nowrap;\n}\n.sc-monitor-slider {\n margin: 0;\n width: 100%;\n}\n.sc-monitor-value {\n min-width: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: white;\n margin: 0 5px;\n border-radius: 4px;\n padding: 0 2px;\n white-space: pre-wrap;\n background-color: #0fbd8c;\n}\n.sc-monitor-root[opcode^="motion_"] .sc-monitor-value-color {\n background-color: #4c97ff;\n}\n.sc-monitor-root[opcode^="sensing_"] .sc-monitor-value-color {\n background-color: #5cb1d6;\n}\n.sc-monitor-root[opcode^="data_"] .sc-monitor-value-color {\n background-color: #ff8c1a;\n}\n.sc-monitor-root[opcode^="looks_"] .sc-monitor-value-color {\n background-color: #9966ff;\n}\n.sc-monitor-root[opcode^="sound_"] .sc-monitor-value-color {\n background-color: #cf63cf;\n}\n.sc-monitor-large-value {\n min-height: 1.4rem;\n min-width: 3rem;\n padding: 0.1rem 0.25rem;\n text-align: center;\n color: white;\n font-size: 1rem;\n white-space: pre-wrap;\n}\n\n.sc-monitor-list-label {\n background-color: white;\n text-align: center;\n font-weight: bold;\n border-bottom: 1px solid hsla(0, 0%, 0%, 0.15);\n padding: 3px;\n}\n.sc-monitor-list-footer {\n display: flex;\n background-color: white;\n text-align: center;\n font-weight: bold;\n padding: 3px;\n}\n.sc-monitor-list-footer-text {\n text-align: center;\n flex-grow: 1;\n}\n.sc-monitor-row-delete, .sc-monitor-list-add {\n font-weight: bold;\n background: none;\n border: none;\n outline: none;\n font-family: inherit;\n color: inherit;\n cursor: pointer;\n margin: 0;\n padding: 0;\n}\n.sc-monitor-rows-outer {\n flex-grow: 1;\n}\n.sc-monitor-rows-inner {\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n}\n.sc-monitor-rows-endpoint {\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n pointer-events: none;\n}\n\n.sc-monitor-row-root {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n justify-content: space-around;\n align-items: center;\n padding: 2px;\n width: 100%;\n}\n.sc-monitor-row-index {\n font-weight: bold;\n color: hsla(225, 15%, 40%, 1);\n margin: 0 3px;\n}\n.sc-monitor-row-value-outer {\n display: flex;\n align-items: center;\n min-width: 40px;\n height: 22px;\n border: 1px solid hsla(0, 0%, 0%, 0.15);\n background-color: #fc662c;\n color: white;\n margin: 0 3px;\n border-radius: calc(0.5rem / 2);\n flex-grow: 1;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-value-outer {\n background-color: #e25c28;\n}\n.sc-monitor-row-value-inner {\n padding: 3px 5px;\n width: 100%;\n color: inherit;\n background: none;\n border: none;\n font: inherit;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: text;\n -webkit-user-select: text;\n white-space: pre;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-value-inner {\n padding-right: 0;\n}\n.sc-monitor-row-delete {\n display: none;\n font-size: 150%;\n padding: 0 2px;\n}\n.sc-monitor-row-value-editing .sc-monitor-row-delete {\n display: block;\n}\n.sc-monitor-empty {\n text-align: center;\n padding: 5px;\n}\n\n.sc-controls-bar {\n transform: translateY(-100%);\n display: flex;\n width: 100%;\n justify-content: space-between;\n flex-wrap: nowrap;\n}\n.sc-controls-bar > * {\n display: flex;\n align-items: center;\n flex-wrap: nowrap;\n}\n\n.sc-context-menu {\n position: absolute;\n color: black;\n box-shadow: 0px 0px 5px 1px hsla(0, 0%, 0%, 0.25);\n min-width: 130px;\n opacity: 0;\n transition: .2s opacity;\n}\n.sc-context-menu-item {\n display: block;\n width: 100%;\n background-color: white;\n border: none;\n border-radius: 0;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: 0.85em;\n padding: 8px 12px;\n margin: 0;\n transition: .1s background-color, .1s color;\n}\n.sc-context-menu-item:focus {\n outline: 2px solid black;\n}\n.sc-context-menu-item:hover,\n.sc-context-menu-item:active {\n color: white;\n background-color: var(--sc-accent-color);\n}\n.sc-context-menu-item:first-child {\n border-radius: 4px 4px 0 0;\n}\n.sc-context-menu-item:last-child {\n border-radius: 0 0 4px 4px;\n}\n\n.sc-dropping {\n background-color: var(--sc-accent-color-transparent);\n}\n',""]),n.locals={root:"sc-root",layers:"sc-layers","scaled-overlays-outer":"sc-scaled-overlays-outer",scaledOverlaysOuter:"sc-scaled-overlays-outer","scaled-overlays-inner":"sc-scaled-overlays-inner",scaledOverlaysInner:"sc-scaled-overlays-inner",canvas:"sc-canvas","question-root":"sc-question-root",questionRoot:"sc-question-root","question-inner":"sc-question-inner",questionInner:"sc-question-inner","question-text":"sc-question-text",questionText:"sc-question-text","question-input-outer":"sc-question-input-outer",questionInputOuter:"sc-question-input-outer","question-input":"sc-question-input",questionInput:"sc-question-input","question-submit-button":"sc-question-submit-button",questionSubmitButton:"sc-question-submit-button","question-submit-button-image":"sc-question-submit-button-image",questionSubmitButtonImage:"sc-question-submit-button-image","monitor-overlay":"sc-monitor-overlay",monitorOverlay:"sc-monitor-overlay","monitor-root":"sc-monitor-root",monitorRoot:"sc-monitor-root","monitor-inner":"sc-monitor-inner",monitorInner:"sc-monitor-inner","monitor-row":"sc-monitor-row",monitorRow:"sc-monitor-row","monitor-label":"sc-monitor-label",monitorLabel:"sc-monitor-label","monitor-slider":"sc-monitor-slider",monitorSlider:"sc-monitor-slider","monitor-value":"sc-monitor-value",monitorValue:"sc-monitor-value","monitor-value-color":"sc-monitor-value-color",monitorValueColor:"sc-monitor-value-color","monitor-large-value":"sc-monitor-large-value",monitorLargeValue:"sc-monitor-large-value","monitor-list-label":"sc-monitor-list-label",monitorListLabel:"sc-monitor-list-label","monitor-list-footer":"sc-monitor-list-footer",monitorListFooter:"sc-monitor-list-footer","monitor-list-footer-text":"sc-monitor-list-footer-text",monitorListFooterText:"sc-monitor-list-footer-text","monitor-row-delete":"sc-monitor-row-delete",monitorRowDelete:"sc-monitor-row-delete","monitor-list-add":"sc-monitor-list-add",monitorListAdd:"sc-monitor-list-add","monitor-rows-outer":"sc-monitor-rows-outer",monitorRowsOuter:"sc-monitor-rows-outer","monitor-rows-inner":"sc-monitor-rows-inner",monitorRowsInner:"sc-monitor-rows-inner","monitor-rows-endpoint":"sc-monitor-rows-endpoint",monitorRowsEndpoint:"sc-monitor-rows-endpoint","monitor-row-root":"sc-monitor-row-root",monitorRowRoot:"sc-monitor-row-root","monitor-row-index":"sc-monitor-row-index",monitorRowIndex:"sc-monitor-row-index","monitor-row-value-outer":"sc-monitor-row-value-outer",monitorRowValueOuter:"sc-monitor-row-value-outer","monitor-row-value-editing":"sc-monitor-row-value-editing",monitorRowValueEditing:"sc-monitor-row-value-editing","monitor-row-value-inner":"sc-monitor-row-value-inner",monitorRowValueInner:"sc-monitor-row-value-inner","monitor-empty":"sc-monitor-empty",monitorEmpty:"sc-monitor-empty","controls-bar":"sc-controls-bar",controlsBar:"sc-controls-bar","context-menu":"sc-context-menu",contextMenu:"sc-context-menu","context-menu-item":"sc-context-menu-item",contextMenuItem:"sc-context-menu-item",dropping:"sc-dropping"},B.a=n},function(A,B,t){const e=t(115),g=t(0);A.exports=new class extends e{constructor(){super(),this.services={},this.workerClass="undefined"==typeof Worker?null:Worker,this.workers=[]}callSync(A,B){const{provider:t,isRemote:e}=this._getServiceProvider(A);if(t){if(e)throw new Error("Cannot use 'callSync' on remote provider for service ".concat(A,"."));for(var g=arguments.length,i=new Array(g>2?g-2:0),Q=2;Q{g.error("Could not handshake with worker: ".concat(A))})):g.warn("Central dispatch ignoring attempt to add duplicate worker")}_getServiceProvider(A){const B=this.services[A];return B&&{provider:B,isRemote:Boolean(this.workerClass&&B instanceof this.workerClass||B.isRemote)}}_onDispatchMessage(A,B){let t;switch(B.method){case"setService":t=this.setService(B.args[0],A);break;default:g.error("Central dispatch received message for unknown method: ".concat(B.method))}return t}}},function(A,B){var t={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};A.exports=function(A,B){return B?"color: #fff; background: "+t[A]+";":"color: "+t[A]+";"}},function(A,B,t){const e=t(5);A.exports=function(A,B,t){return A&&A.id&&A.default?e(A,B,t):A}},function(A,B){var t="long",e="short",g="numeric";A.exports={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:g,day:g,year:"2-digit"},medium:{month:e,day:g,year:g},long:{month:t,day:g,year:g},full:{month:t,day:g,year:g,weekday:t},default:{month:e,day:g,year:g}},time:{short:{hour:g,minute:g},medium:{hour:g,minute:g,second:g},long:{hour:g,minute:g,second:g,timeZoneName:e},full:{hour:g,minute:g,second:g,timeZoneName:e},default:{hour:g,minute:g,second:g}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(A){if(A){var B={},t=A.match(/\b[A-Z]{3}\b/i),e=A.replace(/[^¤]/g,"").length;if(!e&&t&&(e=1),e?(B.style="currency",B.currencyDisplay=1===e?"symbol":2===e?"code":"name",B.currency=t?t[0].toUpperCase():"USD"):A.indexOf("%")>=0&&(B.style="percent"),!/[@#0]/.test(A))return B.style?B:void 0;if(B.useGrouping=A.indexOf(",")>=0,/E\+?[@#0]+/i.test(A)||A.indexOf("@")>=0){var g=A.replace(/E\+?[@#0]+|[^@#0]/gi,"");B.minimumSignificantDigits=Math.min(Math.max(g.replace(/[^@0]/g,"").length,1),21),B.maximumSignificantDigits=Math.min(Math.max(g.length,1),21)}else{for(var i=A.replace(/[^#0.]/g,"").split("."),Q=i[0],s=Q.length-1;"0"===Q[s];)--s;B.minimumIntegerDigits=Math.min(Math.max(Q.length-1-s,1),21);var n=i[1]||"";for(s=0;"0"===n[s];)++s;for(B.minimumFractionDigits=Math.min(Math.max(s,0),20);"#"===n[s];)++s;B.maximumFractionDigits=Math.min(Math.max(s,0),20)}return B}},parseDatePattern:function(A){if(A){for(var B={},i=0;i{this._openRequests[t]={resolve:A,reject:B}});return this._sendRequest(A,B,t),e}sendRemoteNotification(A,B){this._sendRequest(A,B)}didReceiveCall(){throw new Error("Must override didReceiveCall")}_sendMessage(){throw new Error("Must override _sendMessage")}_sendRequest(A,B,t){const e={jsonrpc:"2.0",method:A,params:B};null!==t&&(e.id=t),this._sendMessage(e)}_handleMessage(A){if("2.0"!==A.jsonrpc)throw new Error("Bad or missing JSON-RPC version in message: ".concat(A));A.hasOwnProperty("method")?this._handleRequest(A):this._handleResponse(A)}_sendResponse(A,B,t){const e={jsonrpc:"2.0",id:A};t?e.error=t:e.result=B||null,this._sendMessage(e)}_handleResponse(A){const{result:B,error:t,id:e}=A,g=this._openRequests[e];delete this._openRequests[e],g&&(t?g.reject(t):g.resolve(B))}_handleRequest(A){const{method:B,params:t,id:e}=A,g=this.didReceiveCall(B,t);e&&Promise.resolve(g).then(A=>{this._sendResponse(e,A)},A=>{this._sendResponse(e,null,A)})}}},function(A){A.exports=JSON.parse('{"menuMap":{"cs":[{"code":"cs","name":"čeština"}],"da":[{"code":"da","name":"Dansk"}],"gl":[{"code":"gl","name":"galego"}],"sl":[{"code":"sl","name":"slovenščina"}],"fr":[{"code":"fr","name":"Français"}],"hu":[{"code":"hu","name":"magyar"}],"uk":[{"code":"uk","name":"українська"}],"zh-tw":[{"code":"zh-tw","name":"中文(繁體)"}],"pt":[{"code":"pt","name":"Portuguese"}],"pt-br":[{"code":"pt","name":"Português"}],"tr":[{"code":"tr","name":"Türkçe"}],"ga":[{"code":"ga","name":"Gaeilge"}],"th":[{"code":"th","name":"ภาษาไทย"}],"ja":[{"code":"ja","name":"日本語"}],"ja-hira":[{"code":"ja","name":"日本語"}],"nl":[{"code":"nl","name":"Nederlands"}],"gd":[{"code":"gd","name":"Gàidhlig"}],"nb":[{"code":"nb","name":"norsk"}],"de":[{"code":"de","name":"Deutsch"}],"he":[{"code":"he","name":"עברית"}],"sk":[{"code":"sk","name":"slovenčina"}],"zu":[{"code":"zu","name":"isiZulu"}],"ru":[{"code":"ru","name":"русский"}],"pl":[{"code":"pl","name":"polski"}],"am":[{"code":"am","name":"አማርኛ"}],"az":[{"code":"az","name":"Azərbaycan dili"}],"hr":[{"code":"hr","name":"hrvatski"}],"fa":[{"code":"fa","name":"فارسی"}],"mi":[{"code":"mi","name":"Māori"}],"el":[{"code":"el","name":"Ελληνικά"}],"is":[{"code":"is","name":"íslenska"}],"fi":[{"code":"fi","name":"suomi"}],"eu":[{"code":"eu","name":"euskara"}],"ca":[{"code":"ca","name":"català"}],"lv":[{"code":"lv","name":"latviešu"}],"id":[{"code":"id","name":"Indonesia"}],"es":[{"code":"es","name":"español"}],"es-419":[{"code":"es","name":"español"}],"et":[{"code":"et","name":"eesti"}],"cy":[{"code":"cy","name":"Cymraeg"}],"zh-cn":[{"code":"zh-cn","name":"中文(简体)"}],"bg":[{"code":"bg","name":"български"}],"ar":[{"code":"ar","name":"العربية"}],"en":[{"code":"en","name":"English"}],"sr":[{"code":"sr","name":"српски"}],"sv":[{"code":"sv","name":"svenska"}],"ro":[{"code":"ro","name":"Română"}],"lt":[{"code":"lt","name":"lietuvių"}],"ko":[{"code":"ko","name":"한국어"}],"it":[{"code":"it","name":"Italiano"}],"vi":[{"code":"vi","name":"Tiếng Việt"}]},"nameMap":{"albánština":"sq","amharština":"am","angličtina":"en","arabština":"ar","arménština":"hy","ázerbájdžánština":"az","barmština":"my","baskičtina":"eu","běloruština":"be","bulharština":"bg","čeština":"cs","čínština (tradiční)":"zh-tw","čínština (zjednodušená)":"zh-cn","dánština":"da","esperanto":"eo","estonština":"et","finština":"fi","francouzština":"fr","galicijština":"gl","haitská kreolština":"ht","hebrejština":"he","hindština":"hi","holandština":"nl","chorvatština":"hr","indonéština":"id","irština":"ga","islandština":"is","italština":"it","japonština":"ja","kannadština":"kn","katalánština":"ca","korejština":"ko","kurdština":"ku","latina":"la","litevština":"lt","lotyština":"lv","maďarština":"hu","makedonština":"mk","malajálamština":"ml","malajština":"ms","maltština":"mt","maorština":"mi","marátština":"mr","mongolština":"mn","němčina":"de","norština":"nb","perština":"fa","polština":"pl","portugalština":"pt","rumunština":"ro","ruština":"ru","řečtina":"el","skotská gaelština":"gd","slovenština":"sk","slovinština":"sl","srbština":"sr","španělština":"es","švédština":"sv","telužština":"te","thajština":"th","turečtina":"tr","ukrajinština":"uk","uzbečtina":"uz","velština":"cy","vietnamština":"vi","zulu":"zu","albansk":"sq","amharisk":"am","arabisk":"ar","armensk":"hy","aserbajdsjansk":"az","baskisk":"eu","bulgarsk":"bg","burmesisk":"my","dansk":"da","engelsk":"en","estisk":"et","finsk":"fi","fransk":"fr","galicisk":"gl","græsk":"el","haitisk kreolsk":"ht","hebraisk":"he","hindi":"hi","hollandsk":"nl","hviderussisk":"be","indonesisk":"id","irsk":"ga","islandsk":"is","italiensk":"it","japansk":"ja","kannada":"kn","katalansk":"ca","kinesisk (forenklet)":"zh-cn","kinesisk (traditionelt)":"zh-tw","koreansk":"ko","kroatisk":"hr","kurdisk":"ku","latin":"la","lettisk":"lv","litauisk":"lt","makedonsk":"mk","malajisk":"ms","malayalam":"ml","maltesisk":"mt","maori":"mi","marathi":"mr","mongolsk":"mn","norsk":"nb","persisk":"fa","polsk":"pl","portugisisk":"pt","rumænsk":"ro","russisk":"ru","serbisk":"sr","skotsk gælisk":"gd","slovakisk":"sk","slovensk":"sl","spansk":"es","svensk":"sv","telugu":"te","thailandsk":"th","tjekkisk":"cs","tyrkisk":"tr","tysk":"de","ukrainsk":"uk","ungarsk":"hu","usbekisk":"uz","vietnamesisk":"vi","walisisk":"cy","acerbaixano":"az","albanés":"sq","alemán":"de","amárico":"am","árabe":"ar","armenio":"hy","bielorruso":"be","birmano":"my","búlgaro":"bg","canarés":"kn","catalán":"ca","checo":"cs","chinés (simplificado)":"zh-cn","chinés (tradicional)":"zh-tw","coreano":"ko","crioulo haitiano":"ht","croata":"hr","curdo":"ku","dinamarqués":"da","eslovaco":"sk","esloveno":"sl","español":"es","estoniano":"et","éuscaro":"eu","finés":"fi","francés":"fr","gaélico escocés":"gd","galego":"gl","galés":"cy","grego":"el","hebreo":"he","húngaro":"hu","indonesio":"id","inglés":"en","irlandés":"ga","islandés":"is","italiano":"it","latín":"la","letón":"lv","lituano":"lt","macedonio":"mk","malabar":"ml","malaio":"ms","maltés":"mt","maorí":"mi","mongol":"mn","neerlandés":"nl","noruegués":"nb","persa":"fa","polaco":"pl","portugués":"pt","romanés":"ro","ruso":"ru","serbio":"sr","sueco":"sv","tailandés":"th","telugú":"te","turco":"tr","ucraíno":"uk","usbeco":"uz","vietnamita":"vi","xaponés":"ja","zulú":"zu","albanščina":"sq","amharščina":"am","angleščina":"en","arabščina":"ar","armenščina":"hy","azerbajdžanščina":"az","baskovščina":"eu","beloruščina":"be","bolgarščina":"bg","burmanščina":"my","češčina":"cs","danščina":"da","estonščina":"et","finščina":"fi","francoščina":"fr","galicijščina":"gl","grščina":"el","haitijska kreolščina":"ht","hebrejščina":"he","hindijščina":"hi","hrvaščina":"hr","indonezijščina":"id","irščina":"ga","islandščina":"is","italijanščina":"it","japonščina":"ja","kanareščina":"kn","katalonščina":"ca","kitajščina (poenostavljena)":"zh-cn","kitajščina (tradicionalna)":"zh-tw","korejščina":"ko","kurdščina":"ku","latinščina":"la","latvijščina":"lv","litovščina":"lt","madžarščina":"hu","makedonščina":"mk","malajalščina":"ml","malajščina":"ms","malteščina":"mt","maorščina":"mi","maratščina":"mr","mongolščina":"mn","nemščina":"de","nizozemščina":"nl","norveščina":"nb","perzijščina":"fa","poljščina":"pl","portugalščina":"pt","romunščina":"ro","ruščina":"ru","slovaščina":"sk","slovenščina":"sl","srbščina":"sr","škotska gelščina":"gd","španščina":"es","švedščina":"sv","tajščina":"th","teluščina":"te","turščina":"tr","ukrajinščina":"uk","uzbeščina":"uz","valižanščina":"cy","vietnamščina":"vi","zulujščina":"zu","albanais":"sq","allemand":"de","amharique":"am","anglais":"en","arabe":"ar","arménien":"hy","azéri":"az","basque":"eu","biélorusse":"be","birman":"my","bulgare":"bg","catalan":"ca","chinois (simplifié)":"zh-cn","chinois (traditionnel)":"zh-tw","coréen":"ko","créole haïtien":"ht","croate":"hr","danois":"da","espagnol":"es","espéranto":"eo","estonien":"et","finnois":"fi","français":"fr","gaélique (écosse)":"gd","galicien":"gl","gallois":"cy","grec":"el","hébreu":"he","hongrois":"hu","indonésien":"id","irlandais":"ga","islandais":"is","italien":"it","japonais":"ja","kurde":"ku","letton":"lv","lituanien":"lt","macédonien":"mk","malaisien":"ms","maltais":"mt","néerlandais":"nl","norvégien":"nb","ouzbek":"uz","persan":"fa","polonais":"pl","portugais":"pt","roumain":"ro","russe":"ru","serbe":"sr","slovaque":"sk","slovène":"sl","suédois":"sv","tchèque":"cs","thaï":"th","turc":"tr","ukrainien":"uk","vietnamien":"vi","zoulou":"zu","albán":"sq","amhara":"am","angol":"en","arab":"ar","azeri":"az","baszk":"eu","belorusz":"be","bolgár":"bg","burmai":"my","cseh":"cs","dán":"da","eszperantó":"eo","észt":"et","finn":"fi","francia":"fr","galíciai":"gl","görög":"el","haiti kreol":"ht","héber":"he","holland":"nl","horvát":"hr","indonéz":"id","ír":"ga","izlandi":"is","japán":"ja","katalán":"ca","kínai (egyszerűsített)":"zh-cn","kínai (hagyományos)":"zh-tw","koreai":"ko","kurd":"ku","lengyel":"pl","lett":"lv","litván":"lt","macedón":"mk","magyar":"hu","maláj":"ms","malajálam":"ml","máltai":"mt","maráthi":"mr","német":"de","norvég":"nb","olasz":"it","orosz":"ru","örmény":"hy","perzsa":"fa","portugál":"pt","román":"ro","skót-gael":"gd","spanyol":"es","svéd":"sv","szerb":"sr","szlovák":"sk","szlovén":"sl","thai":"th","török":"tr","ukrán":"uk","üzbég":"uz","vietnami":"vi","walesi":"cy","азербайджанська":"az","албанська":"sq","амхарська":"am","англійська":"en","арабська":"ar","баскська":"eu","білоруська":"be","бірманська":"my","болгарська":"bg","в’єтнамська":"vi","валлійська":"cy","вірменська":"hy","гаїтянська креольська":"ht","гінді":"hi","грецька":"el","ґалісійська":"gl","данська":"da","есперанто":"eo","естонська":"et","зулу":"zu","іврит":"he","індонезійська":"id","ірландська":"ga","ісландська":"is","іспанська":"es","італійська":"it","каннада":"kn","каталанська":"ca","китайська (спрощена)":"zh-cn","китайська (традиційна)":"zh-tw","корейська":"ko","курдська":"ku","латинська":"la","латиська":"lv","литовська":"lt","македонська":"mk","малайська":"ms","малаялам":"ml","мальтійська":"mt","маорі":"mi","маратхі":"mr","монгольська":"mn","нідерландська":"nl","німецька":"de","норвезька":"nb","перська":"fa","польська":"pl","португальська":"pt","російська":"ru","румунська":"ro","сербська":"sr","словацька":"sk","словенська":"sl","тайська":"th","телуґу":"te","турецька":"tr","угорська":"hu","узбецька":"uz","українська":"uk","фінська":"fi","французька":"fr","хорватська":"hr","чеська":"cs","шведська":"sv","шотландська (ґельська)":"gd","японська":"ja","土耳其文":"tr","中文(繁體)":"zh-tw","中文(簡體)":"zh-cn","丹麥文":"da","巴斯克文":"eu","日文":"ja","毛利文":"mi","世界語":"eo","加里西亞文":"gl","加泰羅尼亞文":"ca","卡納達文":"kn","白俄羅斯文":"be","立陶宛文":"lt","冰島文":"is","匈牙利文":"hu","印尼文":"id","印度文":"hi","西班牙文":"es","克羅埃西亞文":"hr","希伯來文":"he","希臘文":"el","亞美尼亞文":"hy","亞塞拜然文":"az","拉丁文":"la","拉脫維亞文":"lv","法文":"fr","波斯文":"fa","波蘭文":"pl","芬蘭文":"fi","阿姆哈拉文":"am","阿拉伯文":"ar","阿爾巴尼亞文":"sq","俄文":"ru","保加利亞文":"bg","南非祖魯文":"zu","威爾斯文":"cy","英文":"en","庫德文":"ku","挪威文":"nb","泰文":"th","泰盧固文":"te","海地克里奧文":"ht","烏克蘭文":"uk","烏茲別克文":"uz","馬耳他文":"mt","馬來文":"ms","馬其頓文":"mk","馬拉地文":"mr","馬拉雅拉姆文":"ml","捷克文":"cs","荷蘭文":"nl","斯洛伐克文":"sk","斯洛維尼亞文":"sl","越南文":"vi","塞爾維亞文":"sr","愛沙尼亞文":"et","愛爾蘭文":"ga","瑞典文":"sv","義大利文":"it","葡萄牙文":"pt","蒙古文":"mn","德文":"de","緬甸文":"my","韓文":"ko","羅馬尼亞文":"ro","蘇格蘭的蓋爾文":"gd","अझरबैजानी":"az","अम्हारिक":"am","अरबी":"ar","अर्मेनियन":"hy","अल्बानियन":"sq","आइसलँडिक":"is","आयरिश":"ga","इंग्रजी":"en","इंडोनेशियन":"id","इटालियन":"it","उझ्बेक":"uz","एस्टोनियन":"et","एस्परँटो":"eo","कन्नड":"kn","कुर्दिश (कुर्मांजी)":"ku","कॅटलान":"ca","कोरियन":"ko","क्रोएशियन":"hr","गॅलिशियन":"gl","ग्रीक":"el","चीनी (पारंपारिक)":"zh-tw","चीनी (सरलीकृत)":"zh-cn","जपानी":"ja","जर्मन":"de","झुलु":"zu","झेक":"cs","डच":"nl","डॅनिश":"da","तुर्की":"tr","तेलगू":"te","थाई":"th","नॉर्वेजियन":"nb","पोर्तुगीज":"pt","पोलिश":"pl","फारसी":"fa","फिन्निश":"fi","फ्रेंच":"fr","बल्गेरियन":"bg","बास्क":"eu","बेलारुशियन":"be","मंगोलियन":"mn","मराठी":"mr","मलय":"ms","मल्याळम":"ml","माओरी":"mi","माल्टीज":"mt","मॅसेडोनियन":"mk","म्यानमार (बर्मीज)":"my","युक्रेनियन":"uk","रशियन":"ru","रोमानियन":"ro","लाट्वियन":"lv","लिथुआनियन":"lt","लॅटिन":"la","वेल्श":"cy","व्हिएतनामी":"vi","सर्बियन":"sr","स्कॉट्स गेलिक":"gd","स्पॅनिश":"es","स्लोव्हाक":"sk","स्लोव्हेनियन":"sl","स्वीडिश":"sv","हंगेरियन":"hu","हिन्दी":"hi","हिब्रू":"he","हैतीयन क्रेओल":"ht","albanian":"sq","amharic":"am","arabic":"ar","armenian":"hy","azerbaijani":"az","belarusian":"be","bulgarian":"bg","chinese (simplified)":"zh-cn","chinese (traditional)":"zh-tw","croatian":"hr","czech":"cs","danish":"da","dutch":"nl","english":"en","estonian":"et","finnish":"fi","french":"fr","galician":"gl","german":"de","greek":"el","haitian creole":"ht","hebrew":"he","hungarian":"hu","icelandic":"is","indonesian":"id","irish":"ga","italian":"it","japanese":"ja","korean":"ko","kurdish (kurmanji)":"ku","latvian":"lv","lithuanian":"lt","macedonian":"mk","malay":"ms","maltese":"mt","mongolian":"mn","myanmar (burmese)":"my","norwegian":"nb","persian":"fa","polish":"pl","portuguese":"pt","romanian":"ro","russian":"ru","scots gaelic":"gd","serbian":"sr","slovak":"sk","slovenian":"sl","spanish":"es","swedish":"sv","turkish":"tr","ukrainian":"uk","uzbek":"uz","vietnamese":"vi","welsh":"cy","albanês":"sq","alemão":"de","armênio":"hy","azerbaijano":"az","basco":"eu","bielo-russo":"be","birmanês":"my","canarês":"kn","catalão":"ca","chinês (simplificado)":"zh-cn","chinês (tradicional)":"zh-tw","dinamarquês":"da","espanhol":"es","finlandês":"fi","francês":"fr","gaélico escocês":"gd","galês":"cy","hebraico":"he","holandês":"nl","indonésio":"id","inglês":"en","irlandês":"ga","islandês":"is","japonês":"ja","latim":"la","letão":"lv","macedônio":"mk","malaiala":"ml","maltês":"mt","marata":"mr","norueguês":"nb","polonês":"pl","português":"pt","romeno":"ro","russo":"ru","sérvio":"sr","tailandês":"th","tcheco":"cs","telugo":"te","ucraniano":"uk","uzbeque":"uz","almanca":"de","arapça":"ar","arnavutça":"sq","azerice":"az","baskça":"eu","belarusça":"be","bulgarca":"bg","burmaca":"my","çekçe":"cs","çince (basitleştirilmiş)":"zh-cn","çince (geleneksel)":"zh-tw","danca":"da","endonezya dili":"id","ermenice":"hy","esperantoca":"eo","estonyaca":"et","farsça":"fa","felemenkçe":"nl","fince":"fi","fransızca":"fr","galce":"cy","galiçyaca":"gl","habeşçe":"am","haiti creole dili":"ht","hırvatça":"hr","hintçe":"hi","i̇branice":"he","i̇ngilizce":"en","i̇rlandaca":"ga","i̇spanyolca":"es","i̇sveççe":"sv","i̇talyanca":"it","i̇zlandaca":"is","japonca":"ja","katalanca":"ca","korece":"ko","kuzey i̇skoç dili":"gd","kürtçe":"ku","latince":"la","lehçe":"pl","letonca":"lv","litvanca":"lt","macarca":"hu","makedonca":"mk","malezya dili":"ms","malta dili":"mt","maori dili":"mi","moğolca":"mn","norveççe":"nb","özbekçe":"uz","portekizce":"pt","romence":"ro","rusça":"ru","sırpça":"sr","slovakça":"sk","slovence":"sl","tay dili":"th","telugu dili":"te","türkçe":"tr","ukraynaca":"uk","vietnamca":"vi","yunanca":"el","airméinis":"hy","albáinis":"sq","amárais":"am","araibis":"ar","asarbaiseáinis":"az","bascais":"eu","bealarúisis":"be","béarla":"en","breatnais":"cy","bulgáiris":"bg","cannadais":"kn","catalóinis":"ca","coirdis (curmainsis)":"ku","cóiréis":"ko","criól háítí":"ht","cróitis":"hr","danmhairgis":"da","eabhrais":"he","eastóinis":"et","fionlainnis":"fi","fraincis":"fr","gaeilge":"ga","gaeilge na halban":"gd","gailísis":"gl","gearmáinis":"de","gréigis":"el","hiondúis":"hi","indinéisis":"id","iodáilis":"it","ioruais":"nb","íoslainnis":"is","laidin":"la","laitvis":"lv","liotuáinis":"lt","macadóinis":"mk","maenmar (burmais)":"my","mailéalaimis":"ml","malaeis":"ms","máltais":"mt","maorais":"mi","maraitis":"mr","mongóilis":"mn","ollainnis":"nl","peirsis":"fa","polainnis":"pl","portaingéilis":"pt","rómáinis":"ro","rúisis":"ru","seapáinis":"ja","seicis":"cs","seirbis":"sr","sínis (simplithe)":"zh-cn","sínis (traidisiúnta)":"zh-tw","slóivéinis":"sl","slóvaicis":"sk","spáinnis":"es","sualainnis":"sv","súlúis":"zu","téalainnis":"th","teileagúis":"te","tuircis":"tr","úcráinis":"uk","úisbéiceastáinis":"uz","ungáiris":"hu","vítneaimis":"vi","ภาษากรีก":"el","ภาษากันนาดา":"kn","ภาษากาลิเชียน":"gl","ภาษาเกลิกในสก็อต":"gd","ภาษาเกาหลี":"ko","ภาษาคาตาลัน":"ca","ภาษาเคิร์ด":"ku","ภาษาโครเอเชีย":"hr","ภาษาจีน (ดั้งเดิม)":"zh-tw","ภาษาจีน (แบบย่อ)":"zh-cn","ภาษาเช็ก":"cs","ภาษาซูลู":"zu","ภาษาเซอร์เบียน":"sr","ภาษาญี่ปุ่น":"ja","ภาษาดัตช์":"nl","ภาษาเดนมาร์ก":"da","ภาษาตุรกี":"tr","ภาษาเตลูกู":"te","ภาษาไทย":"th","ภาษานอร์เวย์":"nb","ภาษาบัลกาเรีย":"bg","ภาษาบาสก์":"eu","ภาษาเบลารูเชียน":"be","ภาษาเปอร์เซีย":"fa","ภาษาโปรตุเกส":"pt","ภาษาโปแลนด์":"pl","ภาษาฝรั่งเศส":"fr","ภาษาฟินแลนด์":"fi","ภาษามองโกเลีย":"mn","ภาษามัลทีส":"mt","ภาษามาซีโดเนีย":"mk","ภาษามาราฐี":"mr","ภาษามาลายาลัม":"ml","ภาษามาเลย์":"ms","ภาษาเมารี":"mi","ภาษาเมียนมา (พม่า)":"my","ภาษายูเครน":"uk","ภาษาเยอรมัน":"de","ภาษารัสเซีย":"ru","ภาษาโรมาเนีย":"ro","ภาษาละติน":"la","ภาษาลัทเวีย":"lv","ภาษาลิทัวเนีย":"lt","ภาษาเวลส์":"cy","ภาษาเวียดนาม":"vi","ภาษาสเปน":"es","ภาษาสโลวัก":"sk","ภาษาสโลเวเนีย":"sl","ภาษาสวีเดน":"sv","ภาษาอังกฤษ":"en","ภาษาอัมฮาริก":"am","ภาษาอัลบาเนีย":"sq","ภาษาอาร์เซอร์ไบจัน":"az","ภาษาอาร์เมเนีย":"hy","ภาษาอาหรับ":"ar","ภาษาอิตาลี":"it","ภาษาอินโดนีเซีย":"id","ภาษาอุสเบกิสถาน":"uz","ภาษาเอสโทเนีย":"et","ภาษาเอสเปอแรนโต":"eo","ภาษาไอซ์แลนดิก":"is","ภาษาไอริช":"ga","ภาษาฮังการี":"hu","ภาษาฮินดี":"hi","ภาษาฮิบรู":"he","ภาษาเฮติครีโอล":"ht","アイスランド語":"is","アイルランド語":"ga","アゼルバイジャン語":"az","アムハラ語":"am","アラビア語":"ar","アルバニア語":"sq","アルメニア語":"hy","イタリア語":"it","インドネシア語":"id","ウェールズ語":"cy","ウクライナ語":"uk","ウズベク語":"uz","エストニア語":"et","エスペラント語":"eo","オランダ語":"nl","カタルーニャ語":"ca","ガリシア語":"gl","カンナダ語":"kn","ギリシャ語":"el","クルド語":"ku","クロアチア語":"hr","スウェーデン語":"sv","ズールー語":"zu","スコットランド ゲール語":"gd","スペイン語":"es","スロバキア語":"sk","スロベニア語":"sl","セルビア語":"sr","タイ語":"th","チェコ語":"cs","テルグ語":"te","デンマーク語":"da","ドイツ語":"de","トルコ語":"tr","ノルウェー語":"nb","ハイチ語":"ht","バスク語":"eu","ハンガリー語":"hu","ヒンディー語":"hi","フィンランド語":"fi","フランス語":"fr","ブルガリア語":"bg","ベトナム語":"vi","ヘブライ語":"he","ベラルーシ語":"be","ペルシャ語":"fa","ポーランド語":"pl","ポルトガル語":"pt","マオリ語":"mi","マケドニア語":"mk","マラーティー語":"mr","マラヤーラム語":"ml","マルタ語":"mt","マレー語":"ms","ミャンマー語":"my","モンゴル語":"mn","ラテン語":"la","ラトビア語":"lv","リトアニア語":"lt","ルーマニア語":"ro","ロシア語":"ru","英語":"en","韓国語":"ko","中国語(簡体)":"zh-cn","中国語(繁体)":"zh-tw","日本語":"ja","albanees":"sq","amharisch":"am","arabisch":"ar","armeens":"hy","azerbeidzjaans":"az","baskisch":"eu","birmaans":"my","bulgaars":"bg","catalaans":"ca","chinees (traditioneel)":"zh-tw","chinees (vereenvoudigd)":"zh-cn","deens":"da","duits":"de","engels":"en","ests":"et","fins":"fi","frans":"fr","galicisch":"gl","grieks":"el","haïtiaans creools":"ht","hebreeuws":"he","hongaars":"hu","iers":"ga","ijslands":"is","indonesisch":"id","italiaans":"it","japans":"ja","koerdisch":"ku","koreaans":"ko","kroatisch":"hr","latijn":"la","lets":"lv","litouws":"lt","macedonisch":"mk","maleis":"ms","maltees":"mt","mongools":"mn","nederlands":"nl","noors":"nb","oekraïens":"uk","oezbeeks":"uz","perzisch":"fa","pools":"pl","portugees":"pt","roemeens":"ro","russisch":"ru","schots keltisch":"gd","servisch":"sr","slovaaks":"sk","sloveens":"sl","spaans":"es","tsjechisch":"cs","turks":"tr","vietnamees":"vi","wels":"cy","wit-russisch":"be","zoeloe":"zu","zweeds":"sv","airmeinis":"hy","albàinis":"sq","amtharais":"am","arabais":"ar","asarbaideànais":"az","basgais":"eu","bealaruisis":"be","beurla":"en","bhiet-namais":"vi","bulgarais":"bg","cànan nan tàidh":"th","catalanais":"ca","coirèanais":"ko","crìtheol haidhti":"ht","cròthaisis":"hr","cuimris":"cy","cùrdais (kurmanji)":"ku","duitsis":"nl","eabhra":"he","eadailtis":"it","eastoinis":"et","fionnlannais":"fi","fraingis":"fr","gàidhlig":"gd","gailìsis":"gl","gearmailtis":"de","grèigis":"el","hindis":"hi","innd-innsis":"id","innis-tìlis":"is","laideann":"la","laitbheis":"lv","liotuainis":"lt","malaidhis":"ms","māori":"mi","masadonais":"mk","miànmar (burmais)":"my","mongolais":"mn","nirribhis":"nb","pòlainnis":"pl","portagailis":"pt","romàinis":"ro","ruisis":"ru","seacais":"cs","seapanais":"ja","sèirbis":"sr","sìonais (seann-nòsach)":"zh-tw","sìonais (sìmplichte)":"zh-cn","slòbhacais":"sk","slòbhainis":"sl","spàinntis":"es","suainis":"sv","turcais":"tr","ucràinis":"uk","ungairis":"hu","usbagais":"uz","farsi":"fa","galisisk":"gl","gresk":"el","hviterussisk":"be","kinesisk (tradisjonell)":"zh-tw","kreol (haiti)":"ht","latvisk":"lv","malayisk":"ms","nederlandsk":"nl","rumensk":"ro","tsjekkisk":"cs","albanisch":"sq","armenisch":"hy","aserbaidschanisch":"az","birmanisch":"my","bulgarisch":"bg","chinesisch (traditionell)":"zh-tw","chinesisch (vereinfacht)":"zh-cn","dänisch":"da","deutsch":"de","englisch":"en","estnisch":"et","finnisch":"fi","französisch":"fr","galizisch":"gl","griechisch":"el","haitianisch":"ht","hebräisch":"he","irisch":"ga","isländisch":"is","italienisch":"it","japanisch":"ja","katalanisch":"ca","koreanisch":"ko","kurdisch (kurmandschi)":"ku","lateinisch":"la","lettisch":"lv","litauisch":"lt","malaysisch":"ms","maltesisch":"mt","mazedonisch":"mk","mongolisch":"mn","niederländisch":"nl","norwegisch":"nb","persisch":"fa","polnisch":"pl","portugiesisch":"pt","rumänisch":"ro","schottisch-gälisch":"gd","schwedisch":"sv","serbisch":"sr","slowakisch":"sk","slowenisch":"sl","spanisch":"es","thailändisch":"th","tschechisch":"cs","türkisch":"tr","ukrainisch":"uk","ungarisch":"hu","usbekisch":"uz","vietnamesisch":"vi","walisisch":"cy","weißrussisch":"be","ကနာဒါ":"kn","ကာ့ဒ် (ကာမန်ဂျီ)":"ku","ကိုရီးယား":"ko","ကက်တလန်":"ca","ခရိုအေးရှား":"hr","ချက်":"cs","ဂရိ":"el","ဂယ်လိရှ":"gl","ဂျပန်":"ja","ဂျာမန်":"de","စကော့ ဂေးလစ်":"gd","စပိန်":"es","ဆလိုဗေးနီးယား":"sl","ဆလိုဗက်":"sk","ဆားဘီးယား":"sr","ဆွီဒင်":"sv","ဇူးလူး":"zu","တရုတ် (ရိုးရာ)":"zh-tw","တရုတ် (အလွယ်)":"zh-cn","တူ​ရ​ကီ":"tr","တယ်လူဂူ":"te","ထိုင်း":"th","ဒတ်ချ်":"nl","ဒိန်းမတ်":"da","နော်ဝေ":"nb","ပါရှန်":"fa","ပေါ်တူဂီ":"pt","ပိုလန်":"pl","ပြင်သစ်":"fr","ဖင်လန်":"fi","ဗီယက်နမ်":"vi","ဘာ့စ်":"eu","ဘူဂေးရီးယား":"bg","ဘယ်လာရုစ်":"be","မလေယာလမ်":"ml","မလေး":"ms","မာရာသီ":"mr","မော်ရီ":"mi","မော်လတာ":"mt","မက်ဆီဒိုးနီးယား":"mk","မြန်မာ (မြန်မာ)":"my","မွန်ဂိုလီးယား":"mn","ယူ​က​ရိန်း​":"uk","ရုရှား":"ru","ရိုမေးနီးယား":"ro","လက်တင်":"la","လစ်သူယေးနီးယား":"lt","လတ်ဗီယာ":"lv","ဝေလ":"cy","ဟီဘရူး":"he","ဟေတီ ခရီအိုး":"ht","ဟင်ဒီ":"hi","ဟန်ဂေရီ":"hu","အဇာဘိုင်ဂျန်":"az","အာမေးနီးယား":"hy","အာရေဗျ":"ar","အီတလီ":"it","ဥဇဘက်":"uz","အက်စတိုးနီးယား":"et","အက်စ်ပဲရန်တို":"eo","အိုက်စလန်":"is","အင်္ဂလိပ်":"en","အင်ဒိုနီးရှား":"id","အိုင်းရစ်ရှ်":"ga","အမ်ဟဲရစ်ခ်":"am","အယ်လ်ဘေးနီးယား":"sq","אוזבקית":"uz","אוקראינית":"uk","אזרית":"az","איטלקית":"it","אינדונזית":"id","איסלנדית":"is","אירית":"ga","אלבנית":"sq","אמהרית":"am","אנגלית":"en","אסטונית":"et","אספרנטו":"eo","ארמנית":"hy","באסקית":"eu","בולגרית":"bg","בורמזית":"my","בלארוסית":"be","גליציאנית":"gl","גרמנית":"de","דנית":"da","הולנדית":"nl","הונגרית":"hu","הינדי":"hi","וולשית":"cy","וייטנאמית":"vi","זולו":"zu","טורקית":"tr","טלוגו":"te","יוונית":"el","יפנית":"ja","כורדית":"ku","לטווית":"lv","לטינית":"la","ליטאית":"lt","מאורית":"mi","מאלאיאלם":"ml","מאלזית":"ms","מאראתי":"mr","מונגולית":"mn","מלטית":"mt","מקדונית":"mk","נורווגית":"nb","סינית (מסורתית)":"zh-tw","סינית (פשוטה)":"zh-cn","סלובנית":"sl","סלובקית":"sk","ספרדית":"es","סקוטית גאלית":"gd","סרבית":"sr","עברית":"he","ערבית":"ar","פולנית":"pl","פורטוגזית":"pt","פינית":"fi","פרסית":"fa","צ\'כית":"cs","צרפתית":"fr","קאנאדה":"kn","קוריאנית":"ko","קטלאנית":"ca","קרואטית":"hr","קריאולית האיטית":"ht","רומנית":"ro","רוסית":"ru","שוודית":"sv","תאילנדית":"th","азербејџански":"az","албански":"sq","амхарски":"am","англиски":"en","арапски":"ar","баскиски":"eu","белоруски":"be","бугарски":"bg","бурмански":"my","велшки":"cy","виетнамски":"vi","галициски":"gl","германски":"de","грчки":"el","дански":"da","ерменски":"hy","естонски":"et","индонезиски":"id","ирски":"ga","исландски":"is","италијански":"it","јапонски":"ja","канада":"kn","каталонски":"ca","кинески (поедноставен)":"zh-cn","кинески (традиционален)":"zh-tw","корејски":"ko","курдски":"ku","латвиски":"lv","латински":"la","литвански":"lt","македонски":"mk","малајалам":"ml","малајски":"ms","малтешки":"mt","маорски":"mi","маратхи":"mr","монголски":"mn","норвешки":"nb","персиски":"fa","полски":"pl","португалски":"pt","романски":"ro","руски":"ru","словачки":"sk","словенечки":"sl","српски":"sr","тајландски":"th","телугу":"te","турски":"tr","узбечки":"uz","украински":"uk","унгарски":"hu","фински":"fi","француски":"fr","хаитски креолски":"ht","хебрејски":"he","хиндиски":"hi","холандски":"nl","хрватски":"hr","чешки":"cs","шведски":"sv","шкотски галски":"gd","шпански":"es","ಅಜರ್ಬೈಜಾನಿ":"az","ಅಮಹಾರಿಕ್":"am","ಅರಬ್ಬಿ":"ar","ಆರ್ಮೇನಿಯನ್":"hy","ಆಲ್ಬೇನಿಯನ್":"sq","ಇಂಗ್ಲಿಷ್‌‌":"en","ಇಂಡೋನೇಷಿಯನ್":"id","ಇಟಾಲಿಯನ್":"it","ಉಜ್ಬೆಕ್":"uz","ಎಸ್ಟೋನಿಯನ್":"et","ಎಸ್ಪೆರಾಂಟೋ":"eo","ಐರಿಷ್":"ga","ಐಸ್‌ಲ್ಯಾಂಡಿಕ್‌":"is","ಕನ್ನಡ":"kn","ಕುರ್ದಿಶ್":"ku","ಕೊರಿಯನ್":"ko","ಕ್ಯಾಟಲನ್":"ca","ಕ್ರೊಯೇಷಿಯನ್":"hr","ಗ್ಯಾಲೀಷಿಯನ್":"gl","ಗ್ರೀಕ್":"el","ಚೀನಿ (ಸರಳೀಕೃತ)":"zh-cn","ಚೀನಿ (ಸಾಂಪ್ರದಾಯಿಕ)":"zh-tw","ಜಪಾನಿ":"ja","ಜರ್ಮನ್":"de","ಜುಲು":"zu","ಝೆಕ್‌":"cs","ಟರ್ಕಿಷ್":"tr","ಡಚ್":"nl","ಡ್ಯಾನಿಷ್":"da","ತೆಲುಗು":"te","ಥಾಯ್":"th","ನಾರ್ವೇಜಿಯನ್‌":"nb","ಪೋರ್ಚುಗೀಸ್":"pt","ಪೋಲಿಷ್":"pl","ಫಾರ್ಸಿ":"fa","ಫಿನ್ನಿಷ್":"fi","ಫ್ರೆಂಚ್":"fr","ಬರ್ಮೀಸ್":"my","ಬಲ್ಗೇರಿಯನ್":"bg","ಬಾಸ್ಕ್":"eu","ಬೆಲರೂಸಿಯನ್":"be","ಮಂಗೋಲಿಯನ್":"mn","ಮರಾಠಿ":"mr","ಮಲಯ":"ms","ಮಲಯಾಳಂ":"ml","ಮಾಲ್ಟೀಸ್":"mt","ಮಾವೋರಿ":"mi","ಮ್ಯಾಸೆಡೋನಿಯನ್":"mk","ಯುಕ್ರೇನಿಯನ್":"uk","ರಷಿಯನ್":"ru","ರೊಮೇನಿಯನ್":"ro","ಲಿಥುವೇನಿಯನ್":"lt","ಲ್ಯಾಟಿನ್":"la","ಲ್ಯಾಟ್ವಿಯನ್‌":"lv","ವಿಯೆಟ್ನಾಮಿ":"vi","ವೆಲ್ಶ್":"cy","ಸರ್ಬಿಯನ್":"sr","ಸ್ಕಾಟ್ಸ್ ಗ್ಯಾಲಿಕ್":"gd","ಸ್ಪ್ಯಾನಿಷ್":"es","ಸ್ಲೊವಾಕ್":"sk","ಸ್ಲೊವೆನಿಯನ್":"sl","ಸ್ವೀಡಿಷ್":"sv","ಹಂಗೇರಿಯನ್":"hu","ಹಯಥಿಯನ್‌ ಕ್ರಿಯೋಲ್‌":"ht","ಹಿಂದಿ":"hi","ಹೀಬ್ರೂ":"he","അമാറിക്":"am","അർമേനിയൻ":"hy","അൽബേനിയൻ":"sq","അസർബൈജാനി":"az","അറബിക്":"ar","ഇന്തോനേഷ്യൻ":"id","ഇംഗ്ലീഷ്":"en","ഇറ്റാലിയൻ":"it","ഉക്രേനിയൻ":"uk","ഉസ്ബെക്ക്":"uz","എസ്‌പെരന്തോ":"eo","എസ്റ്റോണിയൻ":"et","ഐസ്‌ലാൻഡിക്":"is","ഐറിഷ്":"ga","കന്നട":"kn","കാറ്റലൻ":"ca","കുർദ്ദിഷ്":"ku","കൊറിയൻ":"ko","ക്രൊയേഷ്യൻ":"hr","ഗലീഷ്യൻ":"gl","ഗ്രീക്ക്":"el","ചെക്ക്":"cs","ചൈനീസ് (പരമ്പരാഗതം)":"zh-tw","ചൈനീസ് (ലഘൂകരിച്ചത്)":"zh-cn","ജർമ്മൻ":"de","ജാപ്പനീസ്‌":"ja","ടർക്കിഷ്":"tr","ഡച്ച്":"nl","ഡാനിഷ്":"da","തായ്":"th","തെലുങ്ക്":"te","നോർവീജിയൻ":"nb","പേർഷ്യൻ":"fa","പോർച്ചുഗീസ്":"pt","പോളിഷ്":"pl","ഫിന്നിഷ്":"fi","ഫ്രെഞ്ച്":"fr","ബർമീസ്":"my","ബൾഗേറിയൻ":"bg","ബാസ്ക്":"eu","ബെലാറുഷ്യൻ":"be","മംഗോളിയൻ":"mn","മലയാളം":"ml","മലയ്":"ms","മറാഠി":"mr","മാസഡോണിയൻ":"mk","മാൾട്ടീസ്":"mt","മൗറി":"mi","ലാറ്റിൻ":"la","ലാറ്റ്‌വിയൻ":"lv","ലിത്വേനിയൻ":"lt","വിയറ്റ്നാമീസ്":"vi","വെൽഷ്":"cy","സുളു":"zu","സെർബിയൻ":"sr","സ്കോട്ട്സ് ഗ്യാലിക്":"gd","സ്പാനിഷ്":"es","സ്ലോവാക്":"sk","സ്ലോവേനിയൻ":"sl","സ്വീഡിഷ്":"sv","ഹംഗേറിയൻ":"hu","ഹിന്ദി":"hi","ഹീബ്രു":"he","ഹെയ്തിയൻ ക്രയോൾ":"ht","റഷ്യൻ":"ru","റൊമേനിയൻ":"ro","albánčina":"sq","amharčina":"am","arabčina":"ar","arménčina":"hy","azerbajdžančina":"az","barmčina":"my","bieloruština":"be","bulharčina":"bg","čínština (tradičná)":"zh-tw","dánčina":"da","estónčina":"et","fínčina":"fi","francúzština":"fr","galícijčina":"gl","gréčtina":"el","haitská kreolčina":"ht","hebrejčina":"he","hindčina":"hi","holandčina":"nl","chorvátčina":"hr","indonézština":"id","írčina":"ga","islandčina":"is","japončina":"ja","kannadčina":"kn","katalánčina":"ca","kórejčina":"ko","kurdčina":"ku","latinčina":"la","litovčina":"lt","macedónčina":"mk","maďarčina":"hu","malajámčina":"ml","malajčina":"ms","maltčina":"mt","maorijčina":"mi","maratčina":"mr","mongolčina":"mn","nemčina":"de","nórčina":"nb","perzština":"fa","poľština":"pl","portugalčina":"pt","rumunčina":"ro","slovenčina":"sk","slovinčina":"sl","srbčina":"sr","škótska gaelčina":"gd","španielčina":"es","švédčina":"sv","taliančina":"it","telugčina":"te","thajčina":"th","ukrajinčina":"uk","vietnamčina":"vi","waleština":"cy","zuluština":"zu","isi-albania":"sq","isi-amharic":"am","isi-arabic":"ar","isi-armenian":"hy","isi-azerbaijani":"az","isi-basque":"eu","isi-belarusian":"be","isi-bulgarian":"bg","isi-burmese":"my","isi-catalan":"ca","isi-chinese (simplified)":"zh-cn","isi-chinese (traditional)":"zh-tw","isi-croatian":"hr","isi-czech":"cs","isi-danish":"da","isi-dutch":"nl","isi-english":"en","isi-esperanto":"eo","isi-estonian":"et","isi-finnish":"fi","isi-french":"fr","isi-galician":"gl","isi-german":"de","isi-greek":"el","isi-haitian creole":"ht","isi-hangarian":"hu","isi-hebrew":"he","isi-hindi":"hi","isi-icelandic":"is","isi-indonesian":"id","isi-irish":"ga","isi-italian":"it","isi-japanese":"ja","isi-kannada":"kn","isi-korean":"ko","isi-kurdish":"ku","isi-latin":"la","isi-latvian":"lv","isi-lithuanian":"lt","isi-macedonian":"mk","isi-malay":"ms","isi-malayalam":"ml","isi-maltese":"mt","isi-maori":"mi","isi-marathi":"mr","isi-mongolian":"mn","isi-norwegian":"nb","isi-persian":"fa","isi-polish":"pl","isi-portuguese":"pt","isi-romanian":"ro","isi-russian":"ru","isi-scots gaelic":"gd","isi-serbian":"sr","isi-slovak":"sk","isi-slovenian":"sl","isi-spanish":"es","isi-swedish":"sv","isi-telugu":"te","isi-thai":"th","isi-turkish":"tr","isi-ukrainian":"uk","isi-uzbek":"uz","isi-vietnamese":"vi","isi-welsh":"cy","isizulu":"zu","albania":"sq","armenia":"hy","azerbaijan":"az","belanda":"nl","belarus":"be","bulgaria":"bg","cina (mudah)":"zh-cn","cina (tradisional)":"zh-tw","croatia":"hr","denmark":"da","estonia":"et","finland":"fi","gaelic scotland":"gd","galicia":"gl","hungary":"hu","ibrani":"he","iceland":"is","indonesia":"id","inggeris":"en","ireland":"ga","itali":"it","jepun":"ja","jerman":"de","korea":"ko","kreol haiti":"ht","kurdistan":"ku","latvia":"lv","lithuania":"lt","macedonia":"mk","malta":"mt","melayu":"ms","mongolia":"mn","myanmar":"my","norway":"nb","parsi":"fa","perancis":"fr","poland":"pl","portugis":"pt","romania":"ro","rusia":"ru","sepanyol":"es","serbia":"sr","slovenia":"sl","sweden":"sv","turki":"tr","ukraine":"uk","vietnam":"vi","wales":"cy","азербайджанский":"az","албанский":"sq","амхарский":"am","английский":"en","арабский":"ar","армянский":"hy","баскский":"eu","белорусский":"be","бирманский":"my","болгарский":"bg","валлийский":"cy","венгерский":"hu","вьетнамский":"vi","галисийский":"gl","греческий":"el","датский":"da","иврит":"he","индонезийский":"id","ирландский":"ga","исландский":"is","испанский":"es","итальянский":"it","каталанский":"ca","китайский (традиционный)":"zh-tw","китайский (упрощенный)":"zh-cn","корейский":"ko","креольский (гаити)":"ht","курманджи":"ku","латинский":"la","латышский":"lv","литовский":"lt","македонский":"mk","малайский":"ms","мальтийский":"mt","маори":"mi","монгольский":"mn","немецкий":"de","нидерландский":"nl","норвежский":"nb","персидский":"fa","польский":"pl","португальский":"pt","румынский":"ro","русский":"ru","сербский":"sr","словацкий":"sk","словенский":"sl","тайский":"th","турецкий":"tr","узбекский":"uz","украинский":"uk","финский":"fi","французский":"fr","хинди":"hi","хорватский":"hr","чешский":"cs","шведский":"sv","шотландский (гэльский)":"gd","эсперанто":"eo","эстонский":"et","японский":"ja","albański":"sq","amharski":"am","angielski":"en","arabski":"ar","azerski":"az","baskijski":"eu","białoruski":"be","birmański":"my","bułgarski":"bg","chiński (tradycyjny)":"zh-tw","chiński (uproszczony)":"zh-cn","chorwacki":"hr","czeski":"cs","duński":"da","estoński":"et","fiński":"fi","francuski":"fr","galicyjski":"gl","grecki":"el","hebrajski":"he","hiszpański":"es","indonezyjski":"id","irlandzki":"ga","islandzki":"is","japoński":"ja","kataloński":"ca","koreański":"ko","kreolski (haiti)":"ht","kurdyjski":"ku","litewski":"lt","łaciński":"la","łotewski":"lv","macedoński":"mk","malajalam":"ml","malajski":"ms","maltański":"mt","mongolski":"mn","niderlandzki":"nl","niemiecki":"de","norweski":"nb","ormiański":"hy","perski":"fa","polski":"pl","portugalski":"pt","rosyjski":"ru","rumuński":"ro","serbski":"sr","słowacki":"sk","słoweński":"sl","szkocki gaelicki":"gd","szwedzki":"sv","tajski":"th","turecki":"tr","ukraiński":"uk","uzbecki":"uz","walijski":"cy","węgierski":"hu","wietnamski":"vi","włoski":"it","азербайджанская":"az","албанская":"sq","амхарская":"am","англійская":"en","арабская":"ar","армянская":"hy","балгарская":"bg","баскская":"eu","беларуская":"be","в\'етнамская":"vi","валійская":"cy","венгерская":"hu","гаіцянская крэольская":"ht","галандская":"nl","галісійская":"gl","грэчаская":"el","дацкая":"da","інданезійская":"id","ірландская":"ga","ісландская":"is","іспанская":"es","італьянская":"it","іўрыт":"he","карэйская":"ko","каталонская":"ca","кітайская (спрошчаная)":"zh-cn","кітайская (традыцыйная)":"zh-tw","курдская (курманджы)":"ku","латышская":"lv","лацінская":"la","літоўская":"lt","м\'янманская (бірманская)":"my","маары":"mi","македонская":"mk","малайская":"ms","мальтыйская":"mt","мангольская":"mn","нарвежская":"nb","нямецкая":"de","партугальская":"pt","персідская":"fa","польская":"pl","румынская":"ro","руская":"ru","сербская":"sr","славацкая":"sk","славенская":"sl","тайская":"th","турэцкая":"tr","тэлугу":"te","узбекская":"uz","украінская":"uk","фінская":"fi","французская":"fr","харвацкая":"hr","хіндзі":"hi","чэшская":"cs","шатландская гэльская":"gd","шведская":"sv","эсперанта":"eo","эстонская":"et","японская":"ja","amarikisht":"am","anglisht":"en","arabisht":"ar","armenisht":"hy","azerisht":"az","baskisht":"eu","birmanisht":"my","bjellorusisht":"be","bullgarisht":"bg","çekisht":"cs","danisht":"da","estonisht":"et","finlandisht":"fi","frëngjisht":"fr","galicianisht":"gl","galishte skoceze":"gd","greqisht":"el","gjermanisht":"de","hebraisht":"he","hindisht":"hi","holandisht":"nl","hungarisht":"hu","indonezisht":"id","irlandisht":"ga","islandisht":"is","italisht":"it","japonisht":"ja","kanada":"kn","katalonisht":"ca","kinezisht (e thjeshtuar)":"zh-cn","kinezisht (tradicionale)":"zh-tw","koreanisht":"ko","kreolishte haitiane":"ht","kroatisht":"hr","latinisht":"la","letonisht":"lv","lituanisht":"lt","malajalamisht":"ml","malajzisht":"ms","malteze":"mt","maorisht":"mi","maqedonisht":"mk","maratisht":"mr","mongolisht":"mn","norvegjisht":"nb","persisht":"fa","polonisht":"pl","portugalisht":"pt","rumanisht":"ro","rusisht":"ru","serbisht":"sr","sllovakisht":"sk","sllovenisht":"sl","spanjisht":"es","suedisht":"sv","shqip":"sq","tajlandisht":"th","telugisht":"te","turqisht":"tr","uellsisht":"cy","ukrainisht":"uk","uzbekisht":"uz","vietnamisht":"vi","ሀንጋሪኛ":"hu","ህንድኛ":"hi","ሊትዌንኛ":"lt","ላቲንኛ":"la","ላትቪያኛ":"lv","ማላያላምኛ":"ml","ማላይኛ":"ms","ማልቲስኛ":"mt","ማራቲኛ":"mr","ማዮሪኛ":"mi","ሜቄዶኒያኛ":"mk","ሞንጎሊያኛ":"mn","ራሽያኛ":"ru","ሮማኒያንኛ":"ro","ሰርቢያኛ":"sr","ስሎቫክኛ":"sk","ስሎቬንያኛ":"sl","ስዊድንኛ":"sv","ስፓኒሽኛ":"es","በርማኛ":"my","ቡልጋሪያኛ":"bg","ባስክኛ":"eu","ቤላሩስኛ":"be","ቪትናምኛ":"vi","ቱርክኛ":"tr","ታይኛ":"th","ቴሉጉኛ":"te","ቻይንኛ (ቀላሉ)":"zh-cn","ቻይንኛ (ባሕላዊው)":"zh-tw","ቼክኛ":"cs","ኖርዌጅያንኛ":"nb","አልባንያኛ":"sq","አማርኛ":"am","አርመኒያኛ":"hy","አዜርባይጃንኛ":"az","አይሪሽ":"ga","አይስላንድኛ":"is","ኡዝቤክኛ":"uz","ኤስቶኒያኛ":"et","ኤስፐራንቶ":"eo","እንዶኔዢያኛ":"id","እንግሊዝኛ":"en","ኩርድሽኛ":"ku","ካታላንኛ":"ca","ካናዳኛ":"kn","ክሮኤሽያኛ":"hr","ኮሪያኛ":"ko","ዌልሽ":"cy","ዐረብኛ":"ar","ዕብራይስጥ":"he","ዙሉኛ":"zu","የሃይቲ ክረኦሌኛ":"ht","የስኮት ጌልክኛ":"gd","ዩክሬንኛ":"uk","ደችኛ":"nl","ዴንሽኛ":"da","ጀርመንኛ":"de","ጃፓንኛ":"ja","ጋሊሺያኛ":"gl","ግሪክኛ":"el","ጣሊያንኛ":"it","ፈረንሳይኛ":"fr","ፊኒሽኛ":"fi","ፐርሺያኛ":"fa","ፖሊሽኛ":"pl","ፖርቱጋሊኛ":"pt","alban":"sq","alman":"de","amarikcə":"am","azərbaycan dili":"az","bask":"eu","belarusca":"be","bolqar":"bg","çex":"cs","çin (ən\'ənəvi)":"zh-tw","çin (sadələşdirilmiş)":"zh-cn","danimarka":"da","erməni":"hy","eston":"et","ərəb":"ar","fars dili":"fa","fin":"fi","fransız":"fr","haiti kreol dili":"ht","hind":"hi","xorvat":"hr","ispan":"es","i̇ndoneziya":"id","i̇ngilis":"en","i̇rland":"ga","i̇sland":"is","i̇sveç":"sv","i̇talyan":"it","i̇vrit":"he","katalan":"ca","koreya":"ko","kürd dili (kurmanci)":"ku","qalisian":"gl","latın":"la","latış":"lv","litva":"lt","macar":"hu","makedoniya":"mk","maoricə":"mi","monqolca":"mn","myanma (birma) dili":"my","norveç":"nb","özbək":"uz","polyak":"pl","portuqal":"pt","rumın":"ro","rus":"ru","serb":"sr","sloven":"sl","şotland (kelt)":"gd","tayca":"th","teluqu":"te","türk":"tr","uels":"cy","ukrayna":"uk","vyetnam":"vi","yapon":"ja","yunan":"el","zulu dili":"zu","albaniż":"sq","amħari":"am","armen":"hy","ażerbajġani":"az","belarussu":"be","bulgaru":"bg","ċek":"cs","ċiniż (semplifikat)":"zh-cn","ċiniż (tradizzjonali)":"zh-tw","creole haiti":"ht","daniż":"da","ebrajk":"he","estonjan":"et","finlandiż":"fi","franċiż":"fr","ġappuniż":"ja","ġermaniż":"de","gaelic tal-iskoċċiżi":"gd","galizjan":"gl","grieg":"el","għarbi":"ar","ħindi":"hi","indoneżjan":"id","ingliż":"en","irlandiż":"ga","islandiż":"is","kroat":"hr","kurd (kurmanji)":"ku","latvjan":"lv","litwen":"lt","maċedonjan":"mk","malasjan":"ms","malti":"mt","marati":"mr","mjanmar (burma)":"my","mongoljan":"mn","norveġiż":"nb","olandiż":"nl","persjan":"fa","pollakk":"pl","portugiż":"pt","rumen":"ro","russu":"ru","slovakk":"sk","spanjol":"es","svediż":"sv","tajlandiż":"th","taljan":"it","tork":"tr","ukren":"uk","ungeriż":"hu","użbek":"uz","vjetnamiż":"vi","żulu":"zu","albanski":"sq","amharik":"am","arapski":"ar","armenijski":"hy","azerbajdžanski":"az","bjeloruski":"be","bugarski":"bg","burmanski":"my","češki":"cs","danski":"da","engleski":"en","estonski":"et","finski":"fi","galski":"gl","grčki":"el","haićansko-kreolski":"ht","hebrejski":"he","hindu":"hi","hrvatski":"hr","indonezijski":"id","irski":"ga","islandski":"is","japanski":"ja","katalonski":"ca","kineski (pojednost.)":"zh-cn","kineski (tradicionalni)":"zh-tw","korejski":"ko","kurdski":"ku","latinski":"la","latvijski/letonski":"lv","litvanski":"lt","mađarski":"hu","makedonski":"mk","malezijski":"ms","malteški":"mt","nizozemski":"nl","norveški":"nb","njemački":"de","perzijski":"fa","poljski":"pl","rumunjski":"ro","ruski":"ru","slovački":"sk","slovenski":"sl","srpski":"sr","škotski keltski":"gd","španjolski":"es","švedski":"sv","tajlandski":"th","talijanski":"it","turski":"tr","ukrajinski":"uk","uzbekistanski":"uz","velški":"cy","vijetnamski":"vi","آذرباﻳﺠﺎﻧﻰ":"az","آلبانیایی":"sq","آلمانی":"de","ارمنی":"hy","ازبکی":"uz","اسپانیایی":"es","اسپرانتو":"eo","استونيايی":"et","اسلواکی":"sk","اسلونیایی":"sl","اکراينی":"uk","امهری":"am","اندونزيايی":"id","انگلیسی":"en","ایتالیایی":"it","ایرلندی":"ga","ايسلندی":"is","باسکی":"eu","برمه‌ای":"my","بلاروسی":"be","بلغاری":"bg","پرتغالی":"pt","تايلندی":"th","ترکی استانبولی":"tr","تلوگو":"te","چک":"cs","چینی (ساده‌شده)":"zh-cn","چینی (سنتی)":"zh-tw","دانمارکی":"da","روسی":"ru","رومانيايی":"ro","زولو":"zu","ژاپنی":"ja","سوئدی":"sv","صربی":"sr","عبری":"he","عربی":"ar","فارسی":"fa","فرانسوی":"fr","فنلاندی":"fi","کاتالان":"ca","کانارا":"kn","کرئول هائیتی":"ht","کردی":"ku","کرواتی":"hr","کره‌ای":"ko","گالیسی":"gl","گاليک اسکاتلندی":"gd","لاتين":"la","لتونيايی":"lv","لهستانی":"pl","ليتوانيايی":"lt","مائوری":"mi","مالایالمی":"ml","مالايی":"ms","مالتی":"mt","مجاری":"hu","مراتی":"mr","مغولی":"mn","مقدونيه‌ای":"mk","نروژی":"nb","ولزی":"cy","ويتنامی":"vi","هلندی":"nl","هندی":"hi","يونانی":"el","ahepaitani":"az","airihi":"ga","amariki":"am","amēniana":"hy","arapeinia":"sq","arapi":"ar","eperānato":"eo","etōnia":"et","haina (onamata)":"zh-tw","hainamana (kua whakamāmātia)":"zh-cn","hanekeria":"hu","hapanihi":"ja","herepia":"sr","hinerangi":"fi","hīni":"hi","hiperu":"he","horowākia":"sk","horowinia":"sl","huitene":"sv","huru":"zu","ingarihi":"en","initonīhia":"id","itāriana":"it","kanata":"kn","karihia":"gl","katarāna":"ca","kereore haiti":"ht","kiriki":"el","kōreana":"ko","koroātiana":"hr","korukoru":"tr","kūrihi":"ku","makerōnia":"mk","māratihi":"mt","marei":"ms","mareiarama":"ml","mongōriana":"mn","nōwei":"nb","pākihi":"eu","pāniora":"es","pēma (purumīhi)":"my","peraruhia":"be","perēhia":"fa","pōrana":"pl","potukīhi":"pt","purukāriana":"bg","rātini":"la","rāwhiana":"lv","rituānia":"lt","romānia":"ro","rūhia":"ru","tai":"th","tati":"nl","tenemāka":"da","teruku":"te","tiamana":"de","tieke":"cs","tiorangi":"is","tuauri kotarangi":"gd","uhipeke":"uz","ūkareiana":"uk","wēra":"cy","whitināmu":"vi","wīwī":"fr","αγγλικά":"en","αζερμπαϊτζανικά":"az","αλβανικά":"sq","αμχαρικά":"am","αραβικά":"ar","αρμενικά":"hy","βασκικά":"eu","βιετναμεζικά":"vi","βιρμανικά":"my","βουλγαρικά":"bg","γαελικά σκοτίας":"gd","γαλικιακά":"gl","γαλλικά":"fr","γερμανικά":"de","δανικά":"da","εβραϊκά":"he","ελληνικά":"el","εσθονικά":"et","εσπεράντο":"eo","ζουλού":"zu","ιαπωνικά":"ja","ινδονησιακά":"id","ιρλανδικά":"ga","ισλανδικά":"is","ισπανικά":"es","ιταλικά":"it","κανάντα":"kn","καταλανικά":"ca","κινέζικα (απλοποιημένα)":"zh-cn","κινέζικα (παραδοσιακά)":"zh-tw","κορεατικά":"ko","κουρδικά":"ku","κρεόλ αϊτής":"ht","κροατικά":"hr","λατινικά":"la","λετονικά":"lv","λευκορωσικά":"be","λιθουανικά":"lt","μαλαγιάλαμ":"ml","μαλέι":"ms","μαλτεζικά":"mt","μαορί":"mi","μαραθικά":"mr","μογγολικά":"mn","νορβηγικά":"nb","ολλανδικά":"nl","ουαλικά":"cy","ουγγρικά":"hu","ουζμπεκικά":"uz","ουκρανικά":"uk","περσικά":"fa","πολωνικά":"pl","πορτογαλικά":"pt","ρουμανικά":"ro","ρωσικά":"ru","σερβικά":"sr","σλαβομακεδονικά":"mk","σλοβακικά":"sk","σλοβενικά":"sl","σουηδικά":"sv","ταϊλανδεζικά":"th","τελούγκου":"te","τούρκικα":"tr","τσεχικά":"cs","φινλανδικά":"fi","χίντι":"hi","amxar":"am","arman":"hy","bolgar":"bg","dat":"da","fors":"fa","fransuz":"fr","gaiti-kreol":"ht","galisiy":"gl","golland":"nl","grek":"el","ibroniy":"he","indonez":"id","ingliz":"en","irland":"ga","island":"is","italyan":"it","koreys":"ko","kurd (kurmonji)":"ku","latish":"lv","lotin":"la","makedon":"mk","maltiy":"mt","maratxi":"mr","mo‘g‘ul":"mn","nemis":"de","norveg":"nb","ozarbayjon":"az","portugal":"pt","rumin":"ro","tay":"th","turk":"tr","ukrain":"uk","valliy":"cy","venger":"hu","xitoy (an’anaviy)":"zh-tw","xitoy (soddalashgan)":"zh-cn","o‘zbek":"uz","shotland-gel":"gd","shved":"sv","chex":"cs","albanska":"sq","amharísku":"am","arabíska":"ar","armenska":"hy","aserska":"az","baskneska":"eu","búlgarska":"bg","búrmíska":"my","danska":"da","eistneska":"et","enska":"en","esperantó":"eo","finnska":"fi","franska":"fr","galisíska":"gl","gríska":"el","haítískt kreólamál":"ht","hebreska":"he","hindí":"hi","hollenska":"nl","hvítrússneska":"be","indónesíska":"id","írska":"ga","íslenska":"is","ítalska":"it","japanska":"ja","katalónska":"ca","kínverska (einfölduð)":"zh-cn","kínverska (hefðbundin)":"zh-tw","kóreska":"ko","króatíska":"hr","kúrdíska":"ku","latína":"la","lettneska":"lv","litháíska":"lt","makedónska":"mk","malajíska":"ms","maltneska":"mt","maoríska":"mi","maratí":"mr","mongólska":"mn","norska":"nb","persneska":"fa","portúgalska":"pt","pólska":"pl","rúmenska":"ro","rússneska":"ru","serbneska":"sr","skosk-gelíska":"gd","slóvakíska":"sk","slóvenska":"sl","spænska":"es","súlú":"zu","sænska":"sv","taílenska":"th","tékkneska":"cs","tyrkneska":"tr","ungverska":"hu","úkraínska":"uk","úsbekíska":"uz","velska":"cy","víetnamska":"vi","þýska":"de","ադրբեջաներեն":"az","ալբաներեն":"sq","ամհարերեն":"am","անգլերեն":"en","արաբերեն":"ar","բասկերեն":"eu","բելառուսերեն":"be","բիրմաներեն":"my","բուլղարերեն":"bg","գալիսերեն":"gl","գերմաներեն":"de","դանիերեն":"da","եբրայերեն":"he","զուլուսերեն":"zu","էսպերանտո":"eo","էստոներեն":"et","թայերեն":"th","թուրքերեն":"tr","ինդոնեզերեն":"id","իռլանդերեն":"ga","իսլանդերեն":"is","իսպաներեն":"es","իտալերեն":"it","լատիներեն":"la","լատվիերեն":"lv","լեհերեն":"pl","լիտվերեն":"lt","խորվաթերեն":"hr","կաննադա":"kn","կատալաներեն":"ca","կելտական շոտլանդերեն":"gd","կորեերեն":"ko","կրեոլերեն (հայիթի)":"ht","հայերեն":"hy","հինդի":"hi","հոլանդերեն":"nl","հունարեն":"el","հունգարերեն":"hu","ճապոներեն":"ja","մալայալամ":"ml","մալայերեն":"ms","մալթերեն":"mt","մակեդոներեն":"mk","մաորի":"mi","մարաթի":"mr","մոնղոլերեն":"mn","նորվեգերեն":"nb","շվեդերեն":"sv","ուզբեկերեն":"uz","ուկրաիներեն":"uk","չեխերեն":"cs","չինարեն (ավանդական)":"zh-tw","չինարեն (պարզեցված)":"zh-cn","պարսկերեն":"fa","պորտուգալերեն":"pt","ռումիներեն":"ro","ռուսերեն":"ru","սերբերեն":"sr","սլովակերեն":"sk","սլովեներեն":"sl","վալերեն":"cy","վիետնամերեն":"vi","տելուգու":"te","քրդերեն (քուրմանջի)":"ku","ֆիններեն":"fi","ֆրանսերեն":"fr","arabia":"ar","baski":"eu","burma":"my","englanti":"en","espanja":"es","haitinkreoli":"ht","heprea":"he","hollanti":"nl","iiri":"ga","islanti":"is","italia":"it","japani":"ja","katalaani":"ca","kiina (perinteinen)":"zh-tw","kiina (yksinkert.)":"zh-cn","kreikka":"el","kroatia":"hr","kurdi":"ku","kymri":"cy","liettua":"lt","makedonia":"mk","malaiji":"ms","norja":"nb","persia":"fa","portugali":"pt","puola":"pl","ranska":"fr","ruotsi":"sv","saksa":"de","skottigaeli":"gd","slovakia":"sk","suomi":"fi","tanska":"da","tsekki":"cs","turkki":"tr","ukraina":"uk","unkari":"hu","uzbekki":"uz","valkovenäjä":"be","venäjä":"ru","viro":"et","albaniera":"sq","alemana":"de","amharera":"am","arabiera":"ar","armeniera":"hy","azerbaijanera":"az","bielorrusiera":"be","birmaniera":"my","bulgariera":"bg","daniera":"da","errumaniera":"ro","errusiera":"ru","eskoziako gaelera":"gd","eslovakiera":"sk","esloveniera":"sl","esperantoa":"eo","estoniera":"et","euskara":"eu","frantsesa":"fr","gaelera":"cy","galiziera":"gl","gaztelania":"es","greziera":"el","hebreera":"he","hindia":"hi","hungariera":"hu","indonesiera":"id","ingelesa":"en","irlandera":"ga","islandiera":"is","italiera":"it","japoniera":"ja","katalana":"ca","koreera":"ko","kreolera (haiti)":"ht","kroaziera":"hr","kurduera":"ku","letoniera":"lv","lituaniera":"lt","malabarera":"ml","malaysiera":"ms","maltera":"mt","maoriera":"mi","marathera":"mr","mazedoniera":"mk","mongoliera":"mn","nederlandera":"nl","norvegiera":"nb","persiera":"fa","poloniera":"pl","portugesa":"pt","serbiera":"sr","suediera":"sv","suomiera":"fi","telugua":"te","thaiera":"th","turkiera":"tr","txekiera":"cs","txinera (soildua)":"zh-cn","txinera (tradizionala)":"zh-tw","ukrainera":"uk","uzbekera":"uz","vietnamera":"vi","zuluera":"zu","albanès":"sq","alemany":"de","amhàric":"am","anglès":"en","àrab":"ar","armeni":"hy","àzeri":"az","basc":"eu","bielorús":"be","birmà":"my","búlgar":"bg","castellà":"es","català":"ca","coreà":"ko","crioll d\'haití":"ht","croat":"hr","danès":"da","eslovac":"sk","eslovè":"sl","estonià":"et","finès":"fi","francès":"fr","gaèlic escocès":"gd","gallec":"gl","gal·lès":"cy","hebreu":"he","hongarès":"hu","indonesi":"id","irlandès":"ga","islandès":"is","italià":"it","japonès":"ja","letó":"lv","lituà":"lt","llatí":"la","macedònic":"mk","malai":"ms","malaiàlam":"ml","maltès":"mt","neerlandès":"nl","noruec":"nb","polonès":"pl","portuguès":"pt","romanès":"ro","serbi":"sr","suec":"sv","txec":"cs","ucraïnès":"uk","xinès (simplificat)":"zh-cn","xinès (tradicional)":"zh-tw","albāņu":"sq","amharu":"am","angļu":"en","arābu":"ar","armēņu":"hy","azerbaidžāņu":"az","baltkrievu":"be","basku":"eu","birmiešu":"my","bulgāru":"bg","čehu":"cs","dāņu":"da","ebreju (ivrits)":"he","franču":"fr","galisiešu":"gl","grieķu":"el","holandiešu":"nl","horvātu":"hr","igauņu":"et","indonēziešu":"id","īru":"ga","īslandiešu":"is","itāļu":"it","japāņu":"ja","katalāņu":"ca","korejiešu":"ko","kreolu (haiti)":"ht","krievu":"ru","kurdu":"ku","ķīniešu (tradicionālā)":"zh-tw","ķīniešu (vienkāršotā)":"zh-cn","latīņu":"la","latviešu":"lv","lietuviešu":"lt","maķedoniešu":"mk","malajalamiešu":"ml","malajiešu":"ms","maltiešu":"mt","maratu":"mr","mongoļu":"mn","norvēģu":"nb","persiešu":"fa","poļu":"pl","portugāļu":"pt","rumāņu":"ro","serbu":"sr","skotu gēlu":"gd","slovāku":"sk","slovēņu":"sl","somu":"fi","spāņu":"es","taju":"th","turku":"tr","ukraiņu":"uk","ungāru":"hu","uzbeku":"uz","vācu":"de","velsiešu":"cy","vjetnamiešu":"vi","zviedru":"sv","belarussia":"be","cek":"cs","china (aks. sederhana)":"zh-cn","china (aks. tradisional)":"zh-tw","finlandia":"fi","gaelig":"ga","gaelik skotlandia":"gd","galisia":"gl","inggris":"en","islan":"is","jepang":"ja","katala":"ca","lituania":"lt","polandia":"pl","prancis":"fr","rumania":"ro","swensk":"sv","yunani":"el","అజర్‌బైజాని":"az","అర్మేనియన్":"hy","అల్బేనియన్":"sq","ఆంగ్లము":"en","ఆమ్హారిక్":"am","ఆరబిక్":"ar","ఇండొనేసియన్":"id","ఇటాలియన్":"it","ఉజ్బెక్":"uz","ఎస్పెరాంటో":"eo","ఏస్టోనియన్":"et","ఐరిష్":"ga","ఐస్ లాండిక్":"is","కన్నడ":"kn","కర్డిష్":"ku","కొరియన్":"ko","క్యాటలాన్":"ca","క్రొయేషియన్":"hr","గాలిసియన్":"gl","గ్రీక్":"el","చెక్":"cs","చైనీస్ (సరళమైన)":"zh-cn","చైనీస్ (సామ్ప్రదాయమైన)":"zh-tw","జపనీస్":"ja","జర్మన్":"de","జులు":"zu","టర్కిష్":"tr","డచ్":"nl","డానిష్":"da","తెలుగు":"te","థాయ్":"th","నార్విజియన్":"nb","పర్షియన్":"fa","పోర్చుగీస్":"pt","పోలిష్":"pl","ఫిన్నిష్":"fi","ఫ్రెంచ్":"fr","బర్మీస్":"my","బల్గేరియన్":"bg","బాస్క్":"eu","బెలారుషియన్":"be","మంగోలియన్":"mn","మయోరి":"mi","మరాఠీ":"mr","మలయాళం":"ml","మాలై":"ms","మాల్టీస్":"mt","మాసిడోనియన్":"mk","యుక్రేనియన్":"uk","రష్యన్":"ru","రొమేనియన్":"ro","లాటిన్":"la","లాట్వియన్":"lv","లిథువేనియన్":"lt","వియత్నామీస్":"vi","వెల్ష్":"cy","సెర్బియన్":"sr","స్కాట్స్ గేలిక్":"gd","స్పానిష్":"es","స్లోవక్":"sk","స్లోవేనియన్":"sl","స్వీడిష్":"sv","హంగేరియన్":"hu","హిందీ":"hi","హీబ్రూ":"he","హైయేటియన్ క్రియోల్":"ht","amhárico":"am","azerí":"az","chino (simplificado)":"zh-cn","chino (tradicional)":"zh-tw","criollo haitiano":"ht","danés":"da","estonio":"et","euskera":"eu","finlandés":"fi","gallego":"gl","griego":"el","japonés":"ja","kurdo":"ku","malayo":"ms","noruego":"nb","rumano":"ro","uzbeco":"uz","albaania":"sq","amhaari":"am","araabia":"ar","armeenia":"hy","aserbaidžaani":"az","birma":"my","bulgaaria":"bg","eesti":"et","galeegi":"gl","haitikreooli":"ht","heebrea":"he","hispaania":"es","hollandi":"nl","horvaadi":"hr","indoneesia":"id","inglise":"en","islandi":"is","itaalia":"it","jaapani":"ja","kreeka":"el","ladina":"la","leedu":"lt","lihtsustatud hiina":"zh-cn","läti":"lv","makedoonia":"mk","malajalaami":"ml","maoori":"mi","mongoli":"mn","norra":"nb","poola":"pl","prantsuse":"fr","pärsia":"fa","rootsi":"sv","rumeenia":"ro","slovaki":"sk","sloveeni":"sl","soome":"fi","suulu":"zu","šoti":"gd","taani":"da","traditsiooniline hiina":"zh-tw","tšehhi":"cs","türgi":"tr","uelsi":"cy","ungari":"hu","usbeki":"uz","valgevene":"be","vene":"ru","albanyen":"sq","amenyen":"hy","anglè":"en","azèbajani":"az","belarisyen":"be","bilgaryen":"bg","chinwa (senp)":"zh-cn","chinwa (tradisyonèl)":"zh-tw","danwa":"da","ebre":"he","endonezyen":"id","endou":"hi","estonyen":"et","fenlandè":"fi","franse":"fr","gaelik ekosè":"gd","galisyen":"gl","grèk":"el","ikrenyen":"uk","ilandè":"ga","islandè":"is","italyen":"it","izbèk":"uz","japonè":"ja","koreyen":"ko","kreyòl ayisyen":"ht","kurde (kurmandji)":"ku","kwoasyen":"hr","laten":"la","letonyen":"lv","lityanyen":"lt","malè":"ms","malt":"mt","masedonyen":"mk","mongolyen":"mn","myanma (burmese)":"my","nòvejyen":"nb","olandè, neyèlandè":"nl","onngaryen":"hu","panyòl":"es","pèsyen":"fa","polonè":"pl","pòtigè":"pt","ris":"ru","romanyen":"ro","sèb":"sr","slovenyen":"sl","syedwa":"sv","tuk":"tr","tyèk":"cs","vyetnamyen":"vi","albaneg":"sq","almaeneg":"de","arabeg":"ar","armeneg":"hy","aserbaijaneg":"az","basgeg":"eu","belarwseg":"be","bwlgaraidd":"bg","catalaneg":"ca","creol haiti":"ht","croateg":"hr","cymraeg":"cy","cyrdeg (kurmandji)":"ku","daneg":"da","eidaleg":"it","estoneg":"et","fietnameg":"vi","ffineg":"fi","fflemeg":"nl","ffrangeg":"fr","gaeleg yr alban":"gd","galisaidd":"gl","groeg":"el","gwyddeleg":"ga","hebraeg":"he","hwngareg":"hu","iaith corea":"ko","indonesieg":"id","islandeg":"is","iwcraineg":"uk","japaneg":"ja","latfieg":"lv","lithwaneg":"lt","lladin":"la","macedoneg":"mk","malteseg":"mt","mongoleg":"mn","myanmar (byrma)":"my","norwyeg":"nb","perseg":"fa","portiwgaleg":"pt","pwyleg":"pl","rwmaneg":"ro","rwsieg":"ru","saesneg":"en","sbaeneg":"es","serbeg":"sr","slofac":"sk","slofenia":"sl","swedeg":"sv","swlw":"zu","tsieceg":"cs","tsieineeg (traddodiadol)":"zh-tw","tsieineeg (wedi symleiddio)":"zh-cn","twrceg":"tr","usbec":"uz","अंग्रेज़ी":"en","अज़रबैजानी":"az","अल्बेनियन":"sq","आइसलैंडिक":"is","आर्मेनियन":"hy","इटैलियन":"it","उज़्बेक":"uz","एस्तोनियन":"et","एस्पेरांटो":"eo","ऐम्हेरिक":"am","कन्नड़":"kn","कुर्दिश (करमंजी)":"ku","कैटेलन":"ca","गैलिशियन":"gl","चीनी (परंपरागत)":"zh-tw","चेक":"cs","जापानी":"ja","ज़ुलु":"zu","डैनिश":"da","तुर्क":"tr","तेलुगु":"te","पुर्तगाली":"pt","फ़िनिश":"fi","फ़्रेंच":"fr","बर्मी":"my","बुल्गारियन":"bg","बेलारूसीयन":"be","बैस्क":"eu","मलयालम":"ml","माऔरी":"mi","माल्टी":"mt","मेसीडोनियन":"mk","यूक्रेनियन":"uk","रूसी":"ru","रोमेनियन":"ro","लातवियन":"lv","लैटिन":"la","वियतनामी":"vi","सर्बियाई":"sr","स्पैनिश":"es","स्लोवाक":"sk","स्लोवेनियन":"sl","हंगरियन":"hu","हीब्रू":"he","हैतियन क्रिओल":"ht","阿尔巴尼亚语":"sq","阿拉伯语":"ar","阿姆哈拉语":"am","阿塞拜疆语":"az","爱尔兰语":"ga","爱沙尼亚语":"et","巴斯克语":"eu","白俄罗斯语":"be","保加利亚语":"bg","冰岛语":"is","波兰语":"pl","波斯语":"fa","丹麦语":"da","德语":"de","俄语":"ru","法语":"fr","芬兰语":"fi","海地克里奥尔语":"ht","韩语":"ko","荷兰语":"nl","加利西亚语":"gl","加泰罗尼亚语":"ca","捷克语":"cs","卡纳达语":"kn","克罗地亚语":"hr","库尔德语":"ku","拉丁语":"la","拉脱维亚语":"lv","立陶宛语":"lt","罗马尼亚语":"ro","马耳他语":"mt","马拉地语":"mr","马拉雅拉姆语":"ml","马来语":"ms","马其顿语":"mk","毛利语":"mi","蒙古语":"mn","缅甸语":"my","南非祖鲁语":"zu","挪威语":"nb","葡萄牙语":"pt","日语":"ja","瑞典语":"sv","塞尔维亚语":"sr","世界语":"eo","斯洛伐克语":"sk","斯洛文尼亚语":"sl","苏格兰盖尔语":"gd","泰卢固语":"te","泰语":"th","土耳其语":"tr","威尔士语":"cy","乌克兰语":"uk","乌兹别克语":"uz","西班牙语":"es","希伯来语":"he","希腊语":"el","匈牙利语":"hu","亚美尼亚语":"hy","意大利语":"it","印地语":"hi","印尼语":"id","英语":"en","越南语":"vi","中文(繁体)":"zh-tw","中文(简体)":"zh-cn","азербайджански":"az","английски":"en","арабски":"ar","арменски":"hy","баски":"eu","беларуски":"be","бирмански":"my","български":"bg","галисийски":"gl","гръцки":"el","датски":"da","индонезийски":"id","ирландски":"ga","испански":"es","италиански":"it","китайски (опростен)":"zh-cn","китайски (традиционен)":"zh-tw","корейски":"ko","кюрдски":"ku","латвийски":"lv","литовски":"lt","малайски":"ms","малтийски":"mt","немски":"de","нидерландски":"nl","норвежки":"nb","персийски":"fa","румънски":"ro","словашки":"sk","словенски":"sl","сръбски":"sr","тайландски":"th","уелски":"cy","узбекски":"uz","финландски":"fi","френски":"fr","хаитянски креолски":"ht","хърватски":"hr","шотландски келтски":"gd","японски":"ja","الآيسلندية":"is","الأذرية":"az","الارمنية":"hy","الإسبانية":"es","الاسبرانتو":"eo","الإستونية":"et","الاسكتلندية الغالية":"gd","الألبانية":"sq","الألمانية":"de","الأمهرية":"am","الإنجليزية":"en","الإندونيسية":"id","الأوزبكية":"uz","الأوكرانية":"uk","الأيرلندية":"ga","الإيطالية":"it","الباسكية":"eu","البرتغالية":"pt","البلغارية":"bg","البورمية":"my","البولندية":"pl","البيلاروسية":"be","التايلاندية":"th","التركية":"tr","التشيكية":"cs","التيلوجو":"te","الجاليكية":"gl","الدانماركية":"da","الروسية":"ru","الرومانية":"ro","الزولوية":"zu","السلوفاكية":"sk","السلوفينية":"sl","السويدية":"sv","الصربية":"sr","الصينية (التقليدية)":"zh-tw","الصينية (المبسطة)":"zh-cn","العبرية":"he","العربية":"ar","الفارسية":"fa","الفرنسية":"fr","الفنلندية":"fi","الفيتنامية":"vi","القطلونية":"ca","الكانادا":"kn","الكردية":"ku","الكرواتية":"hr","الكورية":"ko","اللاتفية":"lv","اللاتينية":"la","اللغة الكريولية الهايتية":"ht","الليتوانية":"lt","المالايالامية":"ml","المالطيّة":"mt","الماورية":"mi","المقدونية":"mk","الملايو":"ms","المنغولية":"mn","المهراتية":"mr","النرويجية":"nb","الهندية":"hi","الهنغارية":"hu","الهولندية":"nl","الويلزية":"cy","اليابانية":"ja","اليونانية":"el","баскијски":"eu","вијетнамски":"vi","галски":"gl","енглески":"en","индонежански":"id","јапански":"ja","јерменски":"hy","кинески (поједностављени)":"zh-cn","кинески (традиционални)":"zh-tw","креолски (хаити)":"ht","летонски":"lv","мађарски":"hu","марати":"mr","немачки":"de","персијски":"fa","пољски":"pl","румунски":"ro","словеначки":"sl","тајски":"th","украјински":"uk","азербайжан":"az","албани":"sq","амхарик":"am","англи":"en","араб":"ar","армени":"hy","баск":"eu","беларусь":"be","бирм":"my","болгар":"bg","вьетнам":"vi","гаити креол":"ht","галик":"gl","гаэл":"gd","герман":"de","голланд":"nl","грек":"el","дани":"da","индонези":"id","ирланд":"ga","исланд":"is","испани":"es","итали":"it","каталан":"ca","кипр":"he","курд":"ku","латви":"lv","латин":"la","литва":"lt","македон":"mk","малай":"ms","малайлам":"ml","малти":"mt","монгол":"mn","норвеги":"nb","орос":"ru","перс":"fa","польш":"pl","португаль":"pt","румын":"ro","серби":"sr","словак":"sk","словени":"sl","солонгос":"ko","тай":"th","турк":"tr","тэлүгү":"te","узбек":"uz","украин":"uk","унгар":"hu","уэльс":"cy","финлянд":"fi","франц":"fr","хорват":"hr","хятад (ердийн)":"zh-cn","хятад (уламжлалт)":"zh-tw","чех":"cs","швед":"sv","эстони":"et","япон":"ja","amhariska":"am","arabiska":"ar","armeniska":"hy","azerbajdzjanska":"az","baskiska":"eu","bulgariska":"bg","burmesiska":"my","engelska":"en","estniska":"et","finska":"fi","gaeliska":"gd","galiciska":"gl","grekiska":"el","haitiska":"ht","hebreiska":"he","indonesiska":"id","irländska":"ga","isländska":"is","italienska":"it","kanaresiska":"kn","katalanska":"ca","kinesiska (förenklad)":"zh-cn","kinesiska (traditionell)":"zh-tw","koreanska":"ko","kroatiska":"hr","kurdiska":"ku","lettiska":"lv","litauiska":"lt","makedonska":"mk","malaysiska":"ms","maltesiska":"mt","mongoliska":"mn","nederländska":"nl","persiska":"fa","polska":"pl","portugisiska":"pt","rumänska":"ro","ryska":"ru","serbiska":"sr","slovakiska":"sk","slovenska":"sl","spanska":"es","svenska":"sv","thailändska":"th","tjeckiska":"cs","turkiska":"tr","tyska":"de","ukrainska":"uk","ungerska":"hu","uzbekiska":"uz","vietnamesiska":"vi","vitryska":"be","walesiska":"cy","albaneză":"sq","amharică":"am","arabă":"ar","armeană":"hy","azerbaidjană":"az","bască":"eu","bielorusă":"be","birmană":"my","bulgară":"bg","catalană":"ca","cehă":"cs","chineză (simplificată)":"zh-cn","chineză (tradițională)":"zh-tw","coreeană":"ko","creolă haitiană":"ht","croată":"hr","daneză":"da","ebraică":"he","engleză":"en","estonă":"et","finlandeză":"fi","franceză":"fr","galeză":"cy","galica scoțiană":"gd","galiciană":"gl","germană":"de","greacă":"el","indoneziană":"id","irlandeză":"ga","islandeză":"is","italiană":"it","japoneză":"ja","kurdă":"ku","latină":"la","letonă":"lv","lituaniană":"lt","macedoneană":"mk","maghiară":"hu","malaeză":"ms","malteză":"mt","mongolă":"mn","neerlandeză":"nl","norvegiană":"nb","persană":"fa","poloneză":"pl","portugheză":"pt","română":"ro","rusă":"ru","sârbă":"sr","slovacă":"sk","slovenă":"sl","spaniolă":"es","suedeză":"sv","thailandeză":"th","turcă":"tr","ucraineană":"uk","uzbecă":"uz","vietnameză":"vi","airių":"ga","albanų":"sq","amharų":"am","anglų":"en","arabų":"ar","armėnų":"hy","azerbaidžaniečių":"az","baltarusių":"be","baskų":"eu","birmiečių":"my","bulgarų":"bg","čekų":"cs","danų":"da","estų":"et","galisų":"gl","graikų":"el","haičio kreolų":"ht","hebrajų":"he","indoneziečių":"id","islandų":"is","ispanų":"es","italų":"it","japonų":"ja","kanadų":"kn","kataloniečių":"ca","kinų (supaprastinta)":"zh-cn","kinų (tradicinė)":"zh-tw","korėjiečių":"ko","kroatų":"hr","kurdų":"ku","latvių":"lv","lenkų":"pl","lietuvių":"lt","lotynų":"la","makedoniečių":"mk","malajalių":"ml","malajiečių":"ms","maltiečių":"mt","maorių":"mi","maratų":"mr","mongolų":"mn","norvegų":"nb","olandų":"nl","persų":"fa","portugalų":"pt","prancūzų":"fr","rumunų":"ro","rusų":"ru","serbų":"sr","slovakų":"sk","slovėnų":"sl","suomių":"fi","škotų (gėlų)":"gd","švedų":"sv","tajų":"th","telugų":"te","turkų":"tr","ukrainiečių":"uk","uzbekų":"uz","valų":"cy","vengrų":"hu","vietnamiečių":"vi","vokiečių":"de","zulusų":"zu","갈리시아어":"gl","그리스어":"el","네덜란드어":"nl","노르웨이어":"nb","덴마크어":"da","독일어":"de","라트비아어":"lv","라틴어":"la","러시아어":"ru","루마니아어":"ro","리투아니아어":"lt","마라티어":"mr","마오리어":"mi","마케도니아어":"mk","말라얄람어":"ml","말레이어":"ms","몰타어":"mt","몽골어":"mn","미얀마어 (버마어)":"my","바스크어":"eu","베트남어":"vi","벨라루스어":"be","불가리아어":"bg","세르비아어":"sr","스웨덴어":"sv","스코틀랜드 게일어":"gd","스페인어":"es","슬로바키아어":"sk","슬로베니아어":"sl","아랍어":"ar","아르메니아어":"hy","아이슬란드어":"is","아이티 크리올어":"ht","아일랜드어":"ga","아제르바이잔어":"az","알바니아어":"sq","암하라어":"am","에스토니아어":"et","에스페란토어":"eo","영어":"en","우즈베크어":"uz","우크라이나어":"uk","웨일즈어":"cy","이탈리아어":"it","인도네시아어":"id","일본어":"ja","줄루어":"zu","중국어(간체)":"zh-cn","중국어(번체)":"zh-tw","체코어":"cs","카탈로니아어":"ca","칸나다어":"kn","쿠르드어":"ku","크로아티아어":"hr","태국어":"th","터키어":"tr","텔루구어":"te","페르시아어":"fa","포르투갈어":"pt","폴란드어":"pl","프랑스어":"fr","핀란드어":"fi","한국어":"ko","헝가리어":"hu","히브리어":"he","힌디어":"hi","albanese":"sq","amarico":"am","arabo":"ar","armeno":"hy","azero":"az","bielorusso":"be","bulgaro":"bg","catalano":"ca","ceco":"cs","cinese (semplificato)":"zh-cn","cinese (tradizionale)":"zh-tw","creolo haitiano":"ht","croato":"hr","curdo (kurmanji)":"ku","danese":"da","ebraico":"he","estone":"et","finlandese":"fi","francese":"fr","gaelico scozzese":"gd","galiziano":"gl","gallese":"cy","giapponese":"ja","greco":"el","indonesiano":"id","inglese":"en","irlandese":"ga","islandese":"is","latino":"la","lettone":"lv","macedone":"mk","malese":"ms","mongolo":"mn","norvegese":"nb","olandese":"nl","persiano":"fa","polacco":"pl","portoghese":"pt","rumeno":"ro","serbo":"sr","slovacco":"sk","sloveno":"sl","spagnolo":"es","svedese":"sv","tailandese":"th","tedesco":"de","ucraino":"uk","ungherese":"hu","quốc tế ngữ":"eo","tiếng ả rập":"ar","tiếng albania":"sq","tiếng amharic":"am","tiếng anh":"en","tiếng armenia":"hy","tiếng azerbaijan":"az","tiếng ba lan":"pl","tiếng ba tư":"fa","tiếng basque":"eu","tiếng belarus":"be","tiếng bồ đào nha":"pt","tiếng bulgaria":"bg","tiếng catalan":"ca","tiếng creole ở haiti":"ht","tiếng croatia":"hr","tiếng do thái":"he","tiếng đan mạch":"da","tiếng đức":"de","tiếng estonia":"et","tiếng gael scotland":"gd","tiếng galicia":"gl","tiếng hà lan":"nl","tiếng hàn":"ko","tiếng hindi":"hi","tiếng hungary":"hu","tiếng hy lạp":"el","tiếng iceland":"is","tiếng indonesia":"id","tiếng ireland":"ga","tiếng kannada":"kn","tiếng kurd":"ku","tiếng latinh":"la","tiếng latvia":"lv","tiếng litva":"lt","tiếng mã lai":"ms","tiếng macedonia":"mk","tiếng malayalam":"ml","tiếng malta":"mt","tiếng maori":"mi","tiếng marathi":"mr","tiếng mông cổ":"mn","tiếng myanmar":"my","tiếng na uy":"nb","tiếng nga":"ru","tiếng nhật":"ja","tiếng pháp":"fr","tiếng phần lan":"fi","tiếng rumani":"ro","tiếng séc":"cs","tiếng serbia":"sr","tiếng slovak":"sk","tiếng slovenia":"sl","tiếng tây ban nha":"es","tiếng telugu":"te","tiếng thái":"th","tiếng thổ nhĩ kỳ":"tr","tiếng thụy điển":"sv","tiếng trung (giản thể)":"zh-cn","tiếng trung (phồn thể)":"zh-tw","tiếng ukraina":"uk","tiếng uzbek":"uz","tiếng việt":"vi","tiếng xứ wales":"cy","tiếng ý":"it","tiếng zulu":"zu","にほんご":"ja"},"scratchToGoogleMap":{"zh-cn":"zh","nb":"no","he":"iw","es-419":"es","pt-br":"pt","ja-hira":"ja"},"previouslySupported":["ab","ms","be","eo","hy","hi","kn","ht","ku","la","mk","ml","mt","mr","mn","my","nn","sq","te","uz"]}')},function(A,B){A.exports=(A,B,t)=>{let e=null;const g=window.AbortController?new window.AbortController:null,i=g?g.signal:null;return Promise.race([fetch(A,Object.assign({signal:i},B)).then(A=>(clearTimeout(e),A)),new Promise((A,B)=>{e=setTimeout(()=>{g&&g.abort(),B(new Error("Fetch timed out after ".concat(t," ms")))},t)})])}},function(A,B,t){function e(A,B){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(A);B&&(e=e.filter((function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable}))),t.push.apply(t,e)}return t}function g(A,B,t){return B in A?Object.defineProperty(A,B,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[B]=t,A}const i=t(20),{OrderedMap:Q}=t(24),s=t(64),n=t(3),r=t(16),c=t(68),E=t(2),o=t(204),w=t(205),C=t(72),a=t(213),I=t(37),Y=t(28),h=t(0),M=t(56),F=t(14),D=t(9),u=t(27),l=t(214),d=t(215),U=t(216),N=t(217),m=t(218),G=t(219),f=t(220),H=t(73),R=t(7),p=t(6),y={scratch3_control:t(221),scratch3_event:t(222),scratch3_looks:t(223),scratch3_motion:t(224),scratch3_operators:t(225),scratch3_sound:t(226),scratch3_sensing:t(227),scratch3_data:t(228),scratch3_procedures:t(229)},J=t(230),k=t(231),T=["#0FBD8C","#0DA57A","#0B8E69"],j=(()=>{const A={};return A[n.ANGLE]={shadow:{type:"math_angle",fieldName:"NUM"}},A[n.COLOR]={shadow:{type:"colour_picker",fieldName:"COLOUR"}},A[n.NUMBER]={shadow:{type:"math_number",fieldName:"NUM"}},A[n.STRING]={shadow:{type:"text",fieldName:"TEXT"}},A[n.BOOLEAN]={check:"Boolean"},A[n.MATRIX]={shadow:{type:"matrix",fieldName:"MATRIX"}},A[n.NOTE]={shadow:{type:"note",fieldName:"NOTE"}},A[n.IMAGE]={fieldType:"field_image"},A[n.COSTUME]={shadow:{type:"looks_costume",fieldName:"COSTUME"}},A[n.SOUND]={shadow:{type:"sound_sounds_menu",fieldName:"SOUND_MENU"}},A})(),x=A=>{let B=0;return{canAddCloudVariable:()=>B{B++},removeCloudVariable:()=>{B--},hasCloudVariables:()=>B>0,getNumberOfCloudVariables:()=>B}};let S=-1,b=-1,z=-1;class L extends i{constructor(){super(),this.targets=[],this.executableTargets=[],this.threads=[],this.threadMap=new Map,this.sequencer=new w(this),this.flyoutBlocks=new r(this,!0),this.monitorBlocks=new r(this,!0),this._editingTarget=null,this._primitives={},this._blockInfo=[],this._hats={},this._scriptGlowsPreviousFrame=[],this._nonMonitorThreadCount=0,this._lastStepDoneThreads=null,this._cloneCounter=0,this._refreshTargets=!1,this.monitorBlockInfo={},this._monitorState=Q({}),this._prevMonitorState=Q({}),this.turboMode=!1,this.frameLoop=new k(this),this.currentStepTime=1e3/30,this.updateCurrentMSecs(),this.redrawRequested=!1,this._registerBlockPackages(),this.ioDevices={clock:new d(this),cloud:new U(this),keyboard:new N(this),mouse:new m(this),mouseWheel:new G(this),userData:new f,video:new H(this)},this.peripheralExtensions={},this.profiler=null,this.cloudOptions={limit:10};const A=x(this.cloudOptions);this.hasCloudData=A.hasCloudVariables,this.canAddCloudVariable=A.canAddCloudVariable,this.getNumberOfCloudVariables=A.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(A),this.removeCloudVariable=this._initializeRemoveCloudVariable(A),this.origin=null,this._stageTarget=null,this.addonBlocks={},this.stageWidth=L.STAGE_WIDTH,this.stageHeight=L.STAGE_HEIGHT,this.runtimeOptions={maxClones:L.MAX_CLONES,miscLimits:!0,fencing:!0},this.compilerOptions={enabled:!0,warpTimer:!1},this.debug=!1,this._lastStepTime=Date.now(),this.interpolationEnabled=!1,this._defaultStoredSettings=this._generateAllProjectOptions(),this.isPackaged=!1,this.externalCommunicationMethods={cloudVariables:!1,customExtensions:!1},this.on(L.HAS_CLOUD_DATA_UPDATE,A=>{this.setExternalCommunicationMethod("cloudVariables",A)}),this.enforcePrivacy=!0}static get STAGE_WIDTH(){return 480}static get STAGE_HEIGHT(){return 360}static get SCRIPT_GLOW_ON(){return"SCRIPT_GLOW_ON"}static get SCRIPT_GLOW_OFF(){return"SCRIPT_GLOW_OFF"}static get BLOCK_GLOW_ON(){return"BLOCK_GLOW_ON"}static get BLOCK_GLOW_OFF(){return"BLOCK_GLOW_OFF"}static get HAS_CLOUD_DATA_UPDATE(){return"HAS_CLOUD_DATA_UPDATE"}static get TURBO_MODE_ON(){return"TURBO_MODE_ON"}static get TURBO_MODE_OFF(){return"TURBO_MODE_OFF"}static get RUNTIME_OPTIONS_CHANGED(){return"RUNTIME_OPTIONS_CHANGED"}static get COMPILER_OPTIONS_CHANGED(){return"COMPILER_OPTIONS_CHANGED"}static get FRAMERATE_CHANGED(){return"FRAMERATE_CHANGED"}static get INTERPOLATION_CHANGED(){return"INTERPOLATION_CHANGED"}static get STAGE_SIZE_CHANGED(){return"STAGE_SIZE_CHANGED"}static get COMPILE_ERROR(){return"COMPILE_ERROR"}static get PROJECT_START(){return"PROJECT_START"}static get PROJECT_RUN_START(){return"PROJECT_RUN_START"}static get PROJECT_RUN_STOP(){return"PROJECT_RUN_STOP"}static get PROJECT_STOP_ALL(){return"PROJECT_STOP_ALL"}static get STOP_FOR_TARGET(){return"STOP_FOR_TARGET"}static get VISUAL_REPORT(){return"VISUAL_REPORT"}static get PROJECT_LOADED(){return"PROJECT_LOADED"}static get PROJECT_CHANGED(){return"PROJECT_CHANGED"}static get TOOLBOX_EXTENSIONS_NEED_UPDATE(){return"TOOLBOX_EXTENSIONS_NEED_UPDATE"}static get TARGETS_UPDATE(){return"TARGETS_UPDATE"}static get MONITORS_UPDATE(){return"MONITORS_UPDATE"}static get BLOCK_DRAG_UPDATE(){return"BLOCK_DRAG_UPDATE"}static get BLOCK_DRAG_END(){return"BLOCK_DRAG_END"}static get EXTENSION_ADDED(){return"EXTENSION_ADDED"}static get EXTENSION_FIELD_ADDED(){return"EXTENSION_FIELD_ADDED"}static get PERIPHERAL_LIST_UPDATE(){return"PERIPHERAL_LIST_UPDATE"}static get USER_PICKED_PERIPHERAL(){return"USER_PICKED_PERIPHERAL"}static get PERIPHERAL_CONNECTED(){return"PERIPHERAL_CONNECTED"}static get PERIPHERAL_DISCONNECTED(){return"PERIPHERAL_DISCONNECTED"}static get PERIPHERAL_REQUEST_ERROR(){return"PERIPHERAL_REQUEST_ERROR"}static get PERIPHERAL_CONNECTION_LOST_ERROR(){return"PERIPHERAL_CONNECTION_LOST_ERROR"}static get PERIPHERAL_SCAN_TIMEOUT(){return"PERIPHERAL_SCAN_TIMEOUT"}static get MIC_LISTENING(){return"MIC_LISTENING"}static get BLOCKSINFO_UPDATE(){return"BLOCKSINFO_UPDATE"}static get RUNTIME_STARTED(){return"RUNTIME_STARTED"}static get RUNTIME_STOPPED(){return"RUNTIME_STOPPED"}static get RUNTIME_DISPOSED(){return"RUNTIME_DISPOSED"}static get BLOCKS_NEED_UPDATE(){return"BLOCKS_NEED_UPDATE"}static get THREAD_STEP_INTERVAL(){return 1e3/60}static get THREAD_STEP_INTERVAL_COMPATIBILITY(){return 1e3/30}static get MAX_CLONES(){return 300}_initializeAddCloudVariable(A){return()=>{const B=this.hasCloudData();A.addCloudVariable(),!B&&this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!0)}}_initializeRemoveCloudVariable(A){return()=>{const B=this.hasCloudData();A.removeCloudVariable(),B&&!this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!1)}}_registerBlockPackages(){for(const A in y)if(y.hasOwnProperty(A)){const B=new y[A](this);if(B.getPrimitives){const A=B.getPrimitives();for(const t in A)A.hasOwnProperty(t)&&(this._primitives[t]=A[t].bind(B))}if(B.getHats){const A=B.getHats();for(const B in A)A.hasOwnProperty(B)&&(this._hats[B]=A[B])}B.getMonitored&&(this.monitorBlockInfo=Object.assign({},this.monitorBlockInfo,B.getMonitored())),this.compilerRegisterExtension(A,B)}}compilerRegisterExtension(A,B){this["ext_".concat(A)]=B}getMonitorState(){return this._monitorState}_makeExtensionMenuId(A,B){return"".concat(B,"_menu_").concat(A)}makeMessageContextForTarget(A){const B={};(A=A||this.getEditingTarget()||this.getTargetForStage())&&(B.targetType=A.isStage?I.STAGE:I.SPRITE)}_registerExtensionPrimitives(A){const B={id:A.id,name:M(A.name),showStatusButton:A.showStatusButton,blockIconURI:A.blockIconURI,menuIconURI:A.menuIconURI};A.color1?(B.color1=A.color1,B.color2=A.color2,B.color3=A.color3):(B.color1=T[0],B.color2=T[1],B.color3=T[2]),this._blockInfo.push(B),this._fillExtensionCategory(B,A);for(const t in B.customFieldTypes)if(A.customFieldTypes.hasOwnProperty(t)){const A=B.customFieldTypes[t];this.emit(L.EXTENSION_FIELD_ADDED,{name:"field_".concat(A.extendedName),implementation:A.fieldImplementation})}this.emit(L.EXTENSION_ADDED,B)}_refreshExtensionPrimitives(A){const B=this._blockInfo.find(B=>B.id===A.id);B&&(B.name=M(A.name),this._fillExtensionCategory(B,A),this.emit(L.BLOCKSINFO_UPDATE,B))}_fillExtensionCategory(A,B){A.blocks=[],A.customFieldTypes={},A.menus=[],A.menuInfo={};for(const t in B.menus)if(B.menus.hasOwnProperty(t)){const e=B.menus[t],g=this._buildMenuForScratchBlocks(t,e,A);A.menus.push(g),A.menuInfo[t]=e}for(const t in B.customFieldTypes)if(B.customFieldTypes.hasOwnProperty(t)){const e=B.customFieldTypes[t],g=this._buildCustomFieldInfo(t,e,B.id,A);A.customFieldTypes[t]=g}if(B.docsURI)try{const t=new URL(B.docsURI);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new Error("invalid protocol");const e={info:{},xml:"')};A.blocks.push(e)}catch(A){h.warn("cannot create docsURI button",A)}for(const t of B.blocks)try{const B=this._convertForScratchBlocks(t,A);if(A.blocks.push(B),B.json){const A=B.json.type;t.blockType!==E.EVENT&&(this._primitives[A]=B.info.func),t.blockType!==E.EVENT&&t.blockType!==E.HAT||(this._hats[A]={edgeActivated:t.isEdgeActivated,restartExistingThreads:t.shouldRestartExistingThreads})}}catch(A){h.error("Error parsing block: ",{block:t,error:A})}}_convertMenuItems(A){if("function"!=typeof A){const B=this.makeMessageContextForTarget();return A.map(A=>{const t=M(A,B);switch(typeof t){case"string":return[t,t];case"object":return[M(A.text,B),A.value];default:throw new Error("Can't interpret menu item: ".concat(JSON.stringify(A)))}})}return A}_buildMenuForScratchBlocks(A,B,t){const e=this._makeExtensionMenuId(A,t.id),g=this._convertMenuItems(B.items);return{json:{message0:"%1",type:e,inputsInline:!0,output:"String",colour:t.color1,colourSecondary:t.color2,colourTertiary:t.color3,outputShape:B.acceptReporters?a.OUTPUT_SHAPE_ROUND:a.OUTPUT_SHAPE_SQUARE,args0:[{type:"field_dropdown",name:A,options:g}]}}}_buildCustomFieldInfo(A,B,t,e){const g="".concat(t,"_").concat(A);return{fieldName:A,extendedName:g,argumentTypeInfo:{shadow:{type:g,fieldName:"field_".concat(g)}},scratchBlocksDefinition:this._buildCustomFieldTypeForScratchBlocks(g,B.output,B.outputShape,e),fieldImplementation:B.implementation}}_buildCustomFieldTypeForScratchBlocks(A,B,t,e){return{json:{type:A,message0:"%1",inputsInline:!0,output:B,colour:e.color1,colourSecondary:e.color2,colourTertiary:e.color3,outputShape:t,args0:[{name:"field_".concat(A),type:"field_".concat(A)}]}}}_convertForScratchBlocks(A,B){return"---"===A?this._convertSeparatorForScratchBlocks(A):A.blockType===E.BUTTON?this._convertButtonForScratchBlocks(A):this._convertBlockForScratchBlocks(A,B)}_convertBlockForScratchBlocks(A,B){const t="".concat(B.id,"_").concat(A.opcode),e={type:t,inputsInline:!0,category:B.name,colour:B.color1,colourSecondary:B.color2,colourTertiary:B.color3},g={argsMap:{},blockJSON:e,categoryInfo:B,blockInfo:A,inputList:[]},i=A.blockIconURI||B.blockIconURI;if(i){e.extensions=["scratch_extension"],e.message0="%1 %2";const A={type:"field_image",src:i,width:40,height:40},B={type:"field_vertical_separator"};e.args0=[A,B]}switch(A.blockType){case E.COMMAND:e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.previousStatement=null,A.isTerminal||(e.nextStatement=null);break;case E.REPORTER:e.output="String",e.outputShape=a.OUTPUT_SHAPE_ROUND;break;case E.BOOLEAN:e.output="Boolean",e.outputShape=a.OUTPUT_SHAPE_HEXAGONAL;break;case E.HAT:case E.EVENT:A.hasOwnProperty("isEdgeActivated")||(A.isEdgeActivated=!0),e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.nextStatement=null;break;case E.CONDITIONAL:case E.LOOP:A.branchCount=A.branchCount||1,e.outputShape=a.OUTPUT_SHAPE_SQUARE,e.previousStatement=null,A.isTerminal||(e.nextStatement=null)}const Q=Array.isArray(A.text)?A.text:[A.text];let s=0,n=0,r=0;const c=this._convertPlaceholders.bind(this,g),o=this.makeMessageContextForTarget();for(;s0?n+1:"")}],++n,++r)}A.blockType===E.REPORTER?A.disableMonitor||0!==g.inputList.length||(e.checkboxInFlyout=!0):A.blockType===E.LOOP&&(e["lastDummyAlign".concat(r)]="RIGHT",e["message".concat(r)]="%1",e["args".concat(r)]=[{type:"field_image",src:"./static/blocks-media/repeat.svg",width:24,height:24,alt:"*",flip_rtl:!0}],++r);const w=A.isDynamic?''):"",C=g.inputList.join(""),I='').concat(w).concat(C,"");return{info:g.blockInfo,json:g.blockJSON,xml:I}}_convertSeparatorForScratchBlocks(A){return{info:A,xml:''}}_convertButtonForScratchBlocks(A){["MAKE_A_LIST","MAKE_A_PROCEDURE","MAKE_A_VARIABLE"].indexOf(A.func)<0&&h.error("Custom button callbacks not supported yet: ".concat(A.func));const B=this.makeMessageContextForTarget(),t=M(A.text,B);return{info:A,xml:'')}}_constructInlineImageJson(A){return A.dataURI||h.warn("Missing data URI in extension block with argument type IMAGE"),{type:"field_image",src:A.dataURI||"",width:24,height:24,flip_rtl:A.flipRTL||!1}}_convertPlaceholders(A,B,t){const e=A.blockInfo.arguments[t]||{};let g,i=j[e.type]||{};if(!j[e.type]&&A.categoryInfo.customFieldTypes[e.type]&&(i=A.categoryInfo.customFieldTypes[e.type].argumentTypeInfo),"field_image"===i.fieldType)g=this._constructInlineImageJson(e);else{g={type:"input_value",name:t};const B=void 0===e.defaultValue?null:M(e.defaultValue,this.makeMessageContextForTarget()).toString();let Q,s,n;if(i.check&&(g.check=i.check),e.menu){const B=A.categoryInfo.menuInfo[e.menu];B.acceptReporters?(Q=t,s=this._makeExtensionMenuId(e.menu,A.categoryInfo.id),n=e.menu):(g.type="field_dropdown",g.options=this._convertMenuItems(B.items),Q=null,s=null,n=t)}else Q=t,s=i.shadow&&i.shadow.type||null,n=i.shadow&&i.shadow.fieldName||null;Q&&A.inputList.push('')),s&&A.inputList.push('')),null!==B&&n&&A.inputList.push('').concat(u(B),"")),s&&A.inputList.push(""),Q&&A.inputList.push("")}const Q="args".concat(A.outLineNum),s=A.blockJSON[Q]=A.blockJSON[Q]||[];g&&s.push(g);const n=s.length;return A.argsMap[t]=n,"%".concat(n)}getBlocksXML(A){return this._blockInfo.map(B=>{const{name:t,color1:e,color2:g}=B,i=B.blocks.filter(B=>{let t=!0;return A&&B.info.filter&&(t=B.info.filter.includes(A.isStage?I.STAGE:I.SPRITE)),t&&!B.info.hideFromPalette}),Q='colour="'.concat(u(e),'" secondaryColour="').concat(u(g),'"');let s="";B.menuIconURI?s=B.menuIconURI:B.blockIconURI&&(s=B.blockIconURI);const n=s?'iconURI="'.concat(u(s),'"'):"";let r="";B.showStatusButton&&(r='showStatusButton="true"');let c='"),c+=i.map(A=>A.xml).join(""),c+="",{id:B.id,xml:c}})}getBlocksJSON(){return this._blockInfo.reduce((A,B)=>A.concat(B.blocks.map(A=>A.json)),[])}getScratchLinkSocket(A){return(this._linkSocketFactory||this._defaultScratchLinkSocketFactory)(A)}configureScratchLinkSocketFactory(A){this._linkSocketFactory=A}_defaultScratchLinkSocketFactory(A){return new l(A)}registerPeripheralExtension(A,B){this.peripheralExtensions[A]=B}scanForPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].scan()}connectPeripheral(A,B){this.peripheralExtensions[A]&&this.peripheralExtensions[A].connect(B)}disconnectPeripheral(A){this.peripheralExtensions[A]&&this.peripheralExtensions[A].disconnect()}getPeripheralIsConnected(A){let B=!1;return this.peripheralExtensions[A]&&(B=this.peripheralExtensions[A].isConnected()),B}emitMicListening(A){this.emit(L.MIC_LISTENING,A)}getOpcodeFunction(A){return this._primitives[A]}getIsHat(A){return this._hats.hasOwnProperty(A)}getIsEdgeActivatedHat(A){return this._hats.hasOwnProperty(A)&&this._hats[A].edgeActivated}attachAudioEngine(A){this.audioEngine=A}attachRenderer(A){this.renderer=A,this.renderer.setLayerGroupOrdering(F.LAYER_GROUPS),this.renderer.offscreenTouching=!this.runtimeOptions.fencing,this.updatePrivacy()}attachV2BitmapAdapter(A){this.v2BitmapAdapter=A}attachStorage(A){if(this.storage=A,this.isPackaged){const B=A.createAsset;let t=0;A.createAsset=function(A,e,g,i,Q){return i||(i=(++t).toString()),B.call(this,A,e,g,i,!1)}}}_pushThread(A,B,t){const e=new Y(A);return e.target=B,e.stackClick=Boolean(t&&t.stackClick),e.updateMonitor=Boolean(t&&t.updateMonitor),e.blockContainer=e.updateMonitor?this.monitorBlocks:B.blocks,e.pushStack(A),this.threads.push(e),e.stackClick||e.updateMonitor||this.threadMap.set(e.getId(),e),t&&t.updateMonitor||!this.compilerOptions.enabled||e.tryCompile(),e}_stopThread(A){A.isKilled=!0,this.sequencer.retireThread(A)}_restartThread(A){const B=new Y(A.topBlock);B.target=A.target,B.stackClick=A.stackClick,B.updateMonitor=A.updateMonitor,B.blockContainer=A.blockContainer,B.pushStack(A.topBlock),A.triedToCompile&&this.compilerOptions.enabled&&B.tryCompile(),B.stackClick||B.updateMonitor||this.threadMap.set(B.getId(),B);const t=this.threads.indexOf(A);return t>-1?(this.threads[t]=B,B):(this.threads.push(A),A)}emitCompileError(A,B){this.emit(L.COMPILE_ERROR,A,B)}isActiveThread(A){return A.stack.length>0&&A.status!==Y.STATUS_DONE&&this.threads.indexOf(A)>-1}isWaitingThread(A){return A.status===Y.STATUS_PROMISE_WAIT||A.status===Y.STATUS_YIELD_TICK||!this.isActiveThread(A)}toggleScript(A,B){B=Object.assign({target:this._editingTarget,stackClick:!1},B);for(let t=0;t=0;B--){const e=t[B],g=e.blocks.getScripts();for(let B=0;B=0;t--){const g=e[t],i=c.getScripts(g.blocks,A);for(let A=0;A{const{blockId:Q,fieldsOfInputs:s}=A;for(const A in B)if(s[A].value!==B[A])return;if(g.restartExistingThreads){const A=this.threadMap.get(Y.getIdFromTargetAndBlock(t,Q));if(A)return void e.push(this._restartThread(A))}else for(let A=0;A{A.isCompiled||(C(this.sequencer,A),A.goToNextBlock())}),e}dispose(){this.stopAll(),this.targets.forEach(A=>{A.isOriginal&&A.deleteMonitors()}),this.targets.map(this.disposeTarget,this);const A=Q({});A.equals(this._monitorState)||(this._monitorState=A,this.emit(L.MONITORS_UPDATE,this._monitorState)),this.emit(L.RUNTIME_DISPOSED),this.ioDevices.clock.resetProjectTimer(),this.hasCloudData()&&this.emit(L.HAS_CLOUD_DATA_UPDATE,!1),this.ioDevices.cloud.clear();const B=x(this.cloudOptions);this.hasCloudData=B.hasCloudVariables,this.canAddCloudVariable=B.canAddCloudVariable,this.getNumberOfCloudVariables=B.getNumberOfCloudVariables,this.addCloudVariable=this._initializeAddCloudVariable(B),this.removeCloudVariable=this._initializeRemoveCloudVariable(B)}addTarget(A){this.targets.push(A),this.executableTargets.push(A),A.isStage&&!this._stageTarget&&(this._stageTarget=A)}moveExecutable(A,B){const t=this.executableTargets.indexOf(A);this.executableTargets.splice(t,1);let e=t+B;return e>this.executableTargets.length&&(e=this.executableTargets.length),e<=0&&(e=this.executableTargets.length>0&&this.executableTargets[0].isStage?1:0),this.executableTargets.splice(e,0,A),e}setExecutablePosition(A,B){const t=this.executableTargets.indexOf(A);return this.moveExecutable(A,B-t)}removeExecutable(A){const B=this.executableTargets.indexOf(A);B>-1&&this.executableTargets.splice(B,1)}disposeTarget(A){this.targets=this.targets.filter(B=>A!==B||(B.dispose(),!1)),this._stageTarget===A&&(this._stageTarget=null)}stopForTarget(A,B){this.emit(L.STOP_FOR_TARGET,A,B);for(let t=0;tA.clearEdgeActivatedValues());for(let A=0;A!A.isKilled),this.updateThreadMap();for(const A in this._hats){if(!this._hats.hasOwnProperty(A))continue;this._hats[A].edgeActivated&&this.startHats(A)}this.redrawRequested=!1,this._pushMonitors(),null!==this.profiler&&(-1===b&&(b=this.profiler.idByName("Sequencer.stepThreads")),this.profiler.start(b));const A=this.sequencer.stepThreads();null!==this.profiler&&this.profiler.stop(),this._updateGlows(A),this._emitProjectRunStatus(this.threads.length+A.length-this._getMonitorThreadCount([...this.threads,...A])),this._lastStepDoneThreads=A,this.renderer&&(null!==this.profiler&&(-1===z&&(z=this.profiler.idByName("RenderWebGL.draw")),this.profiler.start(z)),document.hidden||this.frameLoop._interpolationAnimation||this.renderer.draw(),null!==this.profiler&&this.profiler.stop()),this._refreshTargets&&(this.emit(L.TARGETS_UPDATE,!1),this._refreshTargets=!1),this._prevMonitorState.equals(this._monitorState)||(this.emit(L.MONITORS_UPDATE,this._monitorState),this._prevMonitorState=this._monitorState),null!==this.profiler&&(this.profiler.stop(),this.profiler.reportFrames()),this.interpolationEnabled&&(this._lastStepTime=Date.now())}_getMonitorThreadCount(A){let B=0;return A.forEach(A=>{A.updateMonitor&&B++}),B}_pushMonitors(){this.monitorBlocks.runAllMonitored(this)}setEditingTarget(A){const B=this._editingTarget;this._editingTarget=A,this._scriptGlowsPreviousFrame=[],this._updateGlows(),B!==this._editingTarget&&this.requestToolboxExtensionsUpdate()}setCompatibilityMode(A){A?this.setFramerate(30):this.setFramerate(60)}setFramerate(A){A>250&&(A=250),A<0&&(A=1),this.frameLoop.setFramerate(A),this.emit(L.FRAMERATE_CHANGED,A)}setInterpolation(A){this.interpolationEnabled=A,this.frameLoop.setInterpolation(this.interpolationEnabled),this.emit(L.INTERPOLATION_CHANGED,A)}setRuntimeOptions(A){this.runtimeOptions=Object.assign({},this.runtimeOptions,A),this.emit(L.RUNTIME_OPTIONS_CHANGED,this.runtimeOptions),this.renderer&&(this.renderer.offscreenTouching=!this.runtimeOptions.fencing)}setCompilerOptions(A){this.compilerOptions=Object.assign({},this.compilerOptions,A),this.resetAllCaches(),this.emit(L.COMPILER_OPTIONS_CHANGED,this.compilerOptions)}setStageSize(A,B){if(A=Math.round(Math.max(1,A)),B=Math.round(Math.max(1,B)),this.stageWidth!==A||this.stageHeight!==B){const t=A-this.stageWidth,e=B-this.stageHeight;if(this._monitorState.size>0){const A=t/2,B=e/2;for(const t of this._monitorState.valueSeq()){const e=t.set("x",t.get("x")+A).set("y",t.get("y")+B);this.requestUpdateMonitor(e)}this.emit(L.MONITORS_UPDATE,this._monitorState)}this.stageWidth=A,this.stageHeight=B,this.renderer&&this.renderer.setStageSize(-A/2,A/2,-B/2,B/2)}this.emit(L.STAGE_SIZE_CHANGED,A,B)}setInEditor(A){}convertToPackagedRuntime(){if(this.storage)throw new Error("convertToPackagedRuntime must be called before attachStorage");this.isPackaged=!0}resetAllCaches(){for(const A of this.targets)A.isOriginal&&A.blocks.resetCache();this.flyoutBlocks.resetCache(),this.monitorBlocks.resetCache()}addAddonBlock(A){const B=A.procedureCode,t=A.arguments,i=A.arguments.map((A,B)=>"arg".concat(B)),Q=A.arguments.map(()=>"");if(this.addonBlocks[B]=function(A){for(var B=1;BB.id===A);if(!e){e={id:A,name:"Addons",color1:"#29beb8",color2:"#3aa8a4",color3:"#3aa8a4",menuIconURI:"data:image/svg+xml;,".concat(encodeURIComponent('')),blocks:[],customFieldTypes:{},menus:[]},this._blockInfo.unshift(e)}e.blocks.push({info:{},xml:'"})}this.resetAllCaches()}getAddonBlock(A){return Object.prototype.hasOwnProperty.call(this.addonBlocks,A)?this.addonBlocks[A]:null}findProjectOptionsComment(){const A=this.getTargetForStage().comments;for(const B of Object.values(A))if(B.text.includes(" // _twconfig_"))return B;return null}parseProjectOptions(){const A=this.findProjectOptionsComment();if(!A)return;const B=A.text.split("\n").find(A=>A.endsWith(" // _twconfig_"));if(!B)return void h.warn("Config comment does not contain valid line");const t=B.substr(0,B.length-" // _twconfig_".length);let e;try{if(e=s.parse(t),!e||"object"!=typeof e)throw new Error("Invalid object")}catch(A){return void h.warn("Config comment has invalid JSON",A)}"number"==typeof e.framerate&&this.setFramerate(e.framerate),e.turbo&&(this.turboMode=!0,this.emit(L.TURBO_MODE_ON)),e.interpolation&&this.setInterpolation(!0),e.runtimeOptions&&this.setRuntimeOptions(e.runtimeOptions),e.hq&&this.renderer&&this.renderer.setUseHighQualityRender(!0);const g=+e.width||this.stageWidth,i=+e.height||this.stageHeight;g===this.stageWidth&&i===this.stageHeight||this.setStageSize(g,i)}_generateAllProjectOptions(){return{framerate:this.frameLoop.framerate,runtimeOptions:this.runtimeOptions,interpolation:this.interpolationEnabled,turbo:this.turboMode,hq:!!this.renderer&&this.renderer.useHighQualityRender,width:this.stageWidth,height:this.stageHeight}}generateDifferingProjectOptions(){const A=(B,t)=>{const e={};for(const g of Object.keys(t)){const i=t[g],Q=B[g];if("object"==typeof i&&i){const B=A(Q,i);Object.keys(B).length>0&&(e[g]=B)}else i!==Q&&(e[g]=i)}return e};return A(this._defaultStoredSettings,this._generateAllProjectOptions())}storeProjectOptions(){const A=this.generateDifferingProjectOptions(),B="Configuration for https://turbowarp.org/\nYou can move, resize, and minimize this comment, but don't edit it by hand. This comment can be deleted to remove the stored settings.\n".concat(s.stringify(A)).concat(" // _twconfig_"),t=this.findProjectOptionsComment();if(t)t.text=B;else{this.getTargetForStage().createComment(p(),null,B,50,50,350,170,!1)}this.emitProjectChanged()}precompile(){this.allScriptsDo((A,B)=>{const t=B.blocks.getBlock(A);if(this.getIsHat(t.opcode)){const t=new Y(A);t.target=B,t.blockContainer=B.blocks,t.tryCompile()}})}enableDebug(){this.resetAllCaches(),this.debug=!0}_updateGlows(A){const B=[];B.push.apply(B,this.threads),A&&B.push.apply(B,A);const t=[],e=[];for(let A=0;A0&&this.emit(L.PROJECT_RUN_START),this._nonMonitorThreadCount>0&&0===A&&this.emit(L.PROJECT_RUN_STOP),this._nonMonitorThreadCount=A}quietGlow(A){const B=this._scriptGlowsPreviousFrame.indexOf(A);B>-1&&this._scriptGlowsPreviousFrame.splice(B,1)}glowBlock(A,B){B?this.emit(L.BLOCK_GLOW_ON,{id:A}):this.emit(L.BLOCK_GLOW_OFF,{id:A})}glowScript(A,B){B?this.emit(L.SCRIPT_GLOW_ON,{id:A}):this.emit(L.SCRIPT_GLOW_OFF,{id:A})}emitBlockDragUpdate(A){this.emit(L.BLOCK_DRAG_UPDATE,A)}emitBlockEndDrag(A,B){this.emit(L.BLOCK_DRAG_END,A,B)}visualReport(A,B){this.emit(L.VISUAL_REPORT,{id:A,value:String(B)})}requestAddMonitor(A){const B=A.get("id");this.requestUpdateMonitor(A)||(this._monitorState=this._monitorState.set(B,A))}requestUpdateMonitor(A){const B=A.get("id");return!!this._monitorState.has(B)&&(this._monitorState=this._monitorState.set(B,this._monitorState.get(B).mergeWith((A,B)=>null==B?A:B,A)),!0)}requestRemoveMonitor(A){this._monitorState=this._monitorState.delete(A)}requestHideMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!1]]))}requestShowMonitor(A){return this.requestUpdateMonitor(new Map([["id",A],["visible",!0]]))}requestRemoveMonitorByTargetId(A){this._monitorState=this._monitorState.filterNot(B=>B.targetId===A)}getTargetById(A){for(let B=0;BA.id===B);if(!e)return;const g=e.blocks.find(A=>A.info.opcode===t);return g?{category:"extension",label:"".concat(e.name,": ").concat(g.info.text)}:void 0}createNewGlobalVariable(A,B,t){const e="string"==typeof t?t:D.SCALAR_TYPE,g=this.getAllVarNamesOfType(e),i=R.unusedName(A,g),Q=new D(B||p(),i,e);return this.getTargetForStage().variables[Q.id]=Q,Q}requestRedraw(){this.redrawRequested=!0}requestTargetsUpdate(A){A.isOriginal&&(this._refreshTargets=!0)}requestBlocksUpdate(){this.emit(L.BLOCKS_NEED_UPDATE)}requestToolboxExtensionsUpdate(){this.emit(L.TOOLBOX_EXTENSIONS_NEED_UPDATE)}start(){this.frameLoop.running||(this.frameLoop.start(),this.emit(L.RUNTIME_STARTED))}stop(){this.frameLoop.running&&(this.frameLoop.stop(),this.emit(L.RUNTIME_STOPPED))}enableProfiling(A){o.available()&&(this.profiler=new o(A))}disableProfiling(){this.profiler=null}updateCurrentMSecs(){this.currentMSecs=Date.now()}updatePrivacy(){const A=this.enforcePrivacy&&Object.values(this.externalCommunicationMethods).some(A=>A);this.renderer&&this.renderer.setPrivateSkinAccess&&this.renderer.setPrivateSkinAccess(!A)}setEnforcePrivacy(A){this.enforcePrivacy=A,this.updatePrivacy()}setExternalCommunicationMethod(A,B){if(!Object.prototype.hasOwnProperty.call(this.externalCommunicationMethods,A))throw new Error("Unknown method: ".concat(A));this.externalCommunicationMethods[A]=B,this.updatePrivacy()}}A.exports=L},function(A,B,t){"use strict";t.r(B),t.d(B,"_parse",(function(){return e})),t.d(B,"parse",(function(){return g})),t.d(B,"stringify",(function(){return i}));const e=A=>{let B=0;const t=t=>{const{line:e,column:g}=(()=>{let t=0,e=0;for(let g=0;g(B>=A.length&&t("Unexpected end of input"),A[B]),g=()=>e(B),i=()=>{B++},Q=A=>{g()!==A&&t(`Expected '${A}' but found '${g()}'`),i()},s=(t=1,g=1)=>{if(B+g+t>A.length)return"";if(1===t)return e(B+g);let i="";for(let A=0;A{for(;;)if(/\s/.test(g()))i();else{const A=s(2,0);if("//"===A)for(i(),i();"\n"!==g();)i();else{if("/*"!==A)break;for(i(),i();"*/"!==s(2,0);)i();i(),i()}}},r=()=>{n();switch(g()){case'"':return o();case"{":return C();case"[":return w();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return E();default:return c()}},c=()=>{if("null"===s(4,0)){for(let A=0;A<4;A++)i();return null}if("true"===s(4,0)){for(let A=0;A<4;A++)i();return!0}if("false"===s(5,0)){for(let A=0;A<5;A++)i();return!1}if("Infinity"===s(8,0)){for(let A=0;A<8;A++)i();return 1/0}if("NaN"===s(3,0)){for(let A=0;A<3;A++)i();return NaN}t(`Unexpected character '${g()}'`)},E=()=>{if("-Infinity"===s(9,0)){for(let A=0;A<9;A++)i();return-1/0}let A="";for(;A+=g(),/[\d.e+-]/i.test(s());)i();i();const B=+A;return Number.isNaN(B)&&t("Not a number: "+A),B},o=()=>{Q('"');let A="";for(;;){const B=g();if('"'===B)break;if("\\"===B)switch(i(),g()){case'"':A+='"';break;case"/":A+="/";break;case"\\":A+="\\";break;case"b":A+="\b";break;case"f":A+="\f";break;case"n":A+="\n";break;case"r":A+="\r";break;case"t":A+="\t";break;case"u":{let B="";for(let A=0;A<4;A++){i();const A=g();/[0-9a-f]/i.test(A)||t("Invalid hex code: "+A),B+=A}const e=Number.parseInt(B,16);A+=String.fromCharCode(e);break}default:t("Invalid escape code: \\"+g())}else A+=B;i()}return Q('"'),A},w=()=>{Q("["),n();const A=[];for(;n(),"]"!==g();){const B=r();if(A.push(B),n(),","!==g())break;i()}return Q("]"),A},C=()=>{Q("{"),n();const A={};for(;n(),"}"!==g();){const B=o();n(),Q(":");const t=r();if(A[B]=t,n(),","!==g())break;i()}return Q("}"),A};return r()},g=A=>{try{return JSON.parse(A)}catch(B){try{return e(A)}catch(A){throw B}}},i=A=>{if("string"==typeof A)return JSON.stringify(A);if("number"==typeof A||"boolean"==typeof A)return A.toString();if(null==A||"symbol"==typeof A)return"null";if(Array.isArray(A))return`[${A.map(A=>i(A)).join(",")}]`;if("object"==typeof A){let B="{",t=!0;const e=Object.keys(A);for(let g=0;g {\n // The real time is not checked on every call for performance.\n stuckCounter++;\n if (stuckCounter === 100) {\n stuckCounter = 0;\n return globalState.thread.target.runtime.sequencer.timer.timeElapsed() > 500;\n }\n return false;\n};",i.startHats="const startHats = (requestedHat, optMatchFields) => {\n const thread = globalState.thread;\n const threads = thread.target.runtime.startHats(requestedHat, optMatchFields);\n return threads;\n}",i.waitThreads="const waitThreads = function*(threads) {\n const thread = globalState.thread;\n const runtime = thread.target.runtime;\n\n while (true) {\n // determine whether any threads are running\n let anyRunning = false;\n for (let i = 0; i < threads.length; i++) {\n if (runtime.threads.indexOf(threads[i]) !== -1) {\n anyRunning = true;\n break;\n }\n }\n if (!anyRunning) {\n // all threads are finished, can resume\n return;\n }\n\n let allWaiting = true;\n for (let i = 0; i < threads.length; i++) {\n if (!runtime.isWaitingThread(threads[i])) {\n allWaiting = false;\n break;\n }\n }\n if (allWaiting) {\n thread.status = 3; // STATUS_YIELD_TICK\n }\n\n yield;\n }\n}",i.executeInCompatibilityLayer="let hasResumedFromPromise = false;\nconst waitPromise = function*(promise) {\n const thread = globalState.thread;\n let returnValue;\n\n promise\n .then(value => {\n returnValue = value;\n thread.status = 0; // STATUS_RUNNING\n })\n .catch(error => {\n thread.status = 0; // STATUS_RUNNING\n globalState.log.warn('Promise rejected in compiled script:', error);\n });\n\n // enter STATUS_PROMISE_WAIT and yield\n // this will stop script execution until the promise handlers reset the thread status\n thread.status = 1; // STATUS_PROMISE_WAIT\n yield;\n\n return returnValue;\n};\nconst isPromise = value => (\n // see engine/execute.js\n value !== null &&\n typeof value === 'object' &&\n typeof value.then === 'function'\n);\nconst executeInCompatibilityLayer = function*(inputs, blockFunction, isWarp, useFlags, blockId) {\n const thread = globalState.thread;\n\n // reset the stackframe\n // we only ever use one stackframe at a time, so this shouldn't cause issues\n thread.stackFrames[thread.stackFrames.length - 1].reuse(isWarp);\n\n const executeBlock = () => {\n const blockUtility = globalState.blockUtility;\n blockUtility.init(thread, blockId);\n return blockFunction(inputs, blockUtility);\n };\n\n let returnValue = executeBlock();\n\n if (isPromise(returnValue)) {\n returnValue = yield* waitPromise(returnValue);\n if (useFlags) {\n hasResumedFromPromise = true;\n }\n return returnValue;\n }\n\n if (thread.status === 1 /* STATUS_PROMISE_WAIT */) {\n // Something external is forcing us to stop\n yield;\n // Make up a return value because whatever is forcing us to stop can't specify one\n return '';\n }\n\n while (thread.status === 2 /* STATUS_YIELD */ || thread.status === 3 /* STATUS_YIELD_TICK */) {\n // Yielded threads will run next iteration.\n if (thread.status === 2 /* STATUS_YIELD */) {\n thread.status = 0; // STATUS_RUNNING\n // Yield back to the event loop when stuck or not in warp mode.\n if (!isWarp || isStuck()) {\n yield;\n }\n } else {\n // status is STATUS_YIELD_TICK, always yield to the event loop\n yield;\n }\n\n returnValue = executeBlock();\n\n if (isPromise(returnValue)) {\n returnValue = yield* waitPromise(returnValue);\n if (useFlags) {\n hasResumedFromPromise = true;\n }\n return returnValue;\n }\n\n if (thread.status === 1 /* STATUS_PROMISE_WAIT */) {\n yield;\n return '';\n }\n }\n\n // todo: do we have to do anything extra if status is STATUS_DONE?\n\n return returnValue;\n}",i.retire="const retire = () => {\n const thread = globalState.thread;\n thread.target.runtime.sequencer.retireThread(thread);\n}",i.toBoolean="const toBoolean = value => {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n if (value === '' || value === '0' || value.toLowerCase() === 'false') {\n return false;\n }\n return true;\n }\n return !!value;\n}",i.limitPrecision="const limitPrecision = value => {\n const rounded = Math.round(value);\n const delta = value - rounded;\n return (Math.abs(delta) < 1e-9) ? rounded : value;\n}",g+="const isNotActuallyZero = val => {\n if (typeof val !== 'string') return false;\n for (let i = 0; i < val.length; i++) {\n const code = val.charCodeAt(i);\n if (code === 48 || code === 9) {\n return false;\n }\n }\n return true;\n};",g+="const compareEqualSlow = (v1, v2) => {\n const n1 = +v1;\n if (isNaN(n1) || (n1 === 0 && isNotActuallyZero(v1))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n const n2 = +v2;\n if (isNaN(n2) || (n2 === 0 && isNotActuallyZero(v2))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n return n1 === n2;\n};\nconst compareEqual = (v1, v2) => (typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) && !isNaN(v2) || v1 === v2) ? v1 === v2 : compareEqualSlow(v1, v2);",i.compareGreaterThan="const compareGreaterThanSlow = (v1, v2) => {\n let n1 = +v1;\n let n2 = +v2;\n if (n1 === 0 && isNotActuallyZero(v1)) {\n n1 = NaN;\n } else if (n2 === 0 && isNotActuallyZero(v2)) {\n n2 = NaN;\n }\n if (isNaN(n1) || isNaN(n2)) {\n const s1 = ('' + v1).toLowerCase();\n const s2 = ('' + v2).toLowerCase();\n return s1 > s2;\n }\n return n1 > n2;\n};\nconst compareGreaterThan = (v1, v2) => typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) ? v1 > v2 : compareGreaterThanSlow(v1, v2)",i.compareLessThan="const compareLessThanSlow = (v1, v2) => {\n let n1 = +v1;\n let n2 = +v2;\n if (n1 === 0 && isNotActuallyZero(v1)) {\n n1 = NaN;\n } else if (n2 === 0 && isNotActuallyZero(v2)) {\n n2 = NaN;\n }\n if (isNaN(n1) || isNaN(n2)) {\n const s1 = ('' + v1).toLowerCase();\n const s2 = ('' + v2).toLowerCase();\n return s1 < s2;\n }\n return n1 < n2;\n};\nconst compareLessThan = (v1, v2) => typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v2) ? v1 < v2 : compareLessThanSlow(v1, v2)",i.randomInt="const randomInt = (low, high) => low + Math.floor(Math.random() * ((high + 1) - low))",i.randomFloat="const randomFloat = (low, high) => (Math.random() * (high - low)) + low",i.timer="const timer = () => {\n const t = new globalState.Timer({\n now: () => globalState.thread.target.runtime.currentMSecs\n });\n t.start();\n return t;\n}",i.daysSince2000="const daysSince2000 = () => (Date.now() - 946684800000) / (24 * 60 * 60 * 1000)",i.distance="const distance = menu => {\n const thread = globalState.thread;\n if (thread.target.isStage) return 10000;\n\n let targetX = 0;\n let targetY = 0;\n if (menu === '_mouse_') {\n targetX = thread.target.runtime.ioDevices.mouse.getScratchX();\n targetY = thread.target.runtime.ioDevices.mouse.getScratchY();\n } else {\n const distTarget = thread.target.runtime.getSpriteTargetByName(menu);\n if (!distTarget) return 10000;\n targetX = distTarget.x;\n targetY = distTarget.y;\n }\n\n const dx = thread.target.x - targetX;\n const dy = thread.target.y - targetY;\n return Math.sqrt((dx * dx) + (dy * dy));\n}",g+="const listIndexSlow = (index, length) => {\n if (index === 'last') {\n return length - 1;\n } else if (index === 'random' || index === 'any') {\n if (length > 0) {\n return (Math.random() * length) | 0;\n }\n return -1;\n }\n index = (+index || 0) | 0;\n if (index < 1 || index > length) {\n return -1;\n }\n return index - 1;\n};\nconst listIndex = (index, length) => {\n if (typeof index !== 'number') {\n return listIndexSlow(index, length);\n }\n index = index | 0;\n return index < 1 || index > length ? -1 : index - 1;\n};",i.listGet="const listGet = (list, idx) => {\n const index = listIndex(idx, list.length);\n if (index === -1) {\n return '';\n }\n return list[index];\n}",i.listReplace="const listReplace = (list, idx, value) => {\n const index = listIndex(idx, list.value.length);\n if (index === -1) {\n return;\n }\n list.value[index] = value;\n list._monitorUpToDate = false;\n}",i.listInsert="const listInsert = (list, idx, value) => {\n const index = listIndex(idx, list.value.length + 1);\n if (index === -1) {\n return;\n }\n list.value.splice(index, 0, value);\n list._monitorUpToDate = false;\n}",i.listDelete="const listDelete = (list, idx) => {\n if (idx === 'all') {\n list.value = [];\n return;\n }\n const index = listIndex(idx, list.value.length);\n if (index === -1) {\n return;\n }\n list.value.splice(index, 1);\n list._monitorUpToDate = false;\n}",i.listContains="const listContains = (list, item) => {\n // TODO: evaluate whether indexOf is worthwhile here\n if (list.value.indexOf(item) !== -1) {\n return true;\n }\n for (let i = 0; i < list.value.length; i++) {\n if (compareEqual(list.value[i], item)) {\n return true;\n }\n }\n return false;\n}",i.listIndexOf="const listIndexOf = (list, item) => {\n for (let i = 0; i < list.value.length; i++) {\n if (compareEqual(list.value[i], item)) {\n return i + 1;\n }\n }\n return 0;\n}",i.listContents="const listContents = list => {\n for (let i = 0; i < list.value.length; i++) {\n const listItem = list.value[i];\n // this is an intentional break from what scratch 3 does to address our automatic string -> number conversions\n // it fixes more than it breaks\n if ((listItem + '').length !== 1) {\n return list.value.join(' ');\n }\n }\n return list.value.join('');\n}",i.colorToList="const colorToList = color => globalState.Cast.toRgbColorList(color)",i.mod="const mod = (n, modulus) => {\n let result = n % modulus;\n if (result / modulus < 0) result += modulus;\n return result;\n}",i.tan="const tan = (angle) => {\n switch (angle % 360) {\n case -270: case 90: return Infinity;\n case -90: case 270: return -Infinity;\n }\n return Math.round(Math.tan((Math.PI * angle) / 180) * 1e10) / 1e10;\n}";const Q=A=>{e.thread=A,A.generator.next()};Q.scopedEval=A=>{const B=(A=>{let B="let stuckCounter = 0;\nconst isStuck = () => {\n // The real time is not checked on every call for performance.\n stuckCounter++;\n if (stuckCounter === 100) {\n stuckCounter = 0;\n return globalState.thread.target.runtime.sequencer.timer.timeElapsed() > 500;\n }\n return false;\n};const isNotActuallyZero = val => {\n if (typeof val !== 'string') return false;\n for (let i = 0; i < val.length; i++) {\n const code = val.charCodeAt(i);\n if (code === 48 || code === 9) {\n return false;\n }\n }\n return true;\n};const compareEqualSlow = (v1, v2) => {\n const n1 = +v1;\n if (isNaN(n1) || (n1 === 0 && isNotActuallyZero(v1))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n const n2 = +v2;\n if (isNaN(n2) || (n2 === 0 && isNotActuallyZero(v2))) return ('' + v1).toLowerCase() === ('' + v2).toLowerCase();\n return n1 === n2;\n};\nconst compareEqual = (v1, v2) => (typeof v1 === 'number' && typeof v2 === 'number' && !isNaN(v1) && !isNaN(v2) || v1 === v2) ? v1 === v2 : compareEqualSlow(v1, v2);const listIndexSlow = (index, length) => {\n if (index === 'last') {\n return length - 1;\n } else if (index === 'random' || index === 'any') {\n if (length > 0) {\n return (Math.random() * length) | 0;\n }\n return -1;\n }\n index = (+index || 0) | 0;\n if (index < 1 || index > length) {\n return -1;\n }\n return index - 1;\n};\nconst listIndex = (index, length) => {\n if (typeof index !== 'number') {\n return listIndexSlow(index, length);\n }\n index = index | 0;\n return index < 1 || index > length ? -1 : index - 1;\n};";for(const t of Object.keys(i))A.includes(t)&&(B+="".concat(i[t],";"));return B+="return ".concat(A),B})(A);try{return new Function("globalState",B)(e)}catch(A){throw e.log.error("was unable to compile script",B),A}},Q.runtimeFunctions=i,A.exports=Q},function(A,B,t){const e=t(28),g=t(15);A.exports=class{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.sequencer=A,this.thread=B,this._nowObj={now:()=>this.sequencer.runtime.currentMSecs}}get target(){return this.thread.target}get runtime(){return this.sequencer.runtime}get nowObj(){return this.runtime?this._nowObj:null}get stackFrame(){const A=this.thread.peekStackFrame();return null===A.executionContext&&(A.executionContext={}),A.executionContext}stackTimerFinished(){return!(this.stackFrame.timer.timeElapsed(){t.status===Q.STATUS_RUNNING&&(t.status=Q.STATUS_PROMISE_WAIT),A.then(A=>{if(E(A,B,t,e,g),g&&!e._isHat){let A,B;do{const e=t.popStack();if(null===e)return;if(B=t.target.blocks.getNextBlock(e),null!==B)break;A=t.peekStackFrame()}while(null!==A&&!A.isLoop);t.pushStack(B)}},A=>{i.warn("Primitive rejected promise: ",A),t.status=Q.STATUS_RUNNING,t.popStack()})};class w{constructor(A,B){this.id=B.id,this.opcode=B.opcode,this.fields=B.fields,this.inputs=B.inputs,this.mutation=B.mutation,this._profiler=null,this._profilerFrame=null,this._isHat=!1,this._blockFunction=null,this._definedBlockFunction=!1,this._isShadowBlock=!1,this._shadowValue=null,this._fields=Object.assign({},this.fields),this._inputs=Object.assign({},this.inputs),this._argValues={mutation:this.mutation},this._parentKey=null,this._parentValues=null,this._ops=[];const{runtime:t}=r.sequencer,{opcode:e,fields:i,inputs:Q}=this;this._isHat=t.getIsHat(e),this._blockFunction=t.getOpcodeFunction(e),this._definedBlockFunction=void 0!==this._blockFunction;const s=Object.keys(i);this._isShadowBlock=!this._definedBlockFunction&&1===s.length&&0===Object.keys(Q).length,this._shadowValue=this._isShadowBlock&&i[s[0]].value;for(const A in i)this._argValues[A]="VARIABLE"===A||"LIST"===A||"BROADCAST_OPTION"===A?{id:i[A].id,name:i[A].value}:i[A].value;if(delete this._inputs.custom_block,"BROADCAST_INPUT"in this._inputs){this._argValues.BROADCAST_OPTION={id:null,name:null};const B=this._inputs.BROADCAST_INPUT;if(B.block===B.shadow){const t=A.getBlock(B.shadow).fields.BROADCAST_OPTION;this._argValues.BROADCAST_OPTION.id=t.id,this._argValues.BROADCAST_OPTION.name=t.value,delete this._inputs.BROADCAST_INPUT}}for(const B in this._inputs){const t=this._inputs[B];if(t.block){const e=g.getCached(A,t.block,w);if(e._isHat)continue;this._ops.push(...e._ops),e._parentKey=B,e._parentValues=this._argValues,e._isShadowBlock&&(this._argValues[B]=e._shadowValue)}}this._definedBlockFunction&&this._ops.push(this)}}A.exports=function(A,B){const t=A.runtime;r.sequencer=A,r.thread=B;const e=B.peekStack(),i=B.peekStackFrame();let s=B.blockContainer,C=g.getCached(s,e,w);if(null===C&&(s=t.flyoutBlocks,C=g.getCached(s,e,w),null===C))return void A.retireThread(B);const a=C._ops,I=a.length;let Y=0;if(null!==i.reported){const A=i.reported;for(;YA.id===B);if(e){const A=e._parentKey,B=e._parentValues;"BROADCAST_INPUT"===A?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=n.toString(t)):B[A]=t}}if(A.length>0){const B=A.reverse().find(A=>a.find(B=>B.id===A.opCached));Y=B?a.findIndex(A=>A.id===B.opCached)+1:0}if(null!==B.justReported&&a[Y]&&a[Y].id===i.reporting){const A=a[Y],t=B.justReported;B.justReported=null;const e=A._parentKey,g=A._parentValues;"BROADCAST_INPUT"===e?(g.BROADCAST_OPTION.id=null,g.BROADCAST_OPTION.name=n.toString(t)):g[e]=t,Y+=1}i.reporting=null,i.reported=null}const h=Y;for(;Y{const B=A._parentKey,t=A._parentValues;return"BROADCAST_INPUT"===B?{opCached:A.id,inputValue:t[B].BROADCAST_OPTION.name}:{opCached:A.id,inputValue:t[B]}});break}if(B.status===Q.STATUS_RUNNING)if(t)E(w,A,B,e,t);else{const A=e._parentKey,B=e._parentValues;"BROADCAST_INPUT"===A?(B.BROADCAST_OPTION.id=null,B.BROADCAST_OPTION.name=n.toString(w)):B[A]=w}}var M;if(null!==t.profiler){C._profiler!==t.profiler&&function(A,B){B._profiler=A,-1===c&&(c=A.idByName("blockFunction"));const t=B._ops;for(let B=0;Bthis._setupPreview()):null}disableVideo(){if(this._disablePreview(),!this.provider)return null;this.provider.disableVideo()}getFrame(A){let{dimensions:B=g.DIMENSIONS,mirror:t=this.mirror,format:e=g.FORMAT_IMAGE_DATA,cacheTimeout:i=this._frameCacheTimeout}=A;return this.provider?this.provider.getFrame({dimensions:B,mirror:t,format:e,cacheTimeout:i}):null}setPreviewGhost(A){this._ghost=A,-1!==this._drawable&&this.runtime.renderer.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:A)}_disablePreview(){-1!==this._skinId&&(this.runtime.renderer.updateBitmapSkin(this._skinId,new ImageData(...g.DIMENSIONS),1),this.runtime.renderer.updateDrawableVisible(this._drawable,!1)),this._renderPreviewFrame=null}_setupPreview(){const{renderer:A}=this.runtime;A&&(-1===this._skinId&&-1===this._drawable&&(this._skinId=A.createBitmapSkin(new ImageData(...g.DIMENSIONS),1),this._drawable=A.createDrawable(e.VIDEO_LAYER),A.updateDrawableSkinId(this._drawable,this._skinId),A.markSkinAsPrivate&&A.markSkinAsPrivate(this._skinId)),this._renderPreviewFrame||(A.updateDrawableEffect(this._drawable,"ghost",this._forceTransparentPreview?100:this._ghost),A.updateDrawableVisible(this._drawable,!0),this._renderPreviewFrame=()=>{if(clearTimeout(this._renderPreviewTimeout),!this._renderPreviewFrame)return;this._renderPreviewTimeout=setTimeout(this._renderPreviewFrame,this.runtime.currentStepTime);const B=this.getFrame({format:g.FORMAT_IMAGE_DATA,cacheTimeout:this.runtime.currentStepTime});B?(A.updateBitmapSkin(this._skinId,B,1),this.runtime.requestRedraw()):A.updateBitmapSkin(this._skinId,new ImageData(...g.DIMENSIONS),1)},this._renderPreviewFrame()))}get videoReady(){return!!this.provider&&this.provider.videoReady}postData(A){let{forceTransparentPreview:B}=A;this._forceTransparentPreview=B,this.setPreviewGhost(this._ghost)}}A.exports=g},function(A,B){A.exports=class{constructor(A,B){this.callback=A,this.maxConcurrent=B,this._current=0,this._queue=[]}do(){for(var A=arguments.length,B=new Array(A),t=0;t{this._queue.push([A,t,B]),this._startNext()})}_startNext(){if(this._current>=this.maxConcurrent||0===this._queue.length)return;this._current++;const[A,B,t]=this._queue.shift();this.callback.apply(null,t).then(B=>{A(B),this._current--,this._startNext()}).catch(A=>{B(A),this._current--,this._startNext()})}}},function(A,B){A.exports={generateExtensionId:A=>{const B=A.replace(/[^a-z0-9]/gi,"").toLowerCase();return"sbx".concat(B)},argumentIndexToId:A=>A.toString()}},function(A,B,t){"use strict";var e=window.URL||window.webkitURL;A.exports=function(A,B){try{try{var t;try{(t=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(A),t=t.getBlob()}catch(B){t=new Blob([A])}return new Worker(e.createObjectURL(t))}catch(B){return new Worker("data:application/javascript,"+encodeURIComponent(A))}}catch(A){if(!B)throw Error("Inline worker is not supported");return new Worker(B)}}},function(A,B,t){const e=t(6);A.exports=A=>{const B={};for(let t=0;t{const t=[],e=A=>{A.localName!==B&&void 0!==B||!A.getAttribute||t.push(A);for(let B=0;B{const B=document.createElement("span"),t=A.outerHTML,g=e.sanitize(t,{USE_PROFILES:{svg:!0},FORBID_TAGS:["a","audio","canvas","video"],ADD_DATA_URI_TAGS:["image"]});let i,Q;try{B.innerHTML=g,document.body.appendChild(B),i=B.children[0].getBBox()}finally{document.body.removeChild(B)}Q=0===i.width||0===i.height?0:(A=>{let B=0;const t=A=>{A.getAttribute&&(A.getAttribute("stroke")&&(B=Math.max(B,1)),A.getAttribute("stroke-width")&&(B=Math.max(B,Number(A.getAttribute("stroke-width"))||0)));for(let B=0;B{B&&(A=>{const B=n(A,"linearGradient");for(const A of B)A.getAttribute("x2")||A.setAttribute("x2","0")})(A),s(A,window),(A=>{const B=n(A,"image"),t="image-rendering: optimizespeed; image-rendering: pixelated;";for(const A of B)A.getAttribute("style")?A.setAttribute("style","".concat(t," ").concat(A.getAttribute("style"))):A.setAttribute("style",t)})(A),B?((A=>{const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B{const B=n(A);for(const A of B){if(!A.style)continue;const B=A.style.stroke||A.getAttribute("stroke");B&&B.match(/^url\(#.*\)$/)&&(A.style["stroke-linejoin"]="round",A.style["stroke-linecap"]="round")}})(A)):A.getAttribute("viewBox")?A.getAttribute("width")&&A.getAttribute("height")||(A.setAttribute("width",A.viewBox.baseVal.width),A.setAttribute("height",A.viewBox.baseVal.height)):r(A)};A.exports=(A,B)=>{const t=new DOMParser;A=Q(A);const e=t.parseFromString(A,"text/xml");if(e.childNodes.length<1||"svg"!==e.documentElement.localName)throw new Error("Document does not appear to be SVG.");const g=e.documentElement;return c(g,B),g}},function(A,B){A.exports=function(A){const B=[],t=A=>{"text"===A.localName&&B.push(A);for(let B=0;B]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"data:image/png")));const t=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(t)&&(A=A.replace(t,(A,B)=>"".concat(B,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"G. The B>G case\n\t// will be calculated in the negative and fed through abs() in the hue calculation at the end.\n\t// See also: https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma\n\tconst vec4 hueOffsets = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\n\t// temp1.xy = sort B & G (largest first)\n\t// temp1.z = the hue offset we\'ll use if it turns out that R is the largest component (M==R)\n\t// temp1.w = the hue offset we\'ll use if it turns out that R is not the largest component (M==G or M==B)\n\tvec4 temp1 = rgb.b > rgb.g ? vec4(rgb.bg, hueOffsets.wz) : vec4(rgb.gb, hueOffsets.xy);\n\n\t// temp2.x = the largest component of RGB ("M" / "Max")\n\t// temp2.yw = the smaller components of RGB, ordered for the hue calculation (not necessarily sorted by magnitude!)\n\t// temp2.z = the hue offset we\'ll use in the hue calculation\n\tvec4 temp2 = rgb.r > temp1.x ? vec4(rgb.r, temp1.yzx) : vec4(temp1.xyw, rgb.r);\n\n\t// m = the smallest component of RGB ("min")\n\tfloat m = min(temp2.y, temp2.w);\n\n\t// Chroma = M - m\n\tfloat C = temp2.x - m;\n\n\t// Value = M\n\tfloat V = temp2.x;\n\n\treturn vec3(\n\t\tabs(temp2.z + (temp2.w - temp2.y) / (6.0 * C + epsilon)), // Hue\n\t\tC / (temp2.x + epsilon), // Saturation\n\t\tV); // Value\n}\n\nvec3 convertHue2RGB(float hue)\n{\n\tfloat r = abs(hue * 6.0 - 3.0) - 1.0;\n\tfloat g = 2.0 - abs(hue * 6.0 - 2.0);\n\tfloat b = 2.0 - abs(hue * 6.0 - 4.0);\n\treturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 convertHSV2RGB(vec3 hsv)\n{\n\tvec3 rgb = convertHue2RGB(hsv.x);\n\tfloat c = hsv.z * hsv.y;\n\treturn rgb * c + hsv.z - c;\n}\n#endif // !defined(DRAW_MODE_silhouette) && (defined(ENABLE_color))\n\nconst vec2 kCenter = vec2(0.5, 0.5);\n\nvoid main()\n{\n\t#if !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\tvec2 texcoord0 = v_texCoord;\n\n\t#ifdef ENABLE_mosaic\n\ttexcoord0 = fract(u_mosaic * texcoord0);\n\t#endif // ENABLE_mosaic\n\n\t#ifdef ENABLE_pixelate\n\t{\n\t\t// TODO: clean up "pixel" edges\n\t\tvec2 pixelTexelSize = u_skinSize / u_pixelate;\n\t\ttexcoord0 = (floor(texcoord0 * pixelTexelSize) + kCenter) / pixelTexelSize;\n\t}\n\t#endif // ENABLE_pixelate\n\n\t#ifdef ENABLE_whirl\n\t{\n\t\tconst float kRadius = 0.5;\n\t\tvec2 offset = texcoord0 - kCenter;\n\t\tfloat offsetMagnitude = length(offset);\n\t\tfloat whirlFactor = max(1.0 - (offsetMagnitude / kRadius), 0.0);\n\t\tfloat whirlActual = u_whirl * whirlFactor * whirlFactor;\n\t\tfloat sinWhirl = sin(whirlActual);\n\t\tfloat cosWhirl = cos(whirlActual);\n\t\tmat2 rotationMatrix = mat2(\n\t\t\tcosWhirl, -sinWhirl,\n\t\t\tsinWhirl, cosWhirl\n\t\t);\n\n\t\ttexcoord0 = rotationMatrix * offset + kCenter;\n\t}\n\t#endif // ENABLE_whirl\n\n\t#ifdef ENABLE_fisheye\n\t{\n\t\tvec2 vec = (texcoord0 - kCenter) / kCenter;\n\t\tfloat vecLength = length(vec);\n\t\tfloat r = pow(min(vecLength, 1.0), u_fisheye) * max(1.0, vecLength);\n\t\tvec2 unit = vec / vecLength;\n\n\t\ttexcoord0 = kCenter + r * unit * kCenter;\n\t}\n\t#endif // ENABLE_fisheye\n\n\tgl_FragColor = texture2D(u_skin, texcoord0);\n\n\t#if defined(ENABLE_color) || defined(ENABLE_brightness)\n\t// Divide premultiplied alpha values for proper color processing\n\t// Add epsilon to avoid dividing by 0 for fully transparent pixels\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb / (gl_FragColor.a + epsilon), 0.0, 1.0);\n\n\t#ifdef ENABLE_color\n\t{\n\t\tvec3 hsv = convertRGB2HSV(gl_FragColor.xyz);\n\n\t\t// this code forces grayscale values to be slightly saturated\n\t\t// so that some slight change of hue will be visible\n\t\tconst float minLightness = 0.11 / 2.0;\n\t\tconst float minSaturation = 0.09;\n\t\tif (hsv.z < minLightness) hsv = vec3(0.0, 1.0, minLightness);\n\t\telse if (hsv.y < minSaturation) hsv = vec3(0.0, minSaturation, hsv.z);\n\n\t\thsv.x = mod(hsv.x + u_color, 1.0);\n\t\tif (hsv.x < 0.0) hsv.x += 1.0;\n\n\t\tgl_FragColor.rgb = convertHSV2RGB(hsv);\n\t}\n\t#endif // ENABLE_color\n\n\t#ifdef ENABLE_brightness\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb + vec3(u_brightness), vec3(0), vec3(1));\n\t#endif // ENABLE_brightness\n\n\t// Re-multiply color values\n\tgl_FragColor.rgb *= gl_FragColor.a + epsilon;\n\n\t#endif // defined(ENABLE_color) || defined(ENABLE_brightness)\n\n\t#ifdef ENABLE_ghost\n\tgl_FragColor *= u_ghost;\n\t#endif // ENABLE_ghost\n\n\t#ifdef DRAW_MODE_silhouette\n\t// Discard fully transparent pixels for stencil test\n\tif (gl_FragColor.a == 0.0) {\n\t\tdiscard;\n\t}\n\t// switch to u_silhouetteColor only AFTER the alpha test\n\tgl_FragColor = u_silhouetteColor;\n\t#else // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_colorMask\n\tvec3 maskDistance = abs(gl_FragColor.rgb - u_colorMask);\n\tvec3 colorMaskTolerance = vec3(u_colorMaskTolerance, u_colorMaskTolerance, u_colorMaskTolerance);\n\tif (any(greaterThan(maskDistance, colorMaskTolerance)))\n\t{\n\t\tdiscard;\n\t}\n\t#endif // DRAW_MODE_colorMask\n\t#endif // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_straightAlpha\n\t// Un-premultiply alpha.\n\tgl_FragColor.rgb /= gl_FragColor.a + epsilon;\n\t#endif\n\n\t#endif // !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\n\t#ifdef DRAW_MODE_line\n\t// Maaaaagic antialiased-line-with-round-caps shader.\n\n\t// "along-the-lineness". This increases parallel to the line.\n\t// It goes from negative before the start point, to 0.5 through the start to the end, then ramps up again\n\t// past the end point.\n\tfloat d = ((v_texCoord.x - clamp(v_texCoord.x, 0.0, v_lineLength)) * 0.5) + 0.5;\n\n\t// Distance from (0.5, 0.5) to (d, the perpendicular coordinate). When we\'re in the middle of the line,\n\t// d will be 0.5, so the distance will be 0 at points close to the line and will grow at points further from it.\n\t// For the "caps", d will ramp down/up, giving us rounding.\n\t// See https://www.youtube.com/watch?v=PMltMdi1Wzg for a rough outline of the technique used to round the lines.\n\tfloat line = distance(vec2(0.5), vec2(d, v_texCoord.y)) * 2.0;\n\t// Expand out the line by its thickness.\n\tline -= ((v_lineThickness - 1.0) * 0.5);\n\t// Because "distance to the center of the line" decreases the closer we get to the line, but we want more opacity\n\t// the closer we are to the line, invert it.\n\tgl_FragColor = v_lineColor * clamp(1.0 - line, 0.0, 1.0);\n\t#endif // DRAW_MODE_line\n\n\t#ifdef DRAW_MODE_background\n\tgl_FragColor = u_backgroundColor;\n\t#endif\n}\n'},function(A,B){A.exports={rgbToHsv:(A,B)=>{let[t,e,g]=A,i=0;t/=255,e/=255,g/=255;let Q=0;e{let[t,e,g]=A;if(0===e)return B[0]=B[1]=B[2]=255*g+.5,B;t%=1;const i=6*t|0,Q=6*t-i,s=g*(1-e),n=g*(1-e*Q),r=g*(1-e*(1-Q));let c=0,E=0,o=0;switch(i){case 0:c=g,E=r,o=s;break;case 1:c=n,E=g,o=s;break;case 2:c=s,E=g,o=r;break;case 3:c=s,E=n,o=g;break;case 4:c=r,E=s,o=g;break;case 5:c=g,E=s,o=n}return B[0]=255*c+.5,B[1]=255*E+.5,B[2]=255*o+.5,B}}},function(A,B,t){const e=t(10),g=t(33),i=t(32),Q=t(25),s={color4f:[0,0,1,1],diameter:1},n=[0,0,0,0];A.exports=class extends i{constructor(A,B){super(A,B),this._size=null,this._framebuffer=null,this._silhouetteDirty=!1,this._silhouettePixels=null,this._silhouetteImageData=null,this._lineOnBufferDrawRegionId={enter:()=>this._enterDrawLineOnBuffer(),exit:()=>this._exitDrawLineOnBuffer()},this._usePenBufferDrawRegionId={enter:()=>this._enterUsePenBuffer(),exit:()=>this._exitUsePenBuffer()},this.renderQuality=1,this._nativeSize=B.getNativeSize(),this._resetAttributeIndexes(),this.a_lineColor=new Float32Array(65520),this.a_lineThicknessAndLength=new Float32Array(32760),this.a_penPoints=new Float32Array(65520),this.a_position=new Float32Array(32760);for(let A=0;Athis._enterDrawTexture(),exit:()=>this._exitDrawTexture()},this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(B.getNativeSize())}dispose(){this._renderer.removeListener(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._nativeSize}useNearest(A){return Math.max(A[0],A[1])>=100}getTexture(A){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(A,B,t){this.drawLine(A,B,t,B,t)}drawLine(A,B,t,e,g){const i=A.diameter||s.diameter,Q=1===i||3===i?.5:0;this._drawLineOnBuffer(A,B+Q,t+Q,e+Q,g+Q),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;e.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const B=this._lineShader;A.useProgram(B.program),e.setBuffersAndAttributes(A,B,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};e.setUniforms(B,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;e.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,null)}_enterDrawTexture(){this._enterUsePenBuffer();const A=this._renderer.gl;A.viewport(0,0,this._size[0],this._size[1]),A.useProgram(this._drawTextureShader.program),e.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const B=this._renderer.gl,t=this._size[0],g=this._size[1],i={u_skin:A,u_projectionMatrix:e.m4.ortho(t/2,t/-2,g/-2,g/2,-1,1,e.m4.identity()),u_modelMatrix:e.m4.scaling(e.v3.create(t,g,0),e.m4.identity())};e.setTextureParameters(B,A,{minMag:B.NEAREST}),e.setUniforms(this._drawTextureShader,i),e.drawBufferInfo(B,this._renderer._bufferInfo,B.TRIANGLES)}_drawLineOnBuffer(A,B,t,e,g){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const i=A.color4f||s.color4f;n[0]=i[0]*i[3],n[1]=i[1]*i[3],n[2]=i[2]*i[3],n[3]=i[3],B*=this.renderQuality,t*=this.renderQuality;const Q=(e*=this.renderQuality)-B,r=(g*=this.renderQuality)-t,c=Math.sqrt(Q*Q+r*r),E=(A.diameter||s.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=n[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=n[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=E,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=B,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=Q,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-r,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,B=this._lineShader;this.a_lineColorIndex<1e3?(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),e.setBuffersAndAttributes(A,B,this._lineBufferInfo),e.drawBufferInfo(A,this._lineBufferInfo,A.TRIANGLES,this.a_lineThicknessAndLengthIndex/2),this._resetAttributeIndexes(),this._silhouetteDirty=!0}onNativeSizeChanged(A){this._nativeSize=A.newSize,this._setCanvasSize([A.newSize[0]*this.renderQuality,A.newSize[1]*this.renderQuality]),this.emitWasAltered()}_setCanvasSize(A){const[B,t]=A;if(this._size&&this._size[0]===B&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const g=this._renderer.gl,i=this._texture;this._texture=e.createTexture(g,{mag:g.NEAREST,min:g.NEAREST,wrap:g.CLAMP_TO_EDGE,width:B,height:t});const Q=[{format:g.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=e.createFramebufferInfo(g,Q,B,t),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),i&&this._drawPenTexture(i),this._silhouettePixels=new Uint8Array(Math.floor(B*t*4)),this._silhouetteImageData=new ImageData(B,t),this._silhouetteDirty=!0}setRenderQuality(A){this.renderQuality!==A&&(this.renderQuality=A,this._setCanvasSize([Math.round(this._nativeSize[0]*A),Math.round(this._nativeSize[1]*A)]))}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.readPixels(0,0,this._size[0],this._size[1],A.RGBA,A.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(A,B,t){const e=t(10),g=t(32),{loadSvgString:i,serializeSvgToString:Q}=t(283),s=t(25);A.exports=class extends g{constructor(A,B){super(A,B),this._svgImage=document.createElement("img"),this._svgImageLoaded=!1,this._size=[0,0],this._canvas=document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._scaledMIPs=[],this._largestMIPScale=0,this._maxTextureScale=1}dispose(){this.resetMIPs(),super.dispose()}get size(){return[this._size[0],this._size[1]]}useNearest(A,B){return 0==(B.enabledEffects&(s.EFFECT_INFO.fisheye.mask|s.EFFECT_INFO.whirl.mask|s.EFFECT_INFO.pixelate.mask|s.EFFECT_INFO.mosaic.mask))&&(B._direction%90==0&&(Math.abs(A[0])>99&&Math.abs(A[0])<101&&Math.abs(A[1])>99&&Math.abs(A[1])<101))}createMIP(A){const B=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const B=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(B/100,this._maxTextureScale),e=Math.max(Math.ceil(Math.log2(t))+8,0),g=Math.pow(2,e-8);return this._svgImageLoaded&&!this._scaledMIPs[e]&&(this._scaledMIPs[e]=this.createMIP(g)),this._scaledMIPs[e]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,B){const t=i(A),e=Q(t,!0);this._svgImageLoaded=!1;const{x:g,y:s,width:n,height:r}=t.viewBox.baseVal;this._size[0]=n,this._size[1]=r,this._svgImage.onload=()=>{if(0===n||0===r)return void super.setEmptyImageData();const A=Math.ceil(Math.max(n,r));let t=2;for(;A*t<=2048;t*=2)this._maxTextureScale=t;this.resetMIPs(),void 0===B&&(B=this.calculateRotationCenter()),this._rotationCenter[0]=B[0]-g,this._rotationCenter[1]=B[1]-s,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(e))}}},function(A,B,t){const e=t(284),g=t(288),i=t(98),Q=t(95),s=t(97),n=t(44),r=t(96);A.exports={BitmapAdapter:g,convertFonts:r,inlineSvgFonts:i,loadSvgString:Q,serializeSvgToString:s,SvgElement:n,SVGRenderer:e}},function(A,B,t){const e=t(95),g=t(97);A.exports=class{constructor(A){this._canvas=A||document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._measurements={x:0,y:0,width:0,height:0},this._cachedImage=null,this.loaded=!1}get canvas(){return this._canvas}get size(){return[this._measurements.width,this._measurements.height]}get viewOffset(){return[this._measurements.x,this._measurements.y]}loadString(A,B){this._cachedImage=null;const t=e(A,B);this._svgTag=t,this._measurements={width:t.viewBox.baseVal.width,height:t.viewBox.baseVal.height,x:t.viewBox.baseVal.x,y:t.viewBox.baseVal.y}}loadSVG(A,B,t){this.loadString(A,B),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const B=this._cachedImage;B.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);B.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return g(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const B=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*B,this._canvas.height=t.height*B,this._canvas.width<=0||this._canvas.height<=0||this._cachedImage.naturalWidth<=0||this._cachedImage.naturalHeight<=0||(this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"data:image/png")));const t=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(t)&&(A=A.replace(t,(A,B)=>"".concat(B,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"G. The B>G case\n\t// will be calculated in the negative and fed through abs() in the hue calculation at the end.\n\t// See also: https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma\n\tconst vec4 hueOffsets = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\n\t// temp1.xy = sort B & G (largest first)\n\t// temp1.z = the hue offset we\'ll use if it turns out that R is the largest component (M==R)\n\t// temp1.w = the hue offset we\'ll use if it turns out that R is not the largest component (M==G or M==B)\n\tvec4 temp1 = rgb.b > rgb.g ? vec4(rgb.bg, hueOffsets.wz) : vec4(rgb.gb, hueOffsets.xy);\n\n\t// temp2.x = the largest component of RGB ("M" / "Max")\n\t// temp2.yw = the smaller components of RGB, ordered for the hue calculation (not necessarily sorted by magnitude!)\n\t// temp2.z = the hue offset we\'ll use in the hue calculation\n\tvec4 temp2 = rgb.r > temp1.x ? vec4(rgb.r, temp1.yzx) : vec4(temp1.xyw, rgb.r);\n\n\t// m = the smallest component of RGB ("min")\n\tfloat m = min(temp2.y, temp2.w);\n\n\t// Chroma = M - m\n\tfloat C = temp2.x - m;\n\n\t// Value = M\n\tfloat V = temp2.x;\n\n\treturn vec3(\n\t\tabs(temp2.z + (temp2.w - temp2.y) / (6.0 * C + epsilon)), // Hue\n\t\tC / (temp2.x + epsilon), // Saturation\n\t\tV); // Value\n}\n\nvec3 convertHue2RGB(float hue)\n{\n\tfloat r = abs(hue * 6.0 - 3.0) - 1.0;\n\tfloat g = 2.0 - abs(hue * 6.0 - 2.0);\n\tfloat b = 2.0 - abs(hue * 6.0 - 4.0);\n\treturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 convertHSV2RGB(vec3 hsv)\n{\n\tvec3 rgb = convertHue2RGB(hsv.x);\n\tfloat c = hsv.z * hsv.y;\n\treturn rgb * c + hsv.z - c;\n}\n#endif // !defined(DRAW_MODE_silhouette) && (defined(ENABLE_color))\n\nconst vec2 kCenter = vec2(0.5, 0.5);\n\nvoid main()\n{\n\t#if !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\tvec2 texcoord0 = v_texCoord;\n\n\t#ifdef ENABLE_mosaic\n\ttexcoord0 = fract(u_mosaic * texcoord0);\n\t#endif // ENABLE_mosaic\n\n\t#ifdef ENABLE_pixelate\n\t{\n\t\t// TODO: clean up "pixel" edges\n\t\tvec2 pixelTexelSize = u_skinSize / u_pixelate;\n\t\ttexcoord0 = (floor(texcoord0 * pixelTexelSize) + kCenter) / pixelTexelSize;\n\t}\n\t#endif // ENABLE_pixelate\n\n\t#ifdef ENABLE_whirl\n\t{\n\t\tconst float kRadius = 0.5;\n\t\tvec2 offset = texcoord0 - kCenter;\n\t\tfloat offsetMagnitude = length(offset);\n\t\tfloat whirlFactor = max(1.0 - (offsetMagnitude / kRadius), 0.0);\n\t\tfloat whirlActual = u_whirl * whirlFactor * whirlFactor;\n\t\tfloat sinWhirl = sin(whirlActual);\n\t\tfloat cosWhirl = cos(whirlActual);\n\t\tmat2 rotationMatrix = mat2(\n\t\t\tcosWhirl, -sinWhirl,\n\t\t\tsinWhirl, cosWhirl\n\t\t);\n\n\t\ttexcoord0 = rotationMatrix * offset + kCenter;\n\t}\n\t#endif // ENABLE_whirl\n\n\t#ifdef ENABLE_fisheye\n\t{\n\t\tvec2 vec = (texcoord0 - kCenter) / kCenter;\n\t\tfloat vecLength = length(vec);\n\t\tfloat r = pow(min(vecLength, 1.0), u_fisheye) * max(1.0, vecLength);\n\t\tvec2 unit = vec / vecLength;\n\n\t\ttexcoord0 = kCenter + r * unit * kCenter;\n\t}\n\t#endif // ENABLE_fisheye\n\n\tgl_FragColor = texture2D(u_skin, texcoord0);\n\n\t#if defined(ENABLE_color) || defined(ENABLE_brightness)\n\t// Divide premultiplied alpha values for proper color processing\n\t// Add epsilon to avoid dividing by 0 for fully transparent pixels\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb / (gl_FragColor.a + epsilon), 0.0, 1.0);\n\n\t#ifdef ENABLE_color\n\t{\n\t\tvec3 hsv = convertRGB2HSV(gl_FragColor.xyz);\n\n\t\t// this code forces grayscale values to be slightly saturated\n\t\t// so that some slight change of hue will be visible\n\t\tconst float minLightness = 0.11 / 2.0;\n\t\tconst float minSaturation = 0.09;\n\t\tif (hsv.z < minLightness) hsv = vec3(0.0, 1.0, minLightness);\n\t\telse if (hsv.y < minSaturation) hsv = vec3(0.0, minSaturation, hsv.z);\n\n\t\thsv.x = mod(hsv.x + u_color, 1.0);\n\t\tif (hsv.x < 0.0) hsv.x += 1.0;\n\n\t\tgl_FragColor.rgb = convertHSV2RGB(hsv);\n\t}\n\t#endif // ENABLE_color\n\n\t#ifdef ENABLE_brightness\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb + vec3(u_brightness), vec3(0), vec3(1));\n\t#endif // ENABLE_brightness\n\n\t// Re-multiply color values\n\tgl_FragColor.rgb *= gl_FragColor.a + epsilon;\n\n\t#endif // defined(ENABLE_color) || defined(ENABLE_brightness)\n\n\t#ifdef ENABLE_ghost\n\tgl_FragColor *= u_ghost;\n\t#endif // ENABLE_ghost\n\n\t#ifdef DRAW_MODE_silhouette\n\t// Discard fully transparent pixels for stencil test\n\tif (gl_FragColor.a == 0.0) {\n\t\tdiscard;\n\t}\n\t// switch to u_silhouetteColor only AFTER the alpha test\n\tgl_FragColor = u_silhouetteColor;\n\t#else // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_colorMask\n\tvec3 maskDistance = abs(gl_FragColor.rgb - u_colorMask);\n\tvec3 colorMaskTolerance = vec3(u_colorMaskTolerance, u_colorMaskTolerance, u_colorMaskTolerance);\n\tif (any(greaterThan(maskDistance, colorMaskTolerance)))\n\t{\n\t\tdiscard;\n\t}\n\t#endif // DRAW_MODE_colorMask\n\t#endif // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_straightAlpha\n\t// Un-premultiply alpha.\n\tgl_FragColor.rgb /= gl_FragColor.a + epsilon;\n\t#endif\n\n\t#endif // !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\n\t#ifdef DRAW_MODE_line\n\t// Maaaaagic antialiased-line-with-round-caps shader.\n\n\t// "along-the-lineness". This increases parallel to the line.\n\t// It goes from negative before the start point, to 0.5 through the start to the end, then ramps up again\n\t// past the end point.\n\tfloat d = ((v_texCoord.x - clamp(v_texCoord.x, 0.0, v_lineLength)) * 0.5) + 0.5;\n\n\t// Distance from (0.5, 0.5) to (d, the perpendicular coordinate). When we\'re in the middle of the line,\n\t// d will be 0.5, so the distance will be 0 at points close to the line and will grow at points further from it.\n\t// For the "caps", d will ramp down/up, giving us rounding.\n\t// See https://www.youtube.com/watch?v=PMltMdi1Wzg for a rough outline of the technique used to round the lines.\n\tfloat line = distance(vec2(0.5), vec2(d, v_texCoord.y)) * 2.0;\n\t// Expand out the line by its thickness.\n\tline -= ((v_lineThickness - 1.0) * 0.5);\n\t// Because "distance to the center of the line" decreases the closer we get to the line, but we want more opacity\n\t// the closer we are to the line, invert it.\n\tgl_FragColor = v_lineColor * clamp(1.0 - line, 0.0, 1.0);\n\t#endif // DRAW_MODE_line\n\n\t#ifdef DRAW_MODE_background\n\tgl_FragColor = u_backgroundColor;\n\t#endif\n}\n'},function(A,B){A.exports={rgbToHsv:(A,B)=>{let[t,e,g]=A,i=0;t/=255,e/=255,g/=255;let n=0;e{let[t,e,g]=A;if(0===e)return B[0]=B[1]=B[2]=255*g+.5,B;t%=1;const i=6*t|0,n=6*t-i,Q=g*(1-e),s=g*(1-e*n),r=g*(1-e*(1-n));let c=0,E=0,o=0;switch(i){case 0:c=g,E=r,o=Q;break;case 1:c=s,E=g,o=Q;break;case 2:c=Q,E=g,o=r;break;case 3:c=Q,E=s,o=g;break;case 4:c=r,E=Q,o=g;break;case 5:c=g,E=Q,o=s}return B[0]=255*c+.5,B[1]=255*E+.5,B[2]=255*o+.5,B}}},function(A,B,t){const e=t(10),g=t(33),i=t(25),n=t(26),Q={color4f:[0,0,1,1],diameter:1},s=[0,0,0,0];A.exports=class extends i{constructor(A,B){super(A,B),this._size=null,this._framebuffer=null,this._silhouetteDirty=!1,this._silhouettePixels=null,this._silhouetteImageData=null,this._lineOnBufferDrawRegionId={enter:()=>this._enterDrawLineOnBuffer(),exit:()=>this._exitDrawLineOnBuffer()},this._usePenBufferDrawRegionId={enter:()=>this._enterUsePenBuffer(),exit:()=>this._exitUsePenBuffer()},this.renderQuality=1,this._nativeSize=B.getNativeSize(),this._resetAttributeIndexes(),this.a_lineColor=new Float32Array(65520),this.a_lineThicknessAndLength=new Float32Array(32760),this.a_penPoints=new Float32Array(65520),this.a_position=new Float32Array(32760);for(let A=0;Athis._enterDrawTexture(),exit:()=>this._exitDrawTexture()},this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(B.getNativeSize())}dispose(){this._renderer.removeListener(g.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._nativeSize}useNearest(A){return Math.max(A[0],A[1])>=100}getTexture(A){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(A,B,t){this.drawLine(A,B,t,B,t)}drawLine(A,B,t,e,g){const i=A.diameter||Q.diameter,n=1===i||3===i?.5:0;this._drawLineOnBuffer(A,B+n,t+n,e+n,g+n),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){this._resetAttributeIndexes();const A=this._renderer.gl;e.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const B=this._lineShader;A.useProgram(B.program),e.setBuffersAndAttributes(A,B,this._lineBufferInfo);const t={u_skin:this._texture,u_stageSize:this._size};e.setUniforms(B,t)}_exitDrawLineOnBuffer(){this.a_lineColorIndex&&this._flushLines();const A=this._renderer.gl;e.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){e.bindFramebufferInfo(this._renderer.gl,null)}_enterDrawTexture(){this._enterUsePenBuffer();const A=this._renderer.gl;A.viewport(0,0,this._size[0],this._size[1]),A.useProgram(this._drawTextureShader.program),e.setBuffersAndAttributes(A,this._drawTextureShader,this._renderer._bufferInfo)}_exitDrawTexture(){this._exitUsePenBuffer()}_drawPenTexture(A){this._renderer.enterDrawRegion(this._drawTextureRegionId);const B=this._renderer.gl,t=this._size[0],g=this._size[1],i={u_skin:A,u_projectionMatrix:e.m4.ortho(t/2,t/-2,g/-2,g/2,-1,1,e.m4.identity()),u_modelMatrix:e.m4.scaling(e.v3.create(t,g,0),e.m4.identity())};e.setTextureParameters(B,A,{minMag:B.NEAREST}),e.setUniforms(this._drawTextureShader,i),e.drawBufferInfo(B,this._renderer._bufferInfo,B.TRIANGLES)}_drawLineOnBuffer(A,B,t,e,g){this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId),this.a_lineColorIndex+24>65520&&this._flushLines();const i=A.color4f||Q.color4f;s[0]=i[0]*i[3],s[1]=i[1]*i[3],s[2]=i[2]*i[3],s[3]=i[3],B*=this.renderQuality,t*=this.renderQuality;const n=(e*=this.renderQuality)-B,r=(g*=this.renderQuality)-t,c=Math.sqrt(n*n+r*r),E=(A.diameter||Q.diameter)*this.renderQuality;for(let A=0;A<6;A++)this.a_lineColor[this.a_lineColorIndex]=s[0],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=s[1],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=s[2],this.a_lineColorIndex++,this.a_lineColor[this.a_lineColorIndex]=s[3],this.a_lineColorIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=E,this.a_lineThicknessAndLengthIndex++,this.a_lineThicknessAndLength[this.a_lineThicknessAndLengthIndex]=c,this.a_lineThicknessAndLengthIndex++,this.a_penPoints[this.a_penPointsIndex]=B,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-t,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=n,this.a_penPointsIndex++,this.a_penPoints[this.a_penPointsIndex]=-r,this.a_penPointsIndex++}_resetAttributeIndexes(){this.a_lineColorIndex=0,this.a_lineThicknessAndLengthIndex=0,this.a_penPointsIndex=0}_flushLines(){const A=this._renderer.gl,B=this._lineShader;this.a_lineColorIndex<1e3?(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,new Float32Array(this.a_lineColor.buffer,0,this.a_lineColorIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,new Float32Array(this.a_penPoints.buffer,0,this.a_penPointsIndex),0),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,new Float32Array(this.a_lineThicknessAndLength.buffer,0,this.a_lineThicknessAndLengthIndex),0)):(e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineColor,this.a_lineColor),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_penPoints,this.a_penPoints),e.setAttribInfoBufferFromArray(A,this._lineBufferInfo.attribs.a_lineThicknessAndLength,this.a_lineThicknessAndLength)),e.setBuffersAndAttributes(A,B,this._lineBufferInfo),e.drawBufferInfo(A,this._lineBufferInfo,A.TRIANGLES,this.a_lineThicknessAndLengthIndex/2),this._resetAttributeIndexes(),this._silhouetteDirty=!0}onNativeSizeChanged(A){this._nativeSize=A.newSize,this._setCanvasSize([A.newSize[0]*this.renderQuality,A.newSize[1]*this.renderQuality]),this.emitWasAltered()}_setCanvasSize(A){const[B,t]=A;if(this._size&&this._size[0]===B&&this._size[1]===t)return;this._size=A,this._rotationCenter[0]=this._nativeSize[0]/2,this._rotationCenter[1]=this._nativeSize[1]/2;const g=this._renderer.gl,i=this._texture;this._texture=e.createTexture(g,{mag:g.NEAREST,min:g.NEAREST,wrap:g.CLAMP_TO_EDGE,width:B,height:t});const n=[{format:g.RGBA,attachment:this._texture}];this._framebuffer,this._framebuffer=e.createFramebufferInfo(g,n,B,t),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),i&&this._drawPenTexture(i),this._silhouettePixels=new Uint8Array(Math.floor(B*t*4)),this._silhouetteImageData=new ImageData(B,t),this._silhouetteDirty=!0}setRenderQuality(A){this.renderQuality!==A&&(this.renderQuality=A,this._setCanvasSize([Math.round(this._nativeSize[0]*A),Math.round(this._nativeSize[1]*A)]))}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.readPixels(0,0,this._size[0],this._size[1],A.RGBA,A.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(A,B,t){const e=t(10),g=t(25),{loadSvgString:i,serializeSvgToString:n}=t(286),Q=t(26);A.exports=class extends g{constructor(A,B){super(A,B),this._svgImage=document.createElement("img"),this._svgImageLoaded=!1,this._size=[0,0],this._canvas=document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._scaledMIPs=[],this._largestMIPScale=0,this._maxTextureScale=1}dispose(){this.resetMIPs(),super.dispose()}get size(){return[this._size[0],this._size[1]]}useNearest(A,B){return 0==(B.enabledEffects&(Q.EFFECT_INFO.fisheye.mask|Q.EFFECT_INFO.whirl.mask|Q.EFFECT_INFO.pixelate.mask|Q.EFFECT_INFO.mosaic.mask))&&(B._direction%90==0&&(Math.abs(A[0])>99&&Math.abs(A[0])<101&&Math.abs(A[1])>99&&Math.abs(A[1])<101))}createMIP(A){const B=this._largestMIPScale0&&void 0!==arguments[0]?arguments[0]:[100,100];this.getTexture(A),this._silhouette.unlazy()}getTexture(A){const B=A?Math.max(Math.abs(A[0]),Math.abs(A[1])):100,t=Math.min(B/100,this._maxTextureScale),e=Math.max(Math.ceil(Math.log2(t))+8,0),g=Math.pow(2,e-8);return this._svgImageLoaded&&!this._scaledMIPs[e]&&(this._scaledMIPs[e]=this.createMIP(g)),this._scaledMIPs[e]||super.getTexture()}resetMIPs(){this._scaledMIPs.forEach(A=>this._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,B){const t=i(A),e=n(t,!0);this._svgImageLoaded=!1;const{x:g,y:Q,width:s,height:r}=t.viewBox.baseVal;this._size[0]=s,this._size[1]=r,this._svgImage.onload=()=>{if(0===s||0===r)return void super.setEmptyImageData();const A=Math.ceil(Math.max(s,r));let t=2;for(;A*t<=2048;t*=2)this._maxTextureScale=t;this.resetMIPs(),void 0===B&&(B=this.calculateRotationCenter()),this._rotationCenter[0]=B[0]-g,this._rotationCenter[1]=B[1]-Q,this._svgImageLoaded=!0,this.emitWasAltered()},this._svgImage.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(e))}}},function(A,B,t){const e=t(287),g=t(291),i=t(98),n=t(95),Q=t(97),s=t(46),r=t(96);A.exports={BitmapAdapter:g,convertFonts:r,inlineSvgFonts:i,loadSvgString:n,serializeSvgToString:Q,SvgElement:s,SVGRenderer:e}},function(A,B,t){const e=t(95),g=t(97);A.exports=class{constructor(A){this._canvas=A||document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._measurements={x:0,y:0,width:0,height:0},this._cachedImage=null,this.loaded=!1}get canvas(){return this._canvas}get size(){return[this._measurements.width,this._measurements.height]}get viewOffset(){return[this._measurements.x,this._measurements.y]}loadString(A,B){this._cachedImage=null;const t=e(A,B);this._svgTag=t,this._measurements={width:t.viewBox.baseVal.width,height:t.viewBox.baseVal.height,x:t.viewBox.baseVal.x,y:t.viewBox.baseVal.y}}loadSVG(A,B,t){this.loadString(A,B),this._createSVGImage(t)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const B=this._cachedImage;B.onload=()=>{this.loaded=!0,A&&A()};const t=this.toString(!0);B.src="data:image/svg+xml;utf8,".concat(encodeURIComponent(t)),this.loaded=!1}toString(A){return g(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const B=Number.isFinite(A)?A:1,t=this._measurements;this._canvas.width=t.width*B,this._canvas.height=t.height*B,this._canvas.width<=0||this._canvas.height<=0||this._cachedImage.naturalWidth<=0||this._cachedImage.naturalHeight<=0||(this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>"".concat(B,"data:image/png")));const t=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(t)&&(A=A.replace(t,(A,B)=>"".concat(B,'"http://dummy.namespace"'))),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"