minidev 1.6.2 → 1.6.3
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.
- package/assets/builder-debug-utils/offline/assets_map +1 -1
- package/assets/builder-debug-utils/offline/boatman_mini +1 -1
- package/assets/builder-debug-utils/package.json +5 -1
- package/assets/builder-debug-utils/readonly/assets_map +1 -1
- package/assets/builder-debug-utils/readonly/boatman_mini +1 -1
- package/assets/web-sim/devtool/main.js +1 -1
- package/assets/web-sim/main.js +1 -1
- package/assets/web-sim/simulator/main.js +1 -1
- package/lib/index.js +1 -1
- package/lib/rw_host.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(){"use strict";var EWorkerAppEvent,EBugmePanelId;!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",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 counter=Date.now()%1e9;function WeakSet$1(e){this.name="__st"+(1e9*Math.random()>>>0)+counter+++"__",e&&e.forEach&&e.forEach(this.add,this)}var proto=WeakSet$1.prototype;proto.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},proto.delete=function(e){return!!e[this.name]&&(e[this.name]=void 0,!0)},proto.has=function(e){return!!e[this.name]};var weakset=WeakSet$1,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 a=o.run;o.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.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 a=o.callback;if(a&&(o.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)}),o.pageInfo){var i=o.pageInfo.init;i&&(o.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),i.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function getStartupParams(){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>5e6?void debug("abort send websocket message due to size:",t.length):t}function createWeakSet(){return"undefined"==typeof WeakSet?new weakset:new WeakSet}var getCircularReplacer=function(){var e=createWeakSet();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(e){return JSON.stringify(e,getCircularReplacer())}function throttle(e,t,n,r,o){var a,i,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,i=e.apply(null,a),a=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 a=u,f<=0||f>t?(r(s),s=null,c=g,i=e.apply(null,a),a=null):s||!1===o.trailing||(s=n(p,f)),i}}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,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 getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet$1(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}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])})(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}).apply(this,arguments)},InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer$1=function(){var e=createWeakSet$1();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}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$1(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,r)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp()/1e3,args:n,context:circularJSONStringify$1(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(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(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 a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onApiSyncCallback(e,{context:t,args:c,reqId:i,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(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo(e){if(e.context){var t=e.context,n=t.apiName,r=t.extraInfo,o=t.isMiniExtension,a=t.option,i=t.startTime,s=t.taskId,c=t.__reqId;return __assign(__assign({},e),{context:{__reqId:c,apiName:n,extraInfo:r,isMiniExtension:o,option:a,startTime:i,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,a={aTime:o,args:n,context:circularJSONStringify$1(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,a),[[r,o],n]}),(function(t,n,r,o){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify$1(normalizePageLogicInstanceThisContext(t)),reqId:i})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),o=getPrecisionTimestamp()/1e3;return onSetData(e,{aTime:o,args:n,context:circularJSONStringify$1(normalizeComponentLogicInstanceThisContext(t)),reqId:r}),[[r,o],n]}),(function(t,n,r,o){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify$1(normalizeComponentLogicInstanceThisContext(t)),reqId:i})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(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(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.silentMode=!1,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(),this.channelId=this.startupParams.channelId||"",this.channel=this.startupParams.channel||"",(this.isLyra||this.startupParams.__bugmeSlientMode)&&(this.silentMode=!0),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,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,a=getTimestamp(),i=a-(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:i,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,a-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:"Networkw.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,a=n+r+o;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:a||-1,sslStart:a-o||-1,sslEnd:a||-1,sendStart:a?-1:1e-4,sendEnd:a?-1:1e-4,receiveHeadersEnd:a+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$1(e,t,n,r,o){var a,i,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,i=e.apply(null,a),a=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 a=u,f<=0||f>t?(r(s),s=null,c=g,i=e.apply(null,a),a=null):s||!1===o.trailing||(s=n(p,f)),i}}function debounce(e,t,n,r){var o;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];r(o),o=n((function(){e.apply(null,a)}),t)}}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),r=stringToIntArraySplitBy(t,"."),o=0,a=0,i=void 0,s=void 0;a<n.length;a++){if((i=r[a]||0)>(s=n[a]||0)){o=-1;break}if(i<s){o=1;break}}return o}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],r=0,o=e.split(t);r<o.length;r++){var a=o[r];n.push(parseInt(a,10))}return n}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.socket&&this.socket.close()},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>5e6||(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);function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}var WebSocketNativeImpl=function(e){function t(t){var n=e.call(this,t)||this;n.messageBeforeSocketOpen=[],n.useFromRemoteDebugFlag=!1;var r=getAriverVersion(getUserAgent());return r&&compareVersion(r,"1.1.0")>=0&&(n.useFromRemoteDebugFlag=!0),n}return __extends(t,e),t.prototype.open=function(){var e=this;this.socketTask=AFAppX.bridge.connectSocket({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>5e6||(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={"本次真机调试已结束,请重新生成调试版本":function(e){return"本次真机调试已结束,请重新生成调试版本。\n "+e.reason},"调试结束":"调试结束","callExitApp_退出":"退出","退出":"退出","准备中":"准备中","已断开":"已断开","已连接":"已连接","真机调试{text}":function(e){return"真机调试"+e.text}},messages$1={"本次真机调试已结束,请重新生成调试版本":function(e){return"Debug interrupted. Scan debug QR code to restart debugging."},"调试结束":"Debugging Ended","callExitApp_退出":"OK","退出":"Done","准备中":"Connecting","已断开":"Disconnected","已连接":"Connected","真机调试{text}":function(e){return""+e.text}};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,enUS:messages$1};this.i18nMessages=t[formatLocaleString(e)]}return e.getLocaleFromNavigator=function(){return formatLocaleString(navigator.language)},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(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify(e)):n.push(circularJSONStringify(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$1((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:"Tiny.Data.dataChanged",ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1});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$1({method:"MiniAppLog.onSetData",params:minimizeSetDataInfo$1(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$1({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$1({method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo$1(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$1({method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo$1(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$1({method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo$1(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$1({method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo$1(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$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 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 a=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$1({method:"MiniAppLog."+n,params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}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$1(e.args[0]);if(!n)return;sendOrQueueApplogMsg$1({method:"MiniAppLog."+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 a=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$1({method:"MiniAppLog."+n,params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}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$1({method:"MiniAppLog."+e.args[0],params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}}function sendOrQueueApplogMsg$1(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify(e)):n.push(circularJSONStringify(e))}catch(e){}}function minimizeApiHookInfo$1(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$1(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(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}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():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.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){return{type:"number",value:e,description:String(e)}},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,a=getObjectOwnPropertyDescriptors(e),i=Object.keys(a),s=this.objectStore.save(e),c=e.constructor?e.constructor.name:"Object",p=i.length>5&&!t,u={type:"object",className:c,description:c,objectId:s,preview:{type:"object",description:c,overflow:p,properties:(p?i.slice(0,5):i).map((function(e){return o.getPropertyPreview4ObjectProperty(e,a[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("+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("+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("+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":'+injectedScriptId+',"id":'+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);return t?{result:this.mapObject(t,Boolean(e.ownProperties),Boolean(e.accessorPropertiesOnly))}:{result:[]}},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var o=getObjectOwnPropertyDescriptors(e),a=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 e.__proto__&&a.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),a}for(var i=[],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)&&i.push(r.mapResultOne(t,o,u))}})),!p){var t=Object.getOwnPropertyDescriptor(c,"__proto__");t&&(p=!0,i.push(g.mapResultOne("__proto__",t,u)))}c=c.__proto__,u=!1},g=this;c;)l();return i},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}(),globalConsoleOverrider;function initConsoleOverrider(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrider=new ConsoleOverrider).overrideConsole()}function getConsoleOverrider(){return globalConsoleOverrider}var ConsoleOverrider=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMesasge({method:"Runtime.executionContextsCleared",params:{}}),this.sendMesasge({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{var o=/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/;if("string"==typeof t[0]&&o.test(t[0]))return r.apply(null,t);var a=new Error;a.stack&&e.sendMesasge(e.parser.consoleAPICalled(n,a.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMesasge=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessasges(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessasges=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.flushPendingMessasges())}),1e3)}},e}(),requirePluginName="requirePlugin",EPanelStatus;function hookRequirePlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);t&&!t.configurable||(t&&(e=workerGlobal.requirePlugin),Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Date.now();sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCall",params:{aTime:r,context:{apiName:requirePluginName,option:{arguments:t}}},ext:{origin:EBugmePanelId.AppLog}});try{var o=e.apply(void 0,t);return sendOrQueueApplogMsg({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({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}}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function updateDebugPanel(e){if(getInjector().getAgentContext().silentMode)return!1;var t=getInjector().getI18NFormatter(),n="";switch(e){case EPanelStatus.Connecting:n=t.format("准备中");break;case EPanelStatus.Connected:n=t.format("已连接");break;case EPanelStatus.Disconnected:n=t.format("已断开")}AFAppX.bridge.call("showRemoteDebugPanel",{status:e,text:t.format("真机调试{text}",{text:n}),buttonTitle:t.format("退出")})}function enable(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)}!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={}));var network=Object.freeze({__proto__:null,enable:enable,getResponseBody:getResponseBody});function enable$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrider();t&&t.createExecutionContext()}function getProperties(e){var t=getConsoleOverrider();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 consoleOverrider=getConsoleOverrider();if(consoleOverrider){var parser=consoleOverrider.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=e.name+": "+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,enable:enable$1,getProperties:getProperties,compileScript:compileScript,evaluate:evaluate});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var stringify_1=createCommonjsModule((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,a){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?r.splice(i,1/0,o):r.push(o),~n.indexOf(a)&&(a=t.call(this,o,a))}else n.push(a);return null==e?a:e.call(this,o,a)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n})),stringify_2=stringify_1.getSerialize,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_1(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify_1(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 a=getInjector().getRuntime();(t=null==a?callGetCurrentPages().filter((function(e){return e&&""+e.$viewId===r}))[0]:a.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&""+e.$viewId===r}))[0])&&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,getStorageInfo:getStorageInfo,clearStorage:clearStorage,removeStorage:removeStorage,setStorage:setStorage});function enable$2(){var e=getInjector().getMessageQueue();e.setApplogEnabled(!0),e.sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable$2});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$1(e){var t=getStartupParams();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Data:data,Storage:storage,Applog:applog,ping:ping,getSystemInfo:getSystemInfo,getStartupParams:getStartupParams$1});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,Runtime:runtime,Tiny:index,Page:page}),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(t){var n=e.call(this,t)||this;return n.isMessageReceived=!1,n.isSocketOpenedOnce=!1,n.messageBeforeReceived=[],updateDebugPanel(EPanelStatus.Connecting),n}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.exitDebug=function(){updateDebugPanel(EPanelStatus.Disconnected),this.close(),!isWebPlatform&&getInjector().getAgentContext().isIOS&&[1,2].forEach((function(e){AFAppX.bridge.call("closeSocket",{socketTaskId:e})}))},t.prototype.onSocketOpen=function(){e.prototype.onSocketOpen.call(this),this.isSocketOpenedOnce=!0,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){if(!this.isSocketOpenedOnce&&!getInjector().getAgentContext().silentMode){updateDebugPanel(EPanelStatus.Disconnected);var t=e?e.errorMessage||e.message:"closed";AFAppX.bridge.showToast({content:getInjector().getI18NFormatter().format("本次真机调试已结束,请重新生成调试版本",{reason:t}),duration:2e3,success:function(){}})}},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:JOIN"===e?updateDebugPanel(EPanelStatus.Connected):"CLIENT:LEAVE"===e&&this.exitDebug())}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={};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,a=r.content;try{n=JSON.parse(a)}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),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.exitDebug()},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 e+"/bugme/client_w/"+r}var DebugAgent=function(){function e(){}return e.prototype.init=function(){getGlobalWorkerEventListener().setup(),this.makeConnection(),this.printSDKVersion()},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.prototype.printSDKVersion=function(){var e=AFAppX.bridge.SDKVersion;/^2\./.test(e)&&setTimeout(console.log.bind(console,"SDKVersion: "+e))},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function printStaticPlugins(){var e=getStartupParams().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));t.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(t))}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 printDynamicPlugin(e){var t=e.split("@")[0],n=getInjector().getRuntime().getMiniExtensionManager().extensionVersions;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().meta;return"object"==typeof t.plugins&&0!==Object.keys(t.plugins).length||t.useDynamicPlugins}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParams())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager().extensionVersions,r=[];n.forEach((function(e,o){void 0===t[o]&&r.push({plugin_id:o,deploy_version:n.get(o)})})),console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}function main(){try{registerAppxHook(),initConsoleOverrider(),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)}}}();
|
|
1
|
+
!function(){"use strict";var EWorkerAppEvent,EBugmePanelId;!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",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 counter=Date.now()%1e9;function WeakSet$1(e){this.name="__st"+(1e9*Math.random()>>>0)+counter+++"__",e&&e.forEach&&e.forEach(this.add,this)}var proto=WeakSet$1.prototype;proto.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},proto.delete=function(e){return!!e[this.name]&&(e[this.name]=void 0,!0)},proto.has=function(e){return!!e[this.name]};var weakset=WeakSet$1,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 a=o.run;o.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.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 a=o.callback;if(a&&(o.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)}),o.pageInfo){var i=o.pageInfo.init;i&&(o.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),i.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>5e6?void debug("abort send websocket message due to size:",t.length):t}function createWeakSet$1(){return"undefined"==typeof WeakSet?new 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())}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])})(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}).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 a,i,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,i=functionApply(e,null,a),a=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 a=u,f<=0||f>t?(r(s),s=null,c=g,i=functionApply(e,null,a),a=null):s||!1===o.trailing||(s=n(p,f)),i}}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",a("_WeakMap")),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 a(e){return e+"_"+i()+"."+i()}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 a=e[this._id];return a&&a[0]===e?(a[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}createWeakMap();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 a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onApiSyncCallback(e,{context:t,args:c,reqId:i,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,a=t.option,i=t.startTime,s=t.taskId,c=t.__reqId;return __assign(__assign({},e),{context:{__reqId:c,apiName:n,extraInfo:r,isMiniExtension:o,option:a,startTime:i,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,a={aTime:o,args:n,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,a),[[r,o],n]}),(function(t,n,r,o){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:i})})),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 a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:i})}))}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.silentMode=!1,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.isLyra||this.startupParams.__bugmeSlientMode)&&(this.silentMode=!0),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,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,a=getTimestamp(),i=a-(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:i,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,a-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:"Networkw.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,a=n+r+o;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:a||-1,sslStart:a-o||-1,sslEnd:a||-1,sendStart:a?-1:1e-4,sendEnd:a?-1:1e-4,receiveHeadersEnd:a+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 a,i,s=null,c=0;o||(o={});var p=function(){c=!1===o.leading?0:Date.now(),s=null,i=e.apply(null,a),a=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 a=u,f<=0||f>t?(r(s),s=null,c=g,i=e.apply(null,a),a=null):s||!1===o.trailing||(s=n(p,f)),i}}function debounce(e,t,n,r){var o;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];r(o),o=n((function(){e.apply(null,a)}),t)}}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),r=stringToIntArraySplitBy(t,"."),o=0,a=0,i=void 0,s=void 0;a<n.length;a++){if((i=r[a]||0)>(s=n[a]||0)){o=-1;break}if(i<s){o=1;break}}return o}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],r=0,o=e.split(t);r<o.length;r++){var a=o[r];n.push(parseInt(a,10))}return n}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.socket&&this.socket.close()},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>5e6||(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);function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}var WebSocketNativeImpl=function(e){function t(t){var n=e.call(this,t)||this;n.messageBeforeSocketOpen=[],n.useFromRemoteDebugFlag=!1;var r=getAriverVersion(getUserAgent());return r&&compareVersion(r,"1.1.0")>=0&&(n.useFromRemoteDebugFlag=!0),n}return __extends(t,e),t.prototype.open=function(){var e=this;this.socketTask=AFAppX.bridge.connectSocket({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>5e6||(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={"本次真机调试已结束,请重新生成调试版本":function(e){return"本次真机调试已结束,请重新生成调试版本。\n "+e.reason},"调试结束":"调试结束","callExitApp_退出":"退出","退出":"退出","准备中":"准备中","已断开":"已断开","已连接":"已连接","真机调试{text}":function(e){return"真机调试"+e.text}},messages={"本次真机调试已结束,请重新生成调试版本":function(e){return"Debug interrupted. Scan debug QR code to restart debugging."},"调试结束":"Debugging Ended","callExitApp_退出":"OK","退出":"Done","准备中":"Connecting","已断开":"Disconnected","已连接":"Connected","真机调试{text}":function(e){return""+e.text}};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.getLocaleFromNavigator=function(){return formatLocaleString(navigator.language)},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});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 a=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."+n,params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}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."+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 a=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."+n,params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}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."+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}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():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.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){return{type:"number",value:e,description:String(e)}},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,a=getObjectOwnPropertyDescriptors(e),i=Object.keys(a),s=this.objectStore.save(e),c=e.constructor?e.constructor.name:"Object",p=i.length>5&&!t,u={type:"object",className:c,description:c,objectId:s,preview:{type:"object",description:c,overflow:p,properties:(p?i.slice(0,5):i).map((function(e){return o.getPropertyPreview4ObjectProperty(e,a[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("+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("+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("+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":'+injectedScriptId+',"id":'+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);return t?{result:this.mapObject(t,Boolean(e.ownProperties),Boolean(e.accessorPropertiesOnly))}:{result:[]}},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var o=getObjectOwnPropertyDescriptors(e),a=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 e.__proto__&&a.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),a}for(var i=[],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)&&i.push(r.mapResultOne(t,o,u))}})),!p){var t=Object.getOwnPropertyDescriptor(c,"__proto__");t&&(p=!0,i.push(g.mapResultOne("__proto__",t,u)))}c=c.__proto__,u=!1},g=this;c;)l();return i},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}(),globalConsoleOverrider;function initConsoleOverrider(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrider=new ConsoleOverrider).overrideConsole()}function getConsoleOverrider(){return globalConsoleOverrider}var ConsoleOverrider=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMesasge({method:"Runtime.executionContextsCleared",params:{}}),this.sendMesasge({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{var o=/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/;if("string"==typeof t[0]&&o.test(t[0]))return r.apply(null,t);var a=new Error;a.stack&&e.sendMesasge(e.parser.consoleAPICalled(n,a.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMesasge=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessasges(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessasges=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.flushPendingMessasges())}),1e3)}},e}(),requirePluginName="requirePlugin",EPanelStatus;function hookRequirePlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);t&&!t.configurable||(t&&(e=workerGlobal.requirePlugin),Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Date.now();sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCall",params:{aTime:r,context:{apiName:requirePluginName,option:{arguments:t}}},ext:{origin:EBugmePanelId.AppLog}});try{var o=e.apply(void 0,t);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}}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function updateDebugPanel(e){if(getInjector().getAgentContext().silentMode)return!1;var t=getInjector().getI18NFormatter(),n="";switch(e){case EPanelStatus.Connecting:n=t.format("准备中");break;case EPanelStatus.Connected:n=t.format("已连接");break;case EPanelStatus.Disconnected:n=t.format("已断开")}AFAppX.bridge.call("showRemoteDebugPanel",{status:e,text:t.format("真机调试{text}",{text:n}),buttonTitle:t.format("退出")})}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)}!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={}));var network=Object.freeze({__proto__:null,enable:enable$2,getResponseBody:getResponseBody});function enable$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrider();t&&t.createExecutionContext()}function getProperties(e){var t=getConsoleOverrider();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 consoleOverrider=getConsoleOverrider();if(consoleOverrider){var parser=consoleOverrider.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=e.name+": "+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,enable:enable$1,getProperties:getProperties,compileScript:compileScript,evaluate:evaluate});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var stringify_1=createCommonjsModule((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,a){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?r.splice(i,1/0,o):r.push(o),~n.indexOf(a)&&(a=t.call(this,o,a))}else n.push(a);return null==e?a:e.call(this,o,a)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n})),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_1(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify_1(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 a=getInjector().getRuntime();(t=null==a?callGetCurrentPages().filter((function(e){return e&&""+e.$viewId===r}))[0]:a.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&""+e.$viewId===r}))[0])&&o&&t.setData(o)}stringify_1.getSerialize;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,getStorageInfo:getStorageInfo,clearStorage:clearStorage,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,Data:data,Storage:storage,Applog:applog,ping:ping,getSystemInfo:getSystemInfo,getStartupParams:getStartupParams});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,Runtime:runtime,Tiny:index,Page:page}),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(t){var n=e.call(this,t)||this;return n.isMessageReceived=!1,n.isSocketOpenedOnce=!1,n.messageBeforeReceived=[],updateDebugPanel(EPanelStatus.Connecting),n}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.exitDebug=function(){updateDebugPanel(EPanelStatus.Disconnected),this.close(),!isWebPlatform&&getInjector().getAgentContext().isIOS&&[1,2].forEach((function(e){AFAppX.bridge.call("closeSocket",{socketTaskId:e})}))},t.prototype.onSocketOpen=function(){e.prototype.onSocketOpen.call(this),this.isSocketOpenedOnce=!0,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){if(!this.isSocketOpenedOnce&&!getInjector().getAgentContext().silentMode){updateDebugPanel(EPanelStatus.Disconnected);var t=e?e.errorMessage||e.message:"closed";AFAppX.bridge.showToast({content:getInjector().getI18NFormatter().format("本次真机调试已结束,请重新生成调试版本",{reason:t}),duration:2e3,success:function(){}})}},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:JOIN"===e?updateDebugPanel(EPanelStatus.Connected):"CLIENT:LEAVE"===e&&this.exitDebug())}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={};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,a=r.content;try{n=JSON.parse(a)}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),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.exitDebug()},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 e+"/bugme/client_w/"+r}var DebugAgent=function(){function e(){}return e.prototype.init=function(){getGlobalWorkerEventListener().setup(),this.makeConnection(),this.printSDKVersion()},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.prototype.printSDKVersion=function(){var e=AFAppX.bridge.SDKVersion;/^2\./.test(e)&&setTimeout(console.log.bind(console,"SDKVersion: "+e))},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()._meta.meta.plugins||{};Object.entries(n).forEach((function(n){var r=n[0],o=n[1];o.lazy&&!e[r]&&t.push({plugin_id: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.extensionExtraInfos){var t=e.extensionExtraInfos,n=new Map;return t.forEach((function(e,t){n.set(t,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().meta;return"object"==typeof t.plugins&&0!==Object.keys(t.plugins).length||t.useDynamicPlugins}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.extensionExtraInfos){n.extensionExtraInfos.forEach((function(e,n){if(void 0===t[n]){var o={plugin_id:n,deploy_version:e.version};e.package_nick&&(o.nick=e.package_nick),r.push(o)}}))}console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}function main(){try{registerAppxHook(),initConsoleOverrider(),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
2
|
|
|
3
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,i,r,s,o,a,u,c;!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"}(e||(e={})),function(t){t.paused="Debugger.paused",t.resumed="Debugger.resumed",t.scriptParsed="Debugger.scriptParsed"}(n||(n={})),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"}(i||(i={})),function(t){t.executionContextCreated="Runtime.executionContextCreated",t.consoleAPICalled="Runtime.consoleAPICalled",t.exceptionThrown="Runtime.exceptionThrown"}(r||(r={})),function(t){t.enable="Page.enable",t.getResourceTree="Page.getResourceTree"}(s||(s={})),function(t){t.setAutoAttach="Target.setAutoAttach"}(o||(o={})),function(t){t.targetCreated="Target.targetCreated",t.targetDestroyed="Target.targetDestroyed",t.targetInfoChanged="Target.targetInfoChanged",t.attachedToTarget="Target.attachedToTarget"}(a||(a={})),function(t){t[t.NormalError=-32e3]="NormalError"}(u||(u={})),function(t){t.Other="other",t.Exception="exception"}(c||(c={}));var h=Object.defineProperty.bind(Object),l=Object.defineProperties.bind(Object),p=Object.getOwnPropertyDescriptor.bind(Object),d=Object.freeze.bind(Object),f=Object.keys.bind(Object),m=Object.prototype.hasOwnProperty;function D(t,e){return m.call(t,e)}Object.assign.bind(Object);var y=Object.getOwnPropertyNames.bind(Object),x=Object.create.bind(Object);Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);var v="object"==typeof console,g=(v&&console.log&&console.log.bind(console),v&&console.warn?console.warn.bind(console):function(){}),b=v&&console.error?console.error.bind(console):function(){},C=p(D,"name").configurable;function E(t,e,n){h(t,e,{value:n,writable:!0,enumerable:!1,configurable:!0})}function F(t,e){return t[e]}var A=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=[],i=this.leading.length-1;i>=0;--i){var r=this.leading[i];e.end.offset>=r.start&&(n.unshift(r.comment),this.leading.splice(i,1),this.trailing.splice(i,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 i=this.trailing[n];i.start>=t.end.offset&&e.unshift(i.comment)}return this.trailing.length=0,e}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=t.end.offset&&(e=r.node.trailingComments,delete r.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,n=[];this.stack.length>0;){if(!((s=this.stack[this.stack.length-1])&&s.start>=t.start.offset))break;e=s.node,this.stack.pop()}if(e){for(var i=(e.leadingComments?e.leadingComments.length:0)-1;i>=0;--i){var r=e.leadingComments[i];r.range[1]<=t.start.offset&&(n.unshift(r),e.leadingComments.splice(i,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=t.start.offset&&(n.unshift(s.comment),this.leading.splice(i,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),i=this.findLeadingComments(e);i.length>0&&(t.leadingComments=i),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",i={type:n,value:t.value};if(t.range&&(i.range=t.range),t.loc&&(i.loc=t.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(r.comment.loc=t.loc),t.type=n,this.leading.push(r),this.trailing.push(r)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();function w(t,e){if(!t)throw new Error("ASSERT: "+e)}var k=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,i){var r="Line "+e+": "+i,s=this.constructError(r,n);return s.index=t,s.lineNumber=e,s.description=i,s},t.prototype.throwError=function(t,e,n,i){throw this.createError(t,e,n,i)},t.prototype.tolerateError=function(t,e,n,i){var r=this.createError(t,e,n,i);if(!this.tolerant)throw r;this.recordError(r)},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}(),S="Unexpected token",B="Getter must not have any formal parameters",T="Setter must have exactly one formal parameter",P="Setter function argument must not be a rest parameter",N="Class constructor may not be an async method",I="Class constructor may not be an accessor",O="Missing initializer in %0 declaration",j="Unexpected token =",M="Unexpected token =",R="Duplicate binding %0",U="A class may only have one constructor",z="Duplicate __proto__ fields are not allowed in object literals",_="%0 loop variable declaration may not have an initializer",L="Generator declarations are not allowed in legacy contexts",K="Illegal break statement",G="Illegal continue statement",H="Unexpected token",W="Unexpected token",q="Illegal 'use strict' directive in function with non-simple parameter list",V="Illegal return statement",Y="Keyword must not contain escaped characters",J="Invalid hexadecimal escape sequence",$="Invalid left-hand side in assignment",X="Invalid left-hand side in for-in",Q="Invalid left-hand side in for-loop",Z="Unexpected token",tt="Invalid regular expression",et="Invalid Unicode escape sequence",nt="let is disallowed as a lexically bound name",it="Unexpected token",rt="More than one default clause in switch statement",st="Illegal newline after throw",ot="Unexpected token",at="Missing catch or finally after try",ut="Rest parameter must be last formal parameter",ct="Unexpected token",ht="%0 '%1' has already been declared",lt="Classes may not have static property named prototype",pt="Catch variable may not be eval or arguments in strict mode",dt="Delete of an unqualified identifier in strict mode.",ft="In strict mode code, functions can only be declared at top level or inside a block",mt="Function name may not be eval or arguments in strict mode",Dt="Assignment to eval or arguments is not allowed in strict mode",yt="Postfix increment/decrement may not have eval or arguments operand in strict mode",xt="Prefix increment/decrement may not have eval or arguments operand in strict mode",vt="Strict mode code may not include a with statement",gt="Octal literals are not allowed in strict mode.",bt="Strict mode function may not have duplicate parameter names",Ct="Parameter name eval or arguments is not allowed in strict mode",Et="Use of future reserved word in strict mode",Ft="Variable name may not be eval or arguments in strict mode",At="Octal literals are not allowed in template strings.",wt="\\8 and \\9 are not allowed in template strings.",kt="Unexpected end of input",St="Unexpected identifier",Bt="Unexpected number",Tt="Unexpected reserved word",Pt="Unexpected string",Nt="Unexpected quasi %0",It="Unexpected token %0",Ot="Unexpected token ILLEGAL",jt="Undefined label '%0'",Mt="Invalid regular expression: missing /",Rt=function(t){this.type=30,this.elements=t},Ut=function(t){this.type=60,this.elements=t},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=!1},_t={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},Lt=function(t,e,n){this.type=32,this.operator=_t[t],this.left=e,this.right=n},Kt=function(t,e){this.type=61,this.left=t,this.right=e},Gt=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},Ht=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},Wt=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},qt=function(t){this.type=93,this.argument=t},Vt={"==":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},Yt=function(t,e,n){var i="||"===t||"&&"===t||"??"===t;this.type=i?38:33,this.operator=Vt[t],this.left=e,this.right=n},Jt=function(t){this.type=76,this.body=t},$t=function(t){this.type=1,this.label=t},Xt=function(t,e){this.type=34,this.callee=t,this.arguments=e},Qt=function(t,e){this.type=62,this.param=t,this.body=e},Zt=function(t){this.type=88,this.body=t},te=function(t,e,n){this.type=86,this.id=t,this.superClass=e,this.body=n},ee=function(t,e,n){this.type=94,this.id=t,this.superClass=e,this.body=n},ne=function(t,e){this.type=39,this.computed=!0,this.object=t,this.property=e},ie=function(t,e,n){this.type=35,this.test=t,this.consequent=e,this.alternate=n},re=function(t){this.type=2,this.label=t},se=function(){this.type=3},oe=function(t,e){this.type=5,this.expression=t,this.directive=e},ae=function(t,e){this.type=4,this.body=t,this.test=e},ue=function(){this.type=75},ce=function(t){this.type=82,this.source=t},he=function(t){this.type=83,this.declaration=t},le=function(t,e,n){this.type=84,this.declaration=t,this.specifiers=e,this.source=n},pe=function(t,e){this.type=85,this.exported=e,this.local=t},de=function(t){this.type=5,this.expression=t},fe=function(t,e,n){this.type=6,this.left=t,this.right=e,this.body=n,this.each=!1},me=function(t,e,n,i){this.type=7,this.await=i,this.left=t,this.right=e,this.body=n},De=function(t,e,n,i){this.type=8,this.init=t,this.test=e,this.update=n,this.body=i},ye=function(t,e,n,i){this.type=63,this.id=t,this.params=e,this.body=n,this.generator=i,this.expression=!1,this.async=!1},xe=function(t,e,n,i){this.type=36,this.id=t,this.params=e,this.body=n,this.generator=i,this.expression=!1,this.async=!1},ve=function(t){this.type=64,this.name=t},ge=function(t,e,n){this.type=9,this.test=t,this.consequent=e,this.alternate=n},be=function(){this.type=77},Ce=function(t,e){this.type=78,this.specifiers=t,this.source=e},Ee=function(t){this.type=79,this.local=t},Fe=function(t){this.type=80,this.local=t},Ae=function(t,e){this.type=81,this.local=t,this.imported=e},we=function(t,e){this.type=10,this.label=t,this.body=e},ke=function(t,e){this.type=65,this.value=t,this.raw=e},Se=function(t,e){this.type=89,this.meta=t,this.property=e},Be=function(t,e,n,i,r){this.type=95,this.key=t,this.computed=e,this.value=n,this.kind=i,this.static=r},Te=function(t){this.type=67,this.body=t,this.sourceType="module"},Pe=function(t,e){this.type=40,this.callee=t,this.arguments=e},Ne=function(t){this.type=41,this.properties=t},Ie=function(t){this.type=66,this.properties=t},Oe=function(t,e,n,i,r,s){this.type=68,this.key=e,this.computed=n,this.value=i,this.kind=t,this.method=r,this.shorthand=s},je=function(t,e,n,i){this.type=65,this.value=t,this.raw=e,this.regex={pattern:n,flags:i}},Me=function(t){this.type=69,this.argument=t},Re=function(t){this.type=11,this.argument=t},Ue=function(t){this.type=67,this.body=t,this.sourceType="script"},ze=function(t){this.type=37,this.expressions=t},_e=function(t){this.type=70,this.argument=t},Le=function(t,e){this.type=39,this.computed=!1,this.object=t,this.property=e},Ke=function(){this.type=87},Ge=function(t,e){this.type=71,this.test=t,this.consequent=e},He=function(t,e){this.type=12,this.discriminant=t,this.cases=e},We=function(t,e){this.type=42,this.tag=t,this.quasi=e},qe=function(t,e){this.type=72,this.value=t,this.tail=e},Ve=function(t,e){this.type=73,this.quasis=t,this.expressions=e},Ye=function(){this.type=43},Je=function(t){this.type=13,this.argument=t},$e=function(t,e,n){this.type=14,this.block=t,this.handler=e,this.finalizer=n},Xe={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},Qe=function(t,e){this.type=44,this.operator=Xe[t],this.argument=e,this.prefix=!0},Ze={"++":1,"--":2},tn=function(t,e,n){this.type=45,this.operator=Ze[t],this.argument=e,this.prefix=n},en={var:1,let:2,const:3},nn=function(t,e){this.type=17,this.declarations=t,this.kind=en[e]},rn=function(t,e){this.type=74,this.id=t,this.init=e},sn=function(t,e){this.type=15,this.test=t,this.body=e},on=function(t,e){this.type=16,this.object=t,this.body=e},an=function(t,e){this.type=92,this.argument=t,this.delegate=e},un={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]/},cn={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&&un.NonAsciiIdentifierStart.test(cn.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&&un.NonAsciiIdentifierPart.test(cn.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isDecimalDigitChar:function(t){return 1===t.length&&cn.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 hn(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function ln(t){return"01234567".indexOf(t)}var pn=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=Ot),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=Ot),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,n,i=[];for(this.trackComment&&(i=[],e=this.index-t,n={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(++this.index,cn.isLineTerminator(r)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:n};i.push(s)}return 13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};s={multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:n};i.push(s)}return i},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 i=this.source.charCodeAt(this.index);if(cn.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){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 r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e};n.push(r)}return n}++this.index}else++this.index}if(this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};r={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e};n.push(r)}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(cn.isWhiteSpace(n))++this.index;else if(cn.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 i=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(i)),e=!0}else{if(42!==n)break;this.index+=2;i=this.skipMultiLineComment();this.trackComment&&(t=t.concat(i))}else if(e&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;i=this.skipSingleLineComment(3);this.trackComment&&(t=t.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;i=this.skipSingleLineComment(4);this.trackComment&&(t=t.concat(i))}}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,i=0;i<e;++i){if(this.eof()||!cn.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+hn(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++],cn.isHexDigit(t.charCodeAt(0)));)e=16*e+hn(t);return e>1114111||"}"!==t?null:cn.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(!cn.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),n=cn.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&&cn.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),n=t);!this.eof()&&(e=this.codePointAt(this.index),cn.isIdentifierPart(e));)n+=t=cn.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&&cn.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),n+=t);return n},t.prototype.octalToDecimal=function(t){var e="0"!==t,n=ln(t);return!this.eof()&&cn.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,n=8*n+ln(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&cn.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+ln(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 i=this.index;this.index=e,this.tolerateUnexpectedToken(Y),this.index=i}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()&&cn.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),cn.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),(cn.isIdentifierStart(e)||cn.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="",i=!1;for(cn.isOctalDigit(t.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&cn.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(cn.isIdentifierStart(this.source.charCodeAt(this.index))||cn.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,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(!cn.isOctalDigit(e.charCodeAt(0)))return!0}return!0},t.prototype.scanNumericLiteral=function(){var t=this.index,e=this.source[t];w(cn.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&&cn.isOctalDigit(e.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(e,t)}for(;cn.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];e=this.source[this.index]}if("."===e){for(n+=this.source[this.index++];cn.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++]),cn.isDecimalDigit(this.source.charCodeAt(this.index)))for(;cn.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return cn.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];w("'"===e||'"'===e,"String literal must starts with a quote"),++this.index;for(var n=!1,i="";!this.eof();){var r=this.source[this.index++];if(r===e){e="";break}if("\\"===r)if((r=this.source[this.index++])&&cn.isLineTerminator(r.charCodeAt(0)))++this.lineNumber,"\r"===r&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(r){case"u":if("{"===this.source[this.index])++this.index,i+=this.scanUnicodeCodePointEscape();else{var s=this.scanHexEscape(r);null===s&&this.throwUnexpectedToken(),i+=s}break;case"x":var o=this.scanHexEscape(r);null===o&&this.throwUnexpectedToken(J),i+=o;break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;case"8":case"9":i+=r,this.tolerateUnexpectedToken();break;default:if(r&&cn.isOctalDigit(r.charCodeAt(0))){var a=this.octalToDecimal(r);n=a.octal||n,i+=String.fromCharCode(a.code)}else i+=r}else{if(cn.isLineTerminator(r.charCodeAt(0)))break;i+=r}}return""!==e&&(this.index=t,this.throwUnexpectedToken()),{type:8,value:i,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanTemplate=function(){var t="",e=!1,n=this.index,i="`"===this.source[n],r=!1,s=null,o=2;for(++this.index;!this.eof();){var a=this.source[this.index++];if("`"===a){o=1,r=!0,e=!0;break}if("$"===a){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,e=!0;break}t+=a}else{if(null!==s)continue;if("\\"===a)if(a=this.source[this.index++],cn.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?s="u":t+=u}else{var c=this.scanHexEscape(a);null===c?s="u":t+=c}break;case"x":var h=this.scanHexEscape(a);null===h?s="x":t+=h;break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:"0"===a?cn.isDecimalDigit(this.source.charCodeAt(this.index))?s="0":t+="\0":cn.isDecimalDigitChar(a)?s=a:t+=a}else cn.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(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-o),cooked:null===s?t:null,head:i,tail:r,notEscapeSequenceHead:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},t.prototype.testRegExp=function(t,e){var n=this,i=t;e.indexOf("u")>=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(t,e,i){var r=parseInt(e||i,16);return r>1114111&&n.throwUnexpectedToken(tt),r<=65535?String.fromCharCode(r):""})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(i)}catch(t){this.throwUnexpectedToken(tt)}try{return new RegExp(t,e)}catch(t){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];w("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],n=!1,i=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],cn.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(Mt),e+=t;else if(cn.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(Mt);else if(n)"]"===t&&(n=!1);else{if("/"===t){i=!0;break}"["===t&&(n=!0)}return i||this.throwUnexpectedToken(Mt),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!cn.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,i=this.scanHexEscape("u");if(null!==i)for(t+=i,"\\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 cn.isIdentifierStart(t)?this.scanIdentifier():40===t||41===t||59===t?this.scanPunctuator():39===t||34===t?this.scanStringLiteral():46===t?cn.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():cn.isDecimalDigit(t)?this.scanNumericLiteral():96===t||125===t&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():t>=55296&&t<57343&&cn.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}(),dn={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},fn="ArrowParameterPlaceHolder",mn=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 k,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new pn(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 i=e.slice(),r=t.replace(/%(\d)/g,(function(t,e){return w(e<i.length,"Message reference must be in range"),i[e]})),s=this.lastMarker.index,o=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(s,o,a,r)},t.prototype.tolerateError=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=e.slice(),r=t.replace(/%(\d)/g,(function(t,e){return w(e<i.length,"Message reference must be in range"),i[e]})),s=this.lastMarker.index,o=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(s,o,a,r)},t.prototype.unexpectedTokenError=function(t,e){var n,i=e||It;if(t?(e||(i=2===t.type?kt:3===t.type?St:6===t.type?Bt:8===t.type?Pt:10===t.type?Nt:It,4===t.type&&(this.scanner.isFutureReservedWord(t.value)?i=Tt:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(i=Et))),n=t.value):n="ILLEGAL",i=i.replace("%0",n),t&&"number"==typeof t.lineNumber){var r=t.start,s=t.lineNumber,o=this.lastMarker.index-this.lastMarker.column,a=t.start-o+1;return this.errorHandler.createError(r,s,a,i)}r=this.lastMarker.index,s=this.lastMarker.line,a=this.lastMarker.column+1;return this.errorHandler.createError(r,s,a,i)},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],i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])};this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={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(i,r)}}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:dn[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,i=t.flags;e.regex={pattern:n,flags:i}}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,i=t.lineNumber;return n<0&&(n+=e,i--),{index:t.start,line:i,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,It)}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,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},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,i=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(i,new ve(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,gt),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new ke(e.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new ke("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(i,new ke(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(i,new je(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(i,new ve(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(i,new Ye)):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 _e(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 Rt(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 i=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,i},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new xe(null,n.params,i,!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 i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=e,this.context.await=n,this.finalize(t,new Wt(null,i.params,r))},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,gt);var i=this.getTokenRaw(n);t=this.finalize(e,new ke(n.value,i));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new ve(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(),i=this.lookahead,r=null,s=null,o=!1,a=!1,u=!1,c=!1;if(3===i.type){var h=i.value;this.nextToken(),o=this.match("["),r=(c=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new ve(h))}else this.match("*")?this.nextToken():(o=this.match("["),r=this.parseObjectPropertyKey());var l=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!c&&"get"===i.value&&l)e="get",o=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===i.type&&!c&&"set"===i.value&&l)e="set",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&l)e="init",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),a=!0;else if(r||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!c)!o&&this.isPropertyKey(r,"__proto__")&&(t.value&&this.tolerateError(z),t.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0;else if(3===i.type){h=this.finalize(n,new ve(i.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var p=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new Kt(h,p))}else u=!0,s=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new Oe(e,r,o,s,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 Ne(e))},t.prototype.throwTemplateLiteralEarlyErrors=function(t){switch(t.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(t,et);case"x":return this.throwUnexpectedToken(t,J);case"8":case"9":return this.throwUnexpectedToken(t,wt);default:return this.throwUnexpectedToken(t,At)}},t.prototype.parseTemplateHead=function(t){w(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 i=n.value,r=n.cooked;return this.finalize(e,new qe({raw:i,cooked:r},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 i=n.value,r=n.cooked;return this.finalize(e,new qe({raw:i,cooked:r},n.tail))},t.prototype.parseTemplateLiteral=function(t){var e=this.createNode(),n=[],i=[],r=this.parseTemplateHead(t);for(i.push(r);!r.tail;)n.push(this.parseExpression()),r=this.parseTemplateElement(t),i.push(r);return this.finalize(e,new Ve(i,n))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case 64:case 39:case 69:case 61: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:fn,params:[],async:!1};else{var e=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:fn,params:[t],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,t={type:fn,params:r,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);i=!0,t={type:fn,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(t=this.finalize(this.startNode(e),new ze(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(64===t.type&&"yield"===t.name&&(i=!0,t={type:fn,params:[t],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===t.type)for(s=0;s<t.expressions.length;s++)this.reinterpretExpressionAsPattern(t.expressions[s]);else this.reinterpretExpressionAsPattern(t);var o=37===t.type?t.expressions:[t];t={type:fn,params:o,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 ve(e.value))},t.prototype.parseNewExpression=function(){var t,e=this.createNode(),n=this.parseIdentifierName();if(w("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 i=this.parseIdentifierName();t=new Se(n,i)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var r=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];t=new Pe(r,s),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 be)},t.prototype.parseLeftHandSideExpressionAllowCall=function(){var t,e=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(t=this.createNode(),this.nextToken(),t=this.finalize(t,new Ke),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 r=this.parseIdentifierName();t=this.finalize(this.startNode(e),new Le(t,r))}else if(this.match("(")){var s=n&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var o=s?this.parseAsyncArguments():this.parseArguments();if(77===t.type&&1!==o.length&&this.tolerateError(S),t=this.finalize(this.startNode(e),new Xt(t,o)),s&&this.match("=>")){for(var a=0;a<o.length;++a)this.reinterpretExpressionAsPattern(o[a]);t={type:fn,params:o,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(this.startNode(e),new ne(t,r))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(this.startNode(e),new We(t,u))}return this.context.allowIn=i,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 Ke)},t.prototype.parseLeftHandSideExpression=function(){w(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 ne(e,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");n=this.parseIdentifierName();e=this.finalize(t,new Le(e,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var i=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(t,new We(e,i))}return e},t.prototype.parseUpdateExpression=function(){var t,e=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(e),i=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===t.type&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(xt),this.context.isAssignmentTarget||this.tolerateError($);var r=!0;t=this.finalize(n,new tn(i.value,t,r)),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(yt),this.context.isAssignmentTarget||this.tolerateError($),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1;t=this.finalize(this.startNode(e),new tn(s,t,r))}return t},t.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var e=this.parseUnaryExpression();return this.finalize(t,new qt(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 Qe(n.value,t)),this.context.strict&&"delete"===t.operator&&64===t.argument.type&&this.tolerateError(dt),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,i=this.isolateCoverGrammar(this.parseExponentiationExpression);e=this.finalize(this.startNode(t),new Yt("**",n,i))}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,i=!0,r=function(t){"&&"!==t.value&&"||"!==t.value||(i=!1),"??"===t.value&&(n=!1)},s=this.lookahead,o=this.binaryPrecedence(s);if(o>0){r(s),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var a=[t,this.lookahead],u=e,c=this.isolateCoverGrammar(this.parseExponentiationExpression),h=[u,s.value,c],l=[o];!((o=this.binaryPrecedence(this.lookahead))<=0);){for((n||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(i||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),r(this.lookahead);h.length>2&&o<=l[l.length-1];){c=h.pop();var p=h.pop();l.pop(),u=h.pop(),a.pop();var d=a[a.length-1],f=this.startNode(d,d.lineStart);h.push(this.finalize(f,new Yt(p,u,c)))}h.push(this.nextToken().value),l.push(o),a.push(this.lookahead),h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=h.length-1;e=h[m];for(var D=a.pop();m>1;){d=a.pop();var y=D&&D.lineStart;f=this.startNode(d,y),p=h[m-1];e=this.finalize(f,new Yt(p,h[m-2],e)),m-=2,D=d}}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 i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new ie(e,i,r)),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 i=e.properties[n];this.checkPatternParam(t,69===i.type?i:i.value)}}t.simple=t.simple&&e instanceof ve},t.prototype.reinterpretAsCoverFormalsList=function(t){var e=[t],n={simple:!0,paramSet:{}},i=!1;switch(t.type){case 64:break;case fn:e=t.params,i=t.async;break;default:return null}for(var r=0;r<e.length;++r){61===(s=e[r]).type?92===s.right.type&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=64,s.right.name="yield",delete s.right.argument,delete s.right.delegate):i&&64===s.type&&"await"===s.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,s),e[r]=s}if(this.context.strict||!this.context.allowYield)for(r=0;r<e.length;++r){var s;92===(s=e[r]).type&&this.throwUnexpectedToken(this.lookahead)}if(n.message===bt){var o=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(o,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 i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),t={type:fn,params:[i],async:!0}}if(t.type===fn||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t.async,s=this.reinterpretAsCoverFormalsList(t);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,a=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=r;var h=this.startNode(e);this.expect("=>");var l=void 0;if(this.match("{")){var p=this.context.allowIn;this.context.allowIn=!0,l=this.parseFunctionSourceElements(),this.context.allowIn=p}else l=this.isolateCoverGrammar(this.parseAssignmentExpression);var d=76!==l.type;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),t=r?this.finalize(h,new Gt(s.params,l,d)):this.finalize(h,new zt(s.params,l,d)),this.context.strict=o,this.context.allowStrictDirective=a,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError($),this.context.strict&&64===t.type){var f=t;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(n,Dt),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(n,Et)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var m=(n=this.nextToken()).value,D=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new Lt(m,t,D)),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 ze(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,H),t=this.parseExportDeclaration();break;case"import":this.matchImportCall()?t=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,W),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 Jt(e))},t.prototype.parseLexicalBinding=function(t,e){var n=this.createNode(),i=this.parsePattern([],t);this.context.strict&&64===i.type&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(Ft);var r=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(O,"const")):(!e.inFor&&64!==i.type||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new rn(i,r))},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;w("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(e,new nn(i,n))},t.prototype.parseBindingRestElement=function(t,e){var n=this.createNode();this.expect("...");var i=this.parsePattern(t,e);return this.finalize(n,new Me(i))},t.prototype.parseArrayPattern=function(t,e){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(t,e));break}i.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new Ut(i))},t.prototype.parsePropertyPattern=function(t,e){var n,i,r=this.createNode(),s=!1,o=!1;if(3===this.lookahead.type){var a=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(r,new ve(a.value));if(this.match("=")){t.push(a),o=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(a),new Kt(u,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(t,e)):(t.push(a),o=!0,i=u)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(t,e);return this.finalize(r,new Oe("init",n,s,i,!1,o))},t.prototype.parseRestProperty=function(t,e){var n=this.createNode();this.expect("...");var i=this.parsePattern(t);return this.match("=")&&this.throwError(M),this.match("}")||this.throwError(ct),this.finalize(n,new Me(i))},t.prototype.parseObjectPattern=function(t,e){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.match("...")?this.parseRestProperty(t,e):this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new Ie(i))},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,nt),t.push(this.lookahead),n=this.parseVariableIdentifier(e)),n},t.prototype.parsePatternWithDefault=function(t,e){var n=this.lookahead,i=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new Kt(i,s))}return i},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,Et):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,Et):(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 ve(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(Ft);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===n.type||t.inFor||this.expect("="),this.finalize(e,new rn(n,i))},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 nn(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new ue)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new de(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(ft),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ue)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(e,new ge(i,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 i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new ae(n,i))},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 ue);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=i}return this.finalize(e,new sn(n,t))},t.prototype.parseForStatement=function(){var t,e,n,i=null,r=null,s=null,o=!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")){i=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!a&&1===h.length&&this.matchKeyword("in")){var l=h[0];l.init&&(60===l.id.type||66===l.id.type||this.context.strict)&&this.tolerateError(_,"for-in"),i=this.finalize(i,new nn(h,"var")),this.nextToken(),t=i,e=this.parseExpression(),i=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new nn(h,"var")),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,o=!1):(i=this.finalize(i,new nn(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var p=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;h=this.parseBindingList(p,{inFor:!0});this.context.allowIn=c,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new nn(h,p)),this.nextToken(),t=i,e=this.parseExpression(),i=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new nn(h,p)),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,o=!1):(this.consumeSemicolon(),i=this.finalize(i,new nn(h,p)))}else i=this.finalize(i,new ve(p)),this.nextToken(),t=i,e=this.parseExpression(),i=null}else{var d=this.lookahead,f=this.context.isBindingElement,m=this.context.isAssignmentTarget,D=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==i.type||this.tolerateError(X),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==i.type||this.tolerateError(Q),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseAssignmentExpression(),i=null,o=!1;else{if(this.context.isBindingElement=f,this.context.isAssignmentTarget=m,this.context.firstCoverInitializedNameError=D,this.match(",")){for(var y=[i];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(d),new ze(y))}this.expect(";")}}if(void 0===t&&(this.match(";")||(r=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(s=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new ue);else{this.expect(")");var x=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=x}return void 0===t?this.finalize(u,new De(i,r,s,n)):o?this.finalize(u,new fe(t,e,n)):this.finalize(u,new me(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 i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(jt,n.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(G),this.finalize(t,new re(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(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(jt,n.name),e=n}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(K),this.finalize(t,new $t(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(V);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 Re(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(vt);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 ue)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new on(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 Ge(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 i=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(rt),r=!0),i.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new He(e,i))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),n=this.parseExpression();if(64===n.type&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(ht,"Label",i.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var o=this.lookahead,a=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(o,ft):a.generator&&this.tolerateUnexpectedToken(o,L),s=a}else s=this.parseStatement();delete this.context.labelSet[r],t=new we(i,s)}else this.consumeSemicolon(),t=new de(n);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(st);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new Je(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),i={},r=0;r<e.length;r++){var s="$"+e[r].value;Object.prototype.hasOwnProperty.call(i,s)&&this.tolerateError(R,e[r].value),i[s]=!0}this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(pt),this.expect(")");var o=this.parseBlock();return this.finalize(t,new Qt(n,o))},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,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(at),this.finalize(t,new $e(e,n,i))},t.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new se)},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,i=this.context.inIteration,r=this.context.inSwitch,s=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=i,this.context.inSwitch=r,this.context.inFunctionBody=s,this.finalize(t,new Jt(e))},t.prototype.validateParam=function(t,e,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(t.stricted=e,t.message=Ct),Object.prototype.hasOwnProperty.call(t.paramSet,i)&&(t.stricted=e,t.message=bt)):t.firstRestricted||(this.scanner.isRestrictedWord(n)?(t.firstRestricted=e,t.message=Ct):this.scanner.isStrictModeReservedWord(n)?(t.firstRestricted=e,t.message=Et):Object.prototype.hasOwnProperty.call(t.paramSet,i)&&(t.stricted=e,t.message=bt)),"function"==typeof Object.defineProperty?Object.defineProperty(t.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[i]=!0},t.prototype.parseRestElement=function(t){var e=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(j),this.match(")")||this.throwError(ut),this.finalize(e,new Me(n))},t.prototype.parseFormalParameter=function(t){for(var e=[],n=this.match("...")?this.parseRestElement(e):this.parsePatternWithDefault(e),i=0;i<e.length;i++)this.validateParam(t,e[i],e[i].value);t.simple=t.simple&&n instanceof ve,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 i,r=!n&&this.match("*");r&&this.nextToken();var s=null,o=null;if(!t||!this.match("(")){var a=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(a.value)&&this.tolerateUnexpectedToken(a,mt):this.scanner.isRestrictedWord(a.value)?(o=a,i=mt):this.scanner.isStrictModeReservedWord(a.value)&&(o=a,i=Et)}var u=this.context.await,c=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var h=this.parseFormalParameters(o),l=h.params,p=h.stricted;o=h.firstRestricted,h.message&&(i=h.message);var d=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var m=this.parseFunctionSourceElements();return this.context.strict&&o&&this.throwUnexpectedToken(o,i),this.context.strict&&p&&this.tolerateUnexpectedToken(p,i),this.context.strict=d,this.context.allowStrictDirective=f,this.context.await=u,this.context.allowYield=c,n?this.finalize(e,new Ht(s,l,m)):this.finalize(e,new ye(s,l,m,r))},t.prototype.parseFunctionExpression=function(){var t=this.createNode(),e=this.matchContextualKeyword("async");e&&this.nextToken(),this.expectKeyword("function");var n,i=!e&&this.match("*");i&&this.nextToken();var r,s=null,o=this.context.await,a=this.context.allowYield;if(this.context.await=e,this.context.allowYield=!i,!this.match("(")){var u=this.lookahead;s=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,mt):this.scanner.isRestrictedWord(u.value)?(r=u,n=mt):this.scanner.isStrictModeReservedWord(u.value)&&(r=u,n=Et)}var c=this.parseFormalParameters(r),h=c.params,l=c.stricted;r=c.firstRestricted,c.message&&(n=c.message);var p=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var f=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&l&&this.tolerateUnexpectedToken(l,n),this.context.strict=p,this.context.allowStrictDirective=d,this.context.await=o,this.context.allowYield=a,e?this.finalize(t,new Wt(s,h,f)):this.finalize(t,new xe(s,h,f,i))},t.prototype.parseDirective=function(){var t=this.lookahead,e=this.createNode(),n=this.parseExpression(),i=65===n.type?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(e,i?new oe(n,i):new de(n))},t.prototype.parseDirectivePrologues=function(){for(var t=null,e=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();e.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,gt),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,q)):!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(B);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new xe(null,n.params,i,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(T):n.params[0]instanceof Me&&this.tolerateError(P);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new xe(null,n.params,i,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 i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new xe(null,n.params,i,!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 i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(t,new an(e,n))},t.prototype.parseClassElement=function(t){var e=this.lookahead,n=this.createNode(),i="",r=null,s=null,o=!1,a=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(o=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,u=!0,o=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(c=!0,e=this.lookahead,o=this.match("["),r=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,N))}var l=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&l?(i="get",o=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===e.value&&l&&(i="set",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===e.type&&"*"===e.value&&l&&(i="init",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),a=!0),!i&&r&&this.match("(")&&(i="init",s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),o||(u&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(e,lt),!u&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!a||s&&s.generator)&&this.throwUnexpectedToken(e,I),t.value?this.throwUnexpectedToken(e,U):t.value=!0,i="constructor")),this.finalize(n,new Be(r,o,s,i,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 Zt(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(e,new te(i,r,s))},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,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=e,this.finalize(t,new ee(n,i,r))},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 Te(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 Ue(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(Z);var e=this.nextToken(),n=this.getTokenRaw(e);return this.finalize(t,new ke(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 Ae(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 Ee(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(ot),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new Fe(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(W);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 i=this.lookahead.value?It:it;this.throwError(i,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new Ce(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 pe(e,n))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(H);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 he(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);t=this.finalize(e,new he(n))}else if(this.matchContextualKeyword("async")){n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new he(n))}else{this.matchContextualKeyword("from")&&this.throwError(It,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new he(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?It:it;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new ce(r))}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 le(n,[],null))}else if(this.matchAsyncFunction()){n=this.parseFunctionDeclaration();t=this.finalize(e,new le(n,[],null))}else{var s=[],o=null,a=!1;for(this.expect("{");!this.match("}");)a=a||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),o=this.parseModuleSpecifier(),this.consumeSemicolon();else if(a){i=this.lookahead.value?It:it;this.throwError(i,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new le(null,s,o))}return t},t}(),Dn=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=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;e=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}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 k,this.errorHandler.tolerant=!!e&&("boolean"==typeof e.tolerant&&e.tolerant),this.scanner=new pn(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 Dn}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],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var s=void 0;this.trackLoc&&(s={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var a=this.scanner.saveState();try{o=this.scanner.scanRegExp()}catch(n){this.scanner.restoreState(a),o=this.scanner.lex()}}else o=this.scanner.lex();this.reader.push(o);var u={type:dn[o.type],value:this.scanner.source.slice(o.start,o.end)};if(this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(s.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=s),9===o.type){var c=o.pattern,h=o.flags;u.regex={pattern:c,flags:h}}this.buffer.push(u)}}return this.buffer.shift()}}();function yn(t,e,n){var i=null,r=function(t,e){n&&n(t,e),i&&i.visit(t,e)},s="function"==typeof n?r:null,o=!1;if(e){o="boolean"==typeof e.comment&&e.comment;var a="boolean"==typeof e.attachComment&&e.attachComment;(o||a)&&((i=new A).attach=a,e.comment=!0,s=r)}var u=!1;e&&"string"==typeof e.sourceType&&(u="module"===e.sourceType);var c=new mn(t,e,s),h=u?c.parseModule():c.parseScript();return o&&i&&(h.comments=i.comments),c.config.tokens&&(h.tokens=c.tokens),c.config.tolerant&&(h.errors=c.errorHandler.errors),h}function xn(t,e,n){var i=e||{};return i.sourceType="script",yn(t,i,n)}var vn={type:"return",value:void 0},gn={type:"continue",value:null},bn={type:"break",value:null},Cn=Fn("noinit"),En=Fn("deadzone");function Fn(t){return t+Math.random().toString(36).substring(2)}var An="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function wn(t){return t===vn||t===bn||t===gn}var kn={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"},Sn=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){return this.value=t},t}(),Bn=function(){function t(t,e){this.value=e,this.kind=3}return t.prototype.set=function(t){throw new TypeError(kn.assignmentToConst)},t.prototype.strictSet=function(t){throw new TypeError(kn.assignmentToConst)},t}(),Tn=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}(),Pn=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}(),Nn=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 Pn(this.globalObject,t)),e},t.prototype.deleteProperty=function(t){return delete this.globalObject[t]},t}(),In=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])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),On=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.find=function(t){for(var e=this,n=e.parent;n;){var i=e.context[t];if(i)return i;n=(e=n).parent}return e.find(t)},t.prototype.var=function(t,e){var n=this.context,i=n[t];i?e!==Cn&&i.set(e):n[t]=new Sn(1,e===Cn?void 0:e)},t.prototype.let=function(t,e){var n=this.context[t];if(n){if(n.value!==En)throw new SyntaxError(kn.identifierDeclared.replace("%0",t));n.set(e)}else this.context[t]=new Sn(2,e)},t.prototype.const=function(t,e){var n=this.context[t];if(n&&n.value!==En)throw new SyntaxError(kn.identifierDeclared.replace("%0",t));this.context[t]=new Bn(3,e)},t.prototype.func=function(t,e){var n=this.context,i=n[t];i?this.strict?i.strictSet(e):i.set(e):n[t]=new Sn(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}(),jn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isolated=!1,e}return In(e,t),e.prototype.var=function(t,e){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var i=n.context,r=i[t];if(r)e!==Cn&&r.set(e);else{var s=e===Cn?void 0:e;i[t]=new Sn(1,s)}},e.prototype.func=function(t,e){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var i=n.context,r=i[t];r?n.strict?r.strictSet(e):r.set(e):i[t]=new Sn(1,e)},e}(On),Mn=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])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Rn=function(t){function e(e,n,i){var r=t.call(this,e,n)||this;return r.withObject=i,r}return Mn(e,t),e.prototype.find=function(e){return this.context[e]?this.context[e]:e in this.withObject?new Pn(this.withObject,e):t.prototype.find.call(this,e)},e.prototype.var=function(e,n){e in this.withObject?this.withObject[e]=n:t.prototype.var.call(this,e,n)},e}(jn),Un=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])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),zn=function(t){function e(e,n){var i=t.call(this,e,null)||this;return i.engine=e,i.globalObject=n,i.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),i}return Un(e,t),e.prototype.var=function(t,e){var n=this.context,i=n[t];if(i)e!==Cn&&i.set(e);else{var r=e===Cn?void 0:e,s=n.this.value,o=new Tn(s,t);n[t]=o,t in s?e!==Cn&&o.set(r):h(s,t,{value:r,writable:!0,enumerable:!0,configurable:!1})}},e.prototype.func=function(t,e){var n=this.context,i=n[t];if(i)this.strict?i.strictSet(e):i.set(e);else{var r=n.this.value,s=new Tn(r,t);n[t]=s,t in r?this.strict?s.strictSet(e):s.set(e):h(r,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 Tn(this.globalObject,t):void 0)},e}(On);function _n(t,e,n){if(e.generator||e.async)throw new Error(kn.notImplemented.replace("%0","Generator or async function"));var i,r=31===e.type,s=t.runtimeProfile,o=s.scriptId,a=function(){var i=new On(t,n),u=s.scriptId;s.scriptId=o,s.pushCallFrame({functionName:a.name,functionScope:i,functionNode:e}),r||(i.const("this",this),i.var("arguments",arguments));try{for(var c=e.params,h=0;h<c.length;h++){var l=c[h];i.var(l.name,arguments[h])}var p=void 0,d=e.body;if(76===d.type?(Ln(t,d,i,0),p=Zn(t,d,i,3)):(p=ci(t,d,i),r&&(vn.value=p,p=vn)),s.popCallFrame(),s.scriptId=u,p===vn)return p.value}catch(e){var f=t.inspector;if(f&&!s.callExpressionStack.length){var m=F(e,"__rewrittenzxcd");m&&m.node&&(f.shouldPauseOnException(o,e,m.node,!0),f.throwException(e))}throw s.popCallFrame(),s.scriptId=u,e}},u=function(){"use strict";var i=new On(t,n);i.strict=!0;var a=s.scriptId;s.scriptId=o,s.pushCallFrame({functionName:u.name,functionScope:i,functionNode:e}),r||(i.const("this",this),i.const("arguments",arguments));try{for(var c=e.params,h=0;h<c.length;h++){var l=c[h];i.var(l.name,arguments[h])}var p=void 0,d=e.body;if(76===d.type?(Ln(t,d,i,0),p=Zn(t,d,i,3)):(p=ci(t,d,i),r&&(vn.value=p,p=vn)),s.popCallFrame(),s.scriptId=a,p===vn)return p.value}catch(e){var f=t.inspector;if(f&&!s.callExpressionStack.length){var m=F(e,"__rewrittenzxcd");m&&m.node&&(f.shouldPauseOnException(o,e,m.node,!0),f.throwException(e))}throw s.popCallFrame(),s.scriptId=a,e}},c=e.params.length,p=n.strict||76===(i=e.body).type&&i.body.length&&"use strict"===i.body[0].directive?u:a;return C&&l(p,{name:{value:e.id&&e.id.name||"",configurable:!0},length:{value:c,configurable:!0}}),E(p,"___func_locationxasdzzy",{node:e,scriptId:t.runtimeProfile.scriptId}),h(p,"toString",{value:function(){return"function () { ... }"},writable:!0,configurable:!0}),p}function Ln(t,e,n,i){var r=e.body;if(!n.strict){var s=r[0];s&&"use strict"===s.directive&&(n.strict=!0)}for(var o=0;o<r.length;o++){var a=r[o];63===a.type?n.func(a.id.name,_n(t,a,n)):Kn(t,a,n)}}function Kn(t,e,n){switch(e.type){case 17:Gn(t,e,n);break;case 6:case 7:17===e.left.type&&Gn(t,e.left,n);case 8:8===e.type&&e.init&&17===e.init.type&&Gn(t,e.init,n);case 15:case 4:Kn(t,e.body,n);break;case 9:Kn(t,e.consequent,n),e.alternate&&Kn(t,e.alternate,n);break;case 76:for(var i=e.body,r=0;r<i.length;r++)Kn(t,i[r],n);break;case 12:var s=e.cases;for(r=0;r<s.length;r++)for(var o=s[r].consequent,a=0;a<o.length;a++)Kn(t,o[a],n);break;case 14:var u=e.block.body;for(r=0;r<u.length;r++)Kn(t,u[r],n);var c=e.handler&&e.handler.body.body;if(c)for(r=0;r<c.length;r++)Kn(t,c[r],n);var h=e.finalizer&&e.finalizer.body;if(h)for(r=0;r<h.length;r++)Kn(t,h[r],n)}}function Gn(t,e,n){for(var i=e.declarations,r=e.kind,s=0;s<i.length;s++){var o=i[s];1===r&&n.var(o.id.name,Cn)}}function Hn(t,e,n,i){var r=e.name;if("undefined"!==r){var s=n.find(r);if(s)return s.value;if(!i)throw new ReferenceError(kn.notDefined.replace("%0",r))}}function Wn(t,e,n){if("undefined"!==t){var i=e.find(t);if(i)return i;if(!n)throw new ReferenceError(kn.notDefined.replace("%0",t))}}function qn(t,e,n,i){var r=e.init,s=r?ci(t,r,n):void 0,o=e.id.name;r&&n.var(o,s),!r||36!==r.type&&31!==r.type||!C||s.name||h(s,"name",{value:o,configurable:!0})}var Vn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,s=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},Yn=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Vn(arguments[e]));return t},Jn=Function.prototype.apply;function $n(t,e,n,i){var r=ci(t,e.object,n),s=e.computed?ci(t,e.property,n):e.property.name;return 1&i?new Pn(r,s):r[s]}function Xn(t,e,n){return e.value.raw}var Qn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zn(t,e,n,i){var r,s,o=n;try{for(var a=Qn(e.body),u=a.next();!u.done;u=a.next()){var c=ci(t,u.value,o);if(wn(c))return c}}catch(t){r={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}}function ti(t,e,n){for(var i=e.consequent,r=0;r<i.length;r++){var s=ci(t,i[r],n);if(wn(s))return s}}function ei(t,e,n){return Zn(t,e.body,n)}function ni(t,e,n,i){for(;ci(t,e.test,n);){var r=ci(t,e.body,n);if(r===bn){if(bn.value)return bn;break}if(r!==gn){if(r===vn)return r}else if(gn.value&&gn.value!==i)return gn}}function ii(t,e,n,i){do{var r=ci(t,e.body,n);if(r===bn){if(bn.value)return bn;break}if(r!==gn){if(r===vn)return r}else if(gn.value&&gn.value!==i)return gn}while(ci(t,e.test,n))}function ri(t,e,n,i){var r=n;for(e.init&&ci(t,e.init,r);!e.test||ci(t,e.test,r);e.update&&ci(t,e.update,r)){var s=n,o=e.body,a=76===o.type?Zn(t,o,s):ci(t,o,s);if(a===bn){if(bn.value)return bn;break}if(a!==gn){if(a===vn)return a}else if(gn.value&&gn.value!==i)return gn}}function si(t,e,n,i){var r=ci(t,e.right,n);for(var s in r){var o=ai(t,e,n,s);if(o===bn){if(bn.value)return bn;break}if(o!==gn){if(o===vn)return o}else if(gn.value&&gn.value!==i)return gn}}function oi(t,e,n,i){var r,s,o=ci(t,e.right,n);try{for(var a=Qn(o),u=a.next();!u.done;u=a.next()){var c=ai(t,e,n,u.value);if(c===bn){if(bn.value)return bn;break}if(c!==gn){if(c===vn)return c}else if(gn.value&&gn.value!==i)return gn}}catch(t){r={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}}function ai(t,e,n,i){var r=e.left,s=e.body,o=n;if(17===r.type)!function(t,e,n,i){for(var r=e.declarations,s=e.kind,o=0;o<r.length;o++){var a=r[o].id;n.declare(s,a.name,i)}}(0,r,o,i);else{if(64!==r.type)throw new SyntaxError(kn.unexpectedToken);var a=Wn(r.name,n,n.strict?0:1);a||(a=t.globalObjectAccessor.getProperty(r.name)),n.strict?a.strictSet(i):a.set(i)}return 76===s.type?Zn(t,s,o):ci(t,s,o)}var ui=[null,function(t,e){return bn.value=e.label?e.label.name:null,bn},function(t,e){return gn.value=e.label?e.label.name:null,gn},function(t,e,n){if(!t.inspector)debugger},ii,function(t,e,n){return ci(t,e.expression,n)},si,oi,ri,function(t,e,n){return ci(t,e.test,n)?ci(t,e.consequent,n):e.alternate?ci(t,e.alternate,n):void 0},function(t,e,n){var i,r=e.label.name,s=e.body;switch(s.type){case 8:i=ri(t,s,n,r);break;case 6:i=si(t,s,n,r);break;case 7:i=oi(t,s,n,r);break;case 4:i=ii(t,s,n,r);break;case 15:i=ni(t,s,n,r);break;default:i=ci(t,e.body,n)}if(i!==bn||bn.value!==r)return i},function(t,e,n){return vn.value=e.argument?ci(t,e.argument,n):void 0,vn},function(t,e,n){for(var i=ci(t,e.discriminant,n),r=!1,s=-1,o=e.cases,a=o.length,u=0;u<a;u++){var c=o[u];if(r||(c.test?ci(t,c.test,n)===i&&(r=!0):s=u),r){var h=ti(t,c,n);if(h===bn){if(bn.value)return bn;break}if(h===gn||h===vn)return h}!r&&u===a-1&&s>-1&&(u=s-1,r=!0)}},function(t,e,n){throw ci(t,e.argument,n)},function(t,e,n){var i;try{return i=Zn(t,e.block,n)}catch(a){if(e.handler){var r=new jn(t,n),s=e.handler.param;if(s){var o=s.name;r.let(o,a)}return i=ei(t,e.handler,r)}throw a}finally{if(e.finalizer){var a=!1,u=void 0;wn(i)&&(a=!0,u=i.value);var c=Zn(t,e.finalizer,n);if(wn(c))return c;a&&(i.value=u)}}},ni,function(t,e,n){var i=ci(t,e.object,n);if(null==i)throw new TypeError(kn.convertNullToObject);var r=new Rn(t,n,Object(i)),s=e.body;return 76===s.type?(Ln(t,s,r),Zn(t,s,r)):ci(t,s,r)},function(t,e,n){for(var i=e.declarations,r=e.kind,s=0;s<i.length;s++)qn(t,i[s],n,r)},null,null,null,null,null,null,null,null,null,null,null,null,function(t,e,n){for(var i=e.elements,r=i.length,s=new Array(r),o=0;o<r;o++){var a;null!==(a=i[o])&&(s[o]=ci(t,a,n))}return s},function(t,e,n){return _n(t,e,n)},function(t,e,n){var i,r=e.left;switch(r.type){case 64:(i=Wn(r.name,n,n.strict?0:1))||(i=t.globalObjectAccessor.getProperty(r.name));break;case 39:i=$n(t,r,n,1);break;default:throw new SyntaxError(kn.unexpectedToken)}var s=ci(t,e.right,n);switch(e.operator){case 1:return n.strict?i.strictSet(s):i.set(s),i.value;case 2:return n.strict?i.strictSet(i.value+s):i.set(i.value+s),i.value;case 3:return n.strict?i.strictSet(i.value-s):i.set(i.value-s),i.value;case 4:return n.strict?i.strictSet(i.value*s):i.set(i.value*s),i.value;case 5:return n.strict?i.strictSet(i.value/s):i.set(i.value/s),i.value;case 6:return n.strict?i.strictSet(i.value%s):i.set(i.value%s),i.value;case 13:return n.strict?i.strictSet(i.value&s):i.set(i.value&s),i.value;case 11:return n.strict?i.strictSet(i.value|s):i.set(i.value|s),i.value;case 12:return n.strict?i.strictSet(i.value^s):i.set(i.value^s),i.value;case 8:return n.strict?i.strictSet(i.value<<s):i.set(i.value<<s),i.value;case 9:return n.strict?i.strictSet(i.value>>s):i.set(i.value>>s),i.value;case 10:return n.strict?i.strictSet(i.value>>>s):i.set(i.value>>>s),i.value;case 7:return n.strict?i.strictSet(Math.pow(i.value,s)):i.set(Math.pow(i.value,s)),i.value;default:throw new SyntaxError(kn.unexpectedToken)}},function(t,e,n){var i=ci(t,e.left,n),r=ci(t,e.right,n);switch(e.operator){case 1:return i==r;case 2:return i!=r;case 3:return i===r;case 4:return i!==r;case 5:return i<r;case 6:return i<=r;case 7:return i>r;case 8:return i>=r;case 12:return i+r;case 13:return i-r;case 14:return i*r;case 16:return i/r;case 17:return i%r;case 22:return i instanceof r;case 18:return i|r;case 19:return i^r;case 20:return i&r;case 9:return i<<r;case 10:return i>>r;case 21:return i in r;case 11:return i>>>r;case 15:return Math.pow(i,r);default:throw new SyntaxError(kn.unexpectedToken)}},function(t,e,n){var i,r,s=e.callee;if(39===s.type){r=ci(t,s.object,n);var o=s.computed?ci(t,s.property,n):s.property.name;if("function"!=typeof(i=r[o]))throw new TypeError(kn.notFunction.replace("%0",o))}else if("function"!=typeof(i=ci(t,s,n))){var a;if(64===s.type)a=s.name;else try{a=JSON.stringify(i)}catch(t){a=""+i}throw new TypeError(kn.notFunction.replace("%0",a))}for(var u=e.arguments,c=u.length,h=new Array(c),l=0;l<c;l++)h[l]=ci(t,u[l],n);var p=t.runtimeProfile;p.pushCallExpression(e);try{var d=Jn.call(i,r,h);return p.popCallExpression(),d}catch(t){throw p.popCallExpression(),t}},function(t,e,n){return ci(t,e.test,n)?ci(t,e.consequent,n):ci(t,e.alternate,n)},function(t,e,n){if(e.id&&e.id.name){var i=new jn(t,n),r=_n(t,e,i);return i.const(e.id.name,r),r}return _n(t,e,n)},function(t,e,n){for(var i,r=e.expressions,s=0;s<r.length;s++)i=ci(t,r[s],n);return i},function(t,e,n){switch(e.operator){case 1:return ci(t,e.left,n)||ci(t,e.right,n);case 2:return ci(t,e.left,n)&&ci(t,e.right,n);default:throw new SyntaxError(kn.unexpectedToken)}},$n,function(t,e,n){for(var i=e.callee,r=ci(t,i,n),s=e.arguments,o=e.arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=ci(t,s[u],n);var c=t.runtimeProfile;c.pushCallExpression(e);try{var h=void 0;switch(a.length){case 0:h=new r;break;case 1:h=new r(a[0]);break;case 2:h=new r(a[0],a[1]);break;case 3:h=new r(a[0],a[1],a[2]);break;default:h=new(r.bind.apply(r,Yn([void 0],a)))}return c.popCallExpression(),h}catch(t){throw 64===i.type&&(t.message=t.message.replace(/\bconstruct\$0\b/g,i.name)),c.popCallExpression(),t}},function(t,e,n){for(var i={},r=e.properties,s=0;s<r.length;s++){0;var o=r[s],a=o.key,u=void 0;u=64===a.type?a.name:a.value+"";var c=o.value,l=ci(t,c,n);36!==c.type&&31!==c.type||C&&h(l,"name",{value:u,configurable:!0});var d=o.kind;if("init"===d)i[u]=l;else if("get"===d){var f=p(i,u);h(i,u,{get:l,set:f&&f.set,enumerable:!0,configurable:!0})}else{f=p(i,u);h(i,u,{get:f&&f.get,set:l,enumerable:!0,configurable:!0})}}return i},function(t,e,n){var i=ci(t,e.tag,n),r=e.quasi.quasis,s=r.map((function(t){return t.value.cooked})),o=r.map((function(t){return t.value.raw}));h(s,"raw",{value:d(o)});var a=e.quasi.expressions,u=[];if(a)for(var c=0;c<a.length;c++)u.push(ci(t,a[c],n));return i.apply(void 0,Yn([d(s)],u))},function(t,e,n){return n.find("this").value},function(t,e,n){var i=e.argument;switch(e.operator){case 3:return!ci(t,i,n);case 6:return 64===i.type?typeof Hn(0,i,n,1):typeof ci(t,i,n);case 7:if(39===i.type){var r=$n(t,i,n,1);return n.strict?r.strictDelete():r.delete()}if(64===i.type){if(n.strict)throw new SyntaxError(kn.deleteUnqualified);for(var s=n,o=i.name;s&&!s.context[o];)s=s.parent;if(s){if(s.parent||1!==s.context[o].kind)return!1;var a=t.globalObjectAccessor.deleteProperty(o);return a&&delete s.context[o],a}return t.globalObjectAccessor.deleteProperty(o)}return ci(t,i,n),!0;case 1:return+ci(t,i,n);case 2:return-ci(t,i,n);case 4:return~ci(t,i,n);case 5:return void ci(t,i,n);default:throw new SyntaxError(kn.unexpectedToken)}},function(t,e,n){var i,r=e.argument;switch(r.type){case 64:i=Wn(r.name,n,0);break;case 39:i=$n(t,r,n,1);break;default:throw new SyntaxError(kn.unexpectedToken)}var s,o=i.value;switch(e.operator){case 1:return s=o++,n.strict?i.strictSet(o):i.set(o),e.prefix?o:s;case 2:return s=o--,n.strict?i.strictSet(o):i.set(o),e.prefix?o:s;default:throw new SyntaxError(kn.unexpectedToken)}},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,ei,function(){},Hn,function(t,e,n){var i;if((null===(i=e)||void 0===i?void 0:i.regex)&&/g|y/.test(e.regex.flags)){var r=e.regex,s=r.pattern,o=r.flags;return new RegExp(s,o)}return e.value},null,function(t,e,n){Ln(t,e,n);var i=t.runtimeProfile;i.pushCallFrame({functionName:"",functionNode:e,functionScope:n});try{for(var r=void 0,s=e.body,o=0;o<s.length;o++)r=ci(t,s[o],n);return i.popCallFrame(),r}catch(t){throw i.popCallFrame(),t}},null,null,null,ti,Xn,function(t,e,n){for(var i,r,s=e.quasis.slice(),o=e.expressions.slice(),a="";i=s.shift();)a+=Xn(t,i,n),(r=o.shift())&&(a+=ci(t,r,n));return a},qn,function(){},Zn];function ci(t,e,n){var i,r=e.type;if(65===r){if((null===(i=e)||void 0===i?void 0:i.regex)&&/g|y/.test(e.regex.flags)){var s=e.regex,o=s.pattern,a=s.flags;return new RegExp(o,a)}return e.value}var u=t.inspector;u&&u.hitBreakpoint(t.runtimeProfile.scriptId,e);try{var c=ui[r];if(c)return c(t,e,n,0);throw new Error(kn.unexpectedToken+"("+r+")")}catch(n){var h=t.runtimeProfile;throw h.rewriteErrorStack(h.scriptId,n,e),u&&u.shouldPauseOnException(h.scriptId,n,e,!1),n}}var hi=function(){return(hi=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},li=Function.prototype.apply.call.bind(Array.prototype.push),pi=Function.prototype.apply.call.bind(Array.prototype.pop),di=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""+this.scriptCountId++},t.prototype.getNextExceptionId=function(){return this.exceptionId++},t.prototype.pushCallFrame=function(t){li(this.callFrames,hi(hi({},t),{scriptId:this.scriptId,callFrameId:"10000.1."+this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()}))},t.prototype.popCallFrame=function(){pi(this.callFrames)},t.prototype.pushCallExpression=function(t){li(this.callExpressionStack,t)},t.prototype.popCallExpression=function(){pi(this.callExpressionStack)},t.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},t.prototype.rewriteErrorStack=function(t,e,n){var i=this;if(e instanceof Error&&!F(e,"__rewrittenzxcd")){var r=this.scriptMap[t]?this.scriptMap[t].url:"",s=this.callFrames.map((function(t,e){var s,o,a=i.callFrames[e+1];if(a?a.callExpressionNode&&(s=a.callExpressionNode.loc.start.line,o=a.callExpressionNode.loc.start.column+1):(s=n.loc.start.line,o=n.loc.start.column+1),void 0===s)return" at <anonymous>";var u=(r&&"anonymous"!==r?r:"<anonymous>")+":"+s+":"+o;return t.functionName?" at "+t.functionName+" ("+u+")":" at "+u})).reverse().join("\n");e.stack=e.name+": "+e.message+"\n"+s,E(e,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:n})}},t}(),fi=function(){function t(t){if(void 0===t&&(t={}),this.options=t,this.runtimeProfile=new di,t.sandbox){var e=t.sandboxGlobalObjectCreator?t.sandboxGlobalObjectCreator():(i={},["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!==An[t]&&(i[t]=An[t])})),i);this.globalObjectAccessor=new Nn(e),(n=new zn(this,e)).const("this",e),n.var("self",e),n.const("exports",this.exports={}),this.globalScope=n}else{var n;this.globalObjectAccessor=new Nn(An),(n=new zn(this,An)).const("this",An),n.var("self",An),this.globalScope=n}var i}return t.prototype.import=function(t){if("object"==typeof t){var e=this.globalScope.context;y(t).forEach((function(n){e[n]=new Sn(1,t[n])}))}},t.prototype.run=function(t,e){var n=xn(t,{loc:!0}),i=this.runtimeProfile,r=i.scriptId,s=i.getNextScriptId(),o=e||"anonymous";i.scriptId=s,i.scriptMap[s]={scriptId:s,url:o},this.inspector&&this.inspector.evaluateScript(i.scriptId,t,n,o);try{var a=ci(this,n,this.globalScope);return i.scriptId=r,a}catch(t){if(i.scriptId=r,this.inspector){var u=F(t,"__rewrittenzxcd");u&&u.node&&(this.inspector.shouldPauseOnException(s,t,u.node,!0),this.inspector.throwException(t))}throw t}},t.prototype.evaluate=function(t,e){var n=xn(t,{loc:!0}),i=this.runtimeProfile,r=i.scriptId;i.scriptId=i.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(i.scriptId,t,n,"");var s=e||this.globalScope;try{var o=ci(this,n,s);return i.scriptId=r,o}catch(t){throw i.scriptId=r,t}},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 An},t}();var mi,Di,yi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function xi(t,e,n){n(t,e)}function vi(){}!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"}(Di||(Di={}));var gi=((mi={Statement:xi,Expression:xi,MemberPattern:xi,VariablePattern:vi,Class:function(t,e,n){t.id&&n(t.id,e,Di.Pattern),t.superClass&&n(t.superClass,e,Di.Expression),n(t.body,e)},ForInit:function(t,e,n){17===t.type?n(t,e):n(t,e,Di.Expression)},Function:function(t,e,n){var i,r;"id"in t&&t.id&&n(t.id,e,Di.Pattern);try{for(var s=yi(t.params),o=s.next();!o.done;o=s.next()){n(o.value,e,Di.Pattern)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}n(t.body,e,"expression"in t&&t.expression?Di.Expression:Di.Statement)},Pattern:function(t,e,n){64===t.type?n(t,e,Di.VariablePattern):39===t.type?n(t,e,Di.MemberPattern):n(t,e)}})[75]=vi,mi[1]=vi,mi[2]=vi,mi[3]=vi,mi[72]=vi,mi[43]=vi,mi[87]=vi,mi[89]=vi,mi[81]=vi,mi[79]=vi,mi[80]=vi,mi[64]=vi,mi[65]=vi,mi[76]=function(t,e,n){var i,r;try{for(var s=yi(t.body),o=s.next();!o.done;o=s.next()){n(o.value,e,Di.Statement)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[5]=function(t,e,n){n(t.expression,e,Di.Expression)},mi[9]=function(t,e,n){n(t.test,e,Di.Expression),n(t.consequent,e,Di.Statement),t.alternate&&n(t.alternate,e,Di.Statement)},mi[10]=function(t,e,n){n(t.body,e,Di.Statement)},mi[16]=function(t,e,n){n(t.object,e,Di.Expression),n(t.body,e,Di.Statement)},mi[12]=function(t,e,n){var i,r,s,o;n(t.discriminant,e,Di.Expression);try{for(var a=yi(t.cases),u=a.next();!u.done;u=a.next()){var c=u.value;c.test&&n(c.test,e,Di.Expression);try{for(var h=(s=void 0,yi(c.consequent)),l=h.next();!l.done;l=h.next()){n(l.value,e,Di.Statement)}}catch(t){s={error:t}}finally{try{l&&!l.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}}}catch(t){i={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}},mi[71]=function(t,e,n){var i,r;t.test&&n(t.test,e,Di.Expression);try{for(var s=yi(t.consequent),o=s.next();!o.done;o=s.next()){n(o.value,e,Di.Statement)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[11]=function(t,e,n){t.argument&&n(t.argument,e,Di.Expression)},mi[13]=function(t,e,n){n(t.argument,e,Di.Expression)},mi[14]=function(t,e,n){n(t.block,e,Di.Statement),t.handler&&n(t.handler,e),t.finalizer&&n(t.finalizer,e,Di.Statement)},mi[62]=function(t,e,n){t.param&&n(t.param,e,Di.Pattern),n(t.body,e,Di.Statement)},mi[15]=function(t,e,n){n(t.test,e,Di.Expression),n(t.body,e,Di.Statement)},mi[8]=function(t,e,n){t.init&&n(t.init,e,Di.ForInit),t.test&&n(t.test,e,Di.Expression),t.update&&n(t.update,e,Di.Expression),n(t.body,e,Di.Statement)},mi[6]=function(t,e,n){n(t.left,e,Di.ForInit),n(t.right,e,Di.Expression),n(t.body,e,Di.Statement)},mi[63]=function(t,e,n){n(t,e,Di.Function)},mi[17]=function(t,e,n){var i,r;try{for(var s=yi(t.declarations),o=s.next();!o.done;o=s.next()){n(o.value,e)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[74]=function(t,e,n){n(t.id,e,Di.Pattern),t.init&&n(t.init,e,Di.Expression)},mi[69]=function(t,e,n){n(t.argument,e,Di.Pattern)},mi[60]=function(t,e,n){var i,r;try{for(var s=yi(t.elements),o=s.next();!o.done;o=s.next()){var a=o.value;a&&n(a,e,Di.Pattern)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[66]=function(t,e,n){var i,r;try{for(var s=yi(t.properties),o=s.next();!o.done;o=s.next()){var a=o.value;68===a.type?(a.computed&&n(a.key,e,Di.Expression),n(a.value,e,Di.Pattern)):69===a.type&&n(a.argument,e,Di.Pattern)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[30]=function(t,e,n){var i,r;try{for(var s=yi(t.elements),o=s.next();!o.done;o=s.next()){var a=o.value;a&&n(a,e,Di.Expression)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[41]=function(t,e,n){var i,r;try{for(var s=yi(t.properties),o=s.next();!o.done;o=s.next()){n(o.value,e)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[37]=function(t,e,n){var i,r;try{for(var s=yi(t.expressions),o=s.next();!o.done;o=s.next()){n(o.value,e,Di.Expression)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[73]=function(t,e,n){var i,r,s,o;try{for(var a=yi(t.quasis),u=a.next();!u.done;u=a.next()){n(u.value,e)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}try{for(var c=yi(t.expressions),h=c.next();!h.done;h=c.next()){n(h.value,e,Di.Expression)}}catch(t){s={error:t}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}},mi[44]=function(t,e,n){n(t.argument,e,Di.Expression)},mi[33]=function(t,e,n){n(t.left,e,Di.Expression),n(t.right,e,Di.Expression)},mi[32]=function(t,e,n){n(t.left,e,Di.Pattern),n(t.right,e,Di.Expression)},mi[35]=function(t,e,n){n(t.test,e,Di.Expression),n(t.consequent,e,Di.Expression),n(t.alternate,e,Di.Expression)},mi[40]=function(t,e,n){var i,r;if(n(t.callee,e,Di.Expression),t.arguments)try{for(var s=yi(t.arguments),o=s.next();!o.done;o=s.next()){n(o.value,e,Di.Expression)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[39]=function(t,e,n){n(t.object,e,Di.Expression),t.computed&&n(t.property,e,Di.Expression)},mi[84]=function(t,e,n){t.declaration&&n(t.declaration,e,84===t.type||t.declaration&&"id"in t.declaration&&t.declaration.id?Di.Statement:Di.Expression),t.source&&n(t.source,e,Di.Expression)},mi[82]=function(t,e,n){t.exported&&n(t.exported,e),n(t.source,e,Di.Expression)},mi[78]=function(t,e,n){var i,r;try{for(var s=yi(t.specifiers),o=s.next();!o.done;o=s.next()){n(o.value,e)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}n(t.source,e,Di.Expression)},mi[90]=function(t,e,n){n(t.source,e,Di.Expression)},mi[42]=function(t,e,n){n(t.tag,e,Di.Expression),n(t.quasi,e,Di.Expression)},mi[86]=function(t,e,n){n(t,e,Di.Class)},mi[88]=function(t,e,n){var i,r;try{for(var s=yi(t.body),o=s.next();!o.done;o=s.next()){n(o.value,e)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},mi[95]=function(t,e,n){t.computed&&n(t.key,e,Di.Expression),n(t.value,e,Di.Expression)},mi);gi[67]=gi[76],gi[91]=gi[5],gi[92]=gi[93]=gi[11],gi[70]=gi[13],gi[4]=gi[15],gi[7]=gi[6],gi[36]=gi[31]=gi[63],gi[45]=gi[44],gi[38]=gi[33],gi[61]=gi[32],gi[34]=gi[40],gi[83]=gi[84],gi[94]=gi[86],gi[68]=gi[95];function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function Ci(t){return"function"==typeof t}function Ei(t){return!!F(t,"__can_breakpointasxu")||t.type<30}function Fi(t,e,n,i){var r,s,o=n||{lineNumber:e.lineNumber+1,columnNumber:0},a=[];return r=t.ast,s=function(t,n){if(t.loc){var r={startLineNumber:t.loc.start.line-1,startColumnNumber:t.loc.start.column,endLineNumber:t.loc.end.line-1,endColumnNumber:t.loc.end.column};return r.endLineNumber<e.lineNumber||r.startLineNumber>o.lineNumber||r.endLineNumber===e.lineNumber&&r.endColumnNumber<=e.columnNumber||r.startLineNumber===o.lineNumber&&r.startColumnNumber>=o.columnNumber?(a.length&&(n.found=!0),!1):(37===t.type&&t.expressions.forEach((function(t,e){e&&t.type<60&&E(t,"__can_breakpointasxu",!0)})),r.startLineNumber>e.lineNumber||r.startLineNumber===e.lineNumber&&r.startColumnNumber>=e.columnNumber?(Ei(t)&&-1===a.indexOf(t)&&a.push(t),!(i&&i.limit&&a.length>=i.limit&&(n.found=!0,1))):!a.length||(n.found=!0,!1))}},function t(e,n,i){!n.found&&s(e,n)&&gi[i||e.type](e,n,t)}(r,{found:!1}),a}var Ai=["debug","log","info","warn","error","table"];function wi(t,e,n){var i=n.getRemoteObjectParser(),s=n.getSessionState(),o=n.getEngine().getRuntimeStatus(),a=o.scriptMap[o.scriptId],u=o.callExpressionNode,c=[];return a&&u&&(c=o.callFrames.map((function(t,e){var n=o.callFrames[e+1];return n?{functionName:t.functionName,scriptId:a.scriptId,url:a.url,lineNumber:n.functionNode.loc.start.line-1,columnNumber:n.functionNode.loc.start.column}:{functionName:t.functionName,scriptId:a.scriptId,url:a.url,lineNumber:u.loc.start.line-1,columnNumber:u.loc.start.column}})).reverse()),{method:r.consoleAPICalled,params:{type:"warn"===t?"warning":t,args:Array.from(e).map((function(e){return i.parseObject(e,t)})),executionContextId:s.executionContextId,timestamp:Date.now(),stackTrace:{callFrames:c}}}}function ki(t,e){var n=e.getProtocolConnection(),i="object"==typeof console&&console[t]?console[t].bind(console):function(){};function r(){var r=arguments;if(r.length){try{var s=/^(\[framework\]|dispatchEvent|onMessage push)/;if("string"==typeof r[0]&&s.test(r[0]))return i.apply(null,r);n.sendConsoleMessage(wi(t,r,e))}catch(e){bi("console."+t+" error",e)}return i.apply(null,r)}}return h(r,"toString",{value:function(){return"function "+t+"() { [native code] }"},writable:!0,configurable:!0}),r}function Si(t,e){e||(e="object"==typeof console?console:null);var n={};return Ai.forEach((function(e){n[e]={configurable:!0,enumerable:!0,writable:!0,value:ki(e,t)}})),x(e,n)}function Bi(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))}var Ti=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():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.mapString=function(t){return{type:"string",value:t}},t.prototype.mapNumber=function(t){return{type:"number",value:t,description:String(t)}},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,i,r=this,s=Bi(t),o=Object.keys(s),a=this.objectStore.save(t),u=t.constructor?t.constructor.name:"Object",c=o.length>5&&!e,h={type:"object",className:u,description:u,objectId:a,preview:{type:"object",description:u,overflow:c,properties:(c?o.slice(0,5):o).map((function(t){return r.getPropertyPreview4ObjectProperty(t,s[t],e)})).filter(Boolean)}};return t instanceof Error?(n="error",i=t.stack):t instanceof Date?(n="date",i=t.toString()):t instanceof RegExp?(n="regexp",i=t.toString()):t instanceof Promise&&(n="promise",i="Promise"),n&&(h.subtype=n,h.preview&&(h.preview.subtype=n)),i&&(h.description=i,h.preview&&(h.preview.description=i)),h},t.prototype.mapArray=function(t,e){var n=this,i=t.length>100&&!e,r="Array("+t.length+")";return{type:"object",subtype:"array",className:"Array",description:r,objectId:this.objectStore.save(t),preview:{type:"object",subtype:"array",description:r,overflow:i,properties:(i?t.slice(0,100):t).map((function(t,i){return n.getPropertyPreview4ArrayProperty(i,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 i={name:t,type:"object",subtype:"array",value:"Array("+e.length+")"};return n&&(i.valuePreview=this.getValuePreview4TableArray(e)),i}if(null===e)return{name:t,type:"object",subtype:"null",value:"null"};i={name:t,type:"object",value:e.constructor?e.constructor.name:"Object"};return n&&(i.valuePreview=this.getValuePreview4TableObject(e)),i;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("+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}(),Pi=function(t,e){return(Pi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ni=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function n(){this.constructor=t}Pi(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(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}()),Ii=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":1,"id":'+this.id+"}"},t}(),Oi=function(){function t(t,e){this.objectStore=t,this.objectMapper=e}return t.prototype.handle=function(t){var e=this.objectStore.query(t.objectId);return e?{result:this.mapObject(e,Boolean(t.ownProperties),Boolean(t.accessorPropertiesOnly))}:{result:[]}},t.prototype.mapObject=function(t,e,n){var i=this;if(e){var r=Bi(t),s=Object.keys(r).filter((function(t){return!(n&&!r[t].get&&!r[t].set)})).map((function(t){return i.mapResultOne(t,r[t],!0)}));return t.__proto__&&s.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:t.__proto__},!0)),s}for(var o=[],a={},u=t,c=!1,h=!0,l=function(){var t=Bi(u);if(Object.keys(t).forEach((function(e){if(!a[e]){a[e]=!0;var r=t[e];(!n||r.get||r.set)&&o.push(i.mapResultOne(e,r,h))}})),!c){var e=Object.getOwnPropertyDescriptor(u,"__proto__");e&&(c=!0,o.push(p.mapResultOne("__proto__",e,h)))}u=u.__proto__,h=!1},p=this;u;)l();return o},t.prototype.mapResultOne=function(t,e,n){var i={writable:e.writable,configurable:Boolean(e.configurable),enumerable:Boolean(e.enumerable),isOwn:n,name:String(t)};return"value"in e&&(i.value=this.objectMapper.mapFromOne(e.value)),e.get&&(i.get=this.objectMapper.mapFromOne(e.get)),e.set&&(i.set=this.objectMapper.mapFromOne(e.set)),i},t}(),ji=function(){function t(){this.objectStore=new Ii,this.objectMapper=new Ti(this.objectStore),this.callFramesMapper=new Ni,this.getPropertiesHandler=new Oi(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 i=t;return"warn"===t&&(i="warning"),{method:"Runtime.consoleAPICalled",params:{type:i,args:this.objectMapper.mapFrom(n,t),executionContextId:1,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(e)}}}},t}(),Mi=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=this.scriptId+":"+this.lineNumber+":"+this.columnNumber,this.condition=e.condition,E(n,"__breakpointzxfg",this.id)}return t.prototype.destroy=function(){E(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},t}();function Ri(t,e,n){n(null,{});var i=t.getProtocolConnection().connectionState;i.debuggerDomainEnabled||(i.enableDebuggerDomain(),t.getScriptManager().emitAllScriptParsedEvents())}var Ui=Object.freeze({__proto__:null,enable:Ri,disable:function(t,e,n){t.getProtocolConnection().connectionState.disableDebuggerDomain(),n(null,{})},setBreakpointsActive:function(t,e,n){var i=t.getBreakpointManager();e.active?(i.activate(),i.isActive4UserManual=!0):(i.inactivate(),i.isActive4UserManual=!1),n(null,{})},getPossibleBreakpoints:function(t,e,n){var i=e.start.scriptId,r=t.getScriptManager().getScript(i);if(r){var s=[];Fi(r,e.start,e.end).forEach((function(t){s.push({columnNumber:t.loc.start.column,lineNumber:t.loc.start.line-1,scriptId:i})})),n(null,{locations:s})}else n(u.NormalError)},setBreakpointByUrl:function(t,e,n){var i,r=t.getScriptManager();if(e.url?i=r.getScriptByUrl(e.url):e.scriptHash&&(i=r.getScriptByHash(e.scriptHash)),i){for(var s,o=0;!s&&o<20;)s=Fi(i,{lineNumber:e.lineNumber+o,columnNumber:e.columnNumber||0},null,{limit:1})[0],o+=1;if(!s)return n(u.NormalError),void g("[DEBUG] no breakpoint was found from line "+e.lineNumber+" to "+(e.lineNumber+o));var a=t.getBreakpointManager().setBreakpoint({scriptId:i.scriptId,lineNumber:s.loc.start.line-1,columnNumber:s.loc.start.column,condition:e.condition},s);n(null,{breakpointId:a.id,locations:[{scriptId:a.scriptId,lineNumber:a.lineNumber,columnNumber:a.columnNumber}]})}else n(u.NormalError)},removeBreakpoint:function(t,e,n){var i=e.breakpointId;i&&t.getBreakpointManager().removeBreakpoint(i),n(null,{})},resume:function(t,e,n){n(null,{})},pause:function(t,e,n){t.getBreakpointManager().pauseOnNextStatement=!0,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,{})},getScriptSource:function(t,e,n){var i=t.getScriptManager().getScript(e.scriptId);i?n(null,{scriptSource:i.source}):n(u.NormalError)},evaluateOnCallFrame:function(t,e,n){var i,r=e.callFrameId;if(t.getEngine().getRuntimeStatus().callFrames.some((function(t){if(t.callFrameId===r)return i=t,!0})),i){var s=t.getRemoteObjectParser();try{var o=t.getEngine().evaluate(e.expression,i.functionScope);n(null,{result:s.parseObject(o)})}catch(t){var a=F(t,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:s.parseObject(t),exceptionId:a?a.id:100,lineNumber:0,text:"Uncaught"},result:s.parseObject(t)})}}else n(u.NormalError)},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,{})}});function zi(t,e,n){n(null,{});var i=t.getSessionState(),s=i.executionContextId,o=i.executionContextName,a=t.getProtocolConnection();a.connectionState.enableRuntimeDomain(),a.send({method:r.executionContextCreated,params:{context:{id:s,origin:"app://",name:o}}})}var _i=Object.freeze({__proto__:null,enable:zi,disable:function(t,e,n){t.getProtocolConnection().connectionState.disableRuntimeDomain(),n(null,{})},getProperties:function(t,e,n){var i={result:t.getRemoteObjectParser().getProperties(e).result},r=t.getRemoteObjectParser().getObjectById(e.objectId);if(Ci(r)){var s=F(r,"___func_locationxasdzzy");if(s){var o=s.node,a=s.scriptId,u=o.id;i.internalProperties=[{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:a,lineNumber:(u?u.loc.start.line:o.loc.start.line)-1,columnNumber:u?u.loc.start.column:o.loc.start.column}}}]}}n(null,i)},callFunctionOn:function(t,e,n){var i=t.getRemoteObjectParser();if(e.functionDeclaration){var r=e.objectId?i.getObjectById(e.objectId):null;if(r){if(0===e.functionDeclaration.indexOf("function invokeGetter(arrayStr)"))try{var s=JSON.parse(e.arguments[0].value),o=r;return s.forEach((function(t){o=o[t]})),void n(null,{result:i.parseObject(o)})}catch(t){!function(t){n(null,{exceptionDetails:{columnNumber:20,exception:i.parseObject(t),exceptionId:100,lineNumber:0,text:"Uncaught"},result:i.parseObject(t)})}(t)}}}},evaluate:function(t,e,n){var i=e.disableBreaks||e.throwOnSideEffect,r=t.getRemoteObjectParser(),s=t.getBreakpointManager();try{var o=i?s.evaluateWithoutBreakpoint(e.expression):t.getEngine().evaluate(e.expression);n(null,{result:r.parseObject(o)})}catch(t){var a=F(t,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(t),exceptionId:a?a.id:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(t)})}},compileScript:function(t,e,n){n(null,{})},releaseObjectGroup:function(t,e,n){n(null,{})},globalLexicalScopeNames:function(t,e,n){n(null,{names:[]})}});var Li=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,{})}}),Ki=Object.freeze({__proto__:null,Debugger:Ui,Runtime:_i,Page:Li}),Gi=function(){return(Gi=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Hi={pageDomainEnabled:!1,runtimeDomainEnabled:!1,debuggerDomainEnabled:!1,getResourceTreeRequested:!1},Wi=function(){function t(){this.consoleReadyCallbacks=[],this.state=Gi({},Hi)}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.enableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!0},t.prototype.disableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!1},t.prototype.enablePageResourceTree=function(){this.state.getResourceTreeRequested=!0,this.checkConsoleReady()},t.prototype.reset=function(){this.state=Gi({},Hi)},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}(),qi=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{u(i.next(t))}catch(t){s(t)}}function a(t){try{u(i.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((i=i.apply(t,e||[])).next())}))},Vi=function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},Yi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ji=function(){function t(t){var e=this;this.container=t,this.messagesBeforeRuntimeEnabled=[],this.consoleReady=!1,this.messagesBeforeWebsocketOpened=[],this.connectionState=new Wi,this.connectionState.onConsoleReady((function(){e.consoleReady=!0,e.messagesBeforeRuntimeEnabled.length&&(e.messagesBeforeRuntimeEnabled.forEach((function(t){e.send(t)})),e.messagesBeforeRuntimeEnabled=[])}))}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 qi(this,void 0,void 0,(function(){var t,e,n=this;return Vi(this,(function(i){switch(i.label){case 0:return[4,this.sessionState.resolveChannelId()];case 1:return t=i.sent(),e=this.container.server4WebSocket+"/bugme/client_w/"+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.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 i=$i(e.method);i&&i(this.container,e.params,(function(t,i){t?n.ws.sendSocketMessage({id:e.id,error:{code:t,message:""}}):n.ws.sendSocketMessage({id:e.id,result:i})}))},t}();function $i(t){var e,n,i=t.split("."),r=Ki;try{for(var s=Yi(i),o=s.next();!o.done;o=s.next()){if(!(r=r[o.value]))break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r}var Xi=function(){return(Xi=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Qi=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}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 Mi(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:n.paused,params:{callFrames:this.getBreakpointCallFrames(t),reason:c.Other,hitBreakpoints:[t.id]}})},t.prototype.pauseOnException=function(t,e,i,r){this.handlePaused({method:n.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:i.loc.start.line-1,columnNumber:i.loc.start.column}),data:Xi(Xi({},this.remoteObjectParser.parseObject(e)),{uncaught:r}),reason:c.Exception,hitBreakpoints:[]}})},t.prototype.pauseOnNode=function(t,e){this.handlePaused({method:n.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:e.loc.start.line-1,columnNumber:e.loc.start.column}),reason:c.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,i=[],r=this.container.getEngine(),s=r.getRuntimeStatus().callFrames;return s.forEach((function(o,a){var u=o.functionNode,c=o.functionScope,h=s[a+1],l={lineNumber:h?h.callExpressionNode.loc.start.line-1:t.lineNumber,columnNumber:h?h.callExpressionNode.loc.start.column:t.columnNumber,scriptId:o.scriptId},p=x(null);f(c.context).forEach((function(t){"this"!==t&&(p[t]=c.context[t].value)}));var d=n.remoteObjectParser.parseObject(p),m=n.remoteObjectParser.parseObject(c.find("this").value);e||(e=n.remoteObjectParser.parseObject(r.globalObjectAccessor.globalObject));var D={callFrameId:o.callFrameId,functionName:o.functionName||"(anonymous)",functionLocation:{columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:o.scriptId},location:l,scopeChain:[{type:"local",object:d},{type:"global",object:e}],this:m,url:"https://gw.alipayobjects.com"};i.unshift(D)})),i},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:n.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else bi("skip breakpoint due to lacking of channelId")},t.prototype.handleSyncRequest=function(t){var n=this,i=Date.now(),r=this.container.getHttpClient().syncRequest({url:this.container.server4Http+"/bugme/channel/paused",method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:t});if(bi("syncRequest response",r),r.error){if(Date.now()-i>=1e4)return this.handleSyncRequest(t);b("[DEBUG]",r.errorMessage)}else if(200===r.status){var s=void 0;if(r.data)try{s=JSON.parse(r.data)}catch(t){}var o=function(t){return t===e.resume||t===e.stepOver||t===e.stepInto||t===e.stepOut};if(s){var a=[],u=!1;Array.isArray(s)?s.forEach((function(t){o(t.method)&&(u=!0),a.push(n.handleProtocolResponse(t))})):s.method&&(u=o(s.method),a.push(this.handleProtocolResponse(s))),a.length&&(u?a.forEach((function(t){n.protocolConnection.send(t)})):this.handleSyncRequest(1===a.length?a[0]:a))}}else b("[DEBUG] breakpoint error "+JSON.stringify(r))},t.prototype.handleProtocolResponse=function(t){var e={id:t.id,result:{}},n=$i(t.method);return n&&n(this.container,t.params,(function(n,i){e=n?{id:t.id,error:{code:n,message:""}}:{id:t.id,result:i}})),e},t}(),Zi="https://hpmweb.alipay.com",tr="wss://hpmweb.alipay.com",er=/\/\/# sourceMappingURL=(\S+)\s*$/,nr=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,i){var r="",s=e,o=e.match(er);o&&(r=o[1],s=e.substring(0,o.index)),this.id2ScriptMap[t]={scriptId:t,scriptHash:"hash"+t,source:s,ast:n,url:i||"",sourceMapURL:r},i&&(this.url2ScriptIdMap[i]=t),this.protocolConnection.connectionState.debuggerDomainEnabled&&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:n.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}(),ir=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{u(i.next(t))}catch(t){s(t)}}function a(t){try{u(i.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((i=i.apply(t,e||[])).next())}))},rr=function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},sr=function(){function t(t,e){this.providerCtor=t,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_"+this._channelId:""},enumerable:!1,configurable:!0}),t.prototype.resolveExternalStateOnStart=function(){return ir(this,void 0,void 0,(function(){return rr(this,(function(t){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},t.prototype.resolveChannelId=function(){return ir(this,void 0,void 0,(function(){var t;return rr(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 ir(this,void 0,void 0,(function(){var t;return rr(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]}}))}))},t}(),or=function(){function t(t){this.userConfig=t}return t.prototype.getUserConfig=function(){return this.userConfig},t.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new ji),this.remoteObjectParser},t.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new sr(this.stateProviderImpl,this.userConfig)),this.sessionState},t.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new nr(this)),this.scriptManager},t.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new Qi(this)),this.breakpointManager},t.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new Ji(this)),this.protocolConnection},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},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://"):Zi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"server4WebSocket",{get:function(){var t=this.getSessionState().channel;return t||tr},enumerable:!1,configurable:!0}),t}(),ar=function(){function t(t){if(this.options=t,this.container=new or(t),t.provider){var e=t.provider,n=e.httpClient,i=e.websocketClient,r=e.pausedCoverView,s=e.stateProvider;n?this.container.setHttpClientImpl(n):ur("no provider.httpClient"),i?this.container.setWebSocketClientImpl(i):ur("no provider.websocketClient"),r?this.container.setPausedCoverViewImpl(r):ur("no provider.pausedCoverView"),s?this.container.setStateProviderImpl(s):ur("no provider.stateProvider")}else ur("no provider option");var o;this.breakpointManager=this.container.getBreakpointManager(),!1===t.console||t.consoleIsolation||(o=this.container,Ai.forEach((function(t){var e=p(console,t);e&&e.configurable&&(e.value=ki(t,o),h(console,t,e))}))),t.stopAtEntry&&(zi(this.container,0,(function(){})),Ri(this.container,0,(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0),this.container.getSessionState().resolveExternalStateOnStart()}return t.prototype.setEngine=function(t){this.container.setEngineInstance(t),!1!==this.options.console&&this.options.consoleIsolation&&t.import({console:Si(this.container)}),function(t,e){var n=t.getHostGlobalObject(),i=n.onunhandledrejection,r=function(t){Ci(i)&&i.call(this,t),t&&t.reason&&e.throwException(t.reason,2)},s="onunhandledrejection",o=p(n,s);o&&!o.configurable||h(n,s,{get:function(){return r},set:function(t){Ci(t)&&(i=t,o&&o.set&&o.set.call(this,t))},enumerable:!0,configurable:!0})}(t,this)},t.prototype.connect=function(){try{this.container.getProtocolConnection().open()}catch(t){b(t)}},t.prototype.evaluateScript=function(t,e,n,i){this.container.getScriptManager().addScript(t,e,n,i)},t.prototype.hitBreakpoint=function(t,e){var n=this.breakpointManager;if(!n.isActive)return!1;var i=e.type;if(3===i)return this.pauseOnNode(t,e),!0;var r=F(e,"__breakpointzxfg");if(r){var s=n.get(r);if(s){if(bi("hit breakpoint",e.type,e),!s.condition)return n.pauseOnBreakpoint(s),!0;try{var o=this.container.getEngine().getRuntimeStatus().callFrames;if(n.evaluateWithoutBreakpoint(s.condition,o[o.length-1].functionScope))return n.pauseOnBreakpoint(s),!0}catch(t){}}}if(0!==n.stepAction&&Ei(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===i)&&(n.pauseOnNextStatement=!1,this.pauseOnNode(t,e),!0)},t.prototype.shouldPauseOnException=function(t,e,n,i){var r=this.breakpointManager;if(r.isActive&&!F(e,"__pausedvxzg")){var s=r.pauseOnExceptionsState;2===s?(r.pauseOnException(t,e,n,i),E(e,"__pausedvxzg",1)):1===s&&i&&(r.pauseOnException(t,e,n,!0),E(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=F(t,"__rewrittenzxcd"),i="Uncaught";2===e&&(i+=" (in promise)"),this.container.getProtocolConnection().sendConsoleMessage({method:r.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(t),exceptionId:n?n.id:100,lineNumber:0,text:i},timestamp:Date.now()}})},t}();function ur(t){throw new Error("Failed to construct 'BoatmanInspector': "+t)}var cr,hr=self,lr=hr.importScripts,pr=hr.AlipayJSBridge,dr=3e3;function fr(t,e){var n,i=function(t){return"https://alipay.kylinbridge/?data="+encodeURIComponent(t)}(function(t,e,n){var i="_sw_jsonp_"+ ++dr;hr[i]=function(t){hr[i]=null,n(t)};var r={action:t,callback:i,data:e};return JSON.stringify(r)}(t,e,(function(t){n=t})));try{lr(i)}catch(t){}return"string"==typeof n?function(t){try{return JSON.parse(t)}catch(t){}}(n):n}"object"==typeof pr&&(cr={call:function(t,e,n){pr.call(t,e,n)},callSync:function(t,e){return pr.callSync?pr.callSync(t,e):fr(t,e)}});var mr,Dr,yr=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{u(i.next(t))}catch(t){s(t)}}function a(t){try{u(i.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((i=i.apply(t,e||[])).next())}))},xr=function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},vr=!1,gr=[];var br,Cr=new Promise((function(t){Dr=t}));"object"==typeof my?(mr=my,Dr()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(mr=AFAppX.bridge,Dr()):(br=function(){mr=AFAppX.bridge,Dr()},"undefined"!=typeof AFAppX?br():(gr.push(br),vr||(vr=!0,hr.importScripts=function(t){lr(t),/af-appx\.worker\.min\.js$/.test(t)&&(gr.forEach((function(t){return t()})),gr=[])})));var Er=!1;function Fr(){return yr(this,void 0,void 0,(function(){return xr(this,(function(t){switch(t.label){case 0:return Er?[3,2]:[4,Cr];case 1:return t.sent(),[2,new Promise((function(t){var e=function(){mr.call("getStartupParams"),Er=!0,t()};try{e()}catch(t){setTimeout(e,600)}}))];case 2:return[2]}}))}))}var Ar=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{u(i.next(t))}catch(t){s(t)}}function a(t){try{u(i.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((i=i.apply(t,e||[])).next())}))},wr=function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},kr={callSync:function(t,e){return cr?cr.callSync(t,e):mr?mr.callSync(t,e):void 0},showRemoteDebugMask:function(t){return cr?cr.call("showRemoteDebugMask",t,(function(){})):mr?mr.call("showRemoteDebugMask",t):void 0},getStartupParams:function(){return Ar(this,void 0,void 0,(function(){return wr(this,(function(t){switch(t.label){case 0:return[4,Fr()];case 1:return t.sent(),[2,new Promise((function(t){mr.call("getStartupParams",{success:function(e){t(e)}})}))]}}))}))},connectSocket:function(t){return mr.connectSocket(t)}},Sr=1e3,Br=function(){function t(){}return t.prototype.syncRequest=function(t){var e=kr.callSync("tyroRequest",{url:t.url,method:t.method||"GET",headers:t.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:Sr++,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}(),Tr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Pr(t,e){var n,i,r=[],s=t.split(e);try{for(var o=Tr(s),a=o.next();!a.done;a=o.next()){var u=a.value;r.push(parseInt(u,10))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return r}var Nr=function(){function t(t){this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.useFromRemoteDebugFlag=!1,t&&(this.url=t);var e=function(t){var e=t.match(/Ariver\/(\d+\.\d+\.\d+)/);if(e)return e[1]}("undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||"");e&&function(t,e){if(t&&e){for(var n=Pr(t,"."),i=Pr(e,"."),r=0,s=0,o=void 0,a=void 0;s<n.length;s++){if((o=i[s]||0)>(a=n[s]||0)){r=-1;break}if(o<a){r=1;break}}return r}return 0}(e,"1.1.0")>=0&&(this.useFromRemoteDebugFlag=!0)}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(){bi("call connection open"),t.socketTask=kr.connectSocket({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)},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(t){},t.prototype.onSocketClose=function(){},t.prototype.handleSocketOpen=function(){var t=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.sendSocketMessage(e)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(),Ir=function(){function t(){this.pausedMessage="断点命中"}return t.prototype.setPausedMessage=function(t){this.pausedMessage=t},t.prototype.show=function(){kr.showRemoteDebugMask({text:" ",buttonTitle:this.pausedMessage,hide:!1})},t.prototype.hide=function(){kr.showRemoteDebugMask({hide:!0})},t}(),Or=function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{u(i.next(t))}catch(t){s(t)}}function a(t){try{u(i.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((i=i.apply(t,e||[])).next())}))},jr=function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};function Mr(){return Or(this,void 0,void 0,(function(){return jr(this,(function(t){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?[2,__appxStartupParams]:[2,kr.getStartupParams()]}))}))}var Rr,Ur=function(){function t(){}return t.prototype.getChannelId=function(){return Or(this,void 0,void 0,(function(){return jr(this,(function(t){switch(t.label){case 0:return[4,Mr()];case 1:return[2,t.sent().channelId]}}))}))},t.prototype.getChannelIdSync=function(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.channelId?__appxStartupParams.channelId:""},t.prototype.getChannel=function(){return Or(this,void 0,void 0,(function(){return jr(this,(function(t){switch(t.label){case 0:return[4,Mr()];case 1:return[2,t.sent().channel]}}))}))},t.prototype.getChannelSync=function(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.channel?__appxStartupParams.channel:""},t}(),zr=0;t.boot=function(t,e,n){if(void 0===n&&(n={}),zr++,!Rr){var i=new ar({stopAtEntry:n.stopAtEntry,provider:{httpClient:Br,websocketClient:Nr,stateProvider:Ur,pausedCoverView:Ir}});(Rr=new fi).setInspector(i)}Rr.run(t,e),1===zr&&Rr.evaluate('console.warn("帮助提示:真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览")')},Object.defineProperty(t,"__esModule",{value:!0})}));
|