UNPKG

next

Version:

The React Framework

1 lines • 2.56 MB
(function(){var v={12917:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.cloneNode=cloneNode;function cloneNode(v){return Object.assign({},v)}},13804:function(v,E,P){"use strict";Object.defineProperty(E,"__esModule",{value:true});var R={numberLiteralFromRaw:true,withLoc:true,withRaw:true,funcParam:true,indexLiteral:true,memIndexLiteral:true,instruction:true,objectInstruction:true,traverse:true,signatures:true,cloneNode:true,moduleContextFromModuleAST:true};Object.defineProperty(E,"numberLiteralFromRaw",{enumerable:true,get:function get(){return N.numberLiteralFromRaw}});Object.defineProperty(E,"withLoc",{enumerable:true,get:function get(){return N.withLoc}});Object.defineProperty(E,"withRaw",{enumerable:true,get:function get(){return N.withRaw}});Object.defineProperty(E,"funcParam",{enumerable:true,get:function get(){return N.funcParam}});Object.defineProperty(E,"indexLiteral",{enumerable:true,get:function get(){return N.indexLiteral}});Object.defineProperty(E,"memIndexLiteral",{enumerable:true,get:function get(){return N.memIndexLiteral}});Object.defineProperty(E,"instruction",{enumerable:true,get:function get(){return N.instruction}});Object.defineProperty(E,"objectInstruction",{enumerable:true,get:function get(){return N.objectInstruction}});Object.defineProperty(E,"traverse",{enumerable:true,get:function get(){return L.traverse}});Object.defineProperty(E,"signatures",{enumerable:true,get:function get(){return q.signatures}});Object.defineProperty(E,"cloneNode",{enumerable:true,get:function get(){return ae.cloneNode}});Object.defineProperty(E,"moduleContextFromModuleAST",{enumerable:true,get:function get(){return ge.moduleContextFromModuleAST}});var $=P(37870);Object.keys($).forEach((function(v){if(v==="default"||v==="__esModule")return;if(Object.prototype.hasOwnProperty.call(R,v))return;if(v in E&&E[v]===$[v])return;Object.defineProperty(E,v,{enumerable:true,get:function get(){return $[v]}})}));var N=P(24327);var L=P(5530);var q=P(965);var K=P(23546);Object.keys(K).forEach((function(v){if(v==="default"||v==="__esModule")return;if(Object.prototype.hasOwnProperty.call(R,v))return;if(v in E&&E[v]===K[v])return;Object.defineProperty(E,v,{enumerable:true,get:function get(){return K[v]}})}));var ae=P(12917);var ge=P(9590)},24327:function(v,E,P){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.numberLiteralFromRaw=numberLiteralFromRaw;E.instruction=instruction;E.objectInstruction=objectInstruction;E.withLoc=withLoc;E.withRaw=withRaw;E.funcParam=funcParam;E.indexLiteral=indexLiteral;E.memIndexLiteral=memIndexLiteral;var R=P(37197);var $=P(37870);function numberLiteralFromRaw(v){var E=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"i32";var P=v;if(typeof v==="string"){v=v.replace(/_/g,"")}if(typeof v==="number"){return(0,$.numberLiteral)(v,String(P))}else{switch(E){case"i32":{return(0,$.numberLiteral)((0,R.parse32I)(v),String(P))}case"u32":{return(0,$.numberLiteral)((0,R.parseU32)(v),String(P))}case"i64":{return(0,$.longNumberLiteral)((0,R.parse64I)(v),String(P))}case"f32":{return(0,$.floatLiteral)((0,R.parse32F)(v),(0,R.isNanLiteral)(v),(0,R.isInfLiteral)(v),String(P))}default:{return(0,$.floatLiteral)((0,R.parse64F)(v),(0,R.isNanLiteral)(v),(0,R.isInfLiteral)(v),String(P))}}}}function instruction(v){var E=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var P=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,$.instr)(v,undefined,E,P)}function objectInstruction(v,E){var P=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var R=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};return(0,$.instr)(v,E,P,R)}function withLoc(v,E,P){var R={start:P,end:E};v.loc=R;return v}function withRaw(v,E){v.raw=E;return v}function funcParam(v,E){return{id:E,valtype:v}}function indexLiteral(v){var E=numberLiteralFromRaw(v,"u32");return E}function memIndexLiteral(v){var E=numberLiteralFromRaw(v,"u32");return E}},85505:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.createPath=createPath;function ownKeys(v,E){var P=Object.keys(v);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(v);if(E){R=R.filter((function(E){return Object.getOwnPropertyDescriptor(v,E).enumerable}))}P.push.apply(P,R)}return P}function _objectSpread(v){for(var E=1;E<arguments.length;E++){var P=arguments[E]!=null?arguments[E]:{};if(E%2){ownKeys(Object(P),true).forEach((function(E){_defineProperty(v,E,P[E])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(v,Object.getOwnPropertyDescriptors(P))}else{ownKeys(Object(P)).forEach((function(E){Object.defineProperty(v,E,Object.getOwnPropertyDescriptor(P,E))}))}}return v}function _defineProperty(v,E,P){if(E in v){Object.defineProperty(v,E,{value:P,enumerable:true,configurable:true,writable:true})}else{v[E]=P}return v}function findParent(v,E){var P=v.parentPath;if(P==null){throw new Error("node is root")}var R=P;while(E(R)!==false){if(R.parentPath==null){return null}R=R.parentPath}return R.node}function insertBefore(v,E){return insert(v,E)}function insertAfter(v,E){return insert(v,E,1)}function insert(v,E){var P=v.node,R=v.inList,$=v.parentPath,N=v.parentKey;var L=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!R){throw new Error("inList"+" error: "+("insert can only be used for nodes that are within lists"||0))}if(!($!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var q=$.node[N];var K=q.findIndex((function(v){return v===P}));q.splice(K+L,0,E)}function remove(v){var E=v.node,P=v.parentKey,R=v.parentPath;if(!(R!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var $=R.node;var N=$[P];if(Array.isArray(N)){$[P]=N.filter((function(v){return v!==E}))}else{delete $[P]}E._deleted=true}function stop(v){v.shouldStop=true}function replaceWith(v,E){var P=v.parentPath.node;var R=P[v.parentKey];if(Array.isArray(R)){var $=R.findIndex((function(E){return E===v.node}));R.splice($,1,E)}else{P[v.parentKey]=E}v.node._deleted=true;v.node=E}function bindNodeOperations(v,E){var P=Object.keys(v);var R={};P.forEach((function(P){R[P]=v[P].bind(null,E)}));return R}function createPathOperations(v){return bindNodeOperations({findParent:findParent,replaceWith:replaceWith,remove:remove,insertBefore:insertBefore,insertAfter:insertAfter,stop:stop},v)}function createPath(v){var E=_objectSpread({},v);Object.assign(E,createPathOperations(E));return E}},37870:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.module=_module;E.moduleMetadata=moduleMetadata;E.moduleNameMetadata=moduleNameMetadata;E.functionNameMetadata=functionNameMetadata;E.localNameMetadata=localNameMetadata;E.binaryModule=binaryModule;E.quoteModule=quoteModule;E.sectionMetadata=sectionMetadata;E.producersSectionMetadata=producersSectionMetadata;E.producerMetadata=producerMetadata;E.producerMetadataVersionedName=producerMetadataVersionedName;E.loopInstruction=loopInstruction;E.instr=instr;E.ifInstruction=ifInstruction;E.stringLiteral=stringLiteral;E.numberLiteral=numberLiteral;E.longNumberLiteral=longNumberLiteral;E.floatLiteral=floatLiteral;E.elem=elem;E.indexInFuncSection=indexInFuncSection;E.valtypeLiteral=valtypeLiteral;E.typeInstruction=typeInstruction;E.start=start;E.globalType=globalType;E.leadingComment=leadingComment;E.blockComment=blockComment;E.data=data;E.global=global;E.table=table;E.memory=memory;E.funcImportDescr=funcImportDescr;E.moduleImport=moduleImport;E.moduleExportDescr=moduleExportDescr;E.moduleExport=moduleExport;E.limit=limit;E.signature=signature;E.program=program;E.identifier=identifier;E.blockInstruction=blockInstruction;E.callInstruction=callInstruction;E.callIndirectInstruction=callIndirectInstruction;E.byteArray=byteArray;E.func=func;E.internalBrUnless=internalBrUnless;E.internalGoto=internalGoto;E.internalCallExtern=internalCallExtern;E.internalEndAndReturn=internalEndAndReturn;E.assertInternalCallExtern=E.assertInternalGoto=E.assertInternalBrUnless=E.assertFunc=E.assertByteArray=E.assertCallIndirectInstruction=E.assertCallInstruction=E.assertBlockInstruction=E.assertIdentifier=E.assertProgram=E.assertSignature=E.assertLimit=E.assertModuleExport=E.assertModuleExportDescr=E.assertModuleImport=E.assertFuncImportDescr=E.assertMemory=E.assertTable=E.assertGlobal=E.assertData=E.assertBlockComment=E.assertLeadingComment=E.assertGlobalType=E.assertStart=E.assertTypeInstruction=E.assertValtypeLiteral=E.assertIndexInFuncSection=E.assertElem=E.assertFloatLiteral=E.assertLongNumberLiteral=E.assertNumberLiteral=E.assertStringLiteral=E.assertIfInstruction=E.assertInstr=E.assertLoopInstruction=E.assertProducerMetadataVersionedName=E.assertProducerMetadata=E.assertProducersSectionMetadata=E.assertSectionMetadata=E.assertQuoteModule=E.assertBinaryModule=E.assertLocalNameMetadata=E.assertFunctionNameMetadata=E.assertModuleNameMetadata=E.assertModuleMetadata=E.assertModule=E.isIntrinsic=E.isImportDescr=E.isNumericLiteral=E.isExpression=E.isInstruction=E.isBlock=E.isNode=E.isInternalEndAndReturn=E.isInternalCallExtern=E.isInternalGoto=E.isInternalBrUnless=E.isFunc=E.isByteArray=E.isCallIndirectInstruction=E.isCallInstruction=E.isBlockInstruction=E.isIdentifier=E.isProgram=E.isSignature=E.isLimit=E.isModuleExport=E.isModuleExportDescr=E.isModuleImport=E.isFuncImportDescr=E.isMemory=E.isTable=E.isGlobal=E.isData=E.isBlockComment=E.isLeadingComment=E.isGlobalType=E.isStart=E.isTypeInstruction=E.isValtypeLiteral=E.isIndexInFuncSection=E.isElem=E.isFloatLiteral=E.isLongNumberLiteral=E.isNumberLiteral=E.isStringLiteral=E.isIfInstruction=E.isInstr=E.isLoopInstruction=E.isProducerMetadataVersionedName=E.isProducerMetadata=E.isProducersSectionMetadata=E.isSectionMetadata=E.isQuoteModule=E.isBinaryModule=E.isLocalNameMetadata=E.isFunctionNameMetadata=E.isModuleNameMetadata=E.isModuleMetadata=E.isModule=void 0;E.nodeAndUnionTypes=E.unionTypesMap=E.assertInternalEndAndReturn=void 0;function _typeof(v){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function isTypeOf(v){return function(E){return E.type===v}}function assertTypeOf(v){return function(E){return function(){if(!(E.type===v)){throw new Error("n.type === t"+" error: "+(undefined||"unknown"))}}()}}function _module(v,E,P){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof fields === "object" && typeof fields.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"Module",id:v,fields:E};if(typeof P!=="undefined"){R.metadata=P}return R}function moduleMetadata(v,E,P,R){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof sections === "object" && typeof sections.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof functionNames === "object" && typeof functionNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if(P!==null&&P!==undefined){if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof localNames === "object" && typeof localNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if(R!==null&&R!==undefined){if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var $={type:"ModuleMetadata",sections:v};if(typeof E!=="undefined"&&E.length>0){$.functionNames=E}if(typeof P!=="undefined"&&P.length>0){$.localNames=P}if(typeof R!=="undefined"&&R.length>0){$.producers=R}return $}function moduleNameMetadata(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"ModuleNameMetadata",value:v};return E}function functionNameMetadata(v,E){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="number")){throw new Error('typeof index === "number"'+" error: "+("Argument index must be of type number, given: "+_typeof(E)||0))}var P={type:"FunctionNameMetadata",value:v,index:E};return P}function localNameMetadata(v,E,P){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="number")){throw new Error('typeof localIndex === "number"'+" error: "+("Argument localIndex must be of type number, given: "+_typeof(E)||0))}if(!(typeof P==="number")){throw new Error('typeof functionIndex === "number"'+" error: "+("Argument functionIndex must be of type number, given: "+_typeof(P)||0))}var R={type:"LocalNameMetadata",value:v,localIndex:E,functionIndex:P};return R}function binaryModule(v,E){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof blob === "object" && typeof blob.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"BinaryModule",id:v,blob:E};return P}function quoteModule(v,E){if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof string === "object" && typeof string.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"QuoteModule",id:v,string:E};return P}function sectionMetadata(v,E,P,R){if(!(typeof E==="number")){throw new Error('typeof startOffset === "number"'+" error: "+("Argument startOffset must be of type number, given: "+_typeof(E)||0))}var $={type:"SectionMetadata",section:v,startOffset:E,size:P,vectorOfSize:R};return $}function producersSectionMetadata(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"ProducersSectionMetadata",producers:v};return E}function producerMetadata(v,E,P){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof language === "object" && typeof language.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof processedBy === "object" && typeof processedBy.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof sdk === "object" && typeof sdk.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"ProducerMetadata",language:v,processedBy:E,sdk:P};return R}function producerMetadataVersionedName(v,E){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof version === "string"'+" error: "+("Argument version must be of type string, given: "+_typeof(E)||0))}var P={type:"ProducerMetadataVersionedName",name:v,version:E};return P}function loopInstruction(v,E,P){if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"LoopInstruction",id:"loop",label:v,resulttype:E,instr:P};return R}function instr(v,E,P,R){if(!(typeof v==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(v)||0))}if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof args === "object" && typeof args.length !== "undefined"'+" error: "+(undefined||"unknown"))}var $={type:"Instr",id:v,args:P};if(typeof E!=="undefined"){$.object=E}if(typeof R!=="undefined"&&Object.keys(R).length!==0){$.namedArgs=R}return $}function ifInstruction(v,E,P,R,$){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof test === "object" && typeof test.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof consequent === "object" && typeof consequent.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof($)==="object"&&typeof $.length!=="undefined")){throw new Error('typeof alternate === "object" && typeof alternate.length !== "undefined"'+" error: "+(undefined||"unknown"))}var N={type:"IfInstruction",id:"if",testLabel:v,test:E,result:P,consequent:R,alternate:$};return N}function stringLiteral(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"StringLiteral",value:v};return E}function numberLiteral(v,E){if(!(typeof v==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}var P={type:"NumberLiteral",value:v,raw:E};return P}function longNumberLiteral(v,E){if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}var P={type:"LongNumberLiteral",value:v,raw:E};return P}function floatLiteral(v,E,P,R){if(!(typeof v==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="boolean")){throw new Error('typeof nan === "boolean"'+" error: "+("Argument nan must be of type boolean, given: "+_typeof(E)||0))}}if(P!==null&&P!==undefined){if(!(typeof P==="boolean")){throw new Error('typeof inf === "boolean"'+" error: "+("Argument inf must be of type boolean, given: "+_typeof(P)||0))}}if(!(typeof R==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(R)||0))}var $={type:"FloatLiteral",value:v,raw:R};if(E===true){$.nan=true}if(P===true){$.inf=true}return $}function elem(v,E,P){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof offset === "object" && typeof offset.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof funcs === "object" && typeof funcs.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"Elem",table:v,offset:E,funcs:P};return R}function indexInFuncSection(v){var E={type:"IndexInFuncSection",index:v};return E}function valtypeLiteral(v){var E={type:"ValtypeLiteral",name:v};return E}function typeInstruction(v,E){var P={type:"TypeInstruction",id:v,functype:E};return P}function start(v){var E={type:"Start",index:v};return E}function globalType(v,E){var P={type:"GlobalType",valtype:v,mutability:E};return P}function leadingComment(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"LeadingComment",value:v};return E}function blockComment(v){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}var E={type:"BlockComment",value:v};return E}function data(v,E,P){var R={type:"Data",memoryIndex:v,offset:E,init:P};return R}function global(v,E,P){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof init === "object" && typeof init.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"Global",globalType:v,init:E,name:P};return R}function table(v,E,P,R){if(!(E.type==="Limit")){throw new Error('limits.type === "Limit"'+" error: "+("Argument limits must be of type Limit, given: "+E.type||0))}if(R!==null&&R!==undefined){if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof elements === "object" && typeof elements.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var $={type:"Table",elementType:v,limits:E,name:P};if(typeof R!=="undefined"&&R.length>0){$.elements=R}return $}function memory(v,E){var P={type:"Memory",limits:v,id:E};return P}function funcImportDescr(v,E){var P={type:"FuncImportDescr",id:v,signature:E};return P}function moduleImport(v,E,P){if(!(typeof v==="string")){throw new Error('typeof module === "string"'+" error: "+("Argument module must be of type string, given: "+_typeof(v)||0))}if(!(typeof E==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(E)||0))}var R={type:"ModuleImport",module:v,name:E,descr:P};return R}function moduleExportDescr(v,E){var P={type:"ModuleExportDescr",exportType:v,id:E};return P}function moduleExport(v,E){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(v)||0))}var P={type:"ModuleExport",name:v,descr:E};return P}function limit(v,E,P){if(!(typeof v==="number")){throw new Error('typeof min === "number"'+" error: "+("Argument min must be of type number, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="number")){throw new Error('typeof max === "number"'+" error: "+("Argument max must be of type number, given: "+_typeof(E)||0))}}if(P!==null&&P!==undefined){if(!(typeof P==="boolean")){throw new Error('typeof shared === "boolean"'+" error: "+("Argument shared must be of type boolean, given: "+_typeof(P)||0))}}var R={type:"Limit",min:v};if(typeof E!=="undefined"){R.max=E}if(P===true){R.shared=true}return R}function signature(v,E){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof params === "object" && typeof params.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof results === "object" && typeof results.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"Signature",params:v,results:E};return P}function program(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"Program",body:v};return E}function identifier(v,E){if(!(typeof v==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(v)||0))}if(E!==null&&E!==undefined){if(!(typeof E==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(E)||0))}}var P={type:"Identifier",value:v};if(typeof E!=="undefined"){P.raw=E}return P}function blockInstruction(v,E,P){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"BlockInstruction",id:"block",label:v,instr:E,result:P};return R}function callInstruction(v,E,P){if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof instrArgs === "object" && typeof instrArgs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var R={type:"CallInstruction",id:"call",index:v};if(typeof E!=="undefined"&&E.length>0){R.instrArgs=E}if(typeof P!=="undefined"){R.numeric=P}return R}function callIndirectInstruction(v,E){if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof intrs === "object" && typeof intrs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var P={type:"CallIndirectInstruction",id:"call_indirect",signature:v};if(typeof E!=="undefined"&&E.length>0){P.intrs=E}return P}function byteArray(v){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof values === "object" && typeof values.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"ByteArray",values:v};return E}function func(v,E,P,R,$){if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(R!==null&&R!==undefined){if(!(typeof R==="boolean")){throw new Error('typeof isExternal === "boolean"'+" error: "+("Argument isExternal must be of type boolean, given: "+_typeof(R)||0))}}var N={type:"Func",name:v,signature:E,body:P};if(R===true){N.isExternal=true}if(typeof $!=="undefined"){N.metadata=$}return N}function internalBrUnless(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalBrUnless",target:v};return E}function internalGoto(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalGoto",target:v};return E}function internalCallExtern(v){if(!(typeof v==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(v)||0))}var E={type:"InternalCallExtern",target:v};return E}function internalEndAndReturn(){var v={type:"InternalEndAndReturn"};return v}var P=isTypeOf("Module");E.isModule=P;var R=isTypeOf("ModuleMetadata");E.isModuleMetadata=R;var $=isTypeOf("ModuleNameMetadata");E.isModuleNameMetadata=$;var N=isTypeOf("FunctionNameMetadata");E.isFunctionNameMetadata=N;var L=isTypeOf("LocalNameMetadata");E.isLocalNameMetadata=L;var q=isTypeOf("BinaryModule");E.isBinaryModule=q;var K=isTypeOf("QuoteModule");E.isQuoteModule=K;var ae=isTypeOf("SectionMetadata");E.isSectionMetadata=ae;var ge=isTypeOf("ProducersSectionMetadata");E.isProducersSectionMetadata=ge;var be=isTypeOf("ProducerMetadata");E.isProducerMetadata=be;var xe=isTypeOf("ProducerMetadataVersionedName");E.isProducerMetadataVersionedName=xe;var ve=isTypeOf("LoopInstruction");E.isLoopInstruction=ve;var Ce=isTypeOf("Instr");E.isInstr=Ce;var Ie=isTypeOf("IfInstruction");E.isIfInstruction=Ie;var He=isTypeOf("StringLiteral");E.isStringLiteral=He;var Qe=isTypeOf("NumberLiteral");E.isNumberLiteral=Qe;var Je=isTypeOf("LongNumberLiteral");E.isLongNumberLiteral=Je;var Ve=isTypeOf("FloatLiteral");E.isFloatLiteral=Ve;var Ke=isTypeOf("Elem");E.isElem=Ke;var Ye=isTypeOf("IndexInFuncSection");E.isIndexInFuncSection=Ye;var Xe=isTypeOf("ValtypeLiteral");E.isValtypeLiteral=Xe;var Ze=isTypeOf("TypeInstruction");E.isTypeInstruction=Ze;var et=isTypeOf("Start");E.isStart=et;var tt=isTypeOf("GlobalType");E.isGlobalType=tt;var nt=isTypeOf("LeadingComment");E.isLeadingComment=nt;var st=isTypeOf("BlockComment");E.isBlockComment=st;var rt=isTypeOf("Data");E.isData=rt;var ot=isTypeOf("Global");E.isGlobal=ot;var it=isTypeOf("Table");E.isTable=it;var at=isTypeOf("Memory");E.isMemory=at;var ct=isTypeOf("FuncImportDescr");E.isFuncImportDescr=ct;var lt=isTypeOf("ModuleImport");E.isModuleImport=lt;var ut=isTypeOf("ModuleExportDescr");E.isModuleExportDescr=ut;var pt=isTypeOf("ModuleExport");E.isModuleExport=pt;var dt=isTypeOf("Limit");E.isLimit=dt;var ft=isTypeOf("Signature");E.isSignature=ft;var ht=isTypeOf("Program");E.isProgram=ht;var mt=isTypeOf("Identifier");E.isIdentifier=mt;var gt=isTypeOf("BlockInstruction");E.isBlockInstruction=gt;var yt=isTypeOf("CallInstruction");E.isCallInstruction=yt;var bt=isTypeOf("CallIndirectInstruction");E.isCallIndirectInstruction=bt;var xt=isTypeOf("ByteArray");E.isByteArray=xt;var kt=isTypeOf("Func");E.isFunc=kt;var vt=isTypeOf("InternalBrUnless");E.isInternalBrUnless=vt;var wt=isTypeOf("InternalGoto");E.isInternalGoto=wt;var Ct=isTypeOf("InternalCallExtern");E.isInternalCallExtern=Ct;var Et=isTypeOf("InternalEndAndReturn");E.isInternalEndAndReturn=Et;var At=function isNode(v){return P(v)||R(v)||$(v)||N(v)||L(v)||q(v)||K(v)||ae(v)||ge(v)||be(v)||xe(v)||ve(v)||Ce(v)||Ie(v)||He(v)||Qe(v)||Je(v)||Ve(v)||Ke(v)||Ye(v)||Xe(v)||Ze(v)||et(v)||tt(v)||nt(v)||st(v)||rt(v)||ot(v)||it(v)||at(v)||ct(v)||lt(v)||ut(v)||pt(v)||dt(v)||ft(v)||ht(v)||mt(v)||gt(v)||yt(v)||bt(v)||xt(v)||kt(v)||vt(v)||wt(v)||Ct(v)||Et(v)};E.isNode=At;var St=function isBlock(v){return ve(v)||gt(v)||kt(v)};E.isBlock=St;var _t=function isInstruction(v){return ve(v)||Ce(v)||Ie(v)||Ze(v)||gt(v)||yt(v)||bt(v)};E.isInstruction=_t;var Mt=function isExpression(v){return Ce(v)||He(v)||Qe(v)||Je(v)||Ve(v)||Xe(v)||mt(v)};E.isExpression=Mt;var Pt=function isNumericLiteral(v){return Qe(v)||Je(v)||Ve(v)};E.isNumericLiteral=Pt;var It=function isImportDescr(v){return tt(v)||it(v)||at(v)||ct(v)};E.isImportDescr=It;var Ot=function isIntrinsic(v){return vt(v)||wt(v)||Ct(v)||Et(v)};E.isIntrinsic=Ot;var Dt=assertTypeOf("Module");E.assertModule=Dt;var Rt=assertTypeOf("ModuleMetadata");E.assertModuleMetadata=Rt;var $t=assertTypeOf("ModuleNameMetadata");E.assertModuleNameMetadata=$t;var Tt=assertTypeOf("FunctionNameMetadata");E.assertFunctionNameMetadata=Tt;var Ft=assertTypeOf("LocalNameMetadata");E.assertLocalNameMetadata=Ft;var jt=assertTypeOf("BinaryModule");E.assertBinaryModule=jt;var Nt=assertTypeOf("QuoteModule");E.assertQuoteModule=Nt;var Lt=assertTypeOf("SectionMetadata");E.assertSectionMetadata=Lt;var Bt=assertTypeOf("ProducersSectionMetadata");E.assertProducersSectionMetadata=Bt;var qt=assertTypeOf("ProducerMetadata");E.assertProducerMetadata=qt;var zt=assertTypeOf("ProducerMetadataVersionedName");E.assertProducerMetadataVersionedName=zt;var Ut=assertTypeOf("LoopInstruction");E.assertLoopInstruction=Ut;var Gt=assertTypeOf("Instr");E.assertInstr=Gt;var Ht=assertTypeOf("IfInstruction");E.assertIfInstruction=Ht;var Wt=assertTypeOf("StringLiteral");E.assertStringLiteral=Wt;var Qt=assertTypeOf("NumberLiteral");E.assertNumberLiteral=Qt;var Jt=assertTypeOf("LongNumberLiteral");E.assertLongNumberLiteral=Jt;var Vt=assertTypeOf("FloatLiteral");E.assertFloatLiteral=Vt;var Kt=assertTypeOf("Elem");E.assertElem=Kt;var Yt=assertTypeOf("IndexInFuncSection");E.assertIndexInFuncSection=Yt;var Xt=assertTypeOf("ValtypeLiteral");E.assertValtypeLiteral=Xt;var Zt=assertTypeOf("TypeInstruction");E.assertTypeInstruction=Zt;var en=assertTypeOf("Start");E.assertStart=en;var tn=assertTypeOf("GlobalType");E.assertGlobalType=tn;var nn=assertTypeOf("LeadingComment");E.assertLeadingComment=nn;var sn=assertTypeOf("BlockComment");E.assertBlockComment=sn;var rn=assertTypeOf("Data");E.assertData=rn;var on=assertTypeOf("Global");E.assertGlobal=on;var an=assertTypeOf("Table");E.assertTable=an;var cn=assertTypeOf("Memory");E.assertMemory=cn;var ln=assertTypeOf("FuncImportDescr");E.assertFuncImportDescr=ln;var un=assertTypeOf("ModuleImport");E.assertModuleImport=un;var pn=assertTypeOf("ModuleExportDescr");E.assertModuleExportDescr=pn;var dn=assertTypeOf("ModuleExport");E.assertModuleExport=dn;var hn=assertTypeOf("Limit");E.assertLimit=hn;var mn=assertTypeOf("Signature");E.assertSignature=mn;var gn=assertTypeOf("Program");E.assertProgram=gn;var yn=assertTypeOf("Identifier");E.assertIdentifier=yn;var bn=assertTypeOf("BlockInstruction");E.assertBlockInstruction=bn;var xn=assertTypeOf("CallInstruction");E.assertCallInstruction=xn;var kn=assertTypeOf("CallIndirectInstruction");E.assertCallIndirectInstruction=kn;var vn=assertTypeOf("ByteArray");E.assertByteArray=vn;var wn=assertTypeOf("Func");E.assertFunc=wn;var Cn=assertTypeOf("InternalBrUnless");E.assertInternalBrUnless=Cn;var En=assertTypeOf("InternalGoto");E.assertInternalGoto=En;var An=assertTypeOf("InternalCallExtern");E.assertInternalCallExtern=An;var Sn=assertTypeOf("InternalEndAndReturn");E.assertInternalEndAndReturn=Sn;var _n={Module:["Node"],ModuleMetadata:["Node"],ModuleNameMetadata:["Node"],FunctionNameMetadata:["Node"],LocalNameMetadata:["Node"],BinaryModule:["Node"],QuoteModule:["Node"],SectionMetadata:["Node"],ProducersSectionMetadata:["Node"],ProducerMetadata:["Node"],ProducerMetadataVersionedName:["Node"],LoopInstruction:["Node","Block","Instruction"],Instr:["Node","Expression","Instruction"],IfInstruction:["Node","Instruction"],StringLiteral:["Node","Expression"],NumberLiteral:["Node","NumericLiteral","Expression"],LongNumberLiteral:["Node","NumericLiteral","Expression"],FloatLiteral:["Node","NumericLiteral","Expression"],Elem:["Node"],IndexInFuncSection:["Node"],ValtypeLiteral:["Node","Expression"],TypeInstruction:["Node","Instruction"],Start:["Node"],GlobalType:["Node","ImportDescr"],LeadingComment:["Node"],BlockComment:["Node"],Data:["Node"],Global:["Node"],Table:["Node","ImportDescr"],Memory:["Node","ImportDescr"],FuncImportDescr:["Node","ImportDescr"],ModuleImport:["Node"],ModuleExportDescr:["Node"],ModuleExport:["Node"],Limit:["Node"],Signature:["Node"],Program:["Node"],Identifier:["Node","Expression"],BlockInstruction:["Node","Block","Instruction"],CallInstruction:["Node","Instruction"],CallIndirectInstruction:["Node","Instruction"],ByteArray:["Node"],Func:["Node","Block"],InternalBrUnless:["Node","Intrinsic"],InternalGoto:["Node","Intrinsic"],InternalCallExtern:["Node","Intrinsic"],InternalEndAndReturn:["Node","Intrinsic"]};E.unionTypesMap=_n;var Mn=["Module","ModuleMetadata","ModuleNameMetadata","FunctionNameMetadata","LocalNameMetadata","BinaryModule","QuoteModule","SectionMetadata","ProducersSectionMetadata","ProducerMetadata","ProducerMetadataVersionedName","LoopInstruction","Instr","IfInstruction","StringLiteral","NumberLiteral","LongNumberLiteral","FloatLiteral","Elem","IndexInFuncSection","ValtypeLiteral","TypeInstruction","Start","GlobalType","LeadingComment","BlockComment","Data","Global","Table","Memory","FuncImportDescr","ModuleImport","ModuleExportDescr","ModuleExport","Limit","Signature","Program","Identifier","BlockInstruction","CallInstruction","CallIndirectInstruction","ByteArray","Func","InternalBrUnless","InternalGoto","InternalCallExtern","InternalEndAndReturn","Node","Block","Instruction","Expression","NumericLiteral","ImportDescr","Intrinsic"];E.nodeAndUnionTypes=Mn},965:function(v,E){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.signatures=void 0;function sign(v,E){return[v,E]}var P="u32";var R="i32";var $="i64";var N="f32";var L="f64";var q=function vector(v){var E=[v];E.vector=true;return E};var K={unreachable:sign([],[]),nop:sign([],[]),br:sign([P],[]),br_if:sign([P],[]),br_table:sign(q(P),[]),return:sign([],[]),call:sign([P],[]),call_indirect:sign([P],[])};var ae={drop:sign([],[]),select:sign([],[])};var ge={get_local:sign([P],[]),set_local:sign([P],[]),tee_local:sign([P],[]),get_global:sign([P],[]),set_global:sign([P],[])};var be={"i32.load":sign([P,P],[R]),"i64.load":sign([P,P],[]),"f32.load":sign([P,P],[]),"f64.load":sign([P,P],[]),"i32.load8_s":sign([P,P],[R]),"i32.load8_u":sign([P,P],[R]),"i32.load16_s":sign([P,P],[R]),"i32.load16_u":sign([P,P],[R]),"i64.load8_s":sign([P,P],[$]),"i64.load8_u":sign([P,P],[$]),"i64.load16_s":sign([P,P],[$]),"i64.load16_u":sign([P,P],[$]),"i64.load32_s":sign([P,P],[$]),"i64.load32_u":sign([P,P],[$]),"i32.store":sign([P,P],[]),"i64.store":sign([P,P],[]),"f32.store":sign([P,P],[]),"f64.store":sign([P,P],[]),"i32.store8":sign([P,P],[]),"i32.store16":sign([P,P],[]),"i64.store8":sign([P,P],[]),"i64.store16":sign([P,P],[]),"i64.store32":sign([P,P],[]),current_memory:sign([],[]),grow_memory:sign([],[])};var xe={"i32.const":sign([R],[R]),"i64.const":sign([$],[$]),"f32.const":sign([N],[N]),"f64.const":sign([L],[L]),"i32.eqz":sign([R],[R]),"i32.eq":sign([R,R],[R]),"i32.ne":sign([R,R],[R]),"i32.lt_s":sign([R,R],[R]),"i32.lt_u":sign([R,R],[R]),"i32.gt_s":sign([R,R],[R]),"i32.gt_u":sign([R,R],[R]),"i32.le_s":sign([R,R],[R]),"i32.le_u":sign([R,R],[R]),"i32.ge_s":sign([R,R],[R]),"i32.ge_u":sign([R,R],[R]),"i64.eqz":sign([$],[$]),"i64.eq":sign([$,$],[R]),"i64.ne":sign([$,$],[R]),"i64.lt_s":sign([$,$],[R]),"i64.lt_u":sign([$,$],[R]),"i64.gt_s":sign([$,$],[R]),"i64.gt_u":sign([$,$],[R]),"i64.le_s":sign([$,$],[R]),"i64.le_u":sign([$,$],[R]),"i64.ge_s":sign([$,$],[R]),"i64.ge_u":sign([$,$],[R]),"f32.eq":sign([N,N],[R]),"f32.ne":sign([N,N],[R]),"f32.lt":sign([N,N],[R]),"f32.gt":sign([N,N],[R]),"f32.le":sign([N,N],[R]),"f32.ge":sign([N,N],[R]),"f64.eq":sign([L,L],[R]),"f64.ne":sign([L,L],[R]),"f64.lt":sign([L,L],[R]),"f64.gt":sign([L,L],[R]),"f64.le":sign([L,L],[R]),"f64.ge":sign([L,L],[R]),"i32.clz":sign([R],[R]),"i32.ctz":sign([R],[R]),"i32.popcnt":sign([R],[R]),"i32.add":sign([R,R],[R]),"i32.sub":sign([R,R],[R]),"i32.mul":sign([R,R],[R]),"i32.div_s":sign([R,R],[R]),"i32.div_u":sign([R,R],[R]),"i32.rem_s":sign([R,R],[R]),"i32.rem_u":sign([R,R],[R]),"i32.and":sign([R,R],[R]),"i32.or":sign([R,R],[R]),"i32.xor":sign([R,R],[R]),"i32.shl":sign([R,R],[R]),"i32.shr_s":sign([R,R],[R]),"i32.shr_u":sign([R,R],[R]),"i32.rotl":sign([R,R],[R]),"i32.rotr":sign([R,R],[R]),"i64.clz":sign([$],[$]),"i64.ctz":sign([$],[$]),"i64.popcnt":sign([$],[$]),"i64.add":sign([$,$],[$]),"i64.sub":sign([$,$],[$]),"i64.mul":sign([$,$],[$]),"i64.div_s":sign([$,$],[$]),"i64.div_u":sign([$,$],[$]),"i64.rem_s":sign([$,$],[$]),"i64.rem_u":sign([$,$],[$]),"i64.and":sign([$,$],[$]),"i64.or":sign([$,$],[$]),"i64.xor":sign([$,$],[$]),"i64.shl":sign([$,$],[$]),"i64.shr_s":sign([$,$],[$]),"i64.shr_u":sign([$,$],[$]),"i64.rotl":sign([$,$],[$]),"i64.rotr":sign([$,$],[$]),"f32.abs":sign([N],[N]),"f32.neg":sign([N],[N]),"f32.ceil":sign([N],[N]),"f32.floor":sign([N],[N]),"f32.trunc":sign([N],[N]),"f32.nearest":sign([N],[N]),"f32.sqrt":sign([N],[N]),"f32.add":sign([N,N],[N]),"f32.sub":sign([N,N],[N]),"f32.mul":sign([N,N],[N]),"f32.div":sign([N,N],[N]),"f32.min":sign([N,N],[N]),"f32.max":sign([N,N],[N]),"f32.copysign":sign([N,N],[N]),"f64.abs":sign([L],[L]),"f64.neg":sign([L],[L]),"f64.ceil":sign([L],[L]),"f64.floor":sign([L],[L]),"f64.trunc":sign([L],[L]),"f64.nearest":sign([L],[L]),"f64.sqrt":sign([L],[L]),"f64.add":sign([L,L],[L]),"f64.sub":sign([L,L],[L]),"f64.mul":sign([L,L],[L]),"f64.div":sign([L,L],[L]),"f64.min":sign([L,L],[L]),"f64.max":sign([L,L],[L]),"f64.copysign":sign([L,L],[L]),"i32.wrap/i64":sign([$],[R]),"i32.trunc_s/f32":sign([N],[R]),"i32.trunc_u/f32":sign([N],[R]),"i32.trunc_s/f64":sign([N],[R]),"i32.trunc_u/f64":sign([L],[R]),"i64.extend_s/i32":sign([R],[$]),"i64.extend_u/i32":sign([R],[$]),"i64.trunc_s/f32":sign([N],[$]),"i64.trunc_u/f32":sign([N],[$]),"i64.trunc_s/f64":sign([L],[$]),"i64.trunc_u/f64":sign([L],[$]),"f32.convert_s/i32":sign([R],[N]),"f32.convert_u/i32":sign([R],[N]),"f32.convert_s/i64":sign([$],[N]),"f32.convert_u/i64":sign([$],[N]),"f32.demote/f64":sign([L],[N]),"f64.convert_s/i32":sign([R],[L]),"f64.convert_u/i32":sign([R],[L]),"f64.convert_s/i64":sign([$],[L]),"f64.convert_u/i64":sign([$],[L]),"f64.promote/f32":sign([N],[L]),"i32.reinterpret/f32":sign([N],[R]),"i64.reinterpret/f64":sign([L],[$]),"f32.reinterpret/i32":sign([R],[N]),"f64.reinterpret/i64":sign([$],[L])};var ve=Object.assign({},K,ae,ge,be,xe);E.signatures=ve},9590:function(v,E,P){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.moduleContextFromModuleAST=moduleContextFromModuleAST;E.ModuleContext=void 0;var R=P(37870);function _classCallCheck(v,E){if(!(v instanceof E)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(v,E){for(var P=0;P<E.length;P++){var R=E[P];R.enumerable=R.enumerable||false;R.configurable=true;if("value"in R)R.writable=true;Object.defineProperty(v,R.key,R)}}function _createClass(v,E,P){if(E)_defineProperties(v.prototype,E);if(P)_defineProperties(v,P);return v}function moduleContextFromModuleAST(v){var E=new $;if(!(v.type==="Module")){throw new Error('m.type === "Module"'+" error: "+(undefined||"unknown"))}v.fields.forEach((function(v){switch(v.type){case"Start":{E.setStart(v.index);break}case"TypeInstruction":{E.addType(v);break}case"Func":{E.addFunction(v);break}case"Global":{E.defineGlobal(v);break}case"ModuleImport":{switch(v.descr.type){case"GlobalType":{E.importGlobal(v.descr.valtype,v.descr.mutability);break}case"Memory":{E.addMemory(v.descr.limits.min,v.descr.limits.max);break}case"FuncImportDescr":{E.importFunction(v.descr);break}case"Table":{break}default:throw new Error("Unsupported ModuleImport of type "+JSON.stringify(v.descr.type))}break}case"Memory":{E.addMemory(v.limits.min,v.limits.max);break}}}));return E}var $=function(){function ModuleContext(){_classCallCheck(this,ModuleContext);this.funcs=[];this.funcsOffsetByIdentifier=[];this.types=[];this.globals=[];this.globalsOffsetByIdentifier=[];this.mems=[];this.locals=[];this.labels=[];this["return"]=[];this.debugName="unknown";this.start=null}_createClass(ModuleContext,[{key:"setStart",value:function setStart(v){this.start=v.value}},{key:"getStart",value:function getStart(){return this.start}},{key:"newContext",value:function newContext(v,E){this.locals=[];this.labels=[E];this["return"]=E;this.debugName=v}},{key:"addFunction",value:function addFunction(v){var E=v.signature||{},P=E.params,R=P===void 0?[]:P,$=E.results,N=$===void 0?[]:$;R=R.map((function(v){return v.valtype}));this.funcs.push({args:R,result:N});if(typeof v.name!=="undefined"){this.funcsOffsetByIdentifier[v.name.value]=this.funcs.length-1}}},{key:"importFunction",value:function importFunction(v){if((0,R.isSignature)(v.signature)){var E=v.signature,P=E.params,$=E.results;P=P.map((function(v){return v.valtype}));this.funcs.push({args:P,result:$})}else{if(!(0,R.isNumberLiteral)(v.signature)){throw new Error("isNumberLiteral(funcimport.signature)"+" error: "+(undefined||"unknown"))}var N=v.signature.value;if(!this.hasType(N)){throw new Error("this.hasType(typeId)"+" error: "+(undefined||"unknown"))}var L=this.getType(N);this.funcs.push({args:L.params.map((function(v){return v.valtype})),result:L.results})}if(typeof v.id!=="undefined"){this.funcsOffsetByIdentifier[v.id.value]=this.funcs.length-1}}},{key:"hasFunction",value:function hasFunction(v){return typeof this.getFunction(v)!=="undefined"}},{key:"getFunction",value:function getFunction(v){if(typeof v!=="number"){throw new Error("getFunction only supported for number index")}return this.funcs[v]}},{key:"getFunctionOffsetByIdentifier",value:function getFunctionOffsetByIdentifier(v){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+(undefined||"unknown"))}return this.funcsOffsetByIdentifier[v]}},{key:"addLabel",value:function addLabel(v){this.labels.unshift(v)}},{key:"hasLabel",value:function hasLabel(v){return this.labels.length>v&&v>=0}},{key:"getLabel",value:function getLabel(v){return this.labels[v]}},{key:"popLabel",value:function popLabel(){this.labels.shift()}},{key:"hasLocal",value:function hasLocal(v){return typeof this.getLocal(v)!=="undefined"}},{key:"getLocal",value:function getLocal(v){return this.locals[v]}},{key:"addLocal",value:function addLocal(v){this.locals.push(v)}},{key:"addType",value:function addType(v){if(!(v.functype.type==="Signature")){throw new Error('type.functype.type === "Signature"'+" error: "+(undefined||"unknown"))}this.types.push(v.functype)}},{key:"hasType",value:function hasType(v){return this.types[v]!==undefined}},{key:"getType",value:function getType(v){return this.types[v]}},{key:"hasGlobal",value:function hasGlobal(v){return this.globals.length>v&&v>=0}},{key:"getGlobal",value:function getGlobal(v){return this.globals[v].type}},{key:"getGlobalOffsetByIdentifier",value:function getGlobalOffsetByIdentifier(v){if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+(undefined||"unknown"))}return this.globalsOffsetByIdentifier[v]}},{key:"defineGlobal",value:function defineGlobal(v){var E=v.globalType.valtype;var P=v.globalType.mutability;this.globals.push({type:E,mutability:P});if(typeof v.name!=="undefined"){this.globalsOffsetByIdentifier[v.name.value]=this.globals.length-1}}},{key:"importGlobal",value:function importGlobal(v,E){this.globals.push({type:v,mutability:E})}},{key:"isMutableGlobal",value:function isMutableGlobal(v){return this.globals[v].mutability==="var"}},{key:"isImmutableGlobal",value:function isImmutableGlobal(v){return this.globals[v].mutability==="const"}},{key:"hasMemory",value:function hasMemory(v){return this.mems.length>v&&v>=0}},{key:"addMemory",value:function addMemory(v,E){this.mems.push({min:v,max:E})}},{key:"getMemory",value:function getMemory(v){return this.mems[v]}}]);return ModuleContext}();E.ModuleContext=$},5530:function(v,E,P){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.traverse=traverse;var R=P(85505);var $=P(37870);function walk(v,E){var P=false;function innerWalk(v,E){if(P){return}var $=v.node;if($===undefined){console.warn("traversing with an empty context");return}if($._deleted===true){return}var N=(0,R.createPath)(v);E($.type,N);if(N.shouldStop){P=true;return}Object.keys($).forEach((function(v){var P=$[v];if(P===null||P===undefined){return}var R=Array.isArray(P)?P:[P];R.forEach((function(R){if(typeof R.type==="string"){var $={node:R,parentKey:v,parentPath:N,shouldStop:false,inList:Array.isArray(P)};innerWalk($,E)}}))}))}innerWalk(v,E)}var N=function noop(){};function traverse(v,E){var P=arguments.length>2&&arguments[2]!==undefined?arguments[2]:N;var R=arguments.length>3&&arguments[3]!==undefined?arguments[3]:N;Object.keys(E).forEach((function(v){if(!$.nodeAndUnionTypes.includes(v)){throw new Error("Unexpected visitor ".concat(v))}}));var L={node:v,inList:false,shouldStop:false,parentPath:null,parentKey:null};walk(L,(function(v,N){if(typeof E[v]==="function"){P(v,N);E[v](N);R(v,N)}var L=$.unionTypesMap[v];if(!L){throw new Error("Unexpected node type ".concat(v))}L.forEach((function(v){if(typeof E[v]==="function"){P(v,N);E[v](N);R(v,N)}}))}))}},23546:function(v,E,P){"use strict";Object.defineProperty(E,"__esModule",{value:true});E.isAnonymous=isAnonymous;E.getSectionMetadata=getSectionMetadata;E.getSectionMetadatas=getSectionMetadatas;E.sortSectionMetadata=sortSectionMetadata;E.orderedInsertNode=orderedInsertNode;E.assertHasLoc=assertHasLoc;E.getEndOfSection=getEndOfSection;E.shiftLoc=shiftLoc;E.shiftSection=shiftSection;E.signatureForOpcode=signatureForOpcode;E.getUniqueNameGenerator=getUniqueNameGenerator;E.getStartByteOffset=getStartByteOffset;E.getEndByteOffset=getEndByteOffset;E.getFunctionBeginingByteOffset=getFunctionBeginingByteOffset;E.getEndBlockByteOffset=getEndBlockByteOffset;E.getStartBlockByteOffset=getStartBlockByteOffset;var R=P(965);var $=P(5530);var N=_interopRequireWildcard(P(94545));function _getRequireWildcardCache(v){if(typeof WeakMap!=="function")return null;var E=new WeakMap;var P=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(v){return v?P:E})(v)}function _interopRequireWildcard(v,E){if(!E&&v&&v.__esModule){return v}if(v===null||_typeof(v)!=="object"&&typeof v!=="function"){return{default:v}}var P=_getRequireWildcardCache(E);if(P&&P.has(v)){return P.get(v)}var R={};var $=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in v){if(N!=="default"&&Object.prototype.hasOwnProperty.call(v,N)){var L=$?Object.getOwnPropertyDescriptor(v,N):null;if(L&&(L.get||L.set)){Object.defineProperty(R,N,L)}else{R[N]=v[N]}}}R["default"]=v;if(P){P.set(v,R)}return R}function _slicedToArray(v,E){return _arrayWithHoles(v)||_iterableToArrayLimit(v,E)||_unsupportedIterableToArray(v,E)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(v,E){if(!v)return;if(typeof v==="string")return _arrayLikeToArray(v,E);var P=Object.prototype.toString.call(v).slice(8,-1);if(P==="Object"&&v.constructor)P=v.constructor.name;if(P==="Map"||P==="Set")return Array.from(v);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return _arrayLikeToArray(v,E)}function _arrayLikeToArray(v,E){if(E==null||E>v.length)E=v.length;for(var P=0,R=new Array(E);P<E;P++){R[P]=v[P]}return R}function _iterableToArrayLimit(v,E){var P=v==null?null:typeof Symbol!=="undefined"&&v[Symbol.iterator]||v["@@iterator"];if(P==null)return;var R=[];var $=true;var N=false;var L,q;try{for(P=P.call(v);!($=(L=P.next()).done);$=true){R.push(L.value);if(E&&R.length===E)break}}catch(v){N=true;q=v}finally{try{if(!$&&P["return"]!=null)P["return"]()}finally{if(N)throw q}}return R}function _arrayWithHoles(v){if(Array.isArray(v))return v}function _typeof(v){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(v){return typeof v}}else{_typeof=function _typeof(v){return v&&typeof Symbol==="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v}}return _typeof(v)}function isAnonymous(v){return v.raw===""}function getSectionMetadata(v,E){var P;(0,$.traverse)(v,{SectionMetadata:function(v){function SectionMetadata(E){return v.apply(this,arguments)}SectionMetadata.toString=function(){return v.toString()};return SectionMetadata}((function(v){var R=v.node;if(R.section===E){P=R}}))});return P}function getSectionMetadatas(v,E){var P=[];(0,$.traverse)(v,{SectionMetadata:function(v){function SectionMetadata(E){return v.apply(this,arguments)}SectionMetadata.toString=function(){return v.toString()};return SectionMetadata}((function(v){var R=v.node;if(R.section===E){P.push(R)}}))});return P}function sortSectionMetadata(v){if(v.metadata==null){console.wa