minidev 2.0.6 → 2.1.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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).boatman={})}(this,(function(exports){var workerGlobal="object"==typeof self&&self||"object"==typeof window&&window||"object"==typeof global&&global||Function("return this")(),globalImportScripts=workerGlobal.importScripts,globalAlipayJSBridge=workerGlobal.AlipayJSBridge,globalAlipayJSBridgeCall=globalAlipayJSBridge&&globalAlipayJSBridge.call,evalFunc="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){},index$2=Object.freeze({__proto__:null}),EPanelStatus,Debugger,DebuggerEvent,Runtime,RuntimeEvent,Page,Target,TargetEvent;!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={})),function(e){e.enable="Debugger.enable",e.disable="Debugger.disable",e.evaluateOnCallFrame="Debugger.evaluateOnCallFrame",e.getPossibleBreakpoints="Debugger.getPossibleBreakpoints",e.pause="Debugger.pause",e.removeBreakpoint="Debugger.removeBreakpoint",e.resume="Debugger.resume",e.setBreakpointByUrl="Debugger.setBreakpointByUrl",e.setBreakpointsActive="Debugger.setBreakpointsActive",e.stepInto="Debugger.stepInto",e.stepOver="Debugger.stepOver",e.stepOut="Debugger.stepOut",e.getScriptSource="Debugger.getScriptSource",e.setPauseOnExceptions="Debugger.setPauseOnExceptions",e.setSkipAllPauses="Debugger.setSkipAllPauses"}(Debugger||(Debugger={})),function(e){e.paused="Debugger.paused",e.resumed="Debugger.resumed",e.scriptParsed="Debugger.scriptParsed"}(DebuggerEvent||(DebuggerEvent={})),function(e){e.enable="Runtime.enable",e.disable="Runtime.disable",e.evaluate="Runtime.evaluate",e.compileScript="Runtime.compileScript",e.getProperties="Runtime.getProperties",e.callFunctionOn="Runtime.callFunctionOn",e.releaseObjectGroup="Runtime.releaseObjectGroup",e.globalLexicalScopeNames="Runtime.globalLexicalScopeNames",e.runIfWaitingForDebugger="Runtime.runIfWaitingForDebugger"}(Runtime||(Runtime={})),function(e){e.executionContextCreated="Runtime.executionContextCreated",e.consoleAPICalled="Runtime.consoleAPICalled",e.exceptionThrown="Runtime.exceptionThrown"}(RuntimeEvent||(RuntimeEvent={})),function(e){e.enable="Page.enable",e.getResourceTree="Page.getResourceTree"}(Page||(Page={})),function(e){e.setAutoAttach="Target.setAutoAttach"}(Target||(Target={})),function(e){e.targetCreated="Target.targetCreated",e.targetDestroyed="Target.targetDestroyed",e.targetInfoChanged="Target.targetInfoChanged",e.attachedToTarget="Target.attachedToTarget"}(TargetEvent||(TargetEvent={}));var command=Object.freeze({__proto__:null,get Debugger(){return Debugger},get DebuggerEvent(){return DebuggerEvent},get Page(){return Page},get Runtime(){return Runtime},get RuntimeEvent(){return RuntimeEvent},get Target(){return Target},get TargetEvent(){return TargetEvent}}),EDevtoolProtocolErrorCode,EDevtoolProtocolTypePausedReason;!function(e){e[e.NormalError=-32e3]="NormalError"}(EDevtoolProtocolErrorCode||(EDevtoolProtocolErrorCode={})),function(e){e.Other="other",e.Exception="exception"}(EDevtoolProtocolTypePausedReason||(EDevtoolProtocolTypePausedReason={}));var defineProperty=Object.defineProperty.bind(Object),defineProperties=Object.defineProperties.bind(Object),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor.bind(Object),freeze=Object.freeze.bind(Object),objectKeys$1=Object.keys.bind(Object),__hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwnProperty$1(e,t){return __hasOwnProperty.call(e,t)}function __assign$1(e){for(var t=1;t<arguments.length;++t){var n=arguments[t];for(var r in n)hasOwnProperty$1(n,r)&&(e[r]=n[r])}return e}var assignObject=Object.assign.bind(Object)||__assign$1,getOwnPropertyNames=Object.getOwnPropertyNames.bind(Object),createObject=Object.create.bind(Object),__setPrototypeOf=Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);function setPrototypeOf(e,t){__setPrototypeOf?__setPrototypeOf(e,t):e.__proto__=t}var __getPrototypeOf=Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);function getPrototypeOf(e){return __getPrototypeOf?__getPrototypeOf(e):e.__proto__}var hasConsoleObject="object"==typeof console,log=hasConsoleObject&&console.log?console.log.bind(console):function(){},warn$1=hasConsoleObject&&console.warn?console.warn.bind(console):function(){},error$1=hasConsoleObject&&console.error?console.error.bind(console):function(){},isFunctionNameConfigurable=getOwnPropertyDescriptor(hasOwnProperty$1,"name").configurable,HostAPI=Object.freeze({__proto__:null,assignObject:assignObject,createObject:createObject,defineProperties:defineProperties,defineProperty:defineProperty,error:error$1,freeze:freeze,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyNames:getOwnPropertyNames,getPrototypeOf:getPrototypeOf,hasOwnProperty:hasOwnProperty$1,isFunctionNameConfigurable:isFunctionNameConfigurable,log:log,objectKeys:objectKeys$1,setPrototypeOf:setPrototypeOf,warn:warn$1});function setBoatmanSymbol(e,t,n){defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0})}function getBoatmanSymbol(e,t){return e[t]}var globalSettingVar="__BOAT_SETTING__";function noop$2(){}var DEBUG_TAG="[boatman]";function info(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];log.apply(HostAPI,[DEBUG_TAG].concat(e))}function warn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];warn$1.apply(HostAPI,[DEBUG_TAG].concat(e))}function error(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];error$1.apply(HostAPI,[DEBUG_TAG].concat(e))}var debug$1=noop$2,isAppXImportHooked$1=!1,appxLoadedCallbacks$1=[];function runAfterAppx(e){if(void 0!==workerGlobal.AFAppX)e();else if(appxLoadedCallbacks$1.push(e),!isAppXImportHooked$1){isAppXImportHooked$1=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[]}),1200)}}function runAfterAppXBridgeReady(e){if("undefined"==typeof AFAppX&&workerGlobal.AFAppX&&(AFAppX=workerGlobal.AFAppX),"undefined"==typeof $AppxFramework)e();else if(AFAppX.Plugin){var t=AFAppX.Plugin;AFAppX.Plugin=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];if("object"==typeof i&&i.run){var o=i.run;i.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(i,t)}}return t.apply(AFAppX,n)}}else if($AppxFramework.bootstrapInAppContextByProtocol){var n=$AppxFramework.bootstrapInAppContextByProtocol;$AppxFramework.bootstrapInAppContextByProtocol=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];if("object"==typeof i){var o=i.callback;if(o&&(i.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(this,t)}),i.pageInfo){var a=i.pageInfo.init;a&&(i.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function guardSingleMsgSize(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>2e7?void debug$1("abort send websocket message due to size:",t.length,t.slice(0,1e3)):t}function createWeakSet$1(){return"undefined"==typeof WeakSet?new(require("weakset")):new WeakSet}var getCircularReplacer$1=function(){var e=createWeakSet$1();return function(t,n){if("object"==typeof n&&null!==n)try{if(e.has(n))return;e.add(n)}catch(e){console.error(e)}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hasOwnProperty=Object.prototype.hasOwnProperty,objectAssign=Object.assign||function(e,t){for(var n,r=toObject(e),i=1;i<arguments.length;i++)for(var o in n=Object(arguments[i]))hasOwnProperty.call(n,o)&&(r[o]=n[o]);return r},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function __decorate(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function __param(e,t){return function(n,r){t(n,r,e)}}function __esDecorate(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,d=n.length-1;d>=0;d--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[d])("accessor"===u?{get:p.get,set:p.set}:p[c],f);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(p.get=s),(s=a(g.set))&&(p.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===u?i.unshift(s):p[c]=s)}l&&Object.defineProperty(l,r.name,p),h=!0}function __runInitializers(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function __propKey(e){return"symbol"==typeof e?e:"".concat(e)}function __setFunctionName(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var __createBinding=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function __exportStar(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function __asyncDelegator(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:__await(e[r](t)),done:!1}:i?i(t):t}:i}}function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var __setModuleDefault=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function __classPrivateFieldSet(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function __classPrivateFieldIn(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function __addDisposableResource(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var _SuppressedError="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function __disposeResources(e){function t(t){e.error=e.hasError?new _SuppressedError(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var tslib_es6={__extends:__extends,__assign:__assign,__rest:__rest,__decorate:__decorate,__param:__param,__metadata:__metadata,__awaiter:__awaiter,__generator:__generator,__createBinding:__createBinding,__exportStar:__exportStar,__values:__values,__read:__read,__spread:__spread,__spreadArrays:__spreadArrays,__spreadArray:__spreadArray,__await:__await,__asyncGenerator:__asyncGenerator,__asyncDelegator:__asyncDelegator,__asyncValues:__asyncValues,__makeTemplateObject:__makeTemplateObject,__importStar:__importStar,__importDefault:__importDefault,__classPrivateFieldGet:__classPrivateFieldGet,__classPrivateFieldSet:__classPrivateFieldSet,__classPrivateFieldIn:__classPrivateFieldIn,__addDisposableResource:__addDisposableResource,__disposeResources:__disposeResources},FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply),FunctionBind=Function.prototype.bind,FunctionConstructor=Function;function functionCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return FunctionApply(e,t,n)}function functionApply(e,t,n){return FunctionApply(e,t,n)}function functionBind(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return FunctionApply(FunctionBind,e,t)}function functionBindApply(e,t){return FunctionApply(FunctionBind,e,t)}function methodCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.call.apply(e,__spreadArray([t],n,!1))}function methodApply(e,t,n){return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.apply(t,n)}var stringifyJSON=JSON.stringify,parseJSON=JSON.parse,encodeUriComponent=encodeURIComponent,decodeUriComponent=decodeURIComponent,ObjectDefineProperty=Object.defineProperty,ObjectIsFrozen=Object.isFrozen,ObjectFreeze=Object.freeze,ObjectSetPrototypeOf=Object.setPrototypeOf;function strictUriEncode(e){return encodeUriComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[encode(t,e),"[",r,"]"].join(""):[encode(t,e),"[",encode(r,e),"]=",encode(n,e)].join("")};case"bracket":return function(t,n){return null===n?encode(t,e):[encode(t,e),"[]=",encode(n,e)].join("")};default:return function(t,n){return null===n?encode(t,e):[encode(t,e),"=",encode(n,e)].join("")}}}function parserForArrayFormat(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function decode(e,t){return t.decode?decodeUriComponent(e):e}function encode(e,t){return t.encode?t.strict?strictUriEncode(e):encodeUriComponent(e):e}function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function extract(e){return e.split("?")[1]||""}function parse$1(e,t){var n=parserForArrayFormat(t=objectAssign({decode:!0,arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var i=e.replace(/\+/g," ").split("="),o=i.shift(),a=i.length>0?i.join("="):void 0;a=void 0===a?null:decode(a,t),n(decode(o,t),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=keysSorter(n):e[t]=n,e}),Object.create(null))):r}function stringify$2(e,t){var n=encoderForArrayFormat(t=objectAssign({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return encode(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return encode(r,t)+"="+encode(i,t)})).filter((function(e){return e.length>0})).join("&"):""}var index$1=Object.freeze({__proto__:null,extract:extract,parse:parse$1,stringify:stringify$2});function throttle$1(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=functionApply(e,null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=functionApply(e,null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function objectKeys(e){return e&&"object"==typeof e?Object.keys(e):[]}function toString(e){return null!==e&&"object"==typeof e?"function"==typeof e.toString?String(e):"":String(e)}function escapeLogParamsWithNested(e,t){return e?"string"==typeof e?e:objectKeys(e).map((function(n){var r="".concat(n,"=");return t.indexOf(n)>=0?r+=stringifyJSON(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"):r+=toString(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),r})).join("^"):""}function escapeLogParams(e,t){return e?"string"==typeof e?e:objectKeys(e).filter((function(n){return void 0!==e[n]||!t})).map((function(t){var n="".concat(t,"=");return n+=toString(e[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~")})).join("^"):""}function getMapPolyfillConstructor(){var e=function(){function e(){this.keyList=[],this.valueList=[]}return e.prototype.set=function(e,t){var n=this.keyList,r=n.indexOf(e);if(-1===r){var i=n.push(e)-1;this.valueList[i]=t}else this.valueList[r]=t;return this},e.prototype.get=function(e){var t=this.keyList.indexOf(e);return-1===t?void 0:this.valueList[t]},e.prototype.forEach=function(e){for(var t=this.keyList.slice(),n=this.valueList.slice(),r=t.length,i=0;i<r;i++){var o=t[i];e(n[i],o,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return-1!==this.keyList.indexOf(e)},e.prototype.delete=function(e){var t=this.keyList.indexOf(e);return-1!==t&&(this.keyList.splice(t,1),this.valueList.splice(t,1),!0)},e.prototype.clear=function(){this.keyList=[],this.valueList=[]},e}();return e}function getSetPolyfillConstructor(){var e=function(){function e(){this.itemList=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),e.prototype.add=function(e){return-1===this.itemList.indexOf(e)&&this.itemList.push(e),this},e.prototype.delete=function(e){var t=this.itemList.indexOf(e);return-1!==t&&(this.itemList.splice(t,1),!0)},e.prototype.clear=function(){this.itemList=[]},e.prototype.has=function(e){return-1!==this.itemList.indexOf(e)},e.prototype.forEach=function(e){for(var t=0,n=this.itemList.slice();t<n.length;t++){var r=n[t];e(r,r,this)}},e}();return e}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,MapKlass,SetKlass,WeakMapKlass,WeakSetKlass;function getWeakSetPolyfillConstructor(){return function(){function e(){this.elementKey=weakElementKey+weakSetKey++}return e.prototype.has=function(e){return 1===e[this.elementKey]},e.prototype.add=function(e){return e[this.elementKey]=1,this},e.prototype.delete=function(e){e[this.elementKey]=null},e}()}function getWeakMapPolyfillConstructor(){var e=Object.prototype.hasOwnProperty,t=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,value:n,writable:!0}):e[t]=n};function n(e){return Object(e)===e}function r(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(t(this,"_id","_WeakMap"+"_"+o()+"."+o()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function i(t,r){if(!n(t)||!e.call(t,"_id"))throw new TypeError(r+" method called on incompatible receiver "+typeof t)}function o(){return Math.random().toString().substring(2)}return t(r.prototype,"delete",(function(e){if(i(this,"delete"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),t(r.prototype,"get",(function(e){if(i(this,"get"),n(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),t(r.prototype,"has",(function(e){if(i(this,"has"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),t(r.prototype,"set",(function(e,r){if(i(this,"set"),!n(e))throw new TypeError("Invalid value used as weak map key");var o=e[this._id];return o&&o[0]===e?(o[1]=r,this):(t(e,this._id,[e,r]),this)})),t(r,"_polyfill",!0),r}function getMapConstructorMayBePolyfill(){var e="undefined"!=typeof Map;MapKlass=e?Map:getMapPolyfillConstructor()}function createMap(){return MapKlass||getMapConstructorMayBePolyfill(),new MapKlass}function getSetConstructorPolyfill(){var e="undefined"!=typeof Set;SetKlass=e?Set:getSetPolyfillConstructor()}function createSet(){return SetKlass||getSetConstructorPolyfill(),new SetKlass}function getWeakMapConstructorMayBePolyfill$1(){var e="undefined"!=typeof WeakMap;WeakMapKlass=e?WeakMap:getWeakMapPolyfillConstructor()}function createWeakMap(){return WeakMapKlass||getWeakMapConstructorMayBePolyfill$1(),new WeakMapKlass}function getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}var StatefulLoadManager=function(){function e(){this.statusMap={}}return e.prototype.loadResource=function(e,t){var n=this.getKeyFromResource(e),r=this.getLoadStatus4ResourceByKey(n);return 3===r.status?t(void 0,r.res):1!==r.status?2===r.status?this.shouldRetry4Resource(e)?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):t(r.error):0===r.status?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):void 0:void(r.callbacks=__spreadArray(__spreadArray([],r.callbacks,!0),[t],!1))},e.prototype.loadResourceWithStatus=function(e){var t=this;this.loadResourceInternal(e,(function(n,r){var i=t.getKeyFromResource(e),o=t.getLoadStatus4ResourceByKey(i);if(1===o.status){n?t.setLoadStatus4ResourceByKey(i,{status:2,error:n}):t.setLoadStatus4ResourceByKey(i,{status:3,res:r});var a=o.callbacks;if(Array.isArray(a))for(var s=0,u=a;s<u.length;s++){(0,u[s])(n,r)}}}))},e.prototype.getLoadStatus4ResourceByKey=function(e){var t=this.statusMap;return t[e]||(t[e]={status:0}),t[e]},e.prototype.setLoadStatus4ResourceByKey=function(e,t){this.statusMap[e]=t},e}();function safeAdd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bitRotateLeft(e,t){return e<<t|e>>>32-t}function md5cmn(e,t,n,r,i,o){return safeAdd(bitRotateLeft(safeAdd(safeAdd(t,e),safeAdd(r,o)),i),n)}function md5ff(e,t,n,r,i,o,a){return md5cmn(t&n|~t&r,e,t,i,o,a)}function md5gg(e,t,n,r,i,o,a){return md5cmn(t&r|n&~r,e,t,i,o,a)}function md5hh(e,t,n,r,i,o,a){return md5cmn(t^n^r,e,t,i,o,a)}function md5ii(e,t,n,r,i,o,a){return md5cmn(n^(t|~r),e,t,i,o,a)}function binlMD5(e,t){var n,r,i,o,a;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,u=-271733879,c=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)r=s,i=u,o=c,a=l,s=md5ff(s,u,c,l,e[n],7,-680876936),l=md5ff(l,s,u,c,e[n+1],12,-389564586),c=md5ff(c,l,s,u,e[n+2],17,606105819),u=md5ff(u,c,l,s,e[n+3],22,-1044525330),s=md5ff(s,u,c,l,e[n+4],7,-176418897),l=md5ff(l,s,u,c,e[n+5],12,1200080426),c=md5ff(c,l,s,u,e[n+6],17,-1473231341),u=md5ff(u,c,l,s,e[n+7],22,-45705983),s=md5ff(s,u,c,l,e[n+8],7,1770035416),l=md5ff(l,s,u,c,e[n+9],12,-1958414417),c=md5ff(c,l,s,u,e[n+10],17,-42063),u=md5ff(u,c,l,s,e[n+11],22,-1990404162),s=md5ff(s,u,c,l,e[n+12],7,1804603682),l=md5ff(l,s,u,c,e[n+13],12,-40341101),c=md5ff(c,l,s,u,e[n+14],17,-1502002290),s=md5gg(s,u=md5ff(u,c,l,s,e[n+15],22,1236535329),c,l,e[n+1],5,-165796510),l=md5gg(l,s,u,c,e[n+6],9,-1069501632),c=md5gg(c,l,s,u,e[n+11],14,643717713),u=md5gg(u,c,l,s,e[n],20,-373897302),s=md5gg(s,u,c,l,e[n+5],5,-701558691),l=md5gg(l,s,u,c,e[n+10],9,38016083),c=md5gg(c,l,s,u,e[n+15],14,-660478335),u=md5gg(u,c,l,s,e[n+4],20,-405537848),s=md5gg(s,u,c,l,e[n+9],5,568446438),l=md5gg(l,s,u,c,e[n+14],9,-1019803690),c=md5gg(c,l,s,u,e[n+3],14,-187363961),u=md5gg(u,c,l,s,e[n+8],20,1163531501),s=md5gg(s,u,c,l,e[n+13],5,-1444681467),l=md5gg(l,s,u,c,e[n+2],9,-51403784),c=md5gg(c,l,s,u,e[n+7],14,1735328473),s=md5hh(s,u=md5gg(u,c,l,s,e[n+12],20,-1926607734),c,l,e[n+5],4,-378558),l=md5hh(l,s,u,c,e[n+8],11,-2022574463),c=md5hh(c,l,s,u,e[n+11],16,1839030562),u=md5hh(u,c,l,s,e[n+14],23,-35309556),s=md5hh(s,u,c,l,e[n+1],4,-1530992060),l=md5hh(l,s,u,c,e[n+4],11,1272893353),c=md5hh(c,l,s,u,e[n+7],16,-155497632),u=md5hh(u,c,l,s,e[n+10],23,-1094730640),s=md5hh(s,u,c,l,e[n+13],4,681279174),l=md5hh(l,s,u,c,e[n],11,-358537222),c=md5hh(c,l,s,u,e[n+3],16,-722521979),u=md5hh(u,c,l,s,e[n+6],23,76029189),s=md5hh(s,u,c,l,e[n+9],4,-640364487),l=md5hh(l,s,u,c,e[n+12],11,-421815835),c=md5hh(c,l,s,u,e[n+15],16,530742520),s=md5ii(s,u=md5hh(u,c,l,s,e[n+2],23,-995338651),c,l,e[n],6,-198630844),l=md5ii(l,s,u,c,e[n+7],10,1126891415),c=md5ii(c,l,s,u,e[n+14],15,-1416354905),u=md5ii(u,c,l,s,e[n+5],21,-57434055),s=md5ii(s,u,c,l,e[n+12],6,1700485571),l=md5ii(l,s,u,c,e[n+3],10,-1894986606),c=md5ii(c,l,s,u,e[n+10],15,-1051523),u=md5ii(u,c,l,s,e[n+1],21,-2054922799),s=md5ii(s,u,c,l,e[n+8],6,1873313359),l=md5ii(l,s,u,c,e[n+15],10,-30611744),c=md5ii(c,l,s,u,e[n+6],15,-1560198380),u=md5ii(u,c,l,s,e[n+13],21,1309151649),s=md5ii(s,u,c,l,e[n+4],6,-145523070),l=md5ii(l,s,u,c,e[n+11],10,-1120210379),c=md5ii(c,l,s,u,e[n+2],15,718787259),u=md5ii(u,c,l,s,e[n+9],21,-343485551),s=safeAdd(s,r),u=safeAdd(u,i),c=safeAdd(c,o),l=safeAdd(l,a);return[s,u,c,l]}function binl2rstr(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function rstr2binl(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function rstrMD5(e){return binl2rstr(binlMD5(rstr2binl(e),8*e.length))}function rstrHMACMD5(e,t){var n,r,i=rstr2binl(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=binlMD5(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=binlMD5(o.concat(rstr2binl(t)),512+8*t.length),binl2rstr(binlMD5(a.concat(r),640))}function rstr2hex(e){var t,n,r="0123456789abcdef",i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+=r.charAt(t>>>4&15)+r.charAt(15&t);return i}function str2rstrUTF8(e){return unescape(encodeURIComponent(e))}function rawMD5(e){return rstrMD5(str2rstrUTF8(e))}function hexMD5(e){return rstr2hex(rawMD5(e))}function rawHMACMD5(e,t){return rstrHMACMD5(str2rstrUTF8(e),str2rstrUTF8(t))}function hexHMACMD5(e,t){return rstr2hex(rawHMACMD5(e,t))}function md5(e,t,n){return t?n?rawHMACMD5(t,e):hexHMACMD5(t,e):n?rawMD5(e):hexMD5(e)}function compareVersion$1(e,t){if(e&&t){for(var n=stringToIntArraySplitBy$1(e,"."),r=stringToIntArraySplitBy$1(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy$1(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}var proxyMapping=createWeakMap();function getProxyTarget(e){return proxyMapping.get(e)}function hasProxyTarget(e){return"object"==typeof e&&e&&proxyMapping.has(e)}function createProxy(e,t){var n=new Proxy(e,t);return proxyMapping.set(n,e),n}var InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle$1((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer=function(){var e=createWeakSet();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify(e){return JSON.stringify(e,getCircularReplacer())}var precisionTimestampBasis$1=0;function resetPrecisionTimestampBasis$1(){precisionTimestampBasis$1=1e3*Date.now()-getPrecisionTimestamp$1()}var getPrecisionTimestamp$1="object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return 1e3*performance.now()+precisionTimestampBasis$1}:function(){return 1e3*Date.now()};function interceptLifecycle(e){e.interceptors.appLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,r)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizePageLifecycleManagerThisContext(t))};onPageLifecycle(e,r)}))}function onAppLifecycle(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog."+t.args[0],params:t};e.callback(n)}catch(e){}}function normalizeAppLifecycleManagerThisContext(e){var t=e.app;return{app:{appInstanceId:t.appInstanceId,initTime:t.initTime,launchOptions:t.getLaunchOptions(),launchTime:t.launchTime},state:e.state}}function onPageLifecycle(e,t){try{var n=getLifecycleName$1(t.args[0]);if(!n)return;var r={ext:{origin:"applog"},method:"MiniAppLog."+n,params:t};e.callback(r),"onPageShow"===n&&e.notifyDataChange()}catch(e){}}function getLifecycleName$1(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function normalizePageLifecycleManagerThisContext(e){var t=e.page;return{page:{initTime:t.initTime,loadTime:t.loadTime,pageId:t.pageId,pagePath:t.pagePath,plugin:t.plugin},state:e.state}}function interceptJSAPI(e){e.interceptors.bridgeSyncCallContextMethodInterceptor.all("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onApiSyncCall(e,{context:t,args:n,reqId:r,aTime:i}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onApiSyncCallback(e,{context:t,args:u,reqId:a,result:r,bTime:c,aTime:s})})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return t.__reqId=r,onApiCall(e,{context:t,args:n,reqId:r,aTime:i}),"rpc"===t.apiName&&(t.option.getResponse||(t.$$rpcGetResponseToTrue=!0,t.option=__assign(__assign({},t.option),{getResponse:!0}))),n})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("dispatchResultCallback",(function(t,n){var r=t.__reqId,i=getPrecisionTimestamp$1()/1e3;return onApiCallback(e,{context:t,args:n,reqId:r,bTime:i}),"rpc"===t.apiName&&t.$$rpcGetResponseToTrue&&void 0!==n[0].resData?[n[0].resData]:n}))}function onApiSyncCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo$1(e){if(e.context){var t=e.context,n=t.apiName,r=t.extraInfo,i=t.isMiniExtension,o=t.option,a=t.startTime,s=t.taskId,u=t.__reqId;return __assign(__assign({},e),{context:{__reqId:u,apiName:n,extraInfo:r,isMiniExtension:i,option:o,startTime:a,taskId:s}})}return e}var originalError=console.error;function interceptError(e){e.interceptors.appBaseInstanceInterceptor.after("reportError",(function(e,t){t[0];onError({code:t[1],formatted:t[2]})}))}function onError(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(originalError.bind(console,t),0)}function interceptSetData(e){e.interceptors.pageFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3,o={aTime:i,args:n,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,o),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:a})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onSetData(e,{aTime:i,args:n,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:r}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:a})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo$1(t)};e.callback(n)}catch(e){}}function onSetDataCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onSetDataCallback",params:t};e.callback(n)}catch(e){}}function minimizeSetDataInfo$1(e){return e.context?e:{componentIs:e.component?e.component.is:void 0,isPage:e.isPage,option:e.options,pagePath:e.isPage?e.page.route:e.component.$page.route}}function normalizePageLogicInstanceThisContext(e){var t=e.page;return{page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:e.pageId,pagePath:e.pagePath}}function normalizeComponentLogicInstanceThisContext(e){var t=e.page;return{componentPath:e.componentPath,page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:t.pageId,pagePath:t.pagePath}}function setup(e,t,n){resetPrecisionTimestampBasis$1();var r=new InterceptContext(t,n);interceptSetData(r),interceptLifecycle(r),interceptJSAPI(r),interceptError(r)}var kTimeConsumingDataKey="__ariver_callstatdata";function extractBridgeCallback(e,t,n,r){if(void 0===r&&(r=!1),e||t||n)return handleCallbackUnion.bind(null,e,t,n,r)}function handleCallbackUnion(e,t,n,r,i){var o=!1;r?o=!!(i=normalizeErrorCode(i)).error:"object"==typeof i&&(o="error"in i||"errorMessage"in i),o&&"function"==typeof t&&t(i),o||"function"!=typeof e||e(i),"function"==typeof n&&n(i)}function normalizeErrorCode(e){return"string"==typeof e.error&&(e.error=parseInt(e.error,10)),0===e.error&&(delete e.error,delete e.errorMessage),e}function deleteTimeConsumingDataKey(e){e[kTimeConsumingDataKey]&&delete e[kTimeConsumingDataKey]}var sharedRequestSyncIdBase=3e3,alipayBridge;function normalizeRemoteBridgeCallSyncPayload(e,t,n){var r="_sw_jsonp_".concat(++sharedRequestSyncIdBase);workerGlobal[r]=function(e){workerGlobal[r]=null,n(e)};var i={action:e,callback:r,data:t};return JSON.stringify(i)}function normalizeRemoteBridgeCallUrl(e){var t=encodeURIComponent(e);return"https://alipay.kylinbridge/?data=".concat(t)}function safeParseJSON(e){try{return JSON.parse(e)}catch(e){}}function invokeHostBridgeCallSync4KylinBridge(e,t){var n,r=normalizeRemoteBridgeCallUrl(normalizeRemoteBridgeCallSyncPayload(e,t,(function(e){n=e})));try{globalImportScripts(r)}catch(e){}return"string"==typeof n?safeParseJSON(n):n}"object"==typeof globalAlipayJSBridge&&(alipayBridge={call:function(e,t,n){globalAlipayJSBridgeCall(e,t,n)},callSync:function(e,t){return globalAlipayJSBridge.callSync?globalAlipayJSBridge.callSync(e,t):invokeHostBridgeCallSync4KylinBridge(e,t)}});var isAppXImportHooked=!1,appxLoadedCallbacks=[],appxBridge,appxBridgeReadyResolve;function callAfterAFAppX(e){if("undefined"!=typeof AFAppX)e();else if(appxLoadedCallbacks.push(e),!isAppXImportHooked){isAppXImportHooked=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[]}),1200)}}var appxBridgeReadyPromise=new Promise((function(e){appxBridgeReadyResolve=e}));"object"==typeof my?(appxBridge=my,appxBridgeReadyResolve()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(appxBridge=AFAppX.bridge,appxBridgeReadyResolve()):callAfterAFAppX((function(){appxBridge=AFAppX.bridge,appxBridgeReadyResolve()}));var bootstraped=!1;function ensureAppxBootstrap(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return bootstraped?[3,2]:[4,appxBridgeReadyPromise];case 1:return e.sent(),[2,new Promise((function(e){var t=function(){appxBridge.call("getStartupParams"),bootstraped=!0,e()};try{t()}catch(e){setTimeout(t,600)}}))];case 2:return[2]}}))}))}function isTruthyParamValue(e){return!0===e||"yes"===e||"YES"===e}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),r=stringToIntArraySplitBy(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}function call(e,t){if(alipayBridge){var n=t.success,r=t.fail,i=t.complete,o=__rest(t,["success","fail","complete"]),a=extractBridgeCallback(n,r,i,!0);alipayBridge.call(e,o,(function(e){a&&a(e)}))}else appxBridge?appxBridge.call(e,t):console.warn("[ERROR] error when call ".concat(e,": AlipayJSBridge not found"))}function isInNonBridgeContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my}function isInPluginContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"==typeof getApp}function isInBizContext(){return"undefined"==typeof AlipayJSBridge&&"undefined"!=typeof my&&"undefined"!=typeof getApp}function isInBizContextAndAppX1(){return!!isInBizContext()&&(my.SDKVersion&&-1===compareVersion(my.SDKVersion,"2.0.0"))}var reiOS=/iPhone|iPad|iOS/i,finalPlatformType;function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getPlatformType(){if(finalPlatformType)return finalPlatformType;if("undefined"!=typeof navigator){var e=getUserAgent();finalPlatformType=e.indexOf("Android")>-1?2:e.match(reiOS)?1:0}else finalPlatformType="undefined"!=typeof WXEnvironment?"iOS"===WXEnvironment.platform?1:2:1;return finalPlatformType}function isAndroid(){return 2===getPlatformType()}function isIOS(){return 1===getPlatformType()}function isLyra(){return/LyraVM/i.test(getUserAgent())}var isXRiver=function(){return getUserAgent().indexOf("XRiver")>-1};function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}var Event=function(){function e(e,t,n){this.type=String(e),this.engineType=n,this.data=t,this._preventDefault=!1}return e.prototype.preventDefault=function(){this._preventDefault=!0},e.prototype.isDefaultPrevented=function(){return!!this._preventDefault},e}();function createEvent4WebEngine(e,t){var n,r,i=t.param,o=t.viewId+"";i&&"object"==typeof i&&2===getPlatformType()?(n=i.data,i.type,r=__rest(i,["data","type"])):n=i,n?n.instanceId=o:n={instanceId:o};var a=new Event(e,n,1);if(r)try{Object.assign(a,r)}catch(e){}return a}var EventListener=function(){function e(e,t){this.name=e,this.target=t,this.callbackHandlers=new Map,this.callbackBeforeDispatchInterceptor=new Map,this._callbackGlobalMap=new Map,t&&(t.addEventListener&&(this.baseAddEventListener=t.addEventListener.bind(t)),t.removeEventListener&&(this.baseRemoveEventListener=t.removeEventListener.bind(t)))}return e.prototype.tryInitEventListenerOnWindow=function(e){var t,n,r=this;if(!(this.callbackHandlers.has(e)&&(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)>0&&this._callbackGlobalMap.has(e))){this.callbackHandlers.set(e,[]);var i=function(e){r.dispatchEvent(e)};this._callbackGlobalMap.set(e,i),null===(n=this.baseAddEventListener)||void 0===n||n.call(this,e,i)}},e.prototype.tryRemoveEventListenerInTarget=function(e){var t,n;if(!this.callbackHandlers.has(e)||0===(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)){var r=this._callbackGlobalMap.get(e);r&&(null===(n=this.baseRemoveEventListener)||void 0===n||n.call(this,e,r),this._callbackGlobalMap.delete(e))}},e.prototype.addEventListener=function(e,t){this.callbackHandlers.has(e)||this.tryInitEventListenerOnWindow(e);var n=this.callbackHandlers.get(e);null==n||n.push({fn:t})},e.prototype.removeEventListener=function(e,t){var n=this.callbackHandlers.get(e);n.forEach((function(e,r){e.fn===t&&n.splice(r,1)})),this.tryRemoveEventListenerInTarget(e)},e.prototype.dispatchEvent=function(e){var t,n=null!==(t=e.type)&&void 0!==t?t:e.name;if(this.callbackHandlers&&this.callbackHandlers.has(n)){var r=this.callbackHandlers.get(n),i=this.callbackBeforeDispatchInterceptor.get(n);if(i&&i.length>0)for(var o=0;o<i.length;o++){if(!(0,i[o])(e))return}for(var a=0,s=r;a<s.length;a++){if(s[a].fn.call(null,e),e.defaultPrevented)break}}},e.prototype.addInterceptor=function(e,t){this.callbackBeforeDispatchInterceptor.has(e)||this.callbackBeforeDispatchInterceptor.set(e,[]);var n=this.callbackBeforeDispatchInterceptor.get(e);null==n||n.push(t)},e.prototype.patch=function(){var e=this;this.disposePatch&&this.disposePatch();var t=this.target;t&&(t.addEventListener&&(t.addEventListener=this.addEventListener.bind(this)),t.removeEventListener&&(t.removeEventListener=this.removeEventListener.bind(this))),(this.baseAddEventListener||this.baseRemoveEventListener)&&(this.disposePatch=function(){e.disposePatch=void 0,t&&(e.baseAddEventListener&&(t.addEventListener=e.baseAddEventListener),e.baseRemoveEventListener&&(t.removeEventListener=e.baseRemoveEventListener))})},e}(),EventManger=function(){function e(){var e=this;this.eventMap={},this.queue=[],this.enableQueue=!1,(isInPluginContext()||isInBizContext())&&error$1("EventManger is not work in","isInBizContext"),this.globalEventListener=new EventListener("workerGlobal",workerGlobal),this.documentEventListeners=new EventListener("document",workerGlobal&&workerGlobal.document),this.globalEventListener.addEventListener("message",(function(t){e.enMessageQueue(t)}));this.pushEventListener.addEventListener("push",(function(t){var n=t.data;if(n&&(n.func||n.beforeunload)){var r=n.func||"beforeunload",i=createEvent4WebEngine(r,n),o=e.eventMap[r];o&&o.forEach((function(e){e(i)}))}e.enPushQueue(t)}))}return Object.defineProperty(e.prototype,"pushEventListener",{get:function(){return workerGlobal&&workerGlobal.document?this.documentEventListeners:this.globalEventListener},enumerable:!1,configurable:!0}),e.prototype.patch=function(){this.globalEventListener.patch(),this.documentEventListeners.patch()},e.prototype.enPushQueue=function(e){this.enableQueue&&(log("queued push event",e),this.queue.push({type:"push",e:e}))},e.prototype.enMessageQueue=function(e){this.enableQueue&&(log("queued message event",e),this.queue.push({type:"message",e:e}))},e.prototype.startQueueEvent=function(){log("startQueueEvent"),this.enableQueue=!0},e.prototype.replayQueueEvent=function(){for(log("replayQueueEvent",this.queue.length),this.enableQueue=!1;this.queue.length;){var e=this.queue.shift();"push"===e.type?this.pushEventListener.dispatchEvent(e.e):this.globalEventListener.dispatchEvent(e.e)}},e.prototype.on=function(e,t){var n=this;if(!isInPluginContext()&&!isInBizContext())return this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t),function(){n.off(e,t)};appxBridge.on(e,t)},e.prototype.off=function(e,t){isInPluginContext()||isInBizContext()?appxBridge.off(e,t):this.eventMap[e]&&(this.eventMap[e]=this.eventMap[e].filter((function(e){return e!==t})))},e.prototype.dispose=function(){var e;null===(e=this.eventDispose)||void 0===e||e.dispose()},e}(),eventManager$1=new EventManger;function getEventManager(){return eventManager$1}var eventManager=getEventManager(),BridgeWebSocketTask=function(){function e(t){this.map={},this.id="".concat(t,"_").concat(Math.random().toString(36).substring(2,8),"_").concat(String(e.taskId++))}return e.prototype._listen=function(e,t){var n=this;eventManager.on("onSocketTask"+e,(function(e){e.data&&e.data.socketTaskID===n.id&&t(e)}))},e.prototype.getParam=function(e){return __assign({socketTaskID:this.id},e)},e.prototype._doAction=function(e,t){call(e,this.getParam(t))},e.prototype.send=function(e){this._doAction("sendSocketMessage",e)},e.prototype.close=function(e){this._doAction("closeSocket",e)},e.prototype.onOpen=function(e){this._listen("Open",e)},e.prototype.onMessage=function(e){this._listen("Message",(function(t){e(t)}))},e.prototype.onError=function(e){this._listen("Error",(function(t){e(t)}))},e.prototype.onClose=function(e){this._listen("Close",e)},e.taskId=1,e}(),EWorkerAppEvent$1;function connectSocket(e){var t;if(isInPluginContext()||isInBizContext())return appxBridge.connectSocket(e);var n=null!==(t=e.__taskIdPrefix)&&void 0!==t?t:"remote_debug";delete e.__taskIdPrefix;var r=new BridgeWebSocketTask(n);return call("connectSocket",r.getParam(e)),r}function alert$1(e){if(isInPluginContext()||isInBizContext())return appxBridge.alert(e);call("alert",__assign({},e))}function toast(e){if(isInPluginContext()||isInBizContext())return appxBridge.showToast(e);call("toast",__assign({},e))}!function(e){e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick"}(EWorkerAppEvent$1||(EWorkerAppEvent$1={}));var abridge={callSync:function(e,t){return alipayBridge?alipayBridge.callSync(e,t):appxBridge?appxBridge.callSync(e,t):void 0},showRemoteDebugMask:function(e){return alipayBridge?alipayBridge.call("showRemoteDebugMask",e,(function(){})):appxBridge?appxBridge.call("showRemoteDebugMask",e):void 0},getStartupParams:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,ensureAppxBootstrap()];case 1:return e.sent(),[2,new Promise((function(e){appxBridge.call("getStartupParams",{success:function(t){e(t)}})}))]}}))}))},getStartupParamsSync:function(){return alipayBridge&&alipayBridge.callSync?alipayBridge.callSync("getStartupParams"):appxBridge&&appxBridge.callSync?appxBridge.callSync("getStartupParams"):{}},connectSocket:function(e){return connectSocket(e)},alert:function(e){alert(e)}};function getStartupParamsFromGlobal(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?__appxStartupParams:"undefined"!=typeof AlipayJSBridge&&AlipayJSBridge.startupParams?AlipayJSBridge.startupParams:void 0}function getStartupParams$1(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return(e=getStartupParamsFromGlobal())?[2,e]:[2,abridge.getStartupParams()]}))}))}function getStartupParamsSync(){var e=getStartupParamsFromGlobal();if(e)return e;try{return abridge.getStartupParamsSync()}catch(e){return debug$1("[boatman] getStartupParamsSync error",e),{}}}var AgentContext=function(){this.channelConfigKey="0",this.userAgent=getUserAgent(),this.isIOS=isIOS(),this.isLyra=isLyra(),this.startupParams=getStartupParamsSync(),this.channelId=this.startupParams.channelId||"",this.channel=this.startupParams.channel||"",this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},NetworkCollection=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,__assign(__assign({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}();function createProtocol4RequestWillBeSent(e){var t=(e.method||"GET").toUpperCase(),n=mapValueToString(e.headers),r=getTimestamp();return{method:"Network.requestWillBeSent",params:{documentURL:"",loaderId:"",requestId:e.requestId,request:{method:t,url:e.url,headers:n,postData:e.postBody,hasPostData:!!e.postBody||void 0,mixedContentType:"none",initialPriority:"High",isLinkPreload:!1,referrerPolicy:"origin"},wallTime:r,initiator:{type:"script"},timestamp:r,type:"XHR"}}}function createProtocol4ResponseReceived(e,t){var n=e.profile,r=e.headers,i=n&&n.totalTime,o=getTimestamp(),a=o-(i?n.totalTime-n.Waiting-n.domainLookup-n.connect-n.SSLconnection:0)/1e3;return{method:"Network.responseReceived",params:{requestId:e.requestId,loaderId:"",type:"XHR",timestamp:a,response:{url:t.url||"",status:Number(e.status),headers:mapValueToString(r),requestHeaders:t.requestHeaders,connectionReused:!1,connectionId:1e3,encodedDataLength:0,securityState:"unknown",statusText:"",protocol:"",mimeType:r["Content-Type"]||r["content-type"],timing:i?createResourceTiming(n,o-n.totalTime/1e3):void 0}}}}function createProtocol4LoadingFinished(e){return{method:"Network.loadingFinished",params:{requestId:e.requestId,timestamp:getTimestamp(),encodedDataLength:0}}}function createProtocol4LoadingFailed(e){return{method:"Network.loadingFailed",params:{canceled:!1,errorText:e.errorMsg||"",requestId:e.requestId,timestamp:getTimestamp(),type:"XHR"}}}function mapValueToString(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}function getTimestamp(){return Date.now()/1e3}function createResourceTiming(e,t){var n=e.domainLookup,r=e.connect,i=e.SSLconnection,o=n+r+i;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:o||-1,sslStart:o-i||-1,sslEnd:o||-1,sendStart:o?-1:1e-4,sendEnd:o?-1:1e-4,receiveHeadersEnd:o+e.Waiting,proxyStart:-1,proxyEnd:-1,workerStart:-1,workerReady:-1,workerFetchStart:-1,workerRespondWithSettled:-1,pushStart:0,pushEnd:0}}var MAX_QUEUE_SIZE=1e8,MessageQueue=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0}return e.prototype.push=function(e){this._queueSize>MAX_QUEUE_SIZE&&debug$1("abort message due to max queue size");var t=guardSingleMsgSize(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=getInjector().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e}(),globalInjector,Injector=function(){function e(){this.isApplogEnabled=!1}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new AgentContext),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new NetworkCollection),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new MessageQueue),this.messageQueue},e.prototype.setRuntime=function(e){this.runtime=e},e.prototype.getRuntime=function(){return this.runtime},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),EWorkerAppEvent,EBugmePanelId;function getInjector(){return globalInjector||(globalInjector=new Injector),globalInjector}function sendOrQueueApplogMsg$1(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function getHookFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function throttle(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=e.apply(null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=e.apply(null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function debounce(e,t,n,r){var i;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r(i),i=n((function(){e.apply(null,o)}),t)}}!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(EWorkerAppEvent||(EWorkerAppEvent={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(EBugmePanelId||(EBugmePanelId={}));var throttledEmitDataChangedEvent=throttle((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:"Tiny.Data.dataChanged",ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1}),EUnserializableValue;function getFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function onErrorHook(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(console.error.bind(console,t))}function registerLegacyAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:getFn("onSetData"),onSetDataCallback:getFn("onSetDataCallback"),onApiSyncCall:getFn("onApiSyncCall"),onApiSyncCallback:getFn("onApiSyncCallback"),onApiCall:getFn("onApiCall"),onApiCallback:getFn("onApiCallback"),onError:getFn("onError")};workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}throttledEmitDataChangedEvent(),sendOrQueueApplogMsg({method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onSetDataCallback",params:t,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}onErrorHook(t)}catch(e){debug$1(e)}},registerV1PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV1AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}function getLifecycleName(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function registerV1PageLifecycleHooks(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var r=e.context?e:__assign({route:e.page.route},e);sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2PageLifecycleHooks(e,t){t.onPageLifecycle=getFn("onPageLifecycle"),e.onPageLifecycle=function(e){try{if(t.onPageLifecycle)try{t.onPageLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var n=getLifecycleName(e.args[0]);if(!n)return;sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}}function registerV1AppLifecycleHooks(e,t){for(var n=["onAppLaunch","onAppShow","onAppHide","onAppError","onAppUnhandledRejection"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2AppLifecycleHooks(e,t){t.onAppLifecycle=getFn("onAppLifecycle"),e.onAppLifecycle=function(e){try{if(t.onAppLifecycle)try{t.onAppLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(e.args[0]),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}}function sendOrQueueApplogMsg(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function minimizeApiHookInfo(e){if(e.context){var t=e.context;return __assign(__assign({},e),{context:pick(t,["apiName","extraInfo","isMiniExtension","option","startTime","taskId","__reqId"])})}return e}function minimizeSetDataInfo(e){return e.context?e:{pagePath:e.isPage?e.page.route:e.component.$page.route,isPage:e.isPage,option:e.options,componentIs:e.component?e.component.is:void 0}}function minimizePageLifecycleInfo1(e){return __assign(__assign({},e),{page:pick(e.page,["$id","$page","$viewId","data"])})}function pick(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function registerAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={}),registerLegacyAppxHook();var e=getHookFn("setup");workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.setup=function(t,n){if(e&&"function"==typeof e)try{e(t,n)}catch(e){debug$1(e)}getInjector().setRuntime(t),setup(t,n,(function(e){if("string"==typeof e.method&&e.method.includes("MiniAppLog"))sendOrQueueApplogMsg$1(e);else{var t=getInjector().getWorkerSocket();t&&t.send(e)}}))}}function parseUnserializableValue(e){if(!e)return null;switch(e){case EUnserializableValue.Infinity:return 1/0;case EUnserializableValue[-1/0]:return-1/0;case EUnserializableValue.NaN:return NaN;case EUnserializableValue["-0"]:return-0;default:return null}}function getObjectOwnPropertyDescriptors(e){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(e):Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),Object.create(null))}function isError(e){return"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)||e instanceof RegExp}function isPromise(e){return"[object Promise]"===Object.prototype.toString.call(e)||e instanceof Promise}function isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function isArrayBufferInstance(e){return e instanceof ArrayBuffer}function supportSignedZero(){return!0}function isNegativeZero(e){return 0===e&&1/e==-1/0}!function(e){e[1/0]="Infinity",e[-1/0]="-Infinity",e.NaN="NaN",e["-0"]="-0"}(EUnserializableValue||(EUnserializableValue={}));var ObjectMapper=function(){function e(e){this.objectStore=e}return e.prototype.mapFrom=function(e,t){var n=this;return Array.from(e).map((function(e){return n.mapFromOne(e,t)}))},e.prototype.mapFromOne=function(e,t){switch(typeof e){case"string":return this.mapString(e);case"number":return this.mapNumber(e);case"object":return Array.isArray(e)?this.mapArray(e,"table"===t):null===e?this.mapNull():isArrayBufferInstance(e)?this.mapArrayBuffer(e,"table"===t):this.mapObject(e,"table"===t);case"function":return this.mapFunction(e);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(e);default:return{type:typeof e,value:e}}},e.prototype.mapArrayBuffer=function(e,t){var n=this,r={byteLength:e.byteLength},i=Object.keys(r),o=e.byteLength,a=this.objectStore.save(e),s=e.constructor?e.constructor.name:"Object",u=i.length>5&&!t,c="arraybuffer",l="".concat(s,"(").concat(o,")"),p={type:"object",className:s,description:l,objectId:a,preview:{type:"object",description:l,overflow:u,properties:(u?i.slice(0,5):i).map((function(e){return n.getPropertyPreview4AnyValue(e,r[e],t)})).filter(Boolean)}};return c&&(p.subtype=c,p.preview&&(p.preview.subtype=c)),l&&(p.description=l,p.preview&&(p.preview.description=l)),p},e.prototype.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){var t,n;isNaN(e)?n=EUnserializableValue.NaN:e===1/0?n=EUnserializableValue.Infinity:e===-1/0?n=EUnserializableValue[-1/0]:isNegativeZero(e)?n=EUnserializableValue["-0"]:t=e;var r={type:"number",value:t,description:String(e)};return n&&(r.unserializableValue=n),r},e.prototype.mapBoolean=function(e){return{type:"boolean",value:e}},e.prototype.mapFunction=function(e){var t=this.objectStore.save(e);return{type:"function",className:"Function",description:e.toString(),objectId:t}},e.prototype.mapUndef=function(){return{type:"undefined"}},e.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},e.prototype.mapObject=function(e,t){var n,r,i=this,o=getObjectOwnPropertyDescriptors(e),a=Object.keys(o),s=this.objectStore.save(e),u=e.constructor?e.constructor.name:"Object",c=a.length>5&&!t,l={type:"object",className:u,description:u,objectId:s,preview:{type:"object",description:u,overflow:c,properties:(c?a.slice(0,5):a).map((function(e){return i.getPropertyPreview4ObjectProperty(e,o[e],t)})).filter(Boolean)}};return isError(e)?(n="error",-1===(r=e.stack||"").indexOf(e.name)&&(r=e.toString()+"\n"+r)):isDate(e)?(n="date",r=e.toString()):isRegExp(e)?(n="regexp",r=e.toString()):isPromise(e)&&(n="promise",r="Promise"),n&&(l.subtype=n,l.preview&&(l.preview.subtype=n)),r&&(l.description=r,l.preview&&(l.preview.description=r)),l},e.prototype.mapArray=function(e,t){var n=this,r=e.length>100&&!t,i="Array(".concat(e.length,")");return{type:"object",subtype:"array",className:"Array",description:i,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:i,overflow:r,properties:(r?e.slice(0,100):e).map((function(e,r){return n.getPropertyPreview4ArrayProperty(r,e,t)}))}}},e.prototype.getPropertyPreview4ArrayProperty=function(e,t,n){return this.getPropertyPreview4AnyValue(String(e),t,n)},e.prototype.getPropertyPreview4ObjectProperty=function(e,t,n){return t.get?{name:e,type:"accessor"}:t.set?void 0:this.getPropertyPreview4AnyValue(e,t.value,n)},e.prototype.getPropertyPreview4AnyValue=function(e,t,n){switch(void 0===n&&(n=!1),typeof t){case"object":if(Array.isArray(t)){var r={name:e,type:"object",subtype:"array",value:"Array(".concat(t.length,")")};return n&&(r.valuePreview=this.getValuePreview4TableArray(t)),r}if(null===t)return{name:e,type:"object",subtype:"null",value:"null"};r={name:e,type:"object",value:t.constructor?t.constructor.name:"Object"};return n&&(r.valuePreview=this.getValuePreview4TableObject(t)),r;case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof t,value:String(t)}}},e.prototype.getValuePreview4TableArray=function(e){var t=this;return{type:"object",subtype:"array",description:"Array(".concat(e.length,")"),overflow:!1,properties:e.map((function(e,n){return t.getPropertyPreview4AnyValue(String(n),e)}))}},e.prototype.getValuePreview4TableObject=function(e){var t=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(e).map((function(n){return t.getPropertyPreview4AnyValue(n,e[n])}))}},e}(),ExtractStackLine=function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}(),CallFramesMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e,n){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(ExtractStackLine),executionContextId=1,injectedScriptId=1,ObjectStore=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'.concat(injectedScriptId,',"id":').concat(this.id,"}")},e}(),GetPropertiesHandler=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);if(t){var n=Boolean(e.ownProperties),r={result:this.mapObject(t,n,Boolean(e.accessorPropertiesOnly))};return n&&this.hasInternalProperties(t)&&(r.internalProperties=this.getInternalProperties(t)),r}return{result:[]}},e.prototype.getInternalProperties=function(e){return isArrayBufferInstance(e)?[this.mapInternalProperties("[[ArrayBufferByteLength]]",e.byteLength)]:[]},e.prototype.hasInternalProperties=function(e){return isArrayBuffer(e)},e.prototype.shouldSkipProto=function(e){return isArrayBuffer(e)},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var i=getObjectOwnPropertyDescriptors(e),o=Object.keys(i).filter((function(e){return!(n&&!i[e].get&&!i[e].set)})).map((function(e){return r.mapResultOne(e,i[e],!0)}));return this.shouldSkipProto(e)||e.__proto__&&o.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),o}for(var a=[],s={},u=e,c=!1,l=!0,p=function(){var e=getObjectOwnPropertyDescriptors(u);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var i=e[t];(!n||i.get||i.set)&&a.push(r.mapResultOne(t,i,l))}})),!c){var t=Object.getOwnPropertyDescriptor(u,"__proto__");t&&(c=!0,a.push(h.mapResultOne("__proto__",t,l)))}u=u.__proto__,l=!1},h=this;u;)p();return a},e.prototype.mapInternalProperties=function(e,t){return{name:String(e),value:this.objectMapper.mapFromOne(t)}},e.prototype.mapResultOne=function(e,t,n){var r={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(r.value=this.objectMapper.mapFromOne(t.value)),t.get&&(r.get=this.objectMapper.mapFromOne(t.get)),t.set&&(r.set=this.objectMapper.mapFromOne(t.set)),r},e}(),RemoteObjectParser=function(){function e(){this.objectStore=new ObjectStore,this.objectMapper=new ObjectMapper(this.objectStore),this.callFramesMapper=new CallFramesMapper,this.getPropertiesHandler=new GetPropertiesHandler(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e,t){return this.objectMapper.mapFromOne(e,t)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var r=e;return"warn"===e&&(r="warning"),{method:"Runtime.consoleAPICalled",params:{type:r,args:this.objectMapper.mapFrom(n,e),executionContextId:executionContextId,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}(),globalConsoleOverrides;function initConsoleOverrides(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrides=new ConsoleOverrides).overrideConsole()}function getConsoleOverrides(){return globalConsoleOverrides}var ConsoleOverrides=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMessage({method:"Runtime.executionContextsCleared",params:{}}),this.sendMessage({method:"Runtime.executionContextCreated",params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this;Object.defineProperties(console,["debug","log","info","warn","error","table"].reduce((function(t,n){var r=console[n].bind(console);return t[n]={value:function(){var t=arguments;if(t.length){try{if("string"==typeof t[0]&&/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/.test(t[0]))return r.apply(null,t);var i=new Error;i.stack&&e.sendMessage(e.parser.consoleAPICalled(n,i.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMessage=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessages(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessages=function(){if(this.messageBeforeAgentInit.length){var e=getInjector().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){getInjector().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessages())}),1e3)}},e}(),requirePluginName="requirePlugin";function hookRequirePlugin(){var e=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);if(!e||e.configurable){var t;e&&(t=workerGlobal.requirePlugin);var n,r={get:function(e,t,n){return"async"===t?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e[t];if("function"==typeof i){var o=Date.now();return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCall",params:{aTime:o,context:{apiName:requirePluginName+".async",option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}}),i.apply(void 0,n).then((function(e){return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:e?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e})).catch((function(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e}))}return i}:e[t]},apply:function(e,t,n){var r=Date.now();sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCall",params:{aTime:r,context:{apiName:requirePluginName,option:{arguments:n}}},ext:{origin:EBugmePanelId.AppLog}});try{var i=e.apply(void 0,n);return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:i?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),i}catch(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===r?r+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),e}}};try{t&&(n=new Proxy(t,r))}catch(e){}Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return n||t},set:function(e){n=(t=e)?new Proxy(t,r):void 0},enumerable:!0,configurable:!0})}}var channelDomainConfig={0:{openchannel:"openchannel.alipay.com",hpmweb:"hpmweb.alipay.com"},1:{openchannel:"miniprogram.alipay.com",hpmweb:"hpmweb.alipay.com"},2:{openchannel:"openchannel-pre.alipay.com",hpmweb:"hpmweb-pre.alipay.com"}},EventEmitter=function(){function e(){this._listeners=new Map}return e.prototype.on=function(e,t){var n=this;return this._listeners.has(e)||this._listeners.set(e,[]),this._listeners.get(e).push(t),function(){return n.off(e,t)}},e.prototype.off=function(e,t){if(this._listeners.has(e)){var n=this._listeners.get(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}},e.prototype.once=function(e,t){var n=this,r=this.on(e,(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];r(),t.apply(n,e)}));return r},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._listeners.has(e)&&__spreadArray([],this._listeners.get(e),!0).forEach((function(e){return e.apply(t,n)}))},e.prototype.dispose=function(){this._listeners.clear()},e}(),WebSocketBaseImpl=function(){function e(e,t){this.url="",this.taskIdPrefix="",this.header={},this.opened=!1,this.maxBodyLength=10485760,this.eventEmitter=new EventEmitter,e&&(this.url=e),(null==t?void 0:t.header)&&(this.header=t.header),(null==t?void 0:t.taskIdPrefix)&&(this.taskIdPrefix=t.taskIdPrefix),this.onSocketError=this.onSocketError.bind(this),this.onSocketClose=this.onSocketClose.bind(this),this.onSocketMessage=this.onSocketMessage.bind(this),this.onSocketOpen=this.onSocketOpen.bind(this)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.setUrl=function(e){this.url=e},e.prototype.onSocketOpen=function(){this.eventEmitter.emit("open")},e.prototype.onSocketClose=function(){this.eventEmitter.emit("close")},e.prototype.onSocketError=function(e){this.eventEmitter.emit("error",e)},e.prototype.onSocketMessage=function(e){this.eventEmitter.emit("message",e)},e.prototype.on=function(e,t){this.eventEmitter.on(e,t)},e}(),internalWebSocket;"undefined"!=typeof WebSocket&&WebSocket.OPEN&&(internalWebSocket=WebSocket);var WebSocketBrowserImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t}return __extends(t,e),t.prototype.open=function(){var e=this;if(!this.url)throw new Error("WebSocket url required");this.socket=new internalWebSocket(this.url),this.socket.onopen=this.onSocketOpen,this.socket.onmessage=function(t){"string"==typeof t.data?e.onSocketMessage(t.data):console.warn("[DEBUG] invalid message",t.data)},this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError},t.prototype.close=function(){this.opened&&this.socket.close()},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7||(this.opened?this.socket.send(t):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketOpen=function(){var t=this;e.prototype.onSocketOpen.call(this),this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.send(e)})),this.messageBeforeSocketOpen=[])},t.prototype.onSocketClose=function(){this.opened=!1,console.log("[DEBUG] connection closed"),e.prototype.onSocketClose.call(this)},t.prototype.onSocketError=function(t){e.prototype.onSocketError.call(this,t),console.error("[DEBUG] connection onerror",t)},t}(WebSocketBaseImpl),WebSocketNativeImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t.useFromRemoteDebugFlag=!0,t._openInvoked=!1,t}return __extends(t,e),t.prototype.open=function(){var e=this;this._openInvoked||(this._openInvoked=!0,this.socketTask=abridge.connectSocket({__taskIdPrefix:this.taskIdPrefix,fromRemoteDebug:this.useFromRemoteDebugFlag,url:this.url,header:this.header,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)})))},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>this.maxBodyLength||(this.opened?this.socketTask.send({fromRemoteDebug:this.useFromRemoteDebugFlag,data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(WebSocketBaseImpl),isWebPlatform=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){isWebPlatform=!0;try{delete workerGlobal.WebSocket}catch(_a){}}var SocketTaskImpl=isWebPlatform?WebSocketBrowserImpl:WebSocketNativeImpl;function enable$6(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getResponseBody(e){var t=e.params.requestId,n=getInjector(),r=n.getNetworkRecorder(),i=r.getRequest(t);i?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:i.isBase64Body,body:i.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),r.removeRequest(t)}var network=Object.freeze({__proto__:null,enable:enable$6,getResponseBody:getResponseBody});function enable$5(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrides();t&&t.createExecutionContext()}function getProperties$1(e){var t=getConsoleOverrides();t&&getInjector().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})}function compileScript$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function evaluate$1(payload){var consoleOverrides=getConsoleOverrides();if(consoleOverrides){var parser=consoleOverrides.parser;"function"!=typeof eval&&(workerGlobal.eval=evalFunc);try{var returnValue=function(){return eval(payload.params.expression)}();getInjector().getWorkerSocket().send({id:payload.id,result:{result:parser.parseObject(returnValue)}})}catch(e){e.stack="".concat(e.name,": ").concat(e.message),getInjector().getWorkerSocket().send({id:payload.id,result:{exceptionDetails:{columnNumber:20,exception:parser.parseObject(e),exceptionId:1,lineNumber:0,text:"Uncaught"},result:parser.parseObject(e)}})}}}var runtime$1=Object.freeze({__proto__:null,compileScript:compileScript$1,enable:enable$5,evaluate:evaluate$1,getProperties:getProperties$1}),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfPresent(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfNotNamed(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var stringify$1={exports:{}},stringify_1=stringify$1.exports;!function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n}(stringify$1,stringify$1.exports);var stringifyExports=stringify$1.exports,stringify=getDefaultExportFromCjs(stringifyExports),sharedGetCurrentPages;function callGetCurrentPages(){return sharedGetCurrentPages?sharedGetCurrentPages():workerGlobal.getCurrentPages?(sharedGetCurrentPages=workerGlobal.getCurrentPages)():workerGlobal.AFAppX&&AFAppX.getCurrentPages?(sharedGetCurrentPages=AFAppX.getCurrentPages)():[]}function getPagesData(e){var t;var n=getInjector().getRuntime();t=null==n?callGetCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:stringify(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify(t.data),route:t.route}})),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})}function setPageData(e){var t,n=e.params||{},r=n.viewId,i=n.data;var o=getInjector().getRuntime();t=null==o?callGetCurrentPages().filter((function(e){return e&&"".concat(e.$viewId)===r}))[0]:o.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&"".concat(e.$viewId)===r}))[0],t&&i&&t.setData(i)}function setComponentData(e){var t=e.params||{},n=t.targetId,r=t.data;if(-1!==n){var i=getInjector().getRuntime().getNav().getTopInstance().getComponentLogicInstance(n,!0);i&&i.publicInstance.setData(r)}}var data=Object.freeze({__proto__:null,getPagesData:getPagesData,setComponentData:setComponentData,setPageData:setPageData});function getStorageItem(e){return new Promise((function(t){AFAppX.bridge.getStorage({key:e,success:function(n){var r=n.data;t({key:e,value:r,type:typeof r})},fail:function(){t()}})}))}function getStorageInfo(e){AFAppX.bridge.getStorageInfo({success:function(t){Promise.all(t.keys.map((function(e){return getStorageItem(e)}))).then((function(n){var r=n.filter((function(e){return e}));getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{currentSize:t.currentSize,limitSize:t.limitSize,data:r}})}))}})}function clearStorage(e){AFAppX.bridge.clearStorage()}function removeStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.removeStorage({key:t.key})}function setStorage(e){var t=e.params;t&&t.key&&AFAppX.bridge.setStorage({key:t.key,data:t.value})}var storage=Object.freeze({__proto__:null,clearStorage:clearStorage,getStorageInfo:getStorageInfo,removeStorage:removeStorage,setStorage:setStorage});function enable$4(){var e=getInjector();e.setApplogEnabled(!0),e.getMessageQueue().sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable$4});function getLoadManager(){var e=getInjector().getRuntime();if("object"==typeof e){var t="function"==typeof e.getControllableLoadManager&&e.getControllableLoadManager();if(t.addLoadHook)return t}}function enable$3(e){getLoadManager()?getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}}):getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,error:"not supported"})}function startInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.start(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function stopInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.stop(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function getAllSubPackages(e){var t;getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{roots:(null===(t=getLoadManager())||void 0===t?void 0:t.getAllSubPackages())||[]}})}function continueLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.continueLoadSubPackage(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function failLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.simulationSubPackageLoadFailed(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}var loadManager=Object.freeze({__proto__:null,continueLoadSubPackage:continueLoadSubPackage,enable:enable$3,failLoadSubPackage:failLoadSubPackage,getAllSubPackages:getAllSubPackages,startInterception:startInterception,stopInterception:stopInterception});function ping(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getSystemInfo(e){AFAppX.bridge.getSystemInfo({success:function(t){var n={userAgent:getInjector().getAgentContext().userAgent,sdkVersion:AFAppX.bridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};getInjector().getWorkerSocket().send({id:e.id,result:n})}})}function getStartupParams(e){var t=getStartupParamsSync();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Applog:applog,Data:data,LoadManager:loadManager,Storage:storage,getStartupParams:getStartupParams,getSystemInfo:getSystemInfo,ping:ping});function getResourceTree$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var page$1=Object.freeze({__proto__:null,getResourceTree:getResourceTree$1}),protoHandler=Object.freeze({__proto__:null,Network:network,Page:page$1,Runtime:runtime$1,Tiny:index}),WorkerSocket=function(){function e(e,t){var n=this;this.isMessageReceived=!1,this.messageBeforeReceived=[],this.socket=t||new SocketTaskImpl(e,{taskIdPrefix:"remote_debug_tbwr"}),this.socket.on("open",(function(){n.socket.send({method:"MiniAppLog.enable",params:{},ext:{origin:EBugmePanelId.AppLog}}),throttledEmitDataChangedEvent()})),this.socket.on("message",(function(e){var t;n.isMessageReceived||(n.isMessageReceived=!0,n.messageBeforeReceived.forEach((function(e){n.socket.send(e)})),n.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:LEAVE"===e&&n.close())}var r=t.method,i=getProtocolHandler(r);i?i(t):(debug$1("unsupported protocol ".concat(r)),n.socket.send({id:t.id,error:{code:-32e3,message:"unsupported"}}))}))}return e.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.socket.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},e.prototype.open=function(){this.socket.open()},e.prototype.close=function(){this.socket.close()},e.prototype.send=function(e){this.socket.send(e)},e}();function getProtocolHandler(e){if(e){for(var t=e.split("."),n=protoHandler,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}}var ignoreDomain=/\/(tyro\/agent|bugme\/channel\/paused|bugme\/channel\/resume)$/,DebugEventListener=function(){function e(){this.isIOS=getInjector().getAgentContext().isIOS,this.isLyra=getInjector().getAgentContext().isLyra}return e.prototype.setup=function(){this.isLyra||this.isIOS?this.listenDebugEvent4IOS():this.listenDebugEvent()},e.prototype.onNetworkRequest=function(e){if(!ignoreDomain.test(e.url)){var t=createProtocol4RequestWillBeSent(e),n=getInjector();n.getWorkerSocket().send(t),n.getNetworkRecorder().setRequest(e.requestId,{method:t.params.request.method,requestHeaders:t.params.request.headers,url:e.url})}},e.prototype.onNetworkResponse=function(e){if(!ignoreDomain.test(e.url)){var t=getInjector(),n=t.getNetworkRecorder().getRequest(e.requestId)||{};t.getWorkerSocket().send(createProtocol4ResponseReceived(e,n)),t.getWorkerSocket().send(createProtocol4LoadingFinished(e)),t.getNetworkRecorder().setRequest(e.requestId,{responseBody:e.body,isBase64Body:!1})}},e.prototype.onNetworkError=function(e){ignoreDomain.test(e.url)||getInjector().getWorkerSocket().send(createProtocol4LoadingFailed(e))},e.prototype.onStorageChanged=function(e){var t={};e.data&&Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),getInjector().getWorkerSocket().send({method:"Tiny.Storage.storageChanged",params:{data:t},ext:{origin:EBugmePanelId.Storage}})},e.prototype.onSubpackageLoaded=function(e){"success"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageLoaded",params:{root:e.rootName}}):"loading"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageRequested",params:{root:e.rootName}}):"fail"===e.status&&getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageFailed",params:{root:e.rootName}})},e.prototype.listenDebugEvent4IOS=function(){var e,t=this,n=AFAppX.bridge;n.on(EWorkerAppEvent.DebugNetworkRequest,(function(e){t.onNetworkRequest(e.data)})),n.on(EWorkerAppEvent.DebugNetworkResponse,(function(e){t.onNetworkResponse(e.data)})),n.on(EWorkerAppEvent.DebugNetworkError,(function(e){t.onNetworkError(e.data)})),n.on(EWorkerAppEvent.DebugStorageChanged,(function(e){t.onStorageChanged(e.data)})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e.prototype.listenDebugEvent=function(){var e,t=this;AFAppX.bridge.on(EWorkerAppEvent.DebugConsole,(function(e){var n,r=e.data,i=r.type,o=r.content;try{n=JSON.parse(o)}catch(e){return}switch(i){case EWorkerAppEvent.DebugNetworkRequest:t.onNetworkRequest(n);break;case EWorkerAppEvent.DebugNetworkResponse:t.onNetworkResponse(n);break;case EWorkerAppEvent.DebugNetworkError:t.onNetworkError(n);break;case EWorkerAppEvent.DebugStorageChanged:t.onStorageChanged(n)}})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e}(),WorkerListener=function(){function e(){this.inited=!1}return e.prototype.setup=function(){if(this.inited)return!1;var e=AFAppX.bridge;if(/^1\./.test(e.SDKVersion)){var t=debounce(this.onPageResumeOrPause.bind(this),300,setTimeout,clearTimeout);e.on(EWorkerAppEvent.PageResume,t),e.on(EWorkerAppEvent.PagePause,t)}e.on(EWorkerAppEvent.DebugPanelClick,this.onDebugPanelClick),e.on(EWorkerAppEvent.DebugMaskButtonClick,this.onDebugMaskButtonClick),this.debugEventListener=new DebugEventListener,this.debugEventListener.setup(),this.inited=!0},e.prototype.onPageResumeOrPause=function(){throttledEmitDataChangedEvent()},e.prototype.onDebugPanelClick=function(){var e=getInjector().getWorkerSocket();e&&e.close()},e.prototype.onDebugMaskButtonClick=function(){},e}(),globalListener;function getGlobalWorkerEventListener(){return globalListener||(globalListener=new WorkerListener),globalListener}function getChannelUrl(){if("string"==typeof __BUGME_EXTERNAL_WORKER_URL__&&__BUGME_EXTERNAL_WORKER_URL__)return __BUGME_EXTERNAL_WORKER_URL__;var e,t=getInjector().getAgentContext(),n=t.channel,r=t.channelId,i=t.channelConfigKey;""!==n?e=n:e="wss://"+(channelDomainConfig[i]||channelDomainConfig[0]).hpmweb;return"".concat(e,"/bugme/client_w/").concat(r)}var DebugAgent=function(){function e(){}return e.prototype.init=function(e){getGlobalWorkerEventListener().setup(),this.makeConnection(e)},e.prototype.makeConnection=function(e){var t=getInjector(),n=getChannelUrl(),r=new WorkerSocket(n,null==e?void 0:e.socketTaskImpl);t.setWorkerSocket(r),t.getAgentContext().isIOS?r.open():setTimeout((function(){r.open()}),1200)},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function getStaticPlugins(){var e=getStartupParamsSync().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));try{var n=getInjector().getRuntime().getMeta().getAppMeta().plugins||{};Object.entries(n).forEach((function(n){var r=n[0],i=n[1];i.lazy&&!e[r]&&t.push({plugin_id:"".concat(i.provider,"(lazy)"),deploy_version:"Not Load"})}))}catch(e){}return t}function printStaticPlugins(){var e=getStaticPlugins();e.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(e))}var loadPluginName="loadPlugin";function hookLoadPlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal.my,loadPluginName);t&&!t.configurable||(t&&(e=workerGlobal.my.loadPlugin),Object.defineProperty(workerGlobal.my,loadPluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("object"==typeof t[0]){var r=t[0].success;t[0].success=function(){printDynamicPlugin(t[0].plugin),void 0!==r&&r.apply(this,arguments)}}return e.apply(void 0,t)}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function getExtensionVersions(){var e=getInjector().getRuntime().getMiniExtensionManager();if(e.extensionVersions)return e.extensionVersions;if(e.getInitedMiniExtensionInfo){var t=e.getInitedMiniExtensionInfo(),n=new Map;return t.forEach((function(e){n.set(e.id,e.version||"-")})),n}return new Map}function printDynamicPlugin(e){var t=e.split("@")[0],n=getExtensionVersions();setTimeout((function(){console.log("%c--- Loaded Dynamic Plugin ---",LOG_STYLE),console.table([{plugin_id:t,deploy_version:n.get(t)}])}),100)}function setupPluginInfo(){console.log("%cTip: you can type `printPlugins()` anytime to print loaded plugins info","color: #3D80F3;"),hookLoadPlugin(),printStaticPlugins(),workerGlobal.printPlugins=printPlugins}function isUsePlugin(){var e=getInjector().getRuntime();if(void 0===e)return!1;var t=e.getMeta();if(t){var n=void 0;if("function"==typeof t.getAppMeta?n=t.getAppMeta():void 0!==t.meta&&(n=t.meta),n)return"object"==typeof n.plugins&&0!==Object.keys(n.plugins).length||n.useDynamicPlugins}return!1}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParamsSync())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager(),r=[];if(n.extensionVersions)n.extensionVersions.forEach((function(e,n){void 0===t[n]&&r.push({plugin_id:n,deploy_version:e})}));else if(n.getInitedMiniExtensionInfo){n.getInitedMiniExtensionInfo().forEach((function(e){if(void 0===t[e.id]){var n={plugin_id:e.id,deploy_version:e.version||"-"};r.push(n)}}))}console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}function main(e){if(!("object"==typeof AFAppX&&AFAppX.Plugin||workerGlobal.__BUGME_ON__)){workerGlobal.__BUGME_ON__=!0;try{registerAppxHook(),initConsoleOverrides(),hookRequirePlugin()}catch(e){error("sync task error",e)}runAfterAppx((function(){runAfterAppXBridgeReady((function(){try{getAgent().init(),isUsePlugin()&&setupPluginInfo()}catch(e){error("init agent error",e)}}))}))}}try{main()}catch(e){error("init error",e)}var CommentHandler=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(76===e.type&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0;){if(!((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset))break;t=o.node,this.stack.pop()}if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(67===e.type&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();function assert(e,t){if(!e)throw new Error("ASSERT: "+t)}var ErrorHandler=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.constructError=function(e,t){var n=new Error(e);return n.stack=n.toString(),n},e}(),Messages={BadImportCallArity:"Unexpected token",BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DefaultRestProperty:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",InvalidUnicodeEscapeSequence:"Invalid Unicode escape sequence",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",PropertyAfterRestProperty:"Unexpected token",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",TemplateEscape89:"\\8 and \\9 are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"},ArrayExpression$1=function(e){this.type=30,this.elements=e},ArrayPattern=function(e){this.type=60,this.elements=e},ArrowFunctionExpression$1=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1},assignmentOperatorNumber={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},AssignmentExpression$1=function(e,t,n){this.type=32,this.operator=assignmentOperatorNumber[e],this.left=t,this.right=n},AssignmentPattern=function(e,t){this.type=61,this.left=e,this.right=t},AsyncArrowFunctionExpression=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0},AsyncFunctionDeclaration=function(e,t,n){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AsyncFunctionExpression=function(e,t,n){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AwaitExpression=function(e){this.type=93,this.argument=e},binaryOperatorNumber={"==":1,"!=":2,"===":3,"!==":4,"<":5,"<=":6,">":7,">=":8,"<<":9,">>":10,">>>":11,"+":12,"-":13,"*":14,"**":15,"/":16,"%":17,"|":18,"^":19,"&":20,in:21,instanceof:22,"||":1,"&&":2},BinaryExpression$1=function(e,t,n){var r="||"===e||"&&"===e||"??"===e;this.type=r?38:33,this.operator=binaryOperatorNumber[e],this.left=t,this.right=n},BlockStatement$1=function(e){this.type=76,this.body=e},BreakStatement$1=function(e){this.type=1,this.label=e},CallExpression$1=function(e,t){this.type=34,this.callee=e,this.arguments=t},CatchClause$1=function(e,t){this.type=62,this.param=e,this.body=t},ClassBody=function(e){this.type=88,this.body=e},ClassDeclaration=function(e,t,n){this.type=86,this.id=e,this.superClass=t,this.body=n},ClassExpression=function(e,t,n){this.type=94,this.id=e,this.superClass=t,this.body=n},ComputedMemberExpression=function(e,t){this.type=39,this.computed=!0,this.object=e,this.property=t},ConditionalExpression$1=function(e,t,n){this.type=35,this.test=e,this.consequent=t,this.alternate=n},ContinueStatement$1=function(e){this.type=2,this.label=e},DebuggerStatement$1=function(){this.type=3},Directive=function(e,t){this.type=5,this.expression=e,this.directive=t},DoWhileStatement$1=function(e,t){this.type=4,this.body=e,this.test=t},EmptyStatement$1=function(){this.type=75},ExportAllDeclaration=function(e){this.type=82,this.source=e},ExportDefaultDeclaration=function(e){this.type=83,this.declaration=e},ExportNamedDeclaration=function(e,t,n){this.type=84,this.declaration=e,this.specifiers=t,this.source=n},ExportSpecifier=function(e,t){this.type=85,this.exported=t,this.local=e},ExpressionStatement$1=function(e){this.type=5,this.expression=e},ForInStatement$1=function(e,t,n){this.type=6,this.left=e,this.right=t,this.body=n,this.each=!1},ForOfStatement$1=function(e,t,n,r){this.type=7,this.await=r,this.left=e,this.right=t,this.body=n},ForStatement$1=function(e,t,n,r){this.type=8,this.init=e,this.test=t,this.update=n,this.body=r},FunctionDeclaration$1=function(e,t,n,r){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},FunctionExpression$1=function(e,t,n,r){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},Identifier$1=function(e){this.type=64,this.name=e},IfStatement$1=function(e,t,n){this.type=9,this.test=e,this.consequent=t,this.alternate=n},Import=function(){this.type=77},ImportDeclaration=function(e,t){this.type=78,this.specifiers=e,this.source=t},ImportDefaultSpecifier=function(e){this.type=79,this.local=e},ImportNamespaceSpecifier=function(e){this.type=80,this.local=e},ImportSpecifier=function(e,t){this.type=81,this.local=e,this.imported=t},LabeledStatement$1=function(e,t){this.type=10,this.label=e,this.body=t},Literal$1=function(e,t){this.type=65,this.value=e,this.raw=t},MetaProperty=function(e,t){this.type=89,this.meta=e,this.property=t},MethodDefinition=function(e,t,n,r,i){this.type=95,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=i},Module=function(e){this.type=67,this.body=e,this.sourceType="module"},NewExpression$1=function(e,t){this.type=40,this.callee=e,this.arguments=t},ObjectExpression$1=function(e){this.type=41,this.properties=e},ObjectPattern=function(e){this.type=66,this.properties=e},Property=function(e,t,n,r,i,o){this.type=68,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=o},RegexLiteral=function(e,t,n,r){this.type=65,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}},RestElement=function(e){this.type=69,this.argument=e},ReturnStatement$1=function(e){this.type=11,this.argument=e},Script=function(e){this.type=67,this.body=e,this.sourceType="script"},SequenceExpression$1=function(e){this.type=37,this.expressions=e},SpreadElement$1=function(e){this.type=70,this.argument=e},StaticMemberExpression=function(e,t){this.type=39,this.computed=!1,this.object=e,this.property=t},Super=function(){this.type=87},SwitchCase$1=function(e,t){this.type=71,this.test=e,this.consequent=t},SwitchStatement$1=function(e,t){this.type=12,this.discriminant=e,this.cases=t},TaggedTemplateExpression$1=function(e,t){this.type=42,this.tag=e,this.quasi=t},TemplateElement$1=function(e,t){this.type=72,this.value=e,this.tail=t},TemplateLiteral$1=function(e,t){this.type=73,this.quasis=e,this.expressions=t},ThisExpression$1=function(){this.type=43},ThrowStatement$1=function(e){this.type=13,this.argument=e},TryStatement$1=function(e,t,n){this.type=14,this.block=e,this.handler=t,this.finalizer=n},unaryOperatorNumber={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},UnaryExpression$1=function(e,t){this.type=44,this.operator=unaryOperatorNumber[e],this.argument=t,this.prefix=!0},updateOperatorNumber={"++":1,"--":2},UpdateExpression$1=function(e,t,n){this.type=45,this.operator=updateOperatorNumber[e],this.argument=t,this.prefix=n},variableDeclarationKindNumber={var:1,let:2,const:3},VariableDeclaration$1=function(e,t){this.type=17,this.declarations=e,this.kind=variableDeclarationKindNumber[t]},VariableDeclarator$1=function(e,t){this.type=74,this.id=e,this.init=t},WhileStatement$1=function(e,t){this.type=15,this.test=e,this.body=t},WithStatement$1=function(e,t){this.type=16,this.object=e,this.body=t},YieldExpression=function(e,t){this.type=92,this.argument=e,this.delegate=t},Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Regex.NonAsciiIdentifierStart.test(Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Regex.NonAsciiIdentifierPart.test(Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isDecimalDigitChar:function(e){return 1===e.length&&Character.isDecimalDigit(e.charCodeAt(0))},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}};function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var Scanner=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n};r.push(o)}return r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(i)}return n}++this.index}else++this.index}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t};n.push(i)}return this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(Character.isWhiteSpace(n))++this.index;else if(Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343)t=1024*(t-55296)+n-56320+65536}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r<t;++r){if(this.eof()||!Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+hexValue(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.tryToScanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;if("}"===e)return null;for(;!this.eof()&&(e=this.source[this.index++],Character.isHexDigit(e.charCodeAt(0)));)t=16*t+hexValue(e);return t>1114111||"}"!==e?null:Character.fromCodePoint(t)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.tryToScanUnicodeCodePointEscape();return null===e?this.throwUnexpectedToken():e},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),Character.isIdentifierPart(t));)n+=e=Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=octalValue(e);return!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+octalValue(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+octalValue(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!==(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"??"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|?^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(Character.isIdentifierStart(t)||Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(Character.isIdentifierStart(this.source.charCodeAt(this.index))||Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];assert(Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,r="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{var o=this.scanHexEscape(i);null===o&&this.throwUnexpectedToken(),r+=o}break;case"x":var a=this.scanHexEscape(i);null===a&&this.throwUnexpectedToken(Messages.InvalidHexEscapeSequence),r+=a;break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=i,this.tolerateUnexpectedToken();break;default:if(i&&Character.isOctalDigit(i.charCodeAt(0))){var s=this.octalToDecimal(i);n=s.octal||n,r+=String.fromCharCode(s.code)}else r+=i}else{if(Character.isLineTerminator(i.charCodeAt(0)))break;r+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:r,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,r="`"===this.source[n],i=!1,o=null,a=2;for(++this.index;!this.eof();){var s=this.source[this.index++];if("`"===s){a=1,i=!0,t=!0;break}if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else{if(null!==o)continue;if("\\"===s)if(s=this.source[this.index++],Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;var u=this.tryToScanUnicodeCodePointEscape();null===u?o="u":e+=u}else{var c=this.scanHexEscape(s);null===c?o="u":e+=c}break;case"x":var l=this.scanHexEscape(s);null===l?o="x":e+=l;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?Character.isDecimalDigit(this.source.charCodeAt(this.index))?o="0":e+="\0":Character.isDecimalDigitChar(s)?o=s:e+=s}else Character.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s}}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:null===o?e:null,head:r,tail:i,notEscapeSequenceHead:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=this,r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(Messages.UnterminatedRegExp),t+=e;else if(Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||this.throwUnexpectedToken(Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t,t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r,"\\u";n<this.index;++n)this.source[n];else this.index=n,e+="u","\\u";this.tolerateUnexpectedToken()}else"\\",this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}(),TokenName={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},ArrowParameterPlaceHolder="ArrowParameterPlaceHolder",Parser=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,s=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,s,i)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,s=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,s,i)},e.prototype.unexpectedTokenError=function(e,t){var n,r=t||Messages.UnexpectedToken;if(e?(t||(r=2===e.type?Messages.UnexpectedEOS:3===e.type?Messages.UnexpectedIdentifier:6===e.type?Messages.UnexpectedNumber:8===e.type?Messages.UnexpectedString:10===e.type?Messages.UnexpectedTemplate:Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?r=Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(r=Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",r=r.replace("%0",n),e&&"number"==typeof e.lineNumber){var i=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,s=e.start-a+1;return this.errorHandler.createError(i,o,s,r)}i=this.lastMarker.index,o=this.lastMarker.line,s=this.lastMarker.column+1;return this.errorHandler.createError(i,o,s,r)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],r={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])};this.config.range&&(r.range=n.range),this.config.loc&&(r.loc=n.loc);var i={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(r,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,r=e.flags;t.regex={pattern:n,flags:r}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,r=e.lineNumber;return n<0&&(n+=t,r--),{index:e.start,line:r,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new Identifier$1(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(null,n));break;case 10:e=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new Identifier$1(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new ThisExpression$1)):e=this.matchKeyword("class")?this.parseClassExpression():this.matchImportCall()?this.parseImportCall():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new SpreadElement$1(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new ArrayExpression$1(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new Literal$1(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new Identifier$1(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return 64===e.type&&e.name===t||65===e.type&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(3===r.type){var l=r.value;this.nextToken(),a=this.match("["),i=(c=!(this.hasLineTerminator||"async"!==l||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new Identifier$1(l))}else this.match("*")?this.nextToken():(a=this.match("["),i=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!c&&"get"===r.value&&p)t="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===r.type&&!c&&"set"===r.value&&p)t="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&p)t="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!c)!a&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0;else if(3===r.type){l=this.finalize(n,new Identifier$1(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(n,new AssignmentPattern(l,h))}else u=!0,o=l}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new Property(t,i,a,o,s,u))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.match("...")?this.parseSpreadElement():this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new ObjectExpression$1(t))},e.prototype.throwTemplateLiteralEarlyErrors=function(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,Messages.InvalidUnicodeEscapeSequence);case"x":return this.throwUnexpectedToken(e,Messages.InvalidHexEscapeSequence);case"8":case"9":return this.throwUnexpectedToken(e,Messages.TemplateEscape89);default:return this.throwUnexpectedToken(e,Messages.TemplateOctalLiteral)}},e.prototype.parseTemplateHead=function(e){assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateElement=function(e){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateLiteral=function(e){var t=this.createNode(),n=[],r=[],i=this.parseTemplateHead(e);for(r.push(i);!i.tail;)n.push(this.parseExpression()),i=this.parseTemplateElement(e),r.push(i);return this.finalize(t,new TemplateLiteral$1(r,n))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case 64:case 39:case 69:case 61:default:break;case 70:e.type=69,this.reinterpretExpressionAsPattern(e.argument);break;case 30:e.type=60;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case 41:e.type=66;for(t=0;t<e.properties.length;t++){var n=e.properties[t];this.reinterpretExpressionAsPattern(70===n.type?n:n.value)}break;case 32:e.type=61,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(e=this.finalize(this.startNode(t),new SequenceExpression$1(i)))}if(!r){if(this.expect(")"),this.match("=>")&&(64===e.type&&"yield"===e.name&&(r=!0,e={type:ArrowParameterPlaceHolder,params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===e.type)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var a=37===e.type?e.expressions:[e];e={type:ArrowParameterPlaceHolder,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new Identifier$1(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var i=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];e=new NewExpression$1(i,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.matchImportCall=function(){var e=this.matchKeyword("import");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=7===n.type&&"("===n.value}return e},e.prototype.parseImportCall=function(){var e=this.createNode();return this.expectKeyword("import"),this.finalize(e,new Import)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),r=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();e=this.finalize(this.startNode(t),new StaticMemberExpression(e,i))}else if(this.match("(")){var o=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=o?this.parseAsyncArguments():this.parseArguments();if(77===e.type&&1!==a.length&&this.tolerateError(Messages.BadImportCallArity),e=this.finalize(this.startNode(t),new CallExpression$1(e,a)),o&&this.match("=>")){for(var s=0;s<a.length;++s)this.reinterpretExpressionAsPattern(a[s]);e={type:ArrowParameterPlaceHolder,params:a,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(this.startNode(t),new ComputedMemberExpression(e,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(this.startNode(t),new TaggedTemplateExpression$1(e,u))}return this.context.allowIn=r,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new Super)},e.prototype.parseLeftHandSideExpression=function(){assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new ComputedMemberExpression(t,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");n=this.parseIdentifierName();t=this.finalize(e,new StaticMemberExpression(t,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new TaggedTemplateExpression$1(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment);var i=!0;e=this.finalize(n,new UpdateExpression$1(r.value,e,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value;i=!1;e=this.finalize(this.startNode(t),new UpdateExpression$1(o,e,i))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new UnaryExpression$1(n.value,e)),this.context.strict&&"delete"===e.operator&&64===e.argument.type&&this.tolerateError(Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(44!==t.type&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,r=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new BinaryExpression$1("**",n,r))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?12:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=!0,r=!0,i=function(e){"&&"!==e.value&&"||"!==e.value||(r=!1),"??"===e.value&&(n=!1)},o=this.lookahead,a=this.binaryPrecedence(o);if(a>0){i(o),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var s=[e,this.lookahead],u=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[u,o.value,c],p=[a];!((a=this.binaryPrecedence(this.lookahead))<=0);){for((n||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(r||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),i(this.lookahead);l.length>2&&a<=p[p.length-1];){c=l.pop();var h=l.pop();p.pop(),u=l.pop(),s.pop();var d=s[s.length-1],f=this.startNode(d,d.lineStart);l.push(this.finalize(f,new BinaryExpression$1(h,u,c)))}l.push(this.nextToken().value),p.push(a),s.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=l.length-1;t=l[m];for(var g=s.pop();m>1;){d=s.pop();var y=g&&g.lineStart;f=this.startNode(d,y),h=l[m-1];t=this.finalize(f,new BinaryExpression$1(h,l[m-2],t)),m-=2,g=d}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new ConditionalExpression$1(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case 64:this.validateParam(e,t,t.name);break;case 69:this.checkPatternParam(e,t.argument);break;case 61:this.checkPatternParam(e,t.left);break;case 60:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case 66:for(n=0;n<t.properties.length;n++){var r=t.properties[n];this.checkPatternParam(e,69===r.type?r:r.value)}}e.simple=e.simple&&t instanceof Identifier$1},e.prototype.reinterpretAsCoverFormalsList=function(e){var t=[e],n={simple:!0,paramSet:{}},r=!1;switch(e.type){case 64:break;case ArrowParameterPlaceHolder:t=e.params,r=e.async;break;default:return null}for(var i=0;i<t.length;++i){61===(o=t[i]).type?92===o.right.type&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=64,o.right.name="yield",delete o.right.argument,delete o.right.delegate):r&&64===o.type&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,o),t[i]=o}if(this.context.strict||!this.context.allowYield)for(i=0;i<t.length;++i){var o;92===(o=t[i]).type&&this.throwUnexpectedToken(this.lookahead)}if(n.message===Messages.StrictParamDupe){var a=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(a,n.message)}return{simple:n.simple,params:t,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),e={type:ArrowParameterPlaceHolder,params:[r],async:!0}}if(e.type===ArrowParameterPlaceHolder||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,o=this.reinterpretAsCoverFormalsList(e);if(o){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var a=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=o.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=i;var l=this.startNode(t);this.expect("=>");var p=void 0;if(this.match("{")){var h=this.context.allowIn;this.context.allowIn=!0,p=this.parseFunctionSourceElements(),this.context.allowIn=h}else p=this.isolateCoverGrammar(this.parseAssignmentExpression);var d=76!==p.type;this.context.strict&&o.firstRestricted&&this.throwUnexpectedToken(o.firstRestricted,o.message),this.context.strict&&o.stricted&&this.tolerateUnexpectedToken(o.stricted,o.message),e=i?this.finalize(l,new AsyncArrowFunctionExpression(o.params,p,d)):this.finalize(l,new ArrowFunctionExpression$1(o.params,p,d)),this.context.strict=a,this.context.allowStrictDirective=s,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.strict&&64===e.type){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var m=(n=this.nextToken()).value,g=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new AssignmentExpression$1(m,e,g)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new SequenceExpression$1(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalImportDeclaration),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new BlockStatement$1(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&64===r.type&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&64!==r.type||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new VariableDeclarator$1(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new VariableDeclaration$1(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,a=!1;if(3===this.lookahead.type){var s=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new Identifier$1(s.value));if(this.match("=")){e.push(s),a=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(s),new AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(s),a=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new Property("init",n,o,r,!1,a))},e.prototype.parseRestProperty=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestProperty),this.match("}")||this.throwError(Messages.PropertyAfterRestProperty),this.finalize(n,new RestElement(r))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.match("...")?this.parseRestProperty(e,t):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new Identifier$1(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===n.type||e.inFor||this.expect("="),this.finalize(t,new VariableDeclarator$1(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new VariableDeclaration$1(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new EmptyStatement$1)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ExpressionStatement$1(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new IfStatement$1(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new DoWhileStatement$1(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new WhileStatement$1(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,o=null,a=!0,s=!1,u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.await||this.tolerateUnexpectedToken(this.lookahead),s=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var l=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!s&&1===l.length&&this.matchKeyword("in")){var p=l[0];p.init&&(60===p.id.type||66===p.id.type||this.context.strict)&&this.tolerateError(Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;l=this.parseBindingList(h,{inFor:!0});this.context.allowIn=c,1===l.length&&null===l[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new VariableDeclaration$1(l,h)))}else r=this.finalize(r,new Identifier$1(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead,f=this.context.isBindingElement,m=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.context.isBindingElement=f,this.context.isAssignmentTarget=m,this.context.firstCoverInitializedNameError=g,this.match(",")){for(var y=[r];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new SequenceExpression$1(y))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(o=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(u,new ForStatement$1(r,i,o,n)):a?this.finalize(u,new ForInStatement$1(e,t,n)):this.finalize(u,new ForOfStatement$1(e,t,n,s))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(Messages.IllegalContinue),this.finalize(e,new ContinueStatement$1(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(Messages.IllegalBreak),this.finalize(e,new BreakStatement$1(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new ReturnStatement$1(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new WithStatement$1(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new SwitchCase$1(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var o=this.parseSwitchCase();null===o.test&&(i&&this.throwError(Messages.MultipleDefaultsInSwitch),i=!0),r.push(o)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new SwitchStatement$1(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(64===n.type&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var o=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),o=this.parseClassDeclaration();else if(this.matchKeyword("function")){var a=this.lookahead,s=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(a,Messages.StrictFunction):s.generator&&this.tolerateUnexpectedToken(a,Messages.GeneratorInLegacyContext),o=s}else o=this.parseStatement();delete this.context.labelSet[i],e=new LabeledStatement$1(r,o)}else this.consumeSemicolon(),e=new ExpressionStatement$1(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ThrowStatement$1(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i<t.length;i++){var o="$"+t[i].value;Object.prototype.hasOwnProperty.call(r,o)&&this.tolerateError(Messages.DuplicateBinding,t[i].value),r[o]=!0}this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictCatchVariable),this.expect(")");var a=this.parseBlock();return this.finalize(e,new CatchClause$1(n,a))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(Messages.NoCatchOrFinally),this.finalize(e,new TryStatement$1(t,n,r))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new DebuggerStatement$1)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(e,new BlockStatement$1(t))},e.prototype.validateParam=function(e,t,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[r]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestParameter),this.match(")")||this.throwError(Messages.ParameterAfterRestParameter),this.finalize(t,new RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),r=0;r<t.length;r++)this.validateParam(e,t[r],t[r].value);e.simple=e.simple&&n instanceof Identifier$1,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t={simple:!0,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r,i=!n&&this.match("*");i&&this.nextToken();var o=null,a=null;if(!e||!this.match("(")){var s=this.lookahead;o=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(s.value)&&this.tolerateUnexpectedToken(s,Messages.StrictFunctionName):this.scanner.isRestrictedWord(s.value)?(a=s,r=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(s.value)&&(a=s,r=Messages.StrictReservedWord)}var u=this.context.await,c=this.context.allowYield;this.context.await=n,this.context.allowYield=!i;var l=this.parseFormalParameters(a),p=l.params,h=l.stricted;a=l.firstRestricted,l.message&&(r=l.message);var d=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;var m=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,r),this.context.strict&&h&&this.tolerateUnexpectedToken(h,r),this.context.strict=d,this.context.allowStrictDirective=f,this.context.await=u,this.context.allowYield=c,n?this.finalize(t,new AsyncFunctionDeclaration(o,p,m)):this.finalize(t,new FunctionDeclaration$1(o,p,m,i))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,r=!t&&this.match("*");r&&this.nextToken();var i,o=null,a=this.context.await,s=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!r,!this.match("(")){var u=this.lookahead;o=this.context.strict||r||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(i=u,n=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(i=u,n=Messages.StrictReservedWord)}var c=this.parseFormalParameters(i),l=c.params,p=c.stricted;i=c.firstRestricted,c.message&&(n=c.message);var h=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var f=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=h,this.context.allowStrictDirective=d,this.context.await=a,this.context.allowYield=s,t?this.finalize(e,new AsyncFunctionExpression(o,l,f)):this.finalize(e,new FunctionExpression$1(o,l,f,r))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),r=65===n.type?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,r?new Directive(n,r):new ExpressionStatement$1(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var r=this.parseDirective();t.push(r);var i=r.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(Messages.BadSetterArity):n.params[0]instanceof RestElement&&this.tolerateError(Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(a=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,u=!0,a=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var l=this.lookahead.value;":"!==l&&"("!==l&&"*"!==l&&(c=!0,t=this.lookahead,a=this.match("["),i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(r="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod()):"set"===t.value&&p&&(r="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(r="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0),!r&&i&&this.match("(")&&(r="init",o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),a||(u&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,Messages.StaticPrototype),!u&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!s||o&&o.generator)&&this.throwUnexpectedToken(t,Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new MethodDefinition(i,a,o,r,u))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new Literal$1(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();e=this.finalize(t,new ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(Messages.UnexpectedToken,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new ExportAllDeclaration(i))}else if(4===this.lookahead.type){n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){n=this.parseFunctionDeclaration();e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else{var o=[],a=null,s=!1;for(this.expect("{");!this.match("}");)s=s||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),a=this.parseModuleSpecifier(),this.consumeSemicolon();else if(s){r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();e=this.finalize(t,new ExportNamedDeclaration(null,o,a))}return e},e}(),Reader=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","??","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!0,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),Tokenizer=function(){function e(e,t){this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new Reader}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],r=this.scanner.source.slice(n.slice[0],n.slice[1]),i={type:n.multiLine?"BlockComment":"LineComment",value:r};this.trackRange&&(i.range=n.range),this.trackLoc&&(i.loc=n.loc),this.buffer.push(i)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var s=this.scanner.saveState();try{a=this.scanner.scanRegExp()}catch(n){this.scanner.restoreState(s),a=this.scanner.lex()}}else a=this.scanner.lex();this.reader.push(a);var u={type:TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var c=a.pattern,l=a.flags;u.regex={pattern:c,flags:l}}this.buffer.push(u)}}return this.buffer.shift()},e}();function parse(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},o="function"==typeof n?i:null,a=!1;if(t){a="boolean"==typeof t.comment&&t.comment;var s="boolean"==typeof t.attachComment&&t.attachComment;(a||s)&&((r=new CommentHandler).attach=s,t.comment=!0,o=i)}var u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType);var c=new Parser(e,t,o),l=u?c.parseModule():c.parseScript();return a&&r&&(l.comments=r.comments),c.config.tokens&&(l.tokens=c.tokens),c.config.tolerant&&(l.errors=c.errorHandler.errors),l}function parseModule(e,t,n){var r=t||{};return r.sourceType="module",parse(e,r,n)}function parseScript(e,t,n){var r=t||{};return r.sourceType="script",parse(e,r,n)}function tokenize(e,t,n){var r=new Tokenizer(e,t),i=[];try{for(;;){var o=r.getNextToken();if(!o)break;n&&(o=n(o)),i.push(o)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i}var C_COMPLETION_RETURN={type:"return",value:void 0},C_COMPLETION_CONTINUE={type:"continue",value:null},C_COMPLETION_BREAK={type:"break",value:null},NOINIT=createSymbol("noinit"),DEADZONE=createSymbol("deadzone");function createSymbol(e){return e+Math.random().toString(36).substring(2)}function getGetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.get)return n.get;e=getPrototypeOf(e)}}function getSetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.set)return n.set;e=getPrototypeOf(e)}}var hostGlobalObject="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function isCompletionRecord(e){return e===C_COMPLETION_RETURN||e===C_COMPLETION_BREAK||e===C_COMPLETION_CONTINUE}function createSandbox(){var e={};return["Object","Function","Array","Number","Boolean","String","RegExp","Promise","Date","Map","Set","WeakMap","WeakSet","NaN","JSON","Math","eval","isFinite","isNaN","clearTimeout","setTimeout","clearInterval","setInterval","console","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","parseFloat","parseInt","Symbol","Infinity"].forEach((function(t){void 0!==hostGlobalObject[t]&&(e[t]=hostGlobalObject[t])})),e}var errorMessage={notImplemented:"%0 isn't implemented",unexpectedToken:"Unexpected token",deleteUnqualified:"Delete of an unqualified identifier in strict mode",identifierDeclared:"Identifier %0 has already been declared",assignmentToConst:"Assignment to constant variable",notFunction:"%0 is not a function",convertNullToObject:"Cannot convert undefined or null to object",notDefined:"%0 is not defined",notIterable:"%0 is not iterable"};function createTypeErrorByMessage(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.reduce((function(e,t,n){return e.replace("%".concat(n),t)}),errorMessage[e]);return new TypeError(r)}var VariableAccessor=function(){function e(e,t){this.kind=e,this.value=t}return e.prototype.set=function(e){return this.value=e},e.prototype.strictSet=function(e){"use strict";return this.value=e},e}(),ConstVariableAccessor=function(){function e(e,t){this.value=t,this.kind=3}return e.prototype.set=function(e){throw new TypeError(errorMessage.assignmentToConst)},e.prototype.strictSet=function(e){throw new TypeError(errorMessage.assignmentToConst)},e}(),VariableAccecssorMappingGlobal=function(){function e(e,t){this.globalObject=e,this.globalKey=t,this.kind=1}return Object.defineProperty(e.prototype,"value",{get:function(){return this.globalObject[this.globalKey]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.globalObject[this.globalKey]=e},e.prototype.strictSet=function(e){"use strict";return this.globalObject[this.globalKey]=e},e}(),PropertyAccessor=function(){function e(e,t){this.object=e,this.property=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.object[this.property]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.object[this.property]=e},e.prototype.strictSet=function(e){"use strict";return this.object[this.property]=e},e.prototype.delete=function(){return delete this.object[this.property]},e.prototype.strictDelete=function(){"use strict";return delete this.object[this.property]},e}(),GlobalObjectAccessor=function(){function e(e){this.globalObject=e,this.propertyAccessors=Object.create(null)}return e.prototype.getProperty=function(e){var t=this.propertyAccessors[e];return t||(t=this.propertyAccessors[e]=new PropertyAccessor(this.globalObject,e)),t},e.prototype.deleteProperty=function(e){return delete this.globalObject[e]},e}(),RuntimeScope=function(){function e(e,t){this.engine=e,this.strict=!1,this.isolated=!0,this.context=Object.create(null),this.parent=t,t&&t.strict&&(this.strict=!0)}return e.prototype.setCompileScope=function(e){this.compileScope=e},e.prototype.getCompileScope=function(){return this.compileScope},e.prototype.find=function(e){var t=this.context[e];return t||(this.parent?this.parent.find(e):void 0)},e.prototype.var=function(e,t){var n=this.context,r=n[e];r?t!==NOINIT&&r.set(t):n[e]=new VariableAccessor(1,t===NOINIT?void 0:t)},e.prototype.let=function(e,t){var n=this.context[e];if(n){if(n.value!==DEADZONE)throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));n.set(t)}else this.context[e]=new VariableAccessor(2,t)},e.prototype.const=function(e,t){var n=this.context[e];if(n&&n.value!==DEADZONE)throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context[e]=new ConstVariableAccessor(3,t)},e.prototype.func=function(e,t){var n=this.context,r=n[e];r?this.strict?r.strictSet(t):r.set(t):n[e]=new VariableAccessor(1,t)},e.prototype.declare=function(e,t,n){switch(e){case 1:this.var(t,n);break;case 2:this.let(t,n);break;case 3:this.const(t,n)}},e}(),BlockRuntimeScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];if(i)t!==NOINIT&&i.set(t);else{var o=t===NOINIT?void 0:t;r[e]=new VariableAccessor(1,o)}},t.prototype.func=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];i?n.strict?i.strictSet(t):i.set(t):r[e]=new VariableAccessor(1,t)},t}(RuntimeScope),WithRuntimeScope=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.withObject=r,i}return __extends(t,e),t.prototype.find=function(e){return this.context[e]?this.context[e]:e in this.withObject?new PropertyAccessor(this.withObject,e):this.parent?this.parent.find(e):void 0},t.prototype.var=function(t,n){t in this.withObject?this.withObject[t]=n:e.prototype.var.call(this,t,n)},t}(BlockRuntimeScope),CompileScope=function(){function e(e,t){this.engine=e,this.strict=!1,this.isolated=!0,this.context=new Map,this.contexts=[],this.parent=t,t&&t.strict&&(this.strict=!0)}return e.prototype.var=function(e){var t=this.context,n=t.get(e);n||(t.set(e,{kind:1,index:t.size}),this.contexts.push(e))},e.prototype.let=function(e){var t=this.context;if(t.get(e))throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context.set(e,{kind:2,index:t.size}),this.contexts.push(e)},e.prototype.const=function(e){var t=this.context;if(t.get(e))throw new SyntaxError(errorMessage.identifierDeclared.replace("%0",e));this.context.set(e,{kind:3,index:t.size}),this.contexts.push(e)},e.prototype.func=function(e){var t=this.context,n=t.get(e);n||(t.set(e,{kind:1,index:t.size}),this.contexts.push(e))},e}(),BlockCompileScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.var(e)},t.prototype.func=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.func(e)},t}(CompileScope),GlobalCompileScope=function(e){function t(t){var n=e.call(this,t,null)||this;return n.engine=t,n}return __extends(t,e),t.prototype.var=function(t){return e.prototype.var.call(this,t)},t.prototype.func=function(t){return e.prototype.func.call(this,t)},t}(CompileScope),GlobalRuntimeScope=function(e){function t(t,n){var r=e.call(this,t,null)||this;return r.engine=t,r.globalObject=n,r.objectBindings=createDefaultGlobalObjectBindings(n),r.setCompileScope(new GlobalCompileScope(t)),r}return __extends(t,e),t.prototype.var=function(e,t){var n=this.context,r=n[e];if(r)t!==NOINIT&&r.set(t);else{var i=t===NOINIT?void 0:t,o=n.this.value,a=new VariableAccecssorMappingGlobal(o,e);n[e]=a,e in o?t!==NOINIT&&a.set(i):defineProperty(o,e,{value:i,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.func=function(e,t){var n=this.context,r=n[e];if(r)this.strict?r.strictSet(t):r.set(t);else{var i=n.this.value,o=new VariableAccecssorMappingGlobal(i,e);n[e]=o,e in i?this.strict?o.strictSet(t):o.set(t):defineProperty(i,e,{value:t,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.find=function(e){var t;return(t=this.context[e])?t:(t=this.objectBindings[e])||(e in this.globalObject?this.objectBindings[e]=new VariableAccecssorMappingGlobal(this.globalObject,e):void 0)},t}(RuntimeScope);function createDefaultGlobalObjectBindings(e){var t=Object.create(null);return t.String={kind:1,get value(){return e.String},set:function(t){return e.String=t},strictSet:function(t){"use strict";return e.String=t}},t.Function={kind:1,get value(){return e.Function},set:function(t){return e.Function=t},strictSet:function(t){"use strict";return e.Function=t}},t.Array={kind:1,get value(){return e.Array},set:function(t){return e.Array=t},strictSet:function(t){"use strict";return e.Array=t}},t.Number={kind:1,get value(){return e.Number},set:function(t){return e.Number=t},strictSet:function(t){"use strict";return e.Number=t}},t.Object={kind:1,get value(){return e.Object},set:function(t){return e.Object=t},strictSet:function(t){"use strict";return e.Object=t}},t.setTimeout={kind:1,get value(){return e.setTimeout},set:function(t){return e.setTimeout=t},strictSet:function(t){"use strict";return e.setTimeout=t}},t.clearTimeout={kind:1,get value(){return e.clearTimeout},set:function(t){return e.clearTimeout=t},strictSet:function(t){"use strict";return e.clearTimeout=t}},t.setInterval={kind:1,get value(){return e.setInterval},set:function(t){return e.setInterval=t},strictSet:function(t){"use strict";return e.setInterval=t}},t.clearInterval={kind:1,get value(){return e.clearInterval},set:function(t){return e.clearInterval=t},strictSet:function(t){"use strict";return e.clearInterval=t}},t.console={kind:1,get value(){return e.console},set:function(t){return e.console=t},strictSet:function(t){"use strict";return e.console=t}},t}function noop$1(){}function combineCallable(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n){return e(n),t(n)}:e:t}function combineCallableWithOptions(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n,r){return e(n,r),t(n,r)}:e:t}function XInlineObjectPattern(e,t,n,r){for(var i=r.kind,o=noop$1,a=t.properties,s=function(t){var n,r=a[t];if(68===r.type){var s;s=r.computed?createEvaluate(e,r.key):function(){return r.key.name};var u=r.value;if(64===u.type)n=function(e,t){var n=t.feed,r=t.key;if(i)e.declare(i,u.name,n[r]);else{var o=ZInlineIdentifierAccessor(u.name,e,0);o&&o.set(n[r])}};else{var c=XInlinePattern(e,u,void 0,{kind:i});n=function(e,t){var n=t.feed,r=t.key;return c(e,{feed:n[r]})}}o=combineCallableWithOptions(o,(function(e,t){var r=t.feed,i=t.fedKeys,o=s(e);return i.push(o),n(e,{fedKeys:i,feed:r,key:o})}))}else{var l=XInlineRestElement(e,r,void 0,{kind:i});o=combineCallableWithOptions(o,(function(e,t){for(var n=t.feed,r=t.fedKeys,i=assignObject({},n),o=0;o<r.length;o++)delete i[r[o]];return l(e,{feed:i})}))}},u=0;u<a.length;u++)s(u);return function(e,t){var n=t.feed;return o(e,{feed:n,fedKeys:[]})}}function XInlineArrayPattern(e,t,n,r){for(var i=r.kind,o=t.elements,a=noop$1,s=function(t){var n=o[t];if(!n)return"continue";if(64===n.type)a=combineCallableWithOptions(a,i?function(e,r){var o=r.feed;e.declare(i,n.name,o[t])}:function(e,r){var i=r.feed,o=r.result,a=ZInlineIdentifierAccessor(n.name,e,0);a&&(a.set(i[t]),o.push(a.value))});else if(69===n.type){var r=XInlineRestElement(e,n,void 0,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var i=n.feed;return r(e,{feed:i.slice(t)})}))}else{var s=XInlinePattern(e,n,void 0,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var r=n.feed;return s(e,{feed:r[t]})}))}},u=0;u<o.length;u++)s(u);return function(e,t){var n=t.feed,r=[];if(a(e,{feed:void 0===n?[]:n,result:r}),r.length)return r}}function XInlineFunctionArguments(e,t){for(var n=t.params,r=noop$1,i=function(e){var t=n[e];r=combineCallableWithOptions(r,(function(n,r){n.var(t.name,r[e])}))},o=0;o<n.length;o++)i(o);return r}function XInlineRestElement(e,t,n,r){var i=r.kind,o=t.argument;if(64===o.type)return i?function(e,t){var n=t.feed,r=void 0===n?[]:n;e.declare(i,o.name,r)}:function(e,t){var n=t.feed,r=void 0===n?[]:n,i=ZInlineIdentifierAccessor(o.name,e,0);i&&i.set(r)};var a=XInlinePattern(e,o,void 0,{kind:i});return function(e,t){var n=t.feed;return a(e,{feed:void 0===n?[]:n})}}function XInlineAssignmentPattern(e,t,n,r){var i,o=r.kind,a=createEvaluate(e,t.right),s=t.left;return i=64===s.type?o?function(e,t){var n=t.feed;e.declare(o,s.name,n)}:function(e,t){var n=t.feed,r=ZInlineIdentifierAccessor(s.name,e,0);r&&r.set(n)}:XInlinePattern(e,s,void 0,{kind:o}),function(e,t){var n=t.feed,r=void 0===n?a(e):n;return i(e,{feed:r})}}function XInlinePattern(e,t,n,r){switch(t.type){case 66:return XInlineObjectPattern(e,t,void 0,r);case 60:return XInlineArrayPattern(e,t,void 0,r);case 69:return XInlineRestElement(e,t,void 0,r);case 61:return XInlineAssignmentPattern(e,t,void 0,r);default:throw new SyntaxError(errorMessage.unexpectedToken)}}function XRuntimeScopeHoistPattern(e,t,n,r){var i=noop$1;switch(t.type){case 66:for(var o=t.properties,a=function(t){var n=o[t];if(68===n.type){var a=n.value;i=64===a.type?combineCallable(i,(function(e){e.declare(r,a.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,a,void 0,r))}else i=combineCallable(i,XRuntimeScopeHoistPattern(e,n,void 0,r))},s=0;s<o.length;s++)a(s);break;case 60:var u=t.elements,c=function(t){var n=u[t];n&&(i=64===n.type?combineCallable(i,(function(e){e.declare(r,n.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,n,void 0,r)))};for(s=0;s<u.length;s++)c(s);break;case 69:var l=t.argument;i=64===l.type?combineCallable(i,(function(e){e.declare(r,l.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,l,void 0,r));break;case 61:var p=t.left;i=64===p.type?combineCallable(i,(function(e){e.declare(r,p.name,1===r?NOINIT:DEADZONE)})):combineCallable(i,XRuntimeScopeHoistPattern(e,p,void 0,r));break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return i}var checkStrictInBody=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(5===n.type){var r="use strict"===n.directive;if(r)return r}}return!1};function XCreateFunction(e,t){if(t.generator||t.async)throw new Error(errorMessage.notImplemented.replace("%0","Generator or async function"));var n,r=31===t.type,i=e.runtimeProfile,o=i.scriptId,a=t.params.length,s=t.id&&t.id.name||"",u=t.body,c=!1;if(76===u.type){c=checkStrictInBody(u.body);var l=XRuntimeScopeHoist(e,u,void 0,0),p=XInlineBlockStatement(e,u,void 0,3);n=combineCallable(l,p)}else{var h=createEvaluate(e,u);n=function(e){var t=h(e);return r&&(C_COMPLETION_RETURN.value=t,t=C_COMPLETION_RETURN),t}}var d=XInlineFunctionArguments(e,t);return function(u){var l=function(){var a=new RuntimeScope(e,u),s=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:l.name,functionScope:a,functionNode:t}),r||(a.const("this",this),a.var("arguments",arguments));try{d(a,arguments);var c=n(a);if(i.popCallFrame(),i.scriptId=s,c===C_COMPLETION_RETURN)return c.value}catch(t){var p=e.inspector;if(p&&!i.callExpressionStack.length){var h=getBoatmanSymbol(t,"__rewrittenzxcd");h&&h.node&&(p.shouldPauseOnException(o,t,h.node,!0),p.throwException(t))}throw i.popCallFrame(),i.scriptId=s,t}},p=function(){"use strict";var a=new RuntimeScope(e,u);a.strict=!0;var s=i.scriptId;i.scriptId=o,i.pushCallFrame({functionName:p.name,functionScope:a,functionNode:t}),r||(a.const("this",this),a.const("arguments",arguments));try{d(a,arguments);var c=n(a);if(i.popCallFrame(),i.scriptId=s,c===C_COMPLETION_RETURN)return c.value}catch(t){var l=e.inspector;if(l&&!i.callExpressionStack.length){var h=getBoatmanSymbol(t,"__rewrittenzxcd");h&&h.node&&(l.shouldPauseOnException(o,t,h.node,!0),l.throwException(t))}throw i.popCallFrame(),i.scriptId=s,t}},h=u.strict||c?p:l;return isFunctionNameConfigurable&&defineProperties(h,{name:{value:s,configurable:!0},length:{value:a,configurable:!0}}),setBoatmanSymbol(h,"___func_locationxasdzzy",{node:t,scriptId:e.runtimeProfile.scriptId}),defineProperty(h,"toString",{value:function(){return"function ".concat(s,"() { ... }")},writable:!0,configurable:!0}),h}}function XRuntimeScopeHoist(e,t,n,r){for(var i=noop$1,o=t.body,a=function(t){var n=o[t];if(63===n.type){var r=XCreateFunction(e,n);i=combineCallable(i,(function(e){return e.func(n.id.name,r(e))}))}else i=combineCallable(i,XRuntimeScopeHoistVarRecursion(e,n))},s=0;s<o.length;s++)a(s);var u=checkStrictInBody(o);return function(e){e.strict||(e.strict=u),i(e)}}function XRuntimeScopeHoistVarRecursion(e,t,n){var r=noop$1;switch(t.type){case 17:r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t,void 0));break;case 6:case 7:17===t.left.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.left,void 0)));case 8:8===t.type&&t.init&&17===t.init.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.init,void 0)));case 15:case 4:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.body,void 0));break;case 9:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.consequent,void 0)),t.alternate&&(r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.alternate,void 0)));break;case 76:for(var i=t.body,o=0;o<i.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,i[o],void 0));break;case 12:var a=t.cases;for(o=0;o<a.length;o++)for(var s=a[o].consequent,u=0;u<s.length;u++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,s[u],void 0));break;case 14:var c=t.block.body;for(o=0;o<c.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,c[o],void 0));var l=t.handler&&t.handler.body.body;if(l)for(o=0;o<l.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,l[o],void 0));var p=t.finalizer&&t.finalizer.body;if(p)for(o=0;o<p.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,p[o],void 0))}return r}function XRuntimeScopeVariableDeclaration4Hoisting(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];1===o&&(r=combineCallable(r,(function(e){e.var(t.id.name,NOINIT)})))},s=0;s<i.length;s++)a(s);return r}function XRuntimeScopeVariableDeclaration4HoistingLetConst(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];r=combineCallable(r,(function(e){e.declare(o,t.id.name,DEADZONE)}))},s=0;s<i.length;s++)a(s);return r}function Program(e,t,n){for(var r=XRuntimeScopeHoist(e,t,void 0,0),i=[],o=t.body,a=0;a<o.length;a++)i[a]=createEvaluate(e,o[a]);return function(n){r(n);var o=e.runtimeProfile;o.pushCallFrame({functionName:"",functionNode:t,functionScope:n});try{for(var a=void 0,s=0;s<i.length;s++)a=i[s](n);return o.popCallFrame(),a}catch(e){throw o.popCallFrame(),e}}}function Identifier(e,t,n,r){return function(e){var n=t.name;if("undefined"!==n){var i=e.find(n);if(i)return i.value;if(!r)throw new ReferenceError(errorMessage.notDefined.replace("%0",n))}}}function ZInlineIdentifierAccessor(e,t,n){if("undefined"!==e){var r=t.find(e);if(r)return r;if(!n)throw new ReferenceError(errorMessage.notDefined.replace("%0",e))}}function Literal(e,t,n){return function(e){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var n=t.regex,r=n.pattern,i=n.flags;return new RegExp(r,i)}return t.value}}function FunctionDeclaration(){return noop$1}function VariableDeclaration(e,t,n){for(var r=t.declarations,i=t.kind,o=[],a=0;a<r.length;a++)o[a]=VariableDeclarator(e,r[a],void 0,i);return function(e){for(var t=0;t<o.length;t++)o[t](e)}}function VariableDeclarator(e,t,n,r){var i=t.init,o=i?createEvaluate(e,i):noop$1;return function(e){var n=o(e),r=t.id.name;i&&e.var(r,n),!i||36!==i.type&&31!==i.type||!isFunctionNameConfigurable||n.name||defineProperty(n,"name",{value:r,configurable:!0})}}function XInlineVariableDeclarationWithInitializer(e,t,n){for(var r=t.declarations,i=(t.kind,0);i<r.length;i++){r[i].id;1}return function(e,n){for(var r=t.declarations,i=t.kind,o=0;o<r.length;o++){var a=r[o].id;e.declare(i,a.name,n)}}}var functionPrototypeApply=Function.prototype.apply;function ThisExpression(e,t,n){return function(e){return e.find("this").value}}function XInlineSpreadElement(e,t){for(var n=t,r=n.length,i=new Array(r),o=0;o<r;o++){var a=n[o];null===a||(i[o]=createEvaluate(e,a))}return function(e){for(var t=new Array(r),o=0;o<r;o++){null!==n[o]&&(t[o]=i[o](e))}return t}}function ArrayExpression(e,t,n){var r=XInlineSpreadElement(e,t.elements);return function(e){return r(e)}}function ObjectExpression(e,t,n){for(var r=t.properties,i=[],o=[],a=function(t){var n=r[t],a=n.key,s=void 0;s=64===a.type?function(){return a.name}:function(){return a.value+""},i[t]=s;var u=n.value;o[t]=createEvaluate(e,u)},s=0;s<r.length;s++)a(s);return function(e){for(var n={},r=t.properties,a=0;a<r.length;a++){0;var s=i[a](e),u=o[a](e),c=r[a],l=c.value;36!==l.type&&31!==l.type||isFunctionNameConfigurable&&defineProperty(u,"name",{value:s,configurable:!0});var p=c.kind;if("init"===p)n[s]=u;else if("get"===p){var h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:u,set:h&&h.set,enumerable:!0,configurable:!0})}else{h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:h&&h.get,set:u,enumerable:!0,configurable:!0})}}return n}}function FunctionExpression(e,t,n){var r=XCreateFunction(e,t);return t.id&&t.id.name?function(n){var i=new BlockRuntimeScope(e,n),o=r(i);return i.const(t.id.name,o),o}:function(e){return r(e)}}function UnaryExpression(e,t,n){if(6===t.operator){var r,i=t.argument;return r=64===i.type?Identifier(e,i,void 0,1):createEvaluate(e,i),function(e){return typeof r(e)}}if(7===t.operator){var o,a=t.argument;if(39===a.type){var s=XInlineMemberExpressionAccessor(e,a,void 0);o=function(e){var t=s(e);return e.strict?t.strictDelete():t.delete()}}else o=64===a.type?function(t){if(t.strict)throw new SyntaxError(errorMessage.deleteUnqualified);for(var n=t,r=a.name;n&&!n.context[r];)n=n.parent;if(n){if(n.parent||1!==n.context[r].kind)return!1;var i=e.globalObjectAccessor.deleteProperty(r);return i&&delete n.context[r],i}return e.globalObjectAccessor.deleteProperty(r)}:combineCallable(createEvaluate(e,a),(function(){return!0}));return o}var u=t.argument,c=createEvaluate(e,u);return function(e){switch(t.operator){case 3:return!c(e);case 1:return+c(e);case 2:return-c(e);case 4:return~c(e);case 5:return void c(e);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function UpdateExpression(e,t,n){var r,i=t.argument;switch(i.type){case 64:r=function(e){return ZInlineIdentifierAccessor(i.name,e,0)};break;case 39:r=XInlineMemberExpressionAccessor(e,i,void 0);break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return function(e){var n,i=r(e),o=i.value;switch(t.operator){case 1:return n=o++,e.strict?i.strictSet(o):i.set(o),t.prefix?o:n;case 2:return n=o--,e.strict?i.strictSet(o):i.set(o),t.prefix?o:n;default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function BinaryExpression(e,t,n){var r=createEvaluate(e,t.left),i=createEvaluate(e,t.right);return function(e){var n=r(e),o=i(e);switch(t.operator){case 1:return n==o;case 2:return n!=o;case 3:return n===o;case 4:return n!==o;case 5:return n<o;case 6:return n<=o;case 7:return n>o;case 8:return n>=o;case 12:return n+o;case 13:return n-o;case 14:return n*o;case 16:return n/o;case 17:return n%o;case 22:return n instanceof o;case 18:return n|o;case 19:return n^o;case 20:return n&o;case 9:return n<<o;case 10:return n>>o;case 21:return n in o;case 11:return n>>>o;case 15:return Math.pow(n,o);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function AssignmentExpression(e,t,n){var r,i,o=createEvaluate(e,t.right),a=t.left;switch(a.type){case 64:r=function(t){var n;return(n=ZInlineIdentifierAccessor(a.name,t,t.strict?0:1))||(n=e.globalObjectAccessor.getProperty(a.name)),n};break;case 39:r=XInlineMemberExpressionAccessor(e,a,void 0);break;default:throw new SyntaxError(errorMessage.unexpectedToken)}return function(e){var n;if(!r)return i(e);n=r(e);var a=o(e);switch(t.operator){case 1:return e.strict?n.strictSet(a):n.set(a),n.value;case 2:return e.strict?n.strictSet(n.value+a):n.set(n.value+a),n.value;case 3:return e.strict?n.strictSet(n.value-a):n.set(n.value-a),n.value;case 4:return e.strict?n.strictSet(n.value*a):n.set(n.value*a),n.value;case 5:return e.strict?n.strictSet(n.value/a):n.set(n.value/a),n.value;case 6:return e.strict?n.strictSet(n.value%a):n.set(n.value%a),n.value;case 13:return e.strict?n.strictSet(n.value&a):n.set(n.value&a),n.value;case 11:return e.strict?n.strictSet(n.value|a):n.set(n.value|a),n.value;case 12:return e.strict?n.strictSet(n.value^a):n.set(n.value^a),n.value;case 8:return e.strict?n.strictSet(n.value<<a):n.set(n.value<<a),n.value;case 9:return e.strict?n.strictSet(n.value>>a):n.set(n.value>>a),n.value;case 10:return e.strict?n.strictSet(n.value>>>a):n.set(n.value>>>a),n.value;case 7:return e.strict?n.strictSet(Math.pow(n.value,a)):n.set(Math.pow(n.value,a)),n.value;default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function LogicalExpression(e,t,n){var r=createEvaluate(e,t.left),i=createEvaluate(e,t.right);return function(e){switch(t.operator){case 1:return r(e)||i(e);case 2:return r(e)&&i(e);default:throw new SyntaxError(errorMessage.unexpectedToken)}}}function XInlineMemberExpressionAccessor(e,t,n){var r=createEvaluate(e,t.object),i=t.computed?createEvaluate(e,t.property):function(){return t.property.name};return function(e){var t=r(e),n=i(e);return new PropertyAccessor(t,n)}}function MemberExpression(e,t,n,r){var i=createEvaluate(e,t.object);if(t.computed){var o=createEvaluate(e,t.property);return function(e){return i(e)[o(e)]}}var a=t.property.name;return function(e){return i(e)[a]}}function ConditionalExpression(e,t,n){var r=createEvaluate(e,t.test),i=createEvaluate(e,t.consequent),o=createEvaluate(e,t.alternate);return function(e){return r(e)?i(e):o(e)}}function CallExpression(e,t,n){var r,i,o,a=t.callee;39===a.type?(i=createEvaluate(e,a.object),o=a.computed?createEvaluate(e,a.property):function(){return a.property.name}):r=createEvaluate(e,a);var s=XInlineSpreadElement(e,t.arguments);return function(n){var u,c;if(39===a.type){c=i(n);var l=o(n);if("function"!=typeof(u=c[l]))throw createTypeErrorByMessage("notFunction",l)}else if("function"!=typeof(u=r(n))){var p;if(64===a.type)p=a.name;else try{p=JSON.stringify(u)}catch(e){p=""+u}throw createTypeErrorByMessage("notFunction",p)}var h=s(n),d=e.runtimeProfile;d.pushCallExpression(t);try{var f=functionPrototypeApply.call(u,c,h);return d.popCallExpression(),f}catch(e){throw d.popCallExpression(),e}}}function NewExpression(e,t){var n=t.callee,r=createEvaluate(e,n),i=XInlineSpreadElement(e,t.arguments);return function(o){var a=r(o),s=i(o),u=e.runtimeProfile;u.pushCallExpression(t);try{var c=void 0;switch(s.length){case 0:c=new a;break;case 1:c=new a(s[0]);break;case 2:c=new a(s[0],s[1]);break;case 3:c=new a(s[0],s[1],s[2]);break;default:c=new(a.bind.apply(a,__spreadArray([void 0],s,!1)))}return u.popCallExpression(),c}catch(e){throw 64===n.type&&(e.message=e.message.replace(/\bconstruct\$0\b/g,n.name)),u.popCallExpression(),e}}}function SequenceExpression(e,t,n){for(var r=t.expressions,i=[],o=0;o<r.length;o++)i[o]=createEvaluate(e,r[o]);return function(e){for(var n,r=t.expressions,o=0;o<r.length;o++)n=i[o](e);return n}}function ArrowFunctionExpression(e,t,n){var r=XCreateFunction(e,t);return function(e){return r(e)}}function TemplateLiteral(e,t,n){for(var r=[],i=[],o=t.quasis,a=t.expressions,s=0;s<o.length;s++)r[s]=TemplateElement(e,o[s]);for(s=0;s<a.length;s++)i[s]=createEvaluate(e,a[s]);return function(e){for(var t,n,o=r.slice(),a=i.slice(),s="";t=o.shift();)s+=t(e),(n=a.shift())&&(s+=n(e));return s}}function TaggedTemplateExpression(e,t,n){var r=createEvaluate(e,t.tag),i=t.quasi.expressions,o=[];if(i)for(var a=0;a<i.length;a++)o.push(createEvaluate(e,i[a]));return function(e){var n=r(e),i=t.quasi.quasis,a=i.map((function(e){return e.value.cooked})),s=i.map((function(e){return e.value.raw}));return defineProperty(a,"raw",{value:freeze(s)}),n.apply(void 0,__spreadArray([freeze(a)],o.map((function(t){return t(e)})),!1))}}function TemplateElement(e,t,n){return function(e){return t.value.raw}}function SpreadElement(e,t,n){var r=createEvaluate(e,t.argument);return function(e){return r(e)}}function ExpressionStatement(e,t,n){var r=createEvaluate(e,t.expression);return function(e){return r(e)}}function XInlineBlockStatement(e,t,n,r){var i=noop$1;var o=t.body.map((function(t){return createEvaluate(e,t)}));return function(e){var t=e;i(t);for(var n=0,r=o;n<r.length;n++){var a=(0,r[n])(t);if(isCompletionRecord(a))return a}}}function BlockStatement(e,t,n,r){var i=t.body.map((function(t){return createEvaluate(e,t)}));return function(e){var t=e;for(var n=0,r=i;n<r.length;n++){var o=(0,r[n])(t);if(isCompletionRecord(o))return o}}}function EmptyStatement(){return noop$1}function DebuggerStatement(e,t,n){return e.inspector?noop$1:function(){debugger}}function ReturnStatement(e,t,n){var r=t.argument?createEvaluate(e,t.argument):noop$1;return function(e){return C_COMPLETION_RETURN.value=r(e),C_COMPLETION_RETURN}}function BreakStatement(e,t){return function(){return C_COMPLETION_BREAK.value=t.label?t.label.name:null,C_COMPLETION_BREAK}}function ContinueStatement(e,t){return function(){return C_COMPLETION_CONTINUE.value=t.label?t.label.name:null,C_COMPLETION_CONTINUE}}function IfStatement(e,t,n){var r=createEvaluate(e,t.test),i=createEvaluate(e,t.consequent),o=t.alternate&&createEvaluate(e,t.alternate);return function(e){return r(e)?i(e):o?o(e):void 0}}function SwitchStatement(e,t,n){for(var r=createEvaluate(e,t.discriminant),i=[],o=[],a=t.cases,s=a.length,u=0;u<s;u++){var c=a[u];i[u]=c.test?createEvaluate(e,c.test):null,o[u]=SwitchCase(e,c,void 0)}return function(e){for(var n=r(e),a=!1,s=-1,u=t.cases,c=u.length,l=0;l<c;l++){var p=u[l];if(a||(p.test?i[l](e)===n&&(a=!0):s=l),a){var h=o[l](e);if(h===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(h===C_COMPLETION_CONTINUE||h===C_COMPLETION_RETURN)return h}!a&&l===c-1&&s>-1&&(l=s-1,a=!0)}}}function SwitchCase(e,t,n){for(var r=[],i=t.consequent,o=0;o<i.length;o++)r[o]=createEvaluate(e,i[o]);return function(e){for(var n=t.consequent,i=0;i<n.length;i++){var o=r[i](e);if(isCompletionRecord(o))return o}}}function ThrowStatement(e,t,n){var r=createEvaluate(e,t.argument);return function(e){throw r(e)}}function TryStatement(e,t,n){var r,i=XInlineBlockStatement(e,t.block,void 0,0),o=t.finalizer?XInlineBlockStatement(e,t.finalizer,void 0,0):noop$1,a=t.handler?CatchClause(e,t.handler,void 0):noop$1,s=noop$1,u=null===(r=t.handler)||void 0===r?void 0:r.param;if(u){var c=u.name;s=function(e,t){e.let(c,t)}}return function(n){var r;try{return r=i(n)}catch(i){if(t.handler){var u=new BlockRuntimeScope(e,n);return s(u,i),r=a(u)}throw i}finally{if(t.finalizer){var c=!1,l=void 0;isCompletionRecord(r)&&(c=!0,l=r.value);var p=o(n);if(isCompletionRecord(p))return p;c&&(r.value=l)}}}}function CatchClause(e,t,n){var r=XInlineBlockStatement(e,t.body,void 0,2);return function(e){return r(e)}}function WhileStatement(e,t,n,r){var i=createEvaluate(e,t.test),o=createEvaluate(e,t.body);return function(e){for(;i(e);){var t=o(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function DoWhileStatement(e,t,n,r){var i=createEvaluate(e,t.body),o=createEvaluate(e,t.test);return function(e){do{var t=i(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}while(o(e))}}function ForStatement(e,t,n,r){var i=t.init?createEvaluate(e,t.init):function(){},o=t.test?createEvaluate(e,t.test):function(){return!0},a=t.update?createEvaluate(e,t.update):function(){},s=t.body,u=76===s.type?XInlineBlockStatement(e,s,void 0,2):createEvaluate(e,s);return function(e){var t=e;for(i(t);o(t);a(t)){var n=u(e);if(n===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(n!==C_COMPLETION_CONTINUE){if(n===C_COMPLETION_RETURN)return n}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForInStatement(e,t,n,r){var i=createEvaluate(e,t.right),o=ForXHandler(e,t,void 0);return function(e){var t=i(e);for(var n in t){var a=o(e,n);if(a===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(a!==C_COMPLETION_CONTINUE){if(a===C_COMPLETION_RETURN)return a}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForOfStatement(e,t,n,r){var i=createEvaluate(e,t.right),o=ForXHandler(e,t,void 0);return function(e){for(var t=0,n=i(e);t<n.length;t++){var a=n[t],s=o(e,a);if(s===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(s!==C_COMPLETION_CONTINUE){if(s===C_COMPLETION_RETURN)return s}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForXHandler(e,t,n){var r,i=noop$1,o=t.left;if(17===o.type){var a=XInlineVariableDeclarationWithInitializer(e,o,void 0);i=function(e,t,n){return a(t,n)}}else{if(64!==o.type)throw new SyntaxError(errorMessage.unexpectedToken);i=function(t,n,r){var i=ZInlineIdentifierAccessor(o.name,t,t.strict?0:1);i||(i=e.globalObjectAccessor.getProperty(o.name)),t.strict?i.strictSet(r):i.set(r)}}var s=t.body;return r=76===s.type?XInlineBlockStatement(e,s,void 0,2):createEvaluate(e,s),function(e,t){var n=e;return i(e,n,t),r(n)}}function WithStatement(e,t,n){var r,i=createEvaluate(e,t.object),o=t.body;return r=76===o.type?combineCallable(XRuntimeScopeHoist(e,o,void 0,0),XInlineBlockStatement(e,o,void 0,3)):createEvaluate(e,o),function(t){var n=i(t);if(null==n)throw new TypeError(errorMessage.convertNullToObject);var o=new WithRuntimeScope(e,t,Object(n));return r(o)}}function LabeledStatement(e,t,n){var r,i=t.label.name,o=t.body;switch(o.type){case 8:r=ForStatement(e,o,void 0,i);break;case 6:r=ForInStatement(e,o,void 0,i);break;case 7:r=ForOfStatement(e,o,void 0,i);break;case 4:r=DoWhileStatement(e,o,void 0,i);break;case 15:r=WhileStatement(e,o,void 0,i);break;default:r=createEvaluate(e,t.body)}return function(e){var t=r(e);if(t!==C_COMPLETION_BREAK||C_COMPLETION_BREAK.value!==i)return t}}var visitor$1=[null,BreakStatement,ContinueStatement,DebuggerStatement,DoWhileStatement,ExpressionStatement,ForInStatement,ForOfStatement,ForStatement,IfStatement,LabeledStatement,ReturnStatement,SwitchStatement,ThrowStatement,TryStatement,WhileStatement,WithStatement,VariableDeclaration,null,null,null,null,null,null,null,null,null,null,null,null,ArrayExpression,ArrowFunctionExpression,AssignmentExpression,BinaryExpression,CallExpression,ConditionalExpression,FunctionExpression,SequenceExpression,LogicalExpression,MemberExpression,NewExpression,ObjectExpression,TaggedTemplateExpression,ThisExpression,UnaryExpression,UpdateExpression,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,CatchClause,FunctionDeclaration,Identifier,Literal,null,Program,null,null,null,SwitchCase,TemplateElement,TemplateLiteral,VariableDeclarator,EmptyStatement,BlockStatement];function createEvaluate(e,t){var n=t.type;if(65===n){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var r=t.regex,i=r.pattern,o=r.flags;return function(){return new RegExp(i,o)}}return function(){return t.value}}var a=e.inspector;try{var s=visitor$1[n];if(s){var u=s(e,t,void 0,0);return function(n){a&&a.hitBreakpoint(e.runtimeProfile.scriptId,t);try{return u(n)}catch(n){var r=e.runtimeProfile;throw r.rewriteErrorStack(r.scriptId,n,t),a&&a.shouldPauseOnException(r.scriptId,n,t,!1),n}}}throw new Error("".concat(errorMessage.unexpectedToken,"(").concat(n,")"))}catch(n){var c=e.runtimeProfile;throw c.rewriteErrorStack(c.scriptId,n,t),a&&a.shouldPauseOnException(c.scriptId,n,t,!1),n}}var ArrayPush=Function.prototype.apply.call.bind(Array.prototype.push),ArrayPop=Function.prototype.apply.call.bind(Array.prototype.pop),RuntimeProfile=function(){function e(){this.callFrameCountId=1,this.scriptCountId=1,this.exceptionId=1,this.callFrames=[],this.callExpressionStack=[],this.scriptId="1",this.scriptMap={}}return e.prototype.getNextScriptId=function(){return"".concat(this.scriptCountId++)},e.prototype.getNextExceptionId=function(){return this.exceptionId++},e.prototype.pushCallFrame=function(e){ArrayPush(this.callFrames,{functionName:e.functionName,functionScope:e.functionScope,functionNode:e.functionNode,scriptId:this.scriptId,callFrameIdx:this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()})},e.prototype.getCallFrameId=function(e){return"10000.1.".concat(e.callFrameIdx)},e.prototype.popCallFrame=function(){ArrayPop(this.callFrames)},e.prototype.pushCallExpression=function(e){ArrayPush(this.callExpressionStack,e)},e.prototype.popCallExpression=function(){ArrayPop(this.callExpressionStack)},e.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},e.prototype.rewriteErrorStack=function(e,t,n){var r=this;if(t instanceof Error&&!getBoatmanSymbol(t,"__rewrittenzxcd")){var i=this.scriptMap[e]?this.scriptMap[e].url:"",o=this.callFrames.map((function(e,t){var o,a,s=r.callFrames[t+1];if(s?s.callExpressionNode&&(o=s.callExpressionNode.loc.start.line,a=s.callExpressionNode.loc.start.column+1):(o=n.loc.start.line,a=n.loc.start.column+1),void 0===o)return" at <anonymous>";var u="".concat(i&&"anonymous"!==i?i:"<anonymous>",":").concat(o,":").concat(a);return e.functionName?" at ".concat(e.functionName," (").concat(u,")"):" at ".concat(u)})).reverse().join("\n");t.stack="".concat(t.name,": ").concat(t.message)+"\n"+o,setBoatmanSymbol(t,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:n})}},e}(),Boatman=function(){function e(e){if(void 0===e&&(e={}),this.options=e,this.runtimeProfile=new RuntimeProfile,this.disableBreaks=!1,this.runQueue=[],e.sandbox){var t=e.sandboxGlobalObjectCreator?e.sandboxGlobalObjectCreator():createSandbox();this.globalObjectAccessor=new GlobalObjectAccessor(t),(n=new GlobalRuntimeScope(this,t)).const("this",t),n.var("self",t),n.const("exports",this.exports={}),this.globalScope=n}else{var n;this.globalObjectAccessor=new GlobalObjectAccessor(hostGlobalObject),(n=new GlobalRuntimeScope(this,hostGlobalObject)).const("this",hostGlobalObject),n.var("self",hostGlobalObject),this.globalScope=n}}return e.prototype.import=function(e){if("object"==typeof e){var t=this.globalScope.context;getOwnPropertyNames(e).forEach((function(n){t[n]=new VariableAccessor(1,e[n])}))}},e.prototype.doRun=function(e){var t,n=this.runtimeProfile,r=e.scriptId,i=e.previousScriptId,o=e.ast,a=e.code,s=e.scriptUrl;n.scriptId=r,this.inspector&&this.inspector.evaluateScript(r,a,o,s);try{var u=createEvaluate(this,o)(this.globalScope);return n.scriptId=i,u}catch(e){if(n.scriptId=i,this.inspector){var c=getBoatmanSymbol(e,"__rewrittenzxcd");c&&c.node&&(this.inspector.shouldPauseOnException(r,e,c.node,!0),this.inspector.throwException(e))}throw e}finally{null===(t=this.inspector)||void 0===t||t.replayQueueEvent()}},e.prototype.queue=function(e,t){var n,r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId,a=i.getNextScriptId(),s=t||"anonymous";i.scriptId=a,i.scriptMap[a]={scriptId:a,url:s},null===(n=this.inspector)||void 0===n||n.startQueueEvent(),this.runQueue.push({scriptUrl:s,scriptId:a,previousScriptId:o,ast:r,code:e})},e.prototype.run=function(e,t,n){var r=this;if(void 0===n&&(n={}),this.queue(e,t),this.inspector&&n.waitingForDebuggerToAttach&&!this.inspector.isDebuggerAttached)return log("Waiting for inspector to be ready..."),this.inspector.whenDebuggerAttached.then((function(){log("Inspector is ready, run user code"),r.runInSchedule()}));this.runInSchedule()},e.prototype.runInSchedule=function(){var e=this.runQueue;this.runQueue=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.doRun(r)}},e.prototype.evaluate=function(e,t,n){var r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId;i.scriptId=i.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(i.scriptId,e,r,"");var a=t||this.globalScope;this.disableBreaks=Boolean(null==n?void 0:n.disableBreaks);try{var s=createEvaluate(this,r)(a);return i.scriptId=o,s}catch(e){throw i.scriptId=o,e}finally{this.disableBreaks=!1}},e.prototype.setInspector=function(e){this.inspector=e,e.setEngine(this),e.connect()},e.prototype.getRuntimeStatus=function(){var e=this.runtimeProfile;return{scriptId:e.scriptId,scriptMap:e.scriptMap,callFrames:e.callFrames,callExpressionNode:e.getCurrentCallExpression()}},e.prototype.getHostGlobalObject=function(){return hostGlobalObject},e.prototype.createScope=function(e){return void 0===e&&(e=null),new RuntimeScope(this,e||this.globalScope)},e}(),_a,EVisitorHelperMethod;function findNode(e,t){!function e(n,r,i){!r.found&&t(n,r)&&visitor[i||n.type](n,r,e)}(e,{found:!1})}function skipThrough(e,t,n){n(e,t)}function noop(){}!function(e){e.Statement="Statement",e.Expression="Expression",e.MemberPattern="MemberPattern",e.VariablePattern="VariablePattern",e.Class="Class",e.ForInit="ForInit",e.Function="Function",e.Pattern="Pattern"}(EVisitorHelperMethod||(EVisitorHelperMethod={}));var visitor=(_a={Statement:skipThrough,Expression:skipThrough,MemberPattern:skipThrough,VariablePattern:noop,Class:function(e,t,n){e.id&&n(e.id,t,EVisitorHelperMethod.Pattern),e.superClass&&n(e.superClass,t,EVisitorHelperMethod.Expression),n(e.body,t)},ForInit:function(e,t,n){17===e.type?n(e,t):n(e,t,EVisitorHelperMethod.Expression)},Function:function(e,t,n){"id"in e&&e.id&&n(e.id,t,EVisitorHelperMethod.Pattern);for(var r=0,i=e.params;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Pattern)}n(e.body,t,"expression"in e&&e.expression?EVisitorHelperMethod.Expression:EVisitorHelperMethod.Statement)},Pattern:function(e,t,n){64===e.type?n(e,t,EVisitorHelperMethod.VariablePattern):39===e.type?n(e,t,EVisitorHelperMethod.MemberPattern):n(e,t)}},_a[75]=noop,_a[1]=noop,_a[2]=noop,_a[3]=noop,_a[72]=noop,_a[43]=noop,_a[87]=noop,_a[89]=noop,_a[81]=noop,_a[79]=noop,_a[80]=noop,_a[64]=noop,_a[65]=noop,_a[76]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[5]=function(e,t,n){n(e.expression,t,EVisitorHelperMethod.Expression)},_a[9]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Statement),e.alternate&&n(e.alternate,t,EVisitorHelperMethod.Statement)},_a[10]=function(e,t,n){n(e.body,t,EVisitorHelperMethod.Statement)},_a[16]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[12]=function(e,t,n){n(e.discriminant,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.cases;r<i.length;r++){var o=i[r];o.test&&n(o.test,t,EVisitorHelperMethod.Expression);for(var a=0,s=o.consequent;a<s.length;a++){n(s[a],t,EVisitorHelperMethod.Statement)}}},_a[71]=function(e,t,n){e.test&&n(e.test,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.consequent;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[11]=function(e,t,n){e.argument&&n(e.argument,t,EVisitorHelperMethod.Expression)},_a[13]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[14]=function(e,t,n){n(e.block,t,EVisitorHelperMethod.Statement),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,EVisitorHelperMethod.Statement)},_a[62]=function(e,t,n){e.param&&n(e.param,t,EVisitorHelperMethod.Pattern),n(e.body,t,EVisitorHelperMethod.Statement)},_a[15]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[8]=function(e,t,n){e.init&&n(e.init,t,EVisitorHelperMethod.ForInit),e.test&&n(e.test,t,EVisitorHelperMethod.Expression),e.update&&n(e.update,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[6]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.ForInit),n(e.right,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[63]=function(e,t,n){n(e,t,EVisitorHelperMethod.Function)},_a[17]=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r++){n(i[r],t)}},_a[74]=function(e,t,n){n(e.id,t,EVisitorHelperMethod.Pattern),e.init&&n(e.init,t,EVisitorHelperMethod.Expression)},_a[69]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Pattern)},_a[60]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Pattern)}},_a[66]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){var o=i[r];68===o.type?(o.computed&&n(o.key,t,EVisitorHelperMethod.Expression),n(o.value,t,EVisitorHelperMethod.Pattern)):69===o.type&&n(o.argument,t,EVisitorHelperMethod.Pattern)}},_a[30]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Expression)}},_a[41]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){n(i[r],t)}},_a[37]=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[73]=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r++){n(i[r],t)}for(var o=0,a=e.expressions;o<a.length;o++){n(a[o],t,EVisitorHelperMethod.Expression)}},_a[44]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[33]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Expression),n(e.right,t,EVisitorHelperMethod.Expression)},_a[32]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Pattern),n(e.right,t,EVisitorHelperMethod.Expression)},_a[35]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Expression),n(e.alternate,t,EVisitorHelperMethod.Expression)},_a[40]=function(e,t,n){if(n(e.callee,t,EVisitorHelperMethod.Expression),e.arguments)for(var r=0,i=e.arguments;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[39]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),e.computed&&n(e.property,t,EVisitorHelperMethod.Expression)},_a[84]=function(e,t,n){e.declaration&&n(e.declaration,t,84===e.type||e.declaration&&"id"in e.declaration&&e.declaration.id?EVisitorHelperMethod.Statement:EVisitorHelperMethod.Expression),e.source&&n(e.source,t,EVisitorHelperMethod.Expression)},_a[82]=function(e,t,n){e.exported&&n(e.exported,t),n(e.source,t,EVisitorHelperMethod.Expression)},_a[78]=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r++){n(i[r],t)}n(e.source,t,EVisitorHelperMethod.Expression)},_a[90]=function(e,t,n){n(e.source,t,EVisitorHelperMethod.Expression)},_a[42]=function(e,t,n){n(e.tag,t,EVisitorHelperMethod.Expression),n(e.quasi,t,EVisitorHelperMethod.Expression)},_a[86]=function(e,t,n){n(e,t,EVisitorHelperMethod.Class)},_a[88]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t)}},_a[95]=function(e,t,n){e.computed&&n(e.key,t,EVisitorHelperMethod.Expression),n(e.value,t,EVisitorHelperMethod.Expression)},_a);function isFunction(e){return"function"==typeof e}function isBreakableNode(e){return!!getBoatmanSymbol(e,"__can_breakpointasxu")||e.type<30}function findPossibleBreakpoints(e,t,n,r){var i=n||{lineNumber:t.lineNumber+1,columnNumber:0},o=[];return findNode(e.ast,(function(e,n){if(e.loc){var a={startLineNumber:e.loc.start.line-1,startColumnNumber:e.loc.start.column,endLineNumber:e.loc.end.line-1,endColumnNumber:e.loc.end.column};return a.endLineNumber<t.lineNumber||a.startLineNumber>i.lineNumber||a.endLineNumber===t.lineNumber&&a.endColumnNumber<=t.columnNumber||a.startLineNumber===i.lineNumber&&a.startColumnNumber>=i.columnNumber?(o.length&&(n.found=!0),!1):(37===e.type&&e.expressions.forEach((function(e,t){t&&e.type<60&&setBoatmanSymbol(e,"__can_breakpointasxu",!0)})),a.startLineNumber>t.lineNumber||a.startLineNumber===t.lineNumber&&a.startColumnNumber>=t.columnNumber?(isBreakableNode(e)&&-1===o.indexOf(e)&&o.push(e),!(r&&r.limit&&o.length>=r.limit)||(n.found=!0,!1)):!o.length||(n.found=!0,!1))}})),o}function resolveCallArguments(e,t){var n=[],r=e.getRemoteObjectParser();return t&&t.forEach((function(e){if(e.unserializableValue)n.push(parseUnserializableValue(e.unserializableValue));else if(e.objectId){var t=e.objectId?r.getObjectById(e.objectId):null;n.push(t)}else n.push(e.value)})),n}visitor[67]=visitor[76],visitor[91]=visitor[5],visitor[92]=visitor[93]=visitor[11],visitor[70]=visitor[13],visitor[4]=visitor[15],visitor[7]=visitor[6],visitor[36]=visitor[31]=visitor[63],visitor[45]=visitor[44],visitor[38]=visitor[33],visitor[61]=visitor[32],visitor[34]=visitor[40],visitor[83]=visitor[84],visitor[94]=visitor[86],visitor[68]=visitor[95];var precisionTimestampBasis=0;function resetPrecisionTimestampBasis(){precisionTimestampBasis=Date.now()-getPrecisionTimestamp()}var getPrecisionTimestamp="function"==typeof __nativeGetHighResolutionTime__?function(){return __nativeGetHighResolutionTime__()+precisionTimestampBasis}:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()+precisionTimestampBasis}:function(){return Date.now()};function format(e,t){switch(e){case"%s":return String(t);case"%d":return"symbol"==typeof t?NaN:Number(t);case"%i":return"symbol"==typeof t?NaN:parseInt(t,10);case"%f":return"symbol"==typeof t?NaN:parseFloat(t);default:return t}}function formatter(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length<=1)return e;var n=e[0];if("string"!=typeof n)return e;var r=e[1],i=n.match(/%[sdifoOc]/);if(!i)return e;if(i){var o=i.index;if(void 0===o)return e;var a=n.slice(0,o),s=n.slice(o+2);return __spreadArray([a,format(i[0],r),s],e.slice(2),!0)}return e}function generateConsoleAPICalledProtocol(e,t,n){var r,i;t=Array.from(t);var o=n.getRemoteObjectParser(),a=n.getSessionState(),s=n.getEngine().getRuntimeStatus(),u=null!==(r=s.scriptMap[s.scriptId])&&void 0!==r?r:{scriptId:s.scriptId,url:""},c=s.callExpressionNode,l=[];u&&c&&(l=s.callFrames.map((function(e,t){var n=s.callFrames[t+1];return n?{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:n.functionNode.loc.start.line-1,columnNumber:n.functionNode.loc.start.column}:{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:c.loc.start.line-1,columnNumber:c.loc.start.column}})).reverse()),"trace"===e&&0===l.length&&(l=[{functionName:"",scriptId:u.scriptId,url:u.url,lineNumber:0,columnNumber:0}]);var p=null!==(i={warn:"warning",group:"startGroup",groupEnd:"endGroup",groupCollapsed:"startGroupCollapsed",countReset:"warning"}[e])&&void 0!==i?i:e;return{method:RuntimeEvent.consoleAPICalled,params:{type:p,args:Array.from(t).map((function(t){return o.parseObject(t,e)})),executionContextId:a.executionContextId,timestamp:getPrecisionTimestamp(),stackTrace:{callFrames:l}}}}function tryExtractMessageSummary(e){var t;if(!e)return"";var n=e.method;if(!n)return"";if(n===RuntimeEvent.consoleAPICalled){var r=null===(t=e.params)||void 0===t?void 0:t.args;if(r&&Array.isArray(r)&&r.length>0)return": "+JSON.stringify(r[0]).slice(1,100)+"..."}return""}function sendConsoleAPICalled(e,t,n){var r=n.getProtocolConnection(),i=generateConsoleAPICalledProtocol(e,t,n);JSON.stringify(i).length>2e7?r.sendConsoleMessage(generateConsoleAPICalledProtocol("warn",[n.i18n.formatWithPrefix("consoleContentTooLarge")+tryExtractMessageSummary(i)],n)):r.sendConsoleMessage(i)}function getLabel(e){return e?String(e):"default"}var DefaultMap=function(){function e(e){this.defaultValue=e,this.dict={}}return e.prototype.get=function(e){return e in this.dict||(this.dict[e]=this.defaultValue()),this.dict[e]},e}(),ConsoleImpl=function(){function e(e){this.container=e,this.metaMapById=new DefaultMap((function(){return{countMap:{},timerTable:{}}}))}return e.prototype._getRuntimeMeta=function(){var e=this.container.getSessionState().executionContextId;return this.metaMapById.get(String(e))},e.prototype._getCountMap=function(){return this._getRuntimeMeta().countMap},e.prototype._getTimerTable=function(){return this._getRuntimeMeta().timerTable},e.prototype.assert=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e||sendConsoleAPICalled("assert",t,this.container)},e.prototype.clear=function(){this.sendEmptyConsoleAPICalled("clear")},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("debug",e,this.container)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("error",e,this.container)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("info",e,this.container)},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("log",e,this.container)},e.prototype.table=function(e,t){sendConsoleAPICalled("table",[e,t],this.container)},e.prototype.trace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("trace",e,this.container)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("warn",e,this.container)},e.prototype.dir=function(e,t){sendConsoleAPICalled("dir",[e,t],this.container)},e.prototype.dirxml=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.count=function(e){var t=this._getCountMap(),n=t[e=getLabel(e)]=(t[e]||0)+1;sendConsoleAPICalled("count",["".concat(e,": ").concat(n)],this.container)},e.prototype.countReset=function(e){var t=this._getCountMap();(e=getLabel(e))in t?t[e]=0:sendConsoleAPICalled("countReset",["Count for '".concat(e,"' does not exist")],this.container)},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.group";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("group",[n],this.container)},e.prototype.groupCollapsed=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.groupCollapsed";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("groupCollapsed",[n],this.container)},e.prototype.groupEnd=function(){sendConsoleAPICalled("groupEnd",["console.groupEnd"],this.container)},e.prototype.time=function(e){var t=this._getTimerTable();(e=getLabel(e))in t?sendConsoleAPICalled("warn",["Timer '".concat(e,"' has already been started.")],this.container):t[e]=getPrecisionTimestamp()},e.prototype.timeLog=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this._getTimerTable()[e=getLabel(e)];if(void 0!==r){var i=round(getPrecisionTimestamp()-r,5);sendConsoleAPICalled("timeLog",__spreadArray(["".concat(e,": ").concat(i,"ms")],t,!0),this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.timeEnd=function(e){var t=this._getTimerTable(),n=t[e=getLabel(e)];if(void 0!==n){delete t[e];var r=round(getPrecisionTimestamp()-n,5);sendConsoleAPICalled("timeEnd",["".concat(e,": ").concat(r,"ms")],this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.sendEmptyConsoleAPICalled=function(e){sendConsoleAPICalled(e,["console.".concat(e)],this.container)},e}();function round(e,t){return void 0===t&&(t=0),Number("".concat(Math.round(Number("".concat(e,"e").concat(t))),"e-").concat(t))}var proxyMethodKeys=["debug","assert","log","info","warn","error","table","dir","trace","group","groupCollapsed","groupEnd","clear","count","countReset","time","timeEnd","timeLog"];function createReplacement(e,t){var n="object"==typeof console&&console[e]?console[e].bind(console):function(){};function r(){var r=arguments;if("string"==typeof r[0]&&/^(\[framework\]|dispatchEvent|onMessage push|\[boatman\])/.test(r[0]))return n.apply(null,r);try{var i=t.getConsole();i[e].apply(i,r)}catch(t){debug$1("console replacement",e,t)}return n.apply(null,r)}return defineProperty(r,"toString",{value:function(){return"function ".concat(e,"() { [native code] }")},writable:!0,configurable:!0}),r}function overrideGlobalConsole(e){proxyMethodKeys.forEach((function(t){var n=getOwnPropertyDescriptor(console,t);n&&n.configurable?(n.value=createReplacement(t,e),defineProperty(console,t,n)):defineProperty(console,t,{value:createReplacement(t,e),configurable:!0,enumerable:!0,writable:!0})}))}function createConsoleProxy(e,t){t||(t="object"==typeof console?console:null);var n={};return proxyMethodKeys.forEach((function(t){n[t]={configurable:!0,enumerable:!0,writable:!0,value:createReplacement(t,e)}})),createObject(t,n)}function hookPromiseRejectionCallback(e,t){var n=e.getHostGlobalObject(),r=n.onunhandledrejection,i=function(e){isFunction(r)&&r.call(this,e),e&&e.reason&&t.throwException(e.reason,2)},o="onunhandledrejection",a=getOwnPropertyDescriptor(n,o);a&&!a.configurable||defineProperty(n,o,{get:function(){return i},set:function(e){isFunction(e)&&(r=e,a&&a.set&&a.set.call(this,e))},enumerable:!0,configurable:!0})}var BreakpointItem=function(){function e(e,t,n){this.manager=e,this.targetNode=n,this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber||0,this.scriptId=t.scriptId,this.id="".concat(this.scriptId,":").concat(this.lineNumber,":").concat(this.columnNumber),this.condition=t.condition,setBoatmanSymbol(n,"__breakpointzxfg",this.id)}return e.prototype.destroy=function(){setBoatmanSymbol(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},e}();function enable$2(e,t,n){n(null,{});var r=e.getProtocolConnection().connectionState;r.debuggerDomainEnabled||(r.enableDebuggerDomain(),e.getScriptManager().emitAllScriptParsedEvents())}function disable$1(e,t,n){e.getProtocolConnection().connectionState.disableDebuggerDomain(),n(null,{})}function setBreakpointsActive(e,t,n){var r=e.getBreakpointManager();t.active?(r.activate(),r.isActive4UserManual=!0):(r.inactivate(),r.isActive4UserManual=!1),n(null,{})}function getPossibleBreakpoints(e,t,n){var r=t.start.scriptId,i=e.getScriptManager().getScript(r);if(i){var o=[];findPossibleBreakpoints(i,t.start,t.end).forEach((function(e){o.push({columnNumber:e.loc.start.column,lineNumber:e.loc.start.line-1,scriptId:r})})),n(null,{locations:o})}else n(EDevtoolProtocolErrorCode.NormalError)}function setBreakpointByUrl(e,t,n){var r,i=e.getScriptManager();if(t.url?r=i.getScriptByUrl(t.url):t.scriptHash&&(r=i.getScriptByHash(t.scriptHash)),r){for(var o,a=0;!o&&a<20;)o=findPossibleBreakpoints(r,{lineNumber:t.lineNumber+a,columnNumber:t.columnNumber||0},null,{limit:1})[0],a+=1;if(!o)return n(EDevtoolProtocolErrorCode.NormalError,"[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a)),void warn$1("[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a));var s=e.getBreakpointManager().setBreakpoint({scriptId:r.scriptId,lineNumber:o.loc.start.line-1,columnNumber:o.loc.start.column,condition:t.condition},o);n(null,{breakpointId:s.id,locations:[{scriptId:s.scriptId,lineNumber:s.lineNumber,columnNumber:s.columnNumber}]})}else n(EDevtoolProtocolErrorCode.NormalError,"Script Not Found")}function removeBreakpoint(e,t,n){var r=t.breakpointId;r&&e.getBreakpointManager().removeBreakpoint(r),n(null,{})}function resume(e,t,n){n(null,{})}function pause(e,t,n){e.getBreakpointManager().pauseOnNextStatement=!0,n(null,{})}function stepInto(e,t,n){e.getBreakpointManager().stepAction=3,n(null,{})}function stepOut(e,t,n){e.getBreakpointManager().stepAction=1,n(null,{})}function stepOver(e,t,n){e.getBreakpointManager().stepAction=2,n(null,{})}function getScriptSource(e,t,n){var r=e.getScriptManager().getScript(t.scriptId);r?n(null,{scriptSource:r.source}):n(EDevtoolProtocolErrorCode.NormalError)}function evaluateOnCallFrame(e,t,n){var r,i=t.callFrameId,o=e.getEngine();if(o.getRuntimeStatus().callFrames.some((function(e){if(o.runtimeProfile.getCallFrameId(e)===i)return r=e,!0})),r){var a=e.getRemoteObjectParser();try{var s=e.getEngine().evaluate(t.expression,r.functionScope);n(null,{result:a.parseObject(s)})}catch(e){var u=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:a.parseObject(e),exceptionId:u?u.id:100,lineNumber:0,text:"Uncaught"},result:a.parseObject(e)})}}else n(EDevtoolProtocolErrorCode.NormalError)}function setPauseOnExceptions(e,t,n){switch(t.state){case"all":e.getBreakpointManager().pauseOnExceptionsState=2;break;case"uncaught":e.getBreakpointManager().pauseOnExceptionsState=1;break;case"none":e.getBreakpointManager().pauseOnExceptionsState=0}n(null,{})}function setSkipAllPauses(e,t,n){n(null,{})}var _debugger=Object.freeze({__proto__:null,disable:disable$1,enable:enable$2,evaluateOnCallFrame:evaluateOnCallFrame,getPossibleBreakpoints:getPossibleBreakpoints,getScriptSource:getScriptSource,pause:pause,removeBreakpoint:removeBreakpoint,resume:resume,setBreakpointByUrl:setBreakpointByUrl,setBreakpointsActive:setBreakpointsActive,setPauseOnExceptions:setPauseOnExceptions,setSkipAllPauses:setSkipAllPauses,stepInto:stepInto,stepOut:stepOut,stepOver:stepOver});function enable$1(e,t,n){n(null,{});var r=e.getSessionState(),i=r.executionContextId,o=r.executionContextName,a=e.getProtocolConnection();a.connectionState.enableRuntimeDomain(),a.send({method:RuntimeEvent.executionContextCreated,params:{context:{id:i,origin:"app://",name:o}}})}function disable(e,t,n){e.getProtocolConnection().connectionState.disableRuntimeDomain(),n(null,{})}function getProperties(e,t,n){var r=e.getRemoteObjectParser().getProperties(t),i=e.getRemoteObjectParser().getObjectById(t.objectId);if(isFunction(i)){var o=getBoatmanSymbol(i,"___func_locationxasdzzy");if(o){var a=o.node,s=o.scriptId,u=a.id;r.internalProperties=__spreadArray([{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:s,lineNumber:(u?u.loc.start.line:a.loc.start.line)-1,columnNumber:u?u.loc.start.column:a.loc.start.column}}}],r.internalProperties||[],!0)}}n(null,r)}function callFunctionOn(e,t,n){var r=e.getRemoteObjectParser();if(t.functionDeclaration){var i=t.objectId?r.getObjectById(t.objectId):null,o=resolveCallArguments(e,t.arguments);if(i){var a=function(e){t.slient||n(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(e),exceptionId:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(e)})};if(0===t.functionDeclaration.indexOf("function invokeGetter(arrayStr)")||-1!==t.functionDeclaration.indexOf("let t=this;const n=JSON.parse(e);for(let e=0,i=n.length;e<i;++e)t=t[n[e]]"))try{var s=JSON.parse(t.arguments[0].value),u=i;return s.forEach((function(e){u=u[e]})),void n(null,{result:r.parseObject(u)})}catch(e){a(e)}else try{var c=e.getEngine().createScope();c.const("__obj",i),c.const("__args",o);var l=e.getEngine().evaluate("(".concat(t.functionDeclaration,").apply(__obj, __args)"),c);n(null,{result:t.returnByValue?{type:"object",value:l}:r.parseObject(l)})}catch(e){a(e)}}}}function evaluate(e,t,n){var r=t.disableBreaks||t.throwOnSideEffect,i=e.getRemoteObjectParser(),o=e.getBreakpointManager();try{var a=r?o.evaluateWithoutBreakpoint(t.expression):e.getEngine().evaluate(t.expression);n(null,{result:i.parseObject(a)})}catch(e){var s=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:i.parseObject(e),exceptionId:s?s.id:100,lineNumber:0,text:"Uncaught"},result:i.parseObject(e)})}}function compileScript(e,t,n){n(null,{})}function releaseObjectGroup(e,t,n){n(null,{})}function globalLexicalScopeNames(e,t,n){n(null,{names:[]})}function runIfWaitingForDebugger(e,t,n){n(null,{}),e.getProtocolConnection().connectionState.handleDebuggerAttached()}var runtime=Object.freeze({__proto__:null,callFunctionOn:callFunctionOn,compileScript:compileScript,disable:disable,enable:enable$1,evaluate:evaluate,getProperties:getProperties,globalLexicalScopeNames:globalLexicalScopeNames,releaseObjectGroup:releaseObjectGroup,runIfWaitingForDebugger:runIfWaitingForDebugger});function enable(e,t,n){e.getProtocolConnection().connectionState.enablePageDomain(),n(null,{})}function getResourceTree(e,t,n){e.getProtocolConnection().connectionState.enablePageResourceTree(),n(null,{})}var page=Object.freeze({__proto__:null,enable:enable,getResourceTree:getResourceTree}),Handlers=Object.freeze({__proto__:null,Debugger:_debugger,Page:page,Runtime:runtime}),INITIAL_STATE={pageDomainEnabled:!1,runtimeDomainEnabled:!1,debuggerDomainEnabled:!1,getResourceTreeRequested:!1},ConnectionState=function(){function e(){this.consoleReadyCallbacks=[],this.whenDebuggerAttachedQueue=new WhenReadyQueue,this.state=__assign({},INITIAL_STATE),this.whenDebuggerDomainEnabledQueue=new WhenReadyQueue}return Object.defineProperty(e.prototype,"debuggerDomainEnabled",{get:function(){return this.state.debuggerDomainEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeDomainEnabled",{get:function(){return this.state.runtimeDomainEnabled},enumerable:!1,configurable:!0}),e.prototype.enablePageDomain=function(){this.state.pageDomainEnabled=!0,this.checkConsoleReady()},e.prototype.enableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!0,this.checkConsoleReady()},e.prototype.disableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!1},e.prototype.onDebuggerDomainEnabled=function(e){this.whenDebuggerDomainEnabledQueue.push(e)},e.prototype.enableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!0,this.whenDebuggerDomainEnabledQueue.activate()},e.prototype.disableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!1,this.whenDebuggerDomainEnabledQueue.deactivate()},e.prototype.enablePageResourceTree=function(){this.state.getResourceTreeRequested=!0,this.checkConsoleReady()},e.prototype.reset=function(){this.state=__assign({},INITIAL_STATE)},e.prototype.onConsoleReady=function(e){this.consoleReadyCallbacks.push(e)},e.prototype.offConsoleReady=function(e){var t=this.consoleReadyCallbacks.indexOf(e);t>-1&&this.consoleReadyCallbacks.splice(t,1)},e.prototype.checkConsoleReady=function(){var e=this;this.state.runtimeDomainEnabled&&this.state.pageDomainEnabled&&this.state.getResourceTreeRequested&&setTimeout((function(){e.consoleReadyCallbacks.forEach((function(e){e()}))}),0)},e.prototype.onDebuggerAttached=function(e){this.whenDebuggerAttachedQueue.push(e)},e.prototype.handleDebuggerAttached=function(){this.whenDebuggerAttachedQueue.activate()},e}(),WhenReadyQueue=function(){function e(){this.queue=[],this.ready=!1}return e.prototype.push=function(e){this.ready?e():this.queue.push(e)},e.prototype.runQueue=function(){this.queue.forEach((function(e){e()})),this.queue=[]},e.prototype.activate=function(){this.runQueue(),this.ready=!0},e.prototype.deactivate=function(){this.ready=!1,this.runQueue()},e}(),ProtocolConnection=function(){function e(e){var t=this;this.container=e,this.messagesBeforeRuntimeEnabled=[],this.consoleReady=!1,this.messagesBeforeWebsocketOpened=[],this.connectionState=new ConnectionState,this.connectionState.onConsoleReady((function(){t.consoleReady=!0,t.messagesBeforeRuntimeEnabled.length&&(t.messagesBeforeRuntimeEnabled.forEach((function(e){t.send(e)})),t.messagesBeforeRuntimeEnabled=[])})),setTimeout((function(){t.consoleReady=!0}),1e4)}return Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakpointManager",{get:function(){return this.container.getBreakpointManager()},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e,t;return __awaiter(this,void 0,void 0,(function(){var n,r,i=this;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.sessionState.resolveExternalStateOnStart()];case 1:return n=o.sent()[0],this.ws=new(this.container.getWebSocketClientImpl()),n?(r="".concat(this.container.server4WebSocket,"/bugme/client_w/").concat(n),this.ws.setUrl(r),this.ws.setSocketMessageHandler(this.onSocketMessage.bind(this)),this.ws.open(),this.messagesBeforeWebsocketOpened.length&&(this.messagesBeforeWebsocketOpened.forEach((function(e){i.ws.send(e)})),this.messagesBeforeWebsocketOpened=[])):null===(t=(e=this.ws).showError)||void 0===t||t.call(e,"no-valid-channel-id"),[2]}}))}))},e.prototype.close=function(){this.ws&&this.ws.close()},e.prototype.send=function(e){this.ws?this.ws.send(e):this.messagesBeforeWebsocketOpened.push(e)},e.prototype.sendConsoleMessage=function(e){this.consoleReady?this.send(e):this.messagesBeforeRuntimeEnabled.push(e)},e.prototype.onFrontendJoin=function(){this.breakpointManager.activate()},e.prototype.onFrontendLeave=function(){this.breakpointManager.inactivate(),this.connectionState.reset(),this.consoleReady=!1},e.prototype.onSocketMessage=function(e){var t,n=this;try{t=JSON.parse(e)}catch(t){return void("CLIENT:JOIN"===e?this.onFrontendJoin():"CLIENT:LEAVE"===e&&this.onFrontendLeave())}var r=getMethodHandler(t.method);r&&r(this.container,t.params,(function(e,r){e?n.ws.send({id:t.id,error:{code:e,message:(null==r?void 0:r.message)||r||""}}):n.ws.send({id:t.id,result:r})}))},e}();function getMethodHandler(e){for(var t=e.split("."),n=Handlers,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}var BreakpointManager=function(){function e(e){this.container=e,this.id2BreakpointMap={},this.isActive=!1,this.isActive4UserManual=!0,this.pauseOnExceptionsState=0,this.pauseOnNextStatement=!1,this.stepAction=0,this.breakpointCallStackDepth=0,this.hiddenKeys=new Set(["this"])}return Object.defineProperty(e.prototype,"remoteObjectParser",{get:function(){return this.container.getRemoteObjectParser()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.isActive=!0},e.prototype.inactivate=function(){this.isActive=!1},e.prototype.get=function(e){return this.id2BreakpointMap[e]},e.prototype.setBreakpoint=function(e,t){var n=new BreakpointItem(this,e,t);return this.id2BreakpointMap[n.id]=n,n},e.prototype.removeBreakpoint=function(e){var t=this.id2BreakpointMap[e];t&&t.destroy()},e.prototype.pauseOnBreakpoint=function(e){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames(e),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[e.id]}})},e.prototype.pauseOnException=function(e,t,n,r){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:n.loc.start.line-1,columnNumber:n.loc.start.column}),data:__assign(__assign({},this.remoteObjectParser.parseObject(t)),{uncaught:r}),reason:EDevtoolProtocolTypePausedReason.Exception,hitBreakpoints:[]}})},e.prototype.pauseOnNode=function(e,t){if(this.container.getEngine().disableBreaks)return!1;this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:t.loc.start.line-1,columnNumber:t.loc.start.column}),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[]}})},e.prototype.evaluateWithoutBreakpoint=function(e,t){var n=this.isActive;n&&this.inactivate();try{return this.container.getEngine().evaluate(e,t)}finally{n&&this.activate()}},e.prototype.getBreakpointCallFrames=function(e){var t,n=this,r=[],i=this.container.getEngine(),o=i.getRuntimeStatus().callFrames;return o.forEach((function(a,s){var u=a.functionNode,c=a.functionScope,l=o[s+1],p={lineNumber:l?l.callExpressionNode.loc.start.line-1:e.lineNumber,columnNumber:l?l.callExpressionNode.loc.start.column:e.columnNumber,scriptId:a.scriptId},h=createObject(null);objectKeys$1(c.context).forEach((function(e){n.hiddenKeys.has(e)||(h[e]=c.context[e].value)}));var d={columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:a.scriptId},f={columnNumber:u.loc.end.column,lineNumber:u.loc.end.line-1,scriptId:a.scriptId},m=n.remoteObjectParser.parseObject(h),g=n.remoteObjectParser.parseObject(c.find("this").value);t||(t=n.remoteObjectParser.parseObject(i.globalObjectAccessor.globalObject));var y={callFrameId:i.runtimeProfile.getCallFrameId(a),functionName:a.functionName||"(anonymous)",functionLocation:d,location:p,scopeChain:[{type:"local",object:m,startLocation:d,endLocation:f},{type:"global",object:t}],this:g,url:"https://gw.alipayobjects.com"};r.unshift(y)})),r},e.prototype.handlePaused=function(e){if(this.sessionState.channelId){this.isActive=!1,this.breakpointCallStackDepth=this.container.getEngine().getRuntimeStatus().callFrames.length,this.container.getPausedCoverView().show();var t=this.protocolConnection.messagesBeforeWebsocketOpened.length?this.protocolConnection.messagesBeforeWebsocketOpened.concat([e]):[e];this.protocolConnection.messagesBeforeWebsocketOpened=[],this.handleSyncRequest(t),this.container.getPausedCoverView().hide(),this.protocolConnection.send({method:DebuggerEvent.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else debug$1("skip breakpoint due to lacking of channelId")},e.prototype.handleSyncRequestInner=function(e,t){var n=this,r=Date.now();t&&t.forEach((function(e){n.container.getProtocolConnection().send(e)}));var i=this.container.getHttpClient().syncRequest({url:"".concat(this.container.server4Http,"/bugme/channel/paused"),method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:[]});if(debug$1("syncRequest response",i),i.error){if(Date.now()-r>=1e4)return this.handleSyncRequestInner(e,t);error$1("[DEBUG]",i.errorMessage)}else if(200===i.status){var o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(e){}if(o){log("[DEBUG] breakpoint response",o);var a=[],s=!1;Array.isArray(o)?o.forEach((function(t){e(t.method)&&(s=!0),a.push(n.handleProtocolResponse(t))})):o.method&&(s=e(o.method),a.push(this.handleProtocolResponse(o))),a.length>0&&(a.forEach((function(e){n.protocolConnection.send(e)})),s||this.handleSyncRequestInner(e,[]))}}else{o=void 0;if(i.data)try{o=JSON.parse(i.data)}catch(e){}if(o&&o.errorMessage&&"timeout"===o.errorMessage)return this.handleSyncRequestInner(e,[]);error$1("[DEBUG] breakpoint error ".concat(JSON.stringify(i)))}},e.prototype.handleSyncRequest=function(e){var t=Array.isArray(e)?e:[e];return this.handleSyncRequestInner((function(e){return e===Debugger.resume||e===Debugger.stepOver||e===Debugger.stepInto||e===Debugger.stepOut}),t)},e.prototype.handleProtocolResponse=function(e){var t={id:e.id,result:{}},n=getMethodHandler(e.method);return n&&n(this.container,e.params,(function(n,r){t=n?{id:e.id,error:{code:n,message:(null==r?void 0:r.message)||r||""}}:{id:e.id,result:r}})),t},e}(),config={server4Http:"https://hpmweb.alipay.com",server4WebSocket:"wss://hpmweb.alipay.com"},sourceMapURLRe=/\/\/# sourceMappingURL=(\S+)\s*$/,ScriptManager=function(){function e(e){this.container=e,this.id2ScriptMap={},this.url2ScriptIdMap={}}return Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.getScript=function(e){return this.id2ScriptMap[e]},e.prototype.getScriptByUrl=function(e){var t=this.url2ScriptIdMap[e];if(t)return this.getScript(t)},e.prototype.getScriptByHash=function(e){var t=e.substring(4);if(t)return this.getScript(t)},e.prototype.addScript=function(e,t,n,r){var i="",o=t,a=t.match(sourceMapURLRe);a&&(i=a[1],o=t.substring(0,a.index)),this.id2ScriptMap[e]={scriptId:e,scriptHash:"hash".concat(e),source:o,ast:n,url:r||"",sourceMapURL:i},r&&(this.url2ScriptIdMap[r]=e),this.emitScriptParsedEvent(e)},e.prototype.emitAllScriptParsedEvents=function(){var e=this;Object.keys(this.id2ScriptMap).forEach((function(t){e.id2ScriptMap[t].url&&e.emitScriptParsedEvent(t)}))},e.prototype.emitScriptParsedEvent=function(e){var t=this.id2ScriptMap[e];t&&(debug$1("emitScriptParsedEvent",e,t),this.container.getProtocolConnection().send({method:DebuggerEvent.scriptParsed,params:{endColumn:0,endLine:2,executionContextId:this.sessionState.executionContextId,hasSourceURL:!1,hash:t.scriptHash,isLiveEdit:!1,isModule:!1,length:0,scriptId:e,scriptLanguage:"JavaScript",sourceMapURL:t.sourceMapURL,startColumn:0,startLine:0,url:t.url||""}}))},e}(),SessionState=function(){function e(e,t){this.providerCtor=e,this._debuggerAttached=!1,this.executionContextId=1,this.executionContextName="app",t.executionContextId&&(this.executionContextId=t.executionContextId),t.executionContextName&&(this.executionContextName=t.executionContextName),t.channelId&&(this._channelId=t.channelId),t.channel&&(this.channel=t.channel)}return Object.defineProperty(e.prototype,"stateProvider",{get:function(){return this._stateProvider||(this._stateProvider=new this.providerCtor),this._stateProvider},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelId",{get:function(){return this._channelId?"boat_".concat(this._channelId):""},enumerable:!1,configurable:!0}),e.prototype.resolveExternalStateOnStart=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this._channelId||(this._channelId=this.stateProvider.getChannelIdSync()),this._channelId||!this.stateProvider.getChannelId?[3,2]:(e=this,[4,this.stateProvider.getChannelId()]);case 1:e._channelId=t.sent(),t.label=2;case 2:return[2,this.channelId]}}))}))},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel||(this.channel=this.stateProvider.getChannelSync()),this.channel||!this.stateProvider.getChannel?[3,2]:(e=this,[4,this.stateProvider.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return[2,this.channel]}}))}))},Object.defineProperty(e.prototype,"debuggerAttached",{get:function(){return this._debuggerAttached},set:function(e){this._debuggerAttached=e},enumerable:!1,configurable:!0}),e}();function formatLocaleString(e){switch(e){case"zhCN":case"zh-SG":case"zh-HK":case"zh-TW":case"zh-Hans":case"zh-CN":return"zhCN";default:return"enUS"}}var I18NFormatter=function(){function e(e,t){void 0===t&&(t=""),this.locale=e,this.prefix=t,this._messageBundle={}}return e.getLocaleFromNavigator=function(){var e=getUserAgent();if(e.includes("Language")){var t=e.match(/Language\/([\w-]+)/);if(t)return formatLocaleString(t[1])}return"undefined"!=typeof navigator&&navigator.language?formatLocaleString(navigator.language):formatLocaleString("enUS")},e.prototype.setMessageBundle=function(e){this._messageBundle=e},Object.defineProperty(e.prototype,"i18nMessages",{get:function(){return this._messageBundle[formatLocaleString(this.locale)]},enumerable:!1,configurable:!0}),e.prototype.format=function(e,t){var n=this.i18nMessages[e];return"string"==typeof n?n:"function"==typeof n?n(t):"string"==typeof t?t:e},e.prototype.formatWithPrefix=function(e){return"[".concat(this.prefix,"] ").concat(this.format(e))},e}(),zhCN={remoteDebug:"真机调试",scriptPaused:"断点命中",performanceHint:"真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览",consoleContentTooLarge:"打印的内容过长,单条消息内容大小限制为 20MB",panelStatusPreparing:"等待调试器连接",panelStatusConnected:"真机调试已连接",panelStatusDisconnected:"真机调试已断开",panelStatusNoValidChannelId:"真机调试未获取到调试通道信息",getHelp:"请联系支付宝技术支持进行排查。",errorExit:"本次真机调试已结束,请重新生成调试版本。原因:",exit:"退出"},enUS={remoteDebug:"Remote Debug",scriptPaused:"Paused",performanceHint:"There is a deviation between the performance of a mini program running in remote-debug mode on a real device and its actual performance. If you need to observe performance, please use the Preview.",consoleContentTooLarge:"The log is too long. The size limit for a single log is 20MB",panelStatusPreparing:"Preparing",panelStatusConnected:"Connected",panelStatusDisconnected:"Disconnected",panelStatusNoValidChannelId:"Remote debug failed to get channel info",getHelp:"Please contact Alipay technical support for troubleshooting.",errorExit:"Debug interrupted. Please re-generate Debug QR-Code. Reason: ",exit:"Exit"};function createI18N(){var e=new I18NFormatter(I18NFormatter.getLocaleFromNavigator());return e.setMessageBundle({zhCN:zhCN,enUS:enUS}),e.prefix=e.format("remoteDebug"),e}var ServiceContainer=function(){function e(e){this.userConfig=e,this.i18n=createI18N()}return e.prototype.getUserConfig=function(){return this.userConfig},e.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new RemoteObjectParser),this.remoteObjectParser},e.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new SessionState(this.stateProviderImpl,this.userConfig)),this.sessionState},e.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new ScriptManager(this)),this.scriptManager},e.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new BreakpointManager(this)),this.breakpointManager},e.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new ProtocolConnection(this)),this.protocolConnection},e.prototype.getConsole=function(){return this._consoleImpl||(this._consoleImpl=new ConsoleImpl(this)),this._consoleImpl},e.prototype.setHttpClientImpl=function(e){this.httpClientImpl=e},e.prototype.getHttpClient=function(){return this.httpClientInstance||(this.httpClientInstance=new this.httpClientImpl),this.httpClientInstance},e.prototype.setWebSocketClientImpl=function(e){this.websocketClientImpl=e},e.prototype.getWebSocketClientImpl=function(){return this.websocketClientImpl},e.prototype.setPausedCoverViewImpl=function(e){this.pausedCoverViewImpl=e},e.prototype.getPausedCoverView=function(){return this.pausedCoverViewInstance||(this.pausedCoverViewInstance=new this.pausedCoverViewImpl,this.pausedCoverViewInstance.setPausedMessage(this.i18n.format("scriptPaused"))),this.pausedCoverViewInstance},e.prototype.setEngineInstance=function(e){this.engine=e},e.prototype.getEngine=function(){return this.engine},e.prototype.setStateProviderImpl=function(e){this.stateProviderImpl=e},Object.defineProperty(e.prototype,"server4Http",{get:function(){var e=this.getSessionState().channel;return e?e.startsWith("wss://")?e.replace("wss://","https://"):e.replace("ws://","http://"):config.server4Http},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server4WebSocket",{get:function(){var e=this.getSessionState().channel;return e||config.server4WebSocket},enumerable:!1,configurable:!0}),e.prototype.warn=function(e){var t=this.engine;t&&t.evaluate('console.warn("'.concat(e,'")'),void 0,{disableBreaks:!0})},e.prototype.warnPerformance=function(){this.warn(this.i18n.formatWithPrefix("performanceHint"))},e}(),Barrier=function(){function e(){var e=this;this._isOpen=!1,this._promise=new Promise((function(t){e._completePromise=t}))}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen||(this._isOpen=!0,this._completePromise())},e.prototype.wait=function(){return this._promise},e}(),AutoOpenBarrier=function(e){function t(t){var n=e.call(this)||this;return n._timeout=setTimeout((function(){return n.open()}),t),n}return __extends(t,e),t.prototype.open=function(){this._timeout&&clearTimeout(this._timeout),this._timeout=null,e.prototype.open.call(this)},t}(Barrier),BoatmanInspector=function(){function e(e){var t=this;if(this.options=e,this.barrier=new AutoOpenBarrier(1e4),this.container=new ServiceContainer(e),e.provider){var n=e.provider,r=n.httpClient,i=n.websocketClient,o=n.pausedCoverView,a=n.stateProvider;r?this.container.setHttpClientImpl(r):throwConstructError("no provider.httpClient"),i?this.container.setWebSocketClientImpl(i):throwConstructError("no provider.websocketClient"),o?(this.container.setPausedCoverViewImpl(o),this.options.eventManager&&this.options.eventManager.on(EWorkerAppEvent$1.DebugMaskButtonClick,(function(){t.container.getPausedCoverView().hide()}))):throwConstructError("no provider.pausedCoverView"),a?this.container.setStateProviderImpl(a):throwConstructError("no provider.stateProvider")}else throwConstructError("no provider option");this.breakpointManager=this.container.getBreakpointManager(),!1===e.console||e.consoleIsolation||overrideGlobalConsole(this.container),this.container.getSessionState().resolveExternalStateOnStart()}return Object.defineProperty(e.prototype,"whenDebuggerAttached",{get:function(){return this.barrier.wait()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDebuggerAttached",{get:function(){return this.barrier.isOpen()},enumerable:!1,configurable:!0}),e.prototype.stopAtEntry=function(){enable$1(this.container,{},(function(){})),enable$2(this.container,{},(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0},e.prototype.startQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.startQueueEvent()},e.prototype.replayQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.replayQueueEvent()},e.prototype.warnPerformance=function(){this.container.warnPerformance()},e.prototype.setEngine=function(e){this.container.setEngineInstance(e),!1!==this.options.console&&this.options.consoleIsolation&&e.import({console:createConsoleProxy(this.container)}),hookPromiseRejectionCallback(e,this)},e.prototype.connect=function(){var e=this;try{log("Connecting to debugger..."),this.container.getProtocolConnection().open(),this.container.getProtocolConnection().connectionState.onDebuggerAttached((function(){log("Debugger attached."),e.barrier.open()}))}catch(t){error$1("[boatman] create connection error",t),this.barrier.open(),setTimeout((function(){e.connect()}),3e3)}},e.prototype.disconnect=function(){this.container.getProtocolConnection().close()},e.prototype.evaluateScript=function(e,t,n,r){this.container.getScriptManager().addScript(e,t,n,r)},e.prototype.hitBreakpoint=function(e,t){if(this.container.getEngine().disableBreaks)return!1;var n=this.breakpointManager;if(!n.isActive)return!1;var r=t.type;if(3===r)return this.pauseOnNode(e,t),!0;var i=getBoatmanSymbol(t,"__breakpointzxfg");if(i){var o=n.get(i);if(o){if(debug$1("hit breakpoint",t.type,t),!o.condition)return n.pauseOnBreakpoint(o),!0;try{var a=this.container.getEngine().getRuntimeStatus().callFrames;if(n.evaluateWithoutBreakpoint(o.condition,a[a.length-1].functionScope))return n.pauseOnBreakpoint(o),!0}catch(e){}}}if(0!==n.stepAction&&isBreakableNode(t)){switch(n.stepAction){case 3:return n.stepAction=0,this.pauseOnNode(e,t),!0;case 2:if(this.container.getEngine().getRuntimeStatus().callFrames.length<=n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0;break;case 1:if(this.container.getEngine().getRuntimeStatus().callFrames.length<n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0}return!1}return!(!n.pauseOnNextStatement||67===r)&&(n.pauseOnNextStatement=!1,this.pauseOnNode(e,t),!0)},e.prototype.shouldPauseOnException=function(e,t,n,r){if(this.container.getEngine().disableBreaks)return!1;var i=this.breakpointManager;if(i.isActive&&!getBoatmanSymbol(t,"__pausedvxzg")){var o=i.pauseOnExceptionsState;2===o?(i.pauseOnException(e,t,n,r),setBoatmanSymbol(t,"__pausedvxzg",1)):1===o&&r&&(i.pauseOnException(e,t,n,!0),setBoatmanSymbol(t,"__pausedvxzg",1))}},e.prototype.pauseOnNode=function(e,t){var n=this.breakpointManager;n.isActive&&n.pauseOnNode(e,t)},e.prototype.throwException=function(e,t){var n=getBoatmanSymbol(e,"__rewrittenzxcd"),r="Uncaught";2===t&&(r+=" (in promise)"),this.container.getProtocolConnection().sendConsoleMessage({method:RuntimeEvent.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(e),exceptionId:n?n.id:100,lineNumber:0,text:r},timestamp:getPrecisionTimestamp()}})},e}();function throwConstructError(e){throw new Error("Failed to construct 'BoatmanInspector': ".concat(e))}function getHostStartupParams(){return workerGlobal.__appxStartupParams}function isAppxNg(){var e=getHostStartupParams();return!!e&&isTruthyParamValue(e.appxRouteFramework)}function isInRemoteDebug(){var e=getHostStartupParams();if(e){if(!e.channelId)return!1;if("__ignore__"===e.channelId)return!1}return!0}var initRequestTaskId=1e3,BoatmanInspectorHttpClientImpl4Ariver=function(){function e(){}return e.prototype.syncRequest=function(e){var t=abridge.callSync("tyroRequest",{url:e.url,method:e.method||"GET",headers:e.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:initRequestTaskId++,data:"string"==typeof e.body?e.body:JSON.stringify(e.body)});return t?t.error?{error:t.error,errorMessage:t.errorMessage}:{status:t.status,data:t.data}:{error:1,errorMessage:"unknown"}},e}();function debug(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}var BoatmanInspectorDebugPanelViewImpl=function(){function e(){}return e.prototype.updateDebugPanel=function(e,t,n){n||(n=this.getStatusText(e,t)),call("showRemoteDebugPanel",{status:t,text:n,buttonTitle:e.format("exit")})},e.prototype.getStatusText=function(e,t){var n="";switch(t){case EPanelStatus.Connecting:n=e.format("panelStatusPreparing");break;case EPanelStatus.Connected:n=e.format("panelStatusConnected");break;case EPanelStatus.Disconnected:n=e.format("panelStatusDisconnected")}return n},e}(),BoatmanInspectorWebSocketImpl4Ariver=function(){function e(e){this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.isSocketOpenedOnce=!1,this.useFromRemoteDebugFlag=!0,e&&(this.url=e),this.i18n=createI18N(),this.panelView=new BoatmanInspectorDebugPanelViewImpl,this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Connecting)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){this.url=e},e.prototype.open=function(){var e=this;setTimeout((function(){debug("call connection open",e.url),e.socketTask=abridge.connectSocket({__taskIdPrefix:"remote_debug_bm",url:e.url,multiple:!0,fromRemoteDebug:e.useFromRemoteDebugFlag,fail:function(t){e.onSocketError(t)}}),e.socketTask.onOpen((function(){e.handleSocketOpen()})),e.socketTask.onError((function(t){e.onSocketError(t.data)})),e.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),e.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))}),1500)},e.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7?log("message too large, skip",t.slice(0,50)):(debug("send message to boatman's socket",t.slice(0,50)),this.opened?this.socketTask.send({data:t,isBuffer:!1,fromRemoteDebug:this.useFromRemoteDebugFlag}):this.messageBeforeSocketOpen.push(t))},e.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},e.prototype.setSocketMessageHandler=function(e){this.externalMessageHandler=e},e.prototype.onSocketMessage=function(e){this.externalMessageHandler&&this.externalMessageHandler(e),"CLIENT:JOIN"===e?this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Connected):"CLIENT:LEAVE"===e&&this.onSocketClose()},e.prototype.onSocketOpen=function(){},e.prototype.onSocketError=function(e){if(console.error("connect boatman socket error",e),this.onSocketClose(),!this.isSocketOpenedOnce){var t=e?e.errorMessage||e.message:"closed";toast({content:this.i18n.format("errorExit")+t,duration:8e3})}},e.prototype.onSocketClose=function(){this.handleDebugPanelDisconnected()},e.prototype.handleDebugPanelDisconnected=function(){this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Disconnected),this.close()},e.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.isSocketOpenedOnce=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},e.prototype.showError=function(e){if(!isLyra()&&"no-valid-channel-id"===e)this.panelView.updateDebugPanel(this.i18n,EPanelStatus.Disconnected,this.i18n.format("panelStatusNoValidChannelId")),toast({content:this.i18n.format("panelStatusNoValidChannelId")+", "+this.i18n.format("getHelp"),duration:2e3})},e}(),BoatmanInspectorPausedCoverViewImpl4Ariver=function(){function e(){this.pausedMessage="断点命中"}return e.prototype.setPausedMessage=function(e){this.pausedMessage=e},e.prototype.show=function(){abridge.showRemoteDebugMask({text:" ",buttonTitle:this.pausedMessage,hide:!1})},e.prototype.hide=function(){abridge.showRemoteDebugMask({hide:!0})},e}(),BoatmanInspectorStateProviderImpl4Ariver=function(){function e(){}return e.prototype.getChannelIdFromStartupParams=function(e){return e.channelId},e.prototype.getChannelFromStartupParams=function(e){var t=e.channel;if(t)return t},e.prototype.getChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelIdFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelIdSync=function(){return this.getChannelIdFromStartupParams(getStartupParamsSync())},e.prototype.getChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelSync=function(){return this.getChannelFromStartupParams(getStartupParamsSync())},e.prototype.resolveExternalStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelIdSync=function(){return this.channelId=this.getChannelIdSync(),log("[boatman] resolve channel id sync",this.channelId),this.channelId},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channelId=this.resolveChannelIdSync(),this.channelId||!this.getChannelId?[3,2]:(e=this,[4,this.getChannelId()]);case 1:e.channelId=t.sent(),t.label=2;case 2:return log("[boatman] resolved channelId",this.channelId),[2,this.channelId]}}))}))},e.prototype.resolveChannelSync=function(){return this.channel=this.getChannelSync(),log("[boatman] resolveChannelSync resolved channel",this.channel),this.channel},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel=this.resolveChannelSync(),this.channel||!this.getChannel?[3,2]:(e=this,[4,this.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return log("[boatman] resolved channel",this.channel),[2,this.channel]}}))}))},e}(),sharedEngine,bootInvokeNumber=0;function boot(e,t,n){var r;void 0===n&&(n={});var i=isInRemoteDebug(),o=getEventManager();if(bootInvokeNumber++,!sharedEngine){var a=new BoatmanInspector({provider:{httpClient:BoatmanInspectorHttpClientImpl4Ariver,websocketClient:BoatmanInspectorWebSocketImpl4Ariver,stateProvider:BoatmanInspectorStateProviderImpl4Ariver,pausedCoverView:BoatmanInspectorPausedCoverViewImpl4Ariver},eventManager:o,executionContextId:n.executionContextId,executionContextName:n.executionContextName});(sharedEngine=new Boatman).setInspector(a),o.on(EWorkerAppEvent$1.DebugPanelClick,(function(){a.disconnect()}))}var s=n.waitingForDebuggerToAttach;isAppxNg()||(log("[boatman] waitingForDebuggerToAttach is only supported in appx 2.0"),s=!1),s&&(i||(log("[boatman] user is not in remote debug mode, waitingForDebuggerToAttach is disabled"),s=!1)),sharedEngine.run(e,t,{stopAtEntry:n.stopAtEntry,waitingForDebuggerToAttach:s}),1===bootInvokeNumber&&(null===(r=sharedEngine.inspector)||void 0===r||r.warnPerformance())}getEventManager().patch(),exports.boot=boot,exports.getEventManager=getEventManager}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).boatman={})}(this,(function(exports){function isTruthyParamValue(e){return!0===e||"yes"===e||"YES"===e}function compareVersion$1(e,t){if(e&&t){for(var n=stringToIntArraySplitBy$1(e,"."),r=stringToIntArraySplitBy$1(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy$1(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}var reiOS=/iPhone|iPad|iOS/i,finalPlatformType;function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getPlatformType(){if(finalPlatformType)return finalPlatformType;if("undefined"!=typeof navigator){var e=getUserAgent();finalPlatformType=e.indexOf("Android")>-1?2:e.match(reiOS)?1:0}else finalPlatformType="undefined"!=typeof WXEnvironment?"iOS"===WXEnvironment.platform?1:2:1;return finalPlatformType}function isAndroid(){return 2===getPlatformType()}function isIOS(){return 1===getPlatformType()}function isLyra(){return/LyraVM/i.test(getUserAgent())}var isXRiver=function(){return getUserAgent().indexOf("XRiver")>-1};function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}function isSilentMode(){return isLyra()||"string"==typeof __BUGME_EXTERNAL_CHANNEL__&&__BUGME_EXTERNAL_CHANNEL__}function formatLocaleString(e){switch(e){case"zhCN":case"zh-SG":case"zh-HK":case"zh-TW":case"zh-Hans":case"zh-CN":return"zhCN";default:return"enUS"}}var I18NFormatter=function(){function e(e,t){void 0===t&&(t=""),this.locale=e,this.prefix=t,this._messageBundle={}}return e.getLocaleFromNavigator=function(){var e=getUserAgent();if(e.includes("Language")){var t=e.match(/Language\/([\w-]+)/);if(t)return formatLocaleString(t[1])}return"undefined"!=typeof navigator&&navigator.language?formatLocaleString(navigator.language):formatLocaleString("enUS")},e.prototype.setMessageBundle=function(e){this._messageBundle=e},Object.defineProperty(e.prototype,"i18nMessages",{get:function(){return this._messageBundle[formatLocaleString(this.locale)]},enumerable:!1,configurable:!0}),e.prototype.format=function(e,t){var n=this.i18nMessages[e];return"string"==typeof n?n:"function"==typeof n?n(t):"string"==typeof t?t:e},e.prototype.formatWithPrefix=function(e){return"[".concat(this.prefix,"] ").concat(this.format(e))},e.prototype.format2=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.i18nMessages[e];if("string"==typeof r)return r.replace(/{(\d+)}/g,(function(e,n){return void 0!==t[n]?t[n]:e}));throw new Error("format2 only support string")},e}(),zhCN$1={remoteDebug:"真机调试",scriptPaused:"断点命中",resumeScript:"继续",performanceHint:"真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览",consoleContentTooLarge:"打印的内容过长,单条消息内容大小限制为 20MB",panelStatusPreparing:"等待调试器连接",panelStatusConnected:"真机调试已连接",panelStatusDisconnected:"真机调试已断开",panelStatusNoValidChannelId:"真机调试未获取到调试通道信息",getHelp:"请联系支付宝技术支持进行排查。",errorExit:"本次真机调试已结束,请重新生成调试版本。原因:",cannotFindPlugin:"未找到对应插件",unicastError:"远程调试通道异常,请重试或联系支付宝技术支持。\n错误码:{0}\n错误信息:{1}\n",unicastEnd:"远程调试通道已断开,本次真机调试已结束。",usingRemoteDebugPackageInIDE:"你正在 IDE 上使用真机调试的产物(可能是小程序插件),这可能会导致未定义的行为,推荐使用真机预览包。",exit:"退出"},enUS$1={remoteDebug:"Remote Debug",scriptPaused:"Paused in debugger",resumeScript:"Resume",performanceHint:"There is a deviation between the performance of a mini program running in remote-debug mode on a real device and its actual performance. If you need to observe performance, please use the Preview.",consoleContentTooLarge:"The log is too long. The size limit for a single log is 20MB",panelStatusPreparing:"Waiting for Debugger",panelStatusConnected:"Connected",panelStatusDisconnected:"Disconnected",panelStatusNoValidChannelId:"Remote debug failed to get channel info",getHelp:"Please contact Alipay technical support for troubleshooting.",errorExit:"Debug interrupted. Please re-generate Debug QR-Code. Reason: ",cannotFindPlugin:"Cannot find the corresponding plugin",unicastError:"Remote Debug interrupted, Please contact Alipay technical support for troubleshooting.\nerror code:{0}\nerror message:{1}\n",unicastEnd:"Remote Debug Socket is disconnected, Remote Debug is end.",usingRemoteDebugPackageInIDE:"You are using a remote-debugging product in IDE (possibly a mini-program plugin), this may lead to undefined behavior, it is recommended to use the preview product.",exit:"Exit"},_i18n;function createI18N$1(){return _i18n||((_i18n=new I18NFormatter(I18NFormatter.getLocaleFromNavigator())).setMessageBundle({zhCN:zhCN$1,enUS:enUS$1}),_i18n.prefix=_i18n.format("remoteDebug"),_i18n)}function clearI18N(){_i18n=null}var i18n$2=createI18N$1(),index$2=Object.freeze({__proto__:null}),EPanelStatus,Debugger,DebuggerEvent,Runtime,RuntimeEvent,Page,Target,TargetEvent;!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={})),function(e){e.enable="Debugger.enable",e.disable="Debugger.disable",e.evaluateOnCallFrame="Debugger.evaluateOnCallFrame",e.getPossibleBreakpoints="Debugger.getPossibleBreakpoints",e.pause="Debugger.pause",e.removeBreakpoint="Debugger.removeBreakpoint",e.resume="Debugger.resume",e.setBreakpointByUrl="Debugger.setBreakpointByUrl",e.setBreakpointsActive="Debugger.setBreakpointsActive",e.stepInto="Debugger.stepInto",e.stepOver="Debugger.stepOver",e.stepOut="Debugger.stepOut",e.getScriptSource="Debugger.getScriptSource",e.setPauseOnExceptions="Debugger.setPauseOnExceptions",e.setSkipAllPauses="Debugger.setSkipAllPauses"}(Debugger||(Debugger={})),function(e){e.paused="Debugger.paused",e.resumed="Debugger.resumed",e.scriptParsed="Debugger.scriptParsed"}(DebuggerEvent||(DebuggerEvent={})),function(e){e.enable="Runtime.enable",e.disable="Runtime.disable",e.evaluate="Runtime.evaluate",e.compileScript="Runtime.compileScript",e.getProperties="Runtime.getProperties",e.callFunctionOn="Runtime.callFunctionOn",e.releaseObjectGroup="Runtime.releaseObjectGroup",e.globalLexicalScopeNames="Runtime.globalLexicalScopeNames",e.runIfWaitingForDebugger="Runtime.runIfWaitingForDebugger"}(Runtime||(Runtime={})),function(e){e.executionContextCreated="Runtime.executionContextCreated",e.consoleAPICalled="Runtime.consoleAPICalled",e.exceptionThrown="Runtime.exceptionThrown"}(RuntimeEvent||(RuntimeEvent={})),function(e){e.enable="Page.enable",e.getResourceTree="Page.getResourceTree"}(Page||(Page={})),function(e){e.setAutoAttach="Target.setAutoAttach"}(Target||(Target={})),function(e){e.targetCreated="Target.targetCreated",e.targetDestroyed="Target.targetDestroyed",e.targetInfoChanged="Target.targetInfoChanged",e.attachedToTarget="Target.attachedToTarget"}(TargetEvent||(TargetEvent={}));var command=Object.freeze({__proto__:null,get Debugger(){return Debugger},get DebuggerEvent(){return DebuggerEvent},get Page(){return Page},get Runtime(){return Runtime},get RuntimeEvent(){return RuntimeEvent},get Target(){return Target},get TargetEvent(){return TargetEvent}}),EDevtoolProtocolErrorCode,EDevtoolProtocolTypePausedReason;!function(e){e[e.NormalError=-32e3]="NormalError"}(EDevtoolProtocolErrorCode||(EDevtoolProtocolErrorCode={})),function(e){e.Other="other",e.Exception="exception"}(EDevtoolProtocolTypePausedReason||(EDevtoolProtocolTypePausedReason={}));var defineProperty=Object.defineProperty.bind(Object),defineProperties=Object.defineProperties.bind(Object),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor.bind(Object),freeze=Object.freeze.bind(Object),objectKeys$1=Object.keys.bind(Object),__hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwnProperty$2(e,t){return __hasOwnProperty.call(e,t)}function __assign$1(e){for(var t=1;t<arguments.length;++t){var n=arguments[t];for(var r in n)hasOwnProperty$2(n,r)&&(e[r]=n[r])}return e}var assignObject=Object.assign.bind(Object)||__assign$1,getOwnPropertyNames=Object.getOwnPropertyNames.bind(Object),createObject=Object.create.bind(Object),__setPrototypeOf=Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);function setPrototypeOf(e,t){__setPrototypeOf?__setPrototypeOf(e,t):e.__proto__=t}var __getPrototypeOf=Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);function getPrototypeOf(e){return __getPrototypeOf?__getPrototypeOf(e):e.__proto__}var hasConsoleObject="object"==typeof console,log=hasConsoleObject&&console.log?console.log.bind(console):function(){},warn$1=hasConsoleObject&&console.warn?console.warn.bind(console):function(){},error$1=hasConsoleObject&&console.error?console.error.bind(console):function(){},isFunctionNameConfigurable=getOwnPropertyDescriptor(hasOwnProperty$2,"name").configurable,HostAPI=Object.freeze({__proto__:null,assignObject:assignObject,createObject:createObject,defineProperties:defineProperties,defineProperty:defineProperty,error:error$1,freeze:freeze,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyNames:getOwnPropertyNames,getPrototypeOf:getPrototypeOf,hasOwnProperty:hasOwnProperty$2,isFunctionNameConfigurable:isFunctionNameConfigurable,log:log,objectKeys:objectKeys$1,setPrototypeOf:setPrototypeOf,warn:warn$1});function setBoatmanSymbol(e,t,n){defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0})}function getBoatmanSymbol(e,t){return e[t]}var globalSettingVar="__BOAT_SETTING__",extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function __decorate(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function __param(e,t){return function(n,r){t(n,r,e)}}function __esDecorate(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),h=!1,d=n.length-1;d>=0;d--){var f={};for(var g in r)f[g]="access"===g?{}:r[g];for(var g in r.access)f.access[g]=r.access[g];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,n[d])("accessor"===u?{get:p.get,set:p.set}:p[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(p.get=s),(s=a(m.set))&&(p.set=s),(s=a(m.init))&&i.unshift(s)}else(s=a(m))&&("field"===u?i.unshift(s):p[c]=s)}l&&Object.defineProperty(l,r.name,p),h=!0}function __runInitializers(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function __propKey(e){return"symbol"==typeof e?e:"".concat(e)}function __setFunctionName(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var __createBinding=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function __exportStar(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||__createBinding(t,e,n)}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function __asyncDelegator(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:__await(e[r](t)),done:!1}:i?i(t):t}:i}}function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var __setModuleDefault=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function __importStar(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t}function __importDefault(e){return e&&e.__esModule?e:{default:e}}function __classPrivateFieldGet(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function __classPrivateFieldSet(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function __classPrivateFieldIn(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function __addDisposableResource(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var _SuppressedError="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function __disposeResources(e){function t(t){e.error=e.hasError?new _SuppressedError(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var tslib_es6={__extends:__extends,__assign:__assign,__rest:__rest,__decorate:__decorate,__param:__param,__metadata:__metadata,__awaiter:__awaiter,__generator:__generator,__createBinding:__createBinding,__exportStar:__exportStar,__values:__values,__read:__read,__spread:__spread,__spreadArrays:__spreadArrays,__spreadArray:__spreadArray,__await:__await,__asyncGenerator:__asyncGenerator,__asyncDelegator:__asyncDelegator,__asyncValues:__asyncValues,__makeTemplateObject:__makeTemplateObject,__importStar:__importStar,__importDefault:__importDefault,__classPrivateFieldGet:__classPrivateFieldGet,__classPrivateFieldSet:__classPrivateFieldSet,__classPrivateFieldIn:__classPrivateFieldIn,__addDisposableResource:__addDisposableResource,__disposeResources:__disposeResources},kTimeConsumingDataKey="__ariver_callstatdata";function extractBridgeCallback(e,t,n,r){if(void 0===r&&(r=!1),e||t||n)return handleCallbackUnion.bind(null,e,t,n,r)}function handleCallbackUnion(e,t,n,r,i){var o=!1;r?o=!!(i=normalizeErrorCode(i)).error:"object"==typeof i&&(o="error"in i||"errorMessage"in i),o&&"function"==typeof t&&t(i),o||"function"!=typeof e||e(i),"function"==typeof n&&n(i)}function normalizeErrorCode(e){return"string"==typeof e.error&&(e.error=parseInt(e.error,10)),0===e.error&&(delete e.error,delete e.errorMessage),e}function deleteTimeConsumingDataKey(e){e[kTimeConsumingDataKey]&&delete e[kTimeConsumingDataKey]}var workerGlobal="object"==typeof self&&self||"object"==typeof window&&window||"object"==typeof global&&global||Function("return this")(),globalImportScripts=workerGlobal.importScripts,globalAlipayJSBridge=workerGlobal.AlipayJSBridge,globalAlipayJSBridgeCall=globalAlipayJSBridge&&globalAlipayJSBridge.call,evalFunc="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){},sharedRequestSyncIdBase=3e3,alipayBridge;function normalizeRemoteBridgeCallSyncPayload(e,t,n){var r="_sw_jsonp_".concat(++sharedRequestSyncIdBase);workerGlobal[r]=function(e){workerGlobal[r]=null,n(e)};var i={action:e,callback:r,data:t};return JSON.stringify(i)}function normalizeRemoteBridgeCallUrl(e){var t=encodeURIComponent(e);return"https://alipay.kylinbridge/?data=".concat(t)}function safeParseJSON(e){try{return JSON.parse(e)}catch(e){}}function invokeHostBridgeCallSync4KylinBridge(e,t){var n,r=normalizeRemoteBridgeCallUrl(normalizeRemoteBridgeCallSyncPayload(e,t,(function(e){n=e})));try{globalImportScripts(r)}catch(e){error$1("invokeHostBridgeCallSync4KylinBridge",e)}return"string"==typeof n?safeParseJSON(n):n}"object"==typeof globalAlipayJSBridge&&(alipayBridge={call:function(e,t,n){globalAlipayJSBridgeCall(e,t,n)},callSync:function(e,t){return globalAlipayJSBridge.callSync?globalAlipayJSBridge.callSync(e,t):invokeHostBridgeCallSync4KylinBridge(e,t)}});var isAppXImportHooked$1=!1,appxLoadedCallbacks$1=[],appxBridge,appxBridgeReadyResolve;function callAfterAFAppX(e){if("undefined"!=typeof AFAppX)e();else if(appxLoadedCallbacks$1.push(e),!isAppXImportHooked$1){isAppXImportHooked$1=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks$1.forEach((function(e){return e()})),appxLoadedCallbacks$1=[]}),3e3)}}var appxBridgeReadyPromise=new Promise((function(e){appxBridgeReadyResolve=e}));"object"==typeof my?(appxBridge=my,appxBridgeReadyResolve()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(appxBridge=AFAppX.bridge,appxBridgeReadyResolve()):callAfterAFAppX((function(){"object"==typeof my?(appxBridge=my,appxBridgeReadyResolve()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge&&(appxBridge=AFAppX.bridge,appxBridgeReadyResolve())}));var bootstraped=!1,EWebEvent;function ensureAppxBootstrap(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return bootstraped?[3,2]:[4,appxBridgeReadyPromise];case 1:return e.sent(),[2,new Promise((function(e){var t=function(){appxBridge.call("getStartupParams"),bootstraped=!0,e()};try{t()}catch(e){setTimeout(t,600)}}))];case 2:return[2]}}))}))}!function(e){e.pageResume="pageResume",e.pagePause="pagePause",e.resume="resume",e.hashchange="hashchange"}(EWebEvent||(EWebEvent={}));var channelDomainConfig={0:{openchannel:"openchannel.alipay.com",starlinkgw:"starlinkgw.alipay.com/boatman"},1:{openchannel:"miniprogram.alipay.com",starlinkgw:"starlinkgw.alipay.com/boatman"},2:{openchannel:"openchannel-pre.alipay.com",starlinkgw:"starlinkgw-pre.alipay.com/boatman"}};function getStartupParamsFromGlobal(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?__appxStartupParams:"undefined"!=typeof AlipayJSBridge&&AlipayJSBridge.startupParams?AlipayJSBridge.startupParams:void 0}var Event=function(){function e(e,t,n){this.type=String(e),this.engineType=n,this.data=t,this._preventDefault=!1}return e.prototype.preventDefault=function(){this._preventDefault=!0},e.prototype.isDefaultPrevented=function(){return!!this._preventDefault},e}();function createEvent4WebEngine(e,t){var n,r,i=t.param,o=t.viewId+"";i&&"object"==typeof i&&2===getPlatformType()?(n=i.data,i.type,r=__rest(i,["data","type"])):n=i,n?n.instanceId=o:n={instanceId:o};var a=new Event(e,n,1);if(r)try{Object.assign(a,r)}catch(e){}return a}function noop$2(){}var DEBUG_TAG="[boatman]";function info(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];log.apply(HostAPI,[DEBUG_TAG].concat(e))}function warn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];warn$1.apply(HostAPI,[DEBUG_TAG].concat(e))}function error(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];error$1.apply(HostAPI,[DEBUG_TAG].concat(e))}var debug$1=noop$2;function getMapPolyfillConstructor(){var e=function(){function e(){this.keyList=[],this.valueList=[]}return e.prototype.set=function(e,t){var n=this.keyList,r=n.indexOf(e);if(-1===r){var i=n.push(e)-1;this.valueList[i]=t}else this.valueList[r]=t;return this},e.prototype.get=function(e){var t=this.keyList.indexOf(e);return-1===t?void 0:this.valueList[t]},e.prototype.forEach=function(e){for(var t=this.keyList.slice(),n=this.valueList.slice(),r=t.length,i=0;i<r;i++){var o=t[i];e(n[i],o,this)}},Object.defineProperty(e.prototype,"size",{get:function(){return this.keyList.length},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return-1!==this.keyList.indexOf(e)},e.prototype.delete=function(e){var t=this.keyList.indexOf(e);return-1!==t&&(this.keyList.splice(t,1),this.valueList.splice(t,1),!0)},e.prototype.clear=function(){this.keyList=[],this.valueList=[]},e}();return e}function getSetPolyfillConstructor(){var e=function(){function e(){this.itemList=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.itemList.length},enumerable:!1,configurable:!0}),e.prototype.add=function(e){return-1===this.itemList.indexOf(e)&&this.itemList.push(e),this},e.prototype.delete=function(e){var t=this.itemList.indexOf(e);return-1!==t&&(this.itemList.splice(t,1),!0)},e.prototype.clear=function(){this.itemList=[]},e.prototype.has=function(e){return-1!==this.itemList.indexOf(e)},e.prototype.forEach=function(e){for(var t=0,n=this.itemList.slice();t<n.length;t++){var r=n[t];e(r,r,this)}},e}();return e}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,MapKlass,SetKlass,WeakMapKlass,WeakSetKlass;function getWeakSetPolyfillConstructor(){return function(){function e(){this.elementKey=weakElementKey+weakSetKey++}return e.prototype.has=function(e){return 1===e[this.elementKey]},e.prototype.add=function(e){return e[this.elementKey]=1,this},e.prototype.delete=function(e){e[this.elementKey]=null},e}()}function getWeakMapPolyfillConstructor(){var e=Object.prototype.hasOwnProperty,t=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,value:n,writable:!0}):e[t]=n};function n(e){return Object(e)===e}function r(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(t(this,"_id","_WeakMap"+"_"+o()+"."+o()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function i(t,r){if(!n(t)||!e.call(t,"_id"))throw new TypeError(r+" method called on incompatible receiver "+typeof t)}function o(){return Math.random().toString().substring(2)}return t(r.prototype,"delete",(function(e){if(i(this,"delete"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),t(r.prototype,"get",(function(e){if(i(this,"get"),n(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),t(r.prototype,"has",(function(e){if(i(this,"has"),!n(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),t(r.prototype,"set",(function(e,r){if(i(this,"set"),!n(e))throw new TypeError("Invalid value used as weak map key");var o=e[this._id];return o&&o[0]===e?(o[1]=r,this):(t(e,this._id,[e,r]),this)})),t(r,"_polyfill",!0),r}function getMapConstructorMayBePolyfill(){var e="undefined"!=typeof Map;MapKlass=e?Map:getMapPolyfillConstructor()}function createMap(){return MapKlass||getMapConstructorMayBePolyfill(),new MapKlass}function getSetConstructorPolyfill(){var e="undefined"!=typeof Set;SetKlass=e?Set:getSetPolyfillConstructor()}function createSet(){return SetKlass||getSetConstructorPolyfill(),new SetKlass}function getWeakMapConstructorMayBePolyfill$1(){var e="undefined"!=typeof WeakMap;WeakMapKlass=e?WeakMap:getWeakMapPolyfillConstructor()}function createWeakMap(){return WeakMapKlass||getWeakMapConstructorMayBePolyfill$1(),new WeakMapKlass}function getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}var isAppXImportHooked=!1,appxLoadedCallbacks=[];function runAfterAppx(e){if(void 0!==workerGlobal.AFAppX)e();else if(appxLoadedCallbacks.push(e),!isAppXImportHooked){isAppXImportHooked=!0;var t=globalImportScripts||workerGlobal.importScripts;t?workerGlobal.importScripts=function(e){t(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[],workerGlobal.importScripts=t)}:setTimeout((function(){appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[]}),1200)}}function runAfterAppXBridgeReady(e){if("undefined"==typeof AFAppX&&workerGlobal.AFAppX&&(AFAppX=workerGlobal.AFAppX),"undefined"==typeof $AppxFramework)e();else if(AFAppX.Plugin){var t=AFAppX.Plugin;AFAppX.Plugin=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];if("object"==typeof i&&i.run){var o=i.run;i.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(i,t)}}return t.apply(AFAppX,n)}}else if($AppxFramework.bootstrapInAppContextByProtocol){var n=$AppxFramework.bootstrapInAppContextByProtocol;$AppxFramework.bootstrapInAppContextByProtocol=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];if("object"==typeof i){var o=i.callback;if(o&&(i.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),o.apply(this,t)}),i.pageInfo){var a=i.pageInfo.init;a&&(i.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function guardSingleMsgSize(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>2e7?void debug$1("abort send websocket message due to size:",t.length,t.slice(0,1e3)):t}var getCircularReplacer$1=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){}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}function getStartupParams$1(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return(e=getStartupParamsFromGlobal())?[2,e]:[2,abridge.getStartupParams()]}))}))}function getStartupParamsSync(){var e=getStartupParamsFromGlobal();if(e)return e;try{return abridge.getStartupParamsSync()}catch(e){return debug$1("getStartupParamsSync error",e),{}}}function isAppxNg(){var e=getStartupParamsFromGlobal();return!!e&&isTruthyParamValue(e.appxRouteFramework)}function isInRemoteDebug(){var e=getStartupParamsFromGlobal();if(e){if(!e.channelId)return!1;if("__ignore__"===e.channelId)return!1}return!0}function sleep(e){return void 0===e&&(e=300),new Promise((function(t){setTimeout((function(){t()}),e)}))}var Logger=function(){function e(e,t,n){this.prefix=t,this.options=n,this.message=[];var r="__bm_log".concat(e,"__message__");workerGlobal[r]=this.message}return e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.message.push(e),this.options.writeToConsole&&console.log.apply(console,__spreadArray([this.prefix],e,!1))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.message.push(e),this.options.writeToConsole&&console.debug.apply(console,__spreadArray([this.prefix],e,!1))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.message.push(e),this.options.writeToConsole&&console.error.apply(console,__spreadArray([this.prefix],e,!1))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.message.push(e),this.options.writeToConsole&&console.warn.apply(console,__spreadArray([this.prefix],e,!1))},e.prototype.silentLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.message.push(e)},e}();function getLogger(){return workerGlobal.__logger__||(workerGlobal.__logger__=new Logger("r","[boatman] [render]",{writeToConsole:!1})),workerGlobal.__logger__}function getWorkerLogger(){return workerGlobal.__worker_logger__||(workerGlobal.__worker_logger__=new Logger("w","[boatman] [worker]",{writeToConsole:!1})),workerGlobal.__worker_logger__}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfPresent(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getDefaultExportFromNamespaceIfNotNamed(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&1===Object.keys(e).length?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}function isObject$3(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$3,isObject$4=getDefaultExportFromCjs(isObject_1),freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,_freeGlobal$1=getDefaultExportFromCjs(_freeGlobal),freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$2=freeGlobal||freeSelf||Function("return this")(),_root=root$2,_root$1=getDefaultExportFromCjs(_root),root$1=_root,now$1=function(){return root$1.Date.now()},now_1=now$1,now$2=getDefaultExportFromCjs(now_1),reWhitespace=/\s/;function trimmedEndIndex$1(e){for(var t=e.length;t--&&reWhitespace.test(e.charAt(t)););return t}var _trimmedEndIndex=trimmedEndIndex$1,_trimmedEndIndex$1=getDefaultExportFromCjs(_trimmedEndIndex),trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(e){return e?e.slice(0,trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim$1,_baseTrim$1=getDefaultExportFromCjs(_baseTrim),root=_root,Symbol$3=root.Symbol,_Symbol=Symbol$3,_Symbol$1=getDefaultExportFromCjs(_Symbol),Symbol$2=_Symbol,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty,nativeObjectToString$1=objectProto$1.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$1.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var r=!0}catch(e){}var i=nativeObjectToString$1.call(e);return r&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),i}var _getRawTag=getRawTag$1,_getRawTag$1=getDefaultExportFromCjs(_getRawTag),objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,_objectToString$1=getDefaultExportFromCjs(_objectToString),Symbol$1=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag$1(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$1,_baseGetTag$1=getDefaultExportFromCjs(_baseGetTag);function isObjectLike$1(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$1,isObjectLike$2=getDefaultExportFromCjs(isObjectLike_1),baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$1(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol$1,isSymbol$2=getDefaultExportFromCjs(isSymbol_1),baseTrim=_baseTrim,isObject$2=isObject_1,isSymbol=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(e){if("number"==typeof e)return e;if(isSymbol(e))return NAN;if(isObject$2(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject$2(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=baseTrim(e);var n=reIsBinary.test(e);return n||reIsOctal.test(e)?freeParseInt(e.slice(2),n?2:8):reIsBadHex.test(e)?NAN:+e}var toNumber_1=toNumber$1,toNumber$2=getDefaultExportFromCjs(toNumber_1),isObject$1=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce$2(e,t,n){var r,i,o,a,s,u,c=0,l=!1,p=!1,h=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$1);function d(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function f(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-c>=o}function g(){var e=now();if(f(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-u);return p?nativeMin(n,o-(e-c)):n}(e))}function m(e){return s=void 0,h&&r?d(e):(r=i=void 0,a)}function y(){var e=now(),n=f(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(g,t),l?d(e):a}(u);if(p)return clearTimeout(s),s=setTimeout(g,t),d(u)}return void 0===s&&(s=setTimeout(g,t)),a}return t=toNumber(t)||0,isObject$1(n)&&(l=!!n.leading,o=(p="maxWait"in n)?nativeMax(toNumber(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(now())},y}var debounce_1=debounce$2,debounce$3=getDefaultExportFromCjs(debounce_1),debounce$1=debounce_1,isObject=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle$2(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);return isObject(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),debounce$1(e,t,{leading:r,maxWait:t,trailing:i})}var throttle_1=throttle$2,throttle$3=getDefaultExportFromCjs(throttle_1),ConnectionManagerBase=function(){function e(e,t,n){var r=this;this.connection=e,this.uuid=t,this.agentId=n,this.logger=getLogger(),this.onResume=function(){r.logger.log("on resume, activate connection, this.connection.isSocketOpened: ".concat(r.connection.isSocketOpened)),r.connection.activate(),r.connection.isSocketOpened||r.checkHostBeforeAgentConnect()},this.onPageResume=function(){r.connection.activate(),r.emitDocumentUpdated()},this.onPagePause=function(){r.throttledPageResume.cancel(),r.connection.inActivate(),r.resetAxmlVisitedState()},this.throttledPageResume=throttle$3(this.onPageResume,100,{leading:!1})}return e.prototype.tryResume=function(){var e=this;this.connection.isActivated&&this.getResumeUrl().then((function(t){e.request(t,{headers:{"channel-id":"boat_".concat(e.uuid)}}).then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){try{if(this.logger.log("bugme try resume response",t),JSON.parse(t||"{}").success)return this.logger.log("bugme resume boatman success"),[2]}catch(e){this.logger.error("bugme resume boatman error",e)}return[2]}))}))}))}))},e.prototype.checkHostBeforeAgentConnect=function(){var e=this;if(this.connection.isActivated){if("string"==typeof __BUGME_EXTERNAL_URL__&&__BUGME_EXTERNAL_URL__)return this.connection.open(),void this.emitDocumentUpdated();this.getCheckHostUrl().then((function(t){e.request(t).then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:try{if(this.logger.log("bugme check host response",t),JSON.parse(t||"{}").status)return this.connection.open(),this.throttledPageResume(),[2]}catch(e){this.logger.error("bugme check host error",e)}return[4,sleep()];case 1:return e.sent(),this.checkHostBeforeAgentConnect(),[2]}}))}))}))}))}},e.prototype.emitDocumentUpdated=function(){this.connection.send(JSON.stringify({method:"DOM.documentUpdated",params:{bugmeAgentId:this.agentId}}))},e.prototype.resetAxmlVisitedState=function(){},e}(),xhrRequest=function(e,t){return void 0===t&&(t={method:"GET",timeout:5e3}),__awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){return(n=new XMLHttpRequest).timeout=t.timeout,n.open(t.method||"GET",e),Object.keys(t.headers||{}).forEach((function(e){n.setRequestHeader(e,t.headers[e])})),n.send(),[2,new Promise((function(e,t){n.onloadend=function(){e(n.responseText)},n.onerror=function(){t(n.responseText)}}))]}))}))},getBugMeHttpUrl4Web=function(){var e,t,n=getChannelDomainInWebview();return n.startsWith("wss")?(e="https",t=n.split("wss://")[1]):n.startsWith("ws")&&(e="http",t=n.split("ws://")[1]),"".concat(e,"://").concat(t,"/bugme")},ConnectionManagerWeb=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.connection=t,i.uuid=n,i.agentId=r,t.addOnCloseHandler((function(){return __awaiter(i,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,sleep()];case 1:return e.sent(),this.checkHostBeforeAgentConnect(),[2]}}))}))})),i.startDebugSession=i.startDebugSession.bind(i),i}return __extends(t,e),t.prototype.request=function(e,t){return xhrRequest(e,t)},t.prototype.getCheckHostUrl=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return e=getBugMeHttpUrl4Web(),[2,"".concat(e,"/channel/checkHost?id=").concat(this.uuid)]}))}))},t.prototype.getResumeUrl=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){return e=getBugMeHttpUrl4Web(),[2,"".concat(e,"/channel/resume")]}))}))},t.prototype.setup=function(){window.location.hash?this.startDebugSession():window.addEventListener(EWebEvent.hashchange,this.startDebugSession)},t.prototype.startDebugSession=function(){window.removeEventListener(EWebEvent.hashchange,this.startDebugSession),document.addEventListener(EWebEvent.pageResume,this.throttledPageResume),document.addEventListener(EWebEvent.pagePause,this.onPagePause),document.addEventListener(EWebEvent.resume,this.onResume)},t}(ConnectionManagerBase);function onAlipayJSBridgeReady(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return workerGlobal.AlipayJSBridge?[2]:[2,new Promise((function(e){"undefined"!=typeof document&&document.addEventListener&&document.addEventListener("AlipayJSBridgeReady",e)}))]}))}))}function getChannelUUIDInWebview(){if("string"==typeof __BUGME_EXTERNAL_CHANNEL__&&__BUGME_EXTERNAL_CHANNEL__)return __BUGME_EXTERNAL_CHANNEL__;var e=getStartupParamsFromGlobal();return null==e?void 0:e.channelId}function getChannelURLInWebview(e,t){return"string"==typeof __BUGME_EXTERNAL_URL__&&/^wss?:\/\//.test(__BUGME_EXTERNAL_URL__)?__BUGME_EXTERNAL_URL__:e&&t?constructChannelURL(getChannelDomainInWebview(),e,t):""}function constructChannelURL(e,t,n){return"".concat(e,"/bugme/agent/").concat(t,"?agentId=").concat(n)}function getChannelDomainInWebview(){var e=getStartupParamsFromGlobal(),t=null==e?void 0:e.remoteCh,n=null==e?void 0:e.channel;return n||"wss://"+(channelDomainConfig[t]||channelDomainConfig[0]).starlinkgw}function isAppxNgFromStartupParams(e){return isTruthyParamValue(e.appxRouteFramework)}function call(e,t){if(alipayBridge){var n=t.success,r=t.fail,i=t.complete,o=__rest(t,["success","fail","complete"]),a=extractBridgeCallback(n,r,i,!0);alipayBridge.call(e,o,(function(e){a&&a(e)}))}else appxBridge?appxBridge.call(e,t):console.warn("[ERROR] error when call ".concat(e,": js bridge does not exists"))}function isInPluginContext(){return!("object"!=typeof AFAppX||!AFAppX.Plugin)}function getPluginId(){if(isInPluginContext()&&void 0!==appxBridge&&"function"==typeof appxBridge.getPluginIdSync)try{return appxBridge.getPluginIdSync().pluginId}catch(e){getWorkerLogger().silentLog("error","getPluginIdSync error",e)}return""}function getWorkerAgentId(){var e="",t=getPluginId();return(e+=t?"p-"+t:"m")&&(e+="-"+Math.random().toString(36).substring(2,8)),e}function isInIsolateContext(){return"undefined"==typeof AlipayJSBridge&&void 0!==appxBridge}function isInBizContext(){return"undefined"==typeof AlipayJSBridge&&void 0!==appxBridge&&"undefined"!=typeof getApp}function isInBizContextAndAppX1(){return!!isInBizContext()&&(appxBridge.SDKVersion&&-1===compareVersion$1(appxBridge.SDKVersion,"2.0.0"))}var EventListener=function(){function e(e,t){this.name=e,this.target=t,this.callbackHandlers=new Map,this.callbackBeforeDispatchInterceptor=new Map,this._callbackGlobalMap=new Map,t&&(t.addEventListener&&(this.baseAddEventListener=t.addEventListener.bind(t)),t.removeEventListener&&(this.baseRemoveEventListener=t.removeEventListener.bind(t)))}return e.prototype.tryInitEventListenerOnWindow=function(e){var t,n,r=this;if(!(this.callbackHandlers.has(e)&&(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)>0&&this._callbackGlobalMap.has(e))){this.callbackHandlers.set(e,[]);var i=function(e){r.dispatchEvent(e)};this._callbackGlobalMap.set(e,i),null===(n=this.baseAddEventListener)||void 0===n||n.call(this,e,i)}},e.prototype.tryRemoveEventListenerInTarget=function(e){var t,n;if(!this.callbackHandlers.has(e)||0===(null===(t=this.callbackHandlers.get(e))||void 0===t?void 0:t.length)){var r=this._callbackGlobalMap.get(e);r&&(null===(n=this.baseRemoveEventListener)||void 0===n||n.call(this,e,r),this._callbackGlobalMap.delete(e))}},e.prototype.addEventListener=function(e,t){this.callbackHandlers.has(e)||this.tryInitEventListenerOnWindow(e);var n=this.callbackHandlers.get(e);null==n||n.push({fn:t})},e.prototype.removeEventListener=function(e,t){var n=this.callbackHandlers.get(e);n.forEach((function(e,r){e.fn===t&&n.splice(r,1)})),this.tryRemoveEventListenerInTarget(e)},e.prototype.dispatchEvent=function(e){var t,n=null!==(t=e.type)&&void 0!==t?t:e.name;if(this.callbackHandlers&&this.callbackHandlers.has(n)){var r=this.callbackHandlers.get(n),i=this.callbackBeforeDispatchInterceptor.get(n);if(i&&i.length>0)for(var o=0;o<i.length;o++){if(!(0,i[o])(e))return}for(var a=0,s=r;a<s.length;a++){if(s[a].fn.call(null,e),e.defaultPrevented)break}}},e.prototype.addInterceptor=function(e,t){this.callbackBeforeDispatchInterceptor.has(e)||this.callbackBeforeDispatchInterceptor.set(e,[]);var n=this.callbackBeforeDispatchInterceptor.get(e);null==n||n.push(t)},e.prototype.patch=function(){var e=this;this.disposePatch&&this.disposePatch();var t=this.target;t&&(t.addEventListener&&(t.addEventListener=this.addEventListener.bind(this)),t.removeEventListener&&(t.removeEventListener=this.removeEventListener.bind(this))),(this.baseAddEventListener||this.baseRemoveEventListener)&&(this.disposePatch=function(){e.disposePatch=void 0,t&&(e.baseAddEventListener&&(t.addEventListener=e.baseAddEventListener),e.baseRemoveEventListener&&(t.removeEventListener=e.baseRemoveEventListener))})},e}(),EventManger=function(){function e(){var e=this;this.eventMap={},this.queue=[],this.enableQueue=!1,this.globalEventListener=new EventListener("workerGlobal",workerGlobal),this.documentEventListeners=new EventListener("document",workerGlobal&&workerGlobal.document),this.globalEventListener.addEventListener("message",(function(t){e.enMessageQueue(t)}));this.pushEventListener.addEventListener("push",(function(t){var n=t.data;if(n&&(n.func||n.beforeunload)){var r=n.func||"beforeunload",i=createEvent4WebEngine(r,n),o=e.eventMap[r];o&&o.forEach((function(e){e(i)}))}e.enPushQueue(t)}))}return Object.defineProperty(e.prototype,"pushEventListener",{get:function(){return workerGlobal&&workerGlobal.document?this.documentEventListeners:this.globalEventListener},enumerable:!1,configurable:!0}),e.prototype.patch=function(){this.globalEventListener.patch(),this.documentEventListeners.patch()},e.prototype.enPushQueue=function(e){this.enableQueue&&(log("queued push event",e),this.queue.push({type:"push",e:e}))},e.prototype.enMessageQueue=function(e){this.enableQueue&&(log("queued message event",e),this.queue.push({type:"message",e:e}))},e.prototype.startQueueEvent=function(){log("startQueueEvent"),this.enableQueue=!0},e.prototype.replayQueueEvent=function(){for(log("replayQueueEvent",this.queue.length),this.enableQueue=!1;this.queue.length;){var e=this.queue.shift();"push"===e.type?this.pushEventListener.dispatchEvent(e.e):this.globalEventListener.dispatchEvent(e.e)}},e.prototype.on=function(e,t){var n=this;return this.eventMap[e]||(this.eventMap[e]=[]),this.eventMap[e].push(t),function(){n.off(e,t)}},e.prototype.off=function(e,t){this.eventMap[e]&&(this.eventMap[e]=this.eventMap[e].filter((function(e){return e!==t})))},e.prototype.dispose=function(){var e;null===(e=this.eventDispose)||void 0===e||e.dispose()},e}(),eventManager$1=new EventManger;function getEventManager(){return eventManager$1}var eventManager=getEventManager(),BridgeWebSocketTask=function(){function e(t){this.map={},this.id="".concat(t,"_").concat(Math.random().toString(36).substring(2,8),"_").concat(String(e.taskId++))}return e.prototype._listen=function(e,t){var n=this;eventManager.on("onSocketTask"+e,(function(e){e.data&&e.data.socketTaskID===n.id&&t(e)}))},e.prototype.getParam=function(e){return __assign({socketTaskID:this.id},e)},e.prototype._doAction=function(e,t){call(e,this.getParam(t))},e.prototype.send=function(e){this._doAction("sendSocketMessage",e)},e.prototype.close=function(e){this._doAction("closeSocket",e)},e.prototype.onOpen=function(e){this._listen("Open",e)},e.prototype.onMessage=function(e){this._listen("Message",(function(t){e(t)}))},e.prototype.onError=function(e){this._listen("Error",(function(t){e(t)}))},e.prototype.onClose=function(e){this._listen("Close",e)},e.taskId=1,e}(),taskIdToClose=[],appxBridgeCallCount=0,defaultPrefix="remote_debug",EWorkerAppEvent$1,sharedStartupParams;function connectSocket(e){var t;if(e.__taskIdPrefix||(e.__taskIdPrefix=defaultPrefix),isInIsolateContext())return taskIdToClose.push("".concat(defaultPrefix).concat(++appxBridgeCallCount)),appxBridge.connectSocket(e);var n=null!==(t=e.__taskIdPrefix)&&void 0!==t?t:defaultPrefix;delete e.__taskIdPrefix;var r=new BridgeWebSocketTask(n);return taskIdToClose.push(r.id),call("connectSocket",r.getParam(e)),r}function closeAllSocket(){taskIdToClose.forEach((function(e){call("closeSocket",{socketTaskID:e})})),taskIdToClose=[]}function alert$1(e){if(isInIsolateContext())return appxBridge.alert(e);call("alert",__assign({},e))}function toast(e){if(e.duration||(e.duration=1e4),isInIsolateContext())return appxBridge.showToast(e);call("toast",__assign({},e))}!function(e){e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick"}(EWorkerAppEvent$1||(EWorkerAppEvent$1={}));var abridge={callSync:function(e,t){return alipayBridge?alipayBridge.callSync(e,t):appxBridge?appxBridge.callSync(e,t):void 0},showRemoteDebugMask:function(e){return alipayBridge?alipayBridge.call("showRemoteDebugMask",e,(function(){})):appxBridge?appxBridge.call("showRemoteDebugMask",e):void 0},getStartupParams:function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return sharedStartupParams?[2,sharedStartupParams]:(e=getStartupParamsFromGlobal())?(sharedStartupParams=e,[2,e]):[4,ensureAppxBootstrap()];case 1:return t.sent(),[2,new Promise((function(e){appxBridge.call("getStartupParams",{success:function(t){sharedStartupParams=t,e(t)}})}))]}}))}))},getStartupParamsSync:function(){if(sharedStartupParams)return sharedStartupParams;var e,t=getStartupParamsFromGlobal();return t?(sharedStartupParams=t,t):(alipayBridge&&alipayBridge.callSync?e=alipayBridge.callSync("getStartupParams"):appxBridge&&appxBridge.callSync&&(e=appxBridge.callSync("getStartupParams")),e||(e={}),e)},connectSocket:function(e){return connectSocket(e)},alert:function(e){alert(e)}},BoatmanInspectorDebugPanelViewImpl=function(){function e(){}return e.prototype.updateDebugPanel=function(e,t,n){n||(n=this.getStatusText(e,t)),call("showRemoteDebugPanel",{status:t,text:n,buttonTitle:e.format("exit")})},e.prototype.getStatusText=function(e,t){var n="";switch(t){case EPanelStatus.Connecting:n=e.format("panelStatusPreparing");break;case EPanelStatus.Connected:n=e.format("panelStatusConnected");break;case EPanelStatus.Disconnected:n=e.format("panelStatusDisconnected")}return n},e}(),zhCN={"调试结束":"调试结束","callExitApp_退出":"退出","callExitApp_取消":"取消"},enUS={"调试结束":"Debugging Ended","callExitApp_退出":"Exit","callExitApp_取消":"Cancel"};function createI18N(){var e=new I18NFormatter(I18NFormatter.getLocaleFromNavigator());return e.setMessageBundle({zhCN:zhCN,enUS:enUS}),e}var i18n$1=createI18N();function callInternalAPI(e,t,n,r){var i=n.originalFetch,o=n.originalCall;if(i){var a=encodeURIComponent(JSON.stringify({action:"internalAPI",data:{method:e,param:t}}));i("https://alipay.kylinBridge/?data=".concat(a),{mode:"no-cors"}).then((function(e){r(e)})).catch((function(){}))}else o&&(isInBizContextAndAppX1()?o(e,t,r):o("internalAPI",{method:e,param:t},r))}var DEBUG_PANEL="debugPanel",SETUP_EXIT_APP="setupExitApp",CALL_EXIT_APP="callExitApp",ON_EXIT_APP="onExitApp",EventBus=function(){function e(){this.subscribers={},this.locks={}}return e.prototype.getSubscribers=function(e){return this.subscribers[e]},e.prototype.requireLock=function(e){return!this.locks[e]&&(this.locks[e]=!0,!0)},e.prototype.releaseLock=function(e){this.locks[e]=!1},e.prototype.subscribe=function(e,t){this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t)},e.prototype.unsubscribe=function(e,t){if(this.subscribers[e]){var n=this.subscribers[e].indexOf(t);-1!==n&&this.subscribers[e].splice(n,1)}},e.prototype.dispatch=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.subscribers[e]&&this.subscribers[e].forEach((function(e){e.apply(void 0,t)}))},e}();function getEventBus(){return workerGlobal.__ril_dispatcher__||(workerGlobal.__ril_dispatcher__=new EventBus),workerGlobal.__ril_dispatcher__}var RILDispatchHelper=function(){function e(e){this.name=e,this.enable=!1,this.eventBus=getEventBus(),this.eventBus&&(this.enable=this.eventBus.requireLock(e))}return e.prototype.dispatch=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.enable&&(t=this.eventBus).dispatch.apply(t,__spreadArray([e],n,!1))},e}(),logger$1=getWorkerLogger(),addEventListener=function(e,t){try{"undefined"!=typeof document&&document.addEventListener?document.addEventListener(e,t):appxBridge.on(e,t)}catch(e){error$1("🚀 ~ file: exit-app.ts:19 ~ addEventListener ~ error:",e)}},removeEventListener=function(e,t){try{"undefined"!=typeof document&&document.removeEventListener?document.removeEventListener(e,t):appxBridge.off(e,t)}catch(e){log("🚀 ~ file: exit-app.ts:31 ~ removeEventListener ~ error:",e)}};function setupDebugMaskClick(e){logger$1.log("setupDebugMaskClick");var t=function(){logger$1.log("DebugMaskButtonClick"),e()};return addEventListener(EWorkerAppEvent$1.DebugMaskButtonClick,t),function(){removeEventListener(EWorkerAppEvent$1.DebugMaskButtonClick,t)}}function setupExitApp(e){logger$1.log("setupExitApp");var t=function(){logger$1.log("DebugPanelClick"),callExitApp(),(null==e?void 0:e.onDebugPanelClick)&&e.onDebugPanelClick()};return addEventListener(EWorkerAppEvent$1.DebugPanelClick,t),function(){removeEventListener(EWorkerAppEvent$1.DebugPanelClick,t)}}var bridgeCall="undefined"!=typeof boatman&&void 0!==boatman.originalBridgeCall?boatman.originalBridgeCall:globalAlipayJSBridgeCall;function exitApp(){getEventBus().dispatch(ON_EXIT_APP),logger$1.log("exitApp"),callInternalAPI("exitTinyApp",null,{originalCall:bridgeCall},(function(e){logger$1.log("exitTinyApp",e)})),callInternalAPI("exitApp",null,{originalCall:bridgeCall},(function(e){logger$1.log("exitApp",e)}))}var confirmShown=!1;function callExitApp(){confirmShown||(confirmShown=!0,call("showRemoteDebugMask",{hide:!0,success:function(){logger$1.log("showRemoteDebugMask hide")}}),call("alert",{title:i18n$1.format("调试结束"),button:i18n$1.format("callExitApp_退出"),success:function(){setTimeout((function(){exitApp(),confirmShown=!1}),0)}}))}function debug(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}var exitAppSetuped=!1;function initExitApp(){exitAppSetuped||(setupExitApp(),exitAppSetuped=!0)}var i18n=i18n$2,debugPanel=new BoatmanInspectorDebugPanelViewImpl;getEventBus().subscribe(DEBUG_PANEL,(function(e,t){debugPanel.updateDebugPanel(i18n,e,t)})),getEventBus().subscribe(SETUP_EXIT_APP,(function(){try{initExitApp()}catch(e){debug("🚀 ~ file: index.ts:103 ~ getEventBus ~ error:",e)}})),getEventBus().subscribe(CALL_EXIT_APP,(function(){callExitApp()})),getEventBus().subscribe(ON_EXIT_APP,(function(){closeAllSocket()}));var defaultDomain="starlinkgw.alipay.com/boatman",defaultServer={http:"https://".concat(defaultDomain),websocket:"wss://".concat(defaultDomain)},BoatmanInspectorStateProviderImpl4Ariver=function(){function e(){}return e.prototype.getChannelIdFromStartupParams=function(e){return e.channelId},e.prototype.getChannelFromStartupParams=function(e){var t=e.channel;if(t)return t},e.prototype.getChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelIdFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelIdSync=function(){return this.getChannelIdFromStartupParams(getStartupParamsSync())},e.prototype.getChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=this.getChannelFromStartupParams,[4,getStartupParams$1()];case 1:return[2,e.apply(this,[t.sent()])]}}))}))},e.prototype.getChannelSync=function(){return this.getChannelFromStartupParams(getStartupParamsSync())},e.prototype.resolveExternalStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelIdSync=function(){return this.channelId=this.getChannelIdSync(),log("[boatman] resolve channel id sync",this.channelId),this.channelId},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channelId=this.resolveChannelIdSync(),this.channelId||!this.getChannelId?[3,2]:(e=this,[4,this.getChannelId()]);case 1:e.channelId=t.sent(),t.label=2;case 2:return log("[boatman] resolved channelId",this.channelId),[2,this.channelId]}}))}))},e.prototype.resolveChannelSync=function(){return this.channel=this.getChannelSync(),log("[boatman] resolveChannelSync resolved channel",this.channel),this.channel},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel=this.resolveChannelSync(),this.channel||!this.getChannel?[3,2]:(e=this,[4,this.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return log("[boatman] resolved channel",this.channel),[2,this.channel||defaultServer.websocket]}}))}))},e}(),stateProvider;function getInspectorStateProvider(){return stateProvider||(stateProvider=new BoatmanInspectorStateProviderImpl4Ariver),stateProvider}var GatewayBuilder=function(){function e(e,t,n){void 0===n&&(n="wss"),this.uuid=t,this.wsProtocol=n,this.url=e,this.url.startsWith("wss://")?(this.url=this.url.slice(6),this.wsProtocol="wss"):this.url.startsWith("ws://")?(this.url=this.url.slice(5),this.wsProtocol="ws"):this.url.startsWith("https://")?(this.url=this.url.slice(8),this.wsProtocol="wss"):this.url.startsWith("http://")&&(this.url=this.url.slice(7),this.wsProtocol="ws"),this.url.endsWith("/")&&(this.url=this.url.slice(0,-1)),this.httpProtocol="wss"===this.wsProtocol?"https":"http"}return e.prototype.getHost=function(){return"".concat(this.wsProtocol,"://").concat(this.url,"/bugme/host/").concat(this.uuid)},e.prototype.getAgent=function(e){return"".concat(this.wsProtocol,"://").concat(this.url,"/bugme/agent/").concat(this.uuid,"?agentId=").concat(e)},e.prototype.getClient=function(){return"".concat(this.wsProtocol,"://").concat(this.url,"/bugme/client/").concat(this.uuid,"?breakpoint_sync=1")},e.prototype.getClientW=function(){return"".concat(this.wsProtocol,"://").concat(this.url,"/bugme/client_w/").concat(this.uuid,"?breakpoint_sync=1")},e.prototype.getUnicast=function(e){var t="".concat(this.wsProtocol,"://").concat(this.url,"/bugme/unicast/").concat(this.uuid);return e||(e=""),t+=this.getUnicastQuery(e)},e.prototype.getUnicastQuery=function(e){return e?"?agentId=".concat(e):""},e.prototype.getPaused=function(){return"".concat(this.httpProtocol,"://").concat(this.url,"/bugme/channel/paused")},e.prototype.getResume=function(){return"".concat(this.httpProtocol,"://").concat(this.url,"/bugme/channel/resume")},e.prototype.getCheckHost=function(){return"".concat(this.httpProtocol,"://").concat(this.url,"/bugme/channel/checkHost?id=").concat(this.uuid)},e.prototype.getRequestHeaders=function(){return{"Content-Type":"application/json","channel-id":this.uuid}},e}(),EventEmitter=function(){function e(){this._listeners=new Map}return e.prototype.on=function(e,t){var n=this;return this._listeners.has(e)||this._listeners.set(e,[]),this._listeners.get(e).push(t),function(){return n.off(e,t)}},e.prototype.off=function(e,t){if(this._listeners.has(e)){var n=this._listeners.get(e),r=n.indexOf(t);-1!==r&&n.splice(r,1)}},e.prototype.once=function(e,t){var n=this,r=this.on(e,(function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];r(),t.apply(n,e)}));return r},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._listeners.has(e)&&__spreadArray([],this._listeners.get(e),!0).forEach((function(e){return e.apply(t,n)}))},e.prototype.dispose=function(){this._listeners.clear()},e}(),WebSocketBaseImpl=function(){function e(e,t){this.url="",this.taskIdPrefix="",this.header={},this.opened=!1,this.maxBodyLength=20971520,this.eventEmitter=new EventEmitter,e&&(this.url=e),(null==t?void 0:t.header)&&(this.header=t.header),(null==t?void 0:t.taskIdPrefix)&&(this.taskIdPrefix=t.taskIdPrefix),this.onSocketError=this.onSocketError.bind(this),this.onSocketClose=this.onSocketClose.bind(this),this.onSocketMessage=this.onSocketMessage.bind(this),this.onSocketOpen=this.onSocketOpen.bind(this)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.setUrl=function(e){this.url=e},e.prototype.onSocketOpen=function(){this.eventEmitter.emit("open")},e.prototype.onSocketClose=function(e){this.eventEmitter.emit("close",e)},e.prototype.onSocketError=function(e){this.eventEmitter.emit("error",e)},e.prototype.onSocketMessage=function(e){this.eventEmitter.emit("message",e)},e.prototype.on=function(e,t){this.eventEmitter.on(e,t)},e}(),internalWebSocket;"undefined"!=typeof WebSocket&&WebSocket.OPEN&&(internalWebSocket=WebSocket);var WebSocketBrowserImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t.logger=getLogger(),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):e.logger.warn("[DEBUG] invalid message",t.data)},this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError},t.prototype.close=function(){this.opened&&this.socket.close()},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7||(this.opened?(this.logger.log("real send",e),this.socket.send(t)):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketOpen=function(){var t=this;this.logger.log("[DEBUG] connection opened"),this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.send(e)})),this.messageBeforeSocketOpen=[]),e.prototype.onSocketOpen.call(this)},t.prototype.onSocketClose=function(t){this.opened=!1,log("[DEBUG] connection closed"),e.prototype.onSocketClose.call(this,t)},t.prototype.onSocketError=function(t){e.prototype.onSocketError.call(this,t),error$1("[DEBUG] connection onerror",t)},t}(WebSocketBaseImpl),WebSocketNativeImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t.useFromRemoteDebugFlag=!0,t._openInvoked=!1,t}return __extends(t,e),t.prototype.delayOpenOnce=function(){var e=this;this._openInvoked||(setTimeout((function(){e.open()}),0),this._openInvoked=!0)},t.prototype.open=function(){var e=this;if(!this.url)throw new Error("url is empty");this.socketTask=abridge.connectSocket({__taskIdPrefix:this.taskIdPrefix,fromRemoteDebug:this.useFromRemoteDebugFlag,url:this.url,header:this.header,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(t){e.opened=!1,e.onSocketClose(t)})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))},t.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>this.maxBodyLength?debug$1("[WebSocketNativeImpl] message length ".concat(t.length," exceed maxBodyLength ").concat(this.maxBodyLength)):this.opened?this.socketTask.send({fromRemoteDebug:this.useFromRemoteDebugFlag,data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t)},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.onSocketOpen(),this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]))},t}(WebSocketBaseImpl),isWebPlatform=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){isWebPlatform=!0;try{delete workerGlobal.WebSocket}catch(_a){}}var SocketTaskImpl=isWebPlatform?WebSocketBrowserImpl:WebSocketNativeImpl,readFromLeft=function(e,t,n){void 0===n&&(n=-1);var r=0,i=0,o=[];if(0===n)return[e];for(var a=0;a<e.length;a++){if(e[a]===t&&(o.push(e.slice(i,a)),r++,i=a+1,n>=0&&r>=n))break}return i<e.length&&o.push(e.slice(i)),o},UNICAST_PROTO={ACK:"ACK:",MESSAGE:"MESSAGE:",JOIN:"JOIN:",LEAVE:"LEAVE:",SYSTEM:"SYSTEM:"};function parseUniProto(e){var t,n=readFromLeft(e,"#",3),r=n[0],i=n[1],o=n[2],a=n[3];return"client_w"===r?t=i.startsWith("boat_")?"boatman":"worker":"agent"===r&&(t="render"),{type:r,clientType:t,uuid:i,agentId:o||"",message:a}}var UniCastLogger=function(){function e(e){this.tag=e,this.enable=!0}return e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enable&&debug.apply(void 0,__spreadArray([this.tag],e,!1))},e}(),UniCastSubSocket=function(){function e(e,t,n){void 0===n&&(n=""),this.unicast=e,this.type=t,this.agentId=n,this.logger=new UniCastLogger("[UniCastSubSocket:".concat(t,":").concat(n,"]"))}return e.prototype.on=function(e,t){this.logger.log("on event: ",e),this.unicast.eventEmitter.on("".concat(this.type,":").concat(this.agentId,":").concat(e),t)},e.prototype.close=function(){this.logger.log("close"),this.unicast.sendCommand(this.type,"leave",this.agentId)},e.prototype.send=function(e){this.logger.log("send unicast message: ",e),this.unicast.sendMessage(this.type,"string"!=typeof e?JSON.stringify(e):e,this.agentId)},e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this.isSocketOpened?(this.logger.log("socket is opened"),[2]):(this.logger.log("open unicast socket: ",this.type),[4,this.unicast.open()]);case 1:return e.sent(),this.logger.log("send join command: ",this.type),this.unicast.sendCommand(this.type,"join",this.agentId),[2]}}))}))},Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){var e=this.unicast.isSocketOpen(this.type,this.agentId);return this.logger.log("isSocketOpened: ",e),e},enumerable:!1,configurable:!0}),e}(),UniCastSocket=function(){function e(){var e=this;this.sendToUniCastQueue=new Map,this.eventEmitter=new EventEmitter,this.socketOpenedMap=new Map,this.construct={message:function(e,t,n,r){return void 0===r&&(r=""),UNICAST_PROTO.MESSAGE+[e,t,r,n].join("#")},join:function(e,t,n){return void 0===n&&(n=""),UNICAST_PROTO.JOIN+[e,t,n].join("#")},leave:function(e,t,n){return void 0===n&&(n=""),UNICAST_PROTO.LEAVE+[e,t,n].join("#")}},this.commandQueue=[],this.logger=new UniCastLogger("UniCastSocket"),this.getUniCastUrl().then((function(t){e.unicastUrl=t})),this.socketTask=new WebSocketNativeImpl(void 0,{taskIdPrefix:"remote_debug_bmu"}),this.socketTask.on("open",(function(){e.eventEmitter.emit("unicast-open")})),this.eventEmitter.on("unicast-ready",(function(){e.logger.log("unicast ready, flush mq, this.commandQueue.length: ",e.commandQueue.length),e.flushCommandQueue()})),this.socketTask.on("message",(function(t){try{if(e.logger.log("on message:",t),t.startsWith(UNICAST_PROTO.ACK)){if((t=t.slice(UNICAST_PROTO.ACK.length)).startsWith(UNICAST_PROTO.JOIN)){var n=parseUniProto(t=t.slice(UNICAST_PROTO.JOIN.length)),r=n.agentId,i=n.clientType;e.socketOpenedMap.set("".concat(i,":").concat(r),!0),e.eventEmitter.emit("".concat(i,":").concat(r,":open")),e.flushCommandQueue(),e.flushMessageQueue(i)}else if(t.startsWith(UNICAST_PROTO.LEAVE)){var o=parseUniProto(t=t.slice(UNICAST_PROTO.LEAVE.length));r=o.agentId,i=o.clientType;e.eventEmitter.emit("".concat(i,":").concat(r,":close"),{agentId:r}),e.socketOpenedMap.set("".concat(i,":").concat(r),!1)}}else if(t.startsWith(UNICAST_PROTO.MESSAGE)){var a=parseUniProto(t=t.slice(UNICAST_PROTO.MESSAGE.length)),s=(r=a.agentId,a.message);i=a.clientType;e.eventEmitter.emit("".concat(i,":").concat(r,":message"),s)}else t.startsWith(UNICAST_PROTO.SYSTEM)&&(log("unicast system message: ",t),"READY"===(t=t.slice(UNICAST_PROTO.SYSTEM.length))&&e.eventEmitter.emit("unicast-ready"))}catch(n){e.logger.log("unicast parse message error: ",n,t)}})),this.socketTask.on("error",(function(t){e.logger.log("unicast error",t),e.eventEmitter.emit("unicast-error",t),toast({type:"exception",content:i18n$2.format2("unicastError",t.error,t.errorMessage)})})),this.socketTask.on("close",(function(t){e.eventEmitter.emit("unicast-close"),e.logger.log("unicast close",t),toast({type:"fail",duration:5e3,content:i18n$2.format("unicastEnd")})}))}return e.prototype.isSocketOpen=function(e,t){return void 0===t&&(t=""),this.socketOpenedMap.get("".concat(e,":").concat(t))},e.prototype.getUniCastUrl=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return this.unicastUrl?[2,this.unicastUrl]:[4,getWorkerAgentId()];case 1:return e=n.sent(),this.gateway?[2,this.gateway.getUnicast(e)]:[4,getSharedSocketChannel().getGatewayAsync()];case 2:return t=n.sent(),this.gateway=t,this.uuid=t.uuid,this.unicastUrl=t.getUnicast(e),[2,this.unicastUrl]}}))}))},e.prototype.createSocketTask=function(e,t){return void 0===t&&(t=""),new UniCastSubSocket(this,e,t)},e.prototype.flushCommandQueue=function(){var e=this;this.commandQueue.length>0&&(this.commandQueue.forEach((function(t){var n=t[0],r=t[1],i=t[2];e.realSendCommand(n,r,i)})),this.commandQueue=[])},e.prototype.flushMessageQueue=function(e){var t=this;if(this.sendToUniCastQueue.has(e)&&this.sendToUniCastQueue.get(e).length>0){var n=this.sendToUniCastQueue.get(e)||[];this.sendToUniCastQueue.set(e,[]),n.forEach((function(e){var n=e[0],r=e[1],i=e[2];t.sendMessage(n,r,i)}))}},e.prototype.sendMessage=function(e,t,n){if(void 0===n&&(n=""),!this.socketOpenedMap.get("".concat(e,":").concat(n))){this.logger.log("".concat(e," is not opened, push to mq"),t,n);var r=this.sendToUniCastQueue.get(e)||[];return r.push([e,t,n]),void this.sendToUniCastQueue.set(e,r)}this.flushMessageQueue(e);var i="render"===e?"agent":"client_w",o=this.getUUID(e),a=this.construct.message(i,o,t,n);this.logger.log("send to unicast: ",a),this.socketTask.send(a)},e.prototype.realSendCommand=function(e,t,n){var r=this.getUUID(e),i=this.construct[t](this.clientTypeToRemoteType(e),r,n);this.logger.log("".concat(e," send command: "),i),this.socketTask.send(i)},e.prototype.sendCommand=function(e,t,n){if(void 0===n&&(n=""),!this.socketTask.isSocketOpened)return this.logger.log("".concat(e," is not opened, push to mq"),t,n),void this.commandQueue.push([e,t,n]);this.flushCommandQueue(),this.realSendCommand(e,t,n)},e.prototype.getUUID=function(e){var t=this.uuid;return"boatman"===e?"boat_".concat(t):t},e.prototype.clientTypeToRemoteType=function(e){return"render"===e?"agent":"client_w"},e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.socketTask.isSocketOpened?(this.logger.log("unicast socket is opened"),[2]):this.unicastUrl?[3,2]:[4,this.getUniCastUrl()];case 1:t.sent(),t.label=2;case 2:return e=this.unicastUrl,this.logger.log("open unicast socket: ",e),this.socketTask.setUrl(e),this.socketTask.delayOpenOnce(),[2]}}))}))},e}(),MiniSocketChannel=function(){function e(){this.channelInfo=getInspectorStateProvider()}return e.prototype.getGatewayAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){switch(r.label){case 0:return this.gateway?[2,this.gateway]:[4,this.channelInfo.resolveExternalStateAsync()];case 1:if(e=r.sent(),t=e[0],n=e[1],!t){if(isSilentMode())return console.log(i18n$2.format("usingRemoteDebugPackageInIDE")),[2];throw new Error("no-valid-channel-id")}return this.gateway=new GatewayBuilder(n,t),[2,this.gateway]}}))}))},e}(),sharedSocketChanel;function getSharedSocketChannel(){return sharedSocketChanel||(sharedSocketChanel=new MiniSocketChannel),sharedSocketChanel}function getSharedUniCastSocket(){return workerGlobal.__unicast_socket||(workerGlobal.__unicast_socket=new UniCastSocket),workerGlobal.__unicast_socket}function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hasOwnProperty=Object.prototype.hasOwnProperty,objectAssign=Object.assign||function(e,t){for(var n,r=toObject(e),i=1;i<arguments.length;i++)for(var o in n=Object(arguments[i]))hasOwnProperty.call(n,o)&&(r[o]=n[o]);return r},FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply),FunctionBind=Function.prototype.bind,FunctionConstructor=Function;function functionCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return FunctionApply(e,t,n)}function functionApply(e,t,n){return FunctionApply(e,t,n)}function functionBind(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return FunctionApply(FunctionBind,e,t)}function functionBindApply(e,t){return FunctionApply(FunctionBind,e,t)}function methodCall(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.call.apply(e,__spreadArray([t],n,!1))}function methodApply(e,t,n){return"function"==typeof e?(FunctionApply||(FunctionApply=Function.prototype.apply.call.bind(Function.prototype.apply)),FunctionApply(e,t,n)):e.apply(t,n)}var stringifyJSON=JSON.stringify,parseJSON=JSON.parse,encodeUriComponent=encodeURIComponent,decodeUriComponent=decodeURIComponent,ObjectDefineProperty=Object.defineProperty,ObjectIsFrozen=Object.isFrozen,ObjectFreeze=Object.freeze,ObjectSetPrototypeOf=Object.setPrototypeOf,DateNow=Date.now.bind(Date);function strictUriEncode(e){return encodeUriComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encoderForArrayFormat(e){switch(e.arrayFormat){case"index":return function(t,n,r){return null===n?[encode(t,e),"[",r,"]"].join(""):[encode(t,e),"[",encode(r,e),"]=",encode(n,e)].join("")};case"bracket":return function(t,n){return null===n?encode(t,e):[encode(t,e),"[]=",encode(n,e)].join("")};default:return function(t,n){return null===n?encode(t,e):[encode(t,e),"=",encode(n,e)].join("")}}}function parserForArrayFormat(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function decode(e,t){return t.decode?decodeUriComponent(e):e}function encode(e,t){return t.encode?t.strict?strictUriEncode(e):encodeUriComponent(e):e}function keysSorter(e){return Array.isArray(e)?e.sort():"object"==typeof e?keysSorter(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function extract(e){return e.split("?")[1]||""}function parse$1(e,t){var n=parserForArrayFormat(t=objectAssign({decode:!0,arrayFormat:"none"},t)),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var i=e.replace(/\+/g," ").split("="),o=i.shift(),a=i.length>0?i.join("="):void 0;a=void 0===a?null:decode(a,t),n(decode(o,t),a,r)})),Object.keys(r).sort().reduce((function(e,t){var n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=keysSorter(n):e[t]=n,e}),Object.create(null))):r}function stringify$2(e,t){var n=encoderForArrayFormat(t=objectAssign({encode:!0,strict:!0,arrayFormat:"none"},t));return e?Object.keys(e).sort().map((function(r){var i=e[r];if(void 0===i)return"";if(null===i)return encode(r,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(n(r,e,o.length))})),o.join("&")}return encode(r,t)+"="+encode(i,t)})).filter((function(e){return e.length>0})).join("&"):""}var index$1=Object.freeze({__proto__:null,extract:extract,parse:parse$1,stringify:stringify$2});function throttle$1(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=functionApply(e,null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=functionApply(e,null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function objectKeys(e){return e&&"object"==typeof e?Object.keys(e):[]}function toString(e){return null!==e&&"object"==typeof e?"function"==typeof e.toString?String(e):"":String(e)}function escapeLogParamsWithNested(e,t){return e?"string"==typeof e?e:objectKeys(e).map((function(n){var r="".concat(n,"=");return t.indexOf(n)>=0?r+=stringifyJSON(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"):r+=toString(e[n]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~"),r})).join("^"):""}function escapeLogParams(e,t){return e?"string"==typeof e?e:objectKeys(e).filter((function(n){return void 0!==e[n]||!t})).map((function(t){var n="".concat(t,"=");return n+=toString(e[t]).replace(/,/g,";").replace(/\^/g,"@").replace(/\=/g,"~")})).join("^"):""}var StatefulLoadManager=function(){function e(){this.statusMap={}}return e.prototype.loadResource=function(e,t){var n=this.getKeyFromResource(e),r=this.getLoadStatus4ResourceByKey(n);return 3===r.status?t(void 0,r.res):1!==r.status?2===r.status?this.shouldRetry4Resource(e)?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):t(r.error):0===r.status?(this.setLoadStatus4ResourceByKey(n,{status:1,callbacks:[t]}),this.loadResourceWithStatus(e)):void 0:void(r.callbacks=__spreadArray(__spreadArray([],r.callbacks,!0),[t],!1))},e.prototype.loadResourceWithStatus=function(e){var t=this;this.loadResourceInternal(e,(function(n,r){var i=t.getKeyFromResource(e),o=t.getLoadStatus4ResourceByKey(i);if(1===o.status){n?t.setLoadStatus4ResourceByKey(i,{status:2,error:n}):t.setLoadStatus4ResourceByKey(i,{status:3,res:r});var a=o.callbacks;if(Array.isArray(a))for(var s=0,u=a;s<u.length;s++){(0,u[s])(n,r)}}}))},e.prototype.getLoadStatus4ResourceByKey=function(e){var t=this.statusMap;return t[e]||(t[e]={status:0}),t[e]},e.prototype.setLoadStatus4ResourceByKey=function(e,t){this.statusMap[e]=t},e}();function safeAdd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function bitRotateLeft(e,t){return e<<t|e>>>32-t}function md5cmn(e,t,n,r,i,o){return safeAdd(bitRotateLeft(safeAdd(safeAdd(t,e),safeAdd(r,o)),i),n)}function md5ff(e,t,n,r,i,o,a){return md5cmn(t&n|~t&r,e,t,i,o,a)}function md5gg(e,t,n,r,i,o,a){return md5cmn(t&r|n&~r,e,t,i,o,a)}function md5hh(e,t,n,r,i,o,a){return md5cmn(t^n^r,e,t,i,o,a)}function md5ii(e,t,n,r,i,o,a){return md5cmn(n^(t|~r),e,t,i,o,a)}function binlMD5(e,t){var n,r,i,o,a;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,u=-271733879,c=-1732584194,l=271733878;for(n=0;n<e.length;n+=16)r=s,i=u,o=c,a=l,s=md5ff(s,u,c,l,e[n],7,-680876936),l=md5ff(l,s,u,c,e[n+1],12,-389564586),c=md5ff(c,l,s,u,e[n+2],17,606105819),u=md5ff(u,c,l,s,e[n+3],22,-1044525330),s=md5ff(s,u,c,l,e[n+4],7,-176418897),l=md5ff(l,s,u,c,e[n+5],12,1200080426),c=md5ff(c,l,s,u,e[n+6],17,-1473231341),u=md5ff(u,c,l,s,e[n+7],22,-45705983),s=md5ff(s,u,c,l,e[n+8],7,1770035416),l=md5ff(l,s,u,c,e[n+9],12,-1958414417),c=md5ff(c,l,s,u,e[n+10],17,-42063),u=md5ff(u,c,l,s,e[n+11],22,-1990404162),s=md5ff(s,u,c,l,e[n+12],7,1804603682),l=md5ff(l,s,u,c,e[n+13],12,-40341101),c=md5ff(c,l,s,u,e[n+14],17,-1502002290),s=md5gg(s,u=md5ff(u,c,l,s,e[n+15],22,1236535329),c,l,e[n+1],5,-165796510),l=md5gg(l,s,u,c,e[n+6],9,-1069501632),c=md5gg(c,l,s,u,e[n+11],14,643717713),u=md5gg(u,c,l,s,e[n],20,-373897302),s=md5gg(s,u,c,l,e[n+5],5,-701558691),l=md5gg(l,s,u,c,e[n+10],9,38016083),c=md5gg(c,l,s,u,e[n+15],14,-660478335),u=md5gg(u,c,l,s,e[n+4],20,-405537848),s=md5gg(s,u,c,l,e[n+9],5,568446438),l=md5gg(l,s,u,c,e[n+14],9,-1019803690),c=md5gg(c,l,s,u,e[n+3],14,-187363961),u=md5gg(u,c,l,s,e[n+8],20,1163531501),s=md5gg(s,u,c,l,e[n+13],5,-1444681467),l=md5gg(l,s,u,c,e[n+2],9,-51403784),c=md5gg(c,l,s,u,e[n+7],14,1735328473),s=md5hh(s,u=md5gg(u,c,l,s,e[n+12],20,-1926607734),c,l,e[n+5],4,-378558),l=md5hh(l,s,u,c,e[n+8],11,-2022574463),c=md5hh(c,l,s,u,e[n+11],16,1839030562),u=md5hh(u,c,l,s,e[n+14],23,-35309556),s=md5hh(s,u,c,l,e[n+1],4,-1530992060),l=md5hh(l,s,u,c,e[n+4],11,1272893353),c=md5hh(c,l,s,u,e[n+7],16,-155497632),u=md5hh(u,c,l,s,e[n+10],23,-1094730640),s=md5hh(s,u,c,l,e[n+13],4,681279174),l=md5hh(l,s,u,c,e[n],11,-358537222),c=md5hh(c,l,s,u,e[n+3],16,-722521979),u=md5hh(u,c,l,s,e[n+6],23,76029189),s=md5hh(s,u,c,l,e[n+9],4,-640364487),l=md5hh(l,s,u,c,e[n+12],11,-421815835),c=md5hh(c,l,s,u,e[n+15],16,530742520),s=md5ii(s,u=md5hh(u,c,l,s,e[n+2],23,-995338651),c,l,e[n],6,-198630844),l=md5ii(l,s,u,c,e[n+7],10,1126891415),c=md5ii(c,l,s,u,e[n+14],15,-1416354905),u=md5ii(u,c,l,s,e[n+5],21,-57434055),s=md5ii(s,u,c,l,e[n+12],6,1700485571),l=md5ii(l,s,u,c,e[n+3],10,-1894986606),c=md5ii(c,l,s,u,e[n+10],15,-1051523),u=md5ii(u,c,l,s,e[n+1],21,-2054922799),s=md5ii(s,u,c,l,e[n+8],6,1873313359),l=md5ii(l,s,u,c,e[n+15],10,-30611744),c=md5ii(c,l,s,u,e[n+6],15,-1560198380),u=md5ii(u,c,l,s,e[n+13],21,1309151649),s=md5ii(s,u,c,l,e[n+4],6,-145523070),l=md5ii(l,s,u,c,e[n+11],10,-1120210379),c=md5ii(c,l,s,u,e[n+2],15,718787259),u=md5ii(u,c,l,s,e[n+9],21,-343485551),s=safeAdd(s,r),u=safeAdd(u,i),c=safeAdd(c,o),l=safeAdd(l,a);return[s,u,c,l]}function binl2rstr(e){var t,n="",r=32*e.length;for(t=0;t<r;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function rstr2binl(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function rstrMD5(e){return binl2rstr(binlMD5(rstr2binl(e),8*e.length))}function rstrHMACMD5(e,t){var n,r,i=rstr2binl(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=binlMD5(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=binlMD5(o.concat(rstr2binl(t)),512+8*t.length),binl2rstr(binlMD5(a.concat(r),640))}function rstr2hex(e){var t,n,r="0123456789abcdef",i="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),i+=r.charAt(t>>>4&15)+r.charAt(15&t);return i}function str2rstrUTF8(e){return unescape(encodeURIComponent(e))}function rawMD5(e){return rstrMD5(str2rstrUTF8(e))}function hexMD5(e){return rstr2hex(rawMD5(e))}function rawHMACMD5(e,t){return rstrHMACMD5(str2rstrUTF8(e),str2rstrUTF8(t))}function hexHMACMD5(e,t){return rstr2hex(rawHMACMD5(e,t))}function md5(e,t,n){return t?n?rawHMACMD5(t,e):hexHMACMD5(t,e):n?rawMD5(e):hexMD5(e)}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),r=stringToIntArraySplitBy(t,"."),i=0,o=0,a=void 0,s=void 0;o<n.length;o++){if((a=r[o]||0)>(s=n[o]||0)){i=-1;break}if(a<s){i=1;break}}return i}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],r=0,i=e.split(t);r<i.length;r++){var o=i[r];n.push(parseInt(o,10))}return n}var proxyMapping=createWeakMap();function getProxyTarget(e){return proxyMapping.get(e)}function hasProxyTarget(e){return"object"==typeof e&&e&&proxyMapping.has(e)}function createProxy(e,t){var n=new Proxy(e,t);return proxyMapping.set(n,e),n}var InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle$1((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer=function(){var e=createWeakSet();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify(e){return JSON.stringify(e,getCircularReplacer())}var precisionTimestampBasis$1=0;function resetPrecisionTimestampBasis$1(){precisionTimestampBasis$1=1e3*Date.now()-getPrecisionTimestamp$1()}var getPrecisionTimestamp$1="object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return 1e3*performance.now()+precisionTimestampBasis$1}:function(){return 1e3*Date.now()};function interceptLifecycle(e){e.interceptors.appLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,r)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var r={aTime:getPrecisionTimestamp$1()/1e3,args:n,context:circularJSONStringify(normalizePageLifecycleManagerThisContext(t))};onPageLifecycle(e,r)}))}function onAppLifecycle(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog."+t.args[0],params:t};e.callback(n)}catch(e){}}function normalizeAppLifecycleManagerThisContext(e){var t=e.app;return{app:{appInstanceId:t.appInstanceId,initTime:t.initTime,launchOptions:t.getLaunchOptions(),launchTime:t.launchTime},state:e.state}}function onPageLifecycle(e,t){try{var n=getLifecycleName$1(t.args[0]);if(!n)return;var r={ext:{origin:"applog"},method:"MiniAppLog."+n,params:t};e.callback(r),"onPageShow"===n&&e.notifyDataChange()}catch(e){}}function getLifecycleName$1(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function normalizePageLifecycleManagerThisContext(e){var t=e.page;return{page:{initTime:t.initTime,loadTime:t.loadTime,pageId:t.pageId,pagePath:t.pagePath,plugin:t.plugin},state:e.state}}function interceptJSAPI(e){e.interceptors.bridgeSyncCallContextMethodInterceptor.all("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onApiSyncCall(e,{context:t,args:n,reqId:r,aTime:i}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onApiSyncCallback(e,{context:t,args:u,reqId:a,result:r,bTime:c,aTime:s})})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("invoke",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return t.__reqId=r,onApiCall(e,{context:t,args:n,reqId:r,aTime:i}),"rpc"===t.apiName&&(t.option.getResponse||(t.$$rpcGetResponseToTrue=!0,t.option=__assign(__assign({},t.option),{getResponse:!0}))),n})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("dispatchResultCallback",(function(t,n){var r=t.__reqId,i=getPrecisionTimestamp$1()/1e3;return onApiCallback(e,{context:t,args:n,reqId:r,bTime:i}),"rpc"===t.apiName&&t.$$rpcGetResponseToTrue&&void 0!==n[0].resData?[n[0].resData]:n}))}function onApiSyncCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo$1(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo$1(e){if(e.context){var t=e.context,n=t.apiName,r=t.extraInfo,i=t.isMiniExtension,o=t.option,a=t.startTime,s=t.taskId,u=t.__reqId;return __assign(__assign({},e),{context:{__reqId:u,apiName:n,extraInfo:r,isMiniExtension:i,option:o,startTime:a,taskId:s}})}return e}var originalError=console.error;function interceptError(e){e.interceptors.appBaseInstanceInterceptor.after("reportError",(function(e,t){t[0];onError({code:t[1],formatted:t[2]})}))}function onError(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(originalError.bind(console,t),0)}function interceptSetData(e){e.interceptors.pageFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3,o={aTime:i,args:n,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:r};return onSetData(e,o),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizePageLogicInstanceThisContext(t)),reqId:a})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var r=e.getNextRequestId(),i=getPrecisionTimestamp$1()/1e3;return onSetData(e,{aTime:i,args:n,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:r}),[[r,i],n]}),(function(t,n,r,i){var o=n[0],a=o[0],s=o[1],u=n[1],c=getPrecisionTimestamp$1()/1e3;onSetDataCallback(e,{aTime:s,args:u,bTime:c,context:circularJSONStringify(normalizeComponentLogicInstanceThisContext(t)),reqId:a})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo$1(t)};e.callback(n)}catch(e){}}function onSetDataCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onSetDataCallback",params:t};e.callback(n)}catch(e){}}function minimizeSetDataInfo$1(e){return e.context?e:{componentIs:e.component?e.component.is:void 0,isPage:e.isPage,option:e.options,pagePath:e.isPage?e.page.route:e.component.$page.route}}function normalizePageLogicInstanceThisContext(e){var t=e.page;return{page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:e.pageId,pagePath:e.pagePath}}function normalizeComponentLogicInstanceThisContext(e){var t=e.page;return{componentPath:e.componentPath,page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:t.pageId,pagePath:t.pagePath}}function setup(e,t,n){resetPrecisionTimestampBasis$1();var r=new InterceptContext(t,n);interceptSetData(r),interceptLifecycle(r),interceptJSAPI(r),interceptError(r)}var AgentContext=function(){this.channelConfigKey="0",this.userAgent=getUserAgent(),this.isIOS=isIOS(),this.isLyra=isLyra(),this.startupParams=getStartupParamsSync(),this.channelId=this.startupParams.channelId||"",this.channel=this.startupParams.channel||"",this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},NetworkCollection=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,__assign(__assign({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}();function createProtocol4RequestWillBeSent(e){var t=(e.method||"GET").toUpperCase(),n=mapValueToString(e.headers),r=getTimestamp();return{method:"Network.requestWillBeSent",params:{documentURL:"",loaderId:"",requestId:e.requestId,request:{method:t,url:e.url,headers:n,postData:e.postBody,hasPostData:!!e.postBody||void 0,mixedContentType:"none",initialPriority:"High",isLinkPreload:!1,referrerPolicy:"origin"},wallTime:r,initiator:{type:"script"},timestamp:r,type:"XHR"}}}function createProtocol4ResponseReceived(e,t){var n=e.profile,r=e.headers,i=n&&n.totalTime,o=getTimestamp(),a=o-(i?n.totalTime-n.Waiting-n.domainLookup-n.connect-n.SSLconnection:0)/1e3;return{method:"Network.responseReceived",params:{requestId:e.requestId,loaderId:"",type:"XHR",timestamp:a,response:{url:t.url||"",status:Number(e.status),headers:mapValueToString(r),requestHeaders:t.requestHeaders,connectionReused:!1,connectionId:1e3,encodedDataLength:0,securityState:"unknown",statusText:"",protocol:"",mimeType:r["Content-Type"]||r["content-type"],timing:i?createResourceTiming(n,o-n.totalTime/1e3):void 0}}}}function createProtocol4LoadingFinished(e){return{method:"Network.loadingFinished",params:{requestId:e.requestId,timestamp:getTimestamp(),encodedDataLength:0}}}function createProtocol4LoadingFailed(e){return{method:"Network.loadingFailed",params:{canceled:!1,errorText:e.errorMsg||"",requestId:e.requestId,timestamp:getTimestamp(),type:"XHR"}}}function mapValueToString(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}function getTimestamp(){return Date.now()/1e3}function createResourceTiming(e,t){var n=e.domainLookup,r=e.connect,i=e.SSLconnection,o=n+r+i;return{requestTime:t,dnsStart:n?1e-4:-1,dnsEnd:n?n:-1,connectStart:n||-1,connectEnd:o||-1,sslStart:o-i||-1,sslEnd:o||-1,sendStart:o?-1:1e-4,sendEnd:o?-1:1e-4,receiveHeadersEnd:o+e.Waiting,proxyStart:-1,proxyEnd:-1,workerStart:-1,workerReady:-1,workerFetchStart:-1,workerRespondWithSettled:-1,pushStart:0,pushEnd:0}}var MAX_QUEUE_SIZE=1e8,MessageQueue=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0}return e.prototype.push=function(e){this._queueSize>MAX_QUEUE_SIZE&&debug$1("abort message due to max queue size");var t=guardSingleMsgSize(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=getInjector().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e}(),globalInjector,Injector=function(){function e(){this.isApplogEnabled=!1}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new AgentContext),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new NetworkCollection),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new MessageQueue),this.messageQueue},e.prototype.setRuntime=function(e){this.runtime=e},e.prototype.getRuntime=function(){return this.runtime},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),EWorkerAppEvent,EBugmePanelId;function getInjector(){return globalInjector||(globalInjector=new Injector),globalInjector}function sendOrQueueApplogMsg$1(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function getHookFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function throttle(e,t,n,r,i){var o,a,s=null,u=0;i||(i={});var c=function(){u=!1===i.leading?0:Date.now(),s=null,a=e.apply(null,o),o=null};return function(){for(var l=[],p=0;p<arguments.length;p++)l[p]=arguments[p];var h=Date.now();u||!1!==i.leading||(u=h);var d=t-(h-u);return o=l,d<=0||d>t?(r(s),s=null,u=h,a=e.apply(null,o),o=null):s||!1===i.trailing||(s=n(c,d)),a}}function debounce(e,t,n,r){var i;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r(i),i=n((function(){e.apply(null,o)}),t)}}!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugMaskButtonClick="tinyRemoteDebugMaskButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(EWorkerAppEvent||(EWorkerAppEvent={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(EBugmePanelId||(EBugmePanelId={}));var throttledEmitDataChangedEvent=throttle((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:"Tiny.Data.dataChanged",ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1}),EUnserializableValue;function getFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function onErrorHook(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(console.error.bind(console,t))}function registerLegacyAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:getFn("onSetData"),onSetDataCallback:getFn("onSetDataCallback"),onApiSyncCall:getFn("onApiSyncCall"),onApiSyncCallback:getFn("onApiSyncCallback"),onApiCall:getFn("onApiCall"),onApiCallback:getFn("onApiCallback"),onError:getFn("onError")};workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}throttledEmitDataChangedEvent(),sendOrQueueApplogMsg({method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onSetDataCallback",params:t,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}onErrorHook(t)}catch(e){debug$1(e)}},registerV1PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV1AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}function getLifecycleName(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function registerV1PageLifecycleHooks(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var r=e.context?e:__assign({route:e.page.route},e);sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:minimizePageLifecycleInfo1(r),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2PageLifecycleHooks(e,t){t.onPageLifecycle=getFn("onPageLifecycle"),e.onPageLifecycle=function(e){try{if(t.onPageLifecycle)try{t.onPageLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}var n=getLifecycleName(e.args[0]);if(!n)return;sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){debug$1(e)}}}function registerV1AppLifecycleHooks(e,t){for(var n=["onAppLaunch","onAppShow","onAppHide","onAppError","onAppUnhandledRejection"],r=0,i=n;r<i.length;r++){t[u=i[r]]=getFn(u)}for(var o=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(n),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}},a=0,s=n;a<s.length;a++){var u;o(u=s[a])}}function registerV2AppLifecycleHooks(e,t){t.onAppLifecycle=getFn("onAppLifecycle"),e.onAppLifecycle=function(e){try{if(t.onAppLifecycle)try{t.onAppLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug$1(e)}sendOrQueueApplogMsg({method:"MiniAppLog.".concat(e.args[0]),params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){debug$1(e)}}}function sendOrQueueApplogMsg(e){try{var t=getInjector(),n=t.getWorkerSocket(),r=t.getMessageQueue();n&&t.isApplogEnabled?n.send(circularJSONStringify$1(e)):r.push(circularJSONStringify$1(e))}catch(e){debug$1(e)}}function minimizeApiHookInfo(e){if(e.context){var t=e.context;return __assign(__assign({},e),{context:pick(t,["apiName","extraInfo","isMiniExtension","option","startTime","taskId","__reqId"])})}return e}function minimizeSetDataInfo(e){return e.context?e:{pagePath:e.isPage?e.page.route:e.component.$page.route,isPage:e.isPage,option:e.options,componentIs:e.component?e.component.is:void 0}}function minimizePageLifecycleInfo1(e){return __assign(__assign({},e),{page:pick(e.page,["$id","$page","$viewId","data"])})}function pick(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function registerAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={}),registerLegacyAppxHook();var e=getHookFn("setup");workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.setup=function(t,n){if(e&&"function"==typeof e)try{e(t,n)}catch(e){debug$1(e)}getInjector().setRuntime(t),setup(t,n,(function(e){if(e&&"string"==typeof e.method&&e.method.includes("MiniAppLog"))sendOrQueueApplogMsg$1(e);else{var t=getInjector().getWorkerSocket();t&&t.send(e)}}))}}function parseUnserializableValue(e){if(!e)return null;switch(e){case EUnserializableValue.Infinity:return 1/0;case EUnserializableValue[-1/0]:return-1/0;case EUnserializableValue.NaN:return NaN;case EUnserializableValue["-0"]:return-0;default:return null}}function getObjectOwnPropertyDescriptors(e){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(e):Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),Object.create(null))}function isError(e){return"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)||e instanceof RegExp}function isPromise(e){return"[object Promise]"===Object.prototype.toString.call(e)||e instanceof Promise}function isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function isArrayBufferInstance(e){return e instanceof ArrayBuffer}function supportSignedZero(){return!0}function isNegativeZero(e){return 0===e&&1/e==-1/0}!function(e){e[1/0]="Infinity",e[-1/0]="-Infinity",e.NaN="NaN",e["-0"]="-0"}(EUnserializableValue||(EUnserializableValue={}));var ObjectMapper=function(){function e(e){this.objectStore=e}return e.prototype.mapFrom=function(e,t){var n=this;return Array.from(e).map((function(e){return n.mapFromOne(e,t)}))},e.prototype.mapFromOne=function(e,t){switch(typeof e){case"string":return this.mapString(e);case"number":return this.mapNumber(e);case"object":return Array.isArray(e)?this.mapArray(e,"table"===t):null===e?this.mapNull():isArrayBufferInstance(e)?this.mapArrayBuffer(e,"table"===t):this.mapObject(e,"table"===t);case"function":return this.mapFunction(e);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(e);default:return{type:typeof e,value:e}}},e.prototype.mapArrayBuffer=function(e,t){var n=this,r={byteLength:e.byteLength},i=Object.keys(r),o=e.byteLength,a=this.objectStore.save(e),s=e.constructor?e.constructor.name:"Object",u=i.length>5&&!t,c="arraybuffer",l="".concat(s,"(").concat(o,")"),p={type:"object",className:s,description:l,objectId:a,preview:{type:"object",description:l,overflow:u,properties:(u?i.slice(0,5):i).map((function(e){return n.getPropertyPreview4AnyValue(e,r[e],t)})).filter(Boolean)}};return c&&(p.subtype=c,p.preview&&(p.preview.subtype=c)),l&&(p.description=l,p.preview&&(p.preview.description=l)),p},e.prototype.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){var t,n;isNaN(e)?n=EUnserializableValue.NaN:e===1/0?n=EUnserializableValue.Infinity:e===-1/0?n=EUnserializableValue[-1/0]:isNegativeZero(e)?n=EUnserializableValue["-0"]:t=e;var r={type:"number",value:t,description:String(e)};return n&&(r.unserializableValue=n),r},e.prototype.mapBoolean=function(e){return{type:"boolean",value:e}},e.prototype.mapFunction=function(e){var t=this.objectStore.save(e);return{type:"function",className:"Function",description:e.toString(),objectId:t}},e.prototype.mapUndef=function(){return{type:"undefined"}},e.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},e.prototype.mapObject=function(e,t){var n,r,i=this,o=getObjectOwnPropertyDescriptors(e),a=Object.keys(o),s=this.objectStore.save(e),u=e.constructor?e.constructor.name:"Object",c=a.length>5&&!t,l={type:"object",className:u,description:u,objectId:s,preview:{type:"object",description:u,overflow:c,properties:(c?a.slice(0,5):a).map((function(e){return i.getPropertyPreview4ObjectProperty(e,o[e],t)})).filter(Boolean)}};return isError(e)?(n="error",-1===(r=e.stack||"").indexOf(e.name)&&(r=e.toString()+"\n"+r)):isDate(e)?(n="date",r=e.toString()):isRegExp(e)?(n="regexp",r=e.toString()):isPromise(e)&&(n="promise",r="Promise"),n&&(l.subtype=n,l.preview&&(l.preview.subtype=n)),r&&(l.description=r,l.preview&&(l.preview.description=r)),l},e.prototype.mapArray=function(e,t){var n=this,r=e.length>100&&!t,i="Array(".concat(e.length,")");return{type:"object",subtype:"array",className:"Array",description:i,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:i,overflow:r,properties:(r?e.slice(0,100):e).map((function(e,r){return n.getPropertyPreview4ArrayProperty(r,e,t)}))}}},e.prototype.getPropertyPreview4ArrayProperty=function(e,t,n){return this.getPropertyPreview4AnyValue(String(e),t,n)},e.prototype.getPropertyPreview4ObjectProperty=function(e,t,n){return t.get?{name:e,type:"accessor"}:t.set?void 0:this.getPropertyPreview4AnyValue(e,t.value,n)},e.prototype.getPropertyPreview4AnyValue=function(e,t,n){switch(void 0===n&&(n=!1),typeof t){case"object":if(Array.isArray(t)){var r={name:e,type:"object",subtype:"array",value:"Array(".concat(t.length,")")};return n&&(r.valuePreview=this.getValuePreview4TableArray(t)),r}if(null===t)return{name:e,type:"object",subtype:"null",value:"null"};r={name:e,type:"object",value:t.constructor?t.constructor.name:"Object"};return n&&(r.valuePreview=this.getValuePreview4TableObject(t)),r;case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof t,value:String(t)}}},e.prototype.getValuePreview4TableArray=function(e){var t=this;return{type:"object",subtype:"array",description:"Array(".concat(e.length,")"),overflow:!1,properties:e.map((function(e,n){return t.getPropertyPreview4AnyValue(String(n),e)}))}},e.prototype.getValuePreview4TableObject=function(e){var t=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(e).map((function(n){return t.getPropertyPreview4AnyValue(n,e[n])}))}},e}(),ExtractStackLine=function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+):(\d+):(\d+)\)/,this.e2=/\s*at\s(\S+):(\d+):(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}(),CallFramesMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(ExtractStackLine),executionContextId=1,injectedScriptId=1,ObjectStore=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'.concat(injectedScriptId,',"id":').concat(this.id,"}")},e}(),GetPropertiesHandler=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);if(t){var n=Boolean(e.ownProperties),r={result:this.mapObject(t,n,Boolean(e.accessorPropertiesOnly))};return n&&this.hasInternalProperties(t)&&(r.internalProperties=this.getInternalProperties(t)),r}return{result:[]}},e.prototype.getInternalProperties=function(e){return isArrayBufferInstance(e)?[this.mapInternalProperties("[[ArrayBufferByteLength]]",e.byteLength)]:[]},e.prototype.hasInternalProperties=function(e){return isArrayBuffer(e)},e.prototype.shouldSkipProto=function(e){return isArrayBuffer(e)},e.prototype.mapObject=function(e,t,n){var r=this;if(t){var i=getObjectOwnPropertyDescriptors(e),o=Object.keys(i).filter((function(e){return!(n&&!i[e].get&&!i[e].set)})).map((function(e){return r.mapResultOne(e,i[e],!0)}));return this.shouldSkipProto(e)||e.__proto__&&o.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),o}for(var a=[],s={},u=e,c=!1,l=!0,p=function(){var e=getObjectOwnPropertyDescriptors(u);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var i=e[t];(!n||i.get||i.set)&&a.push(r.mapResultOne(t,i,l))}})),!c){var t=Object.getOwnPropertyDescriptor(u,"__proto__");t&&(c=!0,a.push(h.mapResultOne("__proto__",t,l)))}u=u.__proto__,l=!1},h=this;u;)p();return a},e.prototype.mapInternalProperties=function(e,t){return{name:String(e),value:this.objectMapper.mapFromOne(t)}},e.prototype.mapResultOne=function(e,t,n){var r={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(r.value=this.objectMapper.mapFromOne(t.value)),t.get&&(r.get=this.objectMapper.mapFromOne(t.get)),t.set&&(r.set=this.objectMapper.mapFromOne(t.set)),r},e}(),RemoteObjectParser=function(){function e(){this.objectStore=new ObjectStore,this.objectMapper=new ObjectMapper(this.objectStore),this.callFramesMapper=new CallFramesMapper,this.getPropertiesHandler=new GetPropertiesHandler(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e,t){return this.objectMapper.mapFromOne(e,t)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var r=e;return"warn"===e&&(r="warning"),{method:"Runtime.consoleAPICalled",params:{type:r,args:this.objectMapper.mapFrom(n,e),executionContextId:executionContextId,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}(),globalConsoleOverrides;function initConsoleOverrides(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrides=new ConsoleOverrides).overrideConsole()}function getConsoleOverrides(){return globalConsoleOverrides}var ConsoleOverrides=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMessage({method:"Runtime.executionContextsCleared",params:{}}),this.sendMessage({method:"Runtime.executionContextCreated",params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this;Object.defineProperties(console,["debug","log","info","warn","error","table"].reduce((function(t,n){var r=console[n].bind(console);return t[n]={value:function(){var t=arguments;if(t.length){try{if("string"==typeof t[0]&&/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/.test(t[0]))return r.apply(null,t);var i=new Error;i.stack&&e.sendMessage(e.parser.consoleAPICalled(n,i.stack,t))}catch(e){}return r.apply(null,t)}}},t}),{}))},e.prototype.sendMessage=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessages(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessages=function(){if(this.messageBeforeAgentInit.length){var e=getInjector().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){getInjector().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessages())}),1e3)}},e}(),requirePluginName="requirePlugin";function hookRequirePlugin(){var e=i18n$2,t=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);if(!t||t.configurable){var n;t&&(n=workerGlobal.requirePlugin);var r,i={get:function(t,n){return"async"===n?function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=t[n];if("function"==typeof o){var a=Date.now();return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCall",params:{aTime:a,context:{apiName:requirePluginName+".async",option:{arguments:r}}},ext:{origin:EBugmePanelId.AppLog}}),o.apply(t,r).then((function(t){return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:t?void 0:[{error:1,errorMessage:e.format("cannotFindPlugin")}],bTime:Date.now()===a?a+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),t})).catch((function(e){throw sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiCallback",params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===a?a+.01:Date.now(),context:{apiName:requirePluginName+".async"}},ext:{origin:EBugmePanelId.AppLog}}),e}))}return o}:t[n]},apply:function(t,n,r){var i=Date.now();sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCall",params:{aTime:i,context:{apiName:requirePluginName,option:{arguments:r}}},ext:{origin:EBugmePanelId.AppLog}});try{var o=t.apply(n,r);return sendOrQueueApplogMsg$1({method:"MiniAppLog.onApiSyncCallback",params:{args:o?void 0:[{error:1,errorMessage:e.format("cannotFindPlugin")}],bTime:Date.now()===i?i+.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()===i?i+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),e}}};try{n&&(r=new Proxy(n,i))}catch(e){}Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return r||n},set:function(e){r=(n=e)?new Proxy(n,i):void 0},enumerable:!0,configurable:!0})}}function enable$6(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getResponseBody(e){var t=e.params.requestId,n=getInjector(),r=n.getNetworkRecorder(),i=r.getRequest(t);i?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:i.isBase64Body,body:i.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),r.removeRequest(t)}var network=Object.freeze({__proto__:null,enable:enable$6,getResponseBody:getResponseBody});function enable$5(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrides();t&&t.createExecutionContext()}function getProperties$1(e){var t=getConsoleOverrides();t&&getInjector().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})}function compileScript$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function evaluate$1(payload){var consoleOverrides=getConsoleOverrides();if(consoleOverrides){var parser=consoleOverrides.parser;"function"!=typeof eval&&(workerGlobal.eval=evalFunc);try{var returnValue=function(){return eval(payload.params.expression)}();getInjector().getWorkerSocket().send({id:payload.id,result:{result:parser.parseObject(returnValue)}})}catch(e){e.stack="".concat(e.name,": ").concat(e.message),getInjector().getWorkerSocket().send({id:payload.id,result:{exceptionDetails:{columnNumber:20,exception:parser.parseObject(e),exceptionId:1,lineNumber:0,text:"Uncaught"},result:parser.parseObject(e)}})}}}var runtime$1=Object.freeze({__proto__:null,compileScript:compileScript$1,enable:enable$5,evaluate:evaluate$1,getProperties:getProperties$1}),stringify$1={exports:{}},stringify_1=stringify$1.exports;!function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(i,o){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,i):r.push(i),~n.indexOf(o)&&(o=t.call(this,i,o))}else n.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n}(stringify$1,stringify$1.exports);var stringifyExports=stringify$1.exports,stringify=getDefaultExportFromCjs(stringifyExports),sharedGetCurrentPages;function callGetCurrentPages(){return sharedGetCurrentPages?sharedGetCurrentPages():workerGlobal.getCurrentPages?(sharedGetCurrentPages=workerGlobal.getCurrentPages)():workerGlobal.AFAppX&&workerGlobal.AFAppX.getCurrentPages?(sharedGetCurrentPages=workerGlobal.AFAppX.getCurrentPages)():[]}function getPagesData(e){var t;var n=getInjector().getRuntime();t=null==n?callGetCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:stringify(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify(t.data),route:t.route}})),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})}function setPageData(e){var t,n=e.params||{},r=n.viewId,i=n.data;var o=getInjector().getRuntime();t=null==o?callGetCurrentPages().filter((function(e){return e&&"".concat(e.$viewId)===r}))[0]:o.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&"".concat(e.$viewId)===r}))[0],t&&i&&t.setData(i)}function setComponentData(e){var t=e.params||{},n=t.targetId,r=t.data;if(-1!==n){var i=getInjector().getRuntime().getNav().getTopInstance().getComponentLogicInstance(n,!0);i&&i.publicInstance.setData(r)}}var data=Object.freeze({__proto__:null,getPagesData:getPagesData,setComponentData:setComponentData,setPageData:setPageData});function getStorageItem(e){return new Promise((function(t){appxBridge.getStorage({key:e,success:function(n){var r=n.data;t({key:e,value:r,type:typeof r})},fail:function(){t()}})}))}function getStorageInfo(e){appxBridge.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(){appxBridge.clearStorage()}function removeStorage(e){var t=e.params;t&&t.key&&appxBridge.removeStorage({key:t.key})}function setStorage(e){var t=e.params;t&&t.key&&appxBridge.setStorage({key:t.key,data:t.value})}var storage=Object.freeze({__proto__:null,clearStorage:clearStorage,getStorageInfo:getStorageInfo,removeStorage:removeStorage,setStorage:setStorage});function enable$4(){var e=getInjector();e.setApplogEnabled(!0),e.getMessageQueue().sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable$4});function getLoadManager(){var e=getInjector().getRuntime();if("object"==typeof e){var t="function"==typeof e.getControllableLoadManager&&e.getControllableLoadManager();if(t.addLoadHook)return t}}function enable$3(e){getLoadManager()?getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}}):getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,error:"not supported"})}function startInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.start(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function stopInterception(e){var t;null===(t=getLoadManager())||void 0===t||t.stop(),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function getAllSubPackages(e){var t;getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{roots:(null===(t=getLoadManager())||void 0===t?void 0:t.getAllSubPackages())||[]}})}function continueLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.continueLoadSubPackage(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function failLoadSubPackage(e){var t;null===(t=getLoadManager())||void 0===t||t.simulationSubPackageLoadFailed(e.params.root),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{}})}function relaunch(e){if("undefined"!=typeof $AppxFramework&&$AppxFramework.$Simulator&&$AppxFramework.$Simulator.reLaunchFromSchema){var t=e.params.compileMode,n=t.page;n&&t.pageQuery&&(n+="?".concat(t.pageQuery));var r={};t.referrerAppId&&(r.appId=t.referrerAppId),t.referrerExtraData&&(r.extraData=t.referrerExtraData),$AppxFramework.$Simulator.reLaunchFromSchema({pageWithQuery:n,appQuery:t.query,referrerInfo:r,scene:t.chInfoCode})}else getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,error:"not supported"})}var loadManager=Object.freeze({__proto__:null,continueLoadSubPackage:continueLoadSubPackage,enable:enable$3,failLoadSubPackage:failLoadSubPackage,getAllSubPackages:getAllSubPackages,relaunch:relaunch,startInterception:startInterception,stopInterception:stopInterception});function ping(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getSystemInfo(e){appxBridge.getSystemInfo({success:function(t){var n={userAgent:getInjector().getAgentContext().userAgent,sdkVersion:appxBridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};getInjector().getWorkerSocket().send({id:e.id,result:n})}})}function getStartupParams(e){var t=getStartupParamsSync();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Applog:applog,Data:data,LoadManager:loadManager,Storage:storage,getStartupParams:getStartupParams,getSystemInfo:getSystemInfo,ping:ping});function getResourceTree$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var page$1=Object.freeze({__proto__:null,getResourceTree:getResourceTree$1}),protoHandler=Object.freeze({__proto__:null,Network:network,Page:page$1,Runtime:runtime$1,Tiny:index}),DebugPanelRILHelper=function(e){function t(){return e.call(this,"debug-panel")||this}return __extends(t,e),t.prototype.updatePanel=function(e,t){this.dispatch(DEBUG_PANEL,e,t)},t.prototype.setupExitApp=function(){this.dispatch(SETUP_EXIT_APP)},t}(RILDispatchHelper),ExitAppDispatcher=function(e){function t(){return e.call(this,"exit-app")||this}return __extends(t,e),t.prototype.exitApp=function(){this.dispatch(CALL_EXIT_APP)},t}(RILDispatchHelper),WorkerSocket=function(){function e(e,t){var n=this;this.isMessageReceived=!1,this.messageBeforeReceived=[],this.i18n=i18n$2,this.panelView=new DebugPanelRILHelper,this.exitAppDispatcher=new ExitAppDispatcher,this.socket=t||new SocketTaskImpl(e,{taskIdPrefix:"remote_debug_tbwr"}),this.panelView.setupExitApp(),this.socket.on("error",(function(e){var t=getEventBus(),r=e?e.errorMessage||e.message:JSON.stringify(e);!isSilentMode()&&t.requireLock("error-".concat(r))&&(toast({content:n.i18n.format("errorExit")+", "+r,duration:2e3}),n.panelView.updatePanel(EPanelStatus.Disconnected),setTimeout((function(){t.releaseLock("error-".concat(r))}),2e3))})),this.socket.on("close",(function(){n.panelView.updatePanel(EPanelStatus.Disconnected),n.exitAppDispatcher.exitApp()})),this.socket.on("open",(function(){n.socket.send({method:"MiniAppLog.enable",params:{},ext:{origin:EBugmePanelId.AppLog}}),throttledEmitDataChangedEvent()})),workerGlobal&&workerGlobal.__ril_dispatcher__&&workerGlobal.__ril_dispatcher__.subscribe("tyroRequest",(function(e){n.onDebugProtocol(e)})),this.socket.on("message",(function(e){var t;n.isMessageReceived||(n.isMessageReceived=!0,n.messageBeforeReceived.forEach((function(e){n.socket.send(e)})),n.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:LEAVE"===e?n.close():"CLIENT:JOIN"===e&&n.panelView.updatePanel(EPanelStatus.Connected))}n.onDebugProtocol(t)})),this.panelView.updatePanel(EPanelStatus.Connecting)}return e.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.socket.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},e.prototype.open=function(){this.panelView.setupExitApp(),this.socket.open()},e.prototype.close=function(){this.socket.close()},e.prototype.send=function(e){this.socket.send(e)},e.prototype.onDebugProtocol=function(e){var t=e.method,n=getProtocolHandler(t);n?n(e):(debug$1("unsupported protocol ".concat(t)),this.socket.send({id:e.id,error:{code:-32e3,message:"unsupported"}}))},e}();function getProtocolHandler(e){if(e){for(var t=e.split("."),n=protoHandler,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}}var ignoreDomain=/\/((tyro\/agent|bugme\/channel\/paused|bugme\/channel\/resume)$|bugme\/channel\/checkHost)/,DebugEventListener=function(){function e(){this.isIOS=getInjector().getAgentContext().isIOS,this.isLyra=getInjector().getAgentContext().isLyra}return e.prototype.setup=function(){this.isLyra||this.isIOS?this.listenDebugEvent4IOS():this.listenDebugEvent()},e.prototype.onNetworkRequest=function(e){if(!ignoreDomain.test(e.url)){var t=createProtocol4RequestWillBeSent(e),n=getInjector();n.getWorkerSocket().send(t),n.getNetworkRecorder().setRequest(e.requestId,{method:t.params.request.method,requestHeaders:t.params.request.headers,url:e.url})}},e.prototype.onNetworkResponse=function(e){if(!ignoreDomain.test(e.url)){var t=getInjector(),n=t.getNetworkRecorder().getRequest(e.requestId)||{};t.getWorkerSocket().send(createProtocol4ResponseReceived(e,n)),t.getWorkerSocket().send(createProtocol4LoadingFinished(e)),t.getNetworkRecorder().setRequest(e.requestId,{responseBody:e.body,isBase64Body:!1})}},e.prototype.onNetworkError=function(e){ignoreDomain.test(e.url)||getInjector().getWorkerSocket().send(createProtocol4LoadingFailed(e))},e.prototype.onStorageChanged=function(e){var t={};e.data&&Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),getInjector().getWorkerSocket().send({method:"Tiny.Storage.storageChanged",params:{data:t},ext:{origin:EBugmePanelId.Storage}})},e.prototype.onSubpackageLoaded=function(e){"success"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageLoaded",params:{root:e.rootName}}):"loading"===e.status?getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageRequested",params:{root:e.rootName}}):"fail"===e.status&&getInjector().getWorkerSocket().send({method:"Tiny.LoadManager.subPackageFailed",params:{root:e.rootName}})},e.prototype.listenDebugEvent4IOS=function(){var e,t=this;appxBridge.on(EWorkerAppEvent.DebugNetworkRequest,(function(e){t.onNetworkRequest(e.data)})),appxBridge.on(EWorkerAppEvent.DebugNetworkResponse,(function(e){t.onNetworkResponse(e.data)})),appxBridge.on(EWorkerAppEvent.DebugNetworkError,(function(e){t.onNetworkError(e.data)})),appxBridge.on(EWorkerAppEvent.DebugStorageChanged,(function(e){t.onStorageChanged(e.data)})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e.prototype.listenDebugEvent=function(){var e,t=this;appxBridge.on(EWorkerAppEvent.DebugConsole,(function(e){var n,r=e.data,i=r.type,o=r.content;try{n=JSON.parse(o)}catch(e){return}switch(i){case EWorkerAppEvent.DebugNetworkRequest:t.onNetworkRequest(n);break;case EWorkerAppEvent.DebugNetworkResponse:t.onNetworkResponse(n);break;case EWorkerAppEvent.DebugNetworkError:t.onNetworkError(n);break;case EWorkerAppEvent.DebugStorageChanged:t.onStorageChanged(n)}})),null===(e=getLoadManager())||void 0===e||e.addLoadHook((function(e){t.onSubpackageLoaded(e)}))},e}(),WorkerListener=function(){function e(){this.inited=!1}return e.prototype.setup=function(){if(this.inited)return!1;if(/^1\./.test(appxBridge.SDKVersion)){var e=debounce(this.onPageResumeOrPause.bind(this),300,setTimeout,clearTimeout);appxBridge.on(EWorkerAppEvent.PageResume,e),appxBridge.on(EWorkerAppEvent.PagePause,e)}appxBridge.on(EWorkerAppEvent.DebugPanelClick,this.onDebugPanelClick),appxBridge.on(EWorkerAppEvent.DebugMaskButtonClick,this.onDebugMaskButtonClick),this.debugEventListener=new DebugEventListener,this.debugEventListener.setup(),this.inited=!0},e.prototype.onPageResumeOrPause=function(){throttledEmitDataChangedEvent()},e.prototype.onDebugPanelClick=function(){var e=getInjector().getWorkerSocket();e&&e.close()},e.prototype.onDebugMaskButtonClick=function(){},e}(),globalListener;function getGlobalWorkerEventListener(){return globalListener||(globalListener=new WorkerListener),globalListener}function getChannelUrl(){if("string"==typeof __BUGME_EXTERNAL_WORKER_URL__&&__BUGME_EXTERNAL_WORKER_URL__)return __BUGME_EXTERNAL_WORKER_URL__;var e,t=getInjector().getAgentContext(),n=t.channel,r=t.channelId,i=t.channelConfigKey;""!==n?e=n:e="wss://"+(channelDomainConfig[i]||channelDomainConfig[0]).starlinkgw;return"".concat(e,"/bugme/client_w/").concat(r)}var DebugAgent=function(){function e(){}return e.prototype.init=function(e){getGlobalWorkerEventListener().setup(),this.makeConnection(e)},e.prototype.makeConnection=function(e){var t=getInjector(),n=getChannelUrl(),r=new WorkerSocket(n,null==e?void 0:e.socketTaskImpl);t.setWorkerSocket(r),t.getAgentContext().isIOS?r.open():setTimeout((function(){r.open()}),1200)},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function getStaticPlugins(){var e=getStartupParamsSync().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));try{var n=getInjector().getRuntime().getMeta().getAppMeta().plugins||{};Object.entries(n).forEach((function(n){var r=n[0],i=n[1];i.lazy&&!e[r]&&t.push({plugin_id:"".concat(i.provider,"(lazy)"),deploy_version:"Not Load"})}))}catch(e){}return t}function printStaticPlugins(){var e=getStaticPlugins();e.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(e))}var loadPluginName="loadPlugin";function hookLoadPlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal.my,loadPluginName);t&&!t.configurable||(t&&(e=workerGlobal.my.loadPlugin),Object.defineProperty(workerGlobal.my,loadPluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("object"==typeof t[0]){var r=t[0].success;t[0].success=function(){printDynamicPlugin(t[0].plugin),void 0!==r&&r.apply(this,arguments)}}return e.apply(void 0,t)}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function getExtensionVersions(){var e=getInjector().getRuntime().getMiniExtensionManager();if(e.extensionVersions)return e.extensionVersions;if(e.getInitedMiniExtensionInfo){var t=e.getInitedMiniExtensionInfo(),n=new Map;return t.forEach((function(e){n.set(e.id,e.version||"-")})),n}return new Map}function printDynamicPlugin(e){var t=e.split("@")[0],n=getExtensionVersions();setTimeout((function(){console.log("%c--- Loaded Dynamic Plugin ---",LOG_STYLE),console.table([{plugin_id:t,deploy_version:n.get(t)}])}),100)}function setupPluginInfo(){console.log("%cTip: you can type `printPlugins()` anytime to print loaded plugins info","color: #3D80F3;"),hookLoadPlugin(),printStaticPlugins(),workerGlobal.printPlugins=printPlugins}function isUsePlugin(){var e=getInjector().getRuntime();if(void 0===e)return!1;var t=e.getMeta();if(t){var n=void 0;if("function"==typeof t.getAppMeta?n=t.getAppMeta():void 0!==t.meta&&(n=t.meta),n)return"object"==typeof n.plugins&&0!==Object.keys(n.plugins).length||n.useDynamicPlugins}return!1}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParamsSync())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager(),r=[];if(n.extensionVersions)n.extensionVersions.forEach((function(e,n){void 0===t[n]&&r.push({plugin_id:n,deploy_version:e})}));else if(n.getInitedMiniExtensionInfo){n.getInitedMiniExtensionInfo().forEach((function(e){if(void 0===t[e.id]){var n={plugin_id:e.id,deploy_version:e.version||"-"};r.push(n)}}))}console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(r)}var version$1="2.2.9",logger=getWorkerLogger();function main(e){if(!isInPluginContext()&&!workerGlobal.__BUGME_ON__){workerGlobal.__BUGME_ON__=!0,logger.silentLog("init worker remote -",version$1);try{registerAppxHook(),initConsoleOverrides(),hookRequirePlugin()}catch(e){error("sync task error",e)}runAfterAppx((function(){runAfterAppXBridgeReady((function(){try{getAgent().init(e),isUsePlugin()&&setupPluginInfo()}catch(e){error("init agent error",e)}}))}))}}var CommentHandler=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(76===e.type&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0;){if(!((o=this.stack[this.stack.length-1])&&o.start>=e.start.offset))break;t=o.node,this.stack.pop()}if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(67===e.type&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();function assert(e,t){if(!e)throw new Error("ASSERT: "+t)}var ErrorHandler=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.constructError=function(e,t){var n=new Error(e);return n.stack=n.toString(),n},e}(),Messages={BadImportCallArity:"Unexpected token",BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DefaultRestProperty:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",InvalidUnicodeEscapeSequence:"Invalid Unicode escape sequence",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",PropertyAfterRestProperty:"Unexpected token",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",TemplateEscape89:"\\8 and \\9 are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"},ArrayExpression$1=function(e){this.type=30,this.elements=e},ArrayPattern=function(e){this.type=60,this.elements=e},ArrowFunctionExpression$1=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1},assignmentOperatorNumber={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},AssignmentExpression$1=function(e,t,n){this.type=32,this.operator=assignmentOperatorNumber[e],this.left=t,this.right=n},AssignmentPattern=function(e,t){this.type=61,this.left=e,this.right=t},AsyncArrowFunctionExpression=function(e,t,n){this.type=31,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0},AsyncFunctionDeclaration=function(e,t,n){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AsyncFunctionExpression=function(e,t,n){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},AwaitExpression=function(e){this.type=93,this.argument=e},binaryOperatorNumber={"==":1,"!=":2,"===":3,"!==":4,"<":5,"<=":6,">":7,">=":8,"<<":9,">>":10,">>>":11,"+":12,"-":13,"*":14,"**":15,"/":16,"%":17,"|":18,"^":19,"&":20,in:21,instanceof:22,"||":1,"&&":2},BinaryExpression$1=function(e,t,n){var r="||"===e||"&&"===e||"??"===e;this.type=r?38:33,this.operator=binaryOperatorNumber[e],this.left=t,this.right=n},BlockStatement$1=function(e){this.type=76,this.body=e},BreakStatement$1=function(e){this.type=1,this.label=e},CallExpression$1=function(e,t){this.type=34,this.callee=e,this.arguments=t},CatchClause$1=function(e,t){this.type=62,this.param=e,this.body=t},ClassBody=function(e){this.type=88,this.body=e},ClassDeclaration=function(e,t,n){this.type=86,this.id=e,this.superClass=t,this.body=n},ClassExpression=function(e,t,n){this.type=94,this.id=e,this.superClass=t,this.body=n},ComputedMemberExpression=function(e,t){this.type=39,this.computed=!0,this.object=e,this.property=t},ConditionalExpression$1=function(e,t,n){this.type=35,this.test=e,this.consequent=t,this.alternate=n},ContinueStatement$1=function(e){this.type=2,this.label=e},DebuggerStatement$1=function(){this.type=3},Directive=function(e,t){this.type=5,this.expression=e,this.directive=t},DoWhileStatement$1=function(e,t){this.type=4,this.body=e,this.test=t},EmptyStatement$1=function(){this.type=75},ExportAllDeclaration=function(e){this.type=82,this.source=e},ExportDefaultDeclaration=function(e){this.type=83,this.declaration=e},ExportNamedDeclaration=function(e,t,n){this.type=84,this.declaration=e,this.specifiers=t,this.source=n},ExportSpecifier=function(e,t){this.type=85,this.exported=t,this.local=e},ExpressionStatement$1=function(e){this.type=5,this.expression=e},ForInStatement$1=function(e,t,n){this.type=6,this.left=e,this.right=t,this.body=n,this.each=!1},ForOfStatement$1=function(e,t,n,r){this.type=7,this.await=r,this.left=e,this.right=t,this.body=n},ForStatement$1=function(e,t,n,r){this.type=8,this.init=e,this.test=t,this.update=n,this.body=r},FunctionDeclaration$1=function(e,t,n,r){this.type=63,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},FunctionExpression$1=function(e,t,n,r){this.type=36,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1},Identifier$1=function(e){this.type=64,this.name=e},IfStatement$1=function(e,t,n){this.type=9,this.test=e,this.consequent=t,this.alternate=n},Import=function(){this.type=77},ImportDeclaration=function(e,t){this.type=78,this.specifiers=e,this.source=t},ImportDefaultSpecifier=function(e){this.type=79,this.local=e},ImportNamespaceSpecifier=function(e){this.type=80,this.local=e},ImportSpecifier=function(e,t){this.type=81,this.local=e,this.imported=t},LabeledStatement$1=function(e,t){this.type=10,this.label=e,this.body=t},Literal$1=function(e,t){this.type=65,this.value=e,this.raw=t},MetaProperty=function(e,t){this.type=89,this.meta=e,this.property=t},MethodDefinition=function(e,t,n,r,i){this.type=95,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=i},Module=function(e){this.type=67,this.body=e,this.sourceType="module"},NewExpression$1=function(e,t){this.type=40,this.callee=e,this.arguments=t},ObjectExpression$1=function(e){this.type=41,this.properties=e},ObjectPattern=function(e){this.type=66,this.properties=e},Property=function(e,t,n,r,i,o){this.type=68,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=o},RegexLiteral=function(e,t,n,r){this.type=65,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}},RestElement=function(e){this.type=69,this.argument=e},ReturnStatement$1=function(e){this.type=11,this.argument=e},Script=function(e){this.type=67,this.body=e,this.sourceType="script"},SequenceExpression$1=function(e){this.type=37,this.expressions=e},SpreadElement$1=function(e){this.type=70,this.argument=e},StaticMemberExpression=function(e,t){this.type=39,this.computed=!1,this.object=e,this.property=t},Super=function(){this.type=87},SwitchCase$1=function(e,t){this.type=71,this.test=e,this.consequent=t},SwitchStatement$1=function(e,t){this.type=12,this.discriminant=e,this.cases=t},TaggedTemplateExpression$1=function(e,t){this.type=42,this.tag=e,this.quasi=t},TemplateElement$1=function(e,t){this.type=72,this.value=e,this.tail=t},TemplateLiteral$1=function(e,t){this.type=73,this.quasis=e,this.expressions=t},ThisExpression$1=function(){this.type=43},ThrowStatement$1=function(e){this.type=13,this.argument=e},TryStatement$1=function(e,t,n){this.type=14,this.block=e,this.handler=t,this.finalizer=n},unaryOperatorNumber={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},UnaryExpression$1=function(e,t){this.type=44,this.operator=unaryOperatorNumber[e],this.argument=t,this.prefix=!0},updateOperatorNumber={"++":1,"--":2},UpdateExpression$1=function(e,t,n){this.type=45,this.operator=updateOperatorNumber[e],this.argument=t,this.prefix=n},variableDeclarationKindNumber={var:1,let:2,const:3},VariableDeclaration$1=function(e,t){this.type=17,this.declarations=e,this.kind=variableDeclarationKindNumber[t]},VariableDeclarator$1=function(e,t){this.type=74,this.id=e,this.init=t},WhileStatement$1=function(e,t){this.type=15,this.test=e,this.body=t},WithStatement$1=function(e,t){this.type=16,this.object=e,this.body=t},YieldExpression=function(e,t){this.type=92,this.argument=e,this.delegate=t},Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Regex.NonAsciiIdentifierStart.test(Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Regex.NonAsciiIdentifierPart.test(Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isDecimalDigitChar:function(e){return 1===e.length&&Character.isDecimalDigit(e.charCodeAt(0))},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}};function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var Scanner=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};o={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n};r.push(o)}return r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(i)}return n}++this.index}else++this.index}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t};n.push(i)}return this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(Character.isWhiteSpace(n))++this.index;else if(Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343)t=1024*(t-55296)+n-56320+65536}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r<t;++r){if(this.eof()||!Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+hexValue(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.tryToScanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;if("}"===e)return null;for(;!this.eof()&&(e=this.source[this.index++],Character.isHexDigit(e.charCodeAt(0)));)t=16*t+hexValue(e);return t>1114111||"}"!==e?null:Character.fromCodePoint(t)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.tryToScanUnicodeCodePointEscape();return null===e?this.throwUnexpectedToken():e},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),Character.isIdentifierPart(t));)n+=e=Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=octalValue(e);return!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+octalValue(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+octalValue(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!==(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"??"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|?^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(Character.isIdentifierStart(t)||Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(Character.isIdentifierStart(this.source.charCodeAt(this.index))||Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];assert(Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,r="";!this.eof();){var i=this.source[this.index++];if(i===t){t="";break}if("\\"===i)if((i=this.source[this.index++])&&Character.isLineTerminator(i.charCodeAt(0)))++this.lineNumber,"\r"===i&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(i){case"u":if("{"===this.source[this.index])++this.index,r+=this.scanUnicodeCodePointEscape();else{var o=this.scanHexEscape(i);null===o&&this.throwUnexpectedToken(),r+=o}break;case"x":var a=this.scanHexEscape(i);null===a&&this.throwUnexpectedToken(Messages.InvalidHexEscapeSequence),r+=a;break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;case"8":case"9":r+=i,this.tolerateUnexpectedToken();break;default:if(i&&Character.isOctalDigit(i.charCodeAt(0))){var s=this.octalToDecimal(i);n=s.octal||n,r+=String.fromCharCode(s.code)}else r+=i}else{if(Character.isLineTerminator(i.charCodeAt(0)))break;r+=i}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:r,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,r="`"===this.source[n],i=!1,o=null,a=2;for(++this.index;!this.eof();){var s=this.source[this.index++];if("`"===s){a=1,i=!0,t=!0;break}if("$"===s){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=s}else{if(null!==o)continue;if("\\"===s)if(s=this.source[this.index++],Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;var u=this.tryToScanUnicodeCodePointEscape();null===u?o="u":e+=u}else{var c=this.scanHexEscape(s);null===c?o="u":e+=c}break;case"x":var l=this.scanHexEscape(s);null===l?o="x":e+=l;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===s?Character.isDecimalDigit(this.source.charCodeAt(this.index))?o="0":e+="\0":Character.isDecimalDigitChar(s)?o=s:e+=s}else Character.isLineTerminator(s.charCodeAt(0))?(++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=s}}return t||this.throwUnexpectedToken(),r||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-a),cooked:null===o?e:null,head:r,tail:i,notEscapeSequenceHead:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=this,r=e;t.indexOf("u")>=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(Messages.UnterminatedRegExp),t+=e;else if(Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||this.throwUnexpectedToken(Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t,t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r,"\\u";n<this.index;++n)this.source[n];else this.index=n,e+="u","\\u";this.tolerateUnexpectedToken()}else"\\",this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}(),TokenName={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},ArrowParameterPlaceHolder="ArrowParameterPlaceHolder",Parser=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.lastMarker.line,s=this.lastMarker.column+1;throw this.errorHandler.createError(o,a,s,i)},e.prototype.tolerateError=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.slice(),i=e.replace(/%(\d)/g,(function(e,t){return assert(t<r.length,"Message reference must be in range"),r[t]})),o=this.lastMarker.index,a=this.scanner.lineNumber,s=this.lastMarker.column+1;this.errorHandler.tolerateError(o,a,s,i)},e.prototype.unexpectedTokenError=function(e,t){var n,r=t||Messages.UnexpectedToken;if(e?(t||(r=2===e.type?Messages.UnexpectedEOS:3===e.type?Messages.UnexpectedIdentifier:6===e.type?Messages.UnexpectedNumber:8===e.type?Messages.UnexpectedString:10===e.type?Messages.UnexpectedTemplate:Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?r=Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(r=Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",r=r.replace("%0",n),e&&"number"==typeof e.lineNumber){var i=e.start,o=e.lineNumber,a=this.lastMarker.index-this.lastMarker.column,s=e.start-a+1;return this.errorHandler.createError(i,o,s,r)}i=this.lastMarker.index,o=this.lastMarker.line,s=this.lastMarker.column+1;return this.errorHandler.createError(i,o,s,r)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],r={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])};this.config.range&&(r.range=n.range),this.config.loc&&(r.loc=n.loc);var i={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(r,i)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,r=e.flags;t.regex={pattern:n,flags:r}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,r=e.lineNumber;return n<0&&(n+=t,r--),{index:e.start,line:r,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new Identifier$1(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new Literal$1(null,n));break;case 10:e=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new Identifier$1(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new ThisExpression$1)):e=this.matchKeyword("class")?this.parseClassExpression():this.matchImportCall()?this.parseImportCall():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new SpreadElement$1(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new ArrayExpression$1(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new Literal$1(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new Identifier$1(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return 64===e.type&&e.name===t||65===e.type&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(3===r.type){var l=r.value;this.nextToken(),a=this.match("["),i=(c=!(this.hasLineTerminator||"async"!==l||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new Identifier$1(l))}else this.match("*")?this.nextToken():(a=this.match("["),i=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!c&&"get"===r.value&&p)t="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod();else if(3===r.type&&!c&&"set"===r.value&&p)t="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&p)t="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!c)!a&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),o=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0;else if(3===r.type){l=this.finalize(n,new Identifier$1(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);o=this.finalize(n,new AssignmentPattern(l,h))}else u=!0,o=l}else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new Property(t,i,a,o,s,u))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.match("...")?this.parseSpreadElement():this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new ObjectExpression$1(t))},e.prototype.throwTemplateLiteralEarlyErrors=function(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,Messages.InvalidUnicodeEscapeSequence);case"x":return this.throwUnexpectedToken(e,Messages.InvalidHexEscapeSequence);case"8":case"9":return this.throwUnexpectedToken(e,Messages.TemplateEscape89);default:return this.throwUnexpectedToken(e,Messages.TemplateOctalLiteral)}},e.prototype.parseTemplateHead=function(e){assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateElement=function(e){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),n=this.nextToken();e.isTagged||null===n.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(n);var r=n.value,i=n.cooked;return this.finalize(t,new TemplateElement$1({raw:r,cooked:i},n.tail))},e.prototype.parseTemplateLiteral=function(e){var t=this.createNode(),n=[],r=[],i=this.parseTemplateHead(e);for(r.push(i);!i.tail;)n.push(this.parseExpression()),i=this.parseTemplateElement(e),r.push(i);return this.finalize(t,new TemplateLiteral$1(r,n))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case 64:case 39:case 69:case 61:default:break;case 70:e.type=69,this.reinterpretExpressionAsPattern(e.argument);break;case 30:e.type=60;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case 41:e.type=66;for(t=0;t<e.properties.length;t++){var n=e.properties[t];this.reinterpretExpressionAsPattern(70===n.type?n:n.value)}break;case 32:e.type=61,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:ArrowParameterPlaceHolder,params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),i.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(o=0;o<i.length;o++)this.reinterpretExpressionAsPattern(i[o]);r=!0,e={type:ArrowParameterPlaceHolder,params:i,async:!1}}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(r)break}r||(e=this.finalize(this.startNode(t),new SequenceExpression$1(i)))}if(!r){if(this.expect(")"),this.match("=>")&&(64===e.type&&"yield"===e.name&&(r=!0,e={type:ArrowParameterPlaceHolder,params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===e.type)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var a=37===e.type?e.expressions:[e];e={type:ArrowParameterPlaceHolder,params:a,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new Identifier$1(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var i=this.isolateCoverGrammar(this.parseLeftHandSideExpression),o=this.match("(")?this.parseArguments():[];e=new NewExpression$1(i,o),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.matchImportCall=function(){var e=this.matchKeyword("import");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=7===n.type&&"("===n.value}return e},e.prototype.parseImportCall=function(){var e=this.createNode();return this.expectKeyword("import"),this.finalize(e,new Import)},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),r=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var i=this.parseIdentifierName();e=this.finalize(this.startNode(t),new StaticMemberExpression(e,i))}else if(this.match("(")){var o=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var a=o?this.parseAsyncArguments():this.parseArguments();if(77===e.type&&1!==a.length&&this.tolerateError(Messages.BadImportCallArity),e=this.finalize(this.startNode(t),new CallExpression$1(e,a)),o&&this.match("=>")){for(var s=0;s<a.length;++s)this.reinterpretExpressionAsPattern(a[s]);e={type:ArrowParameterPlaceHolder,params:a,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(this.startNode(t),new ComputedMemberExpression(e,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(this.startNode(t),new TaggedTemplateExpression$1(e,u))}return this.context.allowIn=r,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new Super)},e.prototype.parseLeftHandSideExpression=function(){assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new ComputedMemberExpression(t,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");n=this.parseIdentifierName();t=this.finalize(e,new StaticMemberExpression(t,n))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new TaggedTemplateExpression$1(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),r=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment);var i=!0;e=this.finalize(n,new UpdateExpression$1(r.value,e,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&64===e.type&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var o=this.nextToken().value;i=!1;e=this.finalize(this.startNode(t),new UpdateExpression$1(o,e,i))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new UnaryExpression$1(n.value,e)),this.context.strict&&"delete"===e.operator&&64===e.argument.type&&this.tolerateError(Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(44!==t.type&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,r=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new BinaryExpression$1("**",n,r))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?12:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=!0,r=!0,i=function(e){"&&"!==e.value&&"||"!==e.value||(r=!1),"??"===e.value&&(n=!1)},o=this.lookahead,a=this.binaryPrecedence(o);if(a>0){i(o),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var s=[e,this.lookahead],u=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[u,o.value,c],p=[a];!((a=this.binaryPrecedence(this.lookahead))<=0);){for((n||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(r||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),i(this.lookahead);l.length>2&&a<=p[p.length-1];){c=l.pop();var h=l.pop();p.pop(),u=l.pop(),s.pop();var d=s[s.length-1],f=this.startNode(d,d.lineStart);l.push(this.finalize(f,new BinaryExpression$1(h,u,c)))}l.push(this.nextToken().value),p.push(a),s.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var g=l.length-1;t=l[g];for(var m=s.pop();g>1;){d=s.pop();var y=m&&m.lineStart;f=this.startNode(d,y),h=l[g-1];t=this.finalize(f,new BinaryExpression$1(h,l[g-2],t)),g-=2,m=d}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new ConditionalExpression$1(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case 64:this.validateParam(e,t,t.name);break;case 69:this.checkPatternParam(e,t.argument);break;case 61:this.checkPatternParam(e,t.left);break;case 60:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case 66:for(n=0;n<t.properties.length;n++){var r=t.properties[n];this.checkPatternParam(e,69===r.type?r:r.value)}}e.simple=e.simple&&t instanceof Identifier$1},e.prototype.reinterpretAsCoverFormalsList=function(e){var t=[e],n={simple:!0,paramSet:{}},r=!1;switch(e.type){case 64:break;case ArrowParameterPlaceHolder:t=e.params,r=e.async;break;default:return null}for(var i=0;i<t.length;++i){61===(o=t[i]).type?92===o.right.type&&(o.right.argument&&this.throwUnexpectedToken(this.lookahead),o.right.type=64,o.right.name="yield",delete o.right.argument,delete o.right.delegate):r&&64===o.type&&"await"===o.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,o),t[i]=o}if(this.context.strict||!this.context.allowYield)for(i=0;i<t.length;++i){var o;92===(o=t[i]).type&&this.throwUnexpectedToken(this.lookahead)}if(n.message===Messages.StrictParamDupe){var a=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(a,n.message)}return{simple:n.simple,params:t,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var r=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(r),e={type:ArrowParameterPlaceHolder,params:[r],async:!0}}if(e.type===ArrowParameterPlaceHolder||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,o=this.reinterpretAsCoverFormalsList(e);if(o){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var a=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=o.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=i;var l=this.startNode(t);this.expect("=>");var p=void 0;if(this.match("{")){var h=this.context.allowIn;this.context.allowIn=!0,p=this.parseFunctionSourceElements(),this.context.allowIn=h}else p=this.isolateCoverGrammar(this.parseAssignmentExpression);var d=76!==p.type;this.context.strict&&o.firstRestricted&&this.throwUnexpectedToken(o.firstRestricted,o.message),this.context.strict&&o.stricted&&this.tolerateUnexpectedToken(o.stricted,o.message),e=i?this.finalize(l,new AsyncArrowFunctionExpression(o.params,p,d)):this.finalize(l,new ArrowFunctionExpression$1(o.params,p,d)),this.context.strict=a,this.context.allowStrictDirective=s,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(Messages.InvalidLHSInAssignment),this.context.strict&&64===e.type){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(n,Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var g=(n=this.nextToken()).value,m=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new AssignmentExpression$1(g,e,m)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new SequenceExpression$1(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,Messages.IllegalImportDeclaration),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new BlockStatement$1(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&64===r.type&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&64!==r.type||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new VariableDeclarator$1(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new VariableDeclaration$1(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,a=!1;if(3===this.lookahead.type){var s=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new Identifier$1(s.value));if(this.match("=")){e.push(s),a=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(s),new AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(s),a=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new Property("init",n,o,r,!1,a))},e.prototype.parseRestProperty=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestProperty),this.match("}")||this.throwError(Messages.PropertyAfterRestProperty),this.finalize(n,new RestElement(r))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.match("...")?this.parseRestProperty(e,t):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new Identifier$1(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===n.type||e.inFor||this.expect("="),this.finalize(t,new VariableDeclarator$1(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new VariableDeclaration$1(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new EmptyStatement$1)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ExpressionStatement$1(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new IfStatement$1(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new DoWhileStatement$1(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new WhileStatement$1(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,o=null,a=!0,s=!1,u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.await||this.tolerateUnexpectedToken(this.lookahead),s=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var l=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!s&&1===l.length&&this.matchKeyword("in")){var p=l[0];p.init&&(60===p.id.type||66===p.id.type||this.context.strict)&&this.tolerateError(Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(r=this.finalize(r,new VariableDeclaration$1(l,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;l=this.parseBindingList(h,{inFor:!0});this.context.allowIn=c,1===l.length&&null===l[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===l.length&&null===l[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new VariableDeclaration$1(l,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,a=!1):(this.consumeSemicolon(),r=this.finalize(r,new VariableDeclaration$1(l,h)))}else r=this.finalize(r,new Identifier$1(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null}else{var d=this.lookahead,f=this.context.isBindingElement,g=this.context.isAssignmentTarget,m=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==r.type||this.tolerateError(Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,a=!1;else{if(this.context.isBindingElement=f,this.context.isAssignmentTarget=g,this.context.firstCoverInitializedNameError=m,this.match(",")){for(var y=[r];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(d),new SequenceExpression$1(y))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(o=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new EmptyStatement$1);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(u,new ForStatement$1(r,i,o,n)):a?this.finalize(u,new ForInStatement$1(e,t,n)):this.finalize(u,new ForOfStatement$1(e,t,n,s))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(Messages.IllegalContinue),this.finalize(e,new ContinueStatement$1(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(Messages.IllegalBreak),this.finalize(e,new BreakStatement$1(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new ReturnStatement$1(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new EmptyStatement$1)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new WithStatement$1(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new SwitchCase$1(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var o=this.parseSwitchCase();null===o.test&&(i&&this.throwError(Messages.MultipleDefaultsInSwitch),i=!0),r.push(o)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new SwitchStatement$1(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(64===n.type&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var o=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),o=this.parseClassDeclaration();else if(this.matchKeyword("function")){var a=this.lookahead,s=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(a,Messages.StrictFunction):s.generator&&this.tolerateUnexpectedToken(a,Messages.GeneratorInLegacyContext),o=s}else o=this.parseStatement();delete this.context.labelSet[i],e=new LabeledStatement$1(r,o)}else this.consumeSemicolon(),e=new ExpressionStatement$1(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new ThrowStatement$1(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i<t.length;i++){var o="$"+t[i].value;Object.prototype.hasOwnProperty.call(r,o)&&this.tolerateError(Messages.DuplicateBinding,t[i].value),r[o]=!0}this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Messages.StrictCatchVariable),this.expect(")");var a=this.parseBlock();return this.finalize(e,new CatchClause$1(n,a))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,r=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||r||this.throwError(Messages.NoCatchOrFinally),this.finalize(e,new TryStatement$1(t,n,r))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new DebuggerStatement$1)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,r=this.context.inIteration,i=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=r,this.context.inSwitch=i,this.context.inFunctionBody=o,this.finalize(e,new BlockStatement$1(t))},e.prototype.validateParam=function(e,t,n){var r="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,r)&&(e.stricted=t,e.message=Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,r,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[r]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(Messages.DefaultRestParameter),this.match(")")||this.throwError(Messages.ParameterAfterRestParameter),this.finalize(t,new RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),r=0;r<t.length;r++)this.validateParam(e,t[r],t[r].value);e.simple=e.simple&&n instanceof Identifier$1,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t={simple:!0,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var r,i=!n&&this.match("*");i&&this.nextToken();var o=null,a=null;if(!e||!this.match("(")){var s=this.lookahead;o=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(s.value)&&this.tolerateUnexpectedToken(s,Messages.StrictFunctionName):this.scanner.isRestrictedWord(s.value)?(a=s,r=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(s.value)&&(a=s,r=Messages.StrictReservedWord)}var u=this.context.await,c=this.context.allowYield;this.context.await=n,this.context.allowYield=!i;var l=this.parseFormalParameters(a),p=l.params,h=l.stricted;a=l.firstRestricted,l.message&&(r=l.message);var d=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,r),this.context.strict&&h&&this.tolerateUnexpectedToken(h,r),this.context.strict=d,this.context.allowStrictDirective=f,this.context.await=u,this.context.allowYield=c,n?this.finalize(t,new AsyncFunctionDeclaration(o,p,g)):this.finalize(t,new FunctionDeclaration$1(o,p,g,i))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,r=!t&&this.match("*");r&&this.nextToken();var i,o=null,a=this.context.await,s=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!r,!this.match("(")){var u=this.lookahead;o=this.context.strict||r||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(i=u,n=Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(i=u,n=Messages.StrictReservedWord)}var c=this.parseFormalParameters(i),l=c.params,p=c.stricted;i=c.firstRestricted,c.message&&(n=c.message);var h=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var f=this.parseFunctionSourceElements();return this.context.strict&&i&&this.throwUnexpectedToken(i,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=h,this.context.allowStrictDirective=d,this.context.await=a,this.context.allowYield=s,t?this.finalize(e,new AsyncFunctionExpression(o,l,f)):this.finalize(e,new FunctionExpression$1(o,l,f,r))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),r=65===n.type?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,r?new Directive(n,r):new ExpressionStatement$1(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var r=this.parseDirective();t.push(r);var i=r.directive;if("string"!=typeof i)break;"use strict"===i?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(Messages.BadSetterArity):n.params[0]instanceof RestElement&&this.tolerateError(Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,false))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new FunctionExpression$1(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,o=null,a=!1,s=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(a=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,u=!0,a=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var l=this.lookahead.value;":"!==l&&"("!==l&&"*"!==l&&(c=!0,t=this.lookahead,a=this.match("["),i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(r="get",a=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,o=this.parseGetterMethod()):"set"===t.value&&p&&(r="set",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(r="init",a=this.match("["),i=this.parseObjectPropertyKey(),o=this.parseGeneratorMethod(),s=!0),!r&&i&&this.match("(")&&(r="init",o=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),a||(u&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,Messages.StaticPrototype),!u&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!s||o&&o.generator)&&this.throwUnexpectedToken(t,Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new MethodDefinition(i,a,o,r,u))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new Literal$1(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){n=this.parseClassDeclaration(!0);e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();e=this.finalize(t,new ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(Messages.UnexpectedToken,this.lookahead.value);n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),e=this.finalize(t,new ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new ExportAllDeclaration(i))}else if(4===this.lookahead.type){n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){n=this.parseFunctionDeclaration();e=this.finalize(t,new ExportNamedDeclaration(n,[],null))}else{var o=[],a=null,s=!1;for(this.expect("{");!this.match("}");)s=s||this.matchKeyword("default"),o.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),a=this.parseModuleSpecifier(),this.consumeSemicolon();else if(s){r=this.lookahead.value?Messages.UnexpectedToken:Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}else this.consumeSemicolon();e=this.finalize(t,new ExportNamedDeclaration(null,o,a))}return e},e}(),Reader=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","??","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!0,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),Tokenizer=function(){function e(e,t){this.errorHandler=new ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new Reader}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],r=this.scanner.source.slice(n.slice[0],n.slice[1]),i={type:n.multiLine?"BlockComment":"LineComment",value:r};this.trackRange&&(i.range=n.range),this.trackLoc&&(i.loc=n.loc),this.buffer.push(i)}if(!this.scanner.eof()){var o=void 0;this.trackLoc&&(o={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var a=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var s=this.scanner.saveState();try{a=this.scanner.scanRegExp()}catch(n){this.scanner.restoreState(s),a=this.scanner.lex()}}else a=this.scanner.lex();this.reader.push(a);var u={type:TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(u.range=[a.start,a.end]),this.trackLoc&&(o.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=o),9===a.type){var c=a.pattern,l=a.flags;u.regex={pattern:c,flags:l}}this.buffer.push(u)}}return this.buffer.shift()},e}();function parse(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},o="function"==typeof n?i:null,a=!1;if(t){a="boolean"==typeof t.comment&&t.comment;var s="boolean"==typeof t.attachComment&&t.attachComment;(a||s)&&((r=new CommentHandler).attach=s,t.comment=!0,o=i)}var u=!1;t&&"string"==typeof t.sourceType&&(u="module"===t.sourceType);var c=new Parser(e,t,o),l=u?c.parseModule():c.parseScript();return a&&r&&(l.comments=r.comments),c.config.tokens&&(l.tokens=c.tokens),c.config.tolerant&&(l.errors=c.errorHandler.errors),l}function parseModule(e,t,n){var r=t||{};return r.sourceType="module",parse(e,r,n)}function parseScript(e,t,n){var r=t||{};return r.sourceType="script",parse(e,r,n)}function tokenize(e,t,n){var r=new Tokenizer(e,t),i=[];try{for(;;){var o=r.getNextToken();if(!o)break;n&&(o=n(o)),i.push(o)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i}var C_COMPLETION_RETURN={type:"return",value:void 0},C_COMPLETION_CONTINUE={type:"continue",value:null},C_COMPLETION_BREAK={type:"break",value:null},NOINIT=createSymbol("noinit"),DEADZONE=createSymbol("deadzone");function createSymbol(e){return e+Math.random().toString(36).substring(2)}function getGetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.get)return n.get;e=getPrototypeOf(e)}}function getSetter(e,t){for(;e;){var n=getOwnPropertyDescriptor(e,t);if(n&&n.set)return n.set;e=getPrototypeOf(e)}}var hostGlobalObject="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function isCompletionRecord(e){return e===C_COMPLETION_RETURN||e===C_COMPLETION_BREAK||e===C_COMPLETION_CONTINUE}function createSandbox(){var e={};return["Object","Function","Array","Number","Boolean","String","RegExp","Promise","Date","Map","Set","WeakMap","WeakSet","NaN","JSON","Math","eval","isFinite","isNaN","clearTimeout","setTimeout","clearInterval","setInterval","console","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","parseFloat","parseInt","Symbol","Infinity"].forEach((function(t){void 0!==hostGlobalObject[t]&&(e[t]=hostGlobalObject[t])})),e}var errorMessage={notImplemented:"%0 isn't implemented",unexpectedToken:"Unexpected token",deleteUnqualified:"Delete of an unqualified identifier in strict mode",identifierDeclared:"Identifier %0 has already been declared",assignmentToConst:"Assignment to constant variable",notFunction:"%0 is not a function",convertNullToObject:"Cannot convert undefined or null to object",notDefined:"%0 is not defined",notIterable:"%0 is not iterable"};function createTypeErrorByMessage(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.reduce((function(e,t,n){return e.replace("%".concat(n),t)}),errorMessage[e]);return new TypeError(r)}function createReferenceErrorByMessage(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.reduce((function(e,t,n){return e.replace("%".concat(n),t)}),errorMessage[e]);return new ReferenceError(r)}function createSyntaxErrorByMessage(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t.reduce((function(e,t,n){return e.replace("%".concat(n),t)}),errorMessage[e]);return new SyntaxError(r)}var VariableAccessor=function(){function e(e,t){this.kind=e,this.value=t}return e.prototype.set=function(e){return this.value=e},e.prototype.strictSet=function(e){"use strict";return this.value=e},e}(),ConstVariableAccessor=function(){function e(e,t){this.value=t,this.kind=3}return e.prototype.set=function(){throw createTypeErrorByMessage("assignmentToConst")},e.prototype.strictSet=function(){throw createTypeErrorByMessage("assignmentToConst")},e}(),VariableAccecssorMappingGlobal=function(){function e(e,t){this.globalObject=e,this.globalKey=t,this.kind=1}return Object.defineProperty(e.prototype,"value",{get:function(){return this.globalObject[this.globalKey]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.globalObject[this.globalKey]=e},e.prototype.strictSet=function(e){"use strict";return this.globalObject[this.globalKey]=e},e}(),PropertyAccessor=function(){function e(e,t){this.object=e,this.property=t}return Object.defineProperty(e.prototype,"value",{get:function(){return this.object[this.property]},enumerable:!1,configurable:!0}),e.prototype.set=function(e){return this.object[this.property]=e},e.prototype.strictSet=function(e){"use strict";return this.object[this.property]=e},e.prototype.delete=function(){return delete this.object[this.property]},e.prototype.strictDelete=function(){"use strict";return delete this.object[this.property]},e}(),GlobalObjectAccessor=function(){function e(e){this.globalObject=e,this.propertyAccessors=Object.create(null)}return e.prototype.getProperty=function(e){var t=this.propertyAccessors[e];return t||(t=this.propertyAccessors[e]=new PropertyAccessor(this.globalObject,e)),t},e.prototype.deleteProperty=function(e){return delete this.globalObject[e]},e}(),RuntimeScope=function(){function e(e,t,n){this.engine=e,this.compileScope=n,this.strict=!1,this.isolated=!0,this.context=Object.create(null),this.parent=t,this.strict=n.strict}return e.prototype.getCompileScope=function(){return this.compileScope},e.prototype.find=function(e){var t=this.context[e];return t||(this.parent?this.parent.find(e):void 0)},e.prototype.var=function(e,t){var n=this.context,r=n[e];r?t!==NOINIT&&r.set(t):n[e]=new VariableAccessor(1,t===NOINIT?void 0:t)},e.prototype.let=function(e,t){var n=this.context[e];if(n){if(n.value!==DEADZONE)throw createSyntaxErrorByMessage("identifierDeclared",e);n.set(t)}else this.context[e]=new VariableAccessor(2,t)},e.prototype.const=function(e,t){var n=this.context[e];if(n&&n.value!==DEADZONE)throw createSyntaxErrorByMessage("identifierDeclared",e);this.context[e]=new ConstVariableAccessor(3,t)},e.prototype.func=function(e,t){var n=this.context,r=n[e];r?this.strict?r.strictSet(t):r.set(t):n[e]=new VariableAccessor(1,t)},e.prototype.declare=function(e,t,n){switch(e){case 1:this.var(t,n);break;case 2:this.let(t,n);break;case 3:this.const(t,n)}},e}(),BlockRuntimeScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];if(i)t!==NOINIT&&i.set(t);else{var o=t===NOINIT?void 0:t;r[e]=new VariableAccessor(1,o)}},t.prototype.func=function(e,t){for(var n=this;!n.isolated&&n.parent;)n=n.parent;var r=n.context,i=r[e];i?n.strict?i.strictSet(t):i.set(t):r[e]=new VariableAccessor(1,t)},t}(RuntimeScope),GlobalRuntimeScope=function(e){function t(t,n,r){var i=e.call(this,t,null,r)||this;return i.engine=t,i.globalObject=n,i.objectBindings=createDefaultGlobalObjectBindings(n),i}return __extends(t,e),t.prototype.var=function(e,t){var n=this.context,r=n[e];if(r)t!==NOINIT&&r.set(t);else{var i=t===NOINIT?void 0:t,o=n.this.value,a=new VariableAccecssorMappingGlobal(o,e);n[e]=a,e in o?t!==NOINIT&&a.set(i):defineProperty(o,e,{value:i,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.func=function(e,t){var n=this.context,r=n[e];if(r)this.strict?r.strictSet(t):r.set(t);else{var i=n.this.value,o=new VariableAccecssorMappingGlobal(i,e);n[e]=o,e in i?this.strict?o.strictSet(t):o.set(t):defineProperty(i,e,{value:t,writable:!0,enumerable:!0,configurable:!1})}},t.prototype.find=function(e){var t;return(t=this.context[e])?t:(t=this.objectBindings[e])||(e in this.globalObject?this.objectBindings[e]=new VariableAccecssorMappingGlobal(this.globalObject,e):void 0)},t}(RuntimeScope);function createDefaultGlobalObjectBindings(e){var t=Object.create(null);return t.String={kind:1,get value(){return e.String},set:function(t){return e.String=t},strictSet:function(t){"use strict";return e.String=t}},t.Function={kind:1,get value(){return e.Function},set:function(t){return e.Function=t},strictSet:function(t){"use strict";return e.Function=t}},t.Array={kind:1,get value(){return e.Array},set:function(t){return e.Array=t},strictSet:function(t){"use strict";return e.Array=t}},t.Number={kind:1,get value(){return e.Number},set:function(t){return e.Number=t},strictSet:function(t){"use strict";return e.Number=t}},t.Object={kind:1,get value(){return e.Object},set:function(t){return e.Object=t},strictSet:function(t){"use strict";return e.Object=t}},t.setTimeout={kind:1,get value(){return e.setTimeout},set:function(t){return e.setTimeout=t},strictSet:function(t){"use strict";return e.setTimeout=t}},t.clearTimeout={kind:1,get value(){return e.clearTimeout},set:function(t){return e.clearTimeout=t},strictSet:function(t){"use strict";return e.clearTimeout=t}},t.setInterval={kind:1,get value(){return e.setInterval},set:function(t){return e.setInterval=t},strictSet:function(t){"use strict";return e.setInterval=t}},t.clearInterval={kind:1,get value(){return e.clearInterval},set:function(t){return e.clearInterval=t},strictSet:function(t){"use strict";return e.clearInterval=t}},t.console={kind:1,get value(){return e.console},set:function(t){return e.console=t},strictSet:function(t){"use strict";return e.console=t}},t}var WithRuntimeScope=function(e){function t(t,n,r,i){var o=e.call(this,t,n,i)||this;return o.withObject=r,o}return __extends(t,e),t.prototype.find=function(e){return this.context[e]?this.context[e]:e in this.withObject?new PropertyAccessor(this.withObject,e):this.parent?this.parent.find(e):void 0},t.prototype.var=function(t,n){t in this.withObject?this.withObject[t]=n:e.prototype.var.call(this,t,n)},t}(BlockRuntimeScope),CompileScope=function(){function e(e,t){this.engine=e,this.strict=!1,this.isolated=!0,this.context=new Map,this.contexts=[],this.parent=t,t&&t.strict&&(this.strict=!0)}return e.prototype.var=function(e,t){var n=this.context,r=n.get(e);r||(n.set(e,{kind:1,index:n.size,cvalue:t}),this.contexts.push(e))},e.prototype.let=function(e,t){var n=this.context,r=n.get(e);if(r){if(r.cvalue!==DEADZONE)throw createSyntaxErrorByMessage("identifierDeclared",e)}else this.context.set(e,{kind:2,index:n.size,cvalue:t}),this.contexts.push(e)},e.prototype.const=function(e,t){var n=this.context,r=n.get(e);if(r){if(r.cvalue!==DEADZONE)throw createSyntaxErrorByMessage("identifierDeclared",e)}else this.context.set(e,{kind:3,index:n.size,cvalue:t}),this.contexts.push(e)},e.prototype.func=function(e){var t=this.context,n=t.get(e);n||(t.set(e,{kind:1,index:t.size,cvalue:void 0}),this.contexts.push(e))},e.prototype.declare=function(e,t,n){switch(e){case 1:this.var(t,n);break;case 2:this.let(t,n);break;case 3:this.const(t,n)}},e.prototype.createRuntimeScope=function(e,t){return new RuntimeScope(e,t,this)},e}(),BlockCompileScope=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isolated=!1,t}return __extends(t,e),t.prototype.var=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.var(e)},t.prototype.func=function(e){for(var t=this;!t.isolated&&t.parent;)t=t.parent;t.func(e)},t.prototype.createRuntimeScope=function(e,t){return new BlockRuntimeScope(e,t,this)},t}(CompileScope),WithCompileScope=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.engine=t,r}return __extends(t,e),t.prototype.createRuntimeScope=function(e,t,n){return new WithRuntimeScope(e,t,n,this)},t}(BlockCompileScope),GlobalCompileScope=function(e){function t(t){var n=e.call(this,t,null)||this;return n.engine=t,n}return __extends(t,e),t.prototype.var=function(t){return e.prototype.var.call(this,t)},t.prototype.func=function(t){return e.prototype.func.call(this,t)},t}(CompileScope);function noop$1(){}function returnUndefined(){}function combineCallable(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n){return e(n),t(n)}:e:t}function combineCallableWithOptions(e,t){return e!==noop$1&&e?t!==noop$1&&t?function(n,r){return e(n,r),t(n,r)}:e:t}function XInlineObjectPattern(e,t,n,r){for(var i=r.kind,o=noop$1,a=t.properties,s=function(t){var r,s=a[t];if(68===s.type){var u;u=s.computed?createEvaluate(e,s.key,n):function(){return s.key.name};var c=s.value;if(64===c.type)i&&n.declare(i,c.name),r=function(e,t){var n=t.feed,r=t.key;if(i)e.declare(i,c.name,n[r]);else{var o=ZInlineIdentifierAccessor(c.name,e,0);o&&o.set(n[r])}};else{var l=XInlinePattern(e,c,n,{kind:i});r=function(e,t){var n=t.feed,r=t.key;return l(e,{feed:n[r]})}}o=combineCallableWithOptions(o,(function(e,t){var n=t.feed,i=t.fedKeys,o=u(e);return i.push(o),r(e,{fedKeys:i,feed:n,key:o})}))}else{var p=XInlineRestElement(e,s,n,{kind:i});o=combineCallableWithOptions(o,(function(e,t){for(var n=t.feed,r=t.fedKeys,i=assignObject({},n),o=0;o<r.length;o++)delete i[r[o]];return p(e,{feed:i})}))}},u=0;u<a.length;u++)s(u);return function(e,t){var n=t.feed;return o(e,{feed:n,fedKeys:[]})}}function XInlineArrayPattern(e,t,n,r){for(var i=r.kind,o=t.elements,a=noop$1,s=function(t){var r=o[t];if(!r)return"continue";if(64===r.type)i?(n.declare(i,r.name),a=combineCallableWithOptions(a,(function(e,n){var o=n.feed;e.declare(i,r.name,o[t])}))):a=combineCallableWithOptions(a,(function(e,n){var i=n.feed,o=n.result,a=ZInlineIdentifierAccessor(r.name,e,0);a&&(a.set(i[t]),o.push(a.value))}));else if(69===r.type){var s=XInlineRestElement(e,r,n,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var r=n.feed;return s(e,{feed:r.slice(t)})}))}else{var u=XInlinePattern(e,r,n,{kind:i});a=combineCallableWithOptions(a,(function(e,n){var r=n.feed;return u(e,{feed:r[t]})}))}},u=0;u<o.length;u++)s(u);return function(e,t){var n=t.feed,r=[];if(a(e,{feed:void 0===n?[]:n,result:r}),r.length)return r}}function XInlineFunctionArguments(e,t,n){for(var r=t.params,i=noop$1,o=function(e){var t=r[e];n.var(t.name),i=combineCallableWithOptions(i,(function(n,r){n.var(t.name,r[e])}))},a=0;a<r.length;a++)o(a);return i}function XInlineRestElement(e,t,n,r){var i=r.kind,o=t.argument;if(64===o.type)return i?(n.declare(i,o.name),function(e,t){var n=t.feed,r=void 0===n?[]:n;e.declare(i,o.name,r)}):function(e,t){var n=t.feed,r=void 0===n?[]:n,i=ZInlineIdentifierAccessor(o.name,e,0);i&&i.set(r)};var a=XInlinePattern(e,o,n,{kind:i});return function(e,t){var n=t.feed;return a(e,{feed:void 0===n?[]:n})}}function XInlineAssignmentPattern(e,t,n,r){var i,o=r.kind,a=createEvaluate(e,t.right,n),s=t.left;return 64===s.type?o?(n.declare(o,s.name),i=function(e,t){var n=t.feed;e.declare(o,s.name,n)}):i=function(e,t){var n=t.feed,r=ZInlineIdentifierAccessor(s.name,e,0);r&&r.set(n)}:i=XInlinePattern(e,s,n,{kind:o}),function(e,t){var n=t.feed,r=void 0===n?a(e):n;return i(e,{feed:r})}}function XInlinePattern(e,t,n,r){switch(t.type){case 66:return XInlineObjectPattern(e,t,n,r);case 60:return XInlineArrayPattern(e,t,n,r);case 69:return XInlineRestElement(e,t,n,r);case 61:return XInlineAssignmentPattern(e,t,n,r);default:throw createSyntaxErrorByMessage("unexpectedToken")}}function XRuntimeScopeHoistPattern(e,t,n,r){var i=noop$1;switch(t.type){case 66:for(var o=t.properties,a=function(t){var a=o[t];if(68===a.type){var s=a.value;64===s.type?(n.declare(r,s.name,1===r?NOINIT:DEADZONE),i=combineCallable(i,(function(e){e.declare(r,s.name,1===r?NOINIT:DEADZONE)}))):i=combineCallable(i,XRuntimeScopeHoistPattern(e,s,n,r))}else i=combineCallable(i,XRuntimeScopeHoistPattern(e,a,n,r))},s=0;s<o.length;s++)a(s);break;case 60:var u=t.elements,c=function(t){var o=u[t];o&&(64===o.type?(n.declare(r,o.name,1===r?NOINIT:DEADZONE),i=combineCallable(i,(function(e){e.declare(r,o.name,1===r?NOINIT:DEADZONE)}))):i=combineCallable(i,XRuntimeScopeHoistPattern(e,o,n,r)))};for(s=0;s<u.length;s++)c(s);break;case 69:var l=t.argument;64===l.type?(n.declare(r,l.name,1===r?NOINIT:DEADZONE),i=combineCallable(i,(function(e){e.declare(r,l.name,1===r?NOINIT:DEADZONE)}))):i=combineCallable(i,XRuntimeScopeHoistPattern(e,l,n,r));break;case 61:var p=t.left;64===p.type?(n.declare(r,p.name,1===r?NOINIT:DEADZONE),i=combineCallable(i,(function(e){e.declare(r,p.name,1===r?NOINIT:DEADZONE)}))):i=combineCallable(i,XRuntimeScopeHoistPattern(e,p,n,r));break;default:throw createSyntaxErrorByMessage("unexpectedToken")}return i}function checkStrictInBody(e){for(var t=0;t<e.length;t++){var n=e[t];if(5===n.type){var r="use strict"===n.directive;if(r)return r}}return!1}function XCreateFunction(e,t,n){if(t.generator||t.async)throw new Error(errorMessage.notImplemented.replace("%0","Generator or async function"));var r,i=31===t.type,o=e.runtimeProfile,a=o.scriptId,s=t.params.length,u=t.body,c=new CompileScope(e,n),l=76===u.type&&checkStrictInBody(u.body);(n.strict||l)&&(c.strict=!0),i||(c.const("this"),c.var("arguments"));var p=XInlineFunctionArguments(e,t,c);if(76===u.type){var h=XRuntimeScopeHoist(e,u,c,0),d=XInlineBlockStatement(e,u,c,3);r=combineCallable(h,d)}else{var f=createEvaluate(e,u,c);r=function(e){var t=f(e);return i&&(C_COMPLETION_RETURN.value=t,t=C_COMPLETION_RETURN),t}}return n.strict||l?function(n){var u=function(){"use strict";var s=c.createRuntimeScope(e,n),l=o.scriptId;o.scriptId=a,o.pushCallFrame({functionName:u.name,functionScope:s,functionNode:t}),i||(s.const("this",this),s.const("arguments",arguments));try{p(s,arguments);var h=r(s);if(o.popCallFrame(),o.scriptId=l,h===C_COMPLETION_RETURN)return h.value}catch(t){var d=e.inspector;if(d&&!o.callExpressionStack.length){var f=getBoatmanSymbol(t,"__rewrittenzxcd");f&&f.node&&(d.shouldPauseOnException(a,t,f.node,!0),d.throwException(t))}throw o.popCallFrame(),o.scriptId=l,t}},l=u;return setupFunc(l,e,t,s),l}:function(n){var u=function(){var s=c.createRuntimeScope(e,n),l=o.scriptId;o.scriptId=a,o.pushCallFrame({functionName:u.name,functionScope:s,functionNode:t}),i||(s.const("this",this),s.var("arguments",arguments));try{p(s,arguments);var h=r(s);if(o.popCallFrame(),o.scriptId=l,h===C_COMPLETION_RETURN)return h.value}catch(t){var d=e.inspector;if(d&&!o.callExpressionStack.length){var f=getBoatmanSymbol(t,"__rewrittenzxcd");f&&f.node&&(d.shouldPauseOnException(a,t,f.node,!0),d.throwException(t))}throw o.popCallFrame(),o.scriptId=l,t}},l=u;return setupFunc(l,e,t,s),l}}function setupFunc(e,t,n,r){var i=n.id&&n.id.name||"";isFunctionNameConfigurable&&defineProperties(e,{name:{value:i,configurable:!0},length:{value:r,configurable:!0}}),setBoatmanSymbol(e,"___func_locationxasdzzy",{node:n,scriptId:t.runtimeProfile.scriptId}),defineProperty(e,"toString",{value:function(){return"function ".concat(i,"() { ... }")},writable:!0,configurable:!0})}function XRuntimeScopeHoist(e,t,n,r){var i=t.body,o=!1;n.strict||(o=checkStrictInBody(i),n.strict=o);for(var a=noop$1,s=function(t){var r=i[t];if(63===r.type){n.func(r.id.name);var o=XCreateFunction(e,r,n);a=combineCallable(a,(function(e){return e.func(r.id.name,o(e))}))}else a=combineCallable(a,XRuntimeScopeHoistVarRecursion(e,r,n))},u=0;u<i.length;u++)s(u);return o?function(e){e.strict=!0,a(e)}:function(e){a(e)}}function XRuntimeScopeHoistVarRecursion(e,t,n){var r=noop$1;switch(t.type){case 17:r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t,n));break;case 6:case 7:17===t.left.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.left,n)));case 8:8===t.type&&t.init&&17===t.init.type&&(r=combineCallable(r,XRuntimeScopeVariableDeclaration4Hoisting(e,t.init,n)));case 15:case 4:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.body,n));break;case 9:r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.consequent,n)),t.alternate&&(r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,t.alternate,n)));break;case 76:for(var i=t.body,o=0;o<i.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,i[o],n));break;case 12:var a=t.cases;for(o=0;o<a.length;o++)for(var s=a[o].consequent,u=0;u<s.length;u++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,s[u],n));break;case 14:var c=t.block.body;for(o=0;o<c.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,c[o],n));var l=t.handler&&t.handler.body.body;if(l)for(o=0;o<l.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,l[o],n));var p=t.finalizer&&t.finalizer.body;if(p)for(o=0;o<p.length;o++)r=combineCallable(r,XRuntimeScopeHoistVarRecursion(e,p[o],n))}return r}function XRuntimeScopeVariableDeclaration4Hoisting(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];1===o&&(n.var(t.id.name,NOINIT),r=combineCallable(r,(function(e){e.var(t.id.name,NOINIT)})))},s=0;s<i.length;s++)a(s);return r}function XRuntimeScopeVariableDeclaration4HoistingLetConst(e,t,n){for(var r=noop$1,i=t.declarations,o=t.kind,a=function(e){var t=i[e];n.declare(o,t.id.name,DEADZONE),r=combineCallable(r,(function(e){e.declare(o,t.id.name,DEADZONE)}))},s=0;s<i.length;s++)a(s);return r}function Program(e,t,n){for(var r=XRuntimeScopeHoist(e,t,n,0),i=[],o=t.body,a=0;a<o.length;a++)i[a]=createEvaluate(e,o[a],n);return function(n){r(n);var o=e.runtimeProfile;o.pushCallFrame({functionName:"",functionNode:t,functionScope:n});try{for(var a=void 0,s=0;s<i.length;s++)a=i[s](n);return o.popCallFrame(),a}catch(e){throw o.popCallFrame(),e}}}function Identifier(e,t,n,r){var i=t.name;return"undefined"===i?function(){}:function(e){var t=e.find(i);if(t)return t.value;if(!r)throw createReferenceErrorByMessage("notDefined",i)}}function XIdentifierAccessor(e,t){if("undefined"!==e)return t?function(t){var n=t.find(e);return n||void 0}:function(t){var n=t.find(e);if(n)return n;throw createReferenceErrorByMessage("notDefined",e)}}function ZInlineIdentifierAccessor(e,t,n){if("undefined"!==e){var r=t.find(e);if(r)return r;if(!n)throw createReferenceErrorByMessage("notDefined",e)}}function Literal(e,t,n){return function(e){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var n=t.regex,r=n.pattern,i=n.flags;return new RegExp(r,i)}return t.value}}function FunctionDeclaration(){return noop$1}function VariableDeclaration(e,t,n){for(var r=t.declarations,i=t.kind,o=[],a=0;a<r.length;a++)o[a]=VariableDeclarator(e,r[a],n,i);return function(e){for(var t=0;t<o.length;t++)o[t](e)}}function VariableDeclarator(e,t,n,r){var i=t.init,o=i?createEvaluate(e,i,n):noop$1,a=t.id.name;return i&&n.var(a),function(e){var n=o(e),r=t.id.name;i&&e.var(r,n),!i||36!==i.type&&31!==i.type||!isFunctionNameConfigurable||n.name||defineProperty(n,"name",{value:r,configurable:!0})}}function XInlineVariableDeclarationWithInitializer(e,t,n){for(var r=t.declarations,i=t.kind,o=0;o<r.length;o++){var a=r[o].id;n.declare(i,a.name)}return function(e,n){for(var r=t.declarations,i=t.kind,o=0;o<r.length;o++){var a=r[o].id;e.declare(i,a.name,n)}}}var functionPrototypeApply=Function.prototype.apply;function ThisExpression(e,t,n){return function(e){return e.find("this").value}}function XInlineSpreadElement(e,t,n){for(var r=t,i=r.length,o=new Array(i),a=0;a<i;a++){var s=r[a];null===s||(o[a]=createEvaluate(e,s,n))}return function(e){for(var t=new Array(i),n=0;n<i;n++){null!==r[n]&&(t[n]=o[n](e))}return t}}function ArrayExpression(e,t,n){var r=XInlineSpreadElement(e,t.elements,n);return function(e){return r(e)}}function ObjectExpression(e,t,n){for(var r=t.properties,i=[],o=[],a=function(t){var a=r[t],s=a.key,u=void 0;u=64===s.type?function(){return s.name}:function(){return s.value+""},i[t]=u;var c=a.value;o[t]=createEvaluate(e,c,n)},s=0;s<r.length;s++)a(s);return function(e){for(var n={},r=t.properties,a=0;a<r.length;a++){0;var s=i[a](e),u=o[a](e),c=r[a],l=c.value;36!==l.type&&31!==l.type||isFunctionNameConfigurable&&defineProperty(u,"name",{value:s,configurable:!0});var p=c.kind;if("init"===p)n[s]=u;else if("get"===p){var h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:u,set:h&&h.set,enumerable:!0,configurable:!0})}else{h=getOwnPropertyDescriptor(n,s);defineProperty(n,s,{get:h&&h.get,set:u,enumerable:!0,configurable:!0})}}return n}}function FunctionExpression(e,t,n){var r;t.id&&t.id.name?(r=new BlockCompileScope(e,n)).const(t.id.name):r=n;var i=XCreateFunction(e,t,r);return t.id&&t.id.name?function(n){var o=r.createRuntimeScope(e,n),a=i(o);return o.const(t.id.name,a),a}:function(e){return i(e)}}function UnaryExpression(e,t,n){if(6===t.operator){var r,i=t.argument;return r=64===i.type?Identifier(e,i,n,1):createEvaluate(e,i,n),function(e){return typeof r(e)}}if(7===t.operator){var o,a=t.argument;if(39===a.type){var s=XInlineMemberExpressionAccessor(e,a,n);o=n.strict?function(e){return s(e).strictDelete()}:function(e){return s(e).delete()}}else o=64===a.type?function(t){if(t.strict)throw createSyntaxErrorByMessage("deleteUnqualified");for(var n=t,r=a.name;n&&!n.context[r];)n=n.parent;if(n){if(n.parent||1!==n.context[r].kind)return!1;var i=e.globalObjectAccessor.deleteProperty(r);return i&&delete n.context[r],i}return e.globalObjectAccessor.deleteProperty(r)}:combineCallable(createEvaluate(e,a,n),(function(){return!0}));return o}var u=t.argument,c=createEvaluate(e,u,n);switch(t.operator){case 3:return function(e){return!c(e)};case 1:return function(e){return+c(e)};case 2:return function(e){return-c(e)};case 4:return function(e){return~c(e)};case 5:return function(e){c(e)};default:throw createSyntaxErrorByMessage("unexpectedToken")}}function UpdateExpression(e,t,n){var r,i=t.argument;switch(i.type){case 64:var o=XIdentifierAccessor(i.name,0);r=o||function(e){};break;case 39:r=XInlineMemberExpressionAccessor(e,i,n);break;default:throw createSyntaxErrorByMessage("unexpectedToken")}switch(t.operator){case 1:return n.strict?t.prefix?function(e){var t=r(e),n=t.value;return n++,t.strictSet(n),n}:function(e){var t=r(e),n=t.value,i=n++;return t.strictSet(n),i}:t.prefix?function(e){var t=r(e),n=t.value;return n++,t.set(n),n}:function(e){var t=r(e),n=t.value,i=n++;return t.set(n),i};case 2:return n.strict?t.prefix?function(e){var t=r(e),n=t.value;return n--,t.strictSet(n),n}:function(e){var t=r(e),n=t.value,i=n--;return t.strictSet(n),i}:t.prefix?function(e){var t=r(e),n=t.value;return n--,t.set(n),n}:function(e){var t=r(e),n=t.value,i=n--;return t.set(n),i};default:throw createSyntaxErrorByMessage("unexpectedToken")}}function BinaryExpression(e,t,n){var r=createEvaluate(e,t.left,n),i=createEvaluate(e,t.right,n);switch(t.operator){case 1:return function(e){return r(e)==i(e)};case 2:return function(e){return r(e)!=i(e)};case 3:return function(e){return r(e)===i(e)};case 4:return function(e){return r(e)!==i(e)};case 5:return function(e){return r(e)<i(e)};case 6:return function(e){return r(e)<=i(e)};case 7:return function(e){return r(e)>i(e)};case 8:return function(e){return r(e)>=i(e)};case 12:return function(e){return r(e)+i(e)};case 13:return function(e){return r(e)-i(e)};case 14:return function(e){return r(e)*i(e)};case 16:return function(e){return r(e)/i(e)};case 17:return function(e){return r(e)%i(e)};case 22:return function(e){return r(e)instanceof i(e)};case 18:return function(e){return r(e)|i(e)};case 19:return function(e){return r(e)^i(e)};case 20:return function(e){return r(e)&i(e)};case 9:return function(e){return r(e)<<i(e)};case 10:return function(e){return r(e)>>i(e)};case 21:return function(e){return r(e)in i(e)};case 11:return function(e){return r(e)>>>i(e)};case 15:return function(e){var t=r(e),n=i(e);return Math.pow(t,n)};default:throw createSyntaxErrorByMessage("unexpectedToken")}}function AssignmentExpression(e,t,n){var r,i,o=createEvaluate(e,t.right,n),a=t.left;switch(a.type){case 64:var s=XIdentifierAccessor(a.name,n.strict?0:1);r=s?function(t){var n=s(t);return n||(n=e.globalObjectAccessor.getProperty(a.name)),n}:function(t){return e.globalObjectAccessor.getProperty(a.name)};break;case 39:r=XInlineMemberExpressionAccessor(e,a,n);break;default:throw createSyntaxErrorByMessage("unexpectedToken")}if(!r)return i;switch(t.operator){case 1:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(n),t.value}:function(e){var t=r(e),n=o(e);return t.set(n),t.value};case 2:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value+n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value+n),t.value};case 3:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value-n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value-n),t.value};case 4:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value*n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value*n),t.value};case 5:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value/n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value/n),t.value};case 6:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value%n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value%n),t.value};case 13:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value&n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value&n),t.value};case 11:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value|n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value|n),t.value};case 12:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value^n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value^n),t.value};case 8:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value<<n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value<<n),t.value};case 9:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value>>n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value>>n),t.value};case 10:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(t.value>>>n),t.value}:function(e){var t=r(e),n=o(e);return t.set(t.value>>>n),t.value};case 7:return n.strict?function(e){var t=r(e),n=o(e);return t.strictSet(Math.pow(t.value,n)),t.value}:function(e){var t=r(e),n=o(e);return t.set(Math.pow(t.value,n)),t.value};default:throw createSyntaxErrorByMessage("unexpectedToken")}}function LogicalExpression(e,t,n){var r=createEvaluate(e,t.left,n),i=createEvaluate(e,t.right,n);switch(t.operator){case 1:return function(e){return r(e)||i(e)};case 2:return function(e){return r(e)&&i(e)};default:throw createSyntaxErrorByMessage("unexpectedToken")}}function XInlineMemberExpressionAccessor(e,t,n){var r=createEvaluate(e,t.object,n),i=t.computed?createEvaluate(e,t.property,n):function(){return t.property.name};return function(e){var t=r(e),n=i(e);return new PropertyAccessor(t,n)}}function MemberExpression(e,t,n,r){var i=createEvaluate(e,t.object,n);if(t.computed){var o=createEvaluate(e,t.property,n);return function(e){return i(e)[o(e)]}}var a=t.property.name;return function(e){return i(e)[a]}}function ConditionalExpression(e,t,n){var r=createEvaluate(e,t.test,n),i=createEvaluate(e,t.consequent,n),o=createEvaluate(e,t.alternate,n);return function(e){return r(e)?i(e):o(e)}}function CallExpression(e,t,n){var r,i,o,a=t.callee;39===a.type?(i=createEvaluate(e,a.object,n),o=a.computed?createEvaluate(e,a.property,n):function(){return a.property.name}):r=createEvaluate(e,a,n);var s=XInlineSpreadElement(e,t.arguments,n);return function(n){var u,c;if(39===a.type){c=i(n);var l=o(n);if("function"!=typeof(u=c[l]))throw createTypeErrorByMessage("notFunction",l)}else if("function"!=typeof(u=r(n))){var p;if(64===a.type)p=a.name;else try{p=JSON.stringify(u)}catch(e){p=""+u}throw createTypeErrorByMessage("notFunction",p)}var h=s(n),d=e.runtimeProfile;d.pushCallExpression(t);try{var f=functionPrototypeApply.call(u,c,h);return d.popCallExpression(),f}catch(e){throw d.popCallExpression(),e}}}function NewExpression(e,t,n){var r=t.callee,i=createEvaluate(e,r,n),o=XInlineSpreadElement(e,t.arguments,n);return function(n){var a=i(n),s=o(n),u=e.runtimeProfile;u.pushCallExpression(t);try{var c=void 0;switch(s.length){case 0:c=new a;break;case 1:c=new a(s[0]);break;case 2:c=new a(s[0],s[1]);break;case 3:c=new a(s[0],s[1],s[2]);break;case 4:c=new a(s[0],s[1],s[2],s[3]);break;case 5:c=new a(s[0],s[1],s[2],s[3],s[4]);break;case 6:c=new a(s[0],s[1],s[2],s[3],s[4],s[5]);break;default:c=new(a.bind.apply(a,__spreadArray([void 0],s,!1)))}return u.popCallExpression(),c}catch(e){throw 64===r.type&&(e.message=e.message.replace(/\bconstruct\$0\b/g,r.name)),u.popCallExpression(),e}}}function SequenceExpression(e,t,n){for(var r=t.expressions,i=[],o=0;o<r.length;o++)i[o]=createEvaluate(e,r[o],n);return function(e){for(var n,r=t.expressions,o=0;o<r.length;o++)n=i[o](e);return n}}function ArrowFunctionExpression(e,t,n){var r=XCreateFunction(e,t,n);return r}function TemplateLiteral(e,t,n){for(var r=[],i=[],o=t.quasis,a=t.expressions,s=0;s<o.length;s++)r[s]=TemplateElement(e,o[s],n);for(s=0;s<a.length;s++)i[s]=createEvaluate(e,a[s],n);return function(e){for(var t,n,o=r.slice(),a=i.slice(),s="";t=o.shift();)s+=t(e),(n=a.shift())&&(s+=n(e));return s}}function TaggedTemplateExpression(e,t,n){var r=createEvaluate(e,t.tag,n),i=t.quasi.expressions,o=[];if(i)for(var a=0;a<i.length;a++)o.push(createEvaluate(e,i[a],n));var s=t.quasi.quasis,u=s.map((function(e){return e.value.cooked})),c=s.map((function(e){return e.value.raw}));defineProperty(u,"raw",{value:freeze(c)});var l=freeze(u);return function(e){return r(e).apply(void 0,__spreadArray([l],o.map((function(t){return t(e)})),!1))}}function TemplateElement(e,t,n){return function(e){return t.value.raw}}function SpreadElement(e,t,n){var r=createEvaluate(e,t.argument,n);return function(e){return r(e)}}function ExpressionStatement(e,t,n){var r=createEvaluate(e,t.expression,n);return r}function XInlineBlockStatement(e,t,n,r){var i=n,o=noop$1;var a=t.body.map((function(t){return createEvaluate(e,t,i)}));return function(e){var t=e;o(t);for(var n=0,r=a;n<r.length;n++){var i=(0,r[n])(t);if(isCompletionRecord(i))return i}}}function BlockStatement(e,t,n,r){var i=n;var o=t.body.map((function(t){return createEvaluate(e,t,i)}));return function(e){var t=e;for(var n=0,r=o;n<r.length;n++){var i=(0,r[n])(t);if(isCompletionRecord(i))return i}}}function EmptyStatement(){return noop$1}function DebuggerStatement(e,t,n){return e.inspector?noop$1:function(){debugger}}function ReturnStatement(e,t,n){var r=t.argument?createEvaluate(e,t.argument,n):noop$1;return function(e){return C_COMPLETION_RETURN.value=r(e),C_COMPLETION_RETURN}}function BreakStatement(e,t){return t.label?function(){return C_COMPLETION_BREAK.value=t.label.name,C_COMPLETION_BREAK}:function(){return C_COMPLETION_BREAK.value=null,C_COMPLETION_BREAK}}function ContinueStatement(e,t){return t.label?function(){return C_COMPLETION_CONTINUE.value=t.label.name,C_COMPLETION_CONTINUE}:function(){return C_COMPLETION_CONTINUE.value=null,C_COMPLETION_CONTINUE}}function IfStatement(e,t,n){var r=createEvaluate(e,t.test,n),i=createEvaluate(e,t.consequent,n),o=t.alternate&&createEvaluate(e,t.alternate,n);return o?function(e){return r(e)?i(e):o(e)}:function(e){if(r(e))return i(e)}}function SwitchStatement(e,t,n){for(var r=createEvaluate(e,t.discriminant,n),i=[],o=[],a=t.cases,s=a.length,u=0;u<s;u++){var c=a[u];i[u]=c.test?createEvaluate(e,c.test,n):null,o[u]=SwitchCase(e,c,n)}return function(e){for(var n=r(e),a=!1,s=-1,u=t.cases,c=u.length,l=0;l<c;l++){var p=u[l];if(a||(p.test?i[l](e)===n&&(a=!0):s=l),a){var h=o[l](e);if(h===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(h===C_COMPLETION_CONTINUE||h===C_COMPLETION_RETURN)return h}!a&&l===c-1&&s>-1&&(l=s-1,a=!0)}}}function SwitchCase(e,t,n){for(var r=[],i=t.consequent,o=0;o<i.length;o++)r[o]=createEvaluate(e,i[o],n);return function(e){for(var n=t.consequent,i=0;i<n.length;i++){var o=r[i](e);if(isCompletionRecord(o))return o}}}function ThrowStatement(e,t,n){var r=createEvaluate(e,t.argument,n);return function(e){throw r(e)}}function TryStatement(e,t,n){var r,i=XInlineBlockStatement(e,t.block,n,0),o=t.finalizer?XInlineBlockStatement(e,t.finalizer,n,0):noop$1,a=t.handler?new BlockCompileScope(e,n):null,s=t.handler?CatchClause(e,t.handler,a):noop$1,u=noop$1,c=null===(r=t.handler)||void 0===r?void 0:r.param;if(c){var l=c.name;a.let(l),u=function(e,t){e.let(l,t)}}return function(n){var r;try{return r=i(n)}catch(i){if(t.handler){var c=a.createRuntimeScope(e,n);return u(c,i),r=s(c)}throw i}finally{if(t.finalizer){var l=!1,p=void 0;isCompletionRecord(r)&&(l=!0,p=r.value);var h=o(n);if(isCompletionRecord(h))return h;l&&(r.value=p)}}}}function CatchClause(e,t,n){var r=XInlineBlockStatement(e,t.body,n,2);return r}function WhileStatement(e,t,n,r){var i=createEvaluate(e,t.test,n),o=createEvaluate(e,t.body,n);return function(e){for(;i(e);){var t=o(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function DoWhileStatement(e,t,n,r){var i=createEvaluate(e,t.body,n),o=createEvaluate(e,t.test,n);return function(e){do{var t=i(e);if(t===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(t!==C_COMPLETION_CONTINUE){if(t===C_COMPLETION_RETURN)return t}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}while(o(e))}}function ForStatement(e,t,n,r){var i=n,o=n,a=t.init?createEvaluate(e,t.init,i):noop$1,s=t.test?createEvaluate(e,t.test,i):function(){return!0},u=t.update?createEvaluate(e,t.update,i):noop$1,c=t.body,l=76===c.type?XInlineBlockStatement(e,c,o,2):createEvaluate(e,c,o);return function(e){var t=e;for(a(t);s(t);u(t)){var n=l(e);if(n===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(n!==C_COMPLETION_CONTINUE){if(n===C_COMPLETION_RETURN)return n}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForInStatement(e,t,n,r){var i=createEvaluate(e,t.right,n),o=ForXHandler(e,t,n);return function(e){var t=i(e);for(var n in t){var a=o(e,n);if(a===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(a!==C_COMPLETION_CONTINUE){if(a===C_COMPLETION_RETURN)return a}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForOfStatement(e,t,n,r){var i=createEvaluate(e,t.right,n),o=ForXHandler(e,t,n);return function(e){for(var t=0,n=i(e);t<n.length;t++){var a=n[t],s=o(e,a);if(s===C_COMPLETION_BREAK){if(C_COMPLETION_BREAK.value)return C_COMPLETION_BREAK;break}if(s!==C_COMPLETION_CONTINUE){if(s===C_COMPLETION_RETURN)return s}else if(C_COMPLETION_CONTINUE.value&&C_COMPLETION_CONTINUE.value!==r)return C_COMPLETION_CONTINUE}}}function ForXHandler(e,t,n){var r,i=n,o=noop$1,a=t.left;if(17===a.type){var s=XInlineVariableDeclarationWithInitializer(e,a,i);o=function(e,t,n){return s(t,n)}}else{if(64!==a.type)throw createSyntaxErrorByMessage("unexpectedToken");var u=XIdentifierAccessor(a.name,n.strict?0:1);o=u?n.strict?function(t,n,r){var i=u(t);i||(i=e.globalObjectAccessor.getProperty(a.name)),i.strictSet(r)}:function(t,n,r){var i=u(t);i||(i=e.globalObjectAccessor.getProperty(a.name)),i.set(r)}:n.strict?function(t,n,r){e.globalObjectAccessor.getProperty(a.name).strictSet(r)}:function(t,n,r){e.globalObjectAccessor.getProperty(a.name).set(r)}}var c=t.body;return r=76===c.type?XInlineBlockStatement(e,c,i,2):createEvaluate(e,c,i),function(e,t){var n=e;return o(e,n,t),r(n)}}function WithStatement(e,t,n){var r,i=new WithCompileScope(e,n),o=createEvaluate(e,t.object,n),a=t.body;return r=76===a.type?combineCallable(XRuntimeScopeHoist(e,a,i,0),XInlineBlockStatement(e,a,i,3)):createEvaluate(e,a,i),function(t){var n=o(t);if(null==n)throw createTypeErrorByMessage("convertNullToObject");var a=i.createRuntimeScope(e,t,Object(n));return r(a)}}function LabeledStatement(e,t,n){var r,i=t.label.name,o=t.body;switch(o.type){case 8:r=ForStatement(e,o,n,i);break;case 6:r=ForInStatement(e,o,n,i);break;case 7:r=ForOfStatement(e,o,n,i);break;case 4:r=DoWhileStatement(e,o,n,i);break;case 15:r=WhileStatement(e,o,n,i);break;default:r=createEvaluate(e,t.body,n)}return function(e){var t=r(e);if(t!==C_COMPLETION_BREAK||C_COMPLETION_BREAK.value!==i)return t}}var visitor$1=[null,BreakStatement,ContinueStatement,DebuggerStatement,DoWhileStatement,ExpressionStatement,ForInStatement,ForOfStatement,ForStatement,IfStatement,LabeledStatement,ReturnStatement,SwitchStatement,ThrowStatement,TryStatement,WhileStatement,WithStatement,VariableDeclaration,null,null,null,null,null,null,null,null,null,null,null,null,ArrayExpression,ArrowFunctionExpression,AssignmentExpression,BinaryExpression,CallExpression,ConditionalExpression,FunctionExpression,SequenceExpression,LogicalExpression,MemberExpression,NewExpression,ObjectExpression,TaggedTemplateExpression,ThisExpression,UnaryExpression,UpdateExpression,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,CatchClause,FunctionDeclaration,Identifier,Literal,null,Program,null,null,null,SwitchCase,TemplateElement,TemplateLiteral,VariableDeclarator,EmptyStatement,BlockStatement];function createEvaluate(e,t,n){var r=t.type;if(65===r){if((null==t?void 0:t.regex)&&/g|y/.test(t.regex.flags)){var i=t.regex,o=i.pattern,a=i.flags;return function(){return new RegExp(o,a)}}return function(){return t.value}}var s=e.inspector;try{var u=visitor$1[r];if(u){var c=u(e,t,n,0);return s?function(n){s.hitBreakpoint(e.runtimeProfile.scriptId,t);try{return c(n)}catch(n){var r=e.runtimeProfile;throw r.rewriteErrorStack(r.scriptId,n,t),s.shouldPauseOnException(r.scriptId,n,t,!1),n}}:function(n){try{return c(n)}catch(n){var r=e.runtimeProfile;throw r.rewriteErrorStack(r.scriptId,n,t),n}}}throw new Error("".concat(errorMessage.unexpectedToken,"(").concat(r,")"))}catch(n){var l=e.runtimeProfile;throw l.rewriteErrorStack(l.scriptId,n,t),s&&s.shouldPauseOnException(l.scriptId,n,t,!1),n}}var ArrayPush=Function.prototype.apply.call.bind(Array.prototype.push),ArrayPop=Function.prototype.apply.call.bind(Array.prototype.pop),RuntimeProfile=function(){function e(){this.callFrameCountId=1,this.scriptCountId=1,this.exceptionId=1,this.callFrames=[],this.callExpressionStack=[],this.scriptId="1",this.scriptMap={}}return e.prototype.getNextScriptId=function(){return"".concat(this.scriptCountId++)},e.prototype.getNextExceptionId=function(){return this.exceptionId++},e.prototype.pushCallFrame=function(e){ArrayPush(this.callFrames,{functionName:e.functionName,functionScope:e.functionScope,functionNode:e.functionNode,scriptId:this.scriptId,callFrameIdx:this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()})},e.prototype.getCallFrameId=function(e){return"10000.1.".concat(e.callFrameIdx)},e.prototype.popCallFrame=function(){ArrayPop(this.callFrames)},e.prototype.pushCallExpression=function(e){ArrayPush(this.callExpressionStack,e)},e.prototype.popCallExpression=function(){ArrayPop(this.callExpressionStack)},e.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},e.prototype.rewriteErrorStack=function(e,t,n){var r=this;if(t instanceof Error&&!getBoatmanSymbol(t,"__rewrittenzxcd")){var i=this.scriptMap[e]?this.scriptMap[e].url:"",o=this.callFrames.map((function(e,t){var o,a,s=r.callFrames[t+1];if(s?s.callExpressionNode&&(o=s.callExpressionNode.loc.start.line,a=s.callExpressionNode.loc.start.column+1):(o=n.loc.start.line,a=n.loc.start.column+1),void 0===o)return" at <anonymous>";var u="".concat(i&&"anonymous"!==i?i:"<anonymous>",":").concat(o,":").concat(a);return e.functionName?" at ".concat(e.functionName," (").concat(u,")"):" at ".concat(u)})).reverse().join("\n");t.stack="".concat(t.name,": ").concat(t.message)+"\n"+o,setBoatmanSymbol(t,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:n})}},e}(),Boatman=function(){function e(e){void 0===e&&(e={}),this.options=e,this.runtimeProfile=new RuntimeProfile,this.disableBreaks=!1,this.runQueue=[];var t=new GlobalCompileScope(this);if(e.sandbox){var n=e.sandboxGlobalObjectCreator?e.sandboxGlobalObjectCreator():createSandbox();this.globalObjectAccessor=new GlobalObjectAccessor(n),(r=new GlobalRuntimeScope(this,n,t)).const("this",n),r.var("self",n),r.const("exports",this.exports={}),this.globalScope=r}else{var r;this.globalObjectAccessor=new GlobalObjectAccessor(hostGlobalObject),(r=new GlobalRuntimeScope(this,hostGlobalObject,t)).const("this",hostGlobalObject),r.var("self",hostGlobalObject),this.globalScope=r}}return e.prototype.import=function(e){if("object"==typeof e){var t=this.globalScope.context;getOwnPropertyNames(e).forEach((function(n){t[n]=new VariableAccessor(1,e[n])}))}},e.prototype.doRun=function(e){var t,n=this.runtimeProfile,r=e.scriptId,i=e.previousScriptId,o=e.ast,a=e.code,s=e.scriptUrl;n.scriptId=r,this.inspector&&this.inspector.evaluateScript(r,a,o,s);try{var u=createEvaluate(this,o,this.globalScope.getCompileScope())(this.globalScope);return n.scriptId=i,u}catch(e){if(n.scriptId=i,this.inspector){var c=getBoatmanSymbol(e,"__rewrittenzxcd");c&&c.node&&(this.inspector.shouldPauseOnException(r,e,c.node,!0),this.inspector.throwException(e))}throw e}finally{null===(t=this.inspector)||void 0===t||t.replayQueueEvent()}},e.prototype.queue=function(e,t){var n,r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId,a=i.getNextScriptId(),s=t||"anonymous";i.scriptId=a,i.scriptMap[a]={scriptId:a,url:s},null===(n=this.inspector)||void 0===n||n.startQueueEvent(),this.runQueue.push({scriptUrl:s,scriptId:a,previousScriptId:o,ast:r,code:e})},e.prototype.run=function(e,t,n){var r=this;if(void 0===n&&(n={}),this.queue(e,t),this.inspector&&n.waitingForDebuggerToAttach&&!this.inspector.isDebuggerAttached)return log("Waiting for inspector to be ready..."),this.inspector.whenDebuggerAttached.then((function(){log("Inspector is ready, run user code"),r.runInSchedule()}));this.runInSchedule()},e.prototype.runInSchedule=function(){var e=this.runQueue;this.runQueue=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.doRun(r)}},e.prototype.evaluate=function(e,t,n){var r=parseScript(e,{loc:!0}),i=this.runtimeProfile,o=i.scriptId;i.scriptId=i.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(i.scriptId,e,r,"");var a=t||this.globalScope;this.disableBreaks=Boolean(null==n?void 0:n.disableBreaks);try{var s=createEvaluate(this,r,a.getCompileScope())(a);return i.scriptId=o,s}catch(e){throw i.scriptId=o,e}finally{this.disableBreaks=!1}},e.prototype.setInspector=function(e){this.inspector=e,e.setEngine(this),e.connect()},e.prototype.getRuntimeStatus=function(){var e=this.runtimeProfile;return{scriptId:e.scriptId,scriptMap:e.scriptMap,callFrames:e.callFrames,callExpressionNode:e.getCurrentCallExpression()}},e.prototype.getHostGlobalObject=function(){return hostGlobalObject},e.prototype.createScope=function(e){void 0===e&&(e=null);var t=e||this.globalScope,n=new CompileScope(this,t.getCompileScope());return new RuntimeScope(this,t,n)},e}(),_a,EVisitorHelperMethod;function findNode(e,t){!function e(n,r,i){!r.found&&t(n,r)&&visitor[i||n.type](n,r,e)}(e,{found:!1})}function skipThrough(e,t,n){n(e,t)}function noop(){}!function(e){e.Statement="Statement",e.Expression="Expression",e.MemberPattern="MemberPattern",e.VariablePattern="VariablePattern",e.Class="Class",e.ForInit="ForInit",e.Function="Function",e.Pattern="Pattern"}(EVisitorHelperMethod||(EVisitorHelperMethod={}));var visitor=(_a={Statement:skipThrough,Expression:skipThrough,MemberPattern:skipThrough,VariablePattern:noop,Class:function(e,t,n){e.id&&n(e.id,t,EVisitorHelperMethod.Pattern),e.superClass&&n(e.superClass,t,EVisitorHelperMethod.Expression),n(e.body,t)},ForInit:function(e,t,n){17===e.type?n(e,t):n(e,t,EVisitorHelperMethod.Expression)},Function:function(e,t,n){"id"in e&&e.id&&n(e.id,t,EVisitorHelperMethod.Pattern);for(var r=0,i=e.params;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Pattern)}n(e.body,t,"expression"in e&&e.expression?EVisitorHelperMethod.Expression:EVisitorHelperMethod.Statement)},Pattern:function(e,t,n){64===e.type?n(e,t,EVisitorHelperMethod.VariablePattern):39===e.type?n(e,t,EVisitorHelperMethod.MemberPattern):n(e,t)}},_a[75]=noop,_a[1]=noop,_a[2]=noop,_a[3]=noop,_a[72]=noop,_a[43]=noop,_a[87]=noop,_a[89]=noop,_a[81]=noop,_a[79]=noop,_a[80]=noop,_a[64]=noop,_a[65]=noop,_a[76]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[5]=function(e,t,n){n(e.expression,t,EVisitorHelperMethod.Expression)},_a[9]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Statement),e.alternate&&n(e.alternate,t,EVisitorHelperMethod.Statement)},_a[10]=function(e,t,n){n(e.body,t,EVisitorHelperMethod.Statement)},_a[16]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[12]=function(e,t,n){n(e.discriminant,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.cases;r<i.length;r++){var o=i[r];o.test&&n(o.test,t,EVisitorHelperMethod.Expression);for(var a=0,s=o.consequent;a<s.length;a++){n(s[a],t,EVisitorHelperMethod.Statement)}}},_a[71]=function(e,t,n){e.test&&n(e.test,t,EVisitorHelperMethod.Expression);for(var r=0,i=e.consequent;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Statement)}},_a[11]=function(e,t,n){e.argument&&n(e.argument,t,EVisitorHelperMethod.Expression)},_a[13]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[14]=function(e,t,n){n(e.block,t,EVisitorHelperMethod.Statement),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,EVisitorHelperMethod.Statement)},_a[62]=function(e,t,n){e.param&&n(e.param,t,EVisitorHelperMethod.Pattern),n(e.body,t,EVisitorHelperMethod.Statement)},_a[15]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[8]=function(e,t,n){e.init&&n(e.init,t,EVisitorHelperMethod.ForInit),e.test&&n(e.test,t,EVisitorHelperMethod.Expression),e.update&&n(e.update,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[6]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.ForInit),n(e.right,t,EVisitorHelperMethod.Expression),n(e.body,t,EVisitorHelperMethod.Statement)},_a[63]=function(e,t,n){n(e,t,EVisitorHelperMethod.Function)},_a[17]=function(e,t,n){for(var r=0,i=e.declarations;r<i.length;r++){n(i[r],t)}},_a[74]=function(e,t,n){n(e.id,t,EVisitorHelperMethod.Pattern),e.init&&n(e.init,t,EVisitorHelperMethod.Expression)},_a[69]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Pattern)},_a[60]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Pattern)}},_a[66]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){var o=i[r];68===o.type?(o.computed&&n(o.key,t,EVisitorHelperMethod.Expression),n(o.value,t,EVisitorHelperMethod.Pattern)):69===o.type&&n(o.argument,t,EVisitorHelperMethod.Pattern)}},_a[30]=function(e,t,n){for(var r=0,i=e.elements;r<i.length;r++){var o=i[r];o&&n(o,t,EVisitorHelperMethod.Expression)}},_a[41]=function(e,t,n){for(var r=0,i=e.properties;r<i.length;r++){n(i[r],t)}},_a[37]=function(e,t,n){for(var r=0,i=e.expressions;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[73]=function(e,t,n){for(var r=0,i=e.quasis;r<i.length;r++){n(i[r],t)}for(var o=0,a=e.expressions;o<a.length;o++){n(a[o],t,EVisitorHelperMethod.Expression)}},_a[44]=function(e,t,n){n(e.argument,t,EVisitorHelperMethod.Expression)},_a[33]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Expression),n(e.right,t,EVisitorHelperMethod.Expression)},_a[32]=function(e,t,n){n(e.left,t,EVisitorHelperMethod.Pattern),n(e.right,t,EVisitorHelperMethod.Expression)},_a[35]=function(e,t,n){n(e.test,t,EVisitorHelperMethod.Expression),n(e.consequent,t,EVisitorHelperMethod.Expression),n(e.alternate,t,EVisitorHelperMethod.Expression)},_a[40]=function(e,t,n){if(n(e.callee,t,EVisitorHelperMethod.Expression),e.arguments)for(var r=0,i=e.arguments;r<i.length;r++){n(i[r],t,EVisitorHelperMethod.Expression)}},_a[39]=function(e,t,n){n(e.object,t,EVisitorHelperMethod.Expression),e.computed&&n(e.property,t,EVisitorHelperMethod.Expression)},_a[84]=function(e,t,n){e.declaration&&n(e.declaration,t,84===e.type||e.declaration&&"id"in e.declaration&&e.declaration.id?EVisitorHelperMethod.Statement:EVisitorHelperMethod.Expression),e.source&&n(e.source,t,EVisitorHelperMethod.Expression)},_a[82]=function(e,t,n){e.exported&&n(e.exported,t),n(e.source,t,EVisitorHelperMethod.Expression)},_a[78]=function(e,t,n){for(var r=0,i=e.specifiers;r<i.length;r++){n(i[r],t)}n(e.source,t,EVisitorHelperMethod.Expression)},_a[90]=function(e,t,n){n(e.source,t,EVisitorHelperMethod.Expression)},_a[42]=function(e,t,n){n(e.tag,t,EVisitorHelperMethod.Expression),n(e.quasi,t,EVisitorHelperMethod.Expression)},_a[86]=function(e,t,n){n(e,t,EVisitorHelperMethod.Class)},_a[88]=function(e,t,n){for(var r=0,i=e.body;r<i.length;r++){n(i[r],t)}},_a[95]=function(e,t,n){e.computed&&n(e.key,t,EVisitorHelperMethod.Expression),n(e.value,t,EVisitorHelperMethod.Expression)},_a);function isFunction(e){return"function"==typeof e}function isBreakableNode(e){return!!getBoatmanSymbol(e,"__can_breakpointasxu")||e.type<30}function findPossibleBreakpoints(e,t,n,r){var i=n||{lineNumber:t.lineNumber+1,columnNumber:0},o=[];return findNode(e.ast,(function(e,n){if(e.loc){var a={startLineNumber:e.loc.start.line-1,startColumnNumber:e.loc.start.column,endLineNumber:e.loc.end.line-1,endColumnNumber:e.loc.end.column};return a.endLineNumber<t.lineNumber||a.startLineNumber>i.lineNumber||a.endLineNumber===t.lineNumber&&a.endColumnNumber<=t.columnNumber||a.startLineNumber===i.lineNumber&&a.startColumnNumber>=i.columnNumber?(o.length&&(n.found=!0),!1):(37===e.type&&e.expressions.forEach((function(e,t){t&&e.type<60&&setBoatmanSymbol(e,"__can_breakpointasxu",!0)})),a.startLineNumber>t.lineNumber||a.startLineNumber===t.lineNumber&&a.startColumnNumber>=t.columnNumber?(isBreakableNode(e)&&-1===o.indexOf(e)&&o.push(e),!(r&&r.limit&&o.length>=r.limit)||(n.found=!0,!1)):!o.length||(n.found=!0,!1))}})),o}function resolveCallArguments(e,t){var n=[],r=e.getRemoteObjectParser();return t&&t.forEach((function(e){if(e.unserializableValue)n.push(parseUnserializableValue(e.unserializableValue));else if(e.objectId){var t=e.objectId?r.getObjectById(e.objectId):null;n.push(t)}else n.push(e.value)})),n}visitor[67]=visitor[76],visitor[91]=visitor[5],visitor[92]=visitor[93]=visitor[11],visitor[70]=visitor[13],visitor[4]=visitor[15],visitor[7]=visitor[6],visitor[36]=visitor[31]=visitor[63],visitor[45]=visitor[44],visitor[38]=visitor[33],visitor[61]=visitor[32],visitor[34]=visitor[40],visitor[83]=visitor[84],visitor[94]=visitor[86],visitor[68]=visitor[95];var precisionTimestampBasis=0;function resetPrecisionTimestampBasis(){precisionTimestampBasis=Date.now()-getPrecisionTimestamp()}var getPrecisionTimestamp="function"==typeof __nativeGetHighResolutionTime__?function(){return __nativeGetHighResolutionTime__()+precisionTimestampBasis}:"object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return performance.now()+precisionTimestampBasis}:function(){return Date.now()};function format(e,t){switch(e){case"%s":return String(t);case"%d":return"symbol"==typeof t?NaN:Number(t);case"%i":return"symbol"==typeof t?NaN:parseInt(t,10);case"%f":return"symbol"==typeof t?NaN:parseFloat(t);default:return t}}function formatter(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length<=1)return e;var n=e[0];if("string"!=typeof n)return e;var r=e[1],i=n.match(/%[sdifoOc]/);if(!i)return e;if(i){var o=i.index;if(void 0===o)return e;var a=n.slice(0,o),s=n.slice(o+2);return __spreadArray([a,format(i[0],r),s],e.slice(2),!0)}return e}function generateConsoleAPICalledProtocol(e,t,n){var r,i;t=Array.from(t);var o=n.getRemoteObjectParser(),a=n.getSessionState(),s=n.getEngine().getRuntimeStatus(),u=null!==(r=s.scriptMap[s.scriptId])&&void 0!==r?r:{scriptId:s.scriptId,url:""},c=s.callExpressionNode,l=[];u&&c&&(l=s.callFrames.map((function(e,t){var n=s.callFrames[t+1];return n?{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:n.functionNode.loc.start.line-1,columnNumber:n.functionNode.loc.start.column}:{functionName:e.functionName,scriptId:u.scriptId,url:u.url,lineNumber:c.loc.start.line-1,columnNumber:c.loc.start.column}})).reverse()),"trace"===e&&0===l.length&&(l=[{functionName:"",scriptId:u.scriptId,url:u.url,lineNumber:0,columnNumber:0}]);var p=null!==(i={warn:"warning",group:"startGroup",groupEnd:"endGroup",groupCollapsed:"startGroupCollapsed",countReset:"warning"}[e])&&void 0!==i?i:e;return{method:RuntimeEvent.consoleAPICalled,params:{type:p,args:Array.from(t).map((function(t){return o.parseObject(t,e)})),executionContextId:a.executionContextId,timestamp:getPrecisionTimestamp(),stackTrace:{callFrames:l}}}}function tryExtractMessageSummary(e){var t;if(!e)return"";var n=e.method;if(!n)return"";if(n===RuntimeEvent.consoleAPICalled){var r=null===(t=e.params)||void 0===t?void 0:t.args;if(r&&Array.isArray(r)&&r.length>0)return": "+JSON.stringify(r[0]).slice(1,100)+"..."}return""}function sendConsoleAPICalled(e,t,n){var r=n.getProtocolConnection(),i=generateConsoleAPICalledProtocol(e,t,n);JSON.stringify(i).length>2e7?r.sendConsoleMessage(generateConsoleAPICalledProtocol("warn",[n.i18n.formatWithPrefix("consoleContentTooLarge")+tryExtractMessageSummary(i)],n)):r.sendConsoleMessage(i)}function getLabel(e){return e?String(e):"default"}var DefaultMap=function(){function e(e){this.defaultValue=e,this.dict={}}return e.prototype.get=function(e){return e in this.dict||(this.dict[e]=this.defaultValue()),this.dict[e]},e}(),ConsoleImpl=function(){function e(e){this.container=e,this.metaMapById=new DefaultMap((function(){return{countMap:{},timerTable:{}}}))}return e.prototype._getRuntimeMeta=function(){var e=this.container.getSessionState().executionContextId;return this.metaMapById.get(String(e))},e.prototype._getCountMap=function(){return this._getRuntimeMeta().countMap},e.prototype._getTimerTable=function(){return this._getRuntimeMeta().timerTable},e.prototype.assert=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e||sendConsoleAPICalled("assert",t,this.container)},e.prototype.clear=function(){this.sendEmptyConsoleAPICalled("clear")},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("debug",e,this.container)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("error",e,this.container)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("info",e,this.container)},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("log",e,this.container)},e.prototype.table=function(e,t){sendConsoleAPICalled("table",[e,t],this.container)},e.prototype.trace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("trace",e,this.container)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];sendConsoleAPICalled("warn",e,this.container)},e.prototype.dir=function(e,t){sendConsoleAPICalled("dir",[e,t],this.container)},e.prototype.dirxml=function(){},e.prototype.count=function(e){var t=this._getCountMap(),n=t[e=getLabel(e)]=(t[e]||0)+1;sendConsoleAPICalled("count",["".concat(e,": ").concat(n)],this.container)},e.prototype.countReset=function(e){var t=this._getCountMap();(e=getLabel(e))in t?t[e]=0:sendConsoleAPICalled("countReset",["Count for '".concat(e,"' does not exist")],this.container)},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.group";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("group",[n],this.container)},e.prototype.groupCollapsed=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="console.groupCollapsed";e.length&&(n=formatter.apply(void 0,e)[0]),sendConsoleAPICalled("groupCollapsed",[n],this.container)},e.prototype.groupEnd=function(){sendConsoleAPICalled("groupEnd",["console.groupEnd"],this.container)},e.prototype.time=function(e){var t=this._getTimerTable();(e=getLabel(e))in t?sendConsoleAPICalled("warn",["Timer '".concat(e,"' has already been started.")],this.container):t[e]=getPrecisionTimestamp()},e.prototype.timeLog=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this._getTimerTable()[e=getLabel(e)];if(void 0!==r){var i=round(getPrecisionTimestamp()-r,5);sendConsoleAPICalled("timeLog",__spreadArray(["".concat(e,": ").concat(i,"ms")],t,!0),this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.timeEnd=function(e){var t=this._getTimerTable(),n=t[e=getLabel(e)];if(void 0!==n){delete t[e];var r=round(getPrecisionTimestamp()-n,5);sendConsoleAPICalled("timeEnd",["".concat(e,": ").concat(r,"ms")],this.container)}else sendConsoleAPICalled("warn",["Timer '".concat(e,"' does not exist.")],this.container)},e.prototype.sendEmptyConsoleAPICalled=function(e){sendConsoleAPICalled(e,["console.".concat(e)],this.container)},e}();function round(e,t){return void 0===t&&(t=0),Number("".concat(Math.round(Number("".concat(e,"e").concat(t))),"e-").concat(t))}var proxyMethodKeys=["debug","assert","log","info","warn","error","table","dir","trace","group","groupCollapsed","groupEnd","clear","count","countReset","time","timeEnd","timeLog"];function createReplacement(e,t){var n="object"==typeof console&&console[e]?console[e].bind(console):function(){};function r(){var r=arguments;if("string"==typeof r[0]&&/^(\[framework\]|dispatchEvent|onMessage push|\[boatman\])/.test(r[0]))return n.apply(null,r);try{var i=t.getConsole();i[e].apply(i,r)}catch(t){debug$1("console replacement",e,t)}return n.apply(null,r)}return defineProperty(r,"toString",{value:function(){return"function ".concat(e,"() { [native code] }")},writable:!0,configurable:!0}),r}function overrideGlobalConsole(e){proxyMethodKeys.forEach((function(t){var n=getOwnPropertyDescriptor(console,t);n&&n.configurable?(n.value=createReplacement(t,e),defineProperty(console,t,n)):defineProperty(console,t,{value:createReplacement(t,e),configurable:!0,enumerable:!0,writable:!0})}))}function createConsoleProxy(e,t){t||(t="object"==typeof console?console:null);var n={};return proxyMethodKeys.forEach((function(t){n[t]={configurable:!0,enumerable:!0,writable:!0,value:createReplacement(t,e)}})),createObject(t,n)}function hookPromiseRejectionCallback(e,t){var n=e.getHostGlobalObject(),r=n.onunhandledrejection,i=function(e){isFunction(r)&&r.call(this,e),e&&e.reason&&t.throwException(e.reason,2)},o="onunhandledrejection",a=getOwnPropertyDescriptor(n,o);a&&!a.configurable||defineProperty(n,o,{get:function(){return i},set:function(e){isFunction(e)&&(r=e,a&&a.set&&a.set.call(this,e))},enumerable:!0,configurable:!0})}var BreakpointItem=function(){function e(e,t,n){this.manager=e,this.targetNode=n,this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber||0,this.scriptId=t.scriptId,this.id="".concat(this.scriptId,":").concat(this.lineNumber,":").concat(this.columnNumber),this.condition=t.condition,setBoatmanSymbol(n,"__breakpointzxfg",this.id)}return e.prototype.destroy=function(){setBoatmanSymbol(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},e}();function enable$2(e,t,n){n(null,{});var r=e.getProtocolConnection().connectionState;r.debuggerDomainEnabled||(r.enableDebuggerDomain(),e.getScriptManager().emitAllScriptParsedEvents())}function disable$1(e,t,n){e.getProtocolConnection().connectionState.disableDebuggerDomain(),n(null,{})}function setBreakpointsActive(e,t,n){var r=e.getBreakpointManager();t.active?(r.activate(),r.isActive4UserManual=!0):(r.inactivate(),r.isActive4UserManual=!1),n(null,{})}function getPossibleBreakpoints(e,t,n){var r=t.start.scriptId,i=e.getScriptManager().getScript(r);if(i){var o=[];findPossibleBreakpoints(i,t.start,t.end).forEach((function(e){o.push({columnNumber:e.loc.start.column,lineNumber:e.loc.start.line-1,scriptId:r})})),n(null,{locations:o})}else n(EDevtoolProtocolErrorCode.NormalError)}function setBreakpointByUrl(e,t,n){var r,i=e.getScriptManager();if(t.url?r=i.getScriptByUrl(t.url):t.scriptHash&&(r=i.getScriptByHash(t.scriptHash)),r){for(var o,a=0;!o&&a<20;)o=findPossibleBreakpoints(r,{lineNumber:t.lineNumber+a,columnNumber:t.columnNumber||0},null,{limit:1})[0],a+=1;if(!o)return n(EDevtoolProtocolErrorCode.NormalError,"[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a)),void warn$1("[DEBUG] no breakpoint was found from line ".concat(t.lineNumber," to ").concat(t.lineNumber+a));var s=e.getBreakpointManager().setBreakpoint({scriptId:r.scriptId,lineNumber:o.loc.start.line-1,columnNumber:o.loc.start.column,condition:t.condition},o);n(null,{breakpointId:s.id,locations:[{scriptId:s.scriptId,lineNumber:s.lineNumber,columnNumber:s.columnNumber}]})}else n(EDevtoolProtocolErrorCode.NormalError,"Script Not Found")}function removeBreakpoint(e,t,n){var r=t.breakpointId;r&&e.getBreakpointManager().removeBreakpoint(r),n(null,{})}function resume(e,t,n){n(null,{})}function pause(e,t,n){e.getBreakpointManager().pauseOnNextStatement=!0,n(null,{})}function stepInto(e,t,n){e.getBreakpointManager().stepAction=3,n(null,{})}function stepOut(e,t,n){e.getBreakpointManager().stepAction=1,n(null,{})}function stepOver(e,t,n){e.getBreakpointManager().stepAction=2,n(null,{})}function getScriptSource(e,t,n){var r=e.getScriptManager().getScript(t.scriptId);r?n(null,{scriptSource:r.source}):n(EDevtoolProtocolErrorCode.NormalError)}function evaluateOnCallFrame(e,t,n){var r,i=t.callFrameId,o=e.getEngine();if(o.getRuntimeStatus().callFrames.some((function(e){if(o.runtimeProfile.getCallFrameId(e)===i)return r=e,!0})),r){var a=e.getRemoteObjectParser();try{var s=e.getEngine().evaluate(t.expression,r.functionScope);n(null,{result:a.parseObject(s)})}catch(e){var u=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:a.parseObject(e),exceptionId:u?u.id:100,lineNumber:0,text:"Uncaught"},result:a.parseObject(e)})}}else n(EDevtoolProtocolErrorCode.NormalError)}function setPauseOnExceptions(e,t,n){switch(t.state){case"all":e.getBreakpointManager().pauseOnExceptionsState=2;break;case"uncaught":e.getBreakpointManager().pauseOnExceptionsState=1;break;case"none":e.getBreakpointManager().pauseOnExceptionsState=0}n(null,{})}function setSkipAllPauses(e,t,n){n(null,{})}var _debugger=Object.freeze({__proto__:null,disable:disable$1,enable:enable$2,evaluateOnCallFrame:evaluateOnCallFrame,getPossibleBreakpoints:getPossibleBreakpoints,getScriptSource:getScriptSource,pause:pause,removeBreakpoint:removeBreakpoint,resume:resume,setBreakpointByUrl:setBreakpointByUrl,setBreakpointsActive:setBreakpointsActive,setPauseOnExceptions:setPauseOnExceptions,setSkipAllPauses:setSkipAllPauses,stepInto:stepInto,stepOut:stepOut,stepOver:stepOver});function enable$1(e,t,n){n(null,{});var r=e.getSessionState(),i=r.executionContextId,o=r.executionContextName,a=e.getProtocolConnection();a.connectionState.enableRuntimeDomain(),a.send({method:RuntimeEvent.executionContextCreated,params:{context:{id:i,origin:"app://",name:o}}})}function disable(e,t,n){e.getProtocolConnection().connectionState.disableRuntimeDomain(),n(null,{})}function getProperties(e,t,n){var r=e.getRemoteObjectParser().getProperties(t),i=e.getRemoteObjectParser().getObjectById(t.objectId);if(isFunction(i)){var o=getBoatmanSymbol(i,"___func_locationxasdzzy");if(o){var a=o.node,s=o.scriptId,u=a.id;r.internalProperties=__spreadArray([{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:s,lineNumber:(u?u.loc.start.line:a.loc.start.line)-1,columnNumber:u?u.loc.start.column:a.loc.start.column}}}],r.internalProperties||[],!0)}}n(null,r)}function callFunctionOn(e,t,n){var r=e.getRemoteObjectParser();if(t.functionDeclaration){var i=t.objectId?r.getObjectById(t.objectId):null,o=resolveCallArguments(e,t.arguments);if(i){var a=function(e){t.slient||n(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(e),exceptionId:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(e)})};if(0===t.functionDeclaration.indexOf("function invokeGetter(arrayStr)")||-1!==t.functionDeclaration.indexOf("let t=this;const n=JSON.parse(e);for(let e=0,i=n.length;e<i;++e)t=t[n[e]]"))try{var s=JSON.parse(t.arguments[0].value),u=i;return s.forEach((function(e){u=u[e]})),void n(null,{result:r.parseObject(u)})}catch(e){a(e)}else try{var c=e.getEngine().createScope();c.const("__obj",i),c.const("__args",o);var l=e.getEngine().evaluate("(".concat(t.functionDeclaration,").apply(__obj, __args)"),c);n(null,{result:t.returnByValue?{type:"object",value:l}:r.parseObject(l)})}catch(e){a(e)}}}}function evaluate(e,t,n){var r=t.disableBreaks||t.throwOnSideEffect,i=e.getRemoteObjectParser(),o=e.getBreakpointManager();try{var a=r?o.evaluateWithoutBreakpoint(t.expression):e.getEngine().evaluate(t.expression);n(null,{result:i.parseObject(a)})}catch(e){var s=getBoatmanSymbol(e,"__rewrittenzxcd");n(null,{exceptionDetails:{columnNumber:20,exception:i.parseObject(e),exceptionId:s?s.id:100,lineNumber:0,text:"Uncaught"},result:i.parseObject(e)})}}function compileScript(e,t,n){n(null,{})}function releaseObjectGroup(e,t,n){n(null,{})}function globalLexicalScopeNames(e,t,n){n(null,{names:[]})}function runIfWaitingForDebugger(e,t,n){n(null,{}),e.getProtocolConnection().connectionState.handleDebuggerAttached()}var runtime=Object.freeze({__proto__:null,callFunctionOn:callFunctionOn,compileScript:compileScript,disable:disable,enable:enable$1,evaluate:evaluate,getProperties:getProperties,globalLexicalScopeNames:globalLexicalScopeNames,releaseObjectGroup:releaseObjectGroup,runIfWaitingForDebugger:runIfWaitingForDebugger});function enable(e,t,n){e.getProtocolConnection().connectionState.enablePageDomain(),n(null,{})}function getResourceTree(e,t,n){e.getProtocolConnection().connectionState.enablePageResourceTree(),n(null,{})}var page=Object.freeze({__proto__:null,enable:enable,getResourceTree:getResourceTree}),Handlers=Object.freeze({__proto__:null,Debugger:_debugger,Page:page,Runtime:runtime}),INITIAL_STATE={pageDomainEnabled:!1,runtimeDomainEnabled:!1,debuggerDomainEnabled:!1,getResourceTreeRequested:!1},ConnectionState=function(){function e(){this.consoleReadyCallbacks=[],this.whenDebuggerAttachedQueue=new WhenReadyQueue,this.state=__assign({},INITIAL_STATE),this.whenDebuggerDomainEnabledQueue=new WhenReadyQueue}return Object.defineProperty(e.prototype,"debuggerDomainEnabled",{get:function(){return this.state.debuggerDomainEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runtimeDomainEnabled",{get:function(){return this.state.runtimeDomainEnabled},enumerable:!1,configurable:!0}),e.prototype.enablePageDomain=function(){this.state.pageDomainEnabled=!0,this.checkConsoleReady()},e.prototype.enableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!0,this.checkConsoleReady()},e.prototype.disableRuntimeDomain=function(){this.state.runtimeDomainEnabled=!1},e.prototype.onDebuggerDomainEnabled=function(e){this.whenDebuggerDomainEnabledQueue.push(e)},e.prototype.enableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!0,this.whenDebuggerDomainEnabledQueue.activate()},e.prototype.disableDebuggerDomain=function(){this.state.debuggerDomainEnabled=!1,this.whenDebuggerDomainEnabledQueue.deactivate()},e.prototype.enablePageResourceTree=function(){this.state.getResourceTreeRequested=!0,this.checkConsoleReady()},e.prototype.reset=function(){this.state=__assign({},INITIAL_STATE)},e.prototype.onConsoleReady=function(e){this.consoleReadyCallbacks.push(e)},e.prototype.offConsoleReady=function(e){var t=this.consoleReadyCallbacks.indexOf(e);t>-1&&this.consoleReadyCallbacks.splice(t,1)},e.prototype.checkConsoleReady=function(){var e=this;this.state.runtimeDomainEnabled&&this.state.pageDomainEnabled&&this.state.getResourceTreeRequested&&setTimeout((function(){e.consoleReadyCallbacks.forEach((function(e){e()}))}),0)},e.prototype.onDebuggerAttached=function(e){this.whenDebuggerAttachedQueue.push(e)},e.prototype.handleDebuggerAttached=function(){this.whenDebuggerAttachedQueue.activate()},e}(),WhenReadyQueue=function(){function e(){this.queue=[],this.ready=!1}return e.prototype.push=function(e){this.ready?e():this.queue.push(e)},e.prototype.runQueue=function(){this.queue.forEach((function(e){e()})),this.queue=[]},e.prototype.activate=function(){this.runQueue(),this.ready=!0},e.prototype.deactivate=function(){this.ready=!1,this.runQueue()},e}(),ProtocolConnection=function(){function e(e){var t=this;this.container=e,this.messagesBeforeRuntimeEnabled=[],this.consoleReady=!1,this.messagesBeforeWebsocketOpened=[],this.panelView=new DebugPanelRILHelper,this.exitAppDispatcher=new ExitAppDispatcher,this.isSocketOpenedOnce=!1,this.connectionState=new ConnectionState,this.connectionState.onConsoleReady((function(){t.consoleReady=!0,t.messagesBeforeRuntimeEnabled.length&&(t.messagesBeforeRuntimeEnabled.forEach((function(e){t.send(e)})),t.messagesBeforeRuntimeEnabled=[])})),setTimeout((function(){t.consoleReady=!0}),1e4),this.i18n=i18n$2,this.panelView.updatePanel(EPanelStatus.Connecting),this.panelView.setupExitApp()}return Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakpointManager",{get:function(){return this.container.getBreakpointManager()},enumerable:!1,configurable:!0}),e.prototype.showError=function(e){if(isSilentMode())console.log(i18n$2.format("usingRemoteDebugPackageInIDE"));else{var t=e;if("no-valid-channel-id"===e)t=this.i18n.format("panelStatusNoValidChannelId");this.panelView.updatePanel(EPanelStatus.Disconnected,t),toast({content:t+", "+this.i18n.format("getHelp"),duration:2e3})}},e.prototype.setCloseState=function(){this.panelView.updatePanel(EPanelStatus.Disconnected),this.exitAppDispatcher.exitApp()},e.prototype.onSocketClose=function(){this.setCloseState()},e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,o=this;return __generator(this,(function(a){switch(a.label){case 0:if(!(e=this.container.getWebSocketConnection()))return[3,5];this.ws=e,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.open()];case 2:return a.sent(),[3,4];case 3:return t=a.sent(),error$1("🚀 ~ file: index.ts:61 ~ ProtocolConnection ~ open ~ error:",t),t.message&&this.showError(t.message),[3,4];case 4:return[3,7];case 5:return[4,this.sessionState.resolveChannelId()];case 6:n=a.sent(),r=new(this.container.getWebSocketClientImpl()),n?(i="".concat(this.container.server4WebSocket,"/bugme/client_w/").concat(n),r.setUrl(i),r.open()):this.showError("no-valid-channel-id"),this.ws=r,a.label=7;case 7:return this.ws.on("message",(function(e){o.onSocketMessage(e)})),this.ws.on("open",(function(){o.onSocketOpen()})),this.ws.on("error",(function(e){o.onSocketError(e)})),this.ws.on("close",(function(){o.onSocketClose()})),this.messagesBeforeWebsocketOpened.length&&(this.messagesBeforeWebsocketOpened.forEach((function(e){o.ws.send(e)})),this.messagesBeforeWebsocketOpened=[]),this.panelView.setupExitApp(),[2]}}))}))},e.prototype.close=function(){this.ws&&this.ws.close()},e.prototype.send=function(e){this.ws?this.ws.send(e):this.messagesBeforeWebsocketOpened.push(e)},e.prototype.sendConsoleMessage=function(e){this.consoleReady?this.send(e):this.messagesBeforeRuntimeEnabled.push(e)},e.prototype.onFrontendJoin=function(){this.panelView.updatePanel(EPanelStatus.Connected),this.breakpointManager.activate()},e.prototype.onSocketError=function(e){if(!this.isSocketOpenedOnce){var t=getEventBus(),n=e?e.errorMessage||e.message:"closed";t.requireLock("error-".concat(n))&&(toast({content:this.i18n.format("errorExit")+", "+n,duration:2e3}),this.setCloseState(),setTimeout((function(){t.releaseLock("error-".concat(n))}),2e3))}},e.prototype.onSocketOpen=function(){this.isSocketOpenedOnce=!0},e.prototype.onFrontendLeave=function(){this.breakpointManager.inactivate(),this.connectionState.reset(),this.consoleReady=!1},e.prototype.onSocketMessage=function(e){var t,n=this;try{t=JSON.parse(e)}catch(t){return void("CLIENT:JOIN"===e?this.onFrontendJoin():"CLIENT:LEAVE"===e&&this.onFrontendLeave())}var r=getMethodHandler(t.method);r&&r(this.container,t.params,(function(e,r){e?n.ws.send({id:t.id,error:{code:e,message:(null==r?void 0:r.message)||r||""}}):n.ws.send({id:t.id,result:r})}))},e}();function getMethodHandler(e){for(var t=e.split("."),n=Handlers,r=0,i=t;r<i.length;r++){if(!(n=n[i[r]]))break}return n}var BreakpointManager=function(){function e(e){this.container=e,this.id2BreakpointMap={},this.isActive=!1,this.isActive4UserManual=!0,this.pauseOnExceptionsState=0,this.pauseOnNextStatement=!1,this.stepAction=0,this.breakpointCallStackDepth=0,this.hiddenKeys=new Set(["this"])}return Object.defineProperty(e.prototype,"remoteObjectParser",{get:function(){return this.container.getRemoteObjectParser()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.isActive=!0},e.prototype.inactivate=function(){this.isActive=!1},e.prototype.get=function(e){return this.id2BreakpointMap[e]},e.prototype.setBreakpoint=function(e,t){var n=new BreakpointItem(this,e,t);return this.id2BreakpointMap[n.id]=n,n},e.prototype.removeBreakpoint=function(e){var t=this.id2BreakpointMap[e];t&&t.destroy()},e.prototype.pauseOnBreakpoint=function(e){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames(e),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[e.id]}})},e.prototype.pauseOnException=function(e,t,n,r){this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:n.loc.start.line-1,columnNumber:n.loc.start.column}),data:__assign(__assign({},this.remoteObjectParser.parseObject(t)),{uncaught:r}),reason:EDevtoolProtocolTypePausedReason.Exception,hitBreakpoints:[]}})},e.prototype.pauseOnNode=function(e,t){if(this.container.getEngine().disableBreaks)return!1;this.handlePaused({method:DebuggerEvent.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:e,lineNumber:t.loc.start.line-1,columnNumber:t.loc.start.column}),reason:EDevtoolProtocolTypePausedReason.Other,hitBreakpoints:[]}})},e.prototype.evaluateWithoutBreakpoint=function(e,t){var n=this.isActive;n&&this.inactivate();try{return this.container.getEngine().evaluate(e,t)}finally{n&&this.activate()}},e.prototype.getBreakpointCallFrames=function(e){var t,n=this,r=[],i=this.container.getEngine(),o=i.getRuntimeStatus().callFrames;return o.forEach((function(a,s){var u=a.functionNode,c=a.functionScope,l=o[s+1],p={lineNumber:l?l.callExpressionNode.loc.start.line-1:e.lineNumber,columnNumber:l?l.callExpressionNode.loc.start.column:e.columnNumber,scriptId:a.scriptId},h=createObject(null);objectKeys$1(c.context).forEach((function(e){n.hiddenKeys.has(e)||(h[e]=c.context[e].value)}));var d={columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:a.scriptId},f={columnNumber:u.loc.end.column,lineNumber:u.loc.end.line-1,scriptId:a.scriptId},g=n.remoteObjectParser.parseObject(h),m=n.remoteObjectParser.parseObject(c.find("this").value);t||(t=n.remoteObjectParser.parseObject(i.globalObjectAccessor.globalObject));var y={callFrameId:i.runtimeProfile.getCallFrameId(a),functionName:a.functionName||"(anonymous)",functionLocation:d,location:p,scopeChain:[{type:"local",object:g,startLocation:d,endLocation:f},{type:"global",object:t}],this:m,url:"https://gw.alipayobjects.com"};r.unshift(y)})),r},e.prototype.handlePaused=function(e){if(this.sessionState.channelId){this.isActive=!1,this.breakpointCallStackDepth=this.container.getEngine().getRuntimeStatus().callFrames.length,this.container.getPausedCoverView().show();var t=this.protocolConnection.messagesBeforeWebsocketOpened.length?this.protocolConnection.messagesBeforeWebsocketOpened.concat([e]):[e];this.protocolConnection.messagesBeforeWebsocketOpened=[],this.handleSyncRequest(t),this.container.getPausedCoverView().hide(),this.protocolConnection.send({method:DebuggerEvent.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else debug$1("skip breakpoint due to lacking of channelId")},e.prototype.handleSyncRequestInner=function(e,t){var n=this,r=Date.now();debug$1("syncRequest request",t),t&&t.forEach((function(e){n.container.getProtocolConnection().send(e)}));var i="".concat(this.container.server4Http,"/bugme/channel/paused");debug$1("start syncRequest, POST:",i,"channelId",this.sessionState.channelId);var o=this.container.getHttpClient().syncRequest({url:i,method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:[]});if(debug$1("syncRequest response",o),o.error){if(error$1("[DEBUG]",o.errorMessage),Date.now()-r>=1e4)return this.handleSyncRequestInner(e,t)}else if(200===o.status){var a=void 0;if(o.data)try{a=JSON.parse(o.data)}catch(e){}if(a){log("[DEBUG] breakpoint response",a);var s=[],u=!1;Array.isArray(a)?a.forEach((function(t){e(t.method)&&(u=!0),s.push(n.handleProtocolResponse(t))})):a.method&&(u=e(a.method),s.push(this.handleProtocolResponse(a))),s.length>0&&(s.forEach((function(e){n.protocolConnection.send(e)})),u||this.handleSyncRequestInner(e,[]))}}else{a=void 0;if(o.data)try{a=JSON.parse(o.data)}catch(e){}if(a&&a.errorMessage&&"timeout"===a.errorMessage)return this.handleSyncRequestInner(e,[]);error$1("[DEBUG] breakpoint error ".concat(JSON.stringify(o)))}},e.prototype.handleSyncRequest=function(e){var t=Array.isArray(e)?e:[e];return this.handleSyncRequestInner((function(e){return e===Debugger.resume||e===Debugger.stepOver||e===Debugger.stepInto||e===Debugger.stepOut}),t)},e.prototype.handleProtocolResponse=function(e){var t={id:e.id,result:{}},n=getMethodHandler(e.method);return n?n(this.container,e.params,(function(n,r){t=n?{id:e.id,error:{code:n,message:(null==r?void 0:r.message)||r||""}}:{id:e.id,result:r}})):workerGlobal.__ril_dispatcher__&&workerGlobal.__ril_dispatcher__.dispatch("tyroRequest",e),t},e}(),config={server4Http:defaultServer.http,server4WebSocket:defaultServer.websocket},sourceMapURLRe=/\/\/# sourceMappingURL=(\S+)\s*$/,ScriptManager=function(){function e(e){this.container=e,this.id2ScriptMap={},this.url2ScriptIdMap={}}return Object.defineProperty(e.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),e.prototype.getScript=function(e){return this.id2ScriptMap[e]},e.prototype.getScriptByUrl=function(e){var t=this.url2ScriptIdMap[e];if(t)return this.getScript(t)},e.prototype.getScriptByHash=function(e){var t=e.substring(4);if(t)return this.getScript(t)},e.prototype.addScript=function(e,t,n,r){var i="",o=t,a=t.match(sourceMapURLRe);a&&(i=a[1],o=t.substring(0,a.index)),this.id2ScriptMap[e]={scriptId:e,scriptHash:"hash".concat(e),source:o,ast:n,url:r||"",sourceMapURL:i},r&&(this.url2ScriptIdMap[r]=e),this.emitScriptParsedEvent(e)},e.prototype.emitAllScriptParsedEvents=function(){var e=this;Object.keys(this.id2ScriptMap).forEach((function(t){e.id2ScriptMap[t].url&&e.emitScriptParsedEvent(t)}))},e.prototype.emitScriptParsedEvent=function(e){var t=this.id2ScriptMap[e];t&&this.container.getProtocolConnection().send({method:DebuggerEvent.scriptParsed,params:{endColumn:0,endLine:2,executionContextId:this.sessionState.executionContextId,hasSourceURL:!1,hash:t.scriptHash,isLiveEdit:!1,isModule:!1,length:0,scriptId:e,scriptLanguage:"JavaScript",sourceMapURL:t.sourceMapURL,startColumn:0,startLine:0,url:t.url||""}})},e}(),SessionState=function(){function e(e,t){this.providerCtor=e,this._debuggerAttached=!1,this.executionContextId=1,this.executionContextName="app",t.executionContextId&&(this.executionContextId=t.executionContextId),t.executionContextName&&(this.executionContextName=t.executionContextName),t.channelId&&(this._channelId=t.channelId),t.channel&&(this.channel=t.channel)}return Object.defineProperty(e.prototype,"stateProvider",{get:function(){return this._stateProvider||(this._stateProvider=new this.providerCtor),this._stateProvider},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channelId",{get:function(){return this._channelId?"boat_".concat(this._channelId):""},enumerable:!1,configurable:!0}),e.prototype.resolveExternalStateOnStart=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Promise.all([this.resolveChannelId(),this.resolveChannel()])]}))}))},e.prototype.resolveChannelId=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this._channelId||(this._channelId=this.stateProvider.getChannelIdSync()),this._channelId||!this.stateProvider.getChannelId?[3,2]:(e=this,[4,this.stateProvider.getChannelId()]);case 1:e._channelId=t.sent(),t.label=2;case 2:return[2,this.channelId]}}))}))},e.prototype.resolveChannel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return this.channel||(this.channel=this.stateProvider.getChannelSync()),this.channel||!this.stateProvider.getChannel?[3,2]:(e=this,[4,this.stateProvider.getChannel()]);case 1:e.channel=t.sent(),t.label=2;case 2:return[2,this.channel]}}))}))},Object.defineProperty(e.prototype,"debuggerAttached",{get:function(){return this._debuggerAttached},set:function(e){this._debuggerAttached=e},enumerable:!1,configurable:!0}),e}(),ServiceContainer=function(){function e(e){this.userConfig=e,this.i18n=i18n$2}return e.prototype.getUserConfig=function(){return this.userConfig},e.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new RemoteObjectParser),this.remoteObjectParser},e.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new SessionState(this.stateProviderImpl,this.userConfig)),this.sessionState},e.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new ScriptManager(this)),this.scriptManager},e.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new BreakpointManager(this)),this.breakpointManager},e.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new ProtocolConnection(this)),this.protocolConnection},e.prototype.getConsole=function(){return this._consoleImpl||(this._consoleImpl=new ConsoleImpl(this)),this._consoleImpl},e.prototype.setHttpClientImpl=function(e){this.httpClientImpl=e},e.prototype.getHttpClient=function(){return this.httpClientInstance||(this.httpClientInstance=new this.httpClientImpl),this.httpClientInstance},e.prototype.setWebSocketClientImpl=function(e){this.websocketClientImpl=e},e.prototype.getWebSocketClientImpl=function(){return this.websocketClientImpl},e.prototype.setWebSocketConnection=function(e){this.webSocketConnection=e},e.prototype.getWebSocketConnection=function(){return this.webSocketConnection},e.prototype.setPausedCoverViewImpl=function(e){this.pausedCoverViewImpl=e},e.prototype.getPausedCoverView=function(){return this.pausedCoverViewInstance||(this.pausedCoverViewInstance=new this.pausedCoverViewImpl,this.pausedCoverViewInstance.setMessage(this.i18n.format("scriptPaused"),this.i18n.format("resumeScript"))),this.pausedCoverViewInstance},e.prototype.setEngineInstance=function(e){this.engine=e},e.prototype.getEngine=function(){return this.engine},e.prototype.setStateProviderImpl=function(e){this.stateProviderImpl=e},Object.defineProperty(e.prototype,"server4Http",{get:function(){var e=this.getSessionState().channel;return e?e.startsWith("wss://")?e.replace("wss://","https://"):e.replace("ws://","http://"):config.server4Http},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"server4WebSocket",{get:function(){var e=this.getSessionState().channel;return e||config.server4WebSocket},enumerable:!1,configurable:!0}),e.prototype.warn=function(e){var t=this.engine;t&&t.evaluate('console.warn("'.concat(e,'")'),void 0,{disableBreaks:!0})},e.prototype.warnPerformance=function(){this.warn(this.i18n.formatWithPrefix("performanceHint"))},e}(),Barrier=function(){function e(){var e=this;this._isOpen=!1,this._promise=new Promise((function(t){e._completePromise=t}))}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen||(this._isOpen=!0,this._completePromise())},e.prototype.wait=function(){return this._promise},e}(),AutoOpenBarrier=function(e){function t(t){var n=e.call(this)||this;return n._timeout=setTimeout((function(){return n.open()}),t),n}return __extends(t,e),t.prototype.open=function(){this._timeout&&clearTimeout(this._timeout),this._timeout=null,e.prototype.open.call(this)},t}(Barrier),BoatmanInspector=function(){function e(e){var t=this;if(this.options=e,this.barrier=new AutoOpenBarrier(1e4),this.container=new ServiceContainer(e),e.provider){var n=e.provider,r=n.httpClient,i=n.websocketClient,o=n.pausedCoverView,a=n.stateProvider;r?this.container.setHttpClientImpl(r):throwConstructError("no provider.httpClient"),i&&this.container.setWebSocketClientImpl(i),o?(this.container.setPausedCoverViewImpl(o),this.options.eventManager&&this.options.eventManager.on(EWorkerAppEvent$1.DebugMaskButtonClick,(function(){t.container.getPausedCoverView().hide()}))):throwConstructError("no provider.pausedCoverView"),a?this.container.setStateProviderImpl(a):throwConstructError("no provider.stateProvider")}else throwConstructError("no provider option");e.webSocketConnection&&this.container.setWebSocketConnection(e.webSocketConnection),this.container.getWebSocketClientImpl()||this.container.getWebSocketConnection()||throwConstructError("no websocketClient or websocketConnection"),this.breakpointManager=this.container.getBreakpointManager(),!1===e.console||e.consoleIsolation||overrideGlobalConsole(this.container),this.container.getSessionState().resolveExternalStateOnStart()}return Object.defineProperty(e.prototype,"whenDebuggerAttached",{get:function(){return this.barrier.wait()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDebuggerAttached",{get:function(){return this.barrier.isOpen()},enumerable:!1,configurable:!0}),e.prototype.stopAtEntry=function(){enable$1(this.container,{},(function(){})),enable$2(this.container,{},(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0},e.prototype.startQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.startQueueEvent()},e.prototype.replayQueueEvent=function(){var e;null===(e=this.options.eventManager)||void 0===e||e.replayQueueEvent()},e.prototype.warnPerformance=function(){this.container.warnPerformance()},e.prototype.setEngine=function(e){this.container.setEngineInstance(e),!1!==this.options.console&&this.options.consoleIsolation&&e.import({console:createConsoleProxy(this.container)}),hookPromiseRejectionCallback(e,this)},e.prototype.connect=function(){var e=this;try{log("Connecting to debugger..."),this.container.getProtocolConnection().open(),this.container.getProtocolConnection().connectionState.onDebuggerAttached((function(){log("Debugger attached."),e.barrier.open()}))}catch(t){error$1("[boatman] create connection error, will retry after 3s",t),this.barrier.open(),setTimeout((function(){e.connect()}),3e3)}},e.prototype.disconnect=function(){this.container.getProtocolConnection().close()},e.prototype.evaluateScript=function(e,t,n,r){this.container.getScriptManager().addScript(e,t,n,r)},e.prototype.hitBreakpoint=function(e,t){if(this.container.getEngine().disableBreaks)return!1;var n=this.breakpointManager;if(!n.isActive)return!1;var r=t.type;if(3===r)return this.pauseOnNode(e,t),!0;var i=getBoatmanSymbol(t,"__breakpointzxfg");if(i){var o=n.get(i);if(o){if(debug$1("hit breakpoint",t.type,t),!o.condition)return n.pauseOnBreakpoint(o),!0;try{var a=this.container.getEngine().getRuntimeStatus().callFrames;if(n.evaluateWithoutBreakpoint(o.condition,a[a.length-1].functionScope))return n.pauseOnBreakpoint(o),!0}catch(e){}}}if(0!==n.stepAction&&isBreakableNode(t)){switch(n.stepAction){case 3:return n.stepAction=0,this.pauseOnNode(e,t),!0;case 2:if(this.container.getEngine().getRuntimeStatus().callFrames.length<=n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0;break;case 1:if(this.container.getEngine().getRuntimeStatus().callFrames.length<n.breakpointCallStackDepth)return n.stepAction=0,this.pauseOnNode(e,t),!0}return!1}return!(!n.pauseOnNextStatement||67===r)&&(n.pauseOnNextStatement=!1,this.pauseOnNode(e,t),!0)},e.prototype.shouldPauseOnException=function(e,t,n,r){if(this.container.getEngine().disableBreaks)return!1;var i=this.breakpointManager;if(i.isActive&&!getBoatmanSymbol(t,"__pausedvxzg")){var o=i.pauseOnExceptionsState;2===o?(i.pauseOnException(e,t,n,r),setBoatmanSymbol(t,"__pausedvxzg",1)):1===o&&r&&(i.pauseOnException(e,t,n,!0),setBoatmanSymbol(t,"__pausedvxzg",1))}},e.prototype.pauseOnNode=function(e,t){var n=this.breakpointManager;n.isActive&&n.pauseOnNode(e,t)},e.prototype.throwException=function(e,t){var n=getBoatmanSymbol(e,"__rewrittenzxcd"),r="Uncaught";2===t&&(r+=" (in promise)"),this.container.getProtocolConnection().sendConsoleMessage({method:RuntimeEvent.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(e),exceptionId:n?n.id:100,lineNumber:0,text:r},timestamp:getPrecisionTimestamp()}})},e}();function throwConstructError(e){throw new Error("Failed to construct 'BoatmanInspector': ".concat(e))}var initRequestTaskId=1e3,BoatmanInspectorHttpClientImpl4Ariver=function(){function e(){}return e.prototype.syncRequest=function(e){var t=abridge.callSync("tyroRequest",{url:e.url,method:e.method||"GET",headers:e.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:initRequestTaskId++,data:"string"==typeof e.body?e.body:JSON.stringify(e.body)});return t?t.error?{error:t.error,errorMessage:t.errorMessage}:{status:t.status,data:t.data}:{error:1,errorMessage:"unknown"}},e}(),BoatmanInspectorWebSocketImpl4Ariver=function(){function e(e){this.emitter=new EventEmitter,this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.isSocketOpenedOnce=!1,this.useFromRemoteDebugFlag=!0,e&&(this.url=e)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){this.url=e},e.prototype.open=function(){var e=this;setTimeout((function(){debug("call connection open",e.url),e.socketTask=abridge.connectSocket({__taskIdPrefix:"remote_debug_bm",url:e.url,multiple:!0,fromRemoteDebug:e.useFromRemoteDebugFlag,fail:function(t){e.onSocketError(t)}}),e.socketTask.onOpen((function(){e.handleSocketOpen()})),e.socketTask.onError((function(t){e.onSocketError(t.data)})),e.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),e.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))}),1500)},e.prototype.send=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>2e7?log("message too large, skip",t.slice(0,50)):(debug("send message to boatman's socket",t.slice(0,50)),this.opened?this.socketTask.send({data:t,isBuffer:!1,fromRemoteDebug:this.useFromRemoteDebugFlag}):this.messageBeforeSocketOpen.push(t))},e.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},e.prototype.onSocketMessage=function(e){this.emitter.emit("message",e)},e.prototype.onSocketOpen=function(){this.emitter.emit("open")},e.prototype.onSocketError=function(e){error$1("connect boatman socket error",e),this.emitter.emit("error",e)},e.prototype.onSocketClose=function(){this.emitter.emit("close")},e.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.isSocketOpenedOnce=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.send(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},e.prototype.on=function(e,t){this.emitter.on(e,t)},e}(),BoatmanInspectorPausedCoverViewImpl4Ariver=function(){function e(){this.pausedMessage="断点命中",this.resumeMessage="继续"}return e.prototype.setMessage=function(e,t){this.pausedMessage=e,this.resumeMessage=t},e.prototype.show=function(){abridge.showRemoteDebugMask({text:this.pausedMessage,buttonTitle:this.resumeMessage,hide:!1})},e.prototype.hide=function(){abridge.showRemoteDebugMask({hide:!0})},e}(),sharedEngine,bootInvokeNumber=0;getEventManager().patch();var unicast=getSharedUniCastSocket(),version="2.2.9",originalBridgeCall=globalAlipayJSBridgeCall;function boot(e,t,n){var r;void 0===n&&(n={});var i=isInRemoteDebug(),o=getEventManager();if(bootInvokeNumber++,!sharedEngine){var a=new BoatmanInspector({provider:{httpClient:BoatmanInspectorHttpClientImpl4Ariver,websocketClient:BoatmanInspectorWebSocketImpl4Ariver,stateProvider:BoatmanInspectorStateProviderImpl4Ariver,pausedCoverView:BoatmanInspectorPausedCoverViewImpl4Ariver},webSocketConnection:unicast.createSocketTask("boatman"),eventManager:o,executionContextId:n.executionContextId,executionContextName:n.executionContextName});(sharedEngine=new Boatman).setInspector(a),o.on(EWorkerAppEvent$1.DebugPanelClick,(function(){a.disconnect()}))}var s=n.waitingForDebuggerToAttach;isAppxNg()||(log("[boatman] waitingForDebuggerToAttach is only supported in appx 2.0"),s=!1),isInIsolateContext()&&(log("[boatman] waitingForDebuggerToAttach is not supported in isolated context"),s=!1),s&&(i||(log("[boatman] user is not in remote debug mode, waitingForDebuggerToAttach is disabled"),s=!1)),sharedEngine.run(e,t,{stopAtEntry:n.stopAtEntry,waitingForDebuggerToAttach:s}),1===bootInvokeNumber&&(null===(r=sharedEngine.inspector)||void 0===r||r.warnPerformance())}try{main({socketTaskImpl:getSharedUniCastSocket().createSocketTask("worker")})}catch(e){error("init debug script error",e)}exports.boot=boot,exports.getEventManager=getEventManager,exports.originalBridgeCall=originalBridgeCall,exports.unicast=unicast,exports.version=version}));