minidev 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1 @@
1
- (function(){"use strict";var EWorkerAppEvent,EBugmePanelId,weakset,hasRequiredWeakset;function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function requireWeakset(){if(hasRequiredWeakset)return weakset;hasRequiredWeakset=1;var e=Date.now()%1e9;function t(t){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__",t&&t.forEach&&t.forEach(this.add,this)}var n=t.prototype;return n.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},n.delete=function(e){return!!e[this.name]&&(e[this.name]=void 0,!0)},n.has=function(e){return!!e[this.name]},weakset=t}!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(EWorkerAppEvent||(EWorkerAppEvent={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(EBugmePanelId||(EBugmePanelId={}));var workerGlobal=self;function noop(){}var DEBUG_TAG="[DEBUG]";function error(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,[DEBUG_TAG].concat(e))}var debug=noop,originImportScripts=workerGlobal.importScripts,isAppXImportHooked=!1,appxLoadedCallbacks=[];function runAfterAppx(e){void 0!==workerGlobal.AFAppX?e():(appxLoadedCallbacks.push(e),isAppXImportHooked||(isAppXImportHooked=!0,workerGlobal.importScripts=function(e){originImportScripts(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[])}))}function runAfterAppXBridgeReady(e){if("undefined"==typeof AFAppX&&workerGlobal.AFAppX&&(AFAppX=workerGlobal.AFAppX),"undefined"==typeof $AppxFramework)e();else if(AFAppX.Plugin){var t=AFAppX.Plugin;AFAppX.Plugin=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=n[0];if("object"==typeof o&&o.run){var i=o.run;o.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),i.apply(o,t)}}return t.apply(AFAppX,n)}}else if($AppxFramework.bootstrapInAppContextByProtocol){var n=$AppxFramework.bootstrapInAppContextByProtocol;$AppxFramework.bootstrapInAppContextByProtocol=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=t[0];if("object"==typeof o){var i=o.callback;if(i&&(o.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),i.apply(this,t)}),o.pageInfo){var a=o.pageInfo.init;a&&(o.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function getStartupParams$1(){return workerGlobal.__appxStartupParams&&"appId"in workerGlobal.__appxStartupParams?workerGlobal.__appxStartupParams:workerGlobal.AFAppX&&workerGlobal.AFAppX.bridge&&workerGlobal.AFAppX.bridge.callSync&&workerGlobal.AFAppX.bridge.callSync("getStartupParams")||{}}function guardSingleMsgSize(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>2e7?void debug("abort send websocket message due to size:",t.length,t.slice(0,1e3)):t}function createWeakSet$1(){return"undefined"==typeof WeakSet?new(requireWeakset()):new WeakSet}var getCircularReplacer$1=function(){var e=createWeakSet$1();return function(t,n){if("object"==typeof n&&null!==n)try{if(e.has(n))return;e.add(n)}catch(e){console.error(e)}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply);function functionApply(e,t,n){return FunctionApply(e,t,n)}function throttle$1(e,t,n,r,o){var i,a,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,a=functionApply(e,null,i),i=null};return function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var g=Date.now();c||!1!==o.leading||(c=g);var f=t-(g-c);return i=u,f<=0||f>t?(r(s),s=null,c=g,a=functionApply(e,null,i),i=null):s||!1===o.trailing||(s=n(p,f)),a}}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,WeakMapKlass,WeakSetKlass;function getWeakSetPolyfillConstructor(){return function(){function e(){this.elementKey=weakElementKey+weakSetKey++}return e.prototype.has=function(e){return 1===e[this.elementKey]},e.prototype.add=function(e){return e[this.elementKey]=1,this},e.prototype.delete=function(e){e[this.elementKey]=null},e}()}function getWeakMapPolyfillConstructor(){var e=Object.prototype.hasOwnProperty,t=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,value:n,writable:!0}):e[t]=n};function n(e){return Object(e)===e}function r(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(t(this,"_id","_WeakMap"+"_"+i()+"."+i()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(t,r){if(!n(t)||!e.call(t,"_id"))throw new TypeError(r+" method called on incompatible receiver "+typeof t)}function i(){return Math.random().toString().substring(2)}return t(r.prototype,"delete",(function(e){if(o(this,"delete"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),t(r.prototype,"get",(function(e){if(o(this,"get"),n(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),t(r.prototype,"has",(function(e){if(o(this,"has"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),t(r.prototype,"set",(function(e,r){if(o(this,"set"),!n(e))throw new TypeError("Invalid value used as weak map key");var i=e[this._id];return i&&i[0]===e?(i[1]=r,this):(t(e,this._id,[e,r]),this)})),t(r,"_polyfill",!0),r}function getWeakMapConstructorMayBePolyfill$1(){var e="undefined"!=typeof WeakMap;WeakMapKlass=e?WeakMap:getWeakMapPolyfillConstructor()}function createWeakMap(){return WeakMapKlass||getWeakMapConstructorMayBePolyfill$1(),new WeakMapKlass}function getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}createWeakMap();var len=0,vertxNext,browserWindow="undefined"!=typeof window?window:void 0,browserGlobal=browserWindow||{},BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver,isNode="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),isWorker="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function useVertxTimer(){return function(){vertxNext(flush)}}function useMutationObserver(){var e=0,t=new BrowserMutationObserver(flush),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function useMessageChannel(){var e=new MessageChannel;return e.port1.onmessage=flush,function(){e.port2.postMessage(0)}}function useSetTimeout(){return function(){setTimeout(flush,1)}}var queue=new Array(1e3);function flush(){for(var e=0;e<len;e+=2){(0,queue[e])(queue[e+1]),queue[e]=void 0,queue[e+1]=void 0}len=0}function attemptVertx(){try{var e=commonjsRequire("vertx");return vertxNext=e.runOnLoop||e.runOnContext,useVertxTimer()}catch(e){return useSetTimeout()}}isNode||(BrowserMutationObserver?useMutationObserver():isWorker?useMessageChannel():void 0===browserWindow&&"function"==typeof commonjsRequire&&attemptVertx()),Math.random().toString(36).substring(2);var InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle$1((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer=function(){var e=createWeakSet();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify(e){return JSON.stringify(e,getCircularReplacer())}var precisionTimestampBasis=0;function resetPrecisionTimestampBasis(){precisionTimestampBasis=1e3*Date.now()-getPrecisionTimestamp()}var getPrecisionTimestamp="object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return 1e3*performance.now()+precisionTimestampBasis}:function(){return 1e3*Date.now()};function interceptLifecycle(e){e.interceptors.appLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp()/1e3,args:n,context:circularJSONStringify(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,r)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp()/1e3,args:n,context:circularJSONStringify(normalizePageLifecycleManagerThisContext(t))};onPageLifecycle(e,r)}))}function onAppLifecycle(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog."+t.args[0],params:t};e.callback(n)}catch(e){}}function normalizeAppLifecycleManagerThisContext(e){var t=e.app;return{app:{appInstanceId:t.appInstanceId,initTime:t.initTime,launchOptions:t.getLaunchOptions(),launchTime:t.launchTime},state:e.state}}function onPageLifecycle(e,t){try{var n=getLifecycleName$1(t.args[0]);if(!n)return;var r={ext:{origin:"applog"},method:"MiniAppLog."+n,params:t};e.callback(r),"onPageShow"===n&&e.notifyDataChange()}catch(e){}}function getLifecycleName$1(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function normalizePageLifecycleManagerThisContext(e){var t=e.page;return{page:{initTime:t.initTime,loadTime:t.loadTime,pageId:t.pageId,pagePath:t.pagePath,plugin:t.plugin},state:e.state}}function interceptJSAPI(e){e.interceptors.bridgeSyncCallContextMethodInterceptor.all("invoke",(function(t,n){var r=e.getNextRequestId(),o=getPrecisionTimestamp()/1e3;return onApiSyncCall(e,{context:t,args:n,reqId:r,aTime:o}),[[r,o],n]}),(function(t,n,r,o){var i=n[0],a=i[0],s=i[1],c=n[1],p=getPrecisionTimestamp()/1e3;onApiSyncCallback(e,{context:t,args:c,reqId:a,result:r,bTime:p,aTime:s})})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("invoke",(function(t,n){var r=e.getNextRequestId(),o=getPrecisionTimestamp()/1e3;return t.__reqId=r,onApiCall(e,{context:t,args:n,reqId:r,aTime:o}),"rpc"===t.apiName&&(t.option.getResponse||(t.$$rpcGetResponseToTrue=!0,t.option=__assign(__assign({},t.option),{getResponse:!0}))),n})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("dispatchResultCallback",(function(t,n){var r=t.__reqId,o=getPrecisionTimestamp()/1e3;return onApiCallback(e,{context:t,args:n,reqId:r,bTime:o}),"rpc"===t.apiName&&t.$$rpcGetResponseToTrue&&void 0!==n[0].resData?[n[0].resData]:n}))}function onApiSyncCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo$1(e){if(e.context){var t=e.context,n=t.apiName,r=t.extraInfo,o=t.isMiniExtension,i=t.option,a=t.startTime,s=t.taskId,c=t.__reqId;return __assign(__assign({},e),{context:{__reqId:c,apiName:n,extraInfo:r,isMiniExtension:o,option:i,startTime:a,taskId:s}})}return e}var originalError=console.error;function interceptError(e){e.interceptors.appBaseInstanceInterceptor.after("reportError",(function(e,t){t[0],onError({code:t[1],formatted:t[2]})}))}function onError(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(originalError.bind(console,t),0)}function interceptSetData(e){e.interceptors.pageFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),o=getPrecisionTimestamp()/1e3,i={aTime:o,args:n,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,i),[[r,o],n]}),(function(t,n,r,o){var i=n[0],a=i[0],s=i[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:a})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),o=getPrecisionTimestamp()/1e3;return onSetData(e,{aTime:o,args:n,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:r}),[[r,o],n]}),(function(t,n,r,o){var i=n[0],a=i[0],s=i[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:a})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo$1(t)};e.callback(n)}catch(e){}}function onSetDataCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onSetDataCallback",params:t};e.callback(n)}catch(e){}}function minimizeSetDataInfo$1(e){return e.context?e:{componentIs:e.component?e.component.is:void 0,isPage:e.isPage,option:e.options,pagePath:e.isPage?e.page.route:e.component.$page.route}}function normalizePageLogicInstanceThisContext(e){var t=e.page;return{page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:e.pageId,pagePath:e.pagePath}}function normalizeComponentLogicInstanceThisContext(e){var t=e.page;return{componentPath:e.componentPath,page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:t.pageId,pagePath:t.pagePath}}function setup(e,t,n){resetPrecisionTimestampBasis();var r=new InterceptContext(t,n);interceptSetData(r),interceptLifecycle(r),interceptJSAPI(r),interceptError(r)}var AgentContext=function(){this.channelConfigKey="0",this.userAgent="undefined"!=typeof navigator?navigator.swuserAgent||navigator.userAgent:"",this.isIOS=/iPhone|iPad|iOS/i.test(this.userAgent),this.isLyra=/LyraVM/i.test(this.userAgent),this.startupParams=getStartupParams$1(),this.channelId=this.startupParams.channelId||"",this.channel=this.startupParams.channel||"",this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},NetworkCollection=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,__assign(__assign({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}();function createProtocol4RequestWillBeSent(e){var t=(e.method||"GET").toUpperCase(),n=mapValueToString(e.headers),r=getTimestamp();return{method:"Network.requestWillBeSent",params:{documentURL:"",loaderId:"",requestId:e.requestId,request:{method:t,url:e.url,headers:n,postData:e.postBody,hasPostData:!!e.postBody||void 0,mixedContentType:"none",initialPriority:"High",isLinkPreload:!1,referrerPolicy:"origin"},wallTime:r,initiator:{type:"script"},timestamp:r,type:"XHR"}}}function createProtocol4ResponseReceived(e,t){var n=e.profile,r=e.headers,o=n&&n.totalTime,i=getTimestamp(),a=i-(o?n.totalTime-n.Waiting-n.domainLookup-n.connect-n.SSLconnection:0)/1e3;return{method:"Network.responseReceived",params:{requestId:e.requestId,loaderId:"",type:"XHR",timestamp:a,response:{url:t.url||"",status:Number(e.status),headers:mapValueToString(r),requestHeaders:t.requestHeaders,connectionReused:!1,connectionId:1e3,encodedDataLength:0,securityState:"unknown",statusText:"",protocol:"",mimeType:r["Content-Type"]||r["content-type"],timing:o?createResourceTiming(n,i-n.totalTime/1e3):void 0}}}}function createProtocol4LoadingFinished(e){return{method:"Network.loadingFinished",params:{requestId:e.requestId,timestamp:getTimestamp(),encodedDataLength:0}}}function createProtocol4LoadingFailed(e){return{method:"Network.loadingFailed",params:{canceled:!1,errorText:e.errorMsg||"",requestId:e.requestId,timestamp:getTimestamp(),type:"XHR"}}}function mapValueToString(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}function getTimestamp(){return Date.now()/1e3}function createResourceTiming(e,t){var n=e.domainLookup,r=e.connect,o=e.SSLconnection,i=n+r+o;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:i||-1,sslStart:i-o||-1,sslEnd:i||-1,sendStart:i?-1:1e-4,sendEnd:i?-1:1e-4,receiveHeadersEnd:i+e.Waiting,proxyStart:-1,proxyEnd:-1,workerStart:-1,workerReady:-1,workerFetchStart:-1,workerRespondWithSettled:-1,pushStart:0,pushEnd:0}}var MAX_QUEUE_SIZE=1e8,MessageQueue=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0,this.isApplogEnabled=!1}return e.prototype.push=function(e){this._queueSize;var t=guardSingleMsgSize(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=getInjector().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),channelDomainConfig={0:{openchannel:"openchannel.alipay.com",hpmweb:"hpmweb.alipay.com"},1:{openchannel:"miniprogram.alipay.com",hpmweb:"hpmweb.alipay.com"},2:{openchannel:"openchannel-pre.alipay.com",hpmweb:"hpmweb-pre.alipay.com"}};function throttle(e,t,n,r,o){var i,a,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,a=e.apply(null,i),i=null};return function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var g=Date.now();c||!1!==o.leading||(c=g);var f=t-(g-c);return i=u,f<=0||f>t?(r(s),s=null,c=g,a=e.apply(null,i),i=null):s||!1===o.trailing||(s=n(p,f)),a}}function debounce(e,t,n,r){var o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r(o),o=n((function(){e.apply(null,i)}),t)}}var WebSocketBaseImpl=function(){function e(e){this.url="",this.opened=!1,e&&(this.url=e),this.onSocketError=this.onSocketError.bind(this),this.onSocketClose=this.onSocketClose.bind(this),this.onSocketMessage=this.onSocketMessage.bind(this),this.onSocketOpen=this.onSocketOpen.bind(this)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.setUrl=function(e){this.url=e},e}(),internalWebSocket;"undefined"!=typeof WebSocket&&WebSocket.OPEN&&(internalWebSocket=WebSocket);var WebSocketBrowserImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t}return __extends(t,e),t.prototype.open=function(){var e=this;if(!this.url)throw new Error("WebSocket url required");this.socket=new internalWebSocket(this.url),this.socket.onopen=this.onSocketOpen,this.socket.onmessage=function(t){"string"==typeof t.data?e.onSocketMessage(t.data):console.warn("[DEBUG] invalid message",t.data)},this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError},t.prototype.close=function(){this.opened&&this.socket.close()},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7||(this.opened?this.socket.send(t):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){var e=this;this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[])},t.prototype.onSocketClose=function(){this.opened=!1,console.log("[DEBUG] connection closed")},t.prototype.onSocketError=function(e){console.error("[DEBUG] connection onerror",e)},t}(WebSocketBaseImpl),WebSocketNativeImpl=function(e){function t(t){var n=e.call(this,t)||this;return n.messageBeforeSocketOpen=[],n.useFromRemoteDebugFlag=!0,n}return __extends(t,e),t.prototype.open=function(){var e=this;this.socketTask=AFAppX.bridge.connectSocket({__taskIdPrefix:"remote_debug_tbr",fromRemoteDebug:this.useFromRemoteDebugFlag,url:this.url,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7||(this.opened?this.socketTask.send({fromRemoteDebug:this.useFromRemoteDebugFlag,data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(e){},t.prototype.onSocketClose=function(){},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(WebSocketBaseImpl),messages$1={"调试结束":"调试结束","callExitApp_退出":"退出","callExitApp_取消":"取消"},messages={"调试结束":"Debugging Ended","callExitApp_退出":"Exit","callExitApp_取消":"Cancel"};function formatLocaleString(e){switch(e){case"zhCN":case"zh-SG":case"zh-HK":case"zh-TW":case"zh-Hans":case"zh-CN":return"zhCN";default:return"enUS"}}var I18NFormatter=function(){function e(e){var t={zhCN:messages$1,enUS:messages};this.i18nMessages=t[formatLocaleString(e)]}return e.prototype.format=function(e,t){var n=this.i18nMessages[e];return"string"==typeof n?n:"function"==typeof n?n(t):e},e}(),globalInjector,Injector=function(){function e(){}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new AgentContext),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new NetworkCollection),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new MessageQueue),this.messageQueue},e.prototype.setRuntime=function(e){this.runtime=e},e.prototype.getRuntime=function(){return this.runtime},e.prototype.getI18NFormatter=function(){return this.i18NFormatter||(this.i18NFormatter=new I18NFormatter(this.getLanguage())),this.i18NFormatter},e.prototype.getLanguage=function(){var e,t,n=null===(t=null===(e=this.runtime)||void 0===e?void 0:e.getEnv())||void 0===t?void 0:t.language;return n||this.getLanguageFromUA()},e.prototype.getLanguageFromUA=function(){if(!this.userAgent)return"";var e=this.userAgent.match(/Language\/([\w-]+)/);return e?e[1]:""},Object.defineProperty(e.prototype,"userAgent",{get:function(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""},enumerable:!1,configurable:!0}),e}();function getInjector(){return globalInjector||(globalInjector=new Injector),globalInjector}function sendOrQueueApplogMsg$1(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify$1(e)):n.push(circularJSONStringify$1(e))}catch(e){}}function getHookFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}var throttledEmitDataChangedEvent=throttle((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:"Tiny.Data.dataChanged",ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1}),EUnserializableValue;function getFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function onErrorHook(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(console.error.bind(console,t))}function registerLegacyAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:getFn("onSetData"),onSetDataCallback:getFn("onSetDataCallback"),onApiSyncCall:getFn("onApiSyncCall"),onApiSyncCallback:getFn("onApiSyncCallback"),onApiCall:getFn("onApiCall"),onApiCallback:getFn("onApiCallback"),onError:getFn("onError")};workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}throttledEmitDataChangedEvent(),sendOrQueueApplogMsg({method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onSetDataCallback",params:t,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}onErrorHook(t)}catch(e){}},registerV1PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV1AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}function getLifecycleName(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function registerV1PageLifecycleHooks(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload"],r=0,o=n;r<o.length;r++){t[c=o[r]]=getFn(c)}for(var i=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}var r=e.context?e:__assign({route:e.page.route},e);sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}},a=0,s=n;a<s.length;a++){var c;i(c=s[a])}}function registerV2PageLifecycleHooks(e,t){t.onPageLifecycle=getFn("onPageLifecycle"),e.onPageLifecycle=function(e){try{if(t.onPageLifecycle)try{t.onPageLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}var n=getLifecycleName(e.args[0]);if(!n)return;sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}}function registerV1AppLifecycleHooks(e,t){for(var n=["onAppLaunch","onAppShow","onAppHide","onAppError","onAppUnhandledRejection"],r=0,o=n;r<o.length;r++){t[c=o[r]]=getFn(c)}for(var i=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}},a=0,s=n;a<s.length;a++){var c;i(c=s[a])}}function registerV2AppLifecycleHooks(e,t){t.onAppLifecycle=getFn("onAppLifecycle"),e.onAppLifecycle=function(e){try{if(t.onAppLifecycle)try{t.onAppLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(e.args[0]),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}}function sendOrQueueApplogMsg(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify$1(e)):n.push(circularJSONStringify$1(e))}catch(e){}}function minimizeApiHookInfo(e){if(e.context){var t=e.context;return __assign(__assign({},e),{context:pick(t,["apiName","extraInfo","isMiniExtension","option","startTime","taskId","__reqId"])})}return e}function minimizeSetDataInfo(e){return e.context?e:{pagePath:e.isPage?e.page.route:e.component.$page.route,isPage:e.isPage,option:e.options,componentIs:e.component?e.component.is:void 0}}function minimizePageLifecycleInfo1(e){return __assign(__assign({},e),{page:pick(e.page,["$id","$page","$viewId","data"])})}function pick(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function registerAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={}),registerLegacyAppxHook();var e=getHookFn("setup");workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.setup=function(t,n){if(e&&"function"==typeof e)try{e(t,n)}catch(e){}getInjector().setRuntime(t),setup(t,n,(function(e){if("string"==typeof e.method&&e.method.includes("MiniAppLog"))sendOrQueueApplogMsg$1(e);else{var t=getInjector().getWorkerSocket();t&&t.send(e)}}))}}function getObjectOwnPropertyDescriptors(e){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(e):Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),Object.create(null))}function isError(e){return"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)||e instanceof RegExp}function isPromise(e){return"[object Promise]"===Object.prototype.toString.call(e)||e instanceof Promise}function isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function isArrayBufferInstance(e){return e instanceof ArrayBuffer}function isNegativeZero(e){return 0===e&&1/e==-1/0}!function(e){e[1/0]="Infinity",e[-1/0]="-Infinity",e.NaN="NaN",e["-0"]="-0"}(EUnserializableValue||(EUnserializableValue={}));var ObjectMapper=function(){function e(e){this.objectStore=e}return e.prototype.mapFrom=function(e,t){var n=this;return Array.from(e).map((function(e){return n.mapFromOne(e,t)}))},e.prototype.mapFromOne=function(e,t){switch(typeof e){case"string":return this.mapString(e);case"number":return this.mapNumber(e);case"object":return Array.isArray(e)?this.mapArray(e,"table"===t):null===e?this.mapNull():isArrayBufferInstance(e)?this.mapArrayBuffer(e,"table"===t):this.mapObject(e,"table"===t);case"function":return this.mapFunction(e);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(e);default:return{type:typeof e,value:e}}},e.prototype.mapArrayBuffer=function(e,t){var n=this,r={byteLength:e.byteLength},o=Object.keys(r),i=e.byteLength,a=this.objectStore.save(e),s=e.constructor?e.constructor.name:"Object",c=o.length>5&&!t,p="arraybuffer",u="".concat(s,"(").concat(i,")"),l={type:"object",className:s,description:u,objectId:a,preview:{type:"object",description:u,overflow:c,properties:(c?o.slice(0,5):o).map((function(e){return n.getPropertyPreview4AnyValue(e,r[e],t)})).filter(Boolean)}};return l.subtype=p,l.preview&&(l.preview.subtype=p),u&&(l.description=u,l.preview&&(l.preview.description=u)),l},e.prototype.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){var t,n;isNaN(e)?n=EUnserializableValue.NaN:e===1/0?n=EUnserializableValue.Infinity:e===-1/0?n=EUnserializableValue[-1/0]:isNegativeZero(e)?n=EUnserializableValue["-0"]:t=e;var r={type:"number",value:t,description:String(e)};return n&&(r.unserializableValue=n),r},e.prototype.mapBoolean=function(e){return{type:"boolean",value:e}},e.prototype.mapFunction=function(e){var t=this.objectStore.save(e);return{type:"function",className:"Function",description:e.toString(),objectId:t}},e.prototype.mapUndef=function(){return{type:"undefined"}},e.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},e.prototype.mapObject=function(e,t){var n,r,o=this,i=getObjectOwnPropertyDescriptors(e),a=Object.keys(i),s=this.objectStore.save(e),c=e.constructor?e.constructor.name:"Object",p=a.length>5&&!t,u={type:"object",className:c,description:c,objectId:s,preview:{type:"object",description:c,overflow:p,properties:(p?a.slice(0,5):a).map((function(e){return o.getPropertyPreview4ObjectProperty(e,i[e],t)})).filter(Boolean)}};return isError(e)?(n="error",-1===(r=e.stack||"").indexOf(e.name)&&(r=e.toString()+"\n"+r)):isDate(e)?(n="date",r=e.toString()):isRegExp(e)?(n="regexp",r=e.toString()):isPromise(e)&&(n="promise",r="Promise"),n&&(u.subtype=n,u.preview&&(u.preview.subtype=n)),r&&(u.description=r,u.preview&&(u.preview.description=r)),u},e.prototype.mapArray=function(e,t){var n=this,r=e.length>100&&!t,o="Array(".concat(e.length,")");return{type:"object",subtype:"array",className:"Array",description:o,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:o,overflow:r,properties:(r?e.slice(0,100):e).map((function(e,r){return n.getPropertyPreview4ArrayProperty(r,e,t)}))}}},e.prototype.getPropertyPreview4ArrayProperty=function(e,t,n){return this.getPropertyPreview4AnyValue(String(e),t,n)},e.prototype.getPropertyPreview4ObjectProperty=function(e,t,n){return t.get?{name:e,type:"accessor"}:t.set?void 0:this.getPropertyPreview4AnyValue(e,t.value,n)},e.prototype.getPropertyPreview4AnyValue=function(e,t,n){switch(void 0===n&&(n=!1),typeof t){case"object":if(Array.isArray(t)){var r={name:e,type:"object",subtype:"array",value:"Array(".concat(t.length,")")};return n&&(r.valuePreview=this.getValuePreview4TableArray(t)),r}if(null===t)return{name:e,type:"object",subtype:"null",value:"null"};r={name:e,type:"object",value:t.constructor?t.constructor.name:"Object"};return n&&(r.valuePreview=this.getValuePreview4TableObject(t)),r;case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof t,value:String(t)}}},e.prototype.getValuePreview4TableArray=function(e){var t=this;return{type:"object",subtype:"array",description:"Array(".concat(e.length,")"),overflow:!1,properties:e.map((function(e,n){return t.getPropertyPreview4AnyValue(String(n),e)}))}},e.prototype.getValuePreview4TableObject=function(e){var t=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(e).map((function(n){return t.getPropertyPreview4AnyValue(n,e[n])}))}},e}(),ExtractStackLine=function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}(),CallFramesMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e,n){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(ExtractStackLine),executionContextId=1,injectedScriptId=1,ObjectStore=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'.concat(injectedScriptId,',"id":').concat(this.id,"}")},e}(),GetPropertiesHandler=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);if(t){var n=Boolean(e.ownProperties),r={result:this.mapObject(t,n,Boolean(e.accessorPropertiesOnly))};return n&&this.hasInternalProperties(t)&&(r.internalProperties=this.getInternalProperties(t)),r}return{result:[]}},e.prototype.getInternalProperties=function(e){return isArrayBufferInstance(e)?[this.mapInternalProperties("[[ArrayBufferByteLength]]",e.byteLength)]:[]},e.prototype.hasInternalProperties=function(e){return isArrayBuffer(e)},e.prototype.shouldSkipProto=function(e){return isArrayBuffer(e)},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var o=getObjectOwnPropertyDescriptors(e),i=Object.keys(o).filter((function(e){return!(n&&!o[e].get&&!o[e].set)})).map((function(e){return r.mapResultOne(e,o[e],!0)}));return this.shouldSkipProto(e)||e.__proto__&&i.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),i}for(var a=[],s={},c=e,p=!1,u=!0,l=function(){var e=getObjectOwnPropertyDescriptors(c);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var o=e[t];(!n||o.get||o.set)&&a.push(r.mapResultOne(t,o,u))}})),!p){var t=Object.getOwnPropertyDescriptor(c,"__proto__");t&&(p=!0,a.push(g.mapResultOne("__proto__",t,u)))}c=c.__proto__,u=!1},g=this;c;)l();return a},e.prototype.mapInternalProperties=function(e,t){return{name:String(e),value:this.objectMapper.mapFromOne(t)}},e.prototype.mapResultOne=function(e,t,n){var r={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(r.value=this.objectMapper.mapFromOne(t.value)),t.get&&(r.get=this.objectMapper.mapFromOne(t.get)),t.set&&(r.set=this.objectMapper.mapFromOne(t.set)),r},e}(),RemoteObjectParser=function(){function e(){this.objectStore=new ObjectStore,this.objectMapper=new ObjectMapper(this.objectStore),this.callFramesMapper=new CallFramesMapper,this.getPropertiesHandler=new GetPropertiesHandler(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e,t){return this.objectMapper.mapFromOne(e,t)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var r=e;return"warn"===e&&(r="warning"),{method:"Runtime.consoleAPICalled",params:{type:r,args:this.objectMapper.mapFrom(n,e),executionContextId:executionContextId,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}(),globalConsoleOverrides;function initConsoleOverrides(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrides=new ConsoleOverrides).overrideConsole()}function getConsoleOverrides(){return globalConsoleOverrides}var ConsoleOverrides=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMessage({method:"Runtime.executionContextsCleared",params:{}}),this.sendMessage({method:"Runtime.executionContextCreated",params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this;Object.defineProperties(console,["debug","log","info","warn","error","table"].reduce((function(t,n){var r=console[n].bind(console);return t[n]={value:function(){var t=arguments;if(t.length){try{if("string"==typeof t[0]&&/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/.test(t[0]))return r.apply(null,t);var o=new Error;o.stack&&e.sendMessage(e.parser.consoleAPICalled(n,o.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMessage=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessages(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessages=function(){if(this.messageBeforeAgentInit.length){var e=getInjector().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){getInjector().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessages())}),1e3)}},e}(),requirePluginName="requirePlugin";function hookRequirePlugin(){var e=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);if(!e||e.configurable){var t;e&&(t=workerGlobal.requirePlugin);var n,r={get:function(e,t,n){return"async"===t?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e[t];if("function"==typeof o){var i=Date.now();return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCall",params:{aTime:i,context:{apiName:requirePluginName+".async",option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}}),o.apply(void 0,n).then((function(e){return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:e?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===i?i+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e})).catch((function(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===i?i+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e}))}return o}:e[t]},apply:function(e,t,n){var r=Date.now();sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCall",params:{aTime:r,context:{apiName:requirePluginName,option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}});try{var o=e.apply(void 0,n);return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:o?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),o}catch(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),e}}};try{t&&(n=new Proxy(t,r))}catch(e){}Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return n||t},set:function(e){n=(t=e)?new Proxy(t,r):void 0},enumerable:!0,configurable:!0})}}function enable$2(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getResponseBody(e){var t=e.params.requestId,n=getInjector(),r=n.getNetworkRecorder(),o=r.getRequest(t);o?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:o.isBase64Body,body:o.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),r.removeRequest(t)}var network=Object.freeze({__proto__:null,enable:enable$2,getResponseBody:getResponseBody});function enable$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrides();t&&t.createExecutionContext()}function getProperties(e){var t=getConsoleOverrides();t&&getInjector().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})}function compileScript(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var evalFunc="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){};function evaluate(payload){var consoleOverrides=getConsoleOverrides();if(consoleOverrides){var parser=consoleOverrides.parser;"function"!=typeof eval&&(workerGlobal.eval=evalFunc);try{var returnValue=function(){return eval(payload.params.expression)}();getInjector().getWorkerSocket().send({id:payload.id,result:{result:parser.parseObject(returnValue)}})}catch(e){e.stack="".concat(e.name,": ").concat(e.message),getInjector().getWorkerSocket().send({id:payload.id,result:{exceptionDetails:{columnNumber:20,exception:parser.parseObject(e),exceptionId:1,lineNumber:0,text:"Uncaught"},result:parser.parseObject(e)}})}}}var runtime=Object.freeze({__proto__:null,compileScript:compileScript,enable:enable$1,evaluate:evaluate,getProperties:getProperties}),stringify$1={exports:{}};!function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,i){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n}(stringify$1,stringify$1.exports);var stringifyExports=stringify$1.exports,stringify=getDefaultExportFromCjs(stringifyExports),sharedGetCurrentPages;function callGetCurrentPages(){return sharedGetCurrentPages?sharedGetCurrentPages():workerGlobal.getCurrentPages?(sharedGetCurrentPages=workerGlobal.getCurrentPages)():workerGlobal.AFAppX&&AFAppX.getCurrentPages?(sharedGetCurrentPages=AFAppX.getCurrentPages)():[]}function getPagesData(e){var t;var n=getInjector().getRuntime();t=null==n?callGetCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:stringify(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify(t.data),route:t.route}})),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})}function setPageData(e){var t,n=e.params||{},r=n.viewId,o=n.data;var i=getInjector().getRuntime();t=null==i?callGetCurrentPages().filter((function(e){return e&&"".concat(e.$viewId)===r}))[0]:i.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&"".concat(e.$viewId)===r}))[0],t&&o&&t.setData(o)}var data=Object.freeze({__proto__:null,getPagesData:getPagesData,setPageData:setPageData});function getStorageItem(e){return new Promise((function(t){AFAppX.bridge.getStorage({key:e,success:function(n){var r=n.data;t({key:e,value:r,type:typeof r})},fail:function(){t()}})}))}function getStorageInfo(e){AFAppX.bridge.getStorageInfo({success:function(t){Promise.all(t.keys.map((function(e){return getStorageItem(e)}))).then((function(n){var r=n.filter((function(e){return e}));getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{currentSize:t.currentSize,limitSize:t.limitSize,data:r}})}))}})}function clearStorage(e){AFAppX.bridge.clearStorage()}function removeStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.removeStorage({key:t.key})}function setStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.setStorage({key:t.key,data:t.value})}var storage=Object.freeze({__proto__:null,clearStorage:clearStorage,getStorageInfo:getStorageInfo,removeStorage:removeStorage,setStorage:setStorage});function enable(){var e=getInjector().getMessageQueue();e.setApplogEnabled(!0),e.sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable});function ping(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getSystemInfo(e){AFAppX.bridge.getSystemInfo({success:function(t){var n={userAgent:getInjector().getAgentContext().userAgent,sdkVersion:AFAppX.bridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};getInjector().getWorkerSocket().send({id:e.id,result:n})}})}function getStartupParams(e){var t=getStartupParams$1();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Applog:applog,Data:data,Storage:storage,getStartupParams:getStartupParams,getSystemInfo:getSystemInfo,ping:ping});function getResourceTree(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var page=Object.freeze({__proto__:null,getResourceTree:getResourceTree}),protoHandler=Object.freeze({__proto__:null,Network:network,Page:page,Runtime:runtime,Tiny:index}),isWebPlatform=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){isWebPlatform=!0;try{delete workerGlobal.WebSocket}catch(e){}}var BaseImpl=isWebPlatform?WebSocketBrowserImpl:WebSocketNativeImpl,WorkerSocket=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMessageReceived=!1,t.messageBeforeReceived=[],t}return __extends(t,e),t.prototype.send=function(e){return this.sendSocketMessage(e)},t.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},t.prototype.onSocketOpen=function(){e.prototype.onSocketOpen.call(this),this.send({method:"MiniAppLog.enable",params:{},ext:{origin:EBugmePanelId.AppLog}}),throttledEmitDataChangedEvent()},t.prototype.onSocketClose=function(){e.prototype.onSocketClose.call(this)},t.prototype.onSocketError=function(e){},t.prototype.onSocketMessage=function(e){var t,n=this;this.isMessageReceived||(this.isMessageReceived=!0,this.messageBeforeReceived.forEach((function(e){n.send(e)})),this.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:LEAVE"===e&&this.close())}var r=getProtocolHandler(t.method);r?r(t):this.send({id:t.id,error:{code:-32e3,message:"unsupported"}})},t}(BaseImpl);function getProtocolHandler(e){if(e){for(var t=e.split("."),n=protoHandler,r=0,o=t;r<o.length;r++){if(!(n=n[o[r]]))break}return n}}var ignoreDomain=/\/(tyro\/agent|bugme\/channel\/paused)$/,DebugEventListener=function(){function e(){this.isIOS=getInjector().getAgentContext().isIOS,this.isLyra=getInjector().getAgentContext().isLyra}return e.prototype.setup=function(){this.isLyra||this.isIOS?this.listenDebugEvent4IOS():this.listenDebugEvent()},e.prototype.onNetworkRequest=function(e){if(!ignoreDomain.test(e.url)){var t=createProtocol4RequestWillBeSent(e),n=getInjector();n.getWorkerSocket().send(t),n.getNetworkRecorder().setRequest(e.requestId,{method:t.params.request.method,requestHeaders:t.params.request.headers,url:e.url})}},e.prototype.onNetworkResponse=function(e){if(!ignoreDomain.test(e.url)){var t=getInjector(),n=t.getNetworkRecorder().getRequest(e.requestId)||{};t.getWorkerSocket().send(createProtocol4ResponseReceived(e,n)),t.getWorkerSocket().send(createProtocol4LoadingFinished(e)),t.getNetworkRecorder().setRequest(e.requestId,{responseBody:e.body,isBase64Body:!1})}},e.prototype.onNetworkError=function(e){ignoreDomain.test(e.url)||getInjector().getWorkerSocket().send(createProtocol4LoadingFailed(e))},e.prototype.onStorageChanged=function(e){var t={};e.data&&Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),getInjector().getWorkerSocket().send({method:"Tiny.Storage.storageChanged",params:{data:t},ext:{origin:EBugmePanelId.Storage}})},e.prototype.listenDebugEvent4IOS=function(){var e=this,t=AFAppX.bridge;t.on(EWorkerAppEvent.DebugNetworkRequest,(function(t){e.onNetworkRequest(t.data)})),t.on(EWorkerAppEvent.DebugNetworkResponse,(function(t){e.onNetworkResponse(t.data)})),t.on(EWorkerAppEvent.DebugNetworkError,(function(t){e.onNetworkError(t.data)})),t.on(EWorkerAppEvent.DebugStorageChanged,(function(t){e.onStorageChanged(t.data)}))},e.prototype.listenDebugEvent=function(){var e=this;AFAppX.bridge.on(EWorkerAppEvent.DebugConsole,(function(t){var n,r=t.data,o=r.type,i=r.content;try{n=JSON.parse(i)}catch(e){return}switch(o){case EWorkerAppEvent.DebugNetworkRequest:e.onNetworkRequest(n);break;case EWorkerAppEvent.DebugNetworkResponse:e.onNetworkResponse(n);break;case EWorkerAppEvent.DebugNetworkError:e.onNetworkError(n);break;case EWorkerAppEvent.DebugStorageChanged:e.onStorageChanged(n)}}))},e}(),WorkerListener=function(){function e(){this.inited=!1}return e.prototype.setup=function(){if(this.inited)return!1;var e=AFAppX.bridge;if(/^1\./.test(e.SDKVersion)){var t=debounce(this.onPageResumeOrPause.bind(this),300,setTimeout,clearTimeout);e.on(EWorkerAppEvent.PageResume,t),e.on(EWorkerAppEvent.PagePause,t)}e.on(EWorkerAppEvent.DebugPanelClick,this.onDebugPanelClick),e.on(EWorkerAppEvent.DebugMaskButtonClick,this.onDebugMaskButtonClick),this.debugEventListener=new DebugEventListener,this.debugEventListener.setup(),this.inited=!0},e.prototype.onPageResumeOrPause=function(){throttledEmitDataChangedEvent()},e.prototype.onDebugPanelClick=function(){var e=getInjector().getWorkerSocket();e&&e.close()},e.prototype.onDebugMaskButtonClick=function(){},e}(),globalListener;function getGlobalWorkerEventListener(){return globalListener||(globalListener=new WorkerListener),globalListener}function getChannelUrl(){if("string"==typeof __BUGME_EXTERNAL_WORKER_URL__&&__BUGME_EXTERNAL_WORKER_URL__)return __BUGME_EXTERNAL_WORKER_URL__;var e,t=getInjector().getAgentContext(),n=t.channel,r=t.channelId,o=t.channelConfigKey;""!==n?e=n:e="wss://"+(channelDomainConfig[o]||channelDomainConfig[0]).hpmweb;return"".concat(e,"/bugme/client_w/").concat(r)}var DebugAgent=function(){function e(){}return e.prototype.init=function(){getGlobalWorkerEventListener().setup(),this.makeConnection()},e.prototype.makeConnection=function(){var e=getInjector(),t=getChannelUrl(),n=new WorkerSocket(t);e.setWorkerSocket(n),e.getAgentContext().isIOS?n.open():setTimeout((function(){n.open()}),1200)},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function getStaticPlugins(){var e=getStartupParams$1().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));try{var n=getInjector().getRuntime().getMeta().getAppMeta().plugins||{};Object.entries(n).forEach((function(n){var r=n[0],o=n[1];o.lazy&&!e[r]&&t.push({plugin_id:"".concat(o.provider,"(lazy)"),deploy_version:"Not Load"})}))}catch(e){}return t}function printStaticPlugins(){var e=getStaticPlugins();e.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(e))}var loadPluginName="loadPlugin";function hookLoadPlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal.my,loadPluginName);t&&!t.configurable||(t&&(e=workerGlobal.my.loadPlugin),Object.defineProperty(workerGlobal.my,loadPluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("object"==typeof t[0]){var r=t[0].success;t[0].success=function(){printDynamicPlugin(t[0].plugin),void 0!==r&&r.apply(this,arguments)}}return e.apply(void 0,t)}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function getExtensionVersions(){var e=getInjector().getRuntime().getMiniExtensionManager();if(e.extensionVersions)return e.extensionVersions;if(e.getInitedMiniExtensionInfo){var t=e.getInitedMiniExtensionInfo(),n=new Map;return t.forEach((function(e){n.set(e.id,e.version)})),n}return new Map}function printDynamicPlugin(e){var t=e.split("@")[0],n=getExtensionVersions();setTimeout((function(){console.log("%c--- Loaded Dynamic Plugin ---",LOG_STYLE),console.table([{plugin_id:t,deploy_version:n.get(t)}])}),100)}function setupPluginInfo(){console.log("%cTip: you can type `printPlugins()` anytime to print loaded plugins info","color: #3D80F3;"),hookLoadPlugin(),printStaticPlugins(),workerGlobal.printPlugins=printPlugins}function isUsePlugin(){var e=getInjector().getRuntime();if(void 0===e)return!1;var t=e.getMeta();if(t){var n=void 0;if("function"==typeof t.getAppMeta?n=t.getAppMeta():void 0!==t.meta&&(n=t.meta),n)return"object"==typeof n.plugins&&0!==Object.keys(n.plugins).length||n.useDynamicPlugins}return!1}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParams$1())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager(),r=[];if(n.extensionVersions)n.extensionVersions.forEach((function(e,n){void 0===t[n]&&r.push({plugin_id:n,deploy_version:e})}));else if(n.getInitedMiniExtensionInfo){n.getInitedMiniExtensionInfo().forEach((function(e){if(void 0===t[e.id]){var n={plugin_id:e.id,deploy_version:e.version};r.push(n)}}))}console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}function main(){try{registerAppxHook(),initConsoleOverrides(),hookRequirePlugin()}catch(e){error("sync task error",e)}runAfterAppx((function(){runAfterAppXBridgeReady((function(){try{getAgent().init(),isUsePlugin()&&setupPluginInfo()}catch(e){error("init agent error",e)}}))}))}var inPluginWorker="object"==typeof AFAppX&&AFAppX.Plugin;if(!workerGlobal.__BUGME_ON__&&!inPluginWorker){workerGlobal.__BUGME_ON__=!0;try{main()}catch(e){error("init error",e)}}})();
2
-
3
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).boatman={})}(this,(function(t){var e,n,r,i,o,s,a,u,c=Object.freeze({__proto__:null});!function(t){t.Connecting="connecting",t.Connected="connected",t.Disconnected="disconnected"}(e||(e={})),function(t){t.enable="Debugger.enable",t.disable="Debugger.disable",t.evaluateOnCallFrame="Debugger.evaluateOnCallFrame",t.getPossibleBreakpoints="Debugger.getPossibleBreakpoints",t.pause="Debugger.pause",t.removeBreakpoint="Debugger.removeBreakpoint",t.resume="Debugger.resume",t.setBreakpointByUrl="Debugger.setBreakpointByUrl",t.setBreakpointsActive="Debugger.setBreakpointsActive",t.stepInto="Debugger.stepInto",t.stepOver="Debugger.stepOver",t.stepOut="Debugger.stepOut",t.getScriptSource="Debugger.getScriptSource",t.setPauseOnExceptions="Debugger.setPauseOnExceptions",t.setSkipAllPauses="Debugger.setSkipAllPauses"}(n||(n={})),function(t){t.paused="Debugger.paused",t.resumed="Debugger.resumed",t.scriptParsed="Debugger.scriptParsed"}(r||(r={})),function(t){t.enable="Runtime.enable",t.disable="Runtime.disable",t.evaluate="Runtime.evaluate",t.compileScript="Runtime.compileScript",t.getProperties="Runtime.getProperties",t.callFunctionOn="Runtime.callFunctionOn",t.releaseObjectGroup="Runtime.releaseObjectGroup",t.globalLexicalScopeNames="Runtime.globalLexicalScopeNames",t.runIfWaitingForDebugger="Runtime.runIfWaitingForDebugger"}(i||(i={})),function(t){t.executionContextCreated="Runtime.executionContextCreated",t.consoleAPICalled="Runtime.consoleAPICalled",t.exceptionThrown="Runtime.exceptionThrown"}(o||(o={})),function(t){t.enable="Page.enable",t.getResourceTree="Page.getResourceTree"}(s||(s={})),function(t){t.setAutoAttach="Target.setAutoAttach"}(a||(a={})),function(t){t.targetCreated="Target.targetCreated",t.targetDestroyed="Target.targetDestroyed",t.targetInfoChanged="Target.targetInfoChanged",t.attachedToTarget="Target.attachedToTarget"}(u||(u={}));var l,h,p=Object.freeze({__proto__:null,get Debugger(){return n},get DebuggerEvent(){return r},get Page(){return s},get Runtime(){return i},get RuntimeEvent(){return o},get Target(){return a},get TargetEvent(){return u}});!function(t){t[t.NormalError=-32e3]="NormalError"}(l||(l={})),function(t){t.Other="other",t.Exception="exception"}(h||(h={}));var f=Object.defineProperty.bind(Object),d=Object.defineProperties.bind(Object),m=Object.getOwnPropertyDescriptor.bind(Object),v=Object.freeze.bind(Object),D=Object.keys.bind(Object),y=Object.prototype.hasOwnProperty;function g(t,e){return y.call(t,e)}var b=Object.assign.bind(Object)||function(t){for(var e=1;e<arguments.length;++e){var n=arguments[e];for(var r in n)g(n,r)&&(t[r]=n[r])}return t},x=Object.getOwnPropertyNames.bind(Object),E=Object.create.bind(Object),C=Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);var w=Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);function A(t){return w?w(t):t.__proto__}var k="object"==typeof console,F=k&&console.log?console.log.bind(console):function(){},S=k&&console.warn?console.warn.bind(console):function(){},B=k&&console.error?console.error.bind(console):function(){},P=m(g,"name").configurable,I=Object.freeze({__proto__:null,assignObject:b,createObject:E,defineProperties:d,defineProperty:f,error:B,freeze:v,getOwnPropertyDescriptor:m,getOwnPropertyNames:x,getPrototypeOf:A,hasOwnProperty:g,isFunctionNameConfigurable:P,log:F,objectKeys:D,setPrototypeOf:function(t,e){C?C(t,e):t.__proto__=e},warn:S});function T(t,e,n){f(t,e,{value:n,writable:!0,enumerable:!1,configurable:!0})}function O(t,e){return t[e]}var N=Object.freeze({__proto__:null,EDevtoolProtocolCommand:p,get EDevtoolProtocolErrorCode(){return l},get EDevtoolProtocolTypePausedReason(){return h},get EPanelStatus(){return e},HostAPI:I,estree:c,getBoatmanSymbol:O,globalSettingVar:"__BOAT_SETTING__",setBoatmanSymbol:T}),_=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(76===t.type&&0===t.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];e.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(t.innerComments=n)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=t.end.offset&&e.unshift(r.comment)}return this.trailing.length=0,e}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=t.end.offset&&(e=i.node.trailingComments,delete i.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,n=[];this.stack.length>0;){if(!((o=this.stack[this.stack.length-1])&&o.start>=t.start.offset))break;e=o.node,this.stack.pop()}if(e){for(var r=(e.leadingComments?e.leadingComments.length:0)-1;r>=0;--r){var i=e.leadingComments[r];i.range[1]<=t.start.offset&&(n.unshift(i),e.leadingComments.splice(r,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=t.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},t.prototype.visitNode=function(t,e){if(!(67===t.type&&t.body.length>0)){this.insertInnerComments(t,e);var n=this.findTrailingComments(e),r=this.findLeadingComments(e);r.length>0&&(t.leadingComments=r),n.length>0&&(t.trailingComments=n),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var n="L"===t.type[0]?"Line":"Block",r={type:n,value:t.value};if(t.range&&(r.range=t.range),t.loc&&(r.loc=t.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(i.comment.loc=t.loc),t.type=n,this.leading.push(i),this.trailing.push(i)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();function j(t,e){if(!t)throw new Error("ASSERT: "+e)}var M=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.createError=function(t,e,n,r){var i="Line "+e+": "+r,o=this.constructError(i,n);return o.index=t,o.lineNumber=e,o.description=r,o},t.prototype.throwError=function(t,e,n,r){throw this.createError(t,e,n,r)},t.prototype.tolerateError=function(t,e,n,r){var i=this.createError(t,e,n,r);if(!this.tolerant)throw i;this.recordError(i)},t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.constructError=function(t,e){var n=new Error(t);return n.stack=n.toString(),n},t}(),R="Unexpected token",L="Getter must not have any formal parameters",z="Setter must have exactly one formal parameter",U="Setter function argument must not be a rest parameter",K="Class constructor may not be an async method",G="Class constructor may not be an accessor",H="Missing initializer in %0 declaration",W="Unexpected token =",q="Unexpected token =",V="Duplicate binding %0",Q="A class may only have one constructor",Y="Duplicate __proto__ fields are not allowed in object literals",J="%0 loop variable declaration may not have an initializer",X="Generator declarations are not allowed in legacy contexts",$="Illegal break statement",Z="Illegal continue statement",tt="Unexpected token",et="Unexpected token",nt="Illegal 'use strict' directive in function with non-simple parameter list",rt="Illegal return statement",it="Keyword must not contain escaped characters",ot="Invalid hexadecimal escape sequence",st="Invalid left-hand side in assignment",at="Invalid left-hand side in for-in",ut="Invalid left-hand side in for-loop",ct="Unexpected token",lt="Invalid regular expression",ht="Invalid Unicode escape sequence",pt="let is disallowed as a lexically bound name",ft="Unexpected token",dt="More than one default clause in switch statement",mt="Illegal newline after throw",vt="Unexpected token",Dt="Missing catch or finally after try",yt="Rest parameter must be last formal parameter",gt="Unexpected token",bt="%0 '%1' has already been declared",xt="Classes may not have static property named prototype",Et="Catch variable may not be eval or arguments in strict mode",Ct="Delete of an unqualified identifier in strict mode.",wt="In strict mode code, functions can only be declared at top level or inside a block",At="Function name may not be eval or arguments in strict mode",kt="Assignment to eval or arguments is not allowed in strict mode",Ft="Postfix increment/decrement may not have eval or arguments operand in strict mode",St="Prefix increment/decrement may not have eval or arguments operand in strict mode",Bt="Strict mode code may not include a with statement",Pt="Octal literals are not allowed in strict mode.",It="Strict mode function may not have duplicate parameter names",Tt="Parameter name eval or arguments is not allowed in strict mode",Ot="Use of future reserved word in strict mode",Nt="Variable name may not be eval or arguments in strict mode",_t="Octal literals are not allowed in template strings.",jt="\\8 and \\9 are not allowed in template strings.",Mt="Unexpected end of input",Rt="Unexpected identifier",Lt="Unexpected number",zt="Unexpected reserved word",Ut="Unexpected string",Kt="Unexpected quasi %0",Gt="Unexpected token %0",Ht="Unexpected token ILLEGAL",Wt="Undefined label '%0'",qt="Invalid regular expression: missing /",Vt=function(t){this.type=30,this.elements=t},Qt=function(t){this.type=60,this.elements=t},Yt=function(t,e,n){this.type=31,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!1},Jt={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},Xt=function(t,e,n){this.type=32,this.operator=Jt[t],this.left=e,this.right=n},$t=function(t,e){this.type=61,this.left=t,this.right=e},Zt=function(t,e,n){this.type=31,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!0},te=function(t,e,n){this.type=63,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},ee=function(t,e,n){this.type=36,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},ne=function(t){this.type=93,this.argument=t},re={"==":1,"!=":2,"===":3,"!==":4,"<":5,"<=":6,">":7,">=":8,"<<":9,">>":10,">>>":11,"+":12,"-":13,"*":14,"**":15,"/":16,"%":17,"|":18,"^":19,"&":20,in:21,instanceof:22,"||":1,"&&":2},ie=function(t,e,n){var r="||"===t||"&&"===t||"??"===t;this.type=r?38:33,this.operator=re[t],this.left=e,this.right=n},oe=function(t){this.type=76,this.body=t},se=function(t){this.type=1,this.label=t},ae=function(t,e){this.type=34,this.callee=t,this.arguments=e},ue=function(t,e){this.type=62,this.param=t,this.body=e},ce=function(t){this.type=88,this.body=t},le=function(t,e,n){this.type=86,this.id=t,this.superClass=e,this.body=n},he=function(t,e,n){this.type=94,this.id=t,this.superClass=e,this.body=n},pe=function(t,e){this.type=39,this.computed=!0,this.object=t,this.property=e},fe=function(t,e,n){this.type=35,this.test=t,this.consequent=e,this.alternate=n},de=function(t){this.type=2,this.label=t},me=function(){this.type=3},ve=function(t,e){this.type=5,this.expression=t,this.directive=e},De=function(t,e){this.type=4,this.body=t,this.test=e},ye=function(){this.type=75},ge=function(t){this.type=82,this.source=t},be=function(t){this.type=83,this.declaration=t},xe=function(t,e,n){this.type=84,this.declaration=t,this.specifiers=e,this.source=n},Ee=function(t,e){this.type=85,this.exported=e,this.local=t},Ce=function(t){this.type=5,this.expression=t},we=function(t,e,n){this.type=6,this.left=t,this.right=e,this.body=n,this.each=!1},Ae=function(t,e,n,r){this.type=7,this.await=r,this.left=t,this.right=e,this.body=n},ke=function(t,e,n,r){this.type=8,this.init=t,this.test=e,this.update=n,this.body=r},Fe=function(t,e,n,r){this.type=63,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},Se=function(t,e,n,r){this.type=36,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},Be=function(t){this.type=64,this.name=t},Pe=function(t,e,n){this.type=9,this.test=t,this.consequent=e,this.alternate=n},Ie=function(){this.type=77},Te=function(t,e){this.type=78,this.specifiers=t,this.source=e},Oe=function(t){this.type=79,this.local=t},Ne=function(t){this.type=80,this.local=t},_e=function(t,e){this.type=81,this.local=t,this.imported=e},je=function(t,e){this.type=10,this.label=t,this.body=e},Me=function(t,e){this.type=65,this.value=t,this.raw=e},Re=function(t,e){this.type=89,this.meta=t,this.property=e},Le=function(t,e,n,r,i){this.type=95,this.key=t,this.computed=e,this.value=n,this.kind=r,this.static=i},ze=function(t){this.type=67,this.body=t,this.sourceType="module"},Ue=function(t,e){this.type=40,this.callee=t,this.arguments=e},Ke=function(t){this.type=41,this.properties=t},Ge=function(t){this.type=66,this.properties=t},He=function(t,e,n,r,i,o){this.type=68,this.key=e,this.computed=n,this.value=r,this.kind=t,this.method=i,this.shorthand=o},We=function(t,e,n,r){this.type=65,this.value=t,this.raw=e,this.regex={pattern:n,flags:r}},qe=function(t){this.type=69,this.argument=t},Ve=function(t){this.type=11,this.argument=t},Qe=function(t){this.type=67,this.body=t,this.sourceType="script"},Ye=function(t){this.type=37,this.expressions=t},Je=function(t){this.type=70,this.argument=t},Xe=function(t,e){this.type=39,this.computed=!1,this.object=t,this.property=e},$e=function(){this.type=87},Ze=function(t,e){this.type=71,this.test=t,this.consequent=e},tn=function(t,e){this.type=12,this.discriminant=t,this.cases=e},en=function(t,e){this.type=42,this.tag=t,this.quasi=e},nn=function(t,e){this.type=72,this.value=t,this.tail=e},rn=function(t,e){this.type=73,this.quasis=t,this.expressions=e},on=function(){this.type=43},sn=function(t){this.type=13,this.argument=t},an=function(t,e,n){this.type=14,this.block=t,this.handler=e,this.finalizer=n},un={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},cn=function(t,e){this.type=44,this.operator=un[t],this.argument=e,this.prefix=!0},ln={"++":1,"--":2},hn=function(t,e,n){this.type=45,this.operator=ln[t],this.argument=e,this.prefix=n},pn={var:1,let:2,const:3},fn=function(t,e){this.type=17,this.declarations=t,this.kind=pn[e]},dn=function(t,e){this.type=74,this.id=t,this.init=e},mn=function(t,e){this.type=15,this.test=t,this.body=e},vn=function(t,e){this.type=16,this.object=t,this.body=e},Dn=function(t,e){this.type=92,this.argument=t,this.delegate=e},yn={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},gn={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&yn.NonAsciiIdentifierStart.test(gn.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&yn.NonAsciiIdentifierPart.test(gn.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isDecimalDigitChar:function(t){return 1===t.length&&gn.isDecimalDigit(t.charCodeAt(0))},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}};function bn(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function xn(t){return"01234567".indexOf(t)}var En=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.isModule=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart,this.curlyStack=t.curlyStack},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=Ht),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=Ht),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,n,r=[];for(this.trackComment&&(r=[],e=this.index-t,n={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,gn.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:n};r.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};o={multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:n};r.push(o)}return r},t.prototype.skipMultiLineComment=function(){var t,e,n=[];for(this.trackComment&&(n=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(gn.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e};n.push(i)}return n}++this.index}else++this.index}if(this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e};n.push(i)}return this.tolerateUnexpectedToken(),n},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(gn.isWhiteSpace(n))++this.index;else if(gn.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(r)),e=!0}else{if(42!==n)break;this.index+=2;r=this.skipMultiLineComment();this.trackComment&&(t=t.concat(r))}else if(e&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;r=this.skipSingleLineComment(3);this.trackComment&&(t=t.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;r=this.skipSingleLineComment(4);this.trackComment&&(t=t.concat(r))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var n=this.source.charCodeAt(t+1);if(n>=56320&&n<=57343)e=1024*(e-55296)+n-56320+65536}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,n=0,r=0;r<e;++r){if(this.eof()||!gn.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+bn(this.source[this.index++])}return String.fromCharCode(n)},t.prototype.tryToScanUnicodeCodePointEscape=function(){var t=this.source[this.index],e=0;if("}"===t)return null;for(;!this.eof()&&(t=this.source[this.index++],gn.isHexDigit(t.charCodeAt(0)));)e=16*e+bn(t);return e>1114111||"}"!==t?null:gn.fromCodePoint(e)},t.prototype.scanUnicodeCodePointEscape=function(){var t=this.tryToScanUnicodeCodePointEscape();return null===t?this.throwUnexpectedToken():t},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!gn.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),n=gn.fromCodePoint(e);for(this.index+=n.length,92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&gn.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),n=t);!this.eof()&&(e=this.codePointAt(this.index),gn.isIdentifierPart(e));)n+=t=gn.fromCodePoint(e),this.index+=t.length,92===e&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&gn.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),n+=t);return n},t.prototype.octalToDecimal=function(t){var e="0"!==t,n=xn(t);return!this.eof()&&gn.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,n=8*n+xn(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&gn.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+xn(this.source[this.index++]))),{code:n,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,n=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!==(t=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&e+n.length!==this.index){var r=this.index;this.index=e,this.tolerateUnexpectedToken(it),this.index=r}return{type:t,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"~":++this.index;break;default:">>>="===(e=this.source.substr(this.index,4))?this.index+=4:"==="===(e=e.substr(0,3))||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:"&&"===(e=e.substr(0,2))||"||"===e||"??"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:(e=this.source[this.index],"<>=!+-*%&|?^/".indexOf(e)>=0&&++this.index)}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&gn.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),gn.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,n="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(gn.isIdentifierStart(e)||gn.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var n="",r=!1;for(gn.isOctalDigit(t.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&gn.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(gn.isIdentifierStart(this.source.charCodeAt(this.index))||gn.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t<this.length;++t){var e=this.source[t];if("8"===e||"9"===e)return!1;if(!gn.isOctalDigit(e.charCodeAt(0)))return!0}return!0},t.prototype.scanNumericLiteral=function(){var t=this.index,e=this.source[t];j(gn.isDecimalDigit(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==e){if(n=this.source[this.index++],e=this.source[this.index],"0"===n){if("x"===e||"X"===e)return++this.index,this.scanHexLiteral(t);if("b"===e||"B"===e)return++this.index,this.scanBinaryLiteral(t);if("o"===e||"O"===e)return this.scanOctalLiteral(e,t);if(e&&gn.isOctalDigit(e.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(e,t)}for(;gn.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];e=this.source[this.index]}if("."===e){for(n+=this.source[this.index++];gn.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];e=this.source[this.index]}if("e"===e||"E"===e)if(n+=this.source[this.index++],"+"!==(e=this.source[this.index])&&"-"!==e||(n+=this.source[this.index++]),gn.isDecimalDigit(this.source.charCodeAt(this.index)))for(;gn.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return gn.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanStringLiteral=function(){var t=this.index,e=this.source[t];j("'"===e||'"'===e,"String literal must starts with a quote"),++this.index;for(var n=!1,r="";!this.eof();){var i=this.source[this.index++];if(i===e){e="";break}if("\\"===i)if((i=this.source[this.index++])&&gn.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{var o=this.scanHexEscape(i);null===o&&this.throwUnexpectedToken(),r+=o}break;case"x":var s=this.scanHexEscape(i);null===s&&this.throwUnexpectedToken(ot),r+=s;break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=i,this.tolerateUnexpectedToken();break;default:if(i&&gn.isOctalDigit(i.charCodeAt(0))){var a=this.octalToDecimal(i);n=a.octal||n,r+=String.fromCharCode(a.code)}else r+=i}else{if(gn.isLineTerminator(i.charCodeAt(0)))break;r+=i}}return""!==e&&(this.index=t,this.throwUnexpectedToken()),{type:8,value:r,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanTemplate=function(){var t="",e=!1,n=this.index,r="`"===this.source[n],i=!1,o=null,s=2;for(++this.index;!this.eof();){var a=this.source[this.index++];if("`"===a){s=1,i=!0,e=!0;break}if("$"===a){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,e=!0;break}t+=a}else{if(null!==o)continue;if("\\"===a)if(a=this.source[this.index++],gn.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;var u=this.tryToScanUnicodeCodePointEscape();null===u?o="u":t+=u}else{var c=this.scanHexEscape(a);null===c?o="u":t+=c}break;case"x":var l=this.scanHexEscape(a);null===l?o="x":t+=l;break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:"0"===a?gn.isDecimalDigit(this.source.charCodeAt(this.index))?o="0":t+="\0":gn.isDecimalDigitChar(a)?o=a:t+=a}else gn.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,t+="\n"):t+=a}}return e||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-s),cooked:null===o?t:null,head:r,tail:i,notEscapeSequenceHead:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},t.prototype.testRegExp=function(t,e){var n=this,r=t;e.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(t,e,r){var i=parseInt(e||r,16);return i>1114111&&n.throwUnexpectedToken(lt),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(t){this.throwUnexpectedToken(lt)}try{return new RegExp(t,e)}catch(t){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];j("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],gn.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(qt),e+=t;else if(gn.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(qt);else if(n)"]"===t&&(n=!1);else{if("/"===t){r=!0;break}"["===t&&(n=!0)}return r||this.throwUnexpectedToken(qt),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!gn.isIdentifierPart(e.charCodeAt(0)))break;if(++this.index,"\\"!==e||this.eof())t+=e,e;else if("u"===(e=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(t+=r,"\\u";n<this.index;++n)this.source[n];else this.index=n,t+="u","\\u";this.tolerateUnexpectedToken()}else"\\",this.tolerateUnexpectedToken()}return t},t.prototype.scanRegExp=function(){var t=this.index,e=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:e,flags:n,regex:this.testRegExp(e,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var t=this.source.charCodeAt(this.index);return gn.isIdentifierStart(t)?this.scanIdentifier():40===t||41===t||59===t?this.scanPunctuator():39===t||34===t?this.scanStringLiteral():46===t?gn.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():gn.isDecimalDigit(t)?this.scanNumericLiteral():96===t||125===t&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():t>=55296&&t<57343&&gn.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}(),Cn={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},wn="ArrowParameterPlaceHolder",An=function(){function t(t,e,n){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=n,this.errorHandler=new M,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new En(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return t.prototype.throwError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e.slice(),i=t.replace(/%(\d)/g,(function(t,e){return j(e<r.length,"Message reference must be in range"),r[e]})),o=this.lastMarker.index,s=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(o,s,a,i)},t.prototype.tolerateError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e.slice(),i=t.replace(/%(\d)/g,(function(t,e){return j(e<r.length,"Message reference must be in range"),r[e]})),o=this.lastMarker.index,s=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(o,s,a,i)},t.prototype.unexpectedTokenError=function(t,e){var n,r=e||Gt;if(t?(e||(r=2===t.type?Mt:3===t.type?Rt:6===t.type?Lt:8===t.type?Ut:10===t.type?Kt:Gt,4===t.type&&(this.scanner.isFutureReservedWord(t.value)?r=zt:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(r=Ot))),n=t.value):n="ILLEGAL",r=r.replace("%0",n),t&&"number"==typeof t.lineNumber){var i=t.start,o=t.lineNumber,s=this.lastMarker.index-this.lastMarker.column,a=t.start-s+1;return this.errorHandler.createError(i,o,a,r)}i=this.lastMarker.index,o=this.lastMarker.line,a=this.lastMarker.column+1;return this.errorHandler.createError(i,o,a,r)},t.prototype.throwUnexpectedToken=function(t,e){throw this.unexpectedTokenError(t,e)},t.prototype.tolerateUnexpectedToken=function(t,e){this.errorHandler.tolerate(this.unexpectedTokenError(t,e))},t.prototype.collectComments=function(){if(this.config.comment){var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var e=0;e<t.length;++e){var n=t[e],r={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])};this.config.range&&(r.range=n.range),this.config.loc&&(r.loc=n.loc);var i={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(r,i)}}else this.scanner.scanComments()},t.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},t.prototype.convertToken=function(t){var e={type:Cn[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(e.range=[t.start,t.end]),this.config.loc&&(e.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===t.type){var n=t.pattern,r=t.flags;e.regex={pattern:n,flags:r}}return e},t.prototype.nextToken=function(){var t=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var e=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==e.lineNumber,e&&this.context.strict&&3===e.type&&this.scanner.isStrictModeReservedWord(e.value)&&(e.type=4),this.lookahead=e,this.config.tokens&&2!==e.type&&this.tokens.push(this.convertToken(e)),t},t.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},t.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},t.prototype.startNode=function(t,e){void 0===e&&(e=0);var n=t.start-t.lineStart,r=t.lineNumber;return n<0&&(n+=e,r--),{index:t.start,line:r,column:n}},t.prototype.finalize=function(t,e){if(this.config.range&&(e.range=[t.index,this.lastMarker.index]),this.config.loc&&(e.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(e.loc.source=this.config.source)),this.delegate){var n={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(e,n)}return e},t.prototype.expect=function(t){var e=this.nextToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;7===t.type&&","===t.value?this.nextToken():7===t.type&&";"===t.value?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,Gt)}else this.expect(",")},t.prototype.expectKeyword=function(t){var e=this.nextToken();4===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.match=function(t){return 7===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchKeyword=function(t){return 4===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchContextualKeyword=function(t){return 3===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var t=this.lookahead.value;return"="===t||"*="===t||"**="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new Be(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Pt),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new Me(e.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new Me("true"===e.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(r,new Me(null,n));break;case 10:t=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,e=this.nextRegexToken(),n=this.getTokenRaw(e),t=this.finalize(r,new We(e.regex,n,e.pattern,e.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(r,new Be(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(r,new on)):t=this.matchKeyword("class")?this.parseClassExpression():this.matchImportCall()?this.parseImportCall():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new Je(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(n)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new Vt(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=n,r},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new Se(null,n.params,r,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=e,this.context.await=n,this.finalize(t,new ee(null,r.params,i))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,Pt);var r=this.getTokenRaw(n);t=this.finalize(e,new Me(n.value,r));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new Be(n.value));break;case 7:"["===n.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(n);break;default:t=this.throwUnexpectedToken(n)}return t},t.prototype.isPropertyKey=function(t,e){return 64===t.type&&t.name===e||65===t.type&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,n=this.createNode(),r=this.lookahead,i=null,o=null,s=!1,a=!1,u=!1,c=!1;if(3===r.type){var l=r.value;this.nextToken(),s=this.match("["),i=(c=!(this.hasLineTerminator||"async"!==l||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new Be(l))}else this.match("*")?this.nextToken():(s=this.match("["),i=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!c&&"get"===r.value&&h)e="get",s=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===r.type&&!c&&"set"===r.value&&h)e="set",s=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&h)e="init",s=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),a=!0;else if(i||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!c)!s&&this.isPropertyKey(i,"__proto__")&&(t.value&&this.tolerateError(Y),t.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0;else if(3===r.type){l=this.finalize(n,new Be(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var p=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(n,new $t(l,p))}else u=!0,o=l}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new He(e,i,s,o,a,u))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],n={value:!1};!this.match("}");)e.push(this.match("...")?this.parseSpreadElement():this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new Ke(e))},t.prototype.throwTemplateLiteralEarlyErrors=function(t){switch(t.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(t,ht);case"x":return this.throwUnexpectedToken(t,ot);case"8":case"9":return this.throwUnexpectedToken(t,jt);default:return this.throwUnexpectedToken(t,_t)}},t.prototype.parseTemplateHead=function(t){j(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),n=this.nextToken();t.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(e,new nn({raw:r,cooked:i},n.tail))},t.prototype.parseTemplateElement=function(t){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),n=this.nextToken();t.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(e,new nn({raw:r,cooked:i},n.tail))},t.prototype.parseTemplateLiteral=function(t){var e=this.createNode(),n=[],r=[],i=this.parseTemplateHead(t);for(r.push(i);!i.tail;)n.push(this.parseExpression()),i=this.parseTemplateElement(t),r.push(i);return this.finalize(e,new rn(r,n))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case 64:case 39:case 69:case 61:default:break;case 70:t.type=69,this.reinterpretExpressionAsPattern(t.argument);break;case 30:t.type=60;for(var e=0;e<t.elements.length;e++)null!==t.elements[e]&&this.reinterpretExpressionAsPattern(t.elements[e]);break;case 41:t.type=66;for(e=0;e<t.properties.length;e++){var n=t.properties[e];this.reinterpretExpressionAsPattern(70===n.type?n:n.value)}break;case 32:t.type=61,delete t.operator,this.reinterpretExpressionAsPattern(t.left)}},t.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:wn,params:[],async:!1};else{var e=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:wn,params:[t],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,t={type:wn,params:i,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,t={type:wn,params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(t=this.finalize(this.startNode(e),new Ye(i)))}if(!r){if(this.expect(")"),this.match("=>")&&(64===t.type&&"yield"===t.name&&(r=!0,t={type:wn,params:[t],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===t.type)for(o=0;o<t.expressions.length;o++)this.reinterpretExpressionAsPattern(t.expressions[o]);else this.reinterpretExpressionAsPattern(t);var s=37===t.type?t.expressions:[t];t={type:wn,params:s,async:!1}}this.context.isBindingElement=!1}}}return t},t.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.isIdentifierName=function(t){return 3===t.type||4===t.type||1===t.type||5===t.type},t.prototype.parseIdentifierName=function(){var t=this.createNode(),e=this.nextToken();return this.isIdentifierName(e)||this.throwUnexpectedToken(e),this.finalize(t,new Be(e.value))},t.prototype.parseNewExpression=function(){var t,e=this.createNode(),n=this.parseIdentifierName();if(j("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();t=new Re(n,r)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var i=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];t=new Ue(i,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,t)},t.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},t.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.matchImportCall=function(){var t=this.matchKeyword("import");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(e),t=7===n.type&&"("===n.value}return t},t.prototype.parseImportCall=function(){var t=this.createNode();return this.expectKeyword("import"),this.finalize(t,new Ie)},t.prototype.parseLeftHandSideExpressionAllowCall=function(){var t,e=this.lookahead,n=this.matchContextualKeyword("async"),r=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(t=this.createNode(),this.nextToken(),t=this.finalize(t,new $e),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):t=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();t=this.finalize(this.startNode(e),new Xe(t,i))}else if(this.match("(")){var o=n&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=o?this.parseAsyncArguments():this.parseArguments();if(77===t.type&&1!==s.length&&this.tolerateError(R),t=this.finalize(this.startNode(e),new ae(t,s)),o&&this.match("=>")){for(var a=0;a<s.length;++a)this.reinterpretExpressionAsPattern(s[a]);t={type:wn,params:s,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(this.startNode(e),new pe(t,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(this.startNode(e),new en(t,u))}return this.context.allowIn=r,t},t.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(t,new $e)},t.prototype.parseLeftHandSideExpression=function(){j(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),e=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(t,new pe(e,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");n=this.parseIdentifierName();e=this.finalize(t,new Xe(e,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(t,new en(e,r))}return e},t.prototype.parseUpdateExpression=function(){var t,e=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(e),r=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===t.type&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(St),this.context.isAssignmentTarget||this.tolerateError(st);var i=!0;t=this.finalize(n,new hn(r.value,t,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&64===t.type&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(Ft),this.context.isAssignmentTarget||this.tolerateError(st),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value;i=!1;t=this.finalize(this.startNode(e),new hn(o,t,i))}return t},t.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var e=this.parseUnaryExpression();return this.finalize(t,new ne(e))},t.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var e=this.startNode(this.lookahead),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(e,new cn(n.value,t)),this.context.strict&&"delete"===t.operator&&64===t.argument.type&&this.tolerateError(Ct),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else t=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return t},t.prototype.parseExponentiationExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseUnaryExpression);if(44!==e.type&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=e,r=this.isolateCoverGrammar(this.parseExponentiationExpression);e=this.finalize(this.startNode(t),new ie("**",n,r))}return e},t.prototype.binaryPrecedence=function(t){var e=t.value;return 7===t.type?this.operatorPrecedence[e]||0:4===t.type&&("instanceof"===e||this.context.allowIn&&"in"===e)?12:0},t.prototype.parseBinaryExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseExponentiationExpression),n=!0,r=!0,i=function(t){"&&"!==t.value&&"||"!==t.value||(r=!1),"??"===t.value&&(n=!1)},o=this.lookahead,s=this.binaryPrecedence(o);if(s>0){i(o),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var a=[t,this.lookahead],u=e,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[u,o.value,c],h=[s];!((s=this.binaryPrecedence(this.lookahead))<=0);){for((n||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(r||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),i(this.lookahead);l.length>2&&s<=h[h.length-1];){c=l.pop();var p=l.pop();h.pop(),u=l.pop(),a.pop();var f=a[a.length-1],d=this.startNode(f,f.lineStart);l.push(this.finalize(d,new ie(p,u,c)))}l.push(this.nextToken().value),h.push(s),a.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=l.length-1;e=l[m];for(var v=a.pop();m>1;){f=a.pop();var D=v&&v.lineStart;d=this.startNode(f,D),p=l[m-1];e=this.finalize(d,new ie(p,l[m-2],e)),m-=2,v=f}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new fe(e,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case 64:this.validateParam(t,e,e.name);break;case 69:this.checkPatternParam(t,e.argument);break;case 61:this.checkPatternParam(t,e.left);break;case 60:for(var n=0;n<e.elements.length;n++)null!==e.elements[n]&&this.checkPatternParam(t,e.elements[n]);break;case 66:for(n=0;n<e.properties.length;n++){var r=e.properties[n];this.checkPatternParam(t,69===r.type?r:r.value)}}t.simple=t.simple&&e instanceof Be},t.prototype.reinterpretAsCoverFormalsList=function(t){var e=[t],n={simple:!0,paramSet:{}},r=!1;switch(t.type){case 64:break;case wn:e=t.params,r=t.async;break;default:return null}for(var i=0;i<e.length;++i){61===(o=e[i]).type?92===o.right.type&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=64,o.right.name="yield",delete o.right.argument,delete o.right.delegate):r&&64===o.type&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,o),e[i]=o}if(this.context.strict||!this.context.allowYield)for(i=0;i<e.length;++i){var o;92===(o=e[i]).type&&this.throwUnexpectedToken(this.lookahead)}if(n.message===It){var s=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(s,n.message)}return{simple:n.simple,params:e,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},t.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var e=this.lookahead,n=e;if(t=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),t={type:wn,params:[r],async:!0}}if(t.type===wn||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=t.async,o=this.reinterpretAsCoverFormalsList(t);if(o){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowStrictDirective;this.context.allowStrictDirective=o.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=i;var l=this.startNode(e);this.expect("=>");var h=void 0;if(this.match("{")){var p=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=p}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var f=76!==h.type;this.context.strict&&o.firstRestricted&&this.throwUnexpectedToken(o.firstRestricted,o.message),this.context.strict&&o.stricted&&this.tolerateUnexpectedToken(o.stricted,o.message),t=i?this.finalize(l,new Zt(o.params,h,f)):this.finalize(l,new Yt(o.params,h,f)),this.context.strict=s,this.context.allowStrictDirective=a,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(st),this.context.strict&&64===t.type){var d=t;this.scanner.isRestrictedWord(d.name)&&this.tolerateUnexpectedToken(n,kt),this.scanner.isStrictModeReservedWord(d.name)&&this.tolerateUnexpectedToken(n,Ot)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var m=(n=this.nextToken()).value,v=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new Xt(m,t,v)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new Ye(n))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,tt),t=this.parseExportDeclaration();break;case"import":this.matchImportCall()?t=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,et),t=this.parseImportDeclaration());break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new oe(e))},t.prototype.parseLexicalBinding=function(t,e){var n=this.createNode(),r=this.parsePattern([],t);this.context.strict&&64===r.type&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(Nt);var i=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(H,"const")):(!e.inFor&&64!==r.type||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new dn(r,i))},t.prototype.parseBindingList=function(t,e){for(var n=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,e));return n},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),n=this.nextToken().value;j("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(e,new fn(r,n))},t.prototype.parseBindingRestElement=function(t,e){var n=this.createNode();this.expect("...");var r=this.parsePattern(t,e);return this.finalize(n,new qe(r))},t.prototype.parseArrayPattern=function(t,e){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(t,e));break}r.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new Qt(r))},t.prototype.parsePropertyPattern=function(t,e){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var a=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new Be(a.value));if(this.match("=")){t.push(a),s=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(a),new $t(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(t,e)):(t.push(a),s=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(t,e);return this.finalize(i,new He("init",n,o,r,!1,s))},t.prototype.parseRestProperty=function(t,e){var n=this.createNode();this.expect("...");var r=this.parsePattern(t);return this.match("=")&&this.throwError(q),this.match("}")||this.throwError(gt),this.finalize(n,new qe(r))},t.prototype.parseObjectPattern=function(t,e){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.match("...")?this.parseRestProperty(t,e):this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new Ge(r))},t.prototype.parsePattern=function(t,e){var n;return this.match("[")?n=this.parseArrayPattern(t,e):this.match("{")?n=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,pt),t.push(this.lookahead),n=this.parseVariableIdentifier(e)),n},t.prototype.parsePatternWithDefault=function(t,e){var n=this.lookahead,r=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new $t(r,o))}return r},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,Ot):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,Ot):(this.context.strict||"let"!==n.value||"var"!==t)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(e,new Be(n.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Nt);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===n.type||t.inFor||this.expect("="),this.finalize(e,new dn(n,r))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(e));return n},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new fn(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new ye)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new Ce(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(wt),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ye)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(e,new Pe(r,t,n))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new De(n,r))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ye);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=r}return this.finalize(e,new mn(n,t))},t.prototype.parseForStatement=function(){var t,e,n,r=null,i=null,o=null,s=!0,a=!1,u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.await||this.tolerateUnexpectedToken(this.lookahead),a=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var l=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!a&&1===l.length&&this.matchKeyword("in")){var h=l[0];h.init&&(60===h.id.type||66===h.id.type||this.context.strict)&&this.tolerateError(J,"for-in"),r=this.finalize(r,new fn(l,"var")),this.nextToken(),t=r,e=this.parseExpression(),r=null}else 1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new fn(l,"var")),this.nextToken(),t=r,e=this.parseAssignmentExpression(),r=null,s=!1):(r=this.finalize(r,new fn(l,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var p=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;l=this.parseBindingList(p,{inFor:!0});this.context.allowIn=c,1===l.length&&null===l[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new fn(l,p)),this.nextToken(),t=r,e=this.parseExpression(),r=null):1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new fn(l,p)),this.nextToken(),t=r,e=this.parseAssignmentExpression(),r=null,s=!1):(this.consumeSemicolon(),r=this.finalize(r,new fn(l,p)))}else r=this.finalize(r,new Be(p)),this.nextToken(),t=r,e=this.parseExpression(),r=null}else{var f=this.lookahead,d=this.context.isBindingElement,m=this.context.isAssignmentTarget,v=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(at),this.nextToken(),this.reinterpretExpressionAsPattern(r),t=r,e=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(ut),this.nextToken(),this.reinterpretExpressionAsPattern(r),t=r,e=this.parseAssignmentExpression(),r=null,s=!1;else{if(this.context.isBindingElement=d,this.context.isAssignmentTarget=m,this.context.firstCoverInitializedNameError=v,this.match(",")){for(var D=[r];this.match(",");)this.nextToken(),D.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(f),new Ye(D))}this.expect(";")}}if(void 0===t&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(o=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new ye);else{this.expect(")");var y=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=y}return void 0===t?this.finalize(u,new ke(r,i,o,n)):s?this.finalize(u,new we(t,e,n)):this.finalize(u,new Ae(t,e,n,a))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();e=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Wt,n.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(Z),this.finalize(t,new de(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Wt,n.name),e=n}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError($),this.finalize(t,new se(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(rt);var t=this.createNode();this.expectKeyword("return");var e=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new Ve(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Bt);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ye)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new vn(n,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new Ze(t,n))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var o=this.parseSwitchCase();null===o.test&&(i&&this.throwError(dt),i=!0),r.push(o)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new tn(e,r))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),n=this.parseExpression();if(64===n.type&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(bt,"Label",r.name),this.context.labelSet[i]=!0;var o=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),o=this.parseClassDeclaration();else if(this.matchKeyword("function")){var s=this.lookahead,a=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(s,wt):a.generator&&this.tolerateUnexpectedToken(s,X),o=a}else o=this.parseStatement();delete this.context.labelSet[i],t=new je(r,o)}else this.consumeSemicolon(),t=new Ce(n);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(mt);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new sn(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],n=this.parsePattern(e),r={},i=0;i<e.length;i++){var o="$"+e[i].value;Object.prototype.hasOwnProperty.call(r,o)&&this.tolerateError(V,e[i].value),r[o]=!0}this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Et),this.expect(")");var s=this.parseBlock();return this.finalize(t,new ue(n,s))},t.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},t.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var e=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(Dt),this.finalize(t,new an(e,n,r))},t.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new me)},t.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var e=this.lookahead.value;t="{"===e?this.parseBlock():"("===e?this.parseExpressionStatement():";"===e?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement()}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},t.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var e=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(t,new oe(e))},t.prototype.validateParam=function(t,e,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(t.stricted=e,t.message=Tt),Object.prototype.hasOwnProperty.call(t.paramSet,r)&&(t.stricted=e,t.message=It)):t.firstRestricted||(this.scanner.isRestrictedWord(n)?(t.firstRestricted=e,t.message=Tt):this.scanner.isStrictModeReservedWord(n)?(t.firstRestricted=e,t.message=Ot):Object.prototype.hasOwnProperty.call(t.paramSet,r)&&(t.stricted=e,t.message=It)),"function"==typeof Object.defineProperty?Object.defineProperty(t.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[r]=!0},t.prototype.parseRestElement=function(t){var e=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(W),this.match(")")||this.throwError(yt),this.finalize(e,new qe(n))},t.prototype.parseFormalParameter=function(t){for(var e=[],n=this.match("...")?this.parseRestElement(e):this.parsePatternWithDefault(e),r=0;r<e.length;r++)this.validateParam(t,e[r],e[r].value);t.simple=t.simple&&n instanceof Be,t.params.push(n)},t.prototype.parseFormalParameters=function(t){var e={simple:!0,params:[],firstRestricted:t};if(this.expect("("),!this.match(")"))for(e.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(e),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:e.simple,params:e.params,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(e),t=e.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return t},t.prototype.parseFunctionDeclaration=function(t){var e=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r,i=!n&&this.match("*");i&&this.nextToken();var o=null,s=null;if(!t||!this.match("(")){var a=this.lookahead;o=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(a.value)&&this.tolerateUnexpectedToken(a,At):this.scanner.isRestrictedWord(a.value)?(s=a,r=At):this.scanner.isStrictModeReservedWord(a.value)&&(s=a,r=Ot)}var u=this.context.await,c=this.context.allowYield;this.context.await=n,this.context.allowYield=!i;var l=this.parseFormalParameters(s),h=l.params,p=l.stricted;s=l.firstRestricted,l.message&&(r=l.message);var f=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;var m=this.parseFunctionSourceElements();return this.context.strict&&s&&this.throwUnexpectedToken(s,r),this.context.strict&&p&&this.tolerateUnexpectedToken(p,r),this.context.strict=f,this.context.allowStrictDirective=d,this.context.await=u,this.context.allowYield=c,n?this.finalize(e,new te(o,h,m)):this.finalize(e,new Fe(o,h,m,i))},t.prototype.parseFunctionExpression=function(){var t=this.createNode(),e=this.matchContextualKeyword("async");e&&this.nextToken(),this.expectKeyword("function");var n,r=!e&&this.match("*");r&&this.nextToken();var i,o=null,s=this.context.await,a=this.context.allowYield;if(this.context.await=e,this.context.allowYield=!r,!this.match("(")){var u=this.lookahead;o=this.context.strict||r||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,At):this.scanner.isRestrictedWord(u.value)?(i=u,n=At):this.scanner.isStrictModeReservedWord(u.value)&&(i=u,n=Ot)}var c=this.parseFormalParameters(i),l=c.params,h=c.stricted;i=c.firstRestricted,c.message&&(n=c.message);var p=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var d=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,n),this.context.strict&&h&&this.tolerateUnexpectedToken(h,n),this.context.strict=p,this.context.allowStrictDirective=f,this.context.await=s,this.context.allowYield=a,e?this.finalize(t,new ee(o,l,d)):this.finalize(t,new Se(o,l,d,r))},t.prototype.parseDirective=function(){var t=this.lookahead,e=this.createNode(),n=this.parseExpression(),r=65===n.type?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(e,r?new ve(n,r):new Ce(n))},t.prototype.parseDirectivePrologues=function(){for(var t=null,e=[];;){var n=this.lookahead;if(8!==n.type)break;var r=this.parseDirective();e.push(r);var i=r.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,Pt),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,nt)):!t&&n.octal&&(t=n)}return e},t.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===t.value}return!1},t.prototype.parseGetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(L);var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new Se(null,n.params,r,false))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(z):n.params[0]instanceof qe&&this.tolerateError(U);var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new Se(null,n.params,r,false))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new Se(null,n.params,r,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(t,new Dn(e,n))},t.prototype.parseClassElement=function(t){var e=this.lookahead,n=this.createNode(),r="",i=null,o=null,s=!1,a=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(s=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,u=!0,s=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var l=this.lookahead.value;":"!==l&&"("!==l&&"*"!==l&&(c=!0,e=this.lookahead,s=this.match("["),i=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,K))}var h=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&h?(r="get",s=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod()):"set"===e.value&&h&&(r="set",s=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod()):7===e.type&&"*"===e.value&&h&&(r="init",s=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),a=!0),!r&&i&&this.match("(")&&(r="init",o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),s||(u&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(e,xt),!u&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!a||o&&o.generator)&&this.throwUnexpectedToken(e,G),t.value?this.throwUnexpectedToken(e,Q):t.value=!0,r="constructor")),this.finalize(n,new Le(i,s,o,r,u))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new ce(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(e,new le(r,i,o))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=e,this.finalize(t,new he(n,r,i))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new ze(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new Qe(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(ct);var e=this.nextToken(),n=this.getTokenRaw(e);return this.finalize(t,new Me(e.value,n))},t.prototype.parseImportSpecifier=function(){var t,e,n=this.createNode();return 3===this.lookahead.type?(e=t=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(e=t=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new _e(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new Oe(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(vt),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new Ne(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(et);var t,e=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)t=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Gt:ft;this.throwError(r,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new Te(n,t))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),n=e;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new Ee(e,n))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(tt);var t,e=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);t=this.finalize(e,new be(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);t=this.finalize(e,new be(n))}else if(this.matchContextualKeyword("async")){n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new be(n))}else{this.matchContextualKeyword("from")&&this.throwError(Gt,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new be(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Gt:ft;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new ge(i))}else if(4===this.lookahead.type){n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new xe(n,[],null))}else if(this.matchAsyncFunction()){n=this.parseFunctionDeclaration();t=this.finalize(e,new xe(n,[],null))}else{var o=[],s=null,a=!1;for(this.expect("{");!this.match("}");)a=a||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),s=this.parseModuleSpecifier(),this.consumeSemicolon();else if(a){r=this.lookahead.value?Gt:ft;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new xe(null,o,s))}return t},t}(),kn=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","??","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var n=this.values[this.paren-1];e="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(e=!0,"function"===this.values[this.curly-3])e=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;e=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}();!function(){function t(t,e){this.errorHandler=new M,this.errorHandler.tolerant=!!e&&("boolean"==typeof e.tolerant&&e.tolerant),this.scanner=new En(t,this.errorHandler),this.scanner.trackComment=!!e&&("boolean"==typeof e.comment&&e.comment),this.trackRange=!!e&&("boolean"==typeof e.range&&e.range),this.trackLoc=!!e&&("boolean"==typeof e.loc&&e.loc),this.buffer=[],this.reader=new kn}t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e<t.length;++e){var n=t[e],r=this.scanner.source.slice(n.slice[0],n.slice[1]),i={type:n.multiLine?"BlockComment":"LineComment",value:r};this.trackRange&&(i.range=n.range),this.trackLoc&&(i.loc=n.loc),this.buffer.push(i)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var a=this.scanner.saveState();try{s=this.scanner.scanRegExp()}catch(n){this.scanner.restoreState(a),s=this.scanner.lex()}}else s=this.scanner.lex();this.reader.push(s);var u={type:Cn[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(u.range=[s.start,s.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===s.type){var c=s.pattern,l=s.flags;u.regex={pattern:c,flags:l}}this.buffer.push(u)}}return this.buffer.shift()}}();function Fn(t,e,n){var r=null,i=function(t,e){n&&n(t,e),r&&r.visit(t,e)},o="function"==typeof n?i:null,s=!1;if(e){s="boolean"==typeof e.comment&&e.comment;var a="boolean"==typeof e.attachComment&&e.attachComment;(s||a)&&((r=new _).attach=a,e.comment=!0,o=i)}var u=!1;e&&"string"==typeof e.sourceType&&(u="module"===e.sourceType);var c=new An(t,e,o),l=u?c.parseModule():c.parseScript();return s&&r&&(l.comments=r.comments),c.config.tokens&&(l.tokens=c.tokens),c.config.tolerant&&(l.errors=c.errorHandler.errors),l}function Sn(t,e,n){var r=e||{};return r.sourceType="script",Fn(t,r,n)}var Bn={type:"return",value:void 0},Pn={type:"continue",value:null},In={type:"break",value:null},Tn=Nn("noinit"),On=Nn("deadzone");function Nn(t){return t+Math.random().toString(36).substring(2)}var _n="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function jn(t){return t===Bn||t===In||t===Pn}var Mn={notImplemented:"%0 isn't implemented",unexpectedToken:"Unexpected token",deleteUnqualified:"Delete of an unqualified identifier in strict mode",identifierDeclared:"Identifier %0 has already been declared",assignmentToConst:"Assignment to constant variable",notFunction:"%0 is not a function",convertNullToObject:"Cannot convert undefined or null to object",notDefined:"%0 is not defined",notIterable:"%0 is not iterable"};function Rn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e.reduce((function(t,e,n){return t.replace("%".concat(n),e)}),Mn[t]);return new TypeError(r)}var Ln=function(){function t(t,e){this.kind=t,this.value=e}return t.prototype.set=function(t){return this.value=t},t.prototype.strictSet=function(t){"use strict";return this.value=t},t}(),zn=function(){function t(t,e){this.value=e,this.kind=3}return t.prototype.set=function(t){throw new TypeError(Mn.assignmentToConst)},t.prototype.strictSet=function(t){throw new TypeError(Mn.assignmentToConst)},t}(),Un=function(){function t(t,e){this.globalObject=t,this.globalKey=e,this.kind=1}return Object.defineProperty(t.prototype,"value",{get:function(){return this.globalObject[this.globalKey]},enumerable:!1,configurable:!0}),t.prototype.set=function(t){return this.globalObject[this.globalKey]=t},t.prototype.strictSet=function(t){"use strict";return this.globalObject[this.globalKey]=t},t}(),Kn=function(){function t(t,e){this.object=t,this.property=e}return Object.defineProperty(t.prototype,"value",{get:function(){return this.object[this.property]},enumerable:!1,configurable:!0}),t.prototype.set=function(t){return this.object[this.property]=t},t.prototype.strictSet=function(t){"use strict";return this.object[this.property]=t},t.prototype.delete=function(){return delete this.object[this.property]},t.prototype.strictDelete=function(){"use strict";return delete this.object[this.property]},t}(),Gn=function(){function t(t){this.globalObject=t,this.propertyAccessors=Object.create(null)}return t.prototype.getProperty=function(t){var e=this.propertyAccessors[t];return e||(e=this.propertyAccessors[t]=new Kn(this.globalObject,t)),e},t.prototype.deleteProperty=function(t){return delete this.globalObject[t]},t}(),Hn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wn=function(){function t(t,e){this.engine=t,this.strict=!1,this.isolated=!0,this.context=Object.create(null),this.parent=e,e&&e.strict&&(this.strict=!0)}return t.prototype.setCompileScope=function(t){this.compileScope=t},t.prototype.getCompileScope=function(){return this.compileScope},t.prototype.find=function(t){var e=this.context[t];return e||(this.parent?this.parent.find(t):void 0)},t.prototype.var=function(t,e){var n=this.context,r=n[t];r?e!==Tn&&r.set(e):n[t]=new Ln(1,e===Tn?void 0:e)},t.prototype.let=function(t,e){var n=this.context[t];if(n){if(n.value!==On)throw new SyntaxError(Mn.identifierDeclared.replace("%0",t));n.set(e)}else this.context[t]=new Ln(2,e)},t.prototype.const=function(t,e){var n=this.context[t];if(n&&n.value!==On)throw new SyntaxError(Mn.identifierDeclared.replace("%0",t));this.context[t]=new zn(3,e)},t.prototype.func=function(t,e){var n=this.context,r=n[t];r?this.strict?r.strictSet(e):r.set(e):n[t]=new Ln(1,e)},t.prototype.declare=function(t,e,n){switch(t){case 1:this.var(e,n);break;case 2:this.let(e,n);break;case 3:this.const(e,n)}},t}(),qn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isolated=!1,e}return Hn(e,t),e.prototype.var=function(t,e){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[t];if(i)e!==Tn&&i.set(e);else{var o=e===Tn?void 0:e;r[t]=new Ln(1,o)}},e.prototype.func=function(t,e){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[t];i?n.strict?i.strictSet(e):i.set(e):r[t]=new Ln(1,e)},e}(Wn),Vn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qn=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.withObject=r,i}return Vn(e,t),e.prototype.find=function(t){return this.context[t]?this.context[t]:t in this.withObject?new Kn(this.withObject,t):this.parent?this.parent.find(t):void 0},e.prototype.var=function(e,n){e in this.withObject?this.withObject[e]=n:t.prototype.var.call(this,e,n)},e}(qn),Yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(){function t(t,e){this.engine=t,this.strict=!1,this.isolated=!0,this.context=new Map,this.contexts=[],this.parent=e,e&&e.strict&&(this.strict=!0)}return t.prototype.var=function(t){var e=this.context,n=e.get(t);n||(e.set(t,{kind:1,index:e.size}),this.contexts.push(t))},t.prototype.let=function(t){var e=this.context;if(e.get(t))throw new SyntaxError(Mn.identifierDeclared.replace("%0",t));this.context.set(t,{kind:2,index:e.size}),this.contexts.push(t)},t.prototype.const=function(t){var e=this.context;if(e.get(t))throw new SyntaxError(Mn.identifierDeclared.replace("%0",t));this.context.set(t,{kind:3,index:e.size}),this.contexts.push(t)},t.prototype.func=function(t){var e=this.context,n=e.get(t);n||(e.set(t,{kind:1,index:e.size}),this.contexts.push(t))},t}(),Xn=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isolated=!1,e}Yn(e,t),e.prototype.var=function(t){for(var e=this;!e.isolated&&e.parent;)e=e.parent;e.var(t)},e.prototype.func=function(t){for(var e=this;!e.isolated&&e.parent;)e=e.parent;e.func(t)}}(Jn),function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),$n=function(t){function e(e){var n=t.call(this,e,null)||this;return n.engine=e,n}return Xn(e,t),e.prototype.var=function(e){return t.prototype.var.call(this,e)},e.prototype.func=function(e){return t.prototype.func.call(this,e)},e}(Jn),Zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tr=function(t){function e(e,n){var r=t.call(this,e,null)||this;return r.engine=e,r.globalObject=n,r.objectBindings=function(t){var e=Object.create(null);return e.String={kind:1,get value(){return t.String},set:function(e){return t.String=e},strictSet:function(e){"use strict";return t.String=e}},e.Function={kind:1,get value(){return t.Function},set:function(e){return t.Function=e},strictSet:function(e){"use strict";return t.Function=e}},e.Array={kind:1,get value(){return t.Array},set:function(e){return t.Array=e},strictSet:function(e){"use strict";return t.Array=e}},e.Number={kind:1,get value(){return t.Number},set:function(e){return t.Number=e},strictSet:function(e){"use strict";return t.Number=e}},e.Object={kind:1,get value(){return t.Object},set:function(e){return t.Object=e},strictSet:function(e){"use strict";return t.Object=e}},e.setTimeout={kind:1,get value(){return t.setTimeout},set:function(e){return t.setTimeout=e},strictSet:function(e){"use strict";return t.setTimeout=e}},e.clearTimeout={kind:1,get value(){return t.clearTimeout},set:function(e){return t.clearTimeout=e},strictSet:function(e){"use strict";return t.clearTimeout=e}},e.setInterval={kind:1,get value(){return t.setInterval},set:function(e){return t.setInterval=e},strictSet:function(e){"use strict";return t.setInterval=e}},e.clearInterval={kind:1,get value(){return t.clearInterval},set:function(e){return t.clearInterval=e},strictSet:function(e){"use strict";return t.clearInterval=e}},e.console={kind:1,get value(){return t.console},set:function(e){return t.console=e},strictSet:function(e){"use strict";return t.console=e}},e}(n),r.setCompileScope(new $n(e)),r}return Zn(e,t),e.prototype.var=function(t,e){var n=this.context,r=n[t];if(r)e!==Tn&&r.set(e);else{var i=e===Tn?void 0:e,o=n.this.value,s=new Un(o,t);n[t]=s,t in o?e!==Tn&&s.set(i):f(o,t,{value:i,writable:!0,enumerable:!0,configurable:!1})}},e.prototype.func=function(t,e){var n=this.context,r=n[t];if(r)this.strict?r.strictSet(e):r.set(e);else{var i=n.this.value,o=new Un(i,t);n[t]=o,t in i?this.strict?o.strictSet(e):o.set(e):f(i,t,{value:e,writable:!0,enumerable:!0,configurable:!1})}},e.prototype.find=function(t){var e;return(e=this.context[t])?e:(e=this.objectBindings[t])||(t in this.globalObject?this.objectBindings[t]=new Un(this.globalObject,t):void 0)},e}(Wn);function er(){}function nr(t,e){return t!==er&&t?e!==er&&e?function(n){return t(n),e(n)}:t:e}function rr(t,e){return t!==er&&t?e!==er&&e?function(n,r){return t(n,r),e(n,r)}:t:e}var ir=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(5===n.type){var r="use strict"===n.directive;if(r)return r}}return!1};function or(t,e){if(e.generator||e.async)throw new Error(Mn.notImplemented.replace("%0","Generator or async function"));var n,r=31===e.type,i=t.runtimeProfile,o=i.scriptId,s=e.params.length,a=e.id&&e.id.name||"",u=e.body,c=!1;if(76===u.type){c=ir(u.body);var l=sr(t,u,void 0,0),h=Dr(t,u,void 0,3);n=nr(l,h)}else{var p=Fr(t,u);n=function(t){var e=p(t);return r&&(Bn.value=e,e=Bn),e}}var m=function(t,e){for(var n=e.params,r=er,i=function(t){var e=n[t];r=rr(r,(function(n,r){n.var(e.name,r[t])}))},o=0;o<n.length;o++)i(o);return r}(0,e);return function(u){var l=function(){var s=new Wn(t,u),a=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:l.name,functionScope:s,functionNode:e}),r||(s.const("this",this),s.var("arguments",arguments));try{m(s,arguments);var c=n(s);if(i.popCallFrame(),i.scriptId=a,c===Bn)return c.value}catch(e){var h=t.inspector;if(h&&!i.callExpressionStack.length){var p=O(e,"__rewrittenzxcd");p&&p.node&&(h.shouldPauseOnException(o,e,p.node,!0),h.throwException(e))}throw i.popCallFrame(),i.scriptId=a,e}},h=function(){"use strict";var s=new Wn(t,u);s.strict=!0;var a=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:h.name,functionScope:s,functionNode:e}),r||(s.const("this",this),s.const("arguments",arguments));try{m(s,arguments);var c=n(s);if(i.popCallFrame(),i.scriptId=a,c===Bn)return c.value}catch(e){var l=t.inspector;if(l&&!i.callExpressionStack.length){var p=O(e,"__rewrittenzxcd");p&&p.node&&(l.shouldPauseOnException(o,e,p.node,!0),l.throwException(e))}throw i.popCallFrame(),i.scriptId=a,e}},p=u.strict||c?h:l;return P&&d(p,{name:{value:a,configurable:!0},length:{value:s,configurable:!0}}),T(p,"___func_locationxasdzzy",{node:e,scriptId:t.runtimeProfile.scriptId}),f(p,"toString",{value:function(){return"function ".concat(a,"() { ... }")},writable:!0,configurable:!0}),p}}function sr(t,e,n,r){for(var i=er,o=e.body,s=function(e){var n=o[e];if(63===n.type){var r=or(t,n);i=nr(i,(function(t){return t.func(n.id.name,r(t))}))}else i=nr(i,ar(t,n))},a=0;a<o.length;a++)s(a);var u=ir(o);return function(t){t.strict||(t.strict=u),i(t)}}function ar(t,e,n){var r=er;switch(e.type){case 17:r=nr(r,ur(t,e,void 0));break;case 6:case 7:17===e.left.type&&(r=nr(r,ur(t,e.left,void 0)));case 8:8===e.type&&e.init&&17===e.init.type&&(r=nr(r,ur(t,e.init,void 0)));case 15:case 4:r=nr(r,ar(t,e.body,void 0));break;case 9:r=nr(r,ar(t,e.consequent,void 0)),e.alternate&&(r=nr(r,ar(t,e.alternate,void 0)));break;case 76:for(var i=e.body,o=0;o<i.length;o++)r=nr(r,ar(t,i[o],void 0));break;case 12:var s=e.cases;for(o=0;o<s.length;o++)for(var a=s[o].consequent,u=0;u<a.length;u++)r=nr(r,ar(t,a[u],void 0));break;case 14:var c=e.block.body;for(o=0;o<c.length;o++)r=nr(r,ar(t,c[o],void 0));var l=e.handler&&e.handler.body.body;if(l)for(o=0;o<l.length;o++)r=nr(r,ar(t,l[o],void 0));var h=e.finalizer&&e.finalizer.body;if(h)for(o=0;o<h.length;o++)r=nr(r,ar(t,h[o],void 0))}return r}function ur(t,e,n){for(var r=er,i=e.declarations,o=e.kind,s=function(t){var e=i[t];1===o&&(r=nr(r,(function(t){t.var(e.id.name,Tn)})))},a=0;a<i.length;a++)s(a);return r}function cr(t,e,n,r){return function(t){var n=e.name;if("undefined"!==n){var i=t.find(n);if(i)return i.value;if(!r)throw new ReferenceError(Mn.notDefined.replace("%0",n))}}}function lr(t,e,n){if("undefined"!==t){var r=e.find(t);if(r)return r;if(!n)throw new ReferenceError(Mn.notDefined.replace("%0",t))}}function hr(t,e,n,r){var i=e.init,o=i?Fr(t,i):er;return function(t){var n=o(t),r=e.id.name;i&&t.var(r,n),!i||36!==i.type&&31!==i.type||!P||n.name||f(n,"name",{value:r,configurable:!0})}}var pr=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},fr=Function.prototype.apply;function dr(t,e){for(var n=e,r=n.length,i=new Array(r),o=0;o<r;o++){var s=n[o];null===s||(i[o]=Fr(t,s))}return function(t){for(var e=new Array(r),o=0;o<r;o++){null!==n[o]&&(e[o]=i[o](t))}return e}}function mr(t,e,n){var r=Fr(t,e.object),i=e.computed?Fr(t,e.property):function(){return e.property.name};return function(t){var e=r(t),n=i(t);return new Kn(e,n)}}function vr(t,e,n){return function(t){return e.value.raw}}function Dr(t,e,n,r){var i=er;var o=e.body.map((function(e){return Fr(t,e)}));return function(t){var e=t;i(e);for(var n=0,r=o;n<r.length;n++){var s=(0,r[n])(e);if(jn(s))return s}}}function yr(t,e,n){for(var r=[],i=e.consequent,o=0;o<i.length;o++)r[o]=Fr(t,i[o]);return function(t){for(var n=e.consequent,i=0;i<n.length;i++){var o=r[i](t);if(jn(o))return o}}}function gr(t,e,n){var r=Dr(t,e.body);return function(t){return r(t)}}function br(t,e,n,r){var i=Fr(t,e.test),o=Fr(t,e.body);return function(t){for(;i(t);){var e=o(t);if(e===In){if(In.value)return In;break}if(e!==Pn){if(e===Bn)return e}else if(Pn.value&&Pn.value!==r)return Pn}}}function xr(t,e,n,r){var i=Fr(t,e.body),o=Fr(t,e.test);return function(t){do{var e=i(t);if(e===In){if(In.value)return In;break}if(e!==Pn){if(e===Bn)return e}else if(Pn.value&&Pn.value!==r)return Pn}while(o(t))}}function Er(t,e,n,r){var i=e.init?Fr(t,e.init):function(){},o=e.test?Fr(t,e.test):function(){return!0},s=e.update?Fr(t,e.update):function(){},a=e.body,u=76===a.type?Dr(t,a):Fr(t,a);return function(t){var e=t;for(i(e);o(e);s(e)){var n=u(t);if(n===In){if(In.value)return In;break}if(n!==Pn){if(n===Bn)return n}else if(Pn.value&&Pn.value!==r)return Pn}}}function Cr(t,e,n,r){var i=Fr(t,e.right),o=Ar(t,e,void 0);return function(t){var e=i(t);for(var n in e){var s=o(t,n);if(s===In){if(In.value)return In;break}if(s!==Pn){if(s===Bn)return s}else if(Pn.value&&Pn.value!==r)return Pn}}}function wr(t,e,n,r){var i=Fr(t,e.right),o=Ar(t,e,void 0);return function(t){for(var e=0,n=i(t);e<n.length;e++){var s=n[e],a=o(t,s);if(a===In){if(In.value)return In;break}if(a!==Pn){if(a===Bn)return a}else if(Pn.value&&Pn.value!==r)return Pn}}}function Ar(t,e,n){var r,i=er,o=e.left;if(17===o.type){var s=function(t,e,n){for(var r=e.declarations,i=(e.kind,0);i<r.length;i++)r[i].id;return function(t,n){for(var r=e.declarations,i=e.kind,o=0;o<r.length;o++){var s=r[o].id;t.declare(i,s.name,n)}}}(0,o);i=function(t,e,n){return s(e,n)}}else{if(64!==o.type)throw new SyntaxError(Mn.unexpectedToken);i=function(e,n,r){var i=lr(o.name,e,e.strict?0:1);i||(i=t.globalObjectAccessor.getProperty(o.name)),e.strict?i.strictSet(r):i.set(r)}}var a=e.body;return r=76===a.type?Dr(t,a):Fr(t,a),function(t,e){var n=t;return i(t,n,e),r(n)}}var kr=[null,function(t,e){return function(){return In.value=e.label?e.label.name:null,In}},function(t,e){return function(){return Pn.value=e.label?e.label.name:null,Pn}},function(t,e,n){return t.inspector?er:function(){debugger}},xr,function(t,e,n){var r=Fr(t,e.expression);return function(t){return r(t)}},Cr,wr,Er,function(t,e,n){var r=Fr(t,e.test),i=Fr(t,e.consequent),o=e.alternate&&Fr(t,e.alternate);return function(t){return r(t)?i(t):o?o(t):void 0}},function(t,e,n){var r,i=e.label.name,o=e.body;switch(o.type){case 8:r=Er(t,o,0,i);break;case 6:r=Cr(t,o,0,i);break;case 7:r=wr(t,o,0,i);break;case 4:r=xr(t,o,0,i);break;case 15:r=br(t,o,0,i);break;default:r=Fr(t,e.body)}return function(t){var e=r(t);if(e!==In||In.value!==i)return e}},function(t,e,n){var r=e.argument?Fr(t,e.argument):er;return function(t){return Bn.value=r(t),Bn}},function(t,e,n){for(var r=Fr(t,e.discriminant),i=[],o=[],s=e.cases,a=s.length,u=0;u<a;u++){var c=s[u];i[u]=c.test?Fr(t,c.test):null,o[u]=yr(t,c,void 0)}return function(t){for(var n=r(t),s=!1,a=-1,u=e.cases,c=u.length,l=0;l<c;l++){var h=u[l];if(s||(h.test?i[l](t)===n&&(s=!0):a=l),s){var p=o[l](t);if(p===In){if(In.value)return In;break}if(p===Pn||p===Bn)return p}!s&&l===c-1&&a>-1&&(l=a-1,s=!0)}}},function(t,e,n){var r=Fr(t,e.argument);return function(t){throw r(t)}},function(t,e,n){var r,i=Dr(t,e.block),o=e.finalizer?Dr(t,e.finalizer):er,s=e.handler?gr(t,e.handler,void 0):er,a=er,u=null===(r=e.handler)||void 0===r?void 0:r.param;if(u){var c=u.name;a=function(t,e){t.let(c,e)}}return function(n){var r;try{return r=i(n)}catch(i){if(e.handler){var u=new qn(t,n);return a(u,i),r=s(u)}throw i}finally{if(e.finalizer){var c=!1,l=void 0;jn(r)&&(c=!0,l=r.value);var h=o(n);if(jn(h))return h;c&&(r.value=l)}}}},br,function(t,e,n){var r,i=Fr(t,e.object),o=e.body;return r=76===o.type?nr(sr(t,o),Dr(t,o)):Fr(t,o),function(e){var n=i(e);if(null==n)throw new TypeError(Mn.convertNullToObject);var o=new Qn(t,e,Object(n));return r(o)}},function(t,e,n){for(var r=e.declarations,i=e.kind,o=[],s=0;s<r.length;s++)o[s]=hr(t,r[s],void 0,i);return function(t){for(var e=0;e<o.length;e++)o[e](t)}},null,null,null,null,null,null,null,null,null,null,null,null,function(t,e,n){var r=dr(t,e.elements);return function(t){return r(t)}},function(t,e,n){var r=or(t,e);return function(t){return r(t)}},function(t,e,n){var r,i,o=Fr(t,e.right),s=e.left;switch(s.type){case 64:r=function(e){var n;return(n=lr(s.name,e,e.strict?0:1))||(n=t.globalObjectAccessor.getProperty(s.name)),n};break;case 39:r=mr(t,s,void 0);break;default:throw new SyntaxError(Mn.unexpectedToken)}return function(t){var n;if(!r)return i(t);n=r(t);var s=o(t);switch(e.operator){case 1:return t.strict?n.strictSet(s):n.set(s),n.value;case 2:return t.strict?n.strictSet(n.value+s):n.set(n.value+s),n.value;case 3:return t.strict?n.strictSet(n.value-s):n.set(n.value-s),n.value;case 4:return t.strict?n.strictSet(n.value*s):n.set(n.value*s),n.value;case 5:return t.strict?n.strictSet(n.value/s):n.set(n.value/s),n.value;case 6:return t.strict?n.strictSet(n.value%s):n.set(n.value%s),n.value;case 13:return t.strict?n.strictSet(n.value&s):n.set(n.value&s),n.value;case 11:return t.strict?n.strictSet(n.value|s):n.set(n.value|s),n.value;case 12:return t.strict?n.strictSet(n.value^s):n.set(n.value^s),n.value;case 8:return t.strict?n.strictSet(n.value<<s):n.set(n.value<<s),n.value;case 9:return t.strict?n.strictSet(n.value>>s):n.set(n.value>>s),n.value;case 10:return t.strict?n.strictSet(n.value>>>s):n.set(n.value>>>s),n.value;case 7:return t.strict?n.strictSet(Math.pow(n.value,s)):n.set(Math.pow(n.value,s)),n.value;default:throw new SyntaxError(Mn.unexpectedToken)}}},function(t,e,n){var r=Fr(t,e.left),i=Fr(t,e.right);return function(t){var n=r(t),o=i(t);switch(e.operator){case 1:return n==o;case 2:return n!=o;case 3:return n===o;case 4:return n!==o;case 5:return n<o;case 6:return n<=o;case 7:return n>o;case 8:return n>=o;case 12:return n+o;case 13:return n-o;case 14:return n*o;case 16:return n/o;case 17:return n%o;case 22:return n instanceof o;case 18:return n|o;case 19:return n^o;case 20:return n&o;case 9:return n<<o;case 10:return n>>o;case 21:return n in o;case 11:return n>>>o;case 15:return Math.pow(n,o);default:throw new SyntaxError(Mn.unexpectedToken)}}},function(t,e,n){var r,i,o,s=e.callee;39===s.type?(i=Fr(t,s.object),o=s.computed?Fr(t,s.property):function(){return s.property.name}):r=Fr(t,s);var a=dr(t,e.arguments);return function(n){var u,c;if(39===s.type){c=i(n);var l=o(n);if("function"!=typeof(u=c[l]))throw Rn("notFunction",l)}else if("function"!=typeof(u=r(n))){var h;if(64===s.type)h=s.name;else try{h=JSON.stringify(u)}catch(t){h=""+u}throw Rn("notFunction",h)}var p=a(n),f=t.runtimeProfile;f.pushCallExpression(e);try{var d=fr.call(u,c,p);return f.popCallExpression(),d}catch(t){throw f.popCallExpression(),t}}},function(t,e,n){var r=Fr(t,e.test),i=Fr(t,e.consequent),o=Fr(t,e.alternate);return function(t){return r(t)?i(t):o(t)}},function(t,e,n){var r=or(t,e);return e.id&&e.id.name?function(n){var i=new qn(t,n),o=r(i);return i.const(e.id.name,o),o}:function(t){return r(t)}},function(t,e,n){for(var r=e.expressions,i=[],o=0;o<r.length;o++)i[o]=Fr(t,r[o]);return function(t){for(var n,r=e.expressions,o=0;o<r.length;o++)n=i[o](t);return n}},function(t,e,n){var r=Fr(t,e.left),i=Fr(t,e.right);return function(t){switch(e.operator){case 1:return r(t)||i(t);case 2:return r(t)&&i(t);default:throw new SyntaxError(Mn.unexpectedToken)}}},function(t,e,n,r){var i=Fr(t,e.object);if(e.computed){var o=Fr(t,e.property);return function(t){return i(t)[o(t)]}}var s=e.property.name;return function(t){return i(t)[s]}},function(t,e){var n=e.callee,r=Fr(t,n),i=dr(t,e.arguments);return function(o){var s=r(o),a=i(o),u=t.runtimeProfile;u.pushCallExpression(e);try{var c=void 0;switch(a.length){case 0:c=new s;break;case 1:c=new s(a[0]);break;case 2:c=new s(a[0],a[1]);break;case 3:c=new s(a[0],a[1],a[2]);break;default:c=new(s.bind.apply(s,pr([void 0],a,!1)))}return u.popCallExpression(),c}catch(t){throw 64===n.type&&(t.message=t.message.replace(/\bconstruct\$0\b/g,n.name)),u.popCallExpression(),t}}},function(t,e,n){for(var r=e.properties,i=[],o=[],s=function(e){var n=r[e],s=n.key,a=void 0;a=64===s.type?function(){return s.name}:function(){return s.value+""},i[e]=a;var u=n.value;o[e]=Fr(t,u)},a=0;a<r.length;a++)s(a);return function(t){for(var n={},r=e.properties,s=0;s<r.length;s++){0;var a=i[s](t),u=o[s](t),c=r[s],l=c.value;36!==l.type&&31!==l.type||P&&f(u,"name",{value:a,configurable:!0});var h=c.kind;if("init"===h)n[a]=u;else if("get"===h){var p=m(n,a);f(n,a,{get:u,set:p&&p.set,enumerable:!0,configurable:!0})}else{p=m(n,a);f(n,a,{get:p&&p.get,set:u,enumerable:!0,configurable:!0})}}return n}},function(t,e,n){var r=Fr(t,e.tag),i=e.quasi.expressions,o=[];if(i)for(var s=0;s<i.length;s++)o.push(Fr(t,i[s]));return function(t){var n=r(t),i=e.quasi.quasis,s=i.map((function(t){return t.value.cooked})),a=i.map((function(t){return t.value.raw}));return f(s,"raw",{value:v(a)}),n.apply(void 0,pr([v(s)],o.map((function(e){return e(t)})),!1))}},function(t,e,n){return function(t){return t.find("this").value}},function(t,e,n){if(6===e.operator){var r,i=e.argument;return r=64===i.type?cr(0,i,0,1):Fr(t,i),function(t){return typeof r(t)}}if(7===e.operator){var o,s=e.argument;if(39===s.type){var a=mr(t,s,void 0);o=function(t){var e=a(t);return t.strict?e.strictDelete():e.delete()}}else o=64===s.type?function(e){if(e.strict)throw new SyntaxError(Mn.deleteUnqualified);for(var n=e,r=s.name;n&&!n.context[r];)n=n.parent;if(n){if(n.parent||1!==n.context[r].kind)return!1;var i=t.globalObjectAccessor.deleteProperty(r);return i&&delete n.context[r],i}return t.globalObjectAccessor.deleteProperty(r)}:nr(Fr(t,s),(function(){return!0}));return o}var u=e.argument,c=Fr(t,u);return function(t){switch(e.operator){case 3:return!c(t);case 1:return+c(t);case 2:return-c(t);case 4:return~c(t);case 5:return void c(t);default:throw new SyntaxError(Mn.unexpectedToken)}}},function(t,e,n){var r,i=e.argument;switch(i.type){case 64:r=function(t){return lr(i.name,t,0)};break;case 39:r=mr(t,i,void 0);break;default:throw new SyntaxError(Mn.unexpectedToken)}return function(t){var n,i=r(t),o=i.value;switch(e.operator){case 1:return n=o++,t.strict?i.strictSet(o):i.set(o),e.prefix?o:n;case 2:return n=o--,t.strict?i.strictSet(o):i.set(o),e.prefix?o:n;default:throw new SyntaxError(Mn.unexpectedToken)}}},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,gr,function(){return er},cr,function(t,e,n){return function(t){if((null==e?void 0:e.regex)&&/g|y/.test(e.regex.flags)){var n=e.regex,r=n.pattern,i=n.flags;return new RegExp(r,i)}return e.value}},null,function(t,e,n){for(var r=sr(t,e),i=[],o=e.body,s=0;s<o.length;s++)i[s]=Fr(t,o[s]);return function(n){r(n);var o=t.runtimeProfile;o.pushCallFrame({functionName:"",functionNode:e,functionScope:n});try{for(var s=void 0,a=0;a<i.length;a++)s=i[a](n);return o.popCallFrame(),s}catch(t){throw o.popCallFrame(),t}}},null,null,null,yr,vr,function(t,e,n){for(var r=[],i=[],o=e.quasis,s=e.expressions,a=0;a<o.length;a++)r[a]=vr(t,o[a]);for(a=0;a<s.length;a++)i[a]=Fr(t,s[a]);return function(t){for(var e,n,o=r.slice(),s=i.slice(),a="";e=o.shift();)a+=e(t),(n=s.shift())&&(a+=n(t));return a}},hr,function(){return er},function(t,e,n,r){var i=e.body.map((function(e){return Fr(t,e)}));return function(t){var e=t;for(var n=0,r=i;n<r.length;n++){var o=(0,r[n])(e);if(jn(o))return o}}}];function Fr(t,e){var n=e.type;if(65===n){if((null==e?void 0:e.regex)&&/g|y/.test(e.regex.flags)){var r=e.regex,i=r.pattern,o=r.flags;return function(){return new RegExp(i,o)}}return function(){return e.value}}var s=t.inspector;try{var a=kr[n];if(a){var u=a(t,e,void 0,0);return function(n){s&&s.hitBreakpoint(t.runtimeProfile.scriptId,e);try{return u(n)}catch(n){var r=t.runtimeProfile;throw r.rewriteErrorStack(r.scriptId,n,e),s&&s.shouldPauseOnException(r.scriptId,n,e,!1),n}}}throw new Error("".concat(Mn.unexpectedToken,"(").concat(n,")"))}catch(n){var c=t.runtimeProfile;throw c.rewriteErrorStack(c.scriptId,n,e),s&&s.shouldPauseOnException(c.scriptId,n,e,!1),n}}var Sr,Br,Pr=Function.prototype.apply.call.bind(Array.prototype.push),Ir=Function.prototype.apply.call.bind(Array.prototype.pop),Tr=function(){function t(){this.callFrameCountId=1,this.scriptCountId=1,this.exceptionId=1,this.callFrames=[],this.callExpressionStack=[],this.scriptId="1",this.scriptMap={}}return t.prototype.getNextScriptId=function(){return"".concat(this.scriptCountId++)},t.prototype.getNextExceptionId=function(){return this.exceptionId++},t.prototype.pushCallFrame=function(t){Pr(this.callFrames,{functionName:t.functionName,functionScope:t.functionScope,functionNode:t.functionNode,scriptId:this.scriptId,callFrameIdx:this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()})},t.prototype.getCallFrameId=function(t){return"10000.1.".concat(t.callFrameIdx)},t.prototype.popCallFrame=function(){Ir(this.callFrames)},t.prototype.pushCallExpression=function(t){Pr(this.callExpressionStack,t)},t.prototype.popCallExpression=function(){Ir(this.callExpressionStack)},t.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},t.prototype.rewriteErrorStack=function(t,e,n){var r=this;if(e instanceof Error&&!O(e,"__rewrittenzxcd")){var i=this.scriptMap[t]?this.scriptMap[t].url:"",o=this.callFrames.map((function(t,e){var o,s,a=r.callFrames[e+1];if(a?a.callExpressionNode&&(o=a.callExpressionNode.loc.start.line,s=a.callExpressionNode.loc.start.column+1):(o=n.loc.start.line,s=n.loc.start.column+1),void 0===o)return" at <anonymous>";var u="".concat(i&&"anonymous"!==i?i:"<anonymous>",":").concat(o,":").concat(s);return t.functionName?" at ".concat(t.functionName," (").concat(u,")"):" at ".concat(u)})).reverse().join("\n");e.stack="".concat(e.name,": ").concat(e.message)+"\n"+o,T(e,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:n})}},t}(),Or=function(){function t(t){if(void 0===t&&(t={}),this.options=t,this.runtimeProfile=new Tr,this.disableBreaks=!1,this.runQueue=[],t.sandbox){var e=t.sandboxGlobalObjectCreator?t.sandboxGlobalObjectCreator():(r={},["Object","Function","Array","Number","Boolean","String","RegExp","Promise","Date","Map","Set","WeakMap","WeakSet","NaN","JSON","Math","eval","isFinite","isNaN","clearTimeout","setTimeout","clearInterval","setInterval","console","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","parseFloat","parseInt","Symbol","Infinity"].forEach((function(t){void 0!==_n[t]&&(r[t]=_n[t])})),r);this.globalObjectAccessor=new Gn(e),(n=new tr(this,e)).const("this",e),n.var("self",e),n.const("exports",this.exports={}),this.globalScope=n}else{var n;this.globalObjectAccessor=new Gn(_n),(n=new tr(this,_n)).const("this",_n),n.var("self",_n),this.globalScope=n}var r}return t.prototype.import=function(t){if("object"==typeof t){var e=this.globalScope.context;x(t).forEach((function(n){e[n]=new Ln(1,t[n])}))}},t.prototype.doRun=function(t){var e,n=this.runtimeProfile,r=t.scriptId,i=t.previousScriptId,o=t.ast,s=t.code,a=t.scriptUrl;n.scriptId=r,this.inspector&&this.inspector.evaluateScript(r,s,o,a);try{var u=Fr(this,o)(this.globalScope);return n.scriptId=i,u}catch(t){if(n.scriptId=i,this.inspector){var c=O(t,"__rewrittenzxcd");c&&c.node&&(this.inspector.shouldPauseOnException(r,t,c.node,!0),this.inspector.throwException(t))}throw t}finally{null===(e=this.inspector)||void 0===e||e.replayQueueEvent()}},t.prototype.queue=function(t,e){var n,r=Sn(t,{loc:!0}),i=this.runtimeProfile,o=i.scriptId,s=i.getNextScriptId(),a=e||"anonymous";i.scriptId=s,i.scriptMap[s]={scriptId:s,url:a},null===(n=this.inspector)||void 0===n||n.startQueueEvent(),this.runQueue.push({scriptUrl:a,scriptId:s,previousScriptId:o,ast:r,code:t})},t.prototype.run=function(t,e,n){var r=this;if(void 0===n&&(n={}),this.queue(t,e),this.inspector&&n.waitingForDebuggerToAttach&&!this.inspector.isDebuggerAttached)return F("Waiting for inspector to be ready..."),this.inspector.whenDebuggerAttached.then((function(){F("Inspector is ready, run user code"),r.runInSchedule()}));this.runInSchedule()},t.prototype.runInSchedule=function(){var t=this.runQueue;this.runQueue=[];for(var e=0,n=t;e<n.length;e++){var r=n[e];this.doRun(r)}},t.prototype.evaluate=function(t,e,n){var r=Sn(t,{loc:!0}),i=this.runtimeProfile,o=i.scriptId;i.scriptId=i.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(i.scriptId,t,r,"");var s=e||this.globalScope;this.disableBreaks=Boolean(null==n?void 0:n.disableBreaks);try{var a=Fr(this,r)(s);return i.scriptId=o,a}catch(t){throw i.scriptId=o,t}finally{this.disableBreaks=!1}},t.prototype.setInspector=function(t){this.inspector=t,t.setEngine(this),t.connect()},t.prototype.getRuntimeStatus=function(){var t=this.runtimeProfile;return{scriptId:t.scriptId,scriptMap:t.scriptMap,callFrames:t.callFrames,callExpressionNode:t.getCurrentCallExpression()}},t.prototype.getHostGlobalObject=function(){return _n},t.prototype.createScope=function(t){return void 0===t&&(t=null),new Wn(this,t||this.globalScope)},t}();function Nr(t,e,n){n(t,e)}function _r(){}!function(t){t.Statement="Statement",t.Expression="Expression",t.MemberPattern="MemberPattern",t.VariablePattern="VariablePattern",t.Class="Class",t.ForInit="ForInit",t.Function="Function",t.Pattern="Pattern"}(Br||(Br={}));var jr=((Sr={Statement:Nr,Expression:Nr,MemberPattern:Nr,VariablePattern:_r,Class:function(t,e,n){t.id&&n(t.id,e,Br.Pattern),t.superClass&&n(t.superClass,e,Br.Expression),n(t.body,e)},ForInit:function(t,e,n){17===t.type?n(t,e):n(t,e,Br.Expression)},Function:function(t,e,n){"id"in t&&t.id&&n(t.id,e,Br.Pattern);for(var r=0,i=t.params;r<i.length;r++){n(i[r],e,Br.Pattern)}n(t.body,e,"expression"in t&&t.expression?Br.Expression:Br.Statement)},Pattern:function(t,e,n){64===t.type?n(t,e,Br.VariablePattern):39===t.type?n(t,e,Br.MemberPattern):n(t,e)}})[75]=_r,Sr[1]=_r,Sr[2]=_r,Sr[3]=_r,Sr[72]=_r,Sr[43]=_r,Sr[87]=_r,Sr[89]=_r,Sr[81]=_r,Sr[79]=_r,Sr[80]=_r,Sr[64]=_r,Sr[65]=_r,Sr[76]=function(t,e,n){for(var r=0,i=t.body;r<i.length;r++){n(i[r],e,Br.Statement)}},Sr[5]=function(t,e,n){n(t.expression,e,Br.Expression)},Sr[9]=function(t,e,n){n(t.test,e,Br.Expression),n(t.consequent,e,Br.Statement),t.alternate&&n(t.alternate,e,Br.Statement)},Sr[10]=function(t,e,n){n(t.body,e,Br.Statement)},Sr[16]=function(t,e,n){n(t.object,e,Br.Expression),n(t.body,e,Br.Statement)},Sr[12]=function(t,e,n){n(t.discriminant,e,Br.Expression);for(var r=0,i=t.cases;r<i.length;r++){var o=i[r];o.test&&n(o.test,e,Br.Expression);for(var s=0,a=o.consequent;s<a.length;s++){n(a[s],e,Br.Statement)}}},Sr[71]=function(t,e,n){t.test&&n(t.test,e,Br.Expression);for(var r=0,i=t.consequent;r<i.length;r++){n(i[r],e,Br.Statement)}},Sr[11]=function(t,e,n){t.argument&&n(t.argument,e,Br.Expression)},Sr[13]=function(t,e,n){n(t.argument,e,Br.Expression)},Sr[14]=function(t,e,n){n(t.block,e,Br.Statement),t.handler&&n(t.handler,e),t.finalizer&&n(t.finalizer,e,Br.Statement)},Sr[62]=function(t,e,n){t.param&&n(t.param,e,Br.Pattern),n(t.body,e,Br.Statement)},Sr[15]=function(t,e,n){n(t.test,e,Br.Expression),n(t.body,e,Br.Statement)},Sr[8]=function(t,e,n){t.init&&n(t.init,e,Br.ForInit),t.test&&n(t.test,e,Br.Expression),t.update&&n(t.update,e,Br.Expression),n(t.body,e,Br.Statement)},Sr[6]=function(t,e,n){n(t.left,e,Br.ForInit),n(t.right,e,Br.Expression),n(t.body,e,Br.Statement)},Sr[63]=function(t,e,n){n(t,e,Br.Function)},Sr[17]=function(t,e,n){for(var r=0,i=t.declarations;r<i.length;r++){n(i[r],e)}},Sr[74]=function(t,e,n){n(t.id,e,Br.Pattern),t.init&&n(t.init,e,Br.Expression)},Sr[69]=function(t,e,n){n(t.argument,e,Br.Pattern)},Sr[60]=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r++){var o=i[r];o&&n(o,e,Br.Pattern)}},Sr[66]=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r++){var o=i[r];68===o.type?(o.computed&&n(o.key,e,Br.Expression),n(o.value,e,Br.Pattern)):69===o.type&&n(o.argument,e,Br.Pattern)}},Sr[30]=function(t,e,n){for(var r=0,i=t.elements;r<i.length;r++){var o=i[r];o&&n(o,e,Br.Expression)}},Sr[41]=function(t,e,n){for(var r=0,i=t.properties;r<i.length;r++){n(i[r],e)}},Sr[37]=function(t,e,n){for(var r=0,i=t.expressions;r<i.length;r++){n(i[r],e,Br.Expression)}},Sr[73]=function(t,e,n){for(var r=0,i=t.quasis;r<i.length;r++){n(i[r],e)}for(var o=0,s=t.expressions;o<s.length;o++){n(s[o],e,Br.Expression)}},Sr[44]=function(t,e,n){n(t.argument,e,Br.Expression)},Sr[33]=function(t,e,n){n(t.left,e,Br.Expression),n(t.right,e,Br.Expression)},Sr[32]=function(t,e,n){n(t.left,e,Br.Pattern),n(t.right,e,Br.Expression)},Sr[35]=function(t,e,n){n(t.test,e,Br.Expression),n(t.consequent,e,Br.Expression),n(t.alternate,e,Br.Expression)},Sr[40]=function(t,e,n){if(n(t.callee,e,Br.Expression),t.arguments)for(var r=0,i=t.arguments;r<i.length;r++){n(i[r],e,Br.Expression)}},Sr[39]=function(t,e,n){n(t.object,e,Br.Expression),t.computed&&n(t.property,e,Br.Expression)},Sr[84]=function(t,e,n){t.declaration&&n(t.declaration,e,84===t.type||t.declaration&&"id"in t.declaration&&t.declaration.id?Br.Statement:Br.Expression),t.source&&n(t.source,e,Br.Expression)},Sr[82]=function(t,e,n){t.exported&&n(t.exported,e),n(t.source,e,Br.Expression)},Sr[78]=function(t,e,n){for(var r=0,i=t.specifiers;r<i.length;r++){n(i[r],e)}n(t.source,e,Br.Expression)},Sr[90]=function(t,e,n){n(t.source,e,Br.Expression)},Sr[42]=function(t,e,n){n(t.tag,e,Br.Expression),n(t.quasi,e,Br.Expression)},Sr[86]=function(t,e,n){n(t,e,Br.Class)},Sr[88]=function(t,e,n){for(var r=0,i=t.body;r<i.length;r++){n(i[r],e)}},Sr[95]=function(t,e,n){t.computed&&n(t.key,e,Br.Expression),n(t.value,e,Br.Expression)},Sr);jr[67]=jr[76],jr[91]=jr[5],jr[92]=jr[93]=jr[11],jr[70]=jr[13],jr[4]=jr[15],jr[7]=jr[6],jr[36]=jr[31]=jr[63],jr[45]=jr[44],jr[38]=jr[33],jr[61]=jr[32],jr[34]=jr[40],jr[83]=jr[84],jr[94]=jr[86],jr[68]=jr[95];var Mr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Rr(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){if(this instanceof t){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(e,n))}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),n}var Lr={};!function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnserializableValue=t.EUnserializableValue=void 0,function(t){t[1/0]="Infinity",t[-1/0]="-Infinity",t.NaN="NaN",t["-0"]="-0"}(e=t.EUnserializableValue||(t.EUnserializableValue={})),t.parseUnserializableValue=function(t){if(!t)return null;switch(t){case e.Infinity:return 1/0;case e[-1/0]:return-1/0;case e.NaN:return NaN;case e["-0"]:return-0;default:return null}}}(Lr);function zr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function Ur(t){return"function"==typeof t}function Kr(t){return!!O(t,"__can_breakpointasxu")||t.type<30}function Gr(t,e,n,r){var i,o,s=n||{lineNumber:e.lineNumber+1,columnNumber:0},a=[];return i=t.ast,o=function(t,n){if(t.loc){var i={startLineNumber:t.loc.start.line-1,startColumnNumber:t.loc.start.column,endLineNumber:t.loc.end.line-1,endColumnNumber:t.loc.end.column};return i.endLineNumber<e.lineNumber||i.startLineNumber>s.lineNumber||i.endLineNumber===e.lineNumber&&i.endColumnNumber<=e.columnNumber||i.startLineNumber===s.lineNumber&&i.startColumnNumber>=s.columnNumber?(a.length&&(n.found=!0),!1):(37===t.type&&t.expressions.forEach((function(t,e){e&&t.type<60&&T(t,"__can_breakpointasxu",!0)})),i.startLineNumber>e.lineNumber||i.startLineNumber===e.lineNumber&&i.startColumnNumber>=e.columnNumber?(Kr(t)&&-1===a.indexOf(t)&&a.push(t),!(r&&r.limit&&a.length>=r.limit&&(n.found=!0,1))):!a.length||(n.found=!0,!1))}},function t(e,n,r){!n.found&&o(e,n)&&jr[r||e.type](e,n,t)}(i,{found:!1}),a}var Hr=0;var Wr="function"==typeof __nativeGetHighResolutionTime__?function(){return __nativeGetHighResolutionTime__()+Hr}:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()+Hr}:function(){return Date.now()},qr=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Vr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length<=1)return t;var n=t[0];if("string"!=typeof n)return t;var r=t[1],i=n.match(/%[sdifoOc]/);if(!i)return t;if(i){var o=i.index;if(void 0===o)return t;var s=n.slice(0,o),a=n.slice(o+2),u=function(t,e){switch(t){case"%s":return String(e);case"%d":return"symbol"==typeof e?NaN:Number(e);case"%i":return"symbol"==typeof e?NaN:parseInt(e,10);case"%f":return"symbol"==typeof e?NaN:parseFloat(e);default:return e}}(i[0],r);return qr([s,u,a],t.slice(2),!0)}return t}var Qr=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Yr(t,e,n){var r,i;e=Array.from(e);var s=n.getRemoteObjectParser(),a=n.getSessionState(),u=n.getEngine().getRuntimeStatus(),c=null!==(r=u.scriptMap[u.scriptId])&&void 0!==r?r:{scriptId:u.scriptId,url:""},l=u.callExpressionNode,h=[];c&&l&&(h=u.callFrames.map((function(t,e){var n=u.callFrames[e+1];return n?{functionName:t.functionName,scriptId:c.scriptId,url:c.url,lineNumber:n.functionNode.loc.start.line-1,columnNumber:n.functionNode.loc.start.column}:{functionName:t.functionName,scriptId:c.scriptId,url:c.url,lineNumber:l.loc.start.line-1,columnNumber:l.loc.start.column}})).reverse()),"trace"===t&&0===h.length&&(h=[{functionName:"",scriptId:c.scriptId,url:c.url,lineNumber:0,columnNumber:0}]);var p=null!==(i={warn:"warning",group:"startGroup",groupEnd:"endGroup",groupCollapsed:"startGroupCollapsed",countReset:"warning"}[t])&&void 0!==i?i:t;return{method:o.consoleAPICalled,params:{type:p,args:Array.from(e).map((function(e){return s.parseObject(e,t)})),executionContextId:a.executionContextId,timestamp:Wr(),stackTrace:{callFrames:h}}}}function Jr(t){var e;if(!t)return"";var n=t.method;if(!n)return"";if(n===o.consoleAPICalled){var r=null===(e=t.params)||void 0===e?void 0:e.args;if(r&&Array.isArray(r)&&r.length>0)return": "+JSON.stringify(r[0]).slice(1,100)+"..."}return""}function Xr(t,e,n){var r=n.getProtocolConnection(),i=Yr(t,e,n);JSON.stringify(i).length>2e7?r.sendConsoleMessage(Yr("warn",[n.i18n.formatWithPrefix("consoleContentTooLarge")+Jr(i)],n)):r.sendConsoleMessage(i)}function $r(t){return t?String(t):"default"}var Zr=function(){function t(t){this.defaultValue=t,this.dict={}}return t.prototype.get=function(t){return t in this.dict||(this.dict[t]=this.defaultValue()),this.dict[t]},t}(),ti=function(){function t(t){this.container=t,this.metaMapById=new Zr((function(){return{countMap:{},timerTable:{}}}))}return t.prototype._getRuntimeMeta=function(){var t=this.container.getSessionState().executionContextId;return this.metaMapById.get(String(t))},t.prototype._getCountMap=function(){return this._getRuntimeMeta().countMap},t.prototype._getTimerTable=function(){return this._getRuntimeMeta().timerTable},t.prototype.assert=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t||Xr("assert",e,this.container)},t.prototype.clear=function(){this.sendEmptyConsoleAPICalled("clear")},t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("debug",t,this.container)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("error",t,this.container)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("info",t,this.container)},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("log",t,this.container)},t.prototype.table=function(t,e){Xr("table",[t,e],this.container)},t.prototype.trace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("trace",t,this.container)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Xr("warn",t,this.container)},t.prototype.dir=function(t,e){Xr("dir",[t,e],this.container)},t.prototype.dirxml=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.count=function(t){var e=this._getCountMap(),n=e[t=$r(t)]=(e[t]||0)+1;Xr("count",["".concat(t,": ").concat(n)],this.container)},t.prototype.countReset=function(t){var e=this._getCountMap();(t=$r(t))in e?e[t]=0:Xr("countReset",["Count for '".concat(t,"' does not exist")],this.container)},t.prototype.group=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="console.group";t.length&&(n=Vr.apply(void 0,t)[0]),Xr("group",[n],this.container)},t.prototype.groupCollapsed=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="console.groupCollapsed";t.length&&(n=Vr.apply(void 0,t)[0]),Xr("groupCollapsed",[n],this.container)},t.prototype.groupEnd=function(){Xr("groupEnd",["console.groupEnd"],this.container)},t.prototype.time=function(t){var e=this._getTimerTable();(t=$r(t))in e?Xr("warn",["Timer '".concat(t,"' has already been started.")],this.container):e[t]=Wr()},t.prototype.timeLog=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this._getTimerTable()[t=$r(t)];if(void 0!==r){var i=ei(Wr()-r,5);Xr("timeLog",Qr(["".concat(t,": ").concat(i,"ms")],e,!0),this.container)}else Xr("warn",["Timer '".concat(t,"' does not exist.")],this.container)},t.prototype.timeEnd=function(t){var e=this._getTimerTable(),n=e[t=$r(t)];if(void 0!==n){delete e[t];var r=ei(Wr()-n,5);Xr("timeEnd",["".concat(t,": ").concat(r,"ms")],this.container)}else Xr("warn",["Timer '".concat(t,"' does not exist.")],this.container)},t.prototype.sendEmptyConsoleAPICalled=function(t){Xr(t,["console.".concat(t)],this.container)},t}();function ei(t,e){return void 0===e&&(e=0),Number("".concat(Math.round(Number("".concat(t,"e").concat(e))),"e-").concat(e))}var ni,ri=["debug","assert","log","info","warn","error","table","dir","trace","group","groupCollapsed","groupEnd","clear","count","countReset","time","timeEnd","timeLog"];function ii(t,e){var n="object"==typeof console&&console[t]?console[t].bind(console):function(){};function r(){var r=arguments;if("string"==typeof r[0]&&/^(\[framework\]|dispatchEvent|onMessage push|\[boatman\])/.test(r[0]))return n.apply(null,r);try{var i=e.getConsole();i[t].apply(i,r)}catch(e){zr("console replacement",t,e)}return n.apply(null,r)}return f(r,"toString",{value:function(){return"function ".concat(t,"() { [native code] }")},writable:!0,configurable:!0}),r}function oi(t,e){e||(e="object"==typeof console?console:null);var n={};return ri.forEach((function(e){n[e]={configurable:!0,enumerable:!0,writable:!0,value:ii(e,t)}})),E(e,n)}function si(t){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(t):Object.getOwnPropertyNames(t).reduce((function(e,n){return e[n]=Object.getOwnPropertyDescriptor(t,n),e}),Object.create(null))}function ai(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}function ui(t){return t instanceof ArrayBuffer}!function(t){t[1/0]="Infinity",t[-1/0]="-Infinity",t.NaN="NaN",t["-0"]="-0"}(ni||(ni={}));var ci=function(){function t(t){this.objectStore=t}return t.prototype.mapFrom=function(t,e){var n=this;return Array.from(t).map((function(t){return n.mapFromOne(t,e)}))},t.prototype.mapFromOne=function(t,e){switch(typeof t){case"string":return this.mapString(t);case"number":return this.mapNumber(t);case"object":return Array.isArray(t)?this.mapArray(t,"table"===e):null===t?this.mapNull():ui(t)?this.mapArrayBuffer(t,"table"===e):this.mapObject(t,"table"===e);case"function":return this.mapFunction(t);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(t);default:return{type:typeof t,value:t}}},t.prototype.mapArrayBuffer=function(t,e){var n=this,r={byteLength:t.byteLength},i=Object.keys(r),o=t.byteLength,s=this.objectStore.save(t),a=t.constructor?t.constructor.name:"Object",u=i.length>5&&!e,c="arraybuffer",l="".concat(a,"(").concat(o,")"),h={type:"object",className:a,description:l,objectId:s,preview:{type:"object",description:l,overflow:u,properties:(u?i.slice(0,5):i).map((function(t){return n.getPropertyPreview4AnyValue(t,r[t],e)})).filter(Boolean)}};return c&&(h.subtype=c,h.preview&&(h.preview.subtype=c)),l&&(h.description=l,h.preview&&(h.preview.description=l)),h},t.prototype.mapString=function(t){return{type:"string",value:t}},t.prototype.mapNumber=function(t){var e,n,r;isNaN(t)?n=ni.NaN:t===1/0?n=ni.Infinity:t===-1/0?n=ni[-1/0]:0===(r=t)&&1/r==-1/0?n=ni["-0"]:e=t;var i={type:"number",value:e,description:String(t)};return n&&(i.unserializableValue=n),i},t.prototype.mapBoolean=function(t){return{type:"boolean",value:t}},t.prototype.mapFunction=function(t){var e=this.objectStore.save(t);return{type:"function",className:"Function",description:t.toString(),objectId:e}},t.prototype.mapUndef=function(){return{type:"undefined"}},t.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},t.prototype.mapObject=function(t,e){var n,r,i,o=this,s=si(t),a=Object.keys(s),u=this.objectStore.save(t),c=t.constructor?t.constructor.name:"Object",l=a.length>5&&!e,h={type:"object",className:c,description:c,objectId:u,preview:{type:"object",description:c,overflow:l,properties:(l?a.slice(0,5):a).map((function(t){return o.getPropertyPreview4ObjectProperty(t,s[t],e)})).filter(Boolean)}};return i=t,"[object Error]"===Object.prototype.toString.call(i)||i instanceof Error?(n="error",-1===(r=t.stack||"").indexOf(t.name)&&(r=t.toString()+"\n"+r)):!function(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}(t)?!function(t){return"[object RegExp]"===Object.prototype.toString.call(t)||t instanceof RegExp}(t)?function(t){return"[object Promise]"===Object.prototype.toString.call(t)||t instanceof Promise}(t)&&(n="promise",r="Promise"):(n="regexp",r=t.toString()):(n="date",r=t.toString()),n&&(h.subtype=n,h.preview&&(h.preview.subtype=n)),r&&(h.description=r,h.preview&&(h.preview.description=r)),h},t.prototype.mapArray=function(t,e){var n=this,r=t.length>100&&!e,i="Array(".concat(t.length,")");return{type:"object",subtype:"array",className:"Array",description:i,objectId:this.objectStore.save(t),preview:{type:"object",subtype:"array",description:i,overflow:r,properties:(r?t.slice(0,100):t).map((function(t,r){return n.getPropertyPreview4ArrayProperty(r,t,e)}))}}},t.prototype.getPropertyPreview4ArrayProperty=function(t,e,n){return this.getPropertyPreview4AnyValue(String(t),e,n)},t.prototype.getPropertyPreview4ObjectProperty=function(t,e,n){return e.get?{name:t,type:"accessor"}:e.set?void 0:this.getPropertyPreview4AnyValue(t,e.value,n)},t.prototype.getPropertyPreview4AnyValue=function(t,e,n){switch(void 0===n&&(n=!1),typeof e){case"object":if(Array.isArray(e)){var r={name:t,type:"object",subtype:"array",value:"Array(".concat(e.length,")")};return n&&(r.valuePreview=this.getValuePreview4TableArray(e)),r}if(null===e)return{name:t,type:"object",subtype:"null",value:"null"};r={name:t,type:"object",value:e.constructor?e.constructor.name:"Object"};return n&&(r.valuePreview=this.getValuePreview4TableObject(e)),r;case"function":return{type:"function",value:"",name:t};default:return{name:t,type:typeof e,value:String(e)}}},t.prototype.getValuePreview4TableArray=function(t){var e=this;return{type:"object",subtype:"array",description:"Array(".concat(t.length,")"),overflow:!1,properties:t.map((function(t,n){return e.getPropertyPreview4AnyValue(String(n),t)}))}},t.prototype.getValuePreview4TableObject=function(t){var e=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(t).map((function(n){return e.getPropertyPreview4AnyValue(n,t[n])}))}},t}(),li=function(t,e){return li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},li(t,e)};function hi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}li(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var pi=function(){return pi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},pi.apply(this,arguments)};function fi(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}var di=Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]};function mi(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vi(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Di(t){return this instanceof Di?(this.v=t,this):new Di(t)}var yi=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};var gi=Object.freeze({__proto__:null,get __assign(){return pi},__asyncDelegator:function(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:Di(t[r](e)),done:!1}:i?i(e):e}:i}},__asyncGenerator:function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||a(t,e)}))})}function a(t,e){try{(n=i[t](e)).value instanceof Di?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}},__asyncValues:function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=mi(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}},__await:Di,__awaiter:function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},__classPrivateFieldGet:function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)},__classPrivateFieldIn:function(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)},__classPrivateFieldSet:function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},__createBinding:di,__decorate:function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},__esDecorate:function(t,e,n,r,i,o){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!e&&t?r.static?t:t.prototype:null,h=e||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),p=!1,f=n.length-1;f>=0;f--){var d={};for(var m in r)d[m]="access"===m?{}:r[m];for(var m in r.access)d.access[m]=r.access[m];d.addInitializer=function(t){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(t||null))};var v=(0,n[f])("accessor"===u?{get:h.get,set:h.set}:h[c],d);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(h.get=a),(a=s(v.set))&&(h.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):h[c]=a)}l&&Object.defineProperty(l,r.name,h),p=!0},__exportStar:function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||di(e,t,n)},__extends:hi,__generator:function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},__importDefault:function(t){return t&&t.__esModule?t:{default:t}},__importStar:function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&di(e,t,n);return yi(e,t),e},__makeTemplateObject:function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},__metadata:function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},__param:function(t,e){return function(n,r){e(n,r,t)}},__propKey:function(t){return"symbol"==typeof t?t:"".concat(t)},__read:vi,__rest:fi,__runInitializers:function(t,e,n){for(var r=arguments.length>2,i=0;i<e.length;i++)n=r?e[i].call(t,n):e[i].call(t);return r?n:void 0},__setFunctionName:function(t,e,n){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})},__spread:function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(vi(arguments[e]));return t},__spreadArray:function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},__spreadArrays:function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},__values:mi}),bi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hi(e,t),e.prototype.mapFrom=function(t){var e=this;return t.split("\n").slice(2).map((function(t,n){return e.testType1(t)?e.extractType1(t):e.testType2(t)?e.extractType2(t):void 0})).filter((function(t){return null!=t}))},e}(function(){function t(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return t.prototype.testType1=function(t){return this.e1.test(t)},t.prototype.testType2=function(t){return this.e2.test(t)},t.prototype.extractType1=function(t){var e=t.match(this.e1);return null==e?null:{functionName:e[1],url:e[2].slice(1),lineNumber:Number(e[3]),columnNumber:Number(e[4])}},t.prototype.extractType2=function(t){var e=t.match(this.e2);return null==e?null:{functionName:"",url:e[1].slice(1),lineNumber:Number(e[2]),columnNumber:Number(e[3])}},t}()),xi=function(){function t(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return t.prototype.save=function(t){if(this.object2Id.has(t))return this.object2Id.get(t);var e=this.getNextObjectId();return this.id2Object.set(e,t),this.object2Id.set(t,e),e},t.prototype.query=function(t){return this.id2Object.get(t)},t.prototype.clear=function(t){var e=this.id2Object.get(t);e&&(this.id2Object.delete(t),this.object2Id.delete(e))},t.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},t.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'.concat(1,',"id":').concat(this.id,"}")},t}(),Ei=function(){function t(t,e){this.objectStore=t,this.objectMapper=e}return t.prototype.handle=function(t){var e=this.objectStore.query(t.objectId);if(e){var n=Boolean(t.ownProperties),r={result:this.mapObject(e,n,Boolean(t.accessorPropertiesOnly))};return n&&this.hasInternalProperties(e)&&(r.internalProperties=this.getInternalProperties(e)),r}return{result:[]}},t.prototype.getInternalProperties=function(t){return ui(t)?[this.mapInternalProperties("[[ArrayBufferByteLength]]",t.byteLength)]:[]},t.prototype.hasInternalProperties=function(t){return ai(t)},t.prototype.shouldSkipProto=function(t){return ai(t)},t.prototype.mapObject=function(t,e,n){var r=this;if(e){var i=si(t),o=Object.keys(i).filter((function(t){return!(n&&!i[t].get&&!i[t].set)})).map((function(t){return r.mapResultOne(t,i[t],!0)}));return this.shouldSkipProto(t)||t.__proto__&&o.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:t.__proto__},!0)),o}for(var s=[],a={},u=t,c=!1,l=!0,h=function(){var t=si(u);if(Object.keys(t).forEach((function(e){if(!a[e]){a[e]=!0;var i=t[e];(!n||i.get||i.set)&&s.push(r.mapResultOne(e,i,l))}})),!c){var e=Object.getOwnPropertyDescriptor(u,"__proto__");e&&(c=!0,s.push(p.mapResultOne("__proto__",e,l)))}u=u.__proto__,l=!1},p=this;u;)h();return s},t.prototype.mapInternalProperties=function(t,e){return{name:String(t),value:this.objectMapper.mapFromOne(e)}},t.prototype.mapResultOne=function(t,e,n){var r={writable:e.writable,configurable:Boolean(e.configurable),enumerable:Boolean(e.enumerable),isOwn:n,name:String(t)};return"value"in e&&(r.value=this.objectMapper.mapFromOne(e.value)),e.get&&(r.get=this.objectMapper.mapFromOne(e.get)),e.set&&(r.set=this.objectMapper.mapFromOne(e.set)),r},t}(),Ci=function(){function t(){this.objectStore=new xi,this.objectMapper=new ci(this.objectStore),this.callFramesMapper=new bi,this.getPropertiesHandler=new Ei(this.objectStore,this.objectMapper)}return t.prototype.parseObject=function(t,e){return this.objectMapper.mapFromOne(t,e)},t.prototype.getProperties=function(t){return this.getPropertiesHandler.handle(t)},t.prototype.getObjectById=function(t){return this.objectStore.query(t)},t.prototype.consoleAPICalled=function(t,e,n){var r=t;return"warn"===t&&(r="warning"),{method:"Runtime.consoleAPICalled",params:{type:r,args:this.objectMapper.mapFrom(n,t),executionContextId:1,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(e)}}}},t}(),wi=function(){function t(t,e,n){this.manager=t,this.targetNode=n,this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber||0,this.scriptId=e.scriptId,this.id="".concat(this.scriptId,":").concat(this.lineNumber,":").concat(this.columnNumber),this.condition=e.condition,T(n,"__breakpointzxfg",this.id)}return t.prototype.destroy=function(){T(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},t}();function Ai(t,e,n){n(null,{});var r=t.getProtocolConnection().connectionState;r.debuggerDomainEnabled||(r.enableDebuggerDomain(),t.getScriptManager().emitAllScriptParsedEvents())}var ki=Object.freeze({__proto__:null,disable:function(t,e,n){t.getProtocolConnection().connectionState.disableDebuggerDomain(),n(null,{})},enable:Ai,evaluateOnCallFrame:function(t,e,n){var r,i=e.callFrameId,o=t.getEngine();if(o.getRuntimeStatus().callFrames.some((function(t){if(o.runtimeProfile.getCallFrameId(t)===i)return r=t,!0})),r){var s=t.getRemoteObjectParser();try{var a=t.getEngine().evaluate(e.expression,r.functionScope);n(null,{result:s.parseObject(a)})}catch(t){var u=O(t,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:s.parseObject(t),exceptionId:u?u.id:100,lineNumber:0,text:"Uncaught"},result:s.parseObject(t)})}}else n(l.NormalError)},getPossibleBreakpoints:function(t,e,n){var r=e.start.scriptId,i=t.getScriptManager().getScript(r);if(i){var o=[];Gr(i,e.start,e.end).forEach((function(t){o.push({columnNumber:t.loc.start.column,lineNumber:t.loc.start.line-1,scriptId:r})})),n(null,{locations:o})}else n(l.NormalError)},getScriptSource:function(t,e,n){var r=t.getScriptManager().getScript(e.scriptId);r?n(null,{scriptSource:r.source}):n(l.NormalError)},pause:function(t,e,n){t.getBreakpointManager().pauseOnNextStatement=!0,n(null,{})},removeBreakpoint:function(t,e,n){var r=e.breakpointId;r&&t.getBreakpointManager().removeBreakpoint(r),n(null,{})},resume:function(t,e,n){n(null,{})},setBreakpointByUrl:function(t,e,n){var r,i=t.getScriptManager();if(e.url?r=i.getScriptByUrl(e.url):e.scriptHash&&(r=i.getScriptByHash(e.scriptHash)),r){for(var o,s=0;!o&&s<20;)o=Gr(r,{lineNumber:e.lineNumber+s,columnNumber:e.columnNumber||0},null,{limit:1})[0],s+=1;if(!o)return n(l.NormalError,"[DEBUG] no breakpoint was found from line ".concat(e.lineNumber," to ").concat(e.lineNumber+s)),void S("[DEBUG] no breakpoint was found from line ".concat(e.lineNumber," to ").concat(e.lineNumber+s));var a=t.getBreakpointManager().setBreakpoint({scriptId:r.scriptId,lineNumber:o.loc.start.line-1,columnNumber:o.loc.start.column,condition:e.condition},o);n(null,{breakpointId:a.id,locations:[{scriptId:a.scriptId,lineNumber:a.lineNumber,columnNumber:a.columnNumber}]})}else n(l.NormalError,"Script Not Found")},setBreakpointsActive:function(t,e,n){var r=t.getBreakpointManager();e.active?(r.activate(),r.isActive4UserManual=!0):(r.inactivate(),r.isActive4UserManual=!1),n(null,{})},setPauseOnExceptions:function(t,e,n){switch(e.state){case"all":t.getBreakpointManager().pauseOnExceptionsState=2;break;case"uncaught":t.getBreakpointManager().pauseOnExceptionsState=1;break;case"none":t.getBreakpointManager().pauseOnExceptionsState=0}n(null,{})},setSkipAllPauses:function(t,e,n){n(null,{})},stepInto:function(t,e,n){t.getBreakpointManager().stepAction=3,n(null,{})},stepOut:function(t,e,n){t.getBreakpointManager().stepAction=1,n(null,{})},stepOver:function(t,e,n){t.getBreakpointManager().stepAction=2,n(null,{})}}),Fi=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Si(t,e,n){n(null,{});var r=t.getSessionState(),i=r.executionContextId,s=r.executionContextName,a=t.getProtocolConnection();a.connectionState.enableRuntimeDomain(),a.send({method:o.executionContextCreated,params:{context:{id:i,origin:"app://",name:s}}})}var Bi=Object.freeze({__proto__:null,callFunctionOn:function(t,e,n){var r=t.getRemoteObjectParser();if(e.functionDeclaration){var i=e.objectId?r.getObjectById(e.objectId):null,o=function(t,e){var n=[],r=t.getRemoteObjectParser();return e&&e.forEach((function(t){if(t.unserializableValue)n.push(Lr.parseUnserializableValue(t.unserializableValue));else if(t.objectId){var e=t.objectId?r.getObjectById(t.objectId):null;n.push(e)}else n.push(t.value)})),n}(t,e.arguments);if(i){var s=function(t){e.slient||n(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(t),exceptionId:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(t)})};if(0===e.functionDeclaration.indexOf("function invokeGetter(arrayStr)")||-1!==e.functionDeclaration.indexOf("let t=this;const n=JSON.parse(e);for(let e=0,i=n.length;e<i;++e)t=t[n[e]]"))try{var a=JSON.parse(e.arguments[0].value),u=i;return a.forEach((function(t){u=u[t]})),void n(null,{result:r.parseObject(u)})}catch(t){s(t)}else try{var c=t.getEngine().createScope();c.const("__obj",i),c.const("__args",o);var l=t.getEngine().evaluate("(".concat(e.functionDeclaration,").apply(__obj, __args)"),c);n(null,{result:e.returnByValue?{type:"object",value:l}:r.parseObject(l)})}catch(t){s(t)}}}},compileScript:function(t,e,n){n(null,{})},disable:function(t,e,n){t.getProtocolConnection().connectionState.disableRuntimeDomain(),n(null,{})},enable:Si,evaluate:function(t,e,n){var r=e.disableBreaks||e.throwOnSideEffect,i=t.getRemoteObjectParser(),o=t.getBreakpointManager();try{var s=r?o.evaluateWithoutBreakpoint(e.expression):t.getEngine().evaluate(e.expression);n(null,{result:i.parseObject(s)})}catch(t){var a=O(t,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:i.parseObject(t),exceptionId:a?a.id:100,lineNumber:0,text:"Uncaught"},result:i.parseObject(t)})}},getProperties:function(t,e,n){var r=t.getRemoteObjectParser().getProperties(e),i=t.getRemoteObjectParser().getObjectById(e.objectId);if(Ur(i)){var o=O(i,"___func_locationxasdzzy");if(o){var s=o.node,a=o.scriptId,u=s.id;r.internalProperties=Fi([{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:a,lineNumber:(u?u.loc.start.line:s.loc.start.line)-1,columnNumber:u?u.loc.start.column:s.loc.start.column}}}],r.internalProperties||[],!0)}}n(null,r)},globalLexicalScopeNames:function(t,e,n){n(null,{names:[]})},releaseObjectGroup:function(t,e,n){n(null,{})},runIfWaitingForDebugger:function(t,e,n){n(null,{}),t.getProtocolConnection().connectionState.handleDebuggerAttached()}});var Pi=Object.freeze({__proto__:null,enable:function(t,e,n){t.getProtocolConnection().connectionState.enablePageDomain(),n(null,{})},getResourceTree:function(t,e,n){t.getProtocolConnection().connectionState.enablePageResourceTree(),n(null,{})}}),Ii=Object.freeze({__proto__:null,Debugger:ki,Page:Pi,Runtime:Bi}),Ti=function(){return Ti=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Ti.apply(this,arguments)},Oi={pageDomainEnabled:!1,runtimeDomainEnabled:!1,debuggerDomainEnabled:!1,getResourceTreeRequested:!1},Ni=function(){function t(){this.consoleReadyCallbacks=[],this.whenDebuggerAttachedQueue=new _i,this.state=Ti({},Oi),this.whenDebuggerDomainEnabledQueue=new _i}return Object.defineProperty(t.prototype,"debuggerDomainEnabled",{get:function(){return this.state.debuggerDomainEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"runtimeDomainEnabled",{get:function(){return this.state.runtimeDomainEnabled},enumerable:!1,configurable:!0}),t.prototype.enablePageDomain=function(){this.state.pageDomainEnabled=!0,this.checkConsoleReady()},t.prototype.enableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!0,this.checkConsoleReady()},t.prototype.disableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!1},t.prototype.onDebuggerDomainEnabled=function(t){this.whenDebuggerDomainEnabledQueue.push(t)},t.prototype.enableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!0,this.whenDebuggerDomainEnabledQueue.activate()},t.prototype.disableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!1,this.whenDebuggerDomainEnabledQueue.deactivate()},t.prototype.enablePageResourceTree=function(){this.state.getResourceTreeRequested=!0,this.checkConsoleReady()},t.prototype.reset=function(){this.state=Ti({},Oi)},t.prototype.onConsoleReady=function(t){this.consoleReadyCallbacks.push(t)},t.prototype.offConsoleReady=function(t){var e=this.consoleReadyCallbacks.indexOf(t);e>-1&&this.consoleReadyCallbacks.splice(e,1)},t.prototype.checkConsoleReady=function(){var t=this;this.state.runtimeDomainEnabled&&this.state.pageDomainEnabled&&this.state.getResourceTreeRequested&&setTimeout((function(){t.consoleReadyCallbacks.forEach((function(t){t()}))}),0)},t.prototype.onDebuggerAttached=function(t){this.whenDebuggerAttachedQueue.push(t)},t.prototype.handleDebuggerAttached=function(){this.whenDebuggerAttachedQueue.activate()},t}(),_i=function(){function t(){this.queue=[],this.ready=!1}return t.prototype.push=function(t){this.ready?t():this.queue.push(t)},t.prototype.runQueue=function(){this.queue.forEach((function(t){t()})),this.queue=[]},t.prototype.activate=function(){this.runQueue(),this.ready=!0},t.prototype.deactivate=function(){this.ready=!1,this.runQueue()},t}(),ji=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Mi=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ri=function(){function t(t){var e=this;this.container=t,this.messagesBeforeRuntimeEnabled=[],this.consoleReady=!1,this.messagesBeforeWebsocketOpened=[],this.connectionState=new Ni,this.connectionState.onConsoleReady((function(){e.consoleReady=!0,e.messagesBeforeRuntimeEnabled.length&&(e.messagesBeforeRuntimeEnabled.forEach((function(t){e.send(t)})),e.messagesBeforeRuntimeEnabled=[])})),setTimeout((function(){e.consoleReady=!0}),1e4)}return Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakpointManager",{get:function(){return this.container.getBreakpointManager()},enumerable:!1,configurable:!0}),t.prototype.open=function(){return ji(this,void 0,void 0,(function(){var t,e,n=this;return Mi(this,(function(r){switch(r.label){case 0:return[4,this.sessionState.resolveChannelId()];case 1:return t=r.sent(),e="".concat(this.container.server4WebSocket,"/bugme/client_w/").concat(t),this.ws=new(this.container.getWebSocketClientImpl()),this.ws.setUrl(e),this.ws.setSocketMessageHandler(this.onSocketMessage.bind(this)),this.ws.open(),this.messagesBeforeWebsocketOpened.length&&(this.messagesBeforeWebsocketOpened.forEach((function(t){n.ws.sendSocketMessage(t)})),this.messagesBeforeWebsocketOpened=[]),[2]}}))}))},t.prototype.close=function(){this.ws&&this.ws.close()},t.prototype.send=function(t){this.ws?this.ws.sendSocketMessage(t):this.messagesBeforeWebsocketOpened.push(t)},t.prototype.sendConsoleMessage=function(t){this.consoleReady?this.send(t):this.messagesBeforeRuntimeEnabled.push(t)},t.prototype.onFrontendJoin=function(){this.breakpointManager.activate()},t.prototype.onFrontendLeave=function(){this.breakpointManager.inactivate(),this.connectionState.reset(),this.consoleReady=!1},t.prototype.onSocketMessage=function(t){var e,n=this;try{e=JSON.parse(t)}catch(e){return void("CLIENT:JOIN"===t?this.onFrontendJoin():"CLIENT:LEAVE"===t&&this.onFrontendLeave())}var r=Li(e.method);r&&r(this.container,e.params,(function(t,r){t?n.ws.sendSocketMessage({id:e.id,error:{code:t,message:(null==r?void 0:r.message)||r||""}}):n.ws.sendSocketMessage({id:e.id,result:r})}))},t}();function Li(t){for(var e=t.split("."),n=Ii,r=0,i=e;r<i.length;r++){if(!(n=n[i[r]]))break}return n}var zi=function(){return zi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},zi.apply(this,arguments)},Ui=function(){function t(t){this.container=t,this.id2BreakpointMap={},this.isActive=!1,this.isActive4UserManual=!0,this.pauseOnExceptionsState=0,this.pauseOnNextStatement=!1,this.stepAction=0,this.breakpointCallStackDepth=0,this.hiddenKeys=new Set(["this"])}return Object.defineProperty(t.prototype,"remoteObjectParser",{get:function(){return this.container.getRemoteObjectParser()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),t.prototype.activate=function(){this.isActive=!0},t.prototype.inactivate=function(){this.isActive=!1},t.prototype.get=function(t){return this.id2BreakpointMap[t]},t.prototype.setBreakpoint=function(t,e){var n=new wi(this,t,e);return this.id2BreakpointMap[n.id]=n,n},t.prototype.removeBreakpoint=function(t){var e=this.id2BreakpointMap[t];e&&e.destroy()},t.prototype.pauseOnBreakpoint=function(t){this.handlePaused({method:r.paused,params:{callFrames:this.getBreakpointCallFrames(t),reason:h.Other,hitBreakpoints:[t.id]}})},t.prototype.pauseOnException=function(t,e,n,i){this.handlePaused({method:r.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:n.loc.start.line-1,columnNumber:n.loc.start.column}),data:zi(zi({},this.remoteObjectParser.parseObject(e)),{uncaught:i}),reason:h.Exception,hitBreakpoints:[]}})},t.prototype.pauseOnNode=function(t,e){if(this.container.getEngine().disableBreaks)return!1;this.handlePaused({method:r.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:e.loc.start.line-1,columnNumber:e.loc.start.column}),reason:h.Other,hitBreakpoints:[]}})},t.prototype.evaluateWithoutBreakpoint=function(t,e){var n=this.isActive;n&&this.inactivate();try{return this.container.getEngine().evaluate(t,e)}finally{n&&this.activate()}},t.prototype.getBreakpointCallFrames=function(t){var e,n=this,r=[],i=this.container.getEngine(),o=i.getRuntimeStatus().callFrames;return o.forEach((function(s,a){var u=s.functionNode,c=s.functionScope,l=o[a+1],h={lineNumber:l?l.callExpressionNode.loc.start.line-1:t.lineNumber,columnNumber:l?l.callExpressionNode.loc.start.column:t.columnNumber,scriptId:s.scriptId},p=E(null);D(c.context).forEach((function(t){n.hiddenKeys.has(t)||(p[t]=c.context[t].value)}));var f={columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:s.scriptId},d={columnNumber:u.loc.end.column,lineNumber:u.loc.end.line-1,scriptId:s.scriptId},m=n.remoteObjectParser.parseObject(p),v=n.remoteObjectParser.parseObject(c.find("this").value);e||(e=n.remoteObjectParser.parseObject(i.globalObjectAccessor.globalObject));var y={callFrameId:i.runtimeProfile.getCallFrameId(s),functionName:s.functionName||"(anonymous)",functionLocation:f,location:h,scopeChain:[{type:"local",object:m,startLocation:f,endLocation:d},{type:"global",object:e}],this:v,url:"https://gw.alipayobjects.com"};r.unshift(y)})),r},t.prototype.handlePaused=function(t){if(this.sessionState.channelId){this.isActive=!1,this.breakpointCallStackDepth=this.container.getEngine().getRuntimeStatus().callFrames.length,this.container.getPausedCoverView().show();var e=this.protocolConnection.messagesBeforeWebsocketOpened.length?this.protocolConnection.messagesBeforeWebsocketOpened.concat([t]):[t];this.protocolConnection.messagesBeforeWebsocketOpened=[],this.handleSyncRequest(e),this.container.getPausedCoverView().hide(),this.protocolConnection.send({method:r.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else zr("skip breakpoint due to lacking of channelId")},t.prototype.handleSyncRequestInner=function(t,e){var n=this,r=Date.now(),i=this.container.getHttpClient().syncRequest({url:"".concat(this.container.server4Http,"/bugme/channel/paused"),method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:e});if(zr("syncRequest response",i),i.error){if(Date.now()-r>=1e4)return this.handleSyncRequestInner(t,e);B("[DEBUG]",i.errorMessage)}else if(200===i.status){var o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(t){}if(o){var s=[],a=!1;Array.isArray(o)?o.forEach((function(e){t(e.method)&&(a=!0),s.push(n.handleProtocolResponse(e))})):o.method&&(a=t(o.method),s.push(this.handleProtocolResponse(o))),s.length&&(s.forEach((function(t){n.protocolConnection.send(t)})),a||this.handleSyncRequestInner(t,1===s.length?s[0]:s))}}else{o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(t){}if(o&&o.errorMessage&&"timeout"===o.errorMessage)return this.handleSyncRequestInner(t,e);B("[DEBUG] breakpoint error ".concat(JSON.stringify(i)))}},t.prototype.handleSyncRequest=function(t){return this.handleSyncRequestInner((function(t){return t===n.resume||t===n.stepOver||t===n.stepInto||t===n.stepOut}),t)},t.prototype.handleProtocolResponse=function(t){var e={id:t.id,result:{}},n=Li(t.method);return n&&n(this.container,t.params,(function(n,r){e=n?{id:t.id,error:{code:n,message:(null==r?void 0:r.message)||r||""}}:{id:t.id,result:r}})),e},t}(),Ki="https://hpmweb.alipay.com",Gi="wss://hpmweb.alipay.com",Hi=/\/\/# sourceMappingURL=(\S+)\s*$/,Wi=function(){function t(t){this.container=t,this.id2ScriptMap={},this.url2ScriptIdMap={}}return Object.defineProperty(t.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),t.prototype.getScript=function(t){return this.id2ScriptMap[t]},t.prototype.getScriptByUrl=function(t){var e=this.url2ScriptIdMap[t];if(e)return this.getScript(e)},t.prototype.getScriptByHash=function(t){var e=t.substring(4);if(e)return this.getScript(e)},t.prototype.addScript=function(t,e,n,r){var i="",o=e,s=e.match(Hi);s&&(i=s[1],o=e.substring(0,s.index)),this.id2ScriptMap[t]={scriptId:t,scriptHash:"hash".concat(t),source:o,ast:n,url:r||"",sourceMapURL:i},r&&(this.url2ScriptIdMap[r]=t),this.emitScriptParsedEvent(t)},t.prototype.emitAllScriptParsedEvents=function(){var t=this;Object.keys(this.id2ScriptMap).forEach((function(e){t.id2ScriptMap[e].url&&t.emitScriptParsedEvent(e)}))},t.prototype.emitScriptParsedEvent=function(t){var e=this.id2ScriptMap[t];e&&this.container.getProtocolConnection().send({method:r.scriptParsed,params:{endColumn:0,endLine:2,executionContextId:this.sessionState.executionContextId,hasSourceURL:!1,hash:e.scriptHash,isLiveEdit:!1,isModule:!1,length:0,scriptId:t,scriptLanguage:"JavaScript",sourceMapURL:e.sourceMapURL,startColumn:0,startLine:0,url:e.url||""}})},t}(),qi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Vi=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Qi=function(){function t(t,e){this.providerCtor=t,this._debuggerAttached=!1,this.executionContextId=1,this.executionContextName="app",e.executionContextId&&(this.executionContextId=e.executionContextId),e.executionContextName&&(this.executionContextName=e.executionContextName),e.channelId&&(this._channelId=e.channelId),e.channel&&(this.channel=e.channel)}return Object.defineProperty(t.prototype,"stateProvider",{get:function(){return this._stateProvider||(this._stateProvider=new this.providerCtor),this._stateProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"channelId",{get:function(){return this._channelId?"boat_".concat(this._channelId):""},enumerable:!1,configurable:!0}),t.prototype.resolveExternalStateOnStart=function(){return qi(this,void 0,void 0,(function(){return Vi(this,(function(t){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},t.prototype.resolveChannelId=function(){return qi(this,void 0,void 0,(function(){var t;return Vi(this,(function(e){switch(e.label){case 0:return this._channelId||(this._channelId=this.stateProvider.getChannelIdSync()),this._channelId||!this.stateProvider.getChannelId?[3,2]:(t=this,[4,this.stateProvider.getChannelId()]);case 1:t._channelId=e.sent(),e.label=2;case 2:return[2,this.channelId]}}))}))},t.prototype.resolveChannel=function(){return qi(this,void 0,void 0,(function(){var t;return Vi(this,(function(e){switch(e.label){case 0:return this.channel||(this.channel=this.stateProvider.getChannelSync()),this.channel||!this.stateProvider.getChannel?[3,2]:(t=this,[4,this.stateProvider.getChannel()]);case 1:t.channel=e.sent(),e.label=2;case 2:return[2,this.channel]}}))}))},Object.defineProperty(t.prototype,"debuggerAttached",{get:function(){return this._debuggerAttached},set:function(t){this._debuggerAttached=t},enumerable:!1,configurable:!0}),t}(),Yi={},Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.compareVersion=Ji.getAriverVersion=Ji.isXRiver=Ji.getLanguageFromUA=Ji.isAndroid=Ji.getPlatformType=Ji.getUserAgent=void 0;var Xi=/iPhone|iPad/i;function $i(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}var Zi;Ji.getUserAgent=$i;function to(){if(Zi)return Zi;if("undefined"!=typeof navigator){var t=$i();Zi=t.indexOf("Android")>-1?2:t.match(Xi)?1:0}else Zi="undefined"!=typeof WXEnvironment?"iOS"===WXEnvironment.platform?1:2:1;return Zi}Ji.getPlatformType=to;Ji.isAndroid=function(){return 2===to()};Ji.getLanguageFromUA=function(){var t=$i();if(!t)return"";var e=t.match(/Language\/([\w-]+)/);return e?e[1]:""},Ji.isXRiver=function(){return $i().indexOf("XRiver")>-1};Ji.getAriverVersion=function(t){var e=t.match(/Ariver\/(\d+\.\d+\.\d+)/);if(e)return e[1]};function eo(t,e){for(var n=[],r=0,i=t.split(e);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}Ji.compareVersion=function(t,e){if(t&&e){for(var n=eo(t,"."),r=eo(e,"."),i=0,o=0,s=void 0,a=void 0;o<n.length;o++){if((s=r[o]||0)>(a=n[o]||0)){i=-1;break}if(s<a){i=1;break}}return i}return 0},Object.defineProperty(Yi,"__esModule",{value:!0});var no=Yi.I18NFormatter=void 0,ro=Ji,io={remoteDebug:"真机调试",scriptPaused:"断点命中",performanceHint:"真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览",consoleContentTooLarge:"打印的内容过长,单条消息内容大小限制为 20MB",panelStatusPreparing:"等待调试器连接",panelStatusConnected:"真机调试已连接",panelStatusDisconnected:"真机调试已断开",errorExit:"本次真机调试已结束,请重新生成调试版本",exit:"退出"},oo={remoteDebug:"Remote Debug",scriptPaused:"Paused",performanceHint:"There is a deviation between the performance of a mini program running in remote-debug mode on a real device and its actual performance. If you need to observe performance, please use the Preview.",consoleContentTooLarge:"The log is too long. The size limit for a single log is 20MB",panelStatusPreparing:"Preparing",panelStatusConnected:"Connected",panelStatusDisconnected:"Disconnected",errorExit:"Debug interrupted. Scan debug QR-Code to restart debugging.",exit:"Exit"};function so(t){switch(t){case"zhCN":case"zh-SG":case"zh-HK":case"zh-TW":case"zh-Hans":case"zh-CN":return"zhCN";default:return"enUS"}}var ao=function(){function t(t){var e={zhCN:io,enUS:oo};this.i18nMessages=e[so(t)],this.prefix=this.format("remoteDebug")}return t.getLocaleFromNavigator=function(){if("undefined"!=typeof navigator){if(navigator.language)return so(navigator.language);var t=(0,ro.getUserAgent)();if(t.includes("Language")){var e=t.match(/Language\/([\w-]+)/);if(e)return so(e[1])}}return so("enUS")},t.create=function(){return new t(t.getLocaleFromNavigator())},t.prototype.format=function(t,e){var n=this.i18nMessages[t];return"string"==typeof n?n:"function"==typeof n?n(e):"string"==typeof e?e:t},t.prototype.formatWithPrefix=function(t){return"[".concat(this.prefix,"] ").concat(this.format(t))},t}();no=Yi.I18NFormatter=ao;var uo=function(){function t(t){this.userConfig=t,this.i18n=no.create()}return t.prototype.getUserConfig=function(){return this.userConfig},t.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new Ci),this.remoteObjectParser},t.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new Qi(this.stateProviderImpl,this.userConfig)),this.sessionState},t.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new Wi(this)),this.scriptManager},t.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new Ui(this)),this.breakpointManager},t.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new Ri(this)),this.protocolConnection},t.prototype.getConsole=function(){return this._consoleImpl||(this._consoleImpl=new ti(this)),this._consoleImpl},t.prototype.setHttpClientImpl=function(t){this.httpClientImpl=t},t.prototype.getHttpClient=function(){return this.httpClientInstance||(this.httpClientInstance=new this.httpClientImpl),this.httpClientInstance},t.prototype.setWebSocketClientImpl=function(t){this.websocketClientImpl=t},t.prototype.getWebSocketClientImpl=function(){return this.websocketClientImpl},t.prototype.setPausedCoverViewImpl=function(t){this.pausedCoverViewImpl=t},t.prototype.getPausedCoverView=function(){return this.pausedCoverViewInstance||(this.pausedCoverViewInstance=new this.pausedCoverViewImpl,this.pausedCoverViewInstance.setPausedMessage(this.i18n.format("scriptPaused"))),this.pausedCoverViewInstance},t.prototype.setEngineInstance=function(t){this.engine=t},t.prototype.getEngine=function(){return this.engine},t.prototype.setStateProviderImpl=function(t){this.stateProviderImpl=t},Object.defineProperty(t.prototype,"server4Http",{get:function(){var t=this.getSessionState().channel;return t?t.startsWith("wss://")?t.replace("wss://","https://"):t.replace("ws://","http://"):Ki},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server4WebSocket",{get:function(){var t=this.getSessionState().channel;return t||Gi},enumerable:!1,configurable:!0}),t.prototype.warn=function(t){var e=this.engine;e&&e.evaluate('console.warn("'.concat(t,'")'),void 0,{disableBreaks:!0})},t.prototype.warnPerformance=function(){this.warn(this.i18n.formatWithPrefix("performanceHint"))},t}(),co=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lo=function(t){function e(e){var n=t.call(this)||this;return n._timeout=setTimeout((function(){return n.open()}),e),n}return co(e,t),e.prototype.open=function(){this._timeout&&clearTimeout(this._timeout),this._timeout=null,t.prototype.open.call(this)},e}(function(){function t(){var t=this;this._isOpen=!1,this._promise=new Promise((function(e){t._completePromise=e}))}return t.prototype.isOpen=function(){return this._isOpen},t.prototype.open=function(){this._isOpen=!0,this._completePromise()},t.prototype.wait=function(){return this._promise},t}());function ho(t,e,n,r){if(void 0===r&&(r=!1),t||e||n)return po.bind(null,t,e,n,r)}function po(t,e,n,r,i){var o=!1;r?o=!!(i=function(t){"string"==typeof t.error&&(t.error=parseInt(t.error,10));0===t.error&&(delete t.error,delete t.errorMessage);return t}(i)).error:"object"==typeof i&&(o="error"in i||"errorMessage"in i),o&&"function"==typeof e&&e(i),o||"function"!=typeof t||t(i),"function"==typeof n&&n(i)}function fo(t,e){if("undefined"!=typeof AlipayJSBridge){var n=e.success,r=e.fail,i=e.complete,o=fi(e,["success","fail","complete"]),s=ho(n,r,i,!0);AlipayJSBridge.call(t,o,(function(t){s&&s(t)}))}else"undefined"!=typeof my?my.call(t,e):console.warn("[ERROR] error when call ".concat(t,": AlipayJSBridge not found"))}function mo(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"==typeof getApp}var vo="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();var Do,yo=/iPhone|iPad/i;function go(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function bo(){if(Do)return Do;if("undefined"!=typeof navigator){var t=go();Do=t.indexOf("Android")>-1?2:t.match(yo)?1:0}else Do="undefined"!=typeof WXEnvironment?"iOS"===WXEnvironment.platform?1:2:1;return Do}var xo=function(){function t(t,e,n){this.type=String(t),this.engineType=n,this.data=e,this._preventDefault=!1}return t.prototype.preventDefault=function(){this._preventDefault=!0},t.prototype.isDefaultPrevented=function(){return!!this._preventDefault},t}();var Eo=function(){function t(t,e){this.name=t,this.target=e,this.callbackHandlers=new Map,this.callbackBeforeDispatchInterceptor=new Map,this._callbackGlobalMap=new Map,e&&(e.addEventListener&&(this.baseAddEventListener=e.addEventListener.bind(e)),e.removeEventListener&&(this.baseRemoveEventListener=e.removeEventListener.bind(e)))}return t.prototype.tryInitEventListenerOnWindow=function(t){var e,n,r=this;if(!(this.callbackHandlers.has(t)&&(null===(e=this.callbackHandlers.get(t))||void 0===e?void 0:e.length)>0&&this._callbackGlobalMap.has(t))){this.callbackHandlers.set(t,[]);var i=function(t){r.dispatchEvent(t)};this._callbackGlobalMap.set(t,i),null===(n=this.baseAddEventListener)||void 0===n||n.call(this,t,i)}},t.prototype.tryRemoveEventListenerInTarget=function(t){var e,n;if(!this.callbackHandlers.has(t)||0===(null===(e=this.callbackHandlers.get(t))||void 0===e?void 0:e.length)){var r=this._callbackGlobalMap.get(t);r&&(null===(n=this.baseRemoveEventListener)||void 0===n||n.call(this,t,r),this._callbackGlobalMap.delete(t))}},t.prototype.addEventListener=function(t,e){this.callbackHandlers.has(t)||this.tryInitEventListenerOnWindow(t);var n=this.callbackHandlers.get(t);null==n||n.push({fn:e})},t.prototype.removeEventListener=function(t,e){var n=this.callbackHandlers.get(t);n.forEach((function(t,r){t.fn===e&&n.splice(r,1)})),this.tryRemoveEventListenerInTarget(t)},t.prototype.dispatchEvent=function(t){var e,n=null!==(e=t.type)&&void 0!==e?e:t.name;if(this.callbackHandlers&&this.callbackHandlers.has(n)){var r=this.callbackHandlers.get(n),i=this.callbackBeforeDispatchInterceptor.get(n);if(i&&i.length>0)for(var o=0;o<i.length;o++){if(!(0,i[o])(t))return}for(var s=0,a=r;s<a.length;s++){if(a[s].fn.call(null,t),t.defaultPrevented)break}}},t.prototype.addInterceptor=function(t,e){this.callbackBeforeDispatchInterceptor.has(t)||this.callbackBeforeDispatchInterceptor.set(t,[]);var n=this.callbackBeforeDispatchInterceptor.get(t);null==n||n.push(e)},t.prototype.patch=function(){var t=this;this.disposePatch&&this.disposePatch();var e=this.target;e&&(e.addEventListener&&(e.addEventListener=this.addEventListener.bind(this)),e.removeEventListener&&(e.removeEventListener=this.removeEventListener.bind(this))),(this.baseAddEventListener||this.baseRemoveEventListener)&&(this.disposePatch=function(){t.disposePatch=void 0,e&&(t.baseAddEventListener&&(e.addEventListener=t.baseAddEventListener),t.baseRemoveEventListener&&(e.removeEventListener=t.baseRemoveEventListener))})},t}(),Co=function(){function t(){var t=this;this.eventMap={},this.queue=[],this.enableQueue=!1,this.globalEventListener=new Eo("workerGlobal",vo),this.documentEventListeners=new Eo("document",vo&&vo.document),this.globalEventListener.addEventListener("message",(function(e){t.enMessageQueue(e)}));this.pushEventListener.addEventListener("push",(function(e){var n=e.data;if(n&&(n.func||n.beforeunload)){var r=n.func||"beforeunload",i=function(t,e){var n,r,i=e.param,o=e.viewId+"";i&&"object"==typeof i&&2===bo()?(n=i.data,i.type,r=fi(i,["data","type"])):n=i,n?n.instanceId=o:n={instanceId:o};var s=new xo(t,n,1);if(r)try{Object.assign(s,r)}catch(t){}return s}(r,n),o=t.eventMap[r];o&&o.forEach((function(t){t(i)}))}t.enPushQueue(e)}))}return Object.defineProperty(t.prototype,"pushEventListener",{get:function(){return vo&&vo.document?this.documentEventListeners:this.globalEventListener},enumerable:!1,configurable:!0}),t.prototype.patch=function(){this.globalEventListener.patch(),this.documentEventListeners.patch()},t.prototype.enPushQueue=function(t){this.enableQueue&&(F("queued push event",t),this.queue.push({type:"push",e:t}))},t.prototype.enMessageQueue=function(t){this.enableQueue&&(F("queued message event",t),this.queue.push({type:"message",e:t}))},t.prototype.startQueueEvent=function(){F("startQueueEvent"),this.enableQueue=!0},t.prototype.replayQueueEvent=function(){for(F("replayQueueEvent",this.queue.length),this.enableQueue=!1;this.queue.length;){var t=this.queue.shift();"push"===t.type?this.pushEventListener.dispatchEvent(t.e):this.globalEventListener.dispatchEvent(t.e)}},t.prototype.on=function(t,e){var n=this;return this.eventMap[t]||(this.eventMap[t]=[]),this.eventMap[t].push(e),function(){n.off(t,e)}},t.prototype.off=function(t,e){this.eventMap[t]&&(this.eventMap[t]=this.eventMap[t].filter((function(t){return t!==e})))},t.prototype.dispose=function(){var t;null===(t=this.eventDispose)||void 0===t||t.dispose()},t}(),wo=new Co;function Ao(){return wo}var ko,Fo=Ao(),So=function(){function t(e){this.map={},this.id="".concat(e,"_").concat(Math.random().toString(36).substring(2,8),"_").concat(String(t.taskId++))}return t.prototype._listen=function(t,e){var n=this;Fo.on("onSocketTask"+t,(function(t){t.data&&t.data.socketTaskID===n.id&&e(t)}))},t.prototype.getParam=function(t){return pi({socketTaskID:this.id},t)},t.prototype._doAction=function(t,e){fo(t,this.getParam(e))},t.prototype.send=function(t){this._doAction("sendSocketMessage",t)},t.prototype.close=function(t){this._doAction("closeSocket",t)},t.prototype.onOpen=function(t){this._listen("Open",t)},t.prototype.onMessage=function(t){this._listen("Message",(function(e){t(e)}))},t.prototype.onError=function(t){this._listen("Error",(function(e){t(e)}))},t.prototype.onClose=function(t){this._listen("Close",t)},t.taskId=1,t}();!function(t){t.DebugPanelClick="tinyRemoteDebugPanelButtonClick",t.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick"}(ko||(ko={}));var Bo=function(){function t(t){var e,n=this;if(this.options=t,this.barrier=new lo(1e4),this.container=new uo(t),t.provider){var r=t.provider,i=r.httpClient,o=r.websocketClient,s=r.pausedCoverView,a=r.stateProvider;i?this.container.setHttpClientImpl(i):Po("no provider.httpClient"),o?this.container.setWebSocketClientImpl(o):Po("no provider.websocketClient"),s?(this.container.setPausedCoverViewImpl(s),this.options.eventManager&&this.options.eventManager.on(ko.DebugMaskButtonClick,(function(){n.container.getPausedCoverView().hide()}))):Po("no provider.pausedCoverView"),a?this.container.setStateProviderImpl(a):Po("no provider.stateProvider")}else Po("no provider option");this.breakpointManager=this.container.getBreakpointManager(),!1===t.console||t.consoleIsolation||(e=this.container,ri.forEach((function(t){var n=m(console,t);n&&n.configurable?(n.value=ii(t,e),f(console,t,n)):f(console,t,{value:ii(t,e),configurable:!0,enumerable:!0,writable:!0})}))),this.container.getSessionState().resolveExternalStateOnStart()}return Object.defineProperty(t.prototype,"whenDebuggerAttached",{get:function(){return this.barrier.wait()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDebuggerAttached",{get:function(){return this.barrier.isOpen()},enumerable:!1,configurable:!0}),t.prototype.stopAtEntry=function(){Si(this.container,0,(function(){})),Ai(this.container,0,(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0},t.prototype.startQueueEvent=function(){var t;null===(t=this.options.eventManager)||void 0===t||t.startQueueEvent()},t.prototype.replayQueueEvent=function(){var t;null===(t=this.options.eventManager)||void 0===t||t.replayQueueEvent()},t.prototype.warnPerformance=function(){this.container.warnPerformance()},t.prototype.setEngine=function(t){this.container.setEngineInstance(t),!1!==this.options.console&&this.options.consoleIsolation&&t.import({console:oi(this.container)}),function(t,e){var n=t.getHostGlobalObject(),r=n.onunhandledrejection,i=function(t){Ur(r)&&r.call(this,t),t&&t.reason&&e.throwException(t.reason,2)},o="onunhandledrejection",s=m(n,o);s&&!s.configurable||f(n,o,{get:function(){return i},set:function(t){Ur(t)&&(r=t,s&&s.set&&s.set.call(this,t))},enumerable:!0,configurable:!0})}(t,this)},t.prototype.connect=function(){var t=this;try{this.container.getProtocolConnection().open(),this.container.getProtocolConnection().connectionState.onDebuggerAttached((function(){F("Debugger attached."),t.barrier.open()}))}catch(t){B("[boatman] create connection error",t)}},t.prototype.disconnect=function(){this.container.getProtocolConnection().close()},t.prototype.evaluateScript=function(t,e,n,r){this.container.getScriptManager().addScript(t,e,n,r)},t.prototype.hitBreakpoint=function(t,e){if(this.container.getEngine().disableBreaks)return!1;var n=this.breakpointManager;if(!n.isActive)return!1;var r=e.type;if(3===r)return this.pauseOnNode(t,e),!0;var i=O(e,"__breakpointzxfg");if(i){var o=n.get(i);if(o){if(zr("hit breakpoint",e.type,e),!o.condition)return n.pauseOnBreakpoint(o),!0;try{var s=this.container.getEngine().getRuntimeStatus().callFrames;if(n.evaluateWithoutBreakpoint(o.condition,s[s.length-1].functionScope))return n.pauseOnBreakpoint(o),!0}catch(t){}}}if(0!==n.stepAction&&Kr(e)){switch(n.stepAction){case 3:return n.stepAction=0,this.pauseOnNode(t,e),!0;case 2:if(this.container.getEngine().getRuntimeStatus().callFrames.length<=n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(t,e),!0;break;case 1:if(this.container.getEngine().getRuntimeStatus().callFrames.length<n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(t,e),!0}return!1}return!(!n.pauseOnNextStatement||67===r)&&(n.pauseOnNextStatement=!1,this.pauseOnNode(t,e),!0)},t.prototype.shouldPauseOnException=function(t,e,n,r){if(this.container.getEngine().disableBreaks)return!1;var i=this.breakpointManager;if(i.isActive&&!O(e,"__pausedvxzg")){var o=i.pauseOnExceptionsState;2===o?(i.pauseOnException(t,e,n,r),T(e,"__pausedvxzg",1)):1===o&&r&&(i.pauseOnException(t,e,n,!0),T(e,"__pausedvxzg",1))}},t.prototype.pauseOnNode=function(t,e){var n=this.breakpointManager;n.isActive&&n.pauseOnNode(t,e)},t.prototype.throwException=function(t,e){var n=O(t,"__rewrittenzxcd"),r="Uncaught";2===e&&(r+=" (in promise)"),this.container.getProtocolConnection().sendConsoleMessage({method:o.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(t),exceptionId:n?n.id:100,lineNumber:0,text:r},timestamp:Wr()}})},t}();function Po(t){throw new Error("Failed to construct 'BoatmanInspector': ".concat(t))}var Io={};!function(t){function e(){return t.workerGlobal.__appxStartupParams}function n(t){return!0===t||"yes"===t||"YES"===t}Object.defineProperty(t,"__esModule",{value:!0}),t.isTruthyParamValue=t.isInRemoteDebug=t.isAppxNg=t.getHostStartupParams=t.workerGlobal=void 0,t.workerGlobal="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof Mr&&Mr||Function("return this")(),t.getHostStartupParams=e,t.isAppxNg=function(){var t=e();return!!t&&n(t.appxRouteFramework)},t.isInRemoteDebug=function(){var t=e();if(t){if(!t.channelId)return!1;if("__ignore__"===t.channelId)return!1}return!0},t.isTruthyParamValue=n}(Io);var To,Oo,No={},_o=Rr(gi),jo={},Mo={},Ro={};function Lo(){return To||(To=1,function(t){function e(t,e,r,i,o){var s=!1;i?s=!!(o=n(o)).error:"object"==typeof o&&(s="error"in o||"errorMessage"in o),s&&"function"==typeof e&&e(o),s||"function"!=typeof t||t(o),"function"==typeof r&&r(o)}function n(t){return"string"==typeof t.error&&(t.error=parseInt(t.error,10)),0===t.error&&(delete t.error,delete t.errorMessage),t}Object.defineProperty(t,"__esModule",{value:!0}),t.deleteTimeConsumingDataKey=t.normalizeErrorCode=t.extractBridgeCallback=t.kTimeConsumingDataKey=void 0,t.kTimeConsumingDataKey="__ariver_callstatdata",t.extractBridgeCallback=function(t,n,r,i){if(void 0===i&&(i=!1),t||n||r)return e.bind(null,t,n,r,i)},t.normalizeErrorCode=n,t.deleteTimeConsumingDataKey=function(e){e[t.kTimeConsumingDataKey]&&delete e[t.kTimeConsumingDataKey]}}(Ro)),Ro}function zo(){if(Oo)return Mo;Oo=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.isInPluginContext=Mo.call=void 0;var t=_o,e=Lo();return Mo.call=function(n,r){if("undefined"!=typeof AlipayJSBridge){var i=r.success,o=r.fail,s=r.complete,a=t.__rest(r,["success","fail","complete"]),u=(0,e.extractBridgeCallback)(i,o,s,!0);AlipayJSBridge.call(n,a,(function(t){u&&u(t)}))}else"undefined"!=typeof my?my.call(n,r):console.warn("[ERROR] error when call ".concat(n,": AlipayJSBridge not found"))},Mo.isInPluginContext=function(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"==typeof getApp},Mo}var Uo={},Ko=Rr(N),Go={};Object.defineProperty(Go,"__esModule",{value:!0});Go.createEvent4WebEngine=Go.Event=void 0;var Ho=_o,Wo=Ji,qo=function(){function t(t,e,n){this.type=String(t),this.engineType=n,this.data=e,this._preventDefault=!1}return t.prototype.preventDefault=function(){this._preventDefault=!0},t.prototype.isDefaultPrevented=function(){return!!this._preventDefault},t}();Go.Event=qo;Go.createEvent4WebEngine=function(t,e){var n,r,i=e.param,o=e.viewId+"";i&&"object"==typeof i&&2===(0,Wo.getPlatformType)()?(n=i.data,i.type,r=Ho.__rest(i,["data","type"])):n=i,n?n.instanceId=o:n={instanceId:o};var s=new qo(t,n,1);if(r)try{Object.assign(s,r)}catch(t){}return s};var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.EventListener=void 0;var Qo=function(){function t(t,e){this.name=t,this.target=e,this.callbackHandlers=new Map,this.callbackBeforeDispatchInterceptor=new Map,this._callbackGlobalMap=new Map,e&&(e.addEventListener&&(this.baseAddEventListener=e.addEventListener.bind(e)),e.removeEventListener&&(this.baseRemoveEventListener=e.removeEventListener.bind(e)))}return t.prototype.tryInitEventListenerOnWindow=function(t){var e,n,r=this;if(!(this.callbackHandlers.has(t)&&(null===(e=this.callbackHandlers.get(t))||void 0===e?void 0:e.length)>0&&this._callbackGlobalMap.has(t))){this.callbackHandlers.set(t,[]);var i=function(t){r.dispatchEvent(t)};this._callbackGlobalMap.set(t,i),null===(n=this.baseAddEventListener)||void 0===n||n.call(this,t,i)}},t.prototype.tryRemoveEventListenerInTarget=function(t){var e,n;if(!this.callbackHandlers.has(t)||0===(null===(e=this.callbackHandlers.get(t))||void 0===e?void 0:e.length)){var r=this._callbackGlobalMap.get(t);r&&(null===(n=this.baseRemoveEventListener)||void 0===n||n.call(this,t,r),this._callbackGlobalMap.delete(t))}},t.prototype.addEventListener=function(t,e){this.callbackHandlers.has(t)||this.tryInitEventListenerOnWindow(t);var n=this.callbackHandlers.get(t);null==n||n.push({fn:e})},t.prototype.removeEventListener=function(t,e){var n=this.callbackHandlers.get(t);n.forEach((function(t,r){t.fn===e&&n.splice(r,1)})),this.tryRemoveEventListenerInTarget(t)},t.prototype.dispatchEvent=function(t){var e,n=null!==(e=t.type)&&void 0!==e?e:t.name;if(this.callbackHandlers&&this.callbackHandlers.has(n)){var r=this.callbackHandlers.get(n),i=this.callbackBeforeDispatchInterceptor.get(n);if(i&&i.length>0)for(var o=0;o<i.length;o++){if(!(0,i[o])(t))return}for(var s=0,a=r;s<a.length;s++){if(a[s].fn.call(null,t),t.defaultPrevented)break}}},t.prototype.addInterceptor=function(t,e){this.callbackBeforeDispatchInterceptor.has(t)||this.callbackBeforeDispatchInterceptor.set(t,[]);var n=this.callbackBeforeDispatchInterceptor.get(t);null==n||n.push(e)},t.prototype.patch=function(){var t=this;this.disposePatch&&this.disposePatch();var e=this.target;e&&(e.addEventListener&&(e.addEventListener=this.addEventListener.bind(this)),e.removeEventListener&&(e.removeEventListener=this.removeEventListener.bind(this))),(this.baseAddEventListener||this.baseRemoveEventListener)&&(this.disposePatch=function(){t.disposePatch=void 0,e&&(t.baseAddEventListener&&(e.addEventListener=t.baseAddEventListener),t.baseRemoveEventListener&&(e.removeEventListener=t.baseRemoveEventListener))})},t}();Vo.EventListener=Qo,Object.defineProperty(Uo,"__esModule",{value:!0});Uo.getEventManager=void 0;var Yo=Ko,Jo=Io,Xo=Go,$o=Vo,Zo=function(){function t(){var t=this;this.eventMap={},this.queue=[],this.enableQueue=!1,this.globalEventListener=new $o.EventListener("workerGlobal",Jo.workerGlobal),this.documentEventListeners=new $o.EventListener("document",Jo.workerGlobal&&Jo.workerGlobal.document),this.globalEventListener.addEventListener("message",(function(e){t.enMessageQueue(e)}));this.pushEventListener.addEventListener("push",(function(e){var n=e.data;if(n&&(n.func||n.beforeunload)){var r=n.func||"beforeunload",i=(0,Xo.createEvent4WebEngine)(r,n),o=t.eventMap[r];o&&o.forEach((function(t){t(i)}))}t.enPushQueue(e)}))}return Object.defineProperty(t.prototype,"pushEventListener",{get:function(){return Jo.workerGlobal&&Jo.workerGlobal.document?this.documentEventListeners:this.globalEventListener},enumerable:!1,configurable:!0}),t.prototype.patch=function(){this.globalEventListener.patch(),this.documentEventListeners.patch()},t.prototype.enPushQueue=function(t){this.enableQueue&&(Yo.HostAPI.log("queued push event",t),this.queue.push({type:"push",e:t}))},t.prototype.enMessageQueue=function(t){this.enableQueue&&(Yo.HostAPI.log("queued message event",t),this.queue.push({type:"message",e:t}))},t.prototype.startQueueEvent=function(){Yo.HostAPI.log("startQueueEvent"),this.enableQueue=!0},t.prototype.replayQueueEvent=function(){for(Yo.HostAPI.log("replayQueueEvent",this.queue.length),this.enableQueue=!1;this.queue.length;){var t=this.queue.shift();"push"===t.type?this.pushEventListener.dispatchEvent(t.e):this.globalEventListener.dispatchEvent(t.e)}},t.prototype.on=function(t,e){var n=this;return this.eventMap[t]||(this.eventMap[t]=[]),this.eventMap[t].push(e),function(){n.off(t,e)}},t.prototype.off=function(t,e){this.eventMap[t]&&(this.eventMap[t]=this.eventMap[t].filter((function(t){return t!==e})))},t.prototype.dispose=function(){var t;null===(t=this.eventDispose)||void 0===t||t.dispose()},t}(),ts=new Zo;Uo.getEventManager=function(){return ts},Object.defineProperty(jo,"__esModule",{value:!0});jo.connectSocket=void 0;var es=_o,ns=zo(),rs=(0,Uo.getEventManager)(),is=function(){function t(e){this.map={},this.id="".concat(e,"_").concat(Math.random().toString(36).substring(2,8),"_").concat(String(t.taskId++))}return t.prototype._listen=function(t,e){var n=this;rs.on("onSocketTask"+t,(function(t){t.data&&t.data.socketTaskID===n.id&&e(t)}))},t.prototype.getParam=function(t){return es.__assign({socketTaskID:this.id},t)},t.prototype._doAction=function(t,e){(0,ns.call)(t,this.getParam(e))},t.prototype.send=function(t){this._doAction("sendSocketMessage",t)},t.prototype.close=function(t){this._doAction("closeSocket",t)},t.prototype.onOpen=function(t){this._listen("Open",t)},t.prototype.onMessage=function(t){this._listen("Message",(function(e){t(e)}))},t.prototype.onError=function(t){this._listen("Error",(function(e){t(e)}))},t.prototype.onClose=function(t){this._listen("Close",t)},t.taskId=1,t}();jo.connectSocket=function(t){var e;if((0,ns.isInPluginContext)())return my.connectSocket(t);var n=null!==(e=t.__taskIdPrefix)&&void 0!==e?e:"remote_debug";delete t.__taskIdPrefix;var r=new is(n);return(0,ns.call)("connectSocket",r.getParam(t)),r};var os,ss={};var as,us={};var cs,ls={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.connectSocket=void 0;var e=_o,n=jo;Object.defineProperty(t,"connectSocket",{enumerable:!0,get:function(){return n.connectSocket}}),e.__exportStar(zo(),t),e.__exportStar((os||(os=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EWorkerAppEvent=void 0,function(t){t.DebugPanelClick="tinyRemoteDebugPanelButtonClick",t.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick"}(t.EWorkerAppEvent||(t.EWorkerAppEvent={}))}(ss)),ss),t),e.__exportStar(function(){if(as)return us;as=1,Object.defineProperty(us,"__esModule",{value:!0}),us.alert=void 0;var t=_o,e=zo();return us.alert=function(n){if((0,e.isInPluginContext)())return my.alert(n);(0,e.call)("alert",t.__assign({},n))},us}(),t),e.__exportStar(function(){if(cs)return ls;cs=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.toast=void 0;var t=_o,e=zo();return ls.toast=function(n){if((0,e.isInPluginContext)())return my.showToast(n);(0,e.call)("toast",t.__assign({},n))},ls}(),t)}(No);var hs,ps=self,fs=ps.importScripts,ds=ps.AlipayJSBridge,ms=3e3;function vs(t,e){var n,r=function(t,e,n){var r="_sw_jsonp_".concat(++ms);ps[r]=function(t){ps[r]=null,n(t)};var i={action:t,callback:r,data:e};return JSON.stringify(i)}(t,e,(function(t){n=t})),i=function(t){var e=encodeURIComponent(t);return"https://alipay.kylinbridge/?data=".concat(e)}(r);try{fs(i)}catch(t){}return"string"==typeof n?function(t){try{return JSON.parse(t)}catch(t){}}(n):n}"object"==typeof ds&&(hs={call:function(t,e,n){ds.call(t,e,n)},callSync:function(t,e){return ds.callSync?ds.callSync(t,e):vs(t,e)}});var Ds,ys,gs=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},bs=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},xs=!1,Es=[];var Cs,ws=new Promise((function(t){ys=t}));"object"==typeof my?(Ds=my,ys()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(Ds=AFAppX.bridge,ys()):(Cs=function(){Ds=AFAppX.bridge,ys()},"undefined"!=typeof AFAppX?Cs():(Es.push(Cs),xs||(xs=!0,ps.importScripts=function(t){fs(t),/af-appx\.worker\.min\.js$/.test(t)&&(Es.forEach((function(t){return t()})),Es=[])})));var As=!1;function ks(){return gs(this,void 0,void 0,(function(){return bs(this,(function(t){switch(t.label){case 0:return As?[3,2]:[4,ws];case 1:return t.sent(),[2,new Promise((function(t){var e=function(){Ds.call("getStartupParams"),As=!0,t()};try{e()}catch(t){setTimeout(e,600)}}))];case 2:return[2]}}))}))}var Fs=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},Ss=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Bs={callSync:function(t,e){return hs?hs.callSync(t,e):Ds?Ds.callSync(t,e):void 0},showRemoteDebugMask:function(t){return hs?hs.call("showRemoteDebugMask",t,(function(){})):Ds?Ds.call("showRemoteDebugMask",t):void 0},getStartupParams:function(){return Fs(this,void 0,void 0,(function(){return Ss(this,(function(t){switch(t.label){case 0:return[4,ks()];case 1:return t.sent(),[2,new Promise((function(t){Ds.call("getStartupParams",{success:function(e){t(e)}})}))]}}))}))},connectSocket:function(t){return function(t){var e;if(mo())return my.connectSocket(t);var n=null!==(e=t.__taskIdPrefix)&&void 0!==e?e:"remote_debug";delete t.__taskIdPrefix;var r=new So(n);return fo("connectSocket",r.getParam(t)),r}(t)},alert:function(t){!function(t){if(mo())return my.alert(t);fo("alert",pi({},t))}(t)}},Ps=1e3,Is=function(){function t(){}return t.prototype.syncRequest=function(t){var e=Bs.callSync("tyroRequest",{url:t.url,method:t.method||"GET",headers:t.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:Ps++,data:"string"==typeof t.body?t.body:JSON.stringify(t.body)});return e?e.error?{error:e.error,errorMessage:e.errorMessage}:{status:e.status,data:e.data}:{error:1,errorMessage:"unknown"}},t}(),Ts=function(){function t(){}return t.prototype.updateDebugPanel=function(t,n){var r="";switch(n){case e.Connecting:r=t.format("panelStatusPreparing");break;case e.Connected:r=t.format("panelStatusConnected");break;case e.Disconnected:r=t.format("panelStatusDisconnected")}No.call("showRemoteDebugPanel",{status:n,text:r,buttonTitle:t.format("exit")})},t}(),Os=function(){function t(t){this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.isSocketOpenedOnce=!1,this.useFromRemoteDebugFlag=!0,t&&(this.url=t),this.i18n=no.create(),this.panelView=new Ts,this.panelView.updateDebugPanel(this.i18n,e.Connecting)}return Object.defineProperty(t.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),t.prototype.getUrl=function(){return this.url},t.prototype.setUrl=function(t){this.url=t},t.prototype.open=function(){var t=this;setTimeout((function(){zr("call connection open"),t.socketTask=Bs.connectSocket({__taskIdPrefix:"remote_debug_bm",url:t.url,multiple:!0,fromRemoteDebug:t.useFromRemoteDebugFlag,fail:function(e){t.onSocketError(e)}}),t.socketTask.onOpen((function(){t.handleSocketOpen()})),t.socketTask.onError((function(e){t.onSocketError(e.data)})),t.socketTask.onClose((function(){t.opened=!1,t.onSocketClose()})),t.socketTask.onMessage((function(e){t.opened||t.handleSocketOpen(),t.onSocketMessage(e.data.data)}))}),1500)},t.prototype.sendSocketMessage=function(t){var e="string"==typeof t?t:JSON.stringify(t);e.length>2e7||(this.opened?this.socketTask.send({data:e,isBuffer:!1,fromRemoteDebug:this.useFromRemoteDebugFlag}):this.messageBeforeSocketOpen.push(e))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.setSocketMessageHandler=function(t){this.externalMessageHandler=t},t.prototype.onSocketMessage=function(t){this.externalMessageHandler&&this.externalMessageHandler(t),"CLIENT:JOIN"===t?this.panelView.updateDebugPanel(this.i18n,e.Connected):"CLIENT:LEAVE"===t&&this.onSocketClose()},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(t){if(console.error("connect boatman socket error",t),this.onSocketClose(),!this.isSocketOpenedOnce){var e=t?t.errorMessage||t.message:"closed";!function(t){if(mo())return my.showToast(t);fo("toast",pi({},t))}({content:this.i18n.format("errorExit")+", "+e,duration:2e3})}},t.prototype.onSocketClose=function(){this.handleDebugPanelDisconnected()},t.prototype.handleDebugPanelDisconnected=function(){this.panelView.updateDebugPanel(this.i18n,e.Disconnected),this.close()},t.prototype.handleSocketOpen=function(){var t=this;this.opened||(this.opened=!0,this.isSocketOpenedOnce=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.sendSocketMessage(e)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(),Ns=function(){function t(){this.pausedMessage="断点命中"}return t.prototype.setPausedMessage=function(t){this.pausedMessage=t},t.prototype.show=function(){Bs.showRemoteDebugMask({text:" ",buttonTitle:this.pausedMessage,hide:!1})},t.prototype.hide=function(){Bs.showRemoteDebugMask({hide:!0})},t}(),_s=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},js=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};function Ms(){return _s(this,void 0,void 0,(function(){return js(this,(function(t){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?[2,__appxStartupParams]:[2,Bs.getStartupParams()]}))}))}var Rs,Ls=function(){function t(){}return t.prototype.getChannelId=function(){return _s(this,void 0,void 0,(function(){return js(this,(function(t){switch(t.label){case 0:return[4,Ms()];case 1:return[2,t.sent().channelId]}}))}))},t.prototype.getChannelIdSync=function(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.channelId?__appxStartupParams.channelId:""},t.prototype.getChannel=function(){return _s(this,void 0,void 0,(function(){return js(this,(function(t){switch(t.label){case 0:return[4,Ms()];case 1:return[2,t.sent().channel]}}))}))},t.prototype.getChannelSync=function(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.channel?__appxStartupParams.channel:""},t}(),zs=0;Ao().patch(),t.boot=function(t,e,n){var r;void 0===n&&(n={});var i=Ao();if(zs++,!Rs){var o=new Bo({provider:{httpClient:Is,websocketClient:Os,stateProvider:Ls,pausedCoverView:Ns},eventManager:i,executionContextId:n.executionContextId,executionContextName:n.executionContextName});(Rs=new Or).setInspector(o),i.on(No.EWorkerAppEvent.DebugPanelClick,(function(){o.disconnect()}))}var s=n.waitingForDebuggerToAttach;Io.isAppxNg()||(F("[boatman] waitingForDebuggerToAttach is not supported in appx 1.0"),s=!1),s&&(Io.isInRemoteDebug()||(F("[boatman] user is not in remote debug mode, waitingForDebuggerToAttach is disabled"),s=!1)),Rs.run(t,e,{stopAtEntry:n.stopAtEntry,waitingForDebuggerToAttach:s}),1===zs&&(null===(r=Rs.inspector)||void 0===r||r.warnPerformance())},t.getEventManager=Ao}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).boatman={})}(this,(function(exports){var workerGlobal="object"==typeof self&&self||"object"==typeof window&&window||"object"==typeof global&&global||Function("return this")(),globalImportScripts=workerGlobal.importScripts,globalAlipayJSBridge=workerGlobal.AlipayJSBridge,globalAlipayJSBridgeCall=globalAlipayJSBridge&&globalAlipayJSBridge.call,evalFunc="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){},index$2=Object.freeze({__proto__:null}),EPanelStatus,Debugger,DebuggerEvent,Runtime,RuntimeEvent,Page,Target,TargetEvent;!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={})),function(e){e.enable="Debugger.enable",e.disable="Debugger.disable",e.evaluateOnCallFrame="Debugger.evaluateOnCallFrame",e.getPossibleBreakpoints="Debugger.getPossibleBreakpoints",e.pause="Debugger.pause",e.removeBreakpoint="Debugger.removeBreakpoint",e.resume="Debugger.resume",e.setBreakpointByUrl="Debugger.setBreakpointByUrl",e.setBreakpointsActive="Debugger.setBreakpointsActive",e.stepInto="Debugger.stepInto",e.stepOver="Debugger.stepOver",e.stepOut="Debugger.stepOut",e.getScriptSource="Debugger.getScriptSource",e.setPauseOnExceptions="Debugger.setPauseOnExceptions",e.setSkipAllPauses="Debugger.setSkipAllPauses"}(Debugger||(Debugger={})),function(e){e.paused="Debugger.paused",e.resumed="Debugger.resumed",e.scriptParsed="Debugger.scriptParsed"}(DebuggerEvent||(DebuggerEvent={})),function(e){e.enable="Runtime.enable",e.disable="Runtime.disable",e.evaluate="Runtime.evaluate",e.compileScript="Runtime.compileScript",e.getProperties="Runtime.getProperties",e.callFunctionOn="Runtime.callFunctionOn",e.releaseObjectGroup="Runtime.releaseObjectGroup",e.globalLexicalScopeNames="Runtime.globalLexicalScopeNames",e.runIfWaitingForDebugger="Runtime.runIfWaitingForDebugger"}(Runtime||(Runtime={})),function(e){e.executionContextCreated="Runtime.executionContextCreated",e.consoleAPICalled="Runtime.consoleAPICalled",e.exceptionThrown="Runtime.exceptionThrown"}(RuntimeEvent||(RuntimeEvent={})),function(e){e.enable="Page.enable",e.getResourceTree="Page.getResourceTree"}(Page||(Page={})),function(e){e.setAutoAttach="Target.setAutoAttach"}(Target||(Target={})),function(e){e.targetCreated="Target.targetCreated",e.targetDestroyed="Target.targetDestroyed",e.targetInfoChanged="Target.targetInfoChanged",e.attachedToTarget="Target.attachedToTarget"}(TargetEvent||(TargetEvent={}));var command=Object.freeze({__proto__:null,get Debugger(){return Debugger},get DebuggerEvent(){return DebuggerEvent},get Page(){return Page},get Runtime(){return Runtime},get RuntimeEvent(){return RuntimeEvent},get Target(){return Target},get TargetEvent(){return TargetEvent}}),EDevtoolProtocolErrorCode,EDevtoolProtocolTypePausedReason;!function(e){e[e.NormalError=-32e3]="NormalError"}(EDevtoolProtocolErrorCode||(EDevtoolProtocolErrorCode={})),function(e){e.Other="other",e.Exception="exception"}(EDevtoolProtocolTypePausedReason||(EDevtoolProtocolTypePausedReason={}));var defineProperty=Object.defineProperty.bind(Object),defineProperties=Object.defineProperties.bind(Object),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor.bind(Object),freeze=Object.freeze.bind(Object),objectKeys$1=Object.keys.bind(Object),__hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwnProperty$1(e,t){return __hasOwnProperty.call(e,t)}function __assign$1(e){for(var t=1;t<arguments.length;++t){var n=arguments[t];for(var r in n)hasOwnProperty$1(n,r)&&(e[r]=n[r])}return e}var assignObject=Object.assign.bind(Object)||__assign$1,getOwnPropertyNames=Object.getOwnPropertyNames.bind(Object),createObject=Object.create.bind(Object),__setPrototypeOf=Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);function setPrototypeOf(e,t){__setPrototypeOf?__setPrototypeOf(e,t):e.__proto__=t}var __getPrototypeOf=Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);function getPrototypeOf(e){return __getPrototypeOf?__getPrototypeOf(e):e.__proto__}var hasConsoleObject="object"==typeof console,log=hasConsoleObject&&console.log?console.log.bind(console):function(){},warn$1=hasConsoleObject&&console.warn?console.warn.bind(console):function(){},error$1=hasConsoleObject&&console.error?console.error.bind(console):function(){},isFunctionNameConfigurable=getOwnPropertyDescriptor(hasOwnProperty$1,"name").configurable,HostAPI=Object.freeze({__proto__:null,assignObject:assignObject,createObject:createObject,defineProperties:defineProperties,defineProperty:defineProperty,error:error$1,freeze:freeze,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyNames:getOwnPropertyNames,getPrototypeOf:getPrototypeOf,hasOwnProperty:hasOwnProperty$1,isFunctionNameConfigurable:isFunctionNameConfigurable,log:log,objectKeys:objectKeys$1,setPrototypeOf:setPrototypeOf,warn:warn$1});function setBoatmanSymbol(e,t,n){defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0})}function getBoatmanSymbol(e,t){return e[t]}var globalSettingVar="__BOAT_SETTING__";function noop$2(){}var DEBUG_TAG="[boatman]";function info(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];log.apply(HostAPI,[DEBUG_TAG].concat(e))}function warn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];warn$1.apply(HostAPI,[DEBUG_TAG].concat(e))}function error(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];error$1.apply(HostAPI,[DEBUG_TAG].concat(e))}var debug$1=noop$2,isAppXImportHooked$1=!1,appxLoadedCallbacks$1=[];function runAfterAppx(e){if(void 0!==workerGlobal.AFAppX)e();else if(appxLoadedCallbacks$1.push(e),!isAppXImportHooked$1){isAppXImportHooked$1=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[]}),1200)}}function runAfterAppXBridgeReady(e){if("undefined"==typeof AFAppX&&workerGlobal.AFAppX&&(AFAppX=workerGlobal.AFAppX),"undefined"==typeof $AppxFramework)e();else if(AFAppX.Plugin){var t=AFAppX.Plugin;AFAppX.Plugin=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];if("object"==typeof i&&i.run){var o=i.run;i.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(i,t)}}return t.apply(AFAppX,n)}}else if($AppxFramework.bootstrapInAppContextByProtocol){var n=$AppxFramework.bootstrapInAppContextByProtocol;$AppxFramework.bootstrapInAppContextByProtocol=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];if("object"==typeof i){var o=i.callback;if(o&&(i.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(this,t)}),i.pageInfo){var a=i.pageInfo.init;a&&(i.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function guardSingleMsgSize(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>2e7?void debug$1("abort send websocket message due to size:",t.length,t.slice(0,1e3)):t}function createWeakSet$1(){return"undefined"==typeof WeakSet?new(require("weakset")):new WeakSet}var getCircularReplacer$1=function(){var e=createWeakSet$1();return function(t,n){if("object"==typeof n&&null!==n)try{if(e.has(n))return;e.add(n)}catch(e){console.error(e)}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hasOwnProperty=Object.prototype.hasOwnProperty,objectAssign=Object.assign||function(e,t){for(var n,r=toObject(e),i=1;i<arguments.length;i++)for(var o in n=Object(arguments[i]))hasOwnProperty.call(n,o)&&(r[o]=n[o]);return r},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function __decorate(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function __param(e,t){return function(n,r){t(n,r,e)}}function __esDecorate(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,d=n.length-1;d>=0;d--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[d])("accessor"===u?{get:p.get,set:p.set}:p[c],f);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(p.get=s),(s=a(g.set))&&(p.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===u?i.unshift(s):p[c]=s)}l&&Object.defineProperty(l,r.name,p),h=!0}function __runInitializers(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function __propKey(e){return"symbol"==typeof e?e:"".concat(e)}function __setFunctionName(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var __createBinding=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function __exportStar(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function __asyncDelegator(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:__await(e[r](t)),done:!1}:i?i(t):t}:i}}function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var __setModuleDefault=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function __classPrivateFieldSet(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function __classPrivateFieldIn(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function __addDisposableResource(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var _SuppressedError="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function __disposeResources(e){function t(t){e.error=e.hasError?new _SuppressedError(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var tslib_es6={__extends:__extends,__assign:__assign,__rest:__rest,__decorate:__decorate,__param:__param,__metadata:__metadata,__awaiter:__awaiter,__generator:__generator,__createBinding:__createBinding,__exportStar:__exportStar,__values:__values,__read:__read,__spread:__spread,__spreadArrays:__spreadArrays,__spreadArray:__spreadArray,__await:__await,__asyncGenerator:__asyncGenerator,__asyncDelegator:__asyncDelegator,__asyncValues:__asyncValues,__makeTemplateObject:__makeTemplateObject,__importStar:__importStar,__importDefault:__importDefault,__classPrivateFieldGet:__classPrivateFieldGet,__classPrivateFieldSet:__classPrivateFieldSet,__classPrivateFieldIn:__classPrivateFieldIn,__addDisposableResource:__addDisposableResource,__disposeResources:__disposeResources},FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply),FunctionBind=Function.prototype.bind,FunctionConstructor=Function;function functionCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return FunctionApply(e,t,n)}function functionApply(e,t,n){return FunctionApply(e,t,n)}function functionBind(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return FunctionApply(FunctionBind,e,t)}function functionBindApply(e,t){return FunctionApply(FunctionBind,e,t)}function methodCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.call.apply(e,__spreadArray([t],n,!1))}function methodApply(e,t,n){return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.apply(t,n)}var stringifyJSON=JSON.stringify,parseJSON=JSON.parse,encodeUriComponent=encodeURIComponent,decodeUriComponent=decodeURIComponent,ObjectDefineProperty=Object.defineProperty,ObjectIsFrozen=Object.isFrozen,ObjectFreeze=Object.freeze,ObjectSetPrototypeOf=Object.setPrototypeOf;function strictUriEncode(e){return encodeUriComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[encode(t,e),"[",r,"]"].join(""):[encode(t,e),"[",encode(r,e),"]=",encode(n,e)].join("")};case"bracket":return function(t,n){return null===n?encode(t,e):[encode(t,e),"[]=",encode(n,e)].join("")};default:return function(t,n){return null===n?encode(t,e):[encode(t,e),"=",encode(n,e)].join("")}}}function parserForArrayFormat(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function decode(e,t){return t.decode?decodeUriComponent(e):e}function encode(e,t){return t.encode?t.strict?strictUriEncode(e):encodeUriComponent(e):e}function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function extract(e){return e.split("?")[1]||""}function parse$1(e,t){var n=parserForArrayFormat(t=objectAssign({decode:!0,arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var i=e.replace(/\+/g," ").split("="),o=i.shift(),a=i.length>0?i.join("="):void 0;a=void 0===a?null:decode(a,t),n(decode(o,t),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=keysSorter(n):e[t]=n,e}),Object.create(null))):r}function stringify$2(e,t){var n=encoderForArrayFormat(t=objectAssign({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return encode(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return encode(r,t)+"="+encode(i,t)})).filter((function(e){return e.length>0})).join("&"):""}var index$1=Object.freeze({__proto__:null,extract:extract,parse:parse$1,stringify:stringify$2});function throttle$1(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=functionApply(e,null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=functionApply(e,null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function objectKeys(e){return e&&"object"==typeof e?Object.keys(e):[]}function toString(e){return null!==e&&"object"==typeof e?"function"==typeof e.toString?String(e):"":String(e)}function escapeLogParamsWithNested(e,t){return e?"string"==typeof e?e:objectKeys(e).map((function(n){var r="".concat(n,"=");return t.indexOf(n)>=0?r+=stringifyJSON(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"):r+=toString(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),r})).join("^"):""}function escapeLogParams(e,t){return e?"string"==typeof e?e:objectKeys(e).filter((function(n){return void 0!==e[n]||!t})).map((function(t){var n="".concat(t,"=");return n+=toString(e[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~")})).join("^"):""}function getMapPolyfillConstructor(){var e=function(){function e(){this.keyList=[],this.valueList=[]}return e.prototype.set=function(e,t){var n=this.keyList,r=n.indexOf(e);if(-1===r){var i=n.push(e)-1;this.valueList[i]=t}else this.valueList[r]=t;return this},e.prototype.get=function(e){var t=this.keyList.indexOf(e);return-1===t?void 0:this.valueList[t]},e.prototype.forEach=function(e){for(var t=this.keyList.slice(),n=this.valueList.slice(),r=t.length,i=0;i<r;i++){var o=t[i];e(n[i],o,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return-1!==this.keyList.indexOf(e)},e.prototype.delete=function(e){var t=this.keyList.indexOf(e);return-1!==t&&(this.keyList.splice(t,1),this.valueList.splice(t,1),!0)},e.prototype.clear=function(){this.keyList=[],this.valueList=[]},e}();return e}function getSetPolyfillConstructor(){var e=function(){function e(){this.itemList=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),e.prototype.add=function(e){return-1===this.itemList.indexOf(e)&&this.itemList.push(e),this},e.prototype.delete=function(e){var t=this.itemList.indexOf(e);return-1!==t&&(this.itemList.splice(t,1),!0)},e.prototype.clear=function(){this.itemList=[]},e.prototype.has=function(e){return-1!==this.itemList.indexOf(e)},e.prototype.forEach=function(e){for(var t=0,n=this.itemList.slice();t<n.length;t++){var r=n[t];e(r,r,this)}},e}();return e}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,MapKlass,SetKlass,WeakMapKlass,WeakSetKlass;function getWeakSetPolyfillConstructor(){return function(){function e(){this.elementKey=weakElementKey+weakSetKey++}return e.prototype.has=function(e){return 1===e[this.elementKey]},e.prototype.add=function(e){return e[this.elementKey]=1,this},e.prototype.delete=function(e){e[this.elementKey]=null},e}()}function getWeakMapPolyfillConstructor(){var e=Object.prototype.hasOwnProperty,t=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,value:n,writable:!0}):e[t]=n};function n(e){return Object(e)===e}function r(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(t(this,"_id","_WeakMap"+"_"+o()+"."+o()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function i(t,r){if(!n(t)||!e.call(t,"_id"))throw new TypeError(r+" method called on incompatible receiver "+typeof t)}function o(){return Math.random().toString().substring(2)}return t(r.prototype,"delete",(function(e){if(i(this,"delete"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),t(r.prototype,"get",(function(e){if(i(this,"get"),n(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),t(r.prototype,"has",(function(e){if(i(this,"has"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),t(r.prototype,"set",(function(e,r){if(i(this,"set"),!n(e))throw new TypeError("Invalid value used as weak map key");var o=e[this._id];return o&&o[0]===e?(o[1]=r,this):(t(e,this._id,[e,r]),this)})),t(r,"_polyfill",!0),r}function getMapConstructorMayBePolyfill(){var e="undefined"!=typeof Map;MapKlass=e?Map:getMapPolyfillConstructor()}function createMap(){return MapKlass||getMapConstructorMayBePolyfill(),new MapKlass}function getSetConstructorPolyfill(){var e="undefined"!=typeof Set;SetKlass=e?Set:getSetPolyfillConstructor()}function createSet(){return SetKlass||getSetConstructorPolyfill(),new SetKlass}function getWeakMapConstructorMayBePolyfill$1(){var e="undefined"!=typeof WeakMap;WeakMapKlass=e?WeakMap:getWeakMapPolyfillConstructor()}function createWeakMap(){return WeakMapKlass||getWeakMapConstructorMayBePolyfill$1(),new WeakMapKlass}function getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}var StatefulLoadManager=function(){function e(){this.statusMap={}}return e.prototype.loadResource=function(e,t){var n=this.getKeyFromResource(e),r=this.getLoadStatus4ResourceByKey(n);return 3===r.status?t(void 0,r.res):1!==r.status?2===r.status?this.shouldRetry4Resource(e)?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):t(r.error):0===r.status?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):void 0:void(r.callbacks=__spreadArray(__spreadArray([],r.callbacks,!0),[t],!1))},e.prototype.loadResourceWithStatus=function(e){var t=this;this.loadResourceInternal(e,(function(n,r){var i=t.getKeyFromResource(e),o=t.getLoadStatus4ResourceByKey(i);if(1===o.status){n?t.setLoadStatus4ResourceByKey(i,{status:2,error:n}):t.setLoadStatus4ResourceByKey(i,{status:3,res:r});var a=o.callbacks;if(Array.isArray(a))for(var s=0,u=a;s<u.length;s++){(0,u[s])(n,r)}}}))},e.prototype.getLoadStatus4ResourceByKey=function(e){var t=this.statusMap;return t[e]||(t[e]={status:0}),t[e]},e.prototype.setLoadStatus4ResourceByKey=function(e,t){this.statusMap[e]=t},e}();function safeAdd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bitRotateLeft(e,t){return e<<t|e>>>32-t}function md5cmn(e,t,n,r,i,o){return safeAdd(bitRotateLeft(safeAdd(safeAdd(t,e),safeAdd(r,o)),i),n)}function md5ff(e,t,n,r,i,o,a){return md5cmn(t&n|~t&r,e,t,i,o,a)}function md5gg(e,t,n,r,i,o,a){return md5cmn(t&r|n&~r,e,t,i,o,a)}function md5hh(e,t,n,r,i,o,a){return md5cmn(t^n^r,e,t,i,o,a)}function md5ii(e,t,n,r,i,o,a){return md5cmn(n^(t|~r),e,t,i,o,a)}function binlMD5(e,t){var n,r,i,o,a;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,u=-271733879,c=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)r=s,i=u,o=c,a=l,s=md5ff(s,u,c,l,e[n],7,-680876936),l=md5ff(l,s,u,c,e[n+1],12,-389564586),c=md5ff(c,l,s,u,e[n+2],17,606105819),u=md5ff(u,c,l,s,e[n+3],22,-1044525330),s=md5ff(s,u,c,l,e[n+4],7,-176418897),l=md5ff(l,s,u,c,e[n+5],12,1200080426),c=md5ff(c,l,s,u,e[n+6],17,-1473231341),u=md5ff(u,c,l,s,e[n+7],22,-45705983),s=md5ff(s,u,c,l,e[n+8],7,1770035416),l=md5ff(l,s,u,c,e[n+9],12,-1958414417),c=md5ff(c,l,s,u,e[n+10],17,-42063),u=md5ff(u,c,l,s,e[n+11],22,-1990404162),s=md5ff(s,u,c,l,e[n+12],7,1804603682),l=md5ff(l,s,u,c,e[n+13],12,-40341101),c=md5ff(c,l,s,u,e[n+14],17,-1502002290),s=md5gg(s,u=md5ff(u,c,l,s,e[n+15],22,1236535329),c,l,e[n+1],5,-165796510),l=md5gg(l,s,u,c,e[n+6],9,-1069501632),c=md5gg(c,l,s,u,e[n+11],14,643717713),u=md5gg(u,c,l,s,e[n],20,-373897302),s=md5gg(s,u,c,l,e[n+5],5,-701558691),l=md5gg(l,s,u,c,e[n+10],9,38016083),c=md5gg(c,l,s,u,e[n+15],14,-660478335),u=md5gg(u,c,l,s,e[n+4],20,-405537848),s=md5gg(s,u,c,l,e[n+9],5,568446438),l=md5gg(l,s,u,c,e[n+14],9,-1019803690),c=md5gg(c,l,s,u,e[n+3],14,-187363961),u=md5gg(u,c,l,s,e[n+8],20,1163531501),s=md5gg(s,u,c,l,e[n+13],5,-1444681467),l=md5gg(l,s,u,c,e[n+2],9,-51403784),c=md5gg(c,l,s,u,e[n+7],14,1735328473),s=md5hh(s,u=md5gg(u,c,l,s,e[n+12],20,-1926607734),c,l,e[n+5],4,-378558),l=md5hh(l,s,u,c,e[n+8],11,-2022574463),c=md5hh(c,l,s,u,e[n+11],16,1839030562),u=md5hh(u,c,l,s,e[n+14],23,-35309556),s=md5hh(s,u,c,l,e[n+1],4,-1530992060),l=md5hh(l,s,u,c,e[n+4],11,1272893353),c=md5hh(c,l,s,u,e[n+7],16,-155497632),u=md5hh(u,c,l,s,e[n+10],23,-1094730640),s=md5hh(s,u,c,l,e[n+13],4,681279174),l=md5hh(l,s,u,c,e[n],11,-358537222),c=md5hh(c,l,s,u,e[n+3],16,-722521979),u=md5hh(u,c,l,s,e[n+6],23,76029189),s=md5hh(s,u,c,l,e[n+9],4,-640364487),l=md5hh(l,s,u,c,e[n+12],11,-421815835),c=md5hh(c,l,s,u,e[n+15],16,530742520),s=md5ii(s,u=md5hh(u,c,l,s,e[n+2],23,-995338651),c,l,e[n],6,-198630844),l=md5ii(l,s,u,c,e[n+7],10,1126891415),c=md5ii(c,l,s,u,e[n+14],15,-1416354905),u=md5ii(u,c,l,s,e[n+5],21,-57434055),s=md5ii(s,u,c,l,e[n+12],6,1700485571),l=md5ii(l,s,u,c,e[n+3],10,-1894986606),c=md5ii(c,l,s,u,e[n+10],15,-1051523),u=md5ii(u,c,l,s,e[n+1],21,-2054922799),s=md5ii(s,u,c,l,e[n+8],6,1873313359),l=md5ii(l,s,u,c,e[n+15],10,-30611744),c=md5ii(c,l,s,u,e[n+6],15,-1560198380),u=md5ii(u,c,l,s,e[n+13],21,1309151649),s=md5ii(s,u,c,l,e[n+4],6,-145523070),l=md5ii(l,s,u,c,e[n+11],10,-1120210379),c=md5ii(c,l,s,u,e[n+2],15,718787259),u=md5ii(u,c,l,s,e[n+9],21,-343485551),s=safeAdd(s,r),u=safeAdd(u,i),c=safeAdd(c,o),l=safeAdd(l,a);return[s,u,c,l]}function binl2rstr(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function rstr2binl(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function rstrMD5(e){return binl2rstr(binlMD5(rstr2binl(e),8*e.length))}function rstrHMACMD5(e,t){var n,r,i=rstr2binl(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=binlMD5(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=binlMD5(o.concat(rstr2binl(t)),512+8*t.length),binl2rstr(binlMD5(a.concat(r),640))}function rstr2hex(e){var t,n,r="0123456789abcdef",i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+=r.charAt(t>>>4&15)+r.charAt(15&t);return i}function str2rstrUTF8(e){return unescape(encodeURIComponent(e))}function rawMD5(e){return rstrMD5(str2rstrUTF8(e))}function hexMD5(e){return rstr2hex(rawMD5(e))}function rawHMACMD5(e,t){return rstrHMACMD5(str2rstrUTF8(e),str2rstrUTF8(t))}function hexHMACMD5(e,t){return rstr2hex(rawHMACMD5(e,t))}function md5(e,t,n){return t?n?rawHMACMD5(t,e):hexHMACMD5(t,e):n?rawMD5(e):hexMD5(e)}function compareVersion$1(e,t){if(e&&t){for(var n=stringToIntArraySplitBy$1(e,"."),r=stringToIntArraySplitBy$1(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy$1(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}var proxyMapping=createWeakMap();function getProxyTarget(e){return proxyMapping.get(e)}function hasProxyTarget(e){return"object"==typeof e&&e&&proxyMapping.has(e)}function createProxy(e,t){var n=new Proxy(e,t);return proxyMapping.set(n,e),n}var InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle$1((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer=function(){var e=createWeakSet();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify(e){return JSON.stringify(e,getCircularReplacer())}var precisionTimestampBasis$1=0;function resetPrecisionTimestampBasis$1(){precisionTimestampBasis$1=1e3*Date.now()-getPrecisionTimestamp$1()}var getPrecisionTimestamp$1="object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return 1e3*performance.now()+precisionTimestampBasis$1}:function(){return 1e3*Date.now()};function interceptLifecycle(e){e.interceptors.appLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,r)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizePageLifecycleManagerThisContext(t))};onPageLifecycle(e,r)}))}function onAppLifecycle(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog."+t.args[0],params:t};e.callback(n)}catch(e){}}function normalizeAppLifecycleManagerThisContext(e){var t=e.app;return{app:{appInstanceId:t.appInstanceId,initTime:t.initTime,launchOptions:t.getLaunchOptions(),launchTime:t.launchTime},state:e.state}}function onPageLifecycle(e,t){try{var n=getLifecycleName$1(t.args[0]);if(!n)return;var r={ext:{origin:"applog"},method:"MiniAppLog."+n,params:t};e.callback(r),"onPageShow"===n&&e.notifyDataChange()}catch(e){}}function getLifecycleName$1(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function normalizePageLifecycleManagerThisContext(e){var t=e.page;return{page:{initTime:t.initTime,loadTime:t.loadTime,pageId:t.pageId,pagePath:t.pagePath,plugin:t.plugin},state:e.state}}function interceptJSAPI(e){e.interceptors.bridgeSyncCallContextMethodInterceptor.all("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onApiSyncCall(e,{context:t,args:n,reqId:r,aTime:i}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onApiSyncCallback(e,{context:t,args:u,reqId:a,result:r,bTime:c,aTime:s})})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return t.__reqId=r,onApiCall(e,{context:t,args:n,reqId:r,aTime:i}),"rpc"===t.apiName&&(t.option.getResponse||(t.$$rpcGetResponseToTrue=!0,t.option=__assign(__assign({},t.option),{getResponse:!0}))),n})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("dispatchResultCallback",(function(t,n){var r=t.__reqId,i=getPrecisionTimestamp$1()/1e3;return onApiCallback(e,{context:t,args:n,reqId:r,bTime:i}),"rpc"===t.apiName&&t.$$rpcGetResponseToTrue&&void 0!==n[0].resData?[n[0].resData]:n}))}function onApiSyncCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo$1(e){if(e.context){var t=e.context,n=t.apiName,r=t.extraInfo,i=t.isMiniExtension,o=t.option,a=t.startTime,s=t.taskId,u=t.__reqId;return __assign(__assign({},e),{context:{__reqId:u,apiName:n,extraInfo:r,isMiniExtension:i,option:o,startTime:a,taskId:s}})}return e}var originalError=console.error;function interceptError(e){e.interceptors.appBaseInstanceInterceptor.after("reportError",(function(e,t){t[0];onError({code:t[1],formatted:t[2]})}))}function onError(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(originalError.bind(console,t),0)}function interceptSetData(e){e.interceptors.pageFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3,o={aTime:i,args:n,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,o),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:a})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onSetData(e,{aTime:i,args:n,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:r}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:a})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo$1(t)};e.callback(n)}catch(e){}}function onSetDataCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onSetDataCallback",params:t};e.callback(n)}catch(e){}}function minimizeSetDataInfo$1(e){return e.context?e:{componentIs:e.component?e.component.is:void 0,isPage:e.isPage,option:e.options,pagePath:e.isPage?e.page.route:e.component.$page.route}}function normalizePageLogicInstanceThisContext(e){var t=e.page;return{page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:e.pageId,pagePath:e.pagePath}}function normalizeComponentLogicInstanceThisContext(e){var t=e.page;return{componentPath:e.componentPath,page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:t.pageId,pagePath:t.pagePath}}function setup(e,t,n){resetPrecisionTimestampBasis$1();var r=new InterceptContext(t,n);interceptSetData(r),interceptLifecycle(r),interceptJSAPI(r),interceptError(r)}var kTimeConsumingDataKey="__ariver_callstatdata";function extractBridgeCallback(e,t,n,r){if(void 0===r&&(r=!1),e||t||n)return handleCallbackUnion.bind(null,e,t,n,r)}function handleCallbackUnion(e,t,n,r,i){var o=!1;r?o=!!(i=normalizeErrorCode(i)).error:"object"==typeof i&&(o="error"in i||"errorMessage"in i),o&&"function"==typeof t&&t(i),o||"function"!=typeof e||e(i),"function"==typeof n&&n(i)}function normalizeErrorCode(e){return"string"==typeof e.error&&(e.error=parseInt(e.error,10)),0===e.error&&(delete e.error,delete e.errorMessage),e}function deleteTimeConsumingDataKey(e){e[kTimeConsumingDataKey]&&delete e[kTimeConsumingDataKey]}var sharedRequestSyncIdBase=3e3,alipayBridge;function normalizeRemoteBridgeCallSyncPayload(e,t,n){var r="_sw_jsonp_".concat(++sharedRequestSyncIdBase);workerGlobal[r]=function(e){workerGlobal[r]=null,n(e)};var i={action:e,callback:r,data:t};return JSON.stringify(i)}function normalizeRemoteBridgeCallUrl(e){var t=encodeURIComponent(e);return"https://alipay.kylinbridge/?data=".concat(t)}function safeParseJSON(e){try{return JSON.parse(e)}catch(e){}}function invokeHostBridgeCallSync4KylinBridge(e,t){var n,r=normalizeRemoteBridgeCallUrl(normalizeRemoteBridgeCallSyncPayload(e,t,(function(e){n=e})));try{globalImportScripts(r)}catch(e){}return"string"==typeof n?safeParseJSON(n):n}"object"==typeof globalAlipayJSBridge&&(alipayBridge={call:function(e,t,n){globalAlipayJSBridgeCall(e,t,n)},callSync:function(e,t){return globalAlipayJSBridge.callSync?globalAlipayJSBridge.callSync(e,t):invokeHostBridgeCallSync4KylinBridge(e,t)}});var isAppXImportHooked=!1,appxLoadedCallbacks=[],appxBridge,appxBridgeReadyResolve;function callAfterAFAppX(e){if("undefined"!=typeof AFAppX)e();else if(appxLoadedCallbacks.push(e),!isAppXImportHooked){isAppXImportHooked=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[]}),1200)}}var appxBridgeReadyPromise=new Promise((function(e){appxBridgeReadyResolve=e}));"object"==typeof my?(appxBridge=my,appxBridgeReadyResolve()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(appxBridge=AFAppX.bridge,appxBridgeReadyResolve()):callAfterAFAppX((function(){appxBridge=AFAppX.bridge,appxBridgeReadyResolve()}));var bootstraped=!1;function ensureAppxBootstrap(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return bootstraped?[3,2]:[4,appxBridgeReadyPromise];case 1:return e.sent(),[2,new Promise((function(e){var t=function(){appxBridge.call("getStartupParams"),bootstraped=!0,e()};try{t()}catch(e){setTimeout(t,600)}}))];case 2:return[2]}}))}))}function isTruthyParamValue(e){return!0===e||"yes"===e||"YES"===e}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),r=stringToIntArraySplitBy(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}function call(e,t){if(alipayBridge){var n=t.success,r=t.fail,i=t.complete,o=__rest(t,["success","fail","complete"]),a=extractBridgeCallback(n,r,i,!0);alipayBridge.call(e,o,(function(e){a&&a(e)}))}else appxBridge?appxBridge.call(e,t):console.warn("[ERROR] error when call ".concat(e,": AlipayJSBridge not found"))}function isInNonBridgeContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my}function isInPluginContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"==typeof getApp}function isInBizContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"!=typeof getApp}function isInBizContextAndAppX1(){return!!isInBizContext()&&(my.SDKVersion&&-1===compareVersion(my.SDKVersion,"2.0.0"))}var reiOS=/iPhone|iPad|iOS/i,finalPlatformType;function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getPlatformType(){if(finalPlatformType)return finalPlatformType;if("undefined"!=typeof navigator){var e=getUserAgent();finalPlatformType=e.indexOf("Android")>-1?2:e.match(reiOS)?1:0}else finalPlatformType="undefined"!=typeof WXEnvironment?"iOS"===WXEnvironment.platform?1:2:1;return finalPlatformType}function isAndroid(){return 2===getPlatformType()}function isIOS(){return 1===getPlatformType()}function isLyra(){return/LyraVM/i.test(getUserAgent())}var isXRiver=function(){return getUserAgent().indexOf("XRiver")>-1};function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}var Event=function(){function e(e,t,n){this.type=String(e),this.engineType=n,this.data=t,this._preventDefault=!1}return e.prototype.preventDefault=function(){this._preventDefault=!0},e.prototype.isDefaultPrevented=function(){return!!this._preventDefault},e}();function createEvent4WebEngine(e,t){var n,r,i=t.param,o=t.viewId+"";i&&"object"==typeof i&&2===getPlatformType()?(n=i.data,i.type,r=__rest(i,["data","type"])):n=i,n?n.instanceId=o:n={instanceId:o};var a=new Event(e,n,1);if(r)try{Object.assign(a,r)}catch(e){}return a}var EventListener=function(){function e(e,t){this.name=e,this.target=t,this.callbackHandlers=new Map,this.callbackBeforeDispatchInterceptor=new Map,this._callbackGlobalMap=new Map,t&&(t.addEventListener&&(this.baseAddEventListener=t.addEventListener.bind(t)),t.removeEventListener&&(this.baseRemoveEventListener=t.removeEventListener.bind(t)))}return e.prototype.tryInitEventListenerOnWindow=function(e){var t,n,r=this;if(!(this.callbackHandlers.has(e)&&(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)>0&&this._callbackGlobalMap.has(e))){this.callbackHandlers.set(e,[]);var i=function(e){r.dispatchEvent(e)};this._callbackGlobalMap.set(e,i),null===(n=this.baseAddEventListener)||void 0===n||n.call(this,e,i)}},e.prototype.tryRemoveEventListenerInTarget=function(e){var t,n;if(!this.callbackHandlers.has(e)||0===(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)){var r=this._callbackGlobalMap.get(e);r&&(null===(n=this.baseRemoveEventListener)||void 0===n||n.call(this,e,r),this._callbackGlobalMap.delete(e))}},e.prototype.addEventListener=function(e,t){this.callbackHandlers.has(e)||this.tryInitEventListenerOnWindow(e);var n=this.callbackHandlers.get(e);null==n||n.push({fn:t})},e.prototype.removeEventListener=function(e,t){var n=this.callbackHandlers.get(e);n.forEach((function(e,r){e.fn===t&&n.splice(r,1)})),this.tryRemoveEventListenerInTarget(e)},e.prototype.dispatchEvent=function(e){var t,n=null!==(t=e.type)&&void 0!==t?t:e.name;if(this.callbackHandlers&&this.callbackHandlers.has(n)){var r=this.callbackHandlers.get(n),i=this.callbackBeforeDispatchInterceptor.get(n);if(i&&i.length>0)for(var o=0;o<i.length;o++){if(!(0,i[o])(e))return}for(var a=0,s=r;a<s.length;a++){if(s[a].fn.call(null,e),e.defaultPrevented)break}}},e.prototype.addInterceptor=function(e,t){this.callbackBeforeDispatchInterceptor.has(e)||this.callbackBeforeDispatchInterceptor.set(e,[]);var n=this.callbackBeforeDispatchInterceptor.get(e);null==n||n.push(t)},e.prototype.patch=function(){var e=this;this.disposePatch&&this.disposePatch();var t=this.target;t&&(t.addEventListener&&(t.addEventListener=this.addEventListener.bind(this)),t.removeEventListener&&(t.removeEventListener=this.removeEventListener.bind(this))),(this.baseAddEventListener||this.baseRemoveEventListener)&&(this.disposePatch=function(){e.disposePatch=void 0,t&&(e.baseAddEventListener&&(t.addEventListener=e.baseAddEventListener),e.baseRemoveEventListener&&(t.removeEventListener=e.baseRemoveEventListener))})},e}(),EventManger=function(){function e(){var e=this;this.eventMap={},this.queue=[],this.enableQueue=!1,(isInPluginContext()||isInBizContext())&&error$1("EventManger is not work in","isInBizContext"),this.globalEventListener=new EventListener("workerGlobal",workerGlobal),this.documentEventListeners=new EventListener("document",workerGlobal&&workerGlobal.document),this.globalEventListener.addEventListener("message",(function(t){e.enMessageQueue(t)}));this.pushEventListener.addEventListener("push",(function(t){var n=t.data;if(n&&(n.func||n.beforeunload)){var r=n.func||"beforeunload",i=createEvent4WebEngine(r,n),o=e.eventMap[r];o&&o.forEach((function(e){e(i)}))}e.enPushQueue(t)}))}return Object.defineProperty(e.prototype,"pushEventListener",{get:function(){return workerGlobal&&workerGlobal.document?this.documentEventListeners:this.globalEventListener},enumerable:!1,configurable:!0}),e.prototype.patch=function(){this.globalEventListener.patch(),this.documentEventListeners.patch()},e.prototype.enPushQueue=function(e){this.enableQueue&&(log("queued push event",e),this.queue.push({type:"push",e:e}))},e.prototype.enMessageQueue=function(e){this.enableQueue&&(log("queued message event",e),this.queue.push({type:"message",e:e}))},e.prototype.startQueueEvent=function(){log("startQueueEvent"),this.enableQueue=!0},e.prototype.replayQueueEvent=function(){for(log("replayQueueEvent",this.queue.length),this.enableQueue=!1;this.queue.length;){var e=this.queue.shift();"push"===e.type?this.pushEventListener.dispatchEvent(e.e):this.globalEventListener.dispatchEvent(e.e)}},e.prototype.on=function(e,t){var n=this;if(!isInPluginContext()&&!isInBizContext())return this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t),function(){n.off(e,t)};appxBridge.on(e,t)},e.prototype.off=function(e,t){isInPluginContext()||isInBizContext()?appxBridge.off(e,t):this.eventMap[e]&&(this.eventMap[e]=this.eventMap[e].filter((function(e){return e!==t})))},e.prototype.dispose=function(){var e;null===(e=this.eventDispose)||void 0===e||e.dispose()},e}(),eventManager$1=new EventManger;function getEventManager(){return eventManager$1}var eventManager=getEventManager(),BridgeWebSocketTask=function(){function e(t){this.map={},this.id="".concat(t,"_").concat(Math.random().toString(36).substring(2,8),"_").concat(String(e.taskId++))}return e.prototype._listen=function(e,t){var n=this;eventManager.on("onSocketTask"+e,(function(e){e.data&&e.data.socketTaskID===n.id&&t(e)}))},e.prototype.getParam=function(e){return __assign({socketTaskID:this.id},e)},e.prototype._doAction=function(e,t){call(e,this.getParam(t))},e.prototype.send=function(e){this._doAction("sendSocketMessage",e)},e.prototype.close=function(e){this._doAction("closeSocket",e)},e.prototype.onOpen=function(e){this._listen("Open",e)},e.prototype.onMessage=function(e){this._listen("Message",(function(t){e(t)}))},e.prototype.onError=function(e){this._listen("Error",(function(t){e(t)}))},e.prototype.onClose=function(e){this._listen("Close",e)},e.taskId=1,e}(),EWorkerAppEvent$1;function connectSocket(e){var t;if(isInPluginContext()||isInBizContext())return appxBridge.connectSocket(e);var n=null!==(t=e.__taskIdPrefix)&&void 0!==t?t:"remote_debug";delete e.__taskIdPrefix;var r=new BridgeWebSocketTask(n);return call("connectSocket",r.getParam(e)),r}function alert$1(e){if(isInPluginContext()||isInBizContext())return appxBridge.alert(e);call("alert",__assign({},e))}function toast(e){if(isInPluginContext()||isInBizContext())return appxBridge.showToast(e);call("toast",__assign({},e))}!function(e){e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick"}(EWorkerAppEvent$1||(EWorkerAppEvent$1={}));var abridge={callSync:function(e,t){return alipayBridge?alipayBridge.callSync(e,t):appxBridge?appxBridge.callSync(e,t):void 0},showRemoteDebugMask:function(e){return alipayBridge?alipayBridge.call("showRemoteDebugMask",e,(function(){})):appxBridge?appxBridge.call("showRemoteDebugMask",e):void 0},getStartupParams:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,ensureAppxBootstrap()];case 1:return e.sent(),[2,new Promise((function(e){appxBridge.call("getStartupParams",{success:function(t){e(t)}})}))]}}))}))},getStartupParamsSync:function(){return alipayBridge&&alipayBridge.callSync?alipayBridge.callSync("getStartupParams"):appxBridge&&appxBridge.callSync?appxBridge.callSync("getStartupParams"):{}},connectSocket:function(e){return connectSocket(e)},alert:function(e){alert(e)}};function getStartupParamsFromGlobal(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?__appxStartupParams:"undefined"!=typeof AlipayJSBridge&&AlipayJSBridge.startupParams?AlipayJSBridge.startupParams:void 0}function getStartupParams$1(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return(e=getStartupParamsFromGlobal())?[2,e]:[2,abridge.getStartupParams()]}))}))}function getStartupParamsSync(){var e=getStartupParamsFromGlobal();if(e)return e;try{return abridge.getStartupParamsSync()}catch(e){return debug$1("[boatman] getStartupParamsSync error",e),{}}}var AgentContext=function(){this.channelConfigKey="0",this.userAgent=getUserAgent(),this.isIOS=isIOS(),this.isLyra=isLyra(),this.startupParams=getStartupParamsSync(),this.channelId=this.startupParams.channelId||"",this.channel=this.startupParams.channel||"",this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},NetworkCollection=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,__assign(__assign({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}();function createProtocol4RequestWillBeSent(e){var t=(e.method||"GET").toUpperCase(),n=mapValueToString(e.headers),r=getTimestamp();return{method:"Network.requestWillBeSent",params:{documentURL:"",loaderId:"",requestId:e.requestId,request:{method:t,url:e.url,headers:n,postData:e.postBody,hasPostData:!!e.postBody||void 0,mixedContentType:"none",initialPriority:"High",isLinkPreload:!1,referrerPolicy:"origin"},wallTime:r,initiator:{type:"script"},timestamp:r,type:"XHR"}}}function createProtocol4ResponseReceived(e,t){var n=e.profile,r=e.headers,i=n&&n.totalTime,o=getTimestamp(),a=o-(i?n.totalTime-n.Waiting-n.domainLookup-n.connect-n.SSLconnection:0)/1e3;return{method:"Network.responseReceived",params:{requestId:e.requestId,loaderId:"",type:"XHR",timestamp:a,response:{url:t.url||"",status:Number(e.status),headers:mapValueToString(r),requestHeaders:t.requestHeaders,connectionReused:!1,connectionId:1e3,encodedDataLength:0,securityState:"unknown",statusText:"",protocol:"",mimeType:r["Content-Type"]||r["content-type"],timing:i?createResourceTiming(n,o-n.totalTime/1e3):void 0}}}}function createProtocol4LoadingFinished(e){return{method:"Network.loadingFinished",params:{requestId:e.requestId,timestamp:getTimestamp(),encodedDataLength:0}}}function createProtocol4LoadingFailed(e){return{method:"Network.loadingFailed",params:{canceled:!1,errorText:e.errorMsg||"",requestId:e.requestId,timestamp:getTimestamp(),type:"XHR"}}}function mapValueToString(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}function getTimestamp(){return Date.now()/1e3}function createResourceTiming(e,t){var n=e.domainLookup,r=e.connect,i=e.SSLconnection,o=n+r+i;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:o||-1,sslStart:o-i||-1,sslEnd:o||-1,sendStart:o?-1:1e-4,sendEnd:o?-1:1e-4,receiveHeadersEnd:o+e.Waiting,proxyStart:-1,proxyEnd:-1,workerStart:-1,workerReady:-1,workerFetchStart:-1,workerRespondWithSettled:-1,pushStart:0,pushEnd:0}}var MAX_QUEUE_SIZE=1e8,MessageQueue=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0}return e.prototype.push=function(e){this._queueSize>MAX_QUEUE_SIZE&&debug$1("abort message due to max queue size");var t=guardSingleMsgSize(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=getInjector().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e}(),globalInjector,Injector=function(){function e(){this.isApplogEnabled=!1}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new AgentContext),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new NetworkCollection),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new MessageQueue),this.messageQueue},e.prototype.setRuntime=function(e){this.runtime=e},e.prototype.getRuntime=function(){return this.runtime},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),EWorkerAppEvent,EBugmePanelId;function getInjector(){return globalInjector||(globalInjector=new Injector),globalInjector}function sendOrQueueApplogMsg$1(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function getHookFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function throttle(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=e.apply(null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=e.apply(null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function debounce(e,t,n,r){var i;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r(i),i=n((function(){e.apply(null,o)}),t)}}!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(EWorkerAppEvent||(EWorkerAppEvent={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(EBugmePanelId||(EBugmePanelId={}));var throttledEmitDataChangedEvent=throttle((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:"Tiny.Data.dataChanged",ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1}),EUnserializableValue;function getFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function onErrorHook(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(console.error.bind(console,t))}function registerLegacyAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:getFn("onSetData"),onSetDataCallback:getFn("onSetDataCallback"),onApiSyncCall:getFn("onApiSyncCall"),onApiSyncCallback:getFn("onApiSyncCallback"),onApiCall:getFn("onApiCall"),onApiCallback:getFn("onApiCallback"),onError:getFn("onError")};workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}throttledEmitDataChangedEvent(),sendOrQueueApplogMsg({method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onSetDataCallback",params:t,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}onErrorHook(t)}catch(e){debug$1(e)}},registerV1PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV1AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}function getLifecycleName(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function registerV1PageLifecycleHooks(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var r=e.context?e:__assign({route:e.page.route},e);sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2PageLifecycleHooks(e,t){t.onPageLifecycle=getFn("onPageLifecycle"),e.onPageLifecycle=function(e){try{if(t.onPageLifecycle)try{t.onPageLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var n=getLifecycleName(e.args[0]);if(!n)return;sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}}function registerV1AppLifecycleHooks(e,t){for(var n=["onAppLaunch","onAppShow","onAppHide","onAppError","onAppUnhandledRejection"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2AppLifecycleHooks(e,t){t.onAppLifecycle=getFn("onAppLifecycle"),e.onAppLifecycle=function(e){try{if(t.onAppLifecycle)try{t.onAppLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(e.args[0]),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}}function sendOrQueueApplogMsg(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function minimizeApiHookInfo(e){if(e.context){var t=e.context;return __assign(__assign({},e),{context:pick(t,["apiName","extraInfo","isMiniExtension","option","startTime","taskId","__reqId"])})}return e}function minimizeSetDataInfo(e){return e.context?e:{pagePath:e.isPage?e.page.route:e.component.$page.route,isPage:e.isPage,option:e.options,componentIs:e.component?e.component.is:void 0}}function minimizePageLifecycleInfo1(e){return __assign(__assign({},e),{page:pick(e.page,["$id","$page","$viewId","data"])})}function pick(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function registerAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={}),registerLegacyAppxHook();var e=getHookFn("setup");workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.setup=function(t,n){if(e&&"function"==typeof e)try{e(t,n)}catch(e){debug$1(e)}getInjector().setRuntime(t),setup(t,n,(function(e){if("string"==typeof e.method&&e.method.includes("MiniAppLog"))sendOrQueueApplogMsg$1(e);else{var t=getInjector().getWorkerSocket();t&&t.send(e)}}))}}function parseUnserializableValue(e){if(!e)return null;switch(e){case EUnserializableValue.Infinity:return 1/0;case EUnserializableValue[-1/0]:return-1/0;case EUnserializableValue.NaN:return NaN;case EUnserializableValue["-0"]:return-0;default:return null}}function getObjectOwnPropertyDescriptors(e){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(e):Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),Object.create(null))}function isError(e){return"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)||e instanceof RegExp}function isPromise(e){return"[object Promise]"===Object.prototype.toString.call(e)||e instanceof Promise}function isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function isArrayBufferInstance(e){return e instanceof ArrayBuffer}function supportSignedZero(){return!0}function isNegativeZero(e){return 0===e&&1/e==-1/0}!function(e){e[1/0]="Infinity",e[-1/0]="-Infinity",e.NaN="NaN",e["-0"]="-0"}(EUnserializableValue||(EUnserializableValue={}));var ObjectMapper=function(){function e(e){this.objectStore=e}return e.prototype.mapFrom=function(e,t){var n=this;return Array.from(e).map((function(e){return n.mapFromOne(e,t)}))},e.prototype.mapFromOne=function(e,t){switch(typeof e){case"string":return this.mapString(e);case"number":return this.mapNumber(e);case"object":return Array.isArray(e)?this.mapArray(e,"table"===t):null===e?this.mapNull():isArrayBufferInstance(e)?this.mapArrayBuffer(e,"table"===t):this.mapObject(e,"table"===t);case"function":return this.mapFunction(e);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(e);default:return{type:typeof e,value:e}}},e.prototype.mapArrayBuffer=function(e,t){var n=this,r={byteLength:e.byteLength},i=Object.keys(r),o=e.byteLength,a=this.objectStore.save(e),s=e.constructor?e.constructor.name:"Object",u=i.length>5&&!t,c="arraybuffer",l="".concat(s,"(").concat(o,")"),p={type:"object",className:s,description:l,objectId:a,preview:{type:"object",description:l,overflow:u,properties:(u?i.slice(0,5):i).map((function(e){return n.getPropertyPreview4AnyValue(e,r[e],t)})).filter(Boolean)}};return c&&(p.subtype=c,p.preview&&(p.preview.subtype=c)),l&&(p.description=l,p.preview&&(p.preview.description=l)),p},e.prototype.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){var t,n;isNaN(e)?n=EUnserializableValue.NaN:e===1/0?n=EUnserializableValue.Infinity:e===-1/0?n=EUnserializableValue[-1/0]:isNegativeZero(e)?n=EUnserializableValue["-0"]:t=e;var r={type:"number",value:t,description:String(e)};return n&&(r.unserializableValue=n),r},e.prototype.mapBoolean=function(e){return{type:"boolean",value:e}},e.prototype.mapFunction=function(e){var t=this.objectStore.save(e);return{type:"function",className:"Function",description:e.toString(),objectId:t}},e.prototype.mapUndef=function(){return{type:"undefined"}},e.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},e.prototype.mapObject=function(e,t){var n,r,i=this,o=getObjectOwnPropertyDescriptors(e),a=Object.keys(o),s=this.objectStore.save(e),u=e.constructor?e.constructor.name:"Object",c=a.length>5&&!t,l={type:"object",className:u,description:u,objectId:s,preview:{type:"object",description:u,overflow:c,properties:(c?a.slice(0,5):a).map((function(e){return i.getPropertyPreview4ObjectProperty(e,o[e],t)})).filter(Boolean)}};return isError(e)?(n="error",-1===(r=e.stack||"").indexOf(e.name)&&(r=e.toString()+"\n"+r)):isDate(e)?(n="date",r=e.toString()):isRegExp(e)?(n="regexp",r=e.toString()):isPromise(e)&&(n="promise",r="Promise"),n&&(l.subtype=n,l.preview&&(l.preview.subtype=n)),r&&(l.description=r,l.preview&&(l.preview.description=r)),l},e.prototype.mapArray=function(e,t){var n=this,r=e.length>100&&!t,i="Array(".concat(e.length,")");return{type:"object",subtype:"array",className:"Array",description:i,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:i,overflow:r,properties:(r?e.slice(0,100):e).map((function(e,r){return n.getPropertyPreview4ArrayProperty(r,e,t)}))}}},e.prototype.getPropertyPreview4ArrayProperty=function(e,t,n){return this.getPropertyPreview4AnyValue(String(e),t,n)},e.prototype.getPropertyPreview4ObjectProperty=function(e,t,n){return t.get?{name:e,type:"accessor"}:t.set?void 0:this.getPropertyPreview4AnyValue(e,t.value,n)},e.prototype.getPropertyPreview4AnyValue=function(e,t,n){switch(void 0===n&&(n=!1),typeof t){case"object":if(Array.isArray(t)){var r={name:e,type:"object",subtype:"array",value:"Array(".concat(t.length,")")};return n&&(r.valuePreview=this.getValuePreview4TableArray(t)),r}if(null===t)return{name:e,type:"object",subtype:"null",value:"null"};r={name:e,type:"object",value:t.constructor?t.constructor.name:"Object"};return n&&(r.valuePreview=this.getValuePreview4TableObject(t)),r;case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof t,value:String(t)}}},e.prototype.getValuePreview4TableArray=function(e){var t=this;return{type:"object",subtype:"array",description:"Array(".concat(e.length,")"),overflow:!1,properties:e.map((function(e,n){return t.getPropertyPreview4AnyValue(String(n),e)}))}},e.prototype.getValuePreview4TableObject=function(e){var t=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(e).map((function(n){return t.getPropertyPreview4AnyValue(n,e[n])}))}},e}(),ExtractStackLine=function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}(),CallFramesMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e,n){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(ExtractStackLine),executionContextId=1,injectedScriptId=1,ObjectStore=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'.concat(injectedScriptId,',"id":').concat(this.id,"}")},e}(),GetPropertiesHandler=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);if(t){var n=Boolean(e.ownProperties),r={result:this.mapObject(t,n,Boolean(e.accessorPropertiesOnly))};return n&&this.hasInternalProperties(t)&&(r.internalProperties=this.getInternalProperties(t)),r}return{result:[]}},e.prototype.getInternalProperties=function(e){return isArrayBufferInstance(e)?[this.mapInternalProperties("[[ArrayBufferByteLength]]",e.byteLength)]:[]},e.prototype.hasInternalProperties=function(e){return isArrayBuffer(e)},e.prototype.shouldSkipProto=function(e){return isArrayBuffer(e)},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var i=getObjectOwnPropertyDescriptors(e),o=Object.keys(i).filter((function(e){return!(n&&!i[e].get&&!i[e].set)})).map((function(e){return r.mapResultOne(e,i[e],!0)}));return this.shouldSkipProto(e)||e.__proto__&&o.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),o}for(var a=[],s={},u=e,c=!1,l=!0,p=function(){var e=getObjectOwnPropertyDescriptors(u);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var i=e[t];(!n||i.get||i.set)&&a.push(r.mapResultOne(t,i,l))}})),!c){var t=Object.getOwnPropertyDescriptor(u,"__proto__");t&&(c=!0,a.push(h.mapResultOne("__proto__",t,l)))}u=u.__proto__,l=!1},h=this;u;)p();return a},e.prototype.mapInternalProperties=function(e,t){return{name:String(e),value:this.objectMapper.mapFromOne(t)}},e.prototype.mapResultOne=function(e,t,n){var r={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(r.value=this.objectMapper.mapFromOne(t.value)),t.get&&(r.get=this.objectMapper.mapFromOne(t.get)),t.set&&(r.set=this.objectMapper.mapFromOne(t.set)),r},e}(),RemoteObjectParser=function(){function e(){this.objectStore=new ObjectStore,this.objectMapper=new ObjectMapper(this.objectStore),this.callFramesMapper=new CallFramesMapper,this.getPropertiesHandler=new GetPropertiesHandler(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e,t){return this.objectMapper.mapFromOne(e,t)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var r=e;return"warn"===e&&(r="warning"),{method:"Runtime.consoleAPICalled",params:{type:r,args:this.objectMapper.mapFrom(n,e),executionContextId:executionContextId,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}(),globalConsoleOverrides;function initConsoleOverrides(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrides=new ConsoleOverrides).overrideConsole()}function getConsoleOverrides(){return globalConsoleOverrides}var ConsoleOverrides=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMessage({method:"Runtime.executionContextsCleared",params:{}}),this.sendMessage({method:"Runtime.executionContextCreated",params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this;Object.defineProperties(console,["debug","log","info","warn","error","table"].reduce((function(t,n){var r=console[n].bind(console);return t[n]={value:function(){var t=arguments;if(t.length){try{if("string"==typeof t[0]&&/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/.test(t[0]))return r.apply(null,t);var i=new Error;i.stack&&e.sendMessage(e.parser.consoleAPICalled(n,i.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMessage=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessages(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessages=function(){if(this.messageBeforeAgentInit.length){var e=getInjector().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){getInjector().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessages())}),1e3)}},e}(),requirePluginName="requirePlugin";function hookRequirePlugin(){var e=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);if(!e||e.configurable){var t;e&&(t=workerGlobal.requirePlugin);var n,r={get:function(e,t,n){return"async"===t?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e[t];if("function"==typeof i){var o=Date.now();return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCall",params:{aTime:o,context:{apiName:requirePluginName+".async",option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}}),i.apply(void 0,n).then((function(e){return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:e?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e})).catch((function(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e}))}return i}:e[t]},apply:function(e,t,n){var r=Date.now();sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCall",params:{aTime:r,context:{apiName:requirePluginName,option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}});try{var i=e.apply(void 0,n);return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:i?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),i}catch(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),e}}};try{t&&(n=new Proxy(t,r))}catch(e){}Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return n||t},set:function(e){n=(t=e)?new Proxy(t,r):void 0},enumerable:!0,configurable:!0})}}var channelDomainConfig={0:{openchannel:"openchannel.alipay.com",hpmweb:"hpmweb.alipay.com"},1:{openchannel:"miniprogram.alipay.com",hpmweb:"hpmweb.alipay.com"},2:{openchannel:"openchannel-pre.alipay.com",hpmweb:"hpmweb-pre.alipay.com"}},EventEmitter=function(){function e(){this._listeners=new Map}return e.prototype.on=function(e,t){var n=this;return this._listeners.has(e)||this._listeners.set(e,[]),this._listeners.get(e).push(t),function(){return n.off(e,t)}},e.prototype.off=function(e,t){if(this._listeners.has(e)){var n=this._listeners.get(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}},e.prototype.once=function(e,t){var n=this,r=this.on(e,(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];r(),t.apply(n,e)}));return r},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._listeners.has(e)&&__spreadArray([],this._listeners.get(e),!0).forEach((function(e){return e.apply(t,n)}))},e.prototype.dispose=function(){this._listeners.clear()},e}(),WebSocketBaseImpl=function(){function e(e,t){this.url="",this.taskIdPrefix="",this.header={},this.opened=!1,this.maxBodyLength=10485760,this.eventEmitter=new EventEmitter,e&&(this.url=e),(null==t?void 0:t.header)&&(this.header=t.header),(null==t?void 0:t.taskIdPrefix)&&(this.taskIdPrefix=t.taskIdPrefix),this.onSocketError=this.onSocketError.bind(this),this.onSocketClose=this.onSocketClose.bind(this),this.onSocketMessage=this.onSocketMessage.bind(this),this.onSocketOpen=this.onSocketOpen.bind(this)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.setUrl=function(e){this.url=e},e.prototype.onSocketOpen=function(){this.eventEmitter.emit("open")},e.prototype.onSocketClose=function(){this.eventEmitter.emit("close")},e.prototype.onSocketError=function(e){this.eventEmitter.emit("error",e)},e.prototype.onSocketMessage=function(e){this.eventEmitter.emit("message",e)},e.prototype.on=function(e,t){this.eventEmitter.on(e,t)},e}(),internalWebSocket;"undefined"!=typeof WebSocket&&WebSocket.OPEN&&(internalWebSocket=WebSocket);var WebSocketBrowserImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t}return __extends(t,e),t.prototype.open=function(){var e=this;if(!this.url)throw new Error("WebSocket url required");this.socket=new internalWebSocket(this.url),this.socket.onopen=this.onSocketOpen,this.socket.onmessage=function(t){"string"==typeof t.data?e.onSocketMessage(t.data):console.warn("[DEBUG] invalid message",t.data)},this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError},t.prototype.close=function(){this.opened&&this.socket.close()},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7||(this.opened?this.socket.send(t):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketOpen=function(){var t=this;e.prototype.onSocketOpen.call(this),this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.send(e)})),this.messageBeforeSocketOpen=[])},t.prototype.onSocketClose=function(){this.opened=!1,console.log("[DEBUG] connection closed"),e.prototype.onSocketClose.call(this)},t.prototype.onSocketError=function(t){e.prototype.onSocketError.call(this,t),console.error("[DEBUG] connection onerror",t)},t}(WebSocketBaseImpl),WebSocketNativeImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t.useFromRemoteDebugFlag=!0,t._openInvoked=!1,t}return __extends(t,e),t.prototype.open=function(){var e=this;this._openInvoked||(this._openInvoked=!0,this.socketTask=abridge.connectSocket({__taskIdPrefix:this.taskIdPrefix,fromRemoteDebug:this.useFromRemoteDebugFlag,url:this.url,header:this.header,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)})))},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>this.maxBodyLength||(this.opened?this.socketTask.send({fromRemoteDebug:this.useFromRemoteDebugFlag,data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(WebSocketBaseImpl),isWebPlatform=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){isWebPlatform=!0;try{delete workerGlobal.WebSocket}catch(_a){}}var SocketTaskImpl=isWebPlatform?WebSocketBrowserImpl:WebSocketNativeImpl;function enable$6(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getResponseBody(e){var t=e.params.requestId,n=getInjector(),r=n.getNetworkRecorder(),i=r.getRequest(t);i?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:i.isBase64Body,body:i.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),r.removeRequest(t)}var network=Object.freeze({__proto__:null,enable:enable$6,getResponseBody:getResponseBody});function enable$5(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrides();t&&t.createExecutionContext()}function getProperties$1(e){var t=getConsoleOverrides();t&&getInjector().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})}function compileScript$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function evaluate$1(payload){var consoleOverrides=getConsoleOverrides();if(consoleOverrides){var parser=consoleOverrides.parser;"function"!=typeof eval&&(workerGlobal.eval=evalFunc);try{var returnValue=function(){return eval(payload.params.expression)}();getInjector().getWorkerSocket().send({id:payload.id,result:{result:parser.parseObject(returnValue)}})}catch(e){e.stack="".concat(e.name,": ").concat(e.message),getInjector().getWorkerSocket().send({id:payload.id,result:{exceptionDetails:{columnNumber:20,exception:parser.parseObject(e),exceptionId:1,lineNumber:0,text:"Uncaught"},result:parser.parseObject(e)}})}}}var runtime$1=Object.freeze({__proto__:null,compileScript:compileScript$1,enable:enable$5,evaluate:evaluate$1,getProperties:getProperties$1}),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfPresent(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfNotNamed(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var stringify$1={exports:{}},stringify_1=stringify$1.exports;!function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n}(stringify$1,stringify$1.exports);var stringifyExports=stringify$1.exports,stringify=getDefaultExportFromCjs(stringifyExports),sharedGetCurrentPages;function callGetCurrentPages(){return sharedGetCurrentPages?sharedGetCurrentPages():workerGlobal.getCurrentPages?(sharedGetCurrentPages=workerGlobal.getCurrentPages)():workerGlobal.AFAppX&&AFAppX.getCurrentPages?(sharedGetCurrentPages=AFAppX.getCurrentPages)():[]}function getPagesData(e){var t;var n=getInjector().getRuntime();t=null==n?callGetCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:stringify(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify(t.data),route:t.route}})),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})}function setPageData(e){var t,n=e.params||{},r=n.viewId,i=n.data;var o=getInjector().getRuntime();t=null==o?callGetCurrentPages().filter((function(e){return e&&"".concat(e.$viewId)===r}))[0]:o.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&"".concat(e.$viewId)===r}))[0],t&&i&&t.setData(i)}function setComponentData(e){var t=e.params||{},n=t.targetId,r=t.data;if(-1!==n){var i=getInjector().getRuntime().getNav().getTopInstance().getComponentLogicInstance(n,!0);i&&i.publicInstance.setData(r)}}var data=Object.freeze({__proto__:null,getPagesData:getPagesData,setComponentData:setComponentData,setPageData:setPageData});function getStorageItem(e){return new Promise((function(t){AFAppX.bridge.getStorage({key:e,success:function(n){var r=n.data;t({key:e,value:r,type:typeof r})},fail:function(){t()}})}))}function getStorageInfo(e){AFAppX.bridge.getStorageInfo({success:function(t){Promise.all(t.keys.map((function(e){return getStorageItem(e)}))).then((function(n){var r=n.filter((function(e){return e}));getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{currentSize:t.currentSize,limitSize:t.limitSize,data:r}})}))}})}function clearStorage(e){AFAppX.bridge.clearStorage()}function removeStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.removeStorage({key:t.key})}function setStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.setStorage({key:t.key,data:t.value})}var storage=Object.freeze({__proto__:null,clearStorage:clearStorage,getStorageInfo:getStorageInfo,removeStorage:removeStorage,setStorage:setStorage});function enable$4(){var e=getInjector();e.setApplogEnabled(!0),e.getMessageQueue().sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable$4});function getLoadManager(){var e=getInjector().getRuntime();if("object"==typeof e){var t="function"==typeof e.getControllableLoadManager&&e.getControllableLoadManager();if(t.addLoadHook)return t}}function enable$3(e){getLoadManager()?getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}}):getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,error:"not supported"})}function startInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.start(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function stopInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.stop(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function getAllSubPackages(e){var t;getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{roots:(null===(t=getLoadManager())||void 0===t?void 0:t.getAllSubPackages())||[]}})}function continueLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.continueLoadSubPackage(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function failLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.simulationSubPackageLoadFailed(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}var loadManager=Object.freeze({__proto__:null,continueLoadSubPackage:continueLoadSubPackage,enable:enable$3,failLoadSubPackage:failLoadSubPackage,getAllSubPackages:getAllSubPackages,startInterception:startInterception,stopInterception:stopInterception});function ping(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getSystemInfo(e){AFAppX.bridge.getSystemInfo({success:function(t){var n={userAgent:getInjector().getAgentContext().userAgent,sdkVersion:AFAppX.bridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};getInjector().getWorkerSocket().send({id:e.id,result:n})}})}function getStartupParams(e){var t=getStartupParamsSync();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Applog:applog,Data:data,LoadManager:loadManager,Storage:storage,getStartupParams:getStartupParams,getSystemInfo:getSystemInfo,ping:ping});function getResourceTree$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var page$1=Object.freeze({__proto__:null,getResourceTree:getResourceTree$1}),protoHandler=Object.freeze({__proto__:null,Network:network,Page:page$1,Runtime:runtime$1,Tiny:index}),WorkerSocket=function(){function e(e,t){var n=this;this.isMessageReceived=!1,this.messageBeforeReceived=[],this.socket=t||new SocketTaskImpl(e,{taskIdPrefix:"remote_debug_tbwr"}),this.socket.on("open",(function(){n.socket.send({method:"MiniAppLog.enable",params:{},ext:{origin:EBugmePanelId.AppLog}}),throttledEmitDataChangedEvent()})),this.socket.on("message",(function(e){var t;n.isMessageReceived||(n.isMessageReceived=!0,n.messageBeforeReceived.forEach((function(e){n.socket.send(e)})),n.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:LEAVE"===e&&n.close())}var r=t.method,i=getProtocolHandler(r);i?i(t):(debug$1("unsupported protocol ".concat(r)),n.socket.send({id:t.id,error:{code:-32e3,message:"unsupported"}}))}))}return e.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.socket.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},e.prototype.open=function(){this.socket.open()},e.prototype.close=function(){this.socket.close()},e.prototype.send=function(e){this.socket.send(e)},e}();function getProtocolHandler(e){if(e){for(var t=e.split("."),n=protoHandler,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}}var ignoreDomain=/\/(tyro\/agent|bugme\/channel\/paused|bugme\/channel\/resume)$/,DebugEventListener=function(){function e(){this.isIOS=getInjector().getAgentContext().isIOS,this.isLyra=getInjector().getAgentContext().isLyra}return e.prototype.setup=function(){this.isLyra||this.isIOS?this.listenDebugEvent4IOS():this.listenDebugEvent()},e.prototype.onNetworkRequest=function(e){if(!ignoreDomain.test(e.url)){var t=createProtocol4RequestWillBeSent(e),n=getInjector();n.getWorkerSocket().send(t),n.getNetworkRecorder().setRequest(e.requestId,{method:t.params.request.method,requestHeaders:t.params.request.headers,url:e.url})}},e.prototype.onNetworkResponse=function(e){if(!ignoreDomain.test(e.url)){var t=getInjector(),n=t.getNetworkRecorder().getRequest(e.requestId)||{};t.getWorkerSocket().send(createProtocol4ResponseReceived(e,n)),t.getWorkerSocket().send(createProtocol4LoadingFinished(e)),t.getNetworkRecorder().setRequest(e.requestId,{responseBody:e.body,isBase64Body:!1})}},e.prototype.onNetworkError=function(e){ignoreDomain.test(e.url)||getInjector().getWorkerSocket().send(createProtocol4LoadingFailed(e))},e.prototype.onStorageChanged=function(e){var t={};e.data&&Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),getInjector().getWorkerSocket().send({method:"Tiny.Storage.storageChanged",params:{data:t},ext:{origin:EBugmePanelId.Storage}})},e.prototype.onSubpackageLoaded=function(e){"success"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageLoaded",params:{root:e.rootName}}):"loading"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageRequested",params:{root:e.rootName}}):"fail"===e.status&&getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageFailed",params:{root:e.rootName}})},e.prototype.listenDebugEvent4IOS=function(){var e,t=this,n=AFAppX.bridge;n.on(EWorkerAppEvent.DebugNetworkRequest,(function(e){t.onNetworkRequest(e.data)})),n.on(EWorkerAppEvent.DebugNetworkResponse,(function(e){t.onNetworkResponse(e.data)})),n.on(EWorkerAppEvent.DebugNetworkError,(function(e){t.onNetworkError(e.data)})),n.on(EWorkerAppEvent.DebugStorageChanged,(function(e){t.onStorageChanged(e.data)})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e.prototype.listenDebugEvent=function(){var e,t=this;AFAppX.bridge.on(EWorkerAppEvent.DebugConsole,(function(e){var n,r=e.data,i=r.type,o=r.content;try{n=JSON.parse(o)}catch(e){return}switch(i){case EWorkerAppEvent.DebugNetworkRequest:t.onNetworkRequest(n);break;case EWorkerAppEvent.DebugNetworkResponse:t.onNetworkResponse(n);break;case EWorkerAppEvent.DebugNetworkError:t.onNetworkError(n);break;case EWorkerAppEvent.DebugStorageChanged:t.onStorageChanged(n)}})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e}(),WorkerListener=function(){function e(){this.inited=!1}return e.prototype.setup=function(){if(this.inited)return!1;var e=AFAppX.bridge;if(/^1\./.test(e.SDKVersion)){var t=debounce(this.onPageResumeOrPause.bind(this),300,setTimeout,clearTimeout);e.on(EWorkerAppEvent.PageResume,t),e.on(EWorkerAppEvent.PagePause,t)}e.on(EWorkerAppEvent.DebugPanelClick,this.onDebugPanelClick),e.on(EWorkerAppEvent.DebugMaskButtonClick,this.onDebugMaskButtonClick),this.debugEventListener=new DebugEventListener,this.debugEventListener.setup(),this.inited=!0},e.prototype.onPageResumeOrPause=function(){throttledEmitDataChangedEvent()},e.prototype.onDebugPanelClick=function(){var e=getInjector().getWorkerSocket();e&&e.close()},e.prototype.onDebugMaskButtonClick=function(){},e}(),globalListener;function getGlobalWorkerEventListener(){return globalListener||(globalListener=new WorkerListener),globalListener}function getChannelUrl(){if("string"==typeof __BUGME_EXTERNAL_WORKER_URL__&&__BUGME_EXTERNAL_WORKER_URL__)return __BUGME_EXTERNAL_WORKER_URL__;var e,t=getInjector().getAgentContext(),n=t.channel,r=t.channelId,i=t.channelConfigKey;""!==n?e=n:e="wss://"+(channelDomainConfig[i]||channelDomainConfig[0]).hpmweb;return"".concat(e,"/bugme/client_w/").concat(r)}var DebugAgent=function(){function e(){}return e.prototype.init=function(e){getGlobalWorkerEventListener().setup(),this.makeConnection(e)},e.prototype.makeConnection=function(e){var t=getInjector(),n=getChannelUrl(),r=new WorkerSocket(n,null==e?void 0:e.socketTaskImpl);t.setWorkerSocket(r),t.getAgentContext().isIOS?r.open():setTimeout((function(){r.open()}),1200)},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function getStaticPlugins(){var e=getStartupParamsSync().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));try{var n=getInjector().getRuntime().getMeta().getAppMeta().plugins||{};Object.entries(n).forEach((function(n){var r=n[0],i=n[1];i.lazy&&!e[r]&&t.push({plugin_id:"".concat(i.provider,"(lazy)"),deploy_version:"Not Load"})}))}catch(e){}return t}function printStaticPlugins(){var e=getStaticPlugins();e.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(e))}var loadPluginName="loadPlugin";function hookLoadPlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal.my,loadPluginName);t&&!t.configurable||(t&&(e=workerGlobal.my.loadPlugin),Object.defineProperty(workerGlobal.my,loadPluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("object"==typeof t[0]){var r=t[0].success;t[0].success=function(){printDynamicPlugin(t[0].plugin),void 0!==r&&r.apply(this,arguments)}}return e.apply(void 0,t)}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function getExtensionVersions(){var e=getInjector().getRuntime().getMiniExtensionManager();if(e.extensionVersions)return e.extensionVersions;if(e.getInitedMiniExtensionInfo){var t=e.getInitedMiniExtensionInfo(),n=new Map;return t.forEach((function(e){n.set(e.id,e.version||"-")})),n}return new Map}function printDynamicPlugin(e){var t=e.split("@")[0],n=getExtensionVersions();setTimeout((function(){console.log("%c--- Loaded Dynamic Plugin ---",LOG_STYLE),console.table([{plugin_id:t,deploy_version:n.get(t)}])}),100)}function setupPluginInfo(){console.log("%cTip: you can type `printPlugins()` anytime to print loaded plugins info","color: #3D80F3;"),hookLoadPlugin(),printStaticPlugins(),workerGlobal.printPlugins=printPlugins}function isUsePlugin(){var e=getInjector().getRuntime();if(void 0===e)return!1;var t=e.getMeta();if(t){var n=void 0;if("function"==typeof t.getAppMeta?n=t.getAppMeta():void 0!==t.meta&&(n=t.meta),n)return"object"==typeof n.plugins&&0!==Object.keys(n.plugins).length||n.useDynamicPlugins}return!1}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParamsSync())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager(),r=[];if(n.extensionVersions)n.extensionVersions.forEach((function(e,n){void 0===t[n]&&r.push({plugin_id:n,deploy_version:e})}));else if(n.getInitedMiniExtensionInfo){n.getInitedMiniExtensionInfo().forEach((function(e){if(void 0===t[e.id]){var n={plugin_id:e.id,deploy_version:e.version||"-"};r.push(n)}}))}console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}function main(e){if(!("object"==typeof AFAppX&&AFAppX.Plugin||workerGlobal.__BUGME_ON__)){workerGlobal.__BUGME_ON__=!0;try{registerAppxHook(),initConsoleOverrides(),hookRequirePlugin()}catch(e){error("sync task error",e)}runAfterAppx((function(){runAfterAppXBridgeReady((function(){try{getAgent().init(),isUsePlugin()&&setupPluginInfo()}catch(e){error("init agent error",e)}}))}))}}try{main()}catch(e){error("init error",e)}var CommentHandler=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(76===e.type&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0;){if(!((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset))break;t=o.node,this.stack.pop()}if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(67===e.type&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();function assert(e,t){if(!e)throw new Error("ASSERT: "+t)}var ErrorHandler=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.constructError=function(e,t){var n=new Error(e);return n.stack=n.toString(),n},e}(),Messages={BadImportCallArity:"Unexpected token",BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DefaultRestProperty:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",InvalidUnicodeEscapeSequence:"Invalid Unicode escape sequence",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",PropertyAfterRestProperty:"Unexpected token",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",TemplateEscape89:"\\8 and \\9 are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"},ArrayExpression$1=function(e){this.type=30,this.elements=e},ArrayPattern=function(e){this.type=60,this.elements=e},ArrowFunctionExpression$1=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1},assignmentOperatorNumber={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},AssignmentExpression$1=function(e,t,n){this.type=32,this.operator=assignmentOperatorNumber[e],this.left=t,this.right=n},AssignmentPattern=function(e,t){this.type=61,this.left=e,this.right=t},AsyncArrowFunctionExpression=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0},AsyncFunctionDeclaration=function(e,t,n){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AsyncFunctionExpression=function(e,t,n){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AwaitExpression=function(e){this.type=93,this.argument=e},binaryOperatorNumber={"==":1,"!=":2,"===":3,"!==":4,"<":5,"<=":6,">":7,">=":8,"<<":9,">>":10,">>>":11,"+":12,"-":13,"*":14,"**":15,"/":16,"%":17,"|":18,"^":19,"&":20,in:21,instanceof:22,"||":1,"&&":2},BinaryExpression$1=function(e,t,n){var r="||"===e||"&&"===e||"??"===e;this.type=r?38:33,this.operator=binaryOperatorNumber[e],this.left=t,this.right=n},BlockStatement$1=function(e){this.type=76,this.body=e},BreakStatement$1=function(e){this.type=1,this.label=e},CallExpression$1=function(e,t){this.type=34,this.callee=e,this.arguments=t},CatchClause$1=function(e,t){this.type=62,this.param=e,this.body=t},ClassBody=function(e){this.type=88,this.body=e},ClassDeclaration=function(e,t,n){this.type=86,this.id=e,this.superClass=t,this.body=n},ClassExpression=function(e,t,n){this.type=94,this.id=e,this.superClass=t,this.body=n},ComputedMemberExpression=function(e,t){this.type=39,this.computed=!0,this.object=e,this.property=t},ConditionalExpression$1=function(e,t,n){this.type=35,this.test=e,this.consequent=t,this.alternate=n},ContinueStatement$1=function(e){this.type=2,this.label=e},DebuggerStatement$1=function(){this.type=3},Directive=function(e,t){this.type=5,this.expression=e,this.directive=t},DoWhileStatement$1=function(e,t){this.type=4,this.body=e,this.test=t},EmptyStatement$1=function(){this.type=75},ExportAllDeclaration=function(e){this.type=82,this.source=e},ExportDefaultDeclaration=function(e){this.type=83,this.declaration=e},ExportNamedDeclaration=function(e,t,n){this.type=84,this.declaration=e,this.specifiers=t,this.source=n},ExportSpecifier=function(e,t){this.type=85,this.exported=t,this.local=e},ExpressionStatement$1=function(e){this.type=5,this.expression=e},ForInStatement$1=function(e,t,n){this.type=6,this.left=e,this.right=t,this.body=n,this.each=!1},ForOfStatement$1=function(e,t,n,r){this.type=7,this.await=r,this.left=e,this.right=t,this.body=n},ForStatement$1=function(e,t,n,r){this.type=8,this.init=e,this.test=t,this.update=n,this.body=r},FunctionDeclaration$1=function(e,t,n,r){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},FunctionExpression$1=function(e,t,n,r){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},Identifier$1=function(e){this.type=64,this.name=e},IfStatement$1=function(e,t,n){this.type=9,this.test=e,this.consequent=t,this.alternate=n},Import=function(){this.type=77},ImportDeclaration=function(e,t){this.type=78,this.specifiers=e,this.source=t},ImportDefaultSpecifier=function(e){this.type=79,this.local=e},ImportNamespaceSpecifier=function(e){this.type=80,this.local=e},ImportSpecifier=function(e,t){this.type=81,this.local=e,this.imported=t},LabeledStatement$1=function(e,t){this.type=10,this.label=e,this.body=t},Literal$1=function(e,t){this.type=65,this.value=e,this.raw=t},MetaProperty=function(e,t){this.type=89,this.meta=e,this.property=t},MethodDefinition=function(e,t,n,r,i){this.type=95,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=i},Module=function(e){this.type=67,this.body=e,this.sourceType="module"},NewExpression$1=function(e,t){this.type=40,this.callee=e,this.arguments=t},ObjectExpression$1=function(e){this.type=41,this.properties=e},ObjectPattern=function(e){this.type=66,this.properties=e},Property=function(e,t,n,r,i,o){this.type=68,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=o},RegexLiteral=function(e,t,n,r){this.type=65,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}},RestElement=function(e){this.type=69,this.argument=e},ReturnStatement$1=function(e){this.type=11,this.argument=e},Script=function(e){this.type=67,this.body=e,this.sourceType="script"},SequenceExpression$1=function(e){this.type=37,this.expressions=e},SpreadElement$1=function(e){this.type=70,this.argument=e},StaticMemberExpression=function(e,t){this.type=39,this.computed=!1,this.object=e,this.property=t},Super=function(){this.type=87},SwitchCase$1=function(e,t){this.type=71,this.test=e,this.consequent=t},SwitchStatement$1=function(e,t){this.type=12,this.discriminant=e,this.cases=t},TaggedTemplateExpression$1=function(e,t){this.type=42,this.tag=e,this.quasi=t},TemplateElement$1=function(e,t){this.type=72,this.value=e,this.tail=t},TemplateLiteral$1=function(e,t){this.type=73,this.quasis=e,this.expressions=t},ThisExpression$1=function(){this.type=43},ThrowStatement$1=function(e){this.type=13,this.argument=e},TryStatement$1=function(e,t,n){this.type=14,this.block=e,this.handler=t,this.finalizer=n},unaryOperatorNumber={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},UnaryExpression$1=function(e,t){this.type=44,this.operator=unaryOperatorNumber[e],this.argument=t,this.prefix=!0},updateOperatorNumber={"++":1,"--":2},UpdateExpression$1=function(e,t,n){this.type=45,this.operator=updateOperatorNumber[e],this.argument=t,this.prefix=n},variableDeclarationKindNumber={var:1,let:2,const:3},VariableDeclaration$1=function(e,t){this.type=17,this.declarations=e,this.kind=variableDeclarationKindNumber[t]},VariableDeclarator$1=function(e,t){this.type=74,this.id=e,this.init=t},WhileStatement$1=function(e,t){this.type=15,this.test=e,this.body=t},WithStatement$1=function(e,t){this.type=16,this.object=e,this.body=t},YieldExpression=function(e,t){this.type=92,this.argument=e,this.delegate=t},Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Regex.NonAsciiIdentifierStart.test(Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Regex.NonAsciiIdentifierPart.test(Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isDecimalDigitChar:function(e){return 1===e.length&&Character.isDecimalDigit(e.charCodeAt(0))},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}};function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var Scanner=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n};r.push(o)}return r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(i)}return n}++this.index}else++this.index}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t};n.push(i)}return this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(Character.isWhiteSpace(n))++this.index;else if(Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343)t=1024*(t-55296)+n-56320+65536}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r<t;++r){if(this.eof()||!Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+hexValue(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.tryToScanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;if("}"===e)return null;for(;!this.eof()&&(e=this.source[this.index++],Character.isHexDigit(e.charCodeAt(0)));)t=16*t+hexValue(e);return t>1114111||"}"!==e?null:Character.fromCodePoint(t)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.tryToScanUnicodeCodePointEscape();return null===e?this.throwUnexpectedToken():e},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),Character.isIdentifierPart(t));)n+=e=Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=octalValue(e);return!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+octalValue(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+octalValue(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!==(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"??"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|?^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(Character.isIdentifierStart(t)||Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(Character.isIdentifierStart(this.source.charCodeAt(this.index))||Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];assert(Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,r="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{var o=this.scanHexEscape(i);null===o&&this.throwUnexpectedToken(),r+=o}break;case"x":var a=this.scanHexEscape(i);null===a&&this.throwUnexpectedToken(Messages.InvalidHexEscapeSequence),r+=a;break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=i,this.tolerateUnexpectedToken();break;default:if(i&&Character.isOctalDigit(i.charCodeAt(0))){var s=this.octalToDecimal(i);n=s.octal||n,r+=String.fromCharCode(s.code)}else r+=i}else{if(Character.isLineTerminator(i.charCodeAt(0)))break;r+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:r,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,r="`"===this.source[n],i=!1,o=null,a=2;for(++this.index;!this.eof();){var s=this.source[this.index++];if("`"===s){a=1,i=!0,t=!0;break}if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else{if(null!==o)continue;if("\\"===s)if(s=this.source[this.index++],Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;var u=this.tryToScanUnicodeCodePointEscape();null===u?o="u":e+=u}else{var c=this.scanHexEscape(s);null===c?o="u":e+=c}break;case"x":var l=this.scanHexEscape(s);null===l?o="x":e+=l;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?Character.isDecimalDigit(this.source.charCodeAt(this.index))?o="0":e+="\0":Character.isDecimalDigitChar(s)?o=s:e+=s}else Character.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s}}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:null===o?e:null,head:r,tail:i,notEscapeSequenceHead:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=this,r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(Messages.UnterminatedRegExp),t+=e;else if(Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||this.throwUnexpectedToken(Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t,t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r,"\\u";n<this.index;++n)this.source[n];else this.index=n,e+="u","\\u";this.tolerateUnexpectedToken()}else"\\",this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}(),TokenName={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},ArrowParameterPlaceHolder="ArrowParameterPlaceHolder",Parser=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,s=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,s,i)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,s=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,s,i)},e.prototype.unexpectedTokenError=function(e,t){var n,r=t||Messages.UnexpectedToken;if(e?(t||(r=2===e.type?Messages.UnexpectedEOS:3===e.type?Messages.UnexpectedIdentifier:6===e.type?Messages.UnexpectedNumber:8===e.type?Messages.UnexpectedString:10===e.type?Messages.UnexpectedTemplate:Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?r=Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(r=Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",r=r.replace("%0",n),e&&"number"==typeof e.lineNumber){var i=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,s=e.start-a+1;return this.errorHandler.createError(i,o,s,r)}i=this.lastMarker.index,o=this.lastMarker.line,s=this.lastMarker.column+1;return this.errorHandler.createError(i,o,s,r)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],r={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])};this.config.range&&(r.range=n.range),this.config.loc&&(r.loc=n.loc);var i={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(r,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,r=e.flags;t.regex={pattern:n,flags:r}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,r=e.lineNumber;return n<0&&(n+=t,r--),{index:e.start,line:r,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new Identifier$1(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(null,n));break;case 10:e=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new Identifier$1(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new ThisExpression$1)):e=this.matchKeyword("class")?this.parseClassExpression():this.matchImportCall()?this.parseImportCall():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new SpreadElement$1(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new ArrayExpression$1(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new Literal$1(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new Identifier$1(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return 64===e.type&&e.name===t||65===e.type&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(3===r.type){var l=r.value;this.nextToken(),a=this.match("["),i=(c=!(this.hasLineTerminator||"async"!==l||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new Identifier$1(l))}else this.match("*")?this.nextToken():(a=this.match("["),i=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!c&&"get"===r.value&&p)t="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===r.type&&!c&&"set"===r.value&&p)t="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&p)t="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!c)!a&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0;else if(3===r.type){l=this.finalize(n,new Identifier$1(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(n,new AssignmentPattern(l,h))}else u=!0,o=l}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new Property(t,i,a,o,s,u))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.match("...")?this.parseSpreadElement():this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new ObjectExpression$1(t))},e.prototype.throwTemplateLiteralEarlyErrors=function(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,Messages.InvalidUnicodeEscapeSequence);case"x":return this.throwUnexpectedToken(e,Messages.InvalidHexEscapeSequence);case"8":case"9":return this.throwUnexpectedToken(e,Messages.TemplateEscape89);default:return this.throwUnexpectedToken(e,Messages.TemplateOctalLiteral)}},e.prototype.parseTemplateHead=function(e){assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateElement=function(e){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateLiteral=function(e){var t=this.createNode(),n=[],r=[],i=this.parseTemplateHead(e);for(r.push(i);!i.tail;)n.push(this.parseExpression()),i=this.parseTemplateElement(e),r.push(i);return this.finalize(t,new TemplateLiteral$1(r,n))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case 64:case 39:case 69:case 61:default:break;case 70:e.type=69,this.reinterpretExpressionAsPattern(e.argument);break;case 30:e.type=60;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case 41:e.type=66;for(t=0;t<e.properties.length;t++){var n=e.properties[t];this.reinterpretExpressionAsPattern(70===n.type?n:n.value)}break;case 32:e.type=61,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(e=this.finalize(this.startNode(t),new SequenceExpression$1(i)))}if(!r){if(this.expect(")"),this.match("=>")&&(64===e.type&&"yield"===e.name&&(r=!0,e={type:ArrowParameterPlaceHolder,params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===e.type)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var a=37===e.type?e.expressions:[e];e={type:ArrowParameterPlaceHolder,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new Identifier$1(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var i=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];e=new NewExpression$1(i,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.matchImportCall=function(){var e=this.matchKeyword("import");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=7===n.type&&"("===n.value}return e},e.prototype.parseImportCall=function(){var e=this.createNode();return this.expectKeyword("import"),this.finalize(e,new Import)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),r=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();e=this.finalize(this.startNode(t),new StaticMemberExpression(e,i))}else if(this.match("(")){var o=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=o?this.parseAsyncArguments():this.parseArguments();if(77===e.type&&1!==a.length&&this.tolerateError(Messages.BadImportCallArity),e=this.finalize(this.startNode(t),new CallExpression$1(e,a)),o&&this.match("=>")){for(var s=0;s<a.length;++s)this.reinterpretExpressionAsPattern(a[s]);e={type:ArrowParameterPlaceHolder,params:a,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(this.startNode(t),new ComputedMemberExpression(e,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(this.startNode(t),new TaggedTemplateExpression$1(e,u))}return this.context.allowIn=r,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new Super)},e.prototype.parseLeftHandSideExpression=function(){assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new ComputedMemberExpression(t,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");n=this.parseIdentifierName();t=this.finalize(e,new StaticMemberExpression(t,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new TaggedTemplateExpression$1(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment);var i=!0;e=this.finalize(n,new UpdateExpression$1(r.value,e,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value;i=!1;e=this.finalize(this.startNode(t),new UpdateExpression$1(o,e,i))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new UnaryExpression$1(n.value,e)),this.context.strict&&"delete"===e.operator&&64===e.argument.type&&this.tolerateError(Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(44!==t.type&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,r=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new BinaryExpression$1("**",n,r))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?12:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=!0,r=!0,i=function(e){"&&"!==e.value&&"||"!==e.value||(r=!1),"??"===e.value&&(n=!1)},o=this.lookahead,a=this.binaryPrecedence(o);if(a>0){i(o),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var s=[e,this.lookahead],u=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[u,o.value,c],p=[a];!((a=this.binaryPrecedence(this.lookahead))<=0);){for((n||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(r||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),i(this.lookahead);l.length>2&&a<=p[p.length-1];){c=l.pop();var h=l.pop();p.pop(),u=l.pop(),s.pop();var d=s[s.length-1],f=this.startNode(d,d.lineStart);l.push(this.finalize(f,new BinaryExpression$1(h,u,c)))}l.push(this.nextToken().value),p.push(a),s.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=l.length-1;t=l[m];for(var g=s.pop();m>1;){d=s.pop();var y=g&&g.lineStart;f=this.startNode(d,y),h=l[m-1];t=this.finalize(f,new BinaryExpression$1(h,l[m-2],t)),m-=2,g=d}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new ConditionalExpression$1(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case 64:this.validateParam(e,t,t.name);break;case 69:this.checkPatternParam(e,t.argument);break;case 61:this.checkPatternParam(e,t.left);break;case 60:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case 66:for(n=0;n<t.properties.length;n++){var r=t.properties[n];this.checkPatternParam(e,69===r.type?r:r.value)}}e.simple=e.simple&&t instanceof Identifier$1},e.prototype.reinterpretAsCoverFormalsList=function(e){var t=[e],n={simple:!0,paramSet:{}},r=!1;switch(e.type){case 64:break;case ArrowParameterPlaceHolder:t=e.params,r=e.async;break;default:return null}for(var i=0;i<t.length;++i){61===(o=t[i]).type?92===o.right.type&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=64,o.right.name="yield",delete o.right.argument,delete o.right.delegate):r&&64===o.type&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,o),t[i]=o}if(this.context.strict||!this.context.allowYield)for(i=0;i<t.length;++i){var o;92===(o=t[i]).type&&this.throwUnexpectedToken(this.lookahead)}if(n.message===Messages.StrictParamDupe){var a=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(a,n.message)}return{simple:n.simple,params:t,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),e={type:ArrowParameterPlaceHolder,params:[r],async:!0}}if(e.type===ArrowParameterPlaceHolder||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,o=this.reinterpretAsCoverFormalsList(e);if(o){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var a=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=o.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=i;var l=this.startNode(t);this.expect("=>");var p=void 0;if(this.match("{")){var h=this.context.allowIn;this.context.allowIn=!0,p=this.parseFunctionSourceElements(),this.context.allowIn=h}else p=this.isolateCoverGrammar(this.parseAssignmentExpression);var d=76!==p.type;this.context.strict&&o.firstRestricted&&this.throwUnexpectedToken(o.firstRestricted,o.message),this.context.strict&&o.stricted&&this.tolerateUnexpectedToken(o.stricted,o.message),e=i?this.finalize(l,new AsyncArrowFunctionExpression(o.params,p,d)):this.finalize(l,new ArrowFunctionExpression$1(o.params,p,d)),this.context.strict=a,this.context.allowStrictDirective=s,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.strict&&64===e.type){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var m=(n=this.nextToken()).value,g=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new AssignmentExpression$1(m,e,g)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new SequenceExpression$1(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalImportDeclaration),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new BlockStatement$1(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&64===r.type&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&64!==r.type||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new VariableDeclarator$1(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new VariableDeclaration$1(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,a=!1;if(3===this.lookahead.type){var s=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new Identifier$1(s.value));if(this.match("=")){e.push(s),a=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(s),new AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(s),a=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new Property("init",n,o,r,!1,a))},e.prototype.parseRestProperty=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestProperty),this.match("}")||this.throwError(Messages.PropertyAfterRestProperty),this.finalize(n,new RestElement(r))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.match("...")?this.parseRestProperty(e,t):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new Identifier$1(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===n.type||e.inFor||this.expect("="),this.finalize(t,new VariableDeclarator$1(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new VariableDeclaration$1(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new EmptyStatement$1)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ExpressionStatement$1(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new IfStatement$1(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new DoWhileStatement$1(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new WhileStatement$1(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,o=null,a=!0,s=!1,u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.await||this.tolerateUnexpectedToken(this.lookahead),s=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var l=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!s&&1===l.length&&this.matchKeyword("in")){var p=l[0];p.init&&(60===p.id.type||66===p.id.type||this.context.strict)&&this.tolerateError(Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;l=this.parseBindingList(h,{inFor:!0});this.context.allowIn=c,1===l.length&&null===l[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new VariableDeclaration$1(l,h)))}else r=this.finalize(r,new Identifier$1(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead,f=this.context.isBindingElement,m=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.context.isBindingElement=f,this.context.isAssignmentTarget=m,this.context.firstCoverInitializedNameError=g,this.match(",")){for(var y=[r];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new SequenceExpression$1(y))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(o=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(u,new ForStatement$1(r,i,o,n)):a?this.finalize(u,new ForInStatement$1(e,t,n)):this.finalize(u,new ForOfStatement$1(e,t,n,s))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(Messages.IllegalContinue),this.finalize(e,new ContinueStatement$1(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(Messages.IllegalBreak),this.finalize(e,new BreakStatement$1(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new ReturnStatement$1(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new WithStatement$1(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new SwitchCase$1(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var o=this.parseSwitchCase();null===o.test&&(i&&this.throwError(Messages.MultipleDefaultsInSwitch),i=!0),r.push(o)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new SwitchStatement$1(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(64===n.type&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var o=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),o=this.parseClassDeclaration();else if(this.matchKeyword("function")){var a=this.lookahead,s=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(a,Messages.StrictFunction):s.generator&&this.tolerateUnexpectedToken(a,Messages.GeneratorInLegacyContext),o=s}else o=this.parseStatement();delete this.context.labelSet[i],e=new LabeledStatement$1(r,o)}else this.consumeSemicolon(),e=new ExpressionStatement$1(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ThrowStatement$1(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i<t.length;i++){var o="$"+t[i].value;Object.prototype.hasOwnProperty.call(r,o)&&this.tolerateError(Messages.DuplicateBinding,t[i].value),r[o]=!0}this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictCatchVariable),this.expect(")");var a=this.parseBlock();return this.finalize(e,new CatchClause$1(n,a))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(Messages.NoCatchOrFinally),this.finalize(e,new TryStatement$1(t,n,r))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new DebuggerStatement$1)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(e,new BlockStatement$1(t))},e.prototype.validateParam=function(e,t,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[r]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestParameter),this.match(")")||this.throwError(Messages.ParameterAfterRestParameter),this.finalize(t,new RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),r=0;r<t.length;r++)this.validateParam(e,t[r],t[r].value);e.simple=e.simple&&n instanceof Identifier$1,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t={simple:!0,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r,i=!n&&this.match("*");i&&this.nextToken();var o=null,a=null;if(!e||!this.match("(")){var s=this.lookahead;o=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(s.value)&&this.tolerateUnexpectedToken(s,Messages.StrictFunctionName):this.scanner.isRestrictedWord(s.value)?(a=s,r=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(s.value)&&(a=s,r=Messages.StrictReservedWord)}var u=this.context.await,c=this.context.allowYield;this.context.await=n,this.context.allowYield=!i;var l=this.parseFormalParameters(a),p=l.params,h=l.stricted;a=l.firstRestricted,l.message&&(r=l.message);var d=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;var m=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,r),this.context.strict&&h&&this.tolerateUnexpectedToken(h,r),this.context.strict=d,this.context.allowStrictDirective=f,this.context.await=u,this.context.allowYield=c,n?this.finalize(t,new AsyncFunctionDeclaration(o,p,m)):this.finalize(t,new FunctionDeclaration$1(o,p,m,i))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,r=!t&&this.match("*");r&&this.nextToken();var i,o=null,a=this.context.await,s=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!r,!this.match("(")){var u=this.lookahead;o=this.context.strict||r||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(i=u,n=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(i=u,n=Messages.StrictReservedWord)}var c=this.parseFormalParameters(i),l=c.params,p=c.stricted;i=c.firstRestricted,c.message&&(n=c.message);var h=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var f=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=h,this.context.allowStrictDirective=d,this.context.await=a,this.context.allowYield=s,t?this.finalize(e,new AsyncFunctionExpression(o,l,f)):this.finalize(e,new FunctionExpression$1(o,l,f,r))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),r=65===n.type?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,r?new Directive(n,r):new ExpressionStatement$1(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var r=this.parseDirective();t.push(r);var i=r.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(Messages.BadSetterArity):n.params[0]instanceof RestElement&&this.tolerateError(Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(a=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,u=!0,a=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var l=this.lookahead.value;":"!==l&&"("!==l&&"*"!==l&&(c=!0,t=this.lookahead,a=this.match("["),i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(r="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod()):"set"===t.value&&p&&(r="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(r="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0),!r&&i&&this.match("(")&&(r="init",o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),a||(u&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,Messages.StaticPrototype),!u&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!s||o&&o.generator)&&this.throwUnexpectedToken(t,Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new MethodDefinition(i,a,o,r,u))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new Literal$1(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();e=this.finalize(t,new ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(Messages.UnexpectedToken,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new ExportAllDeclaration(i))}else if(4===this.lookahead.type){n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){n=this.parseFunctionDeclaration();e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else{var o=[],a=null,s=!1;for(this.expect("{");!this.match("}");)s=s||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),a=this.parseModuleSpecifier(),this.consumeSemicolon();else if(s){r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();e=this.finalize(t,new ExportNamedDeclaration(null,o,a))}return e},e}(),Reader=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","??","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!0,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),Tokenizer=function(){function e(e,t){this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new Reader}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],r=this.scanner.source.slice(n.slice[0],n.slice[1]),i={type:n.multiLine?"BlockComment":"LineComment",value:r};this.trackRange&&(i.range=n.range),this.trackLoc&&(i.loc=n.loc),this.buffer.push(i)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var s=this.scanner.saveState();try{a=this.scanner.scanRegExp()}catch(n){this.scanner.restoreState(s),a=this.scanner.lex()}}else a=this.scanner.lex();this.reader.push(a);var u={type:TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var c=a.pattern,l=a.flags;u.regex={pattern:c,flags:l}}this.buffer.push(u)}}return this.buffer.shift()},e}();function parse(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},o="function"==typeof n?i:null,a=!1;if(t){a="boolean"==typeof t.comment&&t.comment;var s="boolean"==typeof t.attachComment&&t.attachComment;(a||s)&&((r=new CommentHandler).attach=s,t.comment=!0,o=i)}var u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType);var c=new Parser(e,t,o),l=u?c.parseModule():c.parseScript();return a&&r&&(l.comments=r.comments),c.config.tokens&&(l.tokens=c.tokens),c.config.tolerant&&(l.errors=c.errorHandler.errors),l}function parseModule(e,t,n){var r=t||{};return r.sourceType="module",parse(e,r,n)}function parseScript(e,t,n){var r=t||{};return r.sourceType="script",parse(e,r,n)}function tokenize(e,t,n){var r=new Tokenizer(e,t),i=[];try{for(;;){var o=r.getNextToken();if(!o)break;n&&(o=n(o)),i.push(o)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i}var C_COMPLETION_RETURN={type:"return",value:void 0},C_COMPLETION_CONTINUE={type:"continue",value:null},C_COMPLETION_BREAK={type:"break",value:null},NOINIT=createSymbol("noinit"),DEADZONE=createSymbol("deadzone");function createSymbol(e){return e+Math.random().toString(36).substring(2)}function getGetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.get)return n.get;e=getPrototypeOf(e)}}function getSetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.set)return n.set;e=getPrototypeOf(e)}}var hostGlobalObject="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function isCompletionRecord(e){return e===C_COMPLETION_RETURN||e===C_COMPLETION_BREAK||e===C_COMPLETION_CONTINUE}function createSandbox(){var e={};return["Object","Function","Array","Number","Boolean","String","RegExp","Promise","Date","Map","Set","WeakMap","WeakSet","NaN","JSON","Math","eval","isFinite","isNaN","clearTimeout","setTimeout","clearInterval","setInterval","console","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","parseFloat","parseInt","Symbol","Infinity"].forEach((function(t){void 0!==hostGlobalObject[t]&&(e[t]=hostGlobalObject[t])})),e}var errorMessage={notImplemented:"%0 isn't implemented",unexpectedToken:"Unexpected token",deleteUnqualified:"Delete of an unqualified identifier in strict mode",identifierDeclared:"Identifier %0 has already been declared",assignmentToConst:"Assignment to constant variable",notFunction:"%0 is not a function",convertNullToObject:"Cannot convert undefined or null to object",notDefined:"%0 is not defined",notIterable:"%0 is not iterable"};function createTypeErrorByMessage(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.reduce((function(e,t,n){return e.replace("%".concat(n),t)}),errorMessage[e]);return new TypeError(r)}var VariableAccessor=function(){function e(e,t){this.kind=e,this.value=t}return e.prototype.set=function(e){return this.value=e},e.prototype.strictSet=function(e){"use strict";return this.value=e},e}(),ConstVariableAccessor=function(){function e(e,t){this.value=t,this.kind=3}return e.prototype.set=function(e){throw new TypeError(errorMessage.assignmentToConst)},e.prototype.strictSet=function(e){throw new TypeError(errorMessage.assignmentToConst)},e}(),VariableAccecssorMappingGlobal=function(){function e(e,t){this.globalObject=e,this.globalKey=t,this.kind=1}return Object.defineProperty(e.prototype,"value",{get:function(){return this.globalObject[this.globalKey]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.globalObject[this.globalKey]=e},e.prototype.strictSet=function(e){"use strict";return this.globalObject[this.globalKey]=e},e}(),PropertyAccessor=function(){function e(e,t){this.object=e,this.property=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.object[this.property]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.object[this.property]=e},e.prototype.strictSet=function(e){"use strict";return this.object[this.property]=e},e.prototype.delete=function(){return delete this.object[this.property]},e.prototype.strictDelete=function(){"use strict";return delete this.object[this.property]},e}(),GlobalObjectAccessor=function(){function e(e){this.globalObject=e,this.propertyAccessors=Object.create(null)}return e.prototype.getProperty=function(e){var t=this.propertyAccessors[e];return t||(t=this.propertyAccessors[e]=new PropertyAccessor(this.globalObject,e)),t},e.prototype.deleteProperty=function(e){return delete this.globalObject[e]},e}(),RuntimeScope=function(){function e(e,t){this.engine=e,this.strict=!1,this.isolated=!0,this.context=Object.create(null),this.parent=t,t&&t.strict&&(this.strict=!0)}return e.prototype.setCompileScope=function(e){this.compileScope=e},e.prototype.getCompileScope=function(){return this.compileScope},e.prototype.find=function(e){var t=this.context[e];return t||(this.parent?this.parent.find(e):void 0)},e.prototype.var=function(e,t){var n=this.context,r=n[e];r?t!==NOINIT&&r.set(t):n[e]=new VariableAccessor(1,t===NOINIT?void 0:t)},e.prototype.let=function(e,t){var n=this.context[e];if(n){if(n.value!==DEADZONE)throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));n.set(t)}else this.context[e]=new VariableAccessor(2,t)},e.prototype.const=function(e,t){var n=this.context[e];if(n&&n.value!==DEADZONE)throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context[e]=new ConstVariableAccessor(3,t)},e.prototype.func=function(e,t){var n=this.context,r=n[e];r?this.strict?r.strictSet(t):r.set(t):n[e]=new VariableAccessor(1,t)},e.prototype.declare=function(e,t,n){switch(e){case 1:this.var(t,n);break;case 2:this.let(t,n);break;case 3:this.const(t,n)}},e}(),BlockRuntimeScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];if(i)t!==NOINIT&&i.set(t);else{var o=t===NOINIT?void 0:t;r[e]=new VariableAccessor(1,o)}},t.prototype.func=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];i?n.strict?i.strictSet(t):i.set(t):r[e]=new VariableAccessor(1,t)},t}(RuntimeScope),WithRuntimeScope=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.withObject=r,i}return __extends(t,e),t.prototype.find=function(e){return this.context[e]?this.context[e]:e in this.withObject?new PropertyAccessor(this.withObject,e):this.parent?this.parent.find(e):void 0},t.prototype.var=function(t,n){t in this.withObject?this.withObject[t]=n:e.prototype.var.call(this,t,n)},t}(BlockRuntimeScope),CompileScope=function(){function e(e,t){this.engine=e,this.strict=!1,this.isolated=!0,this.context=new Map,this.contexts=[],this.parent=t,t&&t.strict&&(this.strict=!0)}return e.prototype.var=function(e){var t=this.context,n=t.get(e);n||(t.set(e,{kind:1,index:t.size}),this.contexts.push(e))},e.prototype.let=function(e){var t=this.context;if(t.get(e))throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context.set(e,{kind:2,index:t.size}),this.contexts.push(e)},e.prototype.const=function(e){var t=this.context;if(t.get(e))throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context.set(e,{kind:3,index:t.size}),this.contexts.push(e)},e.prototype.func=function(e){var t=this.context,n=t.get(e);n||(t.set(e,{kind:1,index:t.size}),this.contexts.push(e))},e}(),BlockCompileScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.var(e)},t.prototype.func=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.func(e)},t}(CompileScope),GlobalCompileScope=function(e){function t(t){var n=e.call(this,t,null)||this;return n.engine=t,n}return __extends(t,e),t.prototype.var=function(t){return e.prototype.var.call(this,t)},t.prototype.func=function(t){return e.prototype.func.call(this,t)},t}(CompileScope),GlobalRuntimeScope=function(e){function t(t,n){var r=e.call(this,t,null)||this;return r.engine=t,r.globalObject=n,r.objectBindings=createDefaultGlobalObjectBindings(n),r.setCompileScope(new GlobalCompileScope(t)),r}return __extends(t,e),t.prototype.var=function(e,t){var n=this.context,r=n[e];if(r)t!==NOINIT&&r.set(t);else{var i=t===NOINIT?void 0:t,o=n.this.value,a=new VariableAccecssorMappingGlobal(o,e);n[e]=a,e in o?t!==NOINIT&&a.set(i):defineProperty(o,e,{value:i,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.func=function(e,t){var n=this.context,r=n[e];if(r)this.strict?r.strictSet(t):r.set(t);else{var i=n.this.value,o=new VariableAccecssorMappingGlobal(i,e);n[e]=o,e in i?this.strict?o.strictSet(t):o.set(t):defineProperty(i,e,{value:t,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.find=function(e){var t;return(t=this.context[e])?t:(t=this.objectBindings[e])||(e in this.globalObject?this.objectBindings[e]=new VariableAccecssorMappingGlobal(this.globalObject,e):void 0)},t}(RuntimeScope);function createDefaultGlobalObjectBindings(e){var t=Object.create(null);return t.String={kind:1,get value(){return e.String},set:function(t){return e.String=t},strictSet:function(t){"use strict";return e.String=t}},t.Function={kind:1,get value(){return e.Function},set:function(t){return e.Function=t},strictSet:function(t){"use strict";return e.Function=t}},t.Array={kind:1,get value(){return e.Array},set:function(t){return e.Array=t},strictSet:function(t){"use strict";return e.Array=t}},t.Number={kind:1,get value(){return e.Number},set:function(t){return e.Number=t},strictSet:function(t){"use strict";return e.Number=t}},t.Object={kind:1,get value(){return e.Object},set:function(t){return e.Object=t},strictSet:function(t){"use strict";return e.Object=t}},t.setTimeout={kind:1,get value(){return e.setTimeout},set:function(t){return e.setTimeout=t},strictSet:function(t){"use strict";return e.setTimeout=t}},t.clearTimeout={kind:1,get value(){return e.clearTimeout},set:function(t){return e.clearTimeout=t},strictSet:function(t){"use strict";return e.clearTimeout=t}},t.setInterval={kind:1,get value(){return e.setInterval},set:function(t){return e.setInterval=t},strictSet:function(t){"use strict";return e.setInterval=t}},t.clearInterval={kind:1,get value(){return e.clearInterval},set:function(t){return e.clearInterval=t},strictSet:function(t){"use strict";return e.clearInterval=t}},t.console={kind:1,get value(){return e.console},set:function(t){return e.console=t},strictSet:function(t){"use strict";return e.console=t}},t}function noop$1(){}function combineCallable(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n){return e(n),t(n)}:e:t}function combineCallableWithOptions(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n,r){return e(n,r),t(n,r)}:e:t}function XInlineObjectPattern(e,t,n,r){for(var i=r.kind,o=noop$1,a=t.properties,s=function(t){var n,r=a[t];if(68===r.type){var s;s=r.computed?createEvaluate(e,r.key):function(){return r.key.name};var u=r.value;if(64===u.type)n=function(e,t){var n=t.feed,r=t.key;if(i)e.declare(i,u.name,n[r]);else{var o=ZInlineIdentifierAccessor(u.name,e,0);o&&o.set(n[r])}};else{var c=XInlinePattern(e,u,void 0,{kind:i});n=function(e,t){var n=t.feed,r=t.key;return c(e,{feed:n[r]})}}o=combineCallableWithOptions(o,(function(e,t){var r=t.feed,i=t.fedKeys,o=s(e);return i.push(o),n(e,{fedKeys:i,feed:r,key:o})}))}else{var l=XInlineRestElement(e,r,void 0,{kind:i});o=combineCallableWithOptions(o,(function(e,t){for(var n=t.feed,r=t.fedKeys,i=assignObject({},n),o=0;o<r.length;o++)delete i[r[o]];return l(e,{feed:i})}))}},u=0;u<a.length;u++)s(u);return function(e,t){var n=t.feed;return o(e,{feed:n,fedKeys:[]})}}function XInlineArrayPattern(e,t,n,r){for(var i=r.kind,o=t.elements,a=noop$1,s=function(t){var n=o[t];if(!n)return"continue";if(64===n.type)a=combineCallableWithOptions(a,i?function(e,r){var o=r.feed;e.declare(i,n.name,o[t])}:function(e,r){var i=r.feed,o=r.result,a=ZInlineIdentifierAccessor(n.name,e,0);a&&(a.set(i[t]),o.push(a.value))});else if(69===n.type){var r=XInlineRestElement(e,n,void 0,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var i=n.feed;return r(e,{feed:i.slice(t)})}))}else{var s=XInlinePattern(e,n,void 0,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var r=n.feed;return s(e,{feed:r[t]})}))}},u=0;u<o.length;u++)s(u);return function(e,t){var n=t.feed,r=[];if(a(e,{feed:void 0===n?[]:n,result:r}),r.length)return r}}function XInlineFunctionArguments(e,t){for(var n=t.params,r=noop$1,i=function(e){var t=n[e];r=combineCallableWithOptions(r,(function(n,r){n.var(t.name,r[e])}))},o=0;o<n.length;o++)i(o);return r}function XInlineRestElement(e,t,n,r){var i=r.kind,o=t.argument;if(64===o.type)return i?function(e,t){var n=t.feed,r=void 0===n?[]:n;e.declare(i,o.name,r)}:function(e,t){var n=t.feed,r=void 0===n?[]:n,i=ZInlineIdentifierAccessor(o.name,e,0);i&&i.set(r)};var a=XInlinePattern(e,o,void 0,{kind:i});return function(e,t){var n=t.feed;return a(e,{feed:void 0===n?[]:n})}}function XInlineAssignmentPattern(e,t,n,r){var i,o=r.kind,a=createEvaluate(e,t.right),s=t.left;return i=64===s.type?o?function(e,t){var n=t.feed;e.declare(o,s.name,n)}:function(e,t){var n=t.feed,r=ZInlineIdentifierAccessor(s.name,e,0);r&&r.set(n)}:XInlinePattern(e,s,void 0,{kind:o}),function(e,t){var n=t.feed,r=void 0===n?a(e):n;return i(e,{feed:r})}}function XInlinePattern(e,t,n,r){switch(t.type){case 66:return XInlineObjectPattern(e,t,void 0,r);case 60:return XInlineArrayPattern(e,t,void 0,r);case 69:return XInlineRestElement(e,t,void 0,r);case 61:return XInlineAssignmentPattern(e,t,void 0,r);default:throw new SyntaxError(errorMessage.unexpectedToken)}}function XRuntimeScopeHoistPattern(e,t,n,r){var i=noop$1;switch(t.type){case 66:for(var o=t.properties,a=function(t){var n=o[t];if(68===n.type){var a=n.value;i=64===a.type?combineCallable(i,(function(e){e.declare(r,a.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,a,void 0,r))}else i=combineCallable(i,XRuntimeScopeHoistPattern(e,n,void 0,r))},s=0;s<o.length;s++)a(s);break;case 60:var u=t.elements,c=function(t){var n=u[t];n&&(i=64===n.type?combineCallable(i,(function(e){e.declare(r,n.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,n,void 0,r)))};for(s=0;s<u.length;s++)c(s);break;case 69:var l=t.argument;i=64===l.type?combineCallable(i,(function(e){e.declare(r,l.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,l,void 0,r));break;case 61:var p=t.left;i=64===p.type?combineCallable(i,(function(e){e.declare(r,p.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,p,void 0,r));break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return i}var checkStrictInBody=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(5===n.type){var r="use strict"===n.directive;if(r)return r}}return!1};function XCreateFunction(e,t){if(t.generator||t.async)throw new Error(errorMessage.notImplemented.replace("%0","Generator or async function"));var n,r=31===t.type,i=e.runtimeProfile,o=i.scriptId,a=t.params.length,s=t.id&&t.id.name||"",u=t.body,c=!1;if(76===u.type){c=checkStrictInBody(u.body);var l=XRuntimeScopeHoist(e,u,void 0,0),p=XInlineBlockStatement(e,u,void 0,3);n=combineCallable(l,p)}else{var h=createEvaluate(e,u);n=function(e){var t=h(e);return r&&(C_COMPLETION_RETURN.value=t,t=C_COMPLETION_RETURN),t}}var d=XInlineFunctionArguments(e,t);return function(u){var l=function(){var a=new RuntimeScope(e,u),s=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:l.name,functionScope:a,functionNode:t}),r||(a.const("this",this),a.var("arguments",arguments));try{d(a,arguments);var c=n(a);if(i.popCallFrame(),i.scriptId=s,c===C_COMPLETION_RETURN)return c.value}catch(t){var p=e.inspector;if(p&&!i.callExpressionStack.length){var h=getBoatmanSymbol(t,"__rewrittenzxcd");h&&h.node&&(p.shouldPauseOnException(o,t,h.node,!0),p.throwException(t))}throw i.popCallFrame(),i.scriptId=s,t}},p=function(){"use strict";var a=new RuntimeScope(e,u);a.strict=!0;var s=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:p.name,functionScope:a,functionNode:t}),r||(a.const("this",this),a.const("arguments",arguments));try{d(a,arguments);var c=n(a);if(i.popCallFrame(),i.scriptId=s,c===C_COMPLETION_RETURN)return c.value}catch(t){var l=e.inspector;if(l&&!i.callExpressionStack.length){var h=getBoatmanSymbol(t,"__rewrittenzxcd");h&&h.node&&(l.shouldPauseOnException(o,t,h.node,!0),l.throwException(t))}throw i.popCallFrame(),i.scriptId=s,t}},h=u.strict||c?p:l;return isFunctionNameConfigurable&&defineProperties(h,{name:{value:s,configurable:!0},length:{value:a,configurable:!0}}),setBoatmanSymbol(h,"___func_locationxasdzzy",{node:t,scriptId:e.runtimeProfile.scriptId}),defineProperty(h,"toString",{value:function(){return"function ".concat(s,"() { ... }")},writable:!0,configurable:!0}),h}}function XRuntimeScopeHoist(e,t,n,r){for(var i=noop$1,o=t.body,a=function(t){var n=o[t];if(63===n.type){var r=XCreateFunction(e,n);i=combineCallable(i,(function(e){return e.func(n.id.name,r(e))}))}else i=combineCallable(i,XRuntimeScopeHoistVarRecursion(e,n))},s=0;s<o.length;s++)a(s);var u=checkStrictInBody(o);return function(e){e.strict||(e.strict=u),i(e)}}function XRuntimeScopeHoistVarRecursion(e,t,n){var r=noop$1;switch(t.type){case 17:r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t,void 0));break;case 6:case 7:17===t.left.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.left,void 0)));case 8:8===t.type&&t.init&&17===t.init.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.init,void 0)));case 15:case 4:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.body,void 0));break;case 9:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.consequent,void 0)),t.alternate&&(r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.alternate,void 0)));break;case 76:for(var i=t.body,o=0;o<i.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,i[o],void 0));break;case 12:var a=t.cases;for(o=0;o<a.length;o++)for(var s=a[o].consequent,u=0;u<s.length;u++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,s[u],void 0));break;case 14:var c=t.block.body;for(o=0;o<c.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,c[o],void 0));var l=t.handler&&t.handler.body.body;if(l)for(o=0;o<l.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,l[o],void 0));var p=t.finalizer&&t.finalizer.body;if(p)for(o=0;o<p.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,p[o],void 0))}return r}function XRuntimeScopeVariableDeclaration4Hoisting(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];1===o&&(r=combineCallable(r,(function(e){e.var(t.id.name,NOINIT)})))},s=0;s<i.length;s++)a(s);return r}function XRuntimeScopeVariableDeclaration4HoistingLetConst(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];r=combineCallable(r,(function(e){e.declare(o,t.id.name,DEADZONE)}))},s=0;s<i.length;s++)a(s);return r}function Program(e,t,n){for(var r=XRuntimeScopeHoist(e,t,void 0,0),i=[],o=t.body,a=0;a<o.length;a++)i[a]=createEvaluate(e,o[a]);return function(n){r(n);var o=e.runtimeProfile;o.pushCallFrame({functionName:"",functionNode:t,functionScope:n});try{for(var a=void 0,s=0;s<i.length;s++)a=i[s](n);return o.popCallFrame(),a}catch(e){throw o.popCallFrame(),e}}}function Identifier(e,t,n,r){return function(e){var n=t.name;if("undefined"!==n){var i=e.find(n);if(i)return i.value;if(!r)throw new ReferenceError(errorMessage.notDefined.replace("%0",n))}}}function ZInlineIdentifierAccessor(e,t,n){if("undefined"!==e){var r=t.find(e);if(r)return r;if(!n)throw new ReferenceError(errorMessage.notDefined.replace("%0",e))}}function Literal(e,t,n){return function(e){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var n=t.regex,r=n.pattern,i=n.flags;return new RegExp(r,i)}return t.value}}function FunctionDeclaration(){return noop$1}function VariableDeclaration(e,t,n){for(var r=t.declarations,i=t.kind,o=[],a=0;a<r.length;a++)o[a]=VariableDeclarator(e,r[a],void 0,i);return function(e){for(var t=0;t<o.length;t++)o[t](e)}}function VariableDeclarator(e,t,n,r){var i=t.init,o=i?createEvaluate(e,i):noop$1;return function(e){var n=o(e),r=t.id.name;i&&e.var(r,n),!i||36!==i.type&&31!==i.type||!isFunctionNameConfigurable||n.name||defineProperty(n,"name",{value:r,configurable:!0})}}function XInlineVariableDeclarationWithInitializer(e,t,n){for(var r=t.declarations,i=(t.kind,0);i<r.length;i++){r[i].id;1}return function(e,n){for(var r=t.declarations,i=t.kind,o=0;o<r.length;o++){var a=r[o].id;e.declare(i,a.name,n)}}}var functionPrototypeApply=Function.prototype.apply;function ThisExpression(e,t,n){return function(e){return e.find("this").value}}function XInlineSpreadElement(e,t){for(var n=t,r=n.length,i=new Array(r),o=0;o<r;o++){var a=n[o];null===a||(i[o]=createEvaluate(e,a))}return function(e){for(var t=new Array(r),o=0;o<r;o++){null!==n[o]&&(t[o]=i[o](e))}return t}}function ArrayExpression(e,t,n){var r=XInlineSpreadElement(e,t.elements);return function(e){return r(e)}}function ObjectExpression(e,t,n){for(var r=t.properties,i=[],o=[],a=function(t){var n=r[t],a=n.key,s=void 0;s=64===a.type?function(){return a.name}:function(){return a.value+""},i[t]=s;var u=n.value;o[t]=createEvaluate(e,u)},s=0;s<r.length;s++)a(s);return function(e){for(var n={},r=t.properties,a=0;a<r.length;a++){0;var s=i[a](e),u=o[a](e),c=r[a],l=c.value;36!==l.type&&31!==l.type||isFunctionNameConfigurable&&defineProperty(u,"name",{value:s,configurable:!0});var p=c.kind;if("init"===p)n[s]=u;else if("get"===p){var h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:u,set:h&&h.set,enumerable:!0,configurable:!0})}else{h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:h&&h.get,set:u,enumerable:!0,configurable:!0})}}return n}}function FunctionExpression(e,t,n){var r=XCreateFunction(e,t);return t.id&&t.id.name?function(n){var i=new BlockRuntimeScope(e,n),o=r(i);return i.const(t.id.name,o),o}:function(e){return r(e)}}function UnaryExpression(e,t,n){if(6===t.operator){var r,i=t.argument;return r=64===i.type?Identifier(e,i,void 0,1):createEvaluate(e,i),function(e){return typeof r(e)}}if(7===t.operator){var o,a=t.argument;if(39===a.type){var s=XInlineMemberExpressionAccessor(e,a,void 0);o=function(e){var t=s(e);return e.strict?t.strictDelete():t.delete()}}else o=64===a.type?function(t){if(t.strict)throw new SyntaxError(errorMessage.deleteUnqualified);for(var n=t,r=a.name;n&&!n.context[r];)n=n.parent;if(n){if(n.parent||1!==n.context[r].kind)return!1;var i=e.globalObjectAccessor.deleteProperty(r);return i&&delete n.context[r],i}return e.globalObjectAccessor.deleteProperty(r)}:combineCallable(createEvaluate(e,a),(function(){return!0}));return o}var u=t.argument,c=createEvaluate(e,u);return function(e){switch(t.operator){case 3:return!c(e);case 1:return+c(e);case 2:return-c(e);case 4:return~c(e);case 5:return void c(e);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function UpdateExpression(e,t,n){var r,i=t.argument;switch(i.type){case 64:r=function(e){return ZInlineIdentifierAccessor(i.name,e,0)};break;case 39:r=XInlineMemberExpressionAccessor(e,i,void 0);break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return function(e){var n,i=r(e),o=i.value;switch(t.operator){case 1:return n=o++,e.strict?i.strictSet(o):i.set(o),t.prefix?o:n;case 2:return n=o--,e.strict?i.strictSet(o):i.set(o),t.prefix?o:n;default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function BinaryExpression(e,t,n){var r=createEvaluate(e,t.left),i=createEvaluate(e,t.right);return function(e){var n=r(e),o=i(e);switch(t.operator){case 1:return n==o;case 2:return n!=o;case 3:return n===o;case 4:return n!==o;case 5:return n<o;case 6:return n<=o;case 7:return n>o;case 8:return n>=o;case 12:return n+o;case 13:return n-o;case 14:return n*o;case 16:return n/o;case 17:return n%o;case 22:return n instanceof o;case 18:return n|o;case 19:return n^o;case 20:return n&o;case 9:return n<<o;case 10:return n>>o;case 21:return n in o;case 11:return n>>>o;case 15:return Math.pow(n,o);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function AssignmentExpression(e,t,n){var r,i,o=createEvaluate(e,t.right),a=t.left;switch(a.type){case 64:r=function(t){var n;return(n=ZInlineIdentifierAccessor(a.name,t,t.strict?0:1))||(n=e.globalObjectAccessor.getProperty(a.name)),n};break;case 39:r=XInlineMemberExpressionAccessor(e,a,void 0);break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return function(e){var n;if(!r)return i(e);n=r(e);var a=o(e);switch(t.operator){case 1:return e.strict?n.strictSet(a):n.set(a),n.value;case 2:return e.strict?n.strictSet(n.value+a):n.set(n.value+a),n.value;case 3:return e.strict?n.strictSet(n.value-a):n.set(n.value-a),n.value;case 4:return e.strict?n.strictSet(n.value*a):n.set(n.value*a),n.value;case 5:return e.strict?n.strictSet(n.value/a):n.set(n.value/a),n.value;case 6:return e.strict?n.strictSet(n.value%a):n.set(n.value%a),n.value;case 13:return e.strict?n.strictSet(n.value&a):n.set(n.value&a),n.value;case 11:return e.strict?n.strictSet(n.value|a):n.set(n.value|a),n.value;case 12:return e.strict?n.strictSet(n.value^a):n.set(n.value^a),n.value;case 8:return e.strict?n.strictSet(n.value<<a):n.set(n.value<<a),n.value;case 9:return e.strict?n.strictSet(n.value>>a):n.set(n.value>>a),n.value;case 10:return e.strict?n.strictSet(n.value>>>a):n.set(n.value>>>a),n.value;case 7:return e.strict?n.strictSet(Math.pow(n.value,a)):n.set(Math.pow(n.value,a)),n.value;default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function LogicalExpression(e,t,n){var r=createEvaluate(e,t.left),i=createEvaluate(e,t.right);return function(e){switch(t.operator){case 1:return r(e)||i(e);case 2:return r(e)&&i(e);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function XInlineMemberExpressionAccessor(e,t,n){var r=createEvaluate(e,t.object),i=t.computed?createEvaluate(e,t.property):function(){return t.property.name};return function(e){var t=r(e),n=i(e);return new PropertyAccessor(t,n)}}function MemberExpression(e,t,n,r){var i=createEvaluate(e,t.object);if(t.computed){var o=createEvaluate(e,t.property);return function(e){return i(e)[o(e)]}}var a=t.property.name;return function(e){return i(e)[a]}}function ConditionalExpression(e,t,n){var r=createEvaluate(e,t.test),i=createEvaluate(e,t.consequent),o=createEvaluate(e,t.alternate);return function(e){return r(e)?i(e):o(e)}}function CallExpression(e,t,n){var r,i,o,a=t.callee;39===a.type?(i=createEvaluate(e,a.object),o=a.computed?createEvaluate(e,a.property):function(){return a.property.name}):r=createEvaluate(e,a);var s=XInlineSpreadElement(e,t.arguments);return function(n){var u,c;if(39===a.type){c=i(n);var l=o(n);if("function"!=typeof(u=c[l]))throw createTypeErrorByMessage("notFunction",l)}else if("function"!=typeof(u=r(n))){var p;if(64===a.type)p=a.name;else try{p=JSON.stringify(u)}catch(e){p=""+u}throw createTypeErrorByMessage("notFunction",p)}var h=s(n),d=e.runtimeProfile;d.pushCallExpression(t);try{var f=functionPrototypeApply.call(u,c,h);return d.popCallExpression(),f}catch(e){throw d.popCallExpression(),e}}}function NewExpression(e,t){var n=t.callee,r=createEvaluate(e,n),i=XInlineSpreadElement(e,t.arguments);return function(o){var a=r(o),s=i(o),u=e.runtimeProfile;u.pushCallExpression(t);try{var c=void 0;switch(s.length){case 0:c=new a;break;case 1:c=new a(s[0]);break;case 2:c=new a(s[0],s[1]);break;case 3:c=new a(s[0],s[1],s[2]);break;default:c=new(a.bind.apply(a,__spreadArray([void 0],s,!1)))}return u.popCallExpression(),c}catch(e){throw 64===n.type&&(e.message=e.message.replace(/\bconstruct\$0\b/g,n.name)),u.popCallExpression(),e}}}function SequenceExpression(e,t,n){for(var r=t.expressions,i=[],o=0;o<r.length;o++)i[o]=createEvaluate(e,r[o]);return function(e){for(var n,r=t.expressions,o=0;o<r.length;o++)n=i[o](e);return n}}function ArrowFunctionExpression(e,t,n){var r=XCreateFunction(e,t);return function(e){return r(e)}}function TemplateLiteral(e,t,n){for(var r=[],i=[],o=t.quasis,a=t.expressions,s=0;s<o.length;s++)r[s]=TemplateElement(e,o[s]);for(s=0;s<a.length;s++)i[s]=createEvaluate(e,a[s]);return function(e){for(var t,n,o=r.slice(),a=i.slice(),s="";t=o.shift();)s+=t(e),(n=a.shift())&&(s+=n(e));return s}}function TaggedTemplateExpression(e,t,n){var r=createEvaluate(e,t.tag),i=t.quasi.expressions,o=[];if(i)for(var a=0;a<i.length;a++)o.push(createEvaluate(e,i[a]));return function(e){var n=r(e),i=t.quasi.quasis,a=i.map((function(e){return e.value.cooked})),s=i.map((function(e){return e.value.raw}));return defineProperty(a,"raw",{value:freeze(s)}),n.apply(void 0,__spreadArray([freeze(a)],o.map((function(t){return t(e)})),!1))}}function TemplateElement(e,t,n){return function(e){return t.value.raw}}function SpreadElement(e,t,n){var r=createEvaluate(e,t.argument);return function(e){return r(e)}}function ExpressionStatement(e,t,n){var r=createEvaluate(e,t.expression);return function(e){return r(e)}}function XInlineBlockStatement(e,t,n,r){var i=noop$1;var o=t.body.map((function(t){return createEvaluate(e,t)}));return function(e){var t=e;i(t);for(var n=0,r=o;n<r.length;n++){var a=(0,r[n])(t);if(isCompletionRecord(a))return a}}}function BlockStatement(e,t,n,r){var i=t.body.map((function(t){return createEvaluate(e,t)}));return function(e){var t=e;for(var n=0,r=i;n<r.length;n++){var o=(0,r[n])(t);if(isCompletionRecord(o))return o}}}function EmptyStatement(){return noop$1}function DebuggerStatement(e,t,n){return e.inspector?noop$1:function(){debugger}}function ReturnStatement(e,t,n){var r=t.argument?createEvaluate(e,t.argument):noop$1;return function(e){return C_COMPLETION_RETURN.value=r(e),C_COMPLETION_RETURN}}function BreakStatement(e,t){return function(){return C_COMPLETION_BREAK.value=t.label?t.label.name:null,C_COMPLETION_BREAK}}function ContinueStatement(e,t){return function(){return C_COMPLETION_CONTINUE.value=t.label?t.label.name:null,C_COMPLETION_CONTINUE}}function IfStatement(e,t,n){var r=createEvaluate(e,t.test),i=createEvaluate(e,t.consequent),o=t.alternate&&createEvaluate(e,t.alternate);return function(e){return r(e)?i(e):o?o(e):void 0}}function SwitchStatement(e,t,n){for(var r=createEvaluate(e,t.discriminant),i=[],o=[],a=t.cases,s=a.length,u=0;u<s;u++){var c=a[u];i[u]=c.test?createEvaluate(e,c.test):null,o[u]=SwitchCase(e,c,void 0)}return function(e){for(var n=r(e),a=!1,s=-1,u=t.cases,c=u.length,l=0;l<c;l++){var p=u[l];if(a||(p.test?i[l](e)===n&&(a=!0):s=l),a){var h=o[l](e);if(h===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(h===C_COMPLETION_CONTINUE||h===C_COMPLETION_RETURN)return h}!a&&l===c-1&&s>-1&&(l=s-1,a=!0)}}}function SwitchCase(e,t,n){for(var r=[],i=t.consequent,o=0;o<i.length;o++)r[o]=createEvaluate(e,i[o]);return function(e){for(var n=t.consequent,i=0;i<n.length;i++){var o=r[i](e);if(isCompletionRecord(o))return o}}}function ThrowStatement(e,t,n){var r=createEvaluate(e,t.argument);return function(e){throw r(e)}}function TryStatement(e,t,n){var r,i=XInlineBlockStatement(e,t.block,void 0,0),o=t.finalizer?XInlineBlockStatement(e,t.finalizer,void 0,0):noop$1,a=t.handler?CatchClause(e,t.handler,void 0):noop$1,s=noop$1,u=null===(r=t.handler)||void 0===r?void 0:r.param;if(u){var c=u.name;s=function(e,t){e.let(c,t)}}return function(n){var r;try{return r=i(n)}catch(i){if(t.handler){var u=new BlockRuntimeScope(e,n);return s(u,i),r=a(u)}throw i}finally{if(t.finalizer){var c=!1,l=void 0;isCompletionRecord(r)&&(c=!0,l=r.value);var p=o(n);if(isCompletionRecord(p))return p;c&&(r.value=l)}}}}function CatchClause(e,t,n){var r=XInlineBlockStatement(e,t.body,void 0,2);return function(e){return r(e)}}function WhileStatement(e,t,n,r){var i=createEvaluate(e,t.test),o=createEvaluate(e,t.body);return function(e){for(;i(e);){var t=o(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function DoWhileStatement(e,t,n,r){var i=createEvaluate(e,t.body),o=createEvaluate(e,t.test);return function(e){do{var t=i(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}while(o(e))}}function ForStatement(e,t,n,r){var i=t.init?createEvaluate(e,t.init):function(){},o=t.test?createEvaluate(e,t.test):function(){return!0},a=t.update?createEvaluate(e,t.update):function(){},s=t.body,u=76===s.type?XInlineBlockStatement(e,s,void 0,2):createEvaluate(e,s);return function(e){var t=e;for(i(t);o(t);a(t)){var n=u(e);if(n===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(n!==C_COMPLETION_CONTINUE){if(n===C_COMPLETION_RETURN)return n}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForInStatement(e,t,n,r){var i=createEvaluate(e,t.right),o=ForXHandler(e,t,void 0);return function(e){var t=i(e);for(var n in t){var a=o(e,n);if(a===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(a!==C_COMPLETION_CONTINUE){if(a===C_COMPLETION_RETURN)return a}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForOfStatement(e,t,n,r){var i=createEvaluate(e,t.right),o=ForXHandler(e,t,void 0);return function(e){for(var t=0,n=i(e);t<n.length;t++){var a=n[t],s=o(e,a);if(s===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(s!==C_COMPLETION_CONTINUE){if(s===C_COMPLETION_RETURN)return s}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForXHandler(e,t,n){var r,i=noop$1,o=t.left;if(17===o.type){var a=XInlineVariableDeclarationWithInitializer(e,o,void 0);i=function(e,t,n){return a(t,n)}}else{if(64!==o.type)throw new SyntaxError(errorMessage.unexpectedToken);i=function(t,n,r){var i=ZInlineIdentifierAccessor(o.name,t,t.strict?0:1);i||(i=e.globalObjectAccessor.getProperty(o.name)),t.strict?i.strictSet(r):i.set(r)}}var s=t.body;return r=76===s.type?XInlineBlockStatement(e,s,void 0,2):createEvaluate(e,s),function(e,t){var n=e;return i(e,n,t),r(n)}}function WithStatement(e,t,n){var r,i=createEvaluate(e,t.object),o=t.body;return r=76===o.type?combineCallable(XRuntimeScopeHoist(e,o,void 0,0),XInlineBlockStatement(e,o,void 0,3)):createEvaluate(e,o),function(t){var n=i(t);if(null==n)throw new TypeError(errorMessage.convertNullToObject);var o=new WithRuntimeScope(e,t,Object(n));return r(o)}}function LabeledStatement(e,t,n){var r,i=t.label.name,o=t.body;switch(o.type){case 8:r=ForStatement(e,o,void 0,i);break;case 6:r=ForInStatement(e,o,void 0,i);break;case 7:r=ForOfStatement(e,o,void 0,i);break;case 4:r=DoWhileStatement(e,o,void 0,i);break;case 15:r=WhileStatement(e,o,void 0,i);break;default:r=createEvaluate(e,t.body)}return function(e){var t=r(e);if(t!==C_COMPLETION_BREAK||C_COMPLETION_BREAK.value!==i)return t}}var visitor$1=[null,BreakStatement,ContinueStatement,DebuggerStatement,DoWhileStatement,ExpressionStatement,ForInStatement,ForOfStatement,ForStatement,IfStatement,LabeledStatement,ReturnStatement,SwitchStatement,ThrowStatement,TryStatement,WhileStatement,WithStatement,VariableDeclaration,null,null,null,null,null,null,null,null,null,null,null,null,ArrayExpression,ArrowFunctionExpression,AssignmentExpression,BinaryExpression,CallExpression,ConditionalExpression,FunctionExpression,SequenceExpression,LogicalExpression,MemberExpression,NewExpression,ObjectExpression,TaggedTemplateExpression,ThisExpression,UnaryExpression,UpdateExpression,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,CatchClause,FunctionDeclaration,Identifier,Literal,null,Program,null,null,null,SwitchCase,TemplateElement,TemplateLiteral,VariableDeclarator,EmptyStatement,BlockStatement];function createEvaluate(e,t){var n=t.type;if(65===n){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var r=t.regex,i=r.pattern,o=r.flags;return function(){return new RegExp(i,o)}}return function(){return t.value}}var a=e.inspector;try{var s=visitor$1[n];if(s){var u=s(e,t,void 0,0);return function(n){a&&a.hitBreakpoint(e.runtimeProfile.scriptId,t);try{return u(n)}catch(n){var r=e.runtimeProfile;throw r.rewriteErrorStack(r.scriptId,n,t),a&&a.shouldPauseOnException(r.scriptId,n,t,!1),n}}}throw new Error("".concat(errorMessage.unexpectedToken,"(").concat(n,")"))}catch(n){var c=e.runtimeProfile;throw c.rewriteErrorStack(c.scriptId,n,t),a&&a.shouldPauseOnException(c.scriptId,n,t,!1),n}}var ArrayPush=Function.prototype.apply.call.bind(Array.prototype.push),ArrayPop=Function.prototype.apply.call.bind(Array.prototype.pop),RuntimeProfile=function(){function e(){this.callFrameCountId=1,this.scriptCountId=1,this.exceptionId=1,this.callFrames=[],this.callExpressionStack=[],this.scriptId="1",this.scriptMap={}}return e.prototype.getNextScriptId=function(){return"".concat(this.scriptCountId++)},e.prototype.getNextExceptionId=function(){return this.exceptionId++},e.prototype.pushCallFrame=function(e){ArrayPush(this.callFrames,{functionName:e.functionName,functionScope:e.functionScope,functionNode:e.functionNode,scriptId:this.scriptId,callFrameIdx:this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()})},e.prototype.getCallFrameId=function(e){return"10000.1.".concat(e.callFrameIdx)},e.prototype.popCallFrame=function(){ArrayPop(this.callFrames)},e.prototype.pushCallExpression=function(e){ArrayPush(this.callExpressionStack,e)},e.prototype.popCallExpression=function(){ArrayPop(this.callExpressionStack)},e.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},e.prototype.rewriteErrorStack=function(e,t,n){var r=this;if(t instanceof Error&&!getBoatmanSymbol(t,"__rewrittenzxcd")){var i=this.scriptMap[e]?this.scriptMap[e].url:"",o=this.callFrames.map((function(e,t){var o,a,s=r.callFrames[t+1];if(s?s.callExpressionNode&&(o=s.callExpressionNode.loc.start.line,a=s.callExpressionNode.loc.start.column+1):(o=n.loc.start.line,a=n.loc.start.column+1),void 0===o)return" at <anonymous>";var u="".concat(i&&"anonymous"!==i?i:"<anonymous>",":").concat(o,":").concat(a);return e.functionName?" at ".concat(e.functionName," (").concat(u,")"):" at ".concat(u)})).reverse().join("\n");t.stack="".concat(t.name,": ").concat(t.message)+"\n"+o,setBoatmanSymbol(t,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:n})}},e}(),Boatman=function(){function e(e){if(void 0===e&&(e={}),this.options=e,this.runtimeProfile=new RuntimeProfile,this.disableBreaks=!1,this.runQueue=[],e.sandbox){var t=e.sandboxGlobalObjectCreator?e.sandboxGlobalObjectCreator():createSandbox();this.globalObjectAccessor=new GlobalObjectAccessor(t),(n=new GlobalRuntimeScope(this,t)).const("this",t),n.var("self",t),n.const("exports",this.exports={}),this.globalScope=n}else{var n;this.globalObjectAccessor=new GlobalObjectAccessor(hostGlobalObject),(n=new GlobalRuntimeScope(this,hostGlobalObject)).const("this",hostGlobalObject),n.var("self",hostGlobalObject),this.globalScope=n}}return e.prototype.import=function(e){if("object"==typeof e){var t=this.globalScope.context;getOwnPropertyNames(e).forEach((function(n){t[n]=new VariableAccessor(1,e[n])}))}},e.prototype.doRun=function(e){var t,n=this.runtimeProfile,r=e.scriptId,i=e.previousScriptId,o=e.ast,a=e.code,s=e.scriptUrl;n.scriptId=r,this.inspector&&this.inspector.evaluateScript(r,a,o,s);try{var u=createEvaluate(this,o)(this.globalScope);return n.scriptId=i,u}catch(e){if(n.scriptId=i,this.inspector){var c=getBoatmanSymbol(e,"__rewrittenzxcd");c&&c.node&&(this.inspector.shouldPauseOnException(r,e,c.node,!0),this.inspector.throwException(e))}throw e}finally{null===(t=this.inspector)||void 0===t||t.replayQueueEvent()}},e.prototype.queue=function(e,t){var n,r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId,a=i.getNextScriptId(),s=t||"anonymous";i.scriptId=a,i.scriptMap[a]={scriptId:a,url:s},null===(n=this.inspector)||void 0===n||n.startQueueEvent(),this.runQueue.push({scriptUrl:s,scriptId:a,previousScriptId:o,ast:r,code:e})},e.prototype.run=function(e,t,n){var r=this;if(void 0===n&&(n={}),this.queue(e,t),this.inspector&&n.waitingForDebuggerToAttach&&!this.inspector.isDebuggerAttached)return log("Waiting for inspector to be ready..."),this.inspector.whenDebuggerAttached.then((function(){log("Inspector is ready, run user code"),r.runInSchedule()}));this.runInSchedule()},e.prototype.runInSchedule=function(){var e=this.runQueue;this.runQueue=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.doRun(r)}},e.prototype.evaluate=function(e,t,n){var r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId;i.scriptId=i.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(i.scriptId,e,r,"");var a=t||this.globalScope;this.disableBreaks=Boolean(null==n?void 0:n.disableBreaks);try{var s=createEvaluate(this,r)(a);return i.scriptId=o,s}catch(e){throw i.scriptId=o,e}finally{this.disableBreaks=!1}},e.prototype.setInspector=function(e){this.inspector=e,e.setEngine(this),e.connect()},e.prototype.getRuntimeStatus=function(){var e=this.runtimeProfile;return{scriptId:e.scriptId,scriptMap:e.scriptMap,callFrames:e.callFrames,callExpressionNode:e.getCurrentCallExpression()}},e.prototype.getHostGlobalObject=function(){return hostGlobalObject},e.prototype.createScope=function(e){return void 0===e&&(e=null),new RuntimeScope(this,e||this.globalScope)},e}(),_a,EVisitorHelperMethod;function findNode(e,t){!function e(n,r,i){!r.found&&t(n,r)&&visitor[i||n.type](n,r,e)}(e,{found:!1})}function skipThrough(e,t,n){n(e,t)}function noop(){}!function(e){e.Statement="Statement",e.Expression="Expression",e.MemberPattern="MemberPattern",e.VariablePattern="VariablePattern",e.Class="Class",e.ForInit="ForInit",e.Function="Function",e.Pattern="Pattern"}(EVisitorHelperMethod||(EVisitorHelperMethod={}));var visitor=(_a={Statement:skipThrough,Expression:skipThrough,MemberPattern:skipThrough,VariablePattern:noop,Class:function(e,t,n){e.id&&n(e.id,t,EVisitorHelperMethod.Pattern),e.superClass&&n(e.superClass,t,EVisitorHelperMethod.Expression),n(e.body,t)},ForInit:function(e,t,n){17===e.type?n(e,t):n(e,t,EVisitorHelperMethod.Expression)},Function:function(e,t,n){"id"in e&&e.id&&n(e.id,t,EVisitorHelperMethod.Pattern);for(var r=0,i=e.params;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Pattern)}n(e.body,t,"expression"in e&&e.expression?EVisitorHelperMethod.Expression:EVisitorHelperMethod.Statement)},Pattern:function(e,t,n){64===e.type?n(e,t,EVisitorHelperMethod.VariablePattern):39===e.type?n(e,t,EVisitorHelperMethod.MemberPattern):n(e,t)}},_a[75]=noop,_a[1]=noop,_a[2]=noop,_a[3]=noop,_a[72]=noop,_a[43]=noop,_a[87]=noop,_a[89]=noop,_a[81]=noop,_a[79]=noop,_a[80]=noop,_a[64]=noop,_a[65]=noop,_a[76]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[5]=function(e,t,n){n(e.expression,t,EVisitorHelperMethod.Expression)},_a[9]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Statement),e.alternate&&n(e.alternate,t,EVisitorHelperMethod.Statement)},_a[10]=function(e,t,n){n(e.body,t,EVisitorHelperMethod.Statement)},_a[16]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[12]=function(e,t,n){n(e.discriminant,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.cases;r<i.length;r++){var o=i[r];o.test&&n(o.test,t,EVisitorHelperMethod.Expression);for(var a=0,s=o.consequent;a<s.length;a++){n(s[a],t,EVisitorHelperMethod.Statement)}}},_a[71]=function(e,t,n){e.test&&n(e.test,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.consequent;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[11]=function(e,t,n){e.argument&&n(e.argument,t,EVisitorHelperMethod.Expression)},_a[13]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[14]=function(e,t,n){n(e.block,t,EVisitorHelperMethod.Statement),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,EVisitorHelperMethod.Statement)},_a[62]=function(e,t,n){e.param&&n(e.param,t,EVisitorHelperMethod.Pattern),n(e.body,t,EVisitorHelperMethod.Statement)},_a[15]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[8]=function(e,t,n){e.init&&n(e.init,t,EVisitorHelperMethod.ForInit),e.test&&n(e.test,t,EVisitorHelperMethod.Expression),e.update&&n(e.update,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[6]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.ForInit),n(e.right,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[63]=function(e,t,n){n(e,t,EVisitorHelperMethod.Function)},_a[17]=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r++){n(i[r],t)}},_a[74]=function(e,t,n){n(e.id,t,EVisitorHelperMethod.Pattern),e.init&&n(e.init,t,EVisitorHelperMethod.Expression)},_a[69]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Pattern)},_a[60]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Pattern)}},_a[66]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){var o=i[r];68===o.type?(o.computed&&n(o.key,t,EVisitorHelperMethod.Expression),n(o.value,t,EVisitorHelperMethod.Pattern)):69===o.type&&n(o.argument,t,EVisitorHelperMethod.Pattern)}},_a[30]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Expression)}},_a[41]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){n(i[r],t)}},_a[37]=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[73]=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r++){n(i[r],t)}for(var o=0,a=e.expressions;o<a.length;o++){n(a[o],t,EVisitorHelperMethod.Expression)}},_a[44]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[33]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Expression),n(e.right,t,EVisitorHelperMethod.Expression)},_a[32]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Pattern),n(e.right,t,EVisitorHelperMethod.Expression)},_a[35]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Expression),n(e.alternate,t,EVisitorHelperMethod.Expression)},_a[40]=function(e,t,n){if(n(e.callee,t,EVisitorHelperMethod.Expression),e.arguments)for(var r=0,i=e.arguments;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[39]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),e.computed&&n(e.property,t,EVisitorHelperMethod.Expression)},_a[84]=function(e,t,n){e.declaration&&n(e.declaration,t,84===e.type||e.declaration&&"id"in e.declaration&&e.declaration.id?EVisitorHelperMethod.Statement:EVisitorHelperMethod.Expression),e.source&&n(e.source,t,EVisitorHelperMethod.Expression)},_a[82]=function(e,t,n){e.exported&&n(e.exported,t),n(e.source,t,EVisitorHelperMethod.Expression)},_a[78]=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r++){n(i[r],t)}n(e.source,t,EVisitorHelperMethod.Expression)},_a[90]=function(e,t,n){n(e.source,t,EVisitorHelperMethod.Expression)},_a[42]=function(e,t,n){n(e.tag,t,EVisitorHelperMethod.Expression),n(e.quasi,t,EVisitorHelperMethod.Expression)},_a[86]=function(e,t,n){n(e,t,EVisitorHelperMethod.Class)},_a[88]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t)}},_a[95]=function(e,t,n){e.computed&&n(e.key,t,EVisitorHelperMethod.Expression),n(e.value,t,EVisitorHelperMethod.Expression)},_a);function isFunction(e){return"function"==typeof e}function isBreakableNode(e){return!!getBoatmanSymbol(e,"__can_breakpointasxu")||e.type<30}function findPossibleBreakpoints(e,t,n,r){var i=n||{lineNumber:t.lineNumber+1,columnNumber:0},o=[];return findNode(e.ast,(function(e,n){if(e.loc){var a={startLineNumber:e.loc.start.line-1,startColumnNumber:e.loc.start.column,endLineNumber:e.loc.end.line-1,endColumnNumber:e.loc.end.column};return a.endLineNumber<t.lineNumber||a.startLineNumber>i.lineNumber||a.endLineNumber===t.lineNumber&&a.endColumnNumber<=t.columnNumber||a.startLineNumber===i.lineNumber&&a.startColumnNumber>=i.columnNumber?(o.length&&(n.found=!0),!1):(37===e.type&&e.expressions.forEach((function(e,t){t&&e.type<60&&setBoatmanSymbol(e,"__can_breakpointasxu",!0)})),a.startLineNumber>t.lineNumber||a.startLineNumber===t.lineNumber&&a.startColumnNumber>=t.columnNumber?(isBreakableNode(e)&&-1===o.indexOf(e)&&o.push(e),!(r&&r.limit&&o.length>=r.limit)||(n.found=!0,!1)):!o.length||(n.found=!0,!1))}})),o}function resolveCallArguments(e,t){var n=[],r=e.getRemoteObjectParser();return t&&t.forEach((function(e){if(e.unserializableValue)n.push(parseUnserializableValue(e.unserializableValue));else if(e.objectId){var t=e.objectId?r.getObjectById(e.objectId):null;n.push(t)}else n.push(e.value)})),n}visitor[67]=visitor[76],visitor[91]=visitor[5],visitor[92]=visitor[93]=visitor[11],visitor[70]=visitor[13],visitor[4]=visitor[15],visitor[7]=visitor[6],visitor[36]=visitor[31]=visitor[63],visitor[45]=visitor[44],visitor[38]=visitor[33],visitor[61]=visitor[32],visitor[34]=visitor[40],visitor[83]=visitor[84],visitor[94]=visitor[86],visitor[68]=visitor[95];var precisionTimestampBasis=0;function resetPrecisionTimestampBasis(){precisionTimestampBasis=Date.now()-getPrecisionTimestamp()}var getPrecisionTimestamp="function"==typeof __nativeGetHighResolutionTime__?function(){return __nativeGetHighResolutionTime__()+precisionTimestampBasis}:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()+precisionTimestampBasis}:function(){return Date.now()};function format(e,t){switch(e){case"%s":return String(t);case"%d":return"symbol"==typeof t?NaN:Number(t);case"%i":return"symbol"==typeof t?NaN:parseInt(t,10);case"%f":return"symbol"==typeof t?NaN:parseFloat(t);default:return t}}function formatter(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length<=1)return e;var n=e[0];if("string"!=typeof n)return e;var r=e[1],i=n.match(/%[sdifoOc]/);if(!i)return e;if(i){var o=i.index;if(void 0===o)return e;var a=n.slice(0,o),s=n.slice(o+2);return __spreadArray([a,format(i[0],r),s],e.slice(2),!0)}return e}function generateConsoleAPICalledProtocol(e,t,n){var r,i;t=Array.from(t);var o=n.getRemoteObjectParser(),a=n.getSessionState(),s=n.getEngine().getRuntimeStatus(),u=null!==(r=s.scriptMap[s.scriptId])&&void 0!==r?r:{scriptId:s.scriptId,url:""},c=s.callExpressionNode,l=[];u&&c&&(l=s.callFrames.map((function(e,t){var n=s.callFrames[t+1];return n?{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:n.functionNode.loc.start.line-1,columnNumber:n.functionNode.loc.start.column}:{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:c.loc.start.line-1,columnNumber:c.loc.start.column}})).reverse()),"trace"===e&&0===l.length&&(l=[{functionName:"",scriptId:u.scriptId,url:u.url,lineNumber:0,columnNumber:0}]);var p=null!==(i={warn:"warning",group:"startGroup",groupEnd:"endGroup",groupCollapsed:"startGroupCollapsed",countReset:"warning"}[e])&&void 0!==i?i:e;return{method:RuntimeEvent.consoleAPICalled,params:{type:p,args:Array.from(t).map((function(t){return o.parseObject(t,e)})),executionContextId:a.executionContextId,timestamp:getPrecisionTimestamp(),stackTrace:{callFrames:l}}}}function tryExtractMessageSummary(e){var t;if(!e)return"";var n=e.method;if(!n)return"";if(n===RuntimeEvent.consoleAPICalled){var r=null===(t=e.params)||void 0===t?void 0:t.args;if(r&&Array.isArray(r)&&r.length>0)return": "+JSON.stringify(r[0]).slice(1,100)+"..."}return""}function sendConsoleAPICalled(e,t,n){var r=n.getProtocolConnection(),i=generateConsoleAPICalledProtocol(e,t,n);JSON.stringify(i).length>2e7?r.sendConsoleMessage(generateConsoleAPICalledProtocol("warn",[n.i18n.formatWithPrefix("consoleContentTooLarge")+tryExtractMessageSummary(i)],n)):r.sendConsoleMessage(i)}function getLabel(e){return e?String(e):"default"}var DefaultMap=function(){function e(e){this.defaultValue=e,this.dict={}}return e.prototype.get=function(e){return e in this.dict||(this.dict[e]=this.defaultValue()),this.dict[e]},e}(),ConsoleImpl=function(){function e(e){this.container=e,this.metaMapById=new DefaultMap((function(){return{countMap:{},timerTable:{}}}))}return e.prototype._getRuntimeMeta=function(){var e=this.container.getSessionState().executionContextId;return this.metaMapById.get(String(e))},e.prototype._getCountMap=function(){return this._getRuntimeMeta().countMap},e.prototype._getTimerTable=function(){return this._getRuntimeMeta().timerTable},e.prototype.assert=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e||sendConsoleAPICalled("assert",t,this.container)},e.prototype.clear=function(){this.sendEmptyConsoleAPICalled("clear")},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("debug",e,this.container)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("error",e,this.container)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("info",e,this.container)},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("log",e,this.container)},e.prototype.table=function(e,t){sendConsoleAPICalled("table",[e,t],this.container)},e.prototype.trace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("trace",e,this.container)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("warn",e,this.container)},e.prototype.dir=function(e,t){sendConsoleAPICalled("dir",[e,t],this.container)},e.prototype.dirxml=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.count=function(e){var t=this._getCountMap(),n=t[e=getLabel(e)]=(t[e]||0)+1;sendConsoleAPICalled("count",["".concat(e,": ").concat(n)],this.container)},e.prototype.countReset=function(e){var t=this._getCountMap();(e=getLabel(e))in t?t[e]=0:sendConsoleAPICalled("countReset",["Count for '".concat(e,"' does not exist")],this.container)},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.group";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("group",[n],this.container)},e.prototype.groupCollapsed=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.groupCollapsed";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("groupCollapsed",[n],this.container)},e.prototype.groupEnd=function(){sendConsoleAPICalled("groupEnd",["console.groupEnd"],this.container)},e.prototype.time=function(e){var t=this._getTimerTable();(e=getLabel(e))in t?sendConsoleAPICalled("warn",["Timer '".concat(e,"' has already been started.")],this.container):t[e]=getPrecisionTimestamp()},e.prototype.timeLog=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this._getTimerTable()[e=getLabel(e)];if(void 0!==r){var i=round(getPrecisionTimestamp()-r,5);sendConsoleAPICalled("timeLog",__spreadArray(["".concat(e,": ").concat(i,"ms")],t,!0),this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.timeEnd=function(e){var t=this._getTimerTable(),n=t[e=getLabel(e)];if(void 0!==n){delete t[e];var r=round(getPrecisionTimestamp()-n,5);sendConsoleAPICalled("timeEnd",["".concat(e,": ").concat(r,"ms")],this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.sendEmptyConsoleAPICalled=function(e){sendConsoleAPICalled(e,["console.".concat(e)],this.container)},e}();function round(e,t){return void 0===t&&(t=0),Number("".concat(Math.round(Number("".concat(e,"e").concat(t))),"e-").concat(t))}var proxyMethodKeys=["debug","assert","log","info","warn","error","table","dir","trace","group","groupCollapsed","groupEnd","clear","count","countReset","time","timeEnd","timeLog"];function createReplacement(e,t){var n="object"==typeof console&&console[e]?console[e].bind(console):function(){};function r(){var r=arguments;if("string"==typeof r[0]&&/^(\[framework\]|dispatchEvent|onMessage push|\[boatman\])/.test(r[0]))return n.apply(null,r);try{var i=t.getConsole();i[e].apply(i,r)}catch(t){debug$1("console replacement",e,t)}return n.apply(null,r)}return defineProperty(r,"toString",{value:function(){return"function ".concat(e,"() { [native code] }")},writable:!0,configurable:!0}),r}function overrideGlobalConsole(e){proxyMethodKeys.forEach((function(t){var n=getOwnPropertyDescriptor(console,t);n&&n.configurable?(n.value=createReplacement(t,e),defineProperty(console,t,n)):defineProperty(console,t,{value:createReplacement(t,e),configurable:!0,enumerable:!0,writable:!0})}))}function createConsoleProxy(e,t){t||(t="object"==typeof console?console:null);var n={};return proxyMethodKeys.forEach((function(t){n[t]={configurable:!0,enumerable:!0,writable:!0,value:createReplacement(t,e)}})),createObject(t,n)}function hookPromiseRejectionCallback(e,t){var n=e.getHostGlobalObject(),r=n.onunhandledrejection,i=function(e){isFunction(r)&&r.call(this,e),e&&e.reason&&t.throwException(e.reason,2)},o="onunhandledrejection",a=getOwnPropertyDescriptor(n,o);a&&!a.configurable||defineProperty(n,o,{get:function(){return i},set:function(e){isFunction(e)&&(r=e,a&&a.set&&a.set.call(this,e))},enumerable:!0,configurable:!0})}var BreakpointItem=function(){function e(e,t,n){this.manager=e,this.targetNode=n,this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber||0,this.scriptId=t.scriptId,this.id="".concat(this.scriptId,":").concat(this.lineNumber,":").concat(this.columnNumber),this.condition=t.condition,setBoatmanSymbol(n,"__breakpointzxfg",this.id)}return e.prototype.destroy=function(){setBoatmanSymbol(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},e}();function enable$2(e,t,n){n(null,{});var r=e.getProtocolConnection().connectionState;r.debuggerDomainEnabled||(r.enableDebuggerDomain(),e.getScriptManager().emitAllScriptParsedEvents())}function disable$1(e,t,n){e.getProtocolConnection().connectionState.disableDebuggerDomain(),n(null,{})}function setBreakpointsActive(e,t,n){var r=e.getBreakpointManager();t.active?(r.activate(),r.isActive4UserManual=!0):(r.inactivate(),r.isActive4UserManual=!1),n(null,{})}function getPossibleBreakpoints(e,t,n){var r=t.start.scriptId,i=e.getScriptManager().getScript(r);if(i){var o=[];findPossibleBreakpoints(i,t.start,t.end).forEach((function(e){o.push({columnNumber:e.loc.start.column,lineNumber:e.loc.start.line-1,scriptId:r})})),n(null,{locations:o})}else n(EDevtoolProtocolErrorCode.NormalError)}function setBreakpointByUrl(e,t,n){var r,i=e.getScriptManager();if(t.url?r=i.getScriptByUrl(t.url):t.scriptHash&&(r=i.getScriptByHash(t.scriptHash)),r){for(var o,a=0;!o&&a<20;)o=findPossibleBreakpoints(r,{lineNumber:t.lineNumber+a,columnNumber:t.columnNumber||0},null,{limit:1})[0],a+=1;if(!o)return n(EDevtoolProtocolErrorCode.NormalError,"[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a)),void warn$1("[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a));var s=e.getBreakpointManager().setBreakpoint({scriptId:r.scriptId,lineNumber:o.loc.start.line-1,columnNumber:o.loc.start.column,condition:t.condition},o);n(null,{breakpointId:s.id,locations:[{scriptId:s.scriptId,lineNumber:s.lineNumber,columnNumber:s.columnNumber}]})}else n(EDevtoolProtocolErrorCode.NormalError,"Script Not Found")}function removeBreakpoint(e,t,n){var r=t.breakpointId;r&&e.getBreakpointManager().removeBreakpoint(r),n(null,{})}function resume(e,t,n){n(null,{})}function pause(e,t,n){e.getBreakpointManager().pauseOnNextStatement=!0,n(null,{})}function stepInto(e,t,n){e.getBreakpointManager().stepAction=3,n(null,{})}function stepOut(e,t,n){e.getBreakpointManager().stepAction=1,n(null,{})}function stepOver(e,t,n){e.getBreakpointManager().stepAction=2,n(null,{})}function getScriptSource(e,t,n){var r=e.getScriptManager().getScript(t.scriptId);r?n(null,{scriptSource:r.source}):n(EDevtoolProtocolErrorCode.NormalError)}function evaluateOnCallFrame(e,t,n){var r,i=t.callFrameId,o=e.getEngine();if(o.getRuntimeStatus().callFrames.some((function(e){if(o.runtimeProfile.getCallFrameId(e)===i)return r=e,!0})),r){var a=e.getRemoteObjectParser();try{var s=e.getEngine().evaluate(t.expression,r.functionScope);n(null,{result:a.parseObject(s)})}catch(e){var u=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:a.parseObject(e),exceptionId:u?u.id:100,lineNumber:0,text:"Uncaught"},result:a.parseObject(e)})}}else n(EDevtoolProtocolErrorCode.NormalError)}function setPauseOnExceptions(e,t,n){switch(t.state){case"all":e.getBreakpointManager().pauseOnExceptionsState=2;break;case"uncaught":e.getBreakpointManager().pauseOnExceptionsState=1;break;case"none":e.getBreakpointManager().pauseOnExceptionsState=0}n(null,{})}function setSkipAllPauses(e,t,n){n(null,{})}var _debugger=Object.freeze({__proto__:null,disable:disable$1,enable:enable$2,evaluateOnCallFrame:evaluateOnCallFrame,getPossibleBreakpoints:getPossibleBreakpoints,getScriptSource:getScriptSource,pause:pause,removeBreakpoint:removeBreakpoint,resume:resume,setBreakpointByUrl:setBreakpointByUrl,setBreakpointsActive:setBreakpointsActive,setPauseOnExceptions:setPauseOnExceptions,setSkipAllPauses:setSkipAllPauses,stepInto:stepInto,stepOut:stepOut,stepOver:stepOver});function enable$1(e,t,n){n(null,{});var r=e.getSessionState(),i=r.executionContextId,o=r.executionContextName,a=e.getProtocolConnection();a.connectionState.enableRuntimeDomain(),a.send({method:RuntimeEvent.executionContextCreated,params:{context:{id:i,origin:"app://",name:o}}})}function disable(e,t,n){e.getProtocolConnection().connectionState.disableRuntimeDomain(),n(null,{})}function getProperties(e,t,n){var r=e.getRemoteObjectParser().getProperties(t),i=e.getRemoteObjectParser().getObjectById(t.objectId);if(isFunction(i)){var o=getBoatmanSymbol(i,"___func_locationxasdzzy");if(o){var a=o.node,s=o.scriptId,u=a.id;r.internalProperties=__spreadArray([{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:s,lineNumber:(u?u.loc.start.line:a.loc.start.line)-1,columnNumber:u?u.loc.start.column:a.loc.start.column}}}],r.internalProperties||[],!0)}}n(null,r)}function callFunctionOn(e,t,n){var r=e.getRemoteObjectParser();if(t.functionDeclaration){var i=t.objectId?r.getObjectById(t.objectId):null,o=resolveCallArguments(e,t.arguments);if(i){var a=function(e){t.slient||n(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(e),exceptionId:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(e)})};if(0===t.functionDeclaration.indexOf("function invokeGetter(arrayStr)")||-1!==t.functionDeclaration.indexOf("let t=this;const n=JSON.parse(e);for(let e=0,i=n.length;e<i;++e)t=t[n[e]]"))try{var s=JSON.parse(t.arguments[0].value),u=i;return s.forEach((function(e){u=u[e]})),void n(null,{result:r.parseObject(u)})}catch(e){a(e)}else try{var c=e.getEngine().createScope();c.const("__obj",i),c.const("__args",o);var l=e.getEngine().evaluate("(".concat(t.functionDeclaration,").apply(__obj, __args)"),c);n(null,{result:t.returnByValue?{type:"object",value:l}:r.parseObject(l)})}catch(e){a(e)}}}}function evaluate(e,t,n){var r=t.disableBreaks||t.throwOnSideEffect,i=e.getRemoteObjectParser(),o=e.getBreakpointManager();try{var a=r?o.evaluateWithoutBreakpoint(t.expression):e.getEngine().evaluate(t.expression);n(null,{result:i.parseObject(a)})}catch(e){var s=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:i.parseObject(e),exceptionId:s?s.id:100,lineNumber:0,text:"Uncaught"},result:i.parseObject(e)})}}function compileScript(e,t,n){n(null,{})}function releaseObjectGroup(e,t,n){n(null,{})}function globalLexicalScopeNames(e,t,n){n(null,{names:[]})}function runIfWaitingForDebugger(e,t,n){n(null,{}),e.getProtocolConnection().connectionState.handleDebuggerAttached()}var runtime=Object.freeze({__proto__:null,callFunctionOn:callFunctionOn,compileScript:compileScript,disable:disable,enable:enable$1,evaluate:evaluate,getProperties:getProperties,globalLexicalScopeNames:globalLexicalScopeNames,releaseObjectGroup:releaseObjectGroup,runIfWaitingForDebugger:runIfWaitingForDebugger});function enable(e,t,n){e.getProtocolConnection().connectionState.enablePageDomain(),n(null,{})}function getResourceTree(e,t,n){e.getProtocolConnection().connectionState.enablePageResourceTree(),n(null,{})}var page=Object.freeze({__proto__:null,enable:enable,getResourceTree:getResourceTree}),Handlers=Object.freeze({__proto__:null,Debugger:_debugger,Page:page,Runtime:runtime}),INITIAL_STATE={pageDomainEnabled:!1,runtimeDomainEnabled:!1,debuggerDomainEnabled:!1,getResourceTreeRequested:!1},ConnectionState=function(){function e(){this.consoleReadyCallbacks=[],this.whenDebuggerAttachedQueue=new WhenReadyQueue,this.state=__assign({},INITIAL_STATE),this.whenDebuggerDomainEnabledQueue=new WhenReadyQueue}return Object.defineProperty(e.prototype,"debuggerDomainEnabled",{get:function(){return this.state.debuggerDomainEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeDomainEnabled",{get:function(){return this.state.runtimeDomainEnabled},enumerable:!1,configurable:!0}),e.prototype.enablePageDomain=function(){this.state.pageDomainEnabled=!0,this.checkConsoleReady()},e.prototype.enableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!0,this.checkConsoleReady()},e.prototype.disableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!1},e.prototype.onDebuggerDomainEnabled=function(e){this.whenDebuggerDomainEnabledQueue.push(e)},e.prototype.enableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!0,this.whenDebuggerDomainEnabledQueue.activate()},e.prototype.disableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!1,this.whenDebuggerDomainEnabledQueue.deactivate()},e.prototype.enablePageResourceTree=function(){this.state.getResourceTreeRequested=!0,this.checkConsoleReady()},e.prototype.reset=function(){this.state=__assign({},INITIAL_STATE)},e.prototype.onConsoleReady=function(e){this.consoleReadyCallbacks.push(e)},e.prototype.offConsoleReady=function(e){var t=this.consoleReadyCallbacks.indexOf(e);t>-1&&this.consoleReadyCallbacks.splice(t,1)},e.prototype.checkConsoleReady=function(){var e=this;this.state.runtimeDomainEnabled&&this.state.pageDomainEnabled&&this.state.getResourceTreeRequested&&setTimeout((function(){e.consoleReadyCallbacks.forEach((function(e){e()}))}),0)},e.prototype.onDebuggerAttached=function(e){this.whenDebuggerAttachedQueue.push(e)},e.prototype.handleDebuggerAttached=function(){this.whenDebuggerAttachedQueue.activate()},e}(),WhenReadyQueue=function(){function e(){this.queue=[],this.ready=!1}return e.prototype.push=function(e){this.ready?e():this.queue.push(e)},e.prototype.runQueue=function(){this.queue.forEach((function(e){e()})),this.queue=[]},e.prototype.activate=function(){this.runQueue(),this.ready=!0},e.prototype.deactivate=function(){this.ready=!1,this.runQueue()},e}(),ProtocolConnection=function(){function e(e){var t=this;this.container=e,this.messagesBeforeRuntimeEnabled=[],this.consoleReady=!1,this.messagesBeforeWebsocketOpened=[],this.connectionState=new ConnectionState,this.connectionState.onConsoleReady((function(){t.consoleReady=!0,t.messagesBeforeRuntimeEnabled.length&&(t.messagesBeforeRuntimeEnabled.forEach((function(e){t.send(e)})),t.messagesBeforeRuntimeEnabled=[])})),setTimeout((function(){t.consoleReady=!0}),1e4)}return Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakpointManager",{get:function(){return this.container.getBreakpointManager()},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e,t;return __awaiter(this,void 0,void 0,(function(){var n,r,i=this;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.sessionState.resolveExternalStateOnStart()];case 1:return n=o.sent()[0],this.ws=new(this.container.getWebSocketClientImpl()),n?(r="".concat(this.container.server4WebSocket,"/bugme/client_w/").concat(n),this.ws.setUrl(r),this.ws.setSocketMessageHandler(this.onSocketMessage.bind(this)),this.ws.open(),this.messagesBeforeWebsocketOpened.length&&(this.messagesBeforeWebsocketOpened.forEach((function(e){i.ws.send(e)})),this.messagesBeforeWebsocketOpened=[])):null===(t=(e=this.ws).showError)||void 0===t||t.call(e,"no-valid-channel-id"),[2]}}))}))},e.prototype.close=function(){this.ws&&this.ws.close()},e.prototype.send=function(e){this.ws?this.ws.send(e):this.messagesBeforeWebsocketOpened.push(e)},e.prototype.sendConsoleMessage=function(e){this.consoleReady?this.send(e):this.messagesBeforeRuntimeEnabled.push(e)},e.prototype.onFrontendJoin=function(){this.breakpointManager.activate()},e.prototype.onFrontendLeave=function(){this.breakpointManager.inactivate(),this.connectionState.reset(),this.consoleReady=!1},e.prototype.onSocketMessage=function(e){var t,n=this;try{t=JSON.parse(e)}catch(t){return void("CLIENT:JOIN"===e?this.onFrontendJoin():"CLIENT:LEAVE"===e&&this.onFrontendLeave())}var r=getMethodHandler(t.method);r&&r(this.container,t.params,(function(e,r){e?n.ws.send({id:t.id,error:{code:e,message:(null==r?void 0:r.message)||r||""}}):n.ws.send({id:t.id,result:r})}))},e}();function getMethodHandler(e){for(var t=e.split("."),n=Handlers,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}var BreakpointManager=function(){function e(e){this.container=e,this.id2BreakpointMap={},this.isActive=!1,this.isActive4UserManual=!0,this.pauseOnExceptionsState=0,this.pauseOnNextStatement=!1,this.stepAction=0,this.breakpointCallStackDepth=0,this.hiddenKeys=new Set(["this"])}return Object.defineProperty(e.prototype,"remoteObjectParser",{get:function(){return this.container.getRemoteObjectParser()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.isActive=!0},e.prototype.inactivate=function(){this.isActive=!1},e.prototype.get=function(e){return this.id2BreakpointMap[e]},e.prototype.setBreakpoint=function(e,t){var n=new BreakpointItem(this,e,t);return this.id2BreakpointMap[n.id]=n,n},e.prototype.removeBreakpoint=function(e){var t=this.id2BreakpointMap[e];t&&t.destroy()},e.prototype.pauseOnBreakpoint=function(e){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames(e),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[e.id]}})},e.prototype.pauseOnException=function(e,t,n,r){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:n.loc.start.line-1,columnNumber:n.loc.start.column}),data:__assign(__assign({},this.remoteObjectParser.parseObject(t)),{uncaught:r}),reason:EDevtoolProtocolTypePausedReason.Exception,hitBreakpoints:[]}})},e.prototype.pauseOnNode=function(e,t){if(this.container.getEngine().disableBreaks)return!1;this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:t.loc.start.line-1,columnNumber:t.loc.start.column}),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[]}})},e.prototype.evaluateWithoutBreakpoint=function(e,t){var n=this.isActive;n&&this.inactivate();try{return this.container.getEngine().evaluate(e,t)}finally{n&&this.activate()}},e.prototype.getBreakpointCallFrames=function(e){var t,n=this,r=[],i=this.container.getEngine(),o=i.getRuntimeStatus().callFrames;return o.forEach((function(a,s){var u=a.functionNode,c=a.functionScope,l=o[s+1],p={lineNumber:l?l.callExpressionNode.loc.start.line-1:e.lineNumber,columnNumber:l?l.callExpressionNode.loc.start.column:e.columnNumber,scriptId:a.scriptId},h=createObject(null);objectKeys$1(c.context).forEach((function(e){n.hiddenKeys.has(e)||(h[e]=c.context[e].value)}));var d={columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:a.scriptId},f={columnNumber:u.loc.end.column,lineNumber:u.loc.end.line-1,scriptId:a.scriptId},m=n.remoteObjectParser.parseObject(h),g=n.remoteObjectParser.parseObject(c.find("this").value);t||(t=n.remoteObjectParser.parseObject(i.globalObjectAccessor.globalObject));var y={callFrameId:i.runtimeProfile.getCallFrameId(a),functionName:a.functionName||"(anonymous)",functionLocation:d,location:p,scopeChain:[{type:"local",object:m,startLocation:d,endLocation:f},{type:"global",object:t}],this:g,url:"https://gw.alipayobjects.com"};r.unshift(y)})),r},e.prototype.handlePaused=function(e){if(this.sessionState.channelId){this.isActive=!1,this.breakpointCallStackDepth=this.container.getEngine().getRuntimeStatus().callFrames.length,this.container.getPausedCoverView().show();var t=this.protocolConnection.messagesBeforeWebsocketOpened.length?this.protocolConnection.messagesBeforeWebsocketOpened.concat([e]):[e];this.protocolConnection.messagesBeforeWebsocketOpened=[],this.handleSyncRequest(t),this.container.getPausedCoverView().hide(),this.protocolConnection.send({method:DebuggerEvent.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else debug$1("skip breakpoint due to lacking of channelId")},e.prototype.handleSyncRequestInner=function(e,t){var n=this,r=Date.now();t&&t.forEach((function(e){n.container.getProtocolConnection().send(e)}));var i=this.container.getHttpClient().syncRequest({url:"".concat(this.container.server4Http,"/bugme/channel/paused"),method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:[]});if(debug$1("syncRequest response",i),i.error){if(Date.now()-r>=1e4)return this.handleSyncRequestInner(e,t);error$1("[DEBUG]",i.errorMessage)}else if(200===i.status){var o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(e){}if(o){log("[DEBUG] breakpoint response",o);var a=[],s=!1;Array.isArray(o)?o.forEach((function(t){e(t.method)&&(s=!0),a.push(n.handleProtocolResponse(t))})):o.method&&(s=e(o.method),a.push(this.handleProtocolResponse(o))),a.length>0&&(a.forEach((function(e){n.protocolConnection.send(e)})),s||this.handleSyncRequestInner(e,[]))}}else{o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(e){}if(o&&o.errorMessage&&"timeout"===o.errorMessage)return this.handleSyncRequestInner(e,[]);error$1("[DEBUG] breakpoint error ".concat(JSON.stringify(i)))}},e.prototype.handleSyncRequest=function(e){var t=Array.isArray(e)?e:[e];return this.handleSyncRequestInner((function(e){return e===Debugger.resume||e===Debugger.stepOver||e===Debugger.stepInto||e===Debugger.stepOut}),t)},e.prototype.handleProtocolResponse=function(e){var t={id:e.id,result:{}},n=getMethodHandler(e.method);return n&&n(this.container,e.params,(function(n,r){t=n?{id:e.id,error:{code:n,message:(null==r?void 0:r.message)||r||""}}:{id:e.id,result:r}})),t},e}(),config={server4Http:"https://hpmweb.alipay.com",server4WebSocket:"wss://hpmweb.alipay.com"},sourceMapURLRe=/\/\/# sourceMappingURL=(\S+)\s*$/,ScriptManager=function(){function e(e){this.container=e,this.id2ScriptMap={},this.url2ScriptIdMap={}}return Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.getScript=function(e){return this.id2ScriptMap[e]},e.prototype.getScriptByUrl=function(e){var t=this.url2ScriptIdMap[e];if(t)return this.getScript(t)},e.prototype.getScriptByHash=function(e){var t=e.substring(4);if(t)return this.getScript(t)},e.prototype.addScript=function(e,t,n,r){var i="",o=t,a=t.match(sourceMapURLRe);a&&(i=a[1],o=t.substring(0,a.index)),this.id2ScriptMap[e]={scriptId:e,scriptHash:"hash".concat(e),source:o,ast:n,url:r||"",sourceMapURL:i},r&&(this.url2ScriptIdMap[r]=e),this.emitScriptParsedEvent(e)},e.prototype.emitAllScriptParsedEvents=function(){var e=this;Object.keys(this.id2ScriptMap).forEach((function(t){e.id2ScriptMap[t].url&&e.emitScriptParsedEvent(t)}))},e.prototype.emitScriptParsedEvent=function(e){var t=this.id2ScriptMap[e];t&&(debug$1("emitScriptParsedEvent",e,t),this.container.getProtocolConnection().send({method:DebuggerEvent.scriptParsed,params:{endColumn:0,endLine:2,executionContextId:this.sessionState.executionContextId,hasSourceURL:!1,hash:t.scriptHash,isLiveEdit:!1,isModule:!1,length:0,scriptId:e,scriptLanguage:"JavaScript",sourceMapURL:t.sourceMapURL,startColumn:0,startLine:0,url:t.url||""}}))},e}(),SessionState=function(){function e(e,t){this.providerCtor=e,this._debuggerAttached=!1,this.executionContextId=1,this.executionContextName="app",t.executionContextId&&(this.executionContextId=t.executionContextId),t.executionContextName&&(this.executionContextName=t.executionContextName),t.channelId&&(this._channelId=t.channelId),t.channel&&(this.channel=t.channel)}return Object.defineProperty(e.prototype,"stateProvider",{get:function(){return this._stateProvider||(this._stateProvider=new this.providerCtor),this._stateProvider},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelId",{get:function(){return this._channelId?"boat_".concat(this._channelId):""},enumerable:!1,configurable:!0}),e.prototype.resolveExternalStateOnStart=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this._channelId||(this._channelId=this.stateProvider.getChannelIdSync()),this._channelId||!this.stateProvider.getChannelId?[3,2]:(e=this,[4,this.stateProvider.getChannelId()]);case 1:e._channelId=t.sent(),t.label=2;case 2:return[2,this.channelId]}}))}))},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel||(this.channel=this.stateProvider.getChannelSync()),this.channel||!this.stateProvider.getChannel?[3,2]:(e=this,[4,this.stateProvider.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return[2,this.channel]}}))}))},Object.defineProperty(e.prototype,"debuggerAttached",{get:function(){return this._debuggerAttached},set:function(e){this._debuggerAttached=e},enumerable:!1,configurable:!0}),e}();function formatLocaleString(e){switch(e){case"zhCN":case"zh-SG":case"zh-HK":case"zh-TW":case"zh-Hans":case"zh-CN":return"zhCN";default:return"enUS"}}var I18NFormatter=function(){function e(e,t){void 0===t&&(t=""),this.locale=e,this.prefix=t,this._messageBundle={}}return e.getLocaleFromNavigator=function(){var e=getUserAgent();if(e.includes("Language")){var t=e.match(/Language\/([\w-]+)/);if(t)return formatLocaleString(t[1])}return"undefined"!=typeof navigator&&navigator.language?formatLocaleString(navigator.language):formatLocaleString("enUS")},e.prototype.setMessageBundle=function(e){this._messageBundle=e},Object.defineProperty(e.prototype,"i18nMessages",{get:function(){return this._messageBundle[formatLocaleString(this.locale)]},enumerable:!1,configurable:!0}),e.prototype.format=function(e,t){var n=this.i18nMessages[e];return"string"==typeof n?n:"function"==typeof n?n(t):"string"==typeof t?t:e},e.prototype.formatWithPrefix=function(e){return"[".concat(this.prefix,"] ").concat(this.format(e))},e}(),zhCN={remoteDebug:"真机调试",scriptPaused:"断点命中",performanceHint:"真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览",consoleContentTooLarge:"打印的内容过长,单条消息内容大小限制为 20MB",panelStatusPreparing:"等待调试器连接",panelStatusConnected:"真机调试已连接",panelStatusDisconnected:"真机调试已断开",panelStatusNoValidChannelId:"真机调试未获取到调试通道信息",getHelp:"请联系支付宝技术支持进行排查。",errorExit:"本次真机调试已结束,请重新生成调试版本。原因:",exit:"退出"},enUS={remoteDebug:"Remote Debug",scriptPaused:"Paused",performanceHint:"There is a deviation between the performance of a mini program running in remote-debug mode on a real device and its actual performance. If you need to observe performance, please use the Preview.",consoleContentTooLarge:"The log is too long. The size limit for a single log is 20MB",panelStatusPreparing:"Preparing",panelStatusConnected:"Connected",panelStatusDisconnected:"Disconnected",panelStatusNoValidChannelId:"Remote debug failed to get channel info",getHelp:"Please contact Alipay technical support for troubleshooting.",errorExit:"Debug interrupted. Please re-generate Debug QR-Code. Reason: ",exit:"Exit"};function createI18N(){var e=new I18NFormatter(I18NFormatter.getLocaleFromNavigator());return e.setMessageBundle({zhCN:zhCN,enUS:enUS}),e.prefix=e.format("remoteDebug"),e}var ServiceContainer=function(){function e(e){this.userConfig=e,this.i18n=createI18N()}return e.prototype.getUserConfig=function(){return this.userConfig},e.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new RemoteObjectParser),this.remoteObjectParser},e.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new SessionState(this.stateProviderImpl,this.userConfig)),this.sessionState},e.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new ScriptManager(this)),this.scriptManager},e.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new BreakpointManager(this)),this.breakpointManager},e.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new ProtocolConnection(this)),this.protocolConnection},e.prototype.getConsole=function(){return this._consoleImpl||(this._consoleImpl=new ConsoleImpl(this)),this._consoleImpl},e.prototype.setHttpClientImpl=function(e){this.httpClientImpl=e},e.prototype.getHttpClient=function(){return this.httpClientInstance||(this.httpClientInstance=new this.httpClientImpl),this.httpClientInstance},e.prototype.setWebSocketClientImpl=function(e){this.websocketClientImpl=e},e.prototype.getWebSocketClientImpl=function(){return this.websocketClientImpl},e.prototype.setPausedCoverViewImpl=function(e){this.pausedCoverViewImpl=e},e.prototype.getPausedCoverView=function(){return this.pausedCoverViewInstance||(this.pausedCoverViewInstance=new this.pausedCoverViewImpl,this.pausedCoverViewInstance.setPausedMessage(this.i18n.format("scriptPaused"))),this.pausedCoverViewInstance},e.prototype.setEngineInstance=function(e){this.engine=e},e.prototype.getEngine=function(){return this.engine},e.prototype.setStateProviderImpl=function(e){this.stateProviderImpl=e},Object.defineProperty(e.prototype,"server4Http",{get:function(){var e=this.getSessionState().channel;return e?e.startsWith("wss://")?e.replace("wss://","https://"):e.replace("ws://","http://"):config.server4Http},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server4WebSocket",{get:function(){var e=this.getSessionState().channel;return e||config.server4WebSocket},enumerable:!1,configurable:!0}),e.prototype.warn=function(e){var t=this.engine;t&&t.evaluate('console.warn("'.concat(e,'")'),void 0,{disableBreaks:!0})},e.prototype.warnPerformance=function(){this.warn(this.i18n.formatWithPrefix("performanceHint"))},e}(),Barrier=function(){function e(){var e=this;this._isOpen=!1,this._promise=new Promise((function(t){e._completePromise=t}))}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen||(this._isOpen=!0,this._completePromise())},e.prototype.wait=function(){return this._promise},e}(),AutoOpenBarrier=function(e){function t(t){var n=e.call(this)||this;return n._timeout=setTimeout((function(){return n.open()}),t),n}return __extends(t,e),t.prototype.open=function(){this._timeout&&clearTimeout(this._timeout),this._timeout=null,e.prototype.open.call(this)},t}(Barrier),BoatmanInspector=function(){function e(e){var t=this;if(this.options=e,this.barrier=new AutoOpenBarrier(1e4),this.container=new ServiceContainer(e),e.provider){var n=e.provider,r=n.httpClient,i=n.websocketClient,o=n.pausedCoverView,a=n.stateProvider;r?this.container.setHttpClientImpl(r):throwConstructError("no provider.httpClient"),i?this.container.setWebSocketClientImpl(i):throwConstructError("no provider.websocketClient"),o?(this.container.setPausedCoverViewImpl(o),this.options.eventManager&&this.options.eventManager.on(EWorkerAppEvent$1.DebugMaskButtonClick,(function(){t.container.getPausedCoverView().hide()}))):throwConstructError("no provider.pausedCoverView"),a?this.container.setStateProviderImpl(a):throwConstructError("no provider.stateProvider")}else throwConstructError("no provider option");this.breakpointManager=this.container.getBreakpointManager(),!1===e.console||e.consoleIsolation||overrideGlobalConsole(this.container),this.container.getSessionState().resolveExternalStateOnStart()}return Object.defineProperty(e.prototype,"whenDebuggerAttached",{get:function(){return this.barrier.wait()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDebuggerAttached",{get:function(){return this.barrier.isOpen()},enumerable:!1,configurable:!0}),e.prototype.stopAtEntry=function(){enable$1(this.container,{},(function(){})),enable$2(this.container,{},(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0},e.prototype.startQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.startQueueEvent()},e.prototype.replayQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.replayQueueEvent()},e.prototype.warnPerformance=function(){this.container.warnPerformance()},e.prototype.setEngine=function(e){this.container.setEngineInstance(e),!1!==this.options.console&&this.options.consoleIsolation&&e.import({console:createConsoleProxy(this.container)}),hookPromiseRejectionCallback(e,this)},e.prototype.connect=function(){var e=this;try{log("Connecting to debugger..."),this.container.getProtocolConnection().open(),this.container.getProtocolConnection().connectionState.onDebuggerAttached((function(){log("Debugger attached."),e.barrier.open()}))}catch(t){error$1("[boatman] create connection error",t),this.barrier.open(),setTimeout((function(){e.connect()}),3e3)}},e.prototype.disconnect=function(){this.container.getProtocolConnection().close()},e.prototype.evaluateScript=function(e,t,n,r){this.container.getScriptManager().addScript(e,t,n,r)},e.prototype.hitBreakpoint=function(e,t){if(this.container.getEngine().disableBreaks)return!1;var n=this.breakpointManager;if(!n.isActive)return!1;var r=t.type;if(3===r)return this.pauseOnNode(e,t),!0;var i=getBoatmanSymbol(t,"__breakpointzxfg");if(i){var o=n.get(i);if(o){if(debug$1("hit breakpoint",t.type,t),!o.condition)return n.pauseOnBreakpoint(o),!0;try{var a=this.container.getEngine().getRuntimeStatus().callFrames;if(n.evaluateWithoutBreakpoint(o.condition,a[a.length-1].functionScope))return n.pauseOnBreakpoint(o),!0}catch(e){}}}if(0!==n.stepAction&&isBreakableNode(t)){switch(n.stepAction){case 3:return n.stepAction=0,this.pauseOnNode(e,t),!0;case 2:if(this.container.getEngine().getRuntimeStatus().callFrames.length<=n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0;break;case 1:if(this.container.getEngine().getRuntimeStatus().callFrames.length<n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0}return!1}return!(!n.pauseOnNextStatement||67===r)&&(n.pauseOnNextStatement=!1,this.pauseOnNode(e,t),!0)},e.prototype.shouldPauseOnException=function(e,t,n,r){if(this.container.getEngine().disableBreaks)return!1;var i=this.breakpointManager;if(i.isActive&&!getBoatmanSymbol(t,"__pausedvxzg")){var o=i.pauseOnExceptionsState;2===o?(i.pauseOnException(e,t,n,r),setBoatmanSymbol(t,"__pausedvxzg",1)):1===o&&r&&(i.pauseOnException(e,t,n,!0),setBoatmanSymbol(t,"__pausedvxzg",1))}},e.prototype.pauseOnNode=function(e,t){var n=this.breakpointManager;n.isActive&&n.pauseOnNode(e,t)},e.prototype.throwException=function(e,t){var n=getBoatmanSymbol(e,"__rewrittenzxcd"),r="Uncaught";2===t&&(r+=" (in promise)"),this.container.getProtocolConnection().sendConsoleMessage({method:RuntimeEvent.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(e),exceptionId:n?n.id:100,lineNumber:0,text:r},timestamp:getPrecisionTimestamp()}})},e}();function throwConstructError(e){throw new Error("Failed to construct 'BoatmanInspector': ".concat(e))}function getHostStartupParams(){return workerGlobal.__appxStartupParams}function isAppxNg(){var e=getHostStartupParams();return!!e&&isTruthyParamValue(e.appxRouteFramework)}function isInRemoteDebug(){var e=getHostStartupParams();if(e){if(!e.channelId)return!1;if("__ignore__"===e.channelId)return!1}return!0}var initRequestTaskId=1e3,BoatmanInspectorHttpClientImpl4Ariver=function(){function e(){}return e.prototype.syncRequest=function(e){var t=abridge.callSync("tyroRequest",{url:e.url,method:e.method||"GET",headers:e.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:initRequestTaskId++,data:"string"==typeof e.body?e.body:JSON.stringify(e.body)});return t?t.error?{error:t.error,errorMessage:t.errorMessage}:{status:t.status,data:t.data}:{error:1,errorMessage:"unknown"}},e}();function debug(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}var BoatmanInspectorDebugPanelViewImpl=function(){function e(){}return e.prototype.updateDebugPanel=function(e,t,n){n||(n=this.getStatusText(e,t)),call("showRemoteDebugPanel",{status:t,text:n,buttonTitle:e.format("exit")})},e.prototype.getStatusText=function(e,t){var n="";switch(t){case EPanelStatus.Connecting:n=e.format("panelStatusPreparing");break;case EPanelStatus.Connected:n=e.format("panelStatusConnected");break;case EPanelStatus.Disconnected:n=e.format("panelStatusDisconnected")}return n},e}(),BoatmanInspectorWebSocketImpl4Ariver=function(){function e(e){this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.isSocketOpenedOnce=!1,this.useFromRemoteDebugFlag=!0,e&&(this.url=e),this.i18n=createI18N(),this.panelView=new BoatmanInspectorDebugPanelViewImpl,this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Connecting)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){this.url=e},e.prototype.open=function(){var e=this;setTimeout((function(){debug("call connection open",e.url),e.socketTask=abridge.connectSocket({__taskIdPrefix:"remote_debug_bm",url:e.url,multiple:!0,fromRemoteDebug:e.useFromRemoteDebugFlag,fail:function(t){e.onSocketError(t)}}),e.socketTask.onOpen((function(){e.handleSocketOpen()})),e.socketTask.onError((function(t){e.onSocketError(t.data)})),e.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),e.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))}),1500)},e.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7?log("message too large, skip",t.slice(0,50)):(debug("send message to boatman's socket",t.slice(0,50)),this.opened?this.socketTask.send({data:t,isBuffer:!1,fromRemoteDebug:this.useFromRemoteDebugFlag}):this.messageBeforeSocketOpen.push(t))},e.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},e.prototype.setSocketMessageHandler=function(e){this.externalMessageHandler=e},e.prototype.onSocketMessage=function(e){this.externalMessageHandler&&this.externalMessageHandler(e),"CLIENT:JOIN"===e?this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Connected):"CLIENT:LEAVE"===e&&this.onSocketClose()},e.prototype.onSocketOpen=function(){},e.prototype.onSocketError=function(e){if(console.error("connect boatman socket error",e),this.onSocketClose(),!this.isSocketOpenedOnce){var t=e?e.errorMessage||e.message:"closed";toast({content:this.i18n.format("errorExit")+t,duration:8e3})}},e.prototype.onSocketClose=function(){this.handleDebugPanelDisconnected()},e.prototype.handleDebugPanelDisconnected=function(){this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Disconnected),this.close()},e.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.isSocketOpenedOnce=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},e.prototype.showError=function(e){if(!isLyra()&&"no-valid-channel-id"===e)this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Disconnected,this.i18n.format("panelStatusNoValidChannelId")),toast({content:this.i18n.format("panelStatusNoValidChannelId")+", "+this.i18n.format("getHelp"),duration:2e3})},e}(),BoatmanInspectorPausedCoverViewImpl4Ariver=function(){function e(){this.pausedMessage="断点命中"}return e.prototype.setPausedMessage=function(e){this.pausedMessage=e},e.prototype.show=function(){abridge.showRemoteDebugMask({text:" ",buttonTitle:this.pausedMessage,hide:!1})},e.prototype.hide=function(){abridge.showRemoteDebugMask({hide:!0})},e}(),BoatmanInspectorStateProviderImpl4Ariver=function(){function e(){}return e.prototype.getChannelIdFromStartupParams=function(e){return e.channelId},e.prototype.getChannelFromStartupParams=function(e){var t=e.channel;if(t)return t},e.prototype.getChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelIdFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelIdSync=function(){return this.getChannelIdFromStartupParams(getStartupParamsSync())},e.prototype.getChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelSync=function(){return this.getChannelFromStartupParams(getStartupParamsSync())},e.prototype.resolveExternalStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelIdSync=function(){return this.channelId=this.getChannelIdSync(),log("[boatman] resolve channel id sync",this.channelId),this.channelId},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channelId=this.resolveChannelIdSync(),this.channelId||!this.getChannelId?[3,2]:(e=this,[4,this.getChannelId()]);case 1:e.channelId=t.sent(),t.label=2;case 2:return log("[boatman] resolved channelId",this.channelId),[2,this.channelId]}}))}))},e.prototype.resolveChannelSync=function(){return this.channel=this.getChannelSync(),log("[boatman] resolveChannelSync resolved channel",this.channel),this.channel},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel=this.resolveChannelSync(),this.channel||!this.getChannel?[3,2]:(e=this,[4,this.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return log("[boatman] resolved channel",this.channel),[2,this.channel]}}))}))},e}(),sharedEngine,bootInvokeNumber=0;function boot(e,t,n){var r;void 0===n&&(n={});var i=isInRemoteDebug(),o=getEventManager();if(bootInvokeNumber++,!sharedEngine){var a=new BoatmanInspector({provider:{httpClient:BoatmanInspectorHttpClientImpl4Ariver,websocketClient:BoatmanInspectorWebSocketImpl4Ariver,stateProvider:BoatmanInspectorStateProviderImpl4Ariver,pausedCoverView:BoatmanInspectorPausedCoverViewImpl4Ariver},eventManager:o,executionContextId:n.executionContextId,executionContextName:n.executionContextName});(sharedEngine=new Boatman).setInspector(a),o.on(EWorkerAppEvent$1.DebugPanelClick,(function(){a.disconnect()}))}var s=n.waitingForDebuggerToAttach;isAppxNg()||(log("[boatman] waitingForDebuggerToAttach is only supported in appx 2.0"),s=!1),s&&(i||(log("[boatman] user is not in remote debug mode, waitingForDebuggerToAttach is disabled"),s=!1)),sharedEngine.run(e,t,{stopAtEntry:n.stopAtEntry,waitingForDebuggerToAttach:s}),1===bootInvokeNumber&&(null===(r=sharedEngine.inspector)||void 0===r||r.warnPerformance())}getEventManager().patch(),exports.boot=boot,exports.getEventManager=getEventManager}));