Greasy Fork is available in English.

PageSpy-2

一个网页调试的脚本做成的库

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/483696/1541293/PageSpy-2.js

/**
 * 初始化PageSpy
 * @time 2025-02-22
 * @version 2.1.2
 * @link https://fastly.jsdelivr.net/npm/@huolala-tech/page-spy-browser
 */
/* prettier-ignore */
class initPageSpy {
  constructor(window = globalThis || self) {

    return function(){"use strict";function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}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}var check=function(e){return e&&e.Math==Math&&e},global$o=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$s=function(e){try{return!!e()}catch(e){return!0}},fails$r=fails$s,descriptors=!fails$r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),fails$q=fails$s,functionBindNative=!fails$q((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$3=functionBindNative,call$i=Function.prototype.call,functionCall=NATIVE_BIND$3?call$i.bind(call$i):function(){return call$i.apply(call$i,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$3&&!$propertyIsEnumerable.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$3(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable;var createPropertyDescriptor$6=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,call$h=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$2&&FunctionPrototype$2.bind.bind(call$h,call$h),functionUncurryThis=NATIVE_BIND$2?uncurryThisWithBind:function(e){return function(){return call$h.apply(e,arguments)}},uncurryThis$x=functionUncurryThis,toString$9=uncurryThis$x({}.toString),stringSlice$7=uncurryThis$x("".slice),classofRaw$2=function(e){return stringSlice$7(toString$9(e),8,-1)},uncurryThis$w=functionUncurryThis,fails$p=fails$s,classof$a=classofRaw$2,$Object$4=Object,split$3=uncurryThis$w("".split),indexedObject=fails$p((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$a(e)?split$3(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$5=function(e){return null==e},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$h=TypeError,requireObjectCoercible$5=function(e){if(isNullOrUndefined$4(e))throw $TypeError$h("Can't call method on "+e);return e},IndexedObject$2=indexedObject,requireObjectCoercible$4=requireObjectCoercible$5,toIndexedObject$5=function(e){return IndexedObject$2(requireObjectCoercible$4(e))},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$n=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},isCallable$m=isCallable$n,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$a=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$m(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$m(e)},global$n=global$o,isCallable$l=isCallable$n,aFunction=function(e){return isCallable$l(e)?e:void 0},getBuiltIn$9=function(e,t){return arguments.length<2?aFunction(global$n[e]):global$n[e]&&global$n[e][t]},uncurryThis$v=functionUncurryThis,objectIsPrototypeOf=uncurryThis$v({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$m=global$o,userAgent=engineUserAgent,process$1=global$m.process,Deno$1=global$m.Deno,versions=process$1&&process$1.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version$1;v8&&(match=v8.split("."),version$1=match[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version$1&&userAgent&&(match=userAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent.match(/Chrome\/(\d+)/),match&&(version$1=+match[1])));var engineV8Version=version$1,V8_VERSION=engineV8Version,fails$o=fails$s,global$l=global$o,$String$6=global$l.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$o((function(){var e=Symbol();return!$String$6(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41})),NATIVE_SYMBOL$2=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$2&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$8=getBuiltIn$9,isCallable$k=isCallable$n,isPrototypeOf$2=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$3=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$8("Symbol");return isCallable$k(t)&&isPrototypeOf$2(t.prototype,$Object$3(e))},$String$5=String,tryToString$3=function(e){try{return $String$5(e)}catch(e){return"Object"}},isCallable$j=isCallable$n,tryToString$2=tryToString$3,$TypeError$g=TypeError,aCallable$7=function(e){if(isCallable$j(e))return e;throw $TypeError$g(tryToString$2(e)+" is not a function")},aCallable$6=aCallable$7,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$4=function(e,t){var r=e[t];return isNullOrUndefined$3(r)?void 0:aCallable$6(r)},call$g=functionCall,isCallable$i=isCallable$n,isObject$9=isObject$a,$TypeError$f=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$i(r=e.toString)&&!isObject$9(n=call$g(r,e)))return n;if(isCallable$i(r=e.valueOf)&&!isObject$9(n=call$g(r,e)))return n;if("string"!==t&&isCallable$i(r=e.toString)&&!isObject$9(n=call$g(r,e)))return n;throw $TypeError$f("Can't convert object to primitive value")},shared$4={exports:{}},isPure=!1,global$k=global$o,defineProperty$7=Object.defineProperty,defineGlobalProperty$3=function(e,t){try{defineProperty$7(global$k,e,{value:t,configurable:!0,writable:!0})}catch(r){global$k[e]=t}return t},global$j=global$o,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$j[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$4.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$4.exports,requireObjectCoercible$3=requireObjectCoercible$5,$Object$2=Object,toObject$8=function(e){return $Object$2(requireObjectCoercible$3(e))},uncurryThis$u=functionUncurryThis,toObject$7=toObject$8,hasOwnProperty$1=uncurryThis$u({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty$1(toObject$7(e),t)},uncurryThis$t=functionUncurryThis,id=0,postfix=Math.random(),toString$8=uncurryThis$t(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$8(++id+postfix,36)},global$i=global$o,shared$3=sharedExports,hasOwn$b=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$1=global$i.Symbol,WellKnownSymbolsStore=shared$3("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1.for||Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$g=function(e){return hasOwn$b(WellKnownSymbolsStore,e)||(WellKnownSymbolsStore[e]=NATIVE_SYMBOL$1&&hasOwn$b(Symbol$1,e)?Symbol$1[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},call$f=functionCall,isObject$8=isObject$a,isSymbol$2=isSymbol$3,getMethod$3=getMethod$4,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$f=wellKnownSymbol$g,$TypeError$e=TypeError,TO_PRIMITIVE=wellKnownSymbol$f("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$8(e)||isSymbol$2(e))return e;var r,n=getMethod$3(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$f(n,e,t),!isObject$8(r)||isSymbol$2(r))return r;throw $TypeError$e("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive=toPrimitive$1,isSymbol$1=isSymbol$3,toPropertyKey$3=function(e){var t=toPrimitive(e,"string");return isSymbol$1(t)?t:t+""},global$h=global$o,isObject$7=isObject$a,document$1=global$h.document,EXISTS$1=isObject$7(document$1)&&isObject$7(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$i=descriptors,fails$n=fails$s,createElement=documentCreateElement$2,ie8DomDefine=!DESCRIPTORS$i&&!fails$n((function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$h=descriptors,call$e=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$5=createPropertyDescriptor$6,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$a=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$h?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$a(e,t))return createPropertyDescriptor$5(!call$e(propertyIsEnumerableModule$1.f,e,t),e[t])};var objectDefineProperty={},DESCRIPTORS$g=descriptors,fails$m=fails$s,v8PrototypeDefineBug=DESCRIPTORS$g&&fails$m((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$6=isObject$a,$String$4=String,$TypeError$d=TypeError,anObject$g=function(e){if(isObject$6(e))return e;throw $TypeError$d($String$4(e)+" is not an object")},DESCRIPTORS$f=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$1=toPropertyKey$3,$TypeError$c=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$f?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$f(e),t=toPropertyKey$1(t),anObject$f(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$f(e),t=toPropertyKey$1(t),anObject$f(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$c("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$e=descriptors,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$4=createPropertyDescriptor$6,createNonEnumerableProperty$9=DESCRIPTORS$e?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$4(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$3={exports:{}},DESCRIPTORS$d=descriptors,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$d&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$d||DESCRIPTORS$d&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$s=functionUncurryThis,isCallable$h=isCallable$n,store$1=sharedStore,functionToString=uncurryThis$s(Function.toString);isCallable$h(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$1.inspectSource,global$g=global$o,isCallable$g=isCallable$n,WeakMap$1=global$g.WeakMap,weakMapBasicDetection=isCallable$g(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$2=sharedExports,uid=uid$2,keys$2=shared$2("keys"),sharedKey$3=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$f=global$o,isObject$5=isObject$a,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$8=hasOwnProperty_1,shared$1=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$4=global$f.TypeError,WeakMap=global$f.WeakMap,set$1,get$1,has$6,enforce=function(e){return has$6(e)?get$1(e):set$1(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$5(t)||(r=get$1(t)).type!==e)throw TypeError$4("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$1.state){var store=shared$1.state||(shared$1.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$1=function(e,t){if(store.has(e))throw TypeError$4(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$1=function(e){return store.get(e)||{}},has$6=function(e){return store.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$8(e,STATE))throw TypeError$4(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$8(e,STATE,t),t},get$1=function(e){return hasOwn$8(e,STATE)?e[STATE]:{}},has$6=function(e){return hasOwn$8(e,STATE)}}var internalState={set:set$1,get:get$1,has:has$6,enforce:enforce,getterFor:getterFor},uncurryThis$r=functionUncurryThis,fails$l=fails$s,isCallable$f=isCallable$n,hasOwn$7=hasOwnProperty_1,DESCRIPTORS$c=descriptors,CONFIGURABLE_FUNCTION_NAME$2=functionName.CONFIGURABLE,inspectSource$1=inspectSource$2,InternalStateModule$5=internalState,enforceInternalState=InternalStateModule$5.enforce,getInternalState$3=InternalStateModule$5.get,$String$3=String,defineProperty$6=Object.defineProperty,stringSlice$6=uncurryThis$r("".slice),replace$8=uncurryThis$r("".replace),join$3=uncurryThis$r([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$c&&!fails$l((function(){return 8!==defineProperty$6((function(){}),"length",{value:8}).length})),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(e,t,r){"Symbol("===stringSlice$6($String$3(t),0,7)&&(t="["+replace$8($String$3(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$7(e,"name")||CONFIGURABLE_FUNCTION_NAME$2&&e.name!==t)&&(DESCRIPTORS$c?defineProperty$6(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$7(r,"arity")&&e.length!==r.arity&&defineProperty$6(e,"length",{value:r.arity});try{r&&hasOwn$7(r,"constructor")&&r.constructor?DESCRIPTORS$c&&defineProperty$6(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=enforceInternalState(e);return hasOwn$7(n,"source")||(n.source=join$3(TEMPLATE,"string"==typeof t?t:"")),e};Function.prototype.toString=makeBuiltIn$2((function(){return isCallable$f(this)&&getInternalState$3(this).source||inspectSource$1(this)}),"toString");var makeBuiltInExports=makeBuiltIn$3.exports,isCallable$e=isCallable$n,definePropertyModule$3=objectDefineProperty,makeBuiltIn$1=makeBuiltInExports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$8=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(isCallable$e(r)&&makeBuiltIn$1(r,i,n),n.global)o?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$3.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$5=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$5:ceil)(t)},trunc=mathTrunc,toIntegerOrInfinity$7=function(e){var t=+e;return t!=t||0===t?0:trunc(t)},toIntegerOrInfinity$6=toIntegerOrInfinity$7,max$3=Math.max,min$3=Math.min,toAbsoluteIndex$4=function(e,t){var r=toIntegerOrInfinity$6(e);return r<0?max$3(r+t,0):min$3(r,t)},toIntegerOrInfinity$5=toIntegerOrInfinity$7,min$2=Math.min,toLength$5=function(e){return e>0?min$2(toIntegerOrInfinity$5(e),9007199254740991):0},toLength$4=toLength$5,lengthOfArrayLike$6=function(e){return toLength$4(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$3=toAbsoluteIndex$4,lengthOfArrayLike$5=lengthOfArrayLike$6,createMethod$3=function(e){return function(t,r,n){var o,i=toIndexedObject$3(t),a=lengthOfArrayLike$5(i),s=toAbsoluteIndex$3(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$3(!0),indexOf:createMethod$3(!1)},uncurryThis$q=functionUncurryThis,hasOwn$6=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$5=uncurryThis$q([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),o=0,i=[];for(r in n)!hasOwn$6(hiddenKeys$2,r)&&hasOwn$6(n,r)&&push$5(i,r);for(;t.length>o;)hasOwn$6(n,r=t[o++])&&(~indexOf$1(i,r)||push$5(i,r));return i},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$2.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$7=getBuiltIn$9,uncurryThis$p=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$e=anObject$g,concat$2=uncurryThis$p([].concat),ownKeys$1=getBuiltIn$7("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$e(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$2(t,r(e)):t},hasOwn$5=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$2=function(e,t,r){for(var n=ownKeys(t),o=definePropertyModule$2.f,i=getOwnPropertyDescriptorModule.f,a=0;a<n.length;a++){var s=n[a];hasOwn$5(e,s)||r&&hasOwn$5(r,s)||o(e,s,i(t,s))}},fails$k=fails$s,isCallable$d=isCallable$n,replacement=/#|\.prototype\./,isForced$1=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$d(t)?fails$k(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$e=global$o,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$7=defineBuiltIn$8,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced=isForced_1,_export=function(e,t){var r,n,o,i,a,s=e.target,c=e.global,l=e.stat;if(r=c?global$e:l?global$e[s]||defineGlobalProperty(s,{}):(global$e[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=getOwnPropertyDescriptor$2(r,n))&&a.value:r[n],!isForced(c?n:s+(l?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;copyConstructorProperties$1(i,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$7(i,"sham",!0),defineBuiltIn$7(r,n,i,e)}},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$3=FunctionPrototype.apply,call$d=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$d.bind(apply$3):function(){return call$d.apply(apply$3,arguments)}),uncurryThis$o=functionUncurryThis,aCallable$5=aCallable$7,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$o(aCallable$5(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$c=isCallable$n,$String$2=String,$TypeError$b=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$c(e))return e;throw $TypeError$b("Can't set "+$String$2(e)+" as a prototype")},uncurryThisAccessor$3=functionUncurryThisAccessor,anObject$d=anObject$g,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor$3(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$d(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),defineProperty$5=objectDefineProperty.f,proxyAccessor$1=function(e,t,r){r in e||defineProperty$5(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},isCallable$b=isCallable$n,isObject$4=isObject$a,setPrototypeOf$3=objectSetPrototypeOf,inheritIfRequired$1=function(e,t,r){var n,o;return setPrototypeOf$3&&isCallable$b(n=t.constructor)&&n!==r&&isObject$4(o=n.prototype)&&o!==r.prototype&&setPrototypeOf$3(e,o),e},wellKnownSymbol$e=wellKnownSymbol$g,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),test={};test[TO_STRING_TAG$3]="z";var toStringTagSupport="[object z]"===String(test),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$a=isCallable$n,classofRaw$1=classofRaw$2,wellKnownSymbol$d=wellKnownSymbol$g,TO_STRING_TAG$2=wellKnownSymbol$d("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw$1(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$9=TO_STRING_TAG_SUPPORT?classofRaw$1:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$1(e),TO_STRING_TAG$2))?r:CORRECT_ARGUMENTS?classofRaw$1(t):"Object"==(n=classofRaw$1(t))&&isCallable$a(t.callee)?"Arguments":n},classof$8=classof$9,$String$1=String,toString$7=function(e){if("Symbol"===classof$8(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$1(e)},toString$6=toString$7,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$6(e)},isObject$3=isObject$a,createNonEnumerableProperty$6=createNonEnumerableProperty$9,installErrorCause$1=function(e,t){isObject$3(t)&&"cause"in t&&createNonEnumerableProperty$6(e,"cause",t.cause)},uncurryThis$n=functionUncurryThis,$Error=Error,replace$7=uncurryThis$n("".replace),TEST=String($Error("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error.prepareStackTrace)for(;t--;)e=replace$7(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$j=fails$s,createPropertyDescriptor$3=createPropertyDescriptor$6,errorStackInstallable=!fails$j((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$3(1,7)),7!==e.stack)})),createNonEnumerableProperty$5=createNonEnumerableProperty$9,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$5(e,"stack",clearErrorStack(r,n)))},getBuiltIn$6=getBuiltIn$9,hasOwn$4=hasOwnProperty_1,createNonEnumerableProperty$4=createNonEnumerableProperty$9,isPrototypeOf$1=objectIsPrototypeOf,setPrototypeOf$2=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$2,proxyAccessor=proxyAccessor$1,inheritIfRequired=inheritIfRequired$1,normalizeStringArgument=normalizeStringArgument$1,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,DESCRIPTORS$b=descriptors,wrapErrorConstructorWithCause$1=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),s=a[a.length-1],c=getBuiltIn$6.apply(null,a);if(c){var l=c.prototype;if(hasOwn$4(l,"cause")&&delete l.cause,!r)return c;var u=getBuiltIn$6("Error"),d=t((function(e,t){var r=normalizeStringArgument(n?t:e,void 0),o=n?new c(e):new c;return void 0!==r&&createNonEnumerableProperty$4(o,"message",r),installErrorStack(o,d,o.stack,2),this&&isPrototypeOf$1(l,this)&&inheritIfRequired(o,this,d),arguments.length>i&&installErrorCause(o,arguments[i]),o}));d.prototype=l,"Error"!==s?setPrototypeOf$2?setPrototypeOf$2(d,u):copyConstructorProperties(d,u,{name:!0}):DESCRIPTORS$b&&o in c&&(proxyAccessor(d,c,o),proxyAccessor(d,c,"prepareStackTrace")),copyConstructorProperties(d,c);try{l.name!==s&&createNonEnumerableProperty$4(l,"name",s),l.constructor=d}catch(e){}return d}},$$m=_export,global$d=global$o,apply$2=functionApply,wrapErrorConstructorWithCause=wrapErrorConstructorWithCause$1,WEB_ASSEMBLY="WebAssembly",WebAssembly=global$d[WEB_ASSEMBLY],FORCED$2=7!==Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(e,t){var r={};r[e]=wrapErrorConstructorWithCause(e,t,FORCED$2),$$m({global:!0,constructor:!0,arity:1,forced:FORCED$2},r)},exportWebAssemblyErrorCauseWrapper=function(e,t){if(WebAssembly&&WebAssembly[e]){var r={};r[e]=wrapErrorConstructorWithCause(WEB_ASSEMBLY+"."+e,t,FORCED$2),$$m({target:WEB_ASSEMBLY,stat:!0,constructor:!0,arity:1,forced:FORCED$2},r)}};exportGlobalErrorCauseWrapper("Error",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("EvalError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("RangeError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("ReferenceError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("SyntaxError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("TypeError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportGlobalErrorCauseWrapper("URIError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportWebAssemblyErrorCauseWrapper("CompileError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportWebAssemblyErrorCauseWrapper("LinkError",(function(e){return function(t){return apply$2(e,this,arguments)}})),exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(e){return function(t){return apply$2(e,this,arguments)}}));var classof$7=classofRaw$2,isArray$3=Array.isArray||function(e){return"Array"==classof$7(e)},DESCRIPTORS$a=descriptors,isArray$2=isArray$3,$TypeError$a=TypeError,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray$2(e)&&!getOwnPropertyDescriptor$1(e,"length").writable)throw $TypeError$a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},$TypeError$9=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$1=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$9("Maximum allowed index exceeded");return e},$$l=_export,toObject$6=toObject$8,lengthOfArrayLike$4=lengthOfArrayLike$6,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$1,fails$i=fails$s,INCORRECT_TO_LENGTH=fails$i((function(){return 4294967297!==[].push.call({length:4294967296},1)})),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},FORCED$1=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$l({target:"Array",proto:!0,arity:1,forced:FORCED$1},{push:function(e){var t=toObject$6(this),r=lengthOfArrayLike$4(t),n=arguments.length;doesNotExceedSafeInteger(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return setArrayLength(t,r),r}});var uncurryThis$m=functionUncurryThis,arraySlice$4=uncurryThis$m([].slice),uncurryThis$l=functionUncurryThis,isArray$1=isArray$3,isCallable$9=isCallable$n,classof$6=classofRaw$2,toString$5=toString$7,push$4=uncurryThis$l([].push),getJsonReplacerFunction=function(e){if(isCallable$9(e))return e;if(isArray$1(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$4(r,o):"number"!=typeof o&&"Number"!=classof$6(o)&&"String"!=classof$6(o)||push$4(r,toString$5(o))}var i=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$1(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}},$$k=_export,getBuiltIn$5=getBuiltIn$9,apply$1=functionApply,call$c=functionCall,uncurryThis$k=functionUncurryThis,fails$h=fails$s,isCallable$8=isCallable$n,isSymbol=isSymbol$3,arraySlice$3=arraySlice$4,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL=symbolConstructorDetection,$String=String,$stringify=getBuiltIn$5("JSON","stringify"),exec$4=uncurryThis$k(/./.exec),charAt$7=uncurryThis$k("".charAt),charCodeAt$2=uncurryThis$k("".charCodeAt),replace$6=uncurryThis$k("".replace),numberToString$1=uncurryThis$k(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL||fails$h((function(){var e=getBuiltIn$5("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$h((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$3(arguments),n=getReplacerFunction(t);if(isCallable$8(n)||void 0!==e&&!isSymbol(e))return r[1]=function(e,t){if(isCallable$8(n)&&(t=call$c(n,this,$String(e),t)),!isSymbol(t))return t},apply$1($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$7(r,t-1),o=charAt$7(r,t+1);return exec$4(low,e)&&!exec$4(hi,o)||exec$4(hi,e)&&!exec$4(low,n)?"\\u"+numberToString$1(charCodeAt$2(e,0),16):e};$stringify&&$$k({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$3(arguments),o=apply$1(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$6(o,tester,fixIllFormed):o}});var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement$1=documentCreateElement$2,classList=documentCreateElement$1("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,objectDefineProperties={},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$9=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$1=objectDefineProperty,anObject$c=anObject$g,toIndexedObject$1=toIndexedObject$5,objectKeys$1=objectKeys$2;objectDefineProperties.f=DESCRIPTORS$9&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$c(e);for(var r,n=toIndexedObject$1(t),o=objectKeys$1(t),i=o.length,a=0;i>a;)definePropertyModule$1.f(e,r=o[a++],n[r]);return e};var getBuiltIn$4=getBuiltIn$9,html$1=getBuiltIn$4("document","documentElement"),anObject$b=anObject$g,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$1("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$b(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)},wellKnownSymbol$c=wellKnownSymbol$g,create$3=objectCreate,defineProperty$4=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype;null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$4(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$3(null)});var addToUnscopables$1=function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0},iterators={},fails$g=fails$s,correctPrototypeGetter=!fails$g((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$3=hasOwnProperty_1,isCallable$7=isCallable$n,toObject$5=toObject$8,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(e){var t=toObject$5(e);if(hasOwn$3(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$7(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype$1:null},fails$f=fails$s,isCallable$6=isCallable$n,isObject$2=isObject$a,getPrototypeOf$2=objectGetPrototypeOf,defineBuiltIn$6=defineBuiltIn$8,wellKnownSymbol$b=wellKnownSymbol$g,ITERATOR$6=wellKnownSymbol$b("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$2(getPrototypeOf$2(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$2(IteratorPrototype$2)||fails$f((function(){var e={};return IteratorPrototype$2[ITERATOR$6].call(e)!==e}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),isCallable$6(IteratorPrototype$2[ITERATOR$6])||defineBuiltIn$6(IteratorPrototype$2,ITERATOR$6,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},defineProperty$3=objectDefineProperty.f,hasOwn$2=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$g,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),setToStringTag$6=function(e,t,r){e&&!r&&(e=e.prototype),e&&!hasOwn$2(e,TO_STRING_TAG$1)&&defineProperty$3(e,TO_STRING_TAG$1,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$2=objectCreate,createPropertyDescriptor$2=createPropertyDescriptor$6,setToStringTag$5=setToStringTag$6,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$2(IteratorPrototype$1,{next:createPropertyDescriptor$2(+!n,r)}),setToStringTag$5(e,o,!1),Iterators$4[o]=returnThis$1,e},$$j=_export,call$b=functionCall,FunctionName$1=functionName,isCallable$5=isCallable$n,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$4=setToStringTag$6,createNonEnumerableProperty$3=createNonEnumerableProperty$9,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$9=wellKnownSymbol$g,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$2=FunctionName$1.PROPER,CONFIGURABLE_FUNCTION_NAME$1=FunctionName$1.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$5=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,i,a){createIteratorConstructor$1(r,t,n);var s,c,l,u=function(e){if(e===o&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in f)return f[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",p=!1,f=e.prototype,h=f[ITERATOR$5]||f["@@iterator"]||o&&f[o],y=!BUGGY_SAFARI_ITERATORS&&h||u(o),g="Array"==t&&f.entries||h;if(g&&(s=getPrototypeOf$1(g.call(new e)))!==Object.prototype&&s.next&&(getPrototypeOf$1(s)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(s,IteratorPrototype):isCallable$5(s[ITERATOR$5])||defineBuiltIn$5(s,ITERATOR$5,returnThis)),setToStringTag$4(s,d,!0)),PROPER_FUNCTION_NAME$2&&o==VALUES&&h&&h.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME$1?createNonEnumerableProperty$3(f,"name",VALUES):(p=!0,y=function(){return call$b(h,this)})),o)if(c={values:u(VALUES),keys:i?y:u(KEYS),entries:u(ENTRIES)},a)for(l in c)(BUGGY_SAFARI_ITERATORS||p||!(l in f))&&defineBuiltIn$5(f,l,c[l]);else $$j({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},c);return f[ITERATOR$5]!==y&&defineBuiltIn$5(f,ITERATOR$5,y,{name:o}),Iterators$3[t]=y,c},createIterResultObject$2=function(e,t){return{value:e,done:t}},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$4=internalState,defineProperty$2=objectDefineProperty.f,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$2,DESCRIPTORS$8=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$4=InternalStateModule$4.set,getInternalState$2=InternalStateModule$4.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator$1(Array,"Array",(function(e,t){setInternalState$4(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})}),(function(){var e=getInternalState$2(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$1(void 0,!0)):createIterResultObject$1("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$8&&"values"!==values.name)try{defineProperty$2(values,"name",{value:"values"})}catch(e){}var global$c=global$o,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$2=createNonEnumerableProperty$9,wellKnownSymbol$8=wellKnownSymbol$g,ITERATOR$4=wellKnownSymbol$8("iterator"),TO_STRING_TAG=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(e,t){if(e){if(e[ITERATOR$4]!==ArrayValues)try{createNonEnumerableProperty$2(e,ITERATOR$4,ArrayValues)}catch(t){e[ITERATOR$4]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty$2(e,TO_STRING_TAG,t),DOMIterables[t])for(var r in ArrayIteratorMethods)if(e[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty$2(e,r,ArrayIteratorMethods[r])}catch(t){e[r]=ArrayIteratorMethods[r]}}};for(var COLLECTION_NAME in DOMIterables)handlePrototype(global$c[COLLECTION_NAME]&&global$c[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var anObject$a=anObject$g,regexpFlags$1=function(){var e=anObject$a(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$e=fails$s,global$b=global$o,$RegExp$2=global$b.RegExp,UNSUPPORTED_Y$1=fails$e((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),MISSED_STICKY=UNSUPPORTED_Y$1||fails$e((function(){return!$RegExp$2("a","y").sticky})),BROKEN_CARET=UNSUPPORTED_Y$1||fails$e((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$d=fails$s,global$a=global$o,$RegExp$1=global$a.RegExp,regexpUnsupportedDotAll=fails$d((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),fails$c=fails$s,global$9=global$o,$RegExp=global$9.RegExp,regexpUnsupportedNcg=fails$c((function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),call$a=functionCall,uncurryThis$j=functionUncurryThis,toString$4=toString$7,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=sharedExports,create$1=objectCreate,getInternalState$1=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$6=uncurryThis$j("".charAt),indexOf=uncurryThis$j("".indexOf),replace$5=uncurryThis$j("".replace),stringSlice$5=uncurryThis$j("".slice),UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,call$a(nativeExec,re1,"a"),call$a(nativeExec,re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(e){var t,r,n,o,i,a,s,c=this,l=getInternalState$1(c),u=toString$4(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=call$a(patchedExec,d,u),c.lastIndex=d.lastIndex,t;var p=l.groups,f=UNSUPPORTED_Y&&c.sticky,h=call$a(regexpFlags,c),y=c.source,g=0,$=u;if(f&&(h=replace$5(h,"y",""),-1===indexOf(h,"g")&&(h+="g"),$=stringSlice$5(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==charAt$6(u,c.lastIndex-1))&&(y="(?: "+y+")",$=" "+$,g++),r=new RegExp("^(?:"+y+")",h)),NPCG_INCLUDED&&(r=new RegExp("^"+y+"$(?!\\s)",h)),UPDATES_LAST_INDEX_WRONG&&(n=c.lastIndex),o=call$a(nativeExec,f?r:c,$),f?o?(o.input=stringSlice$5(o.input,g),o[0]=stringSlice$5(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),NPCG_INCLUDED&&o&&o.length>1&&call$a(nativeReplace,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=create$1(null),i=0;i<p.length;i++)a[(s=p[i])[0]]=o[s[1]];return o});var regexpExec$2=patchedExec,$$i=_export,exec$3=regexpExec$2;$$i({target:"RegExp",proto:!0,forced:/./.exec!==exec$3},{exec:exec$3});var classofRaw=classofRaw$2,uncurryThis$i=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw(e))return uncurryThis$i(e)},uncurryThis$h=functionUncurryThisClause,defineBuiltIn$4=defineBuiltIn$8,regexpExec$1=regexpExec$2,fails$b=fails$s,wellKnownSymbol$7=wellKnownSymbol$g,createNonEnumerableProperty$1=createNonEnumerableProperty$9,SPECIES$2=wellKnownSymbol$7("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol$7(e),i=!fails$b((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!fails$b((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[SPECIES$2]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=uncurryThis$h(/./[o]),c=t(o,""[e],(function(e,t,r,n,o){var a=uncurryThis$h(e),c=t.exec;return c===regexpExec$1||c===RegExpPrototype.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));defineBuiltIn$4(String.prototype,e,c[0]),defineBuiltIn$4(RegExpPrototype,o,c[1])}n&&createNonEnumerableProperty$1(RegExpPrototype[o],"sham",!0)},uncurryThis$g=functionUncurryThis,toIntegerOrInfinity$4=toIntegerOrInfinity$7,toString$3=toString$7,requireObjectCoercible$2=requireObjectCoercible$5,charAt$5=uncurryThis$g("".charAt),charCodeAt$1=uncurryThis$g("".charCodeAt),stringSlice$4=uncurryThis$g("".slice),createMethod$2=function(e){return function(t,r){var n,o,i=toString$3(requireObjectCoercible$2(t)),a=toIntegerOrInfinity$4(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$1(i,a))<55296||n>56319||a+1===s||(o=charCodeAt$1(i,a+1))<56320||o>57343?e?charAt$5(i,a):n:e?stringSlice$4(i,a,a+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},charAt$4=stringMultibyte.charAt,advanceStringIndex$1=function(e,t,r){return t+(r?charAt$4(e,t).length:1)},uncurryThis$f=functionUncurryThis,toObject$4=toObject$8,floor$4=Math.floor,charAt$3=uncurryThis$f("".charAt),replace$4=uncurryThis$f("".replace),stringSlice$3=uncurryThis$f("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==o&&(o=toObject$4(o),c=SUBSTITUTION_SYMBOLS),replace$4(i,c,(function(i,c){var l;switch(charAt$3(c,0)){case"$":return"$";case"&":return e;case"`":return stringSlice$3(t,0,r);case"'":return stringSlice$3(t,a);case"<":l=o[stringSlice$3(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var d=floor$4(u/10);return 0===d?i:d<=s?void 0===n[d-1]?charAt$3(c,1):n[d-1]+charAt$3(c,1):i}l=n[u-1]}return void 0===l?"":l}))},call$9=functionCall,anObject$9=anObject$g,isCallable$4=isCallable$n,classof$5=classofRaw$2,regexpExec=regexpExec$2,$TypeError$8=TypeError,regexpExecAbstract=function(e,t){var r=e.exec;if(isCallable$4(r)){var n=call$9(r,e,t);return null!==n&&anObject$9(n),n}if("RegExp"===classof$5(e))return call$9(regexpExec,e,t);throw $TypeError$8("RegExp#exec called on incompatible receiver")},apply=functionApply,call$8=functionCall,uncurryThis$e=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails$a=fails$s,anObject$8=anObject$g,isCallable$3=isCallable$n,isNullOrUndefined$2=isNullOrUndefined$5,toIntegerOrInfinity$3=toIntegerOrInfinity$7,toLength$3=toLength$5,toString$2=toString$7,requireObjectCoercible$1=requireObjectCoercible$5,advanceStringIndex=advanceStringIndex$1,getMethod$2=getMethod$4,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol$6=wellKnownSymbol$g,REPLACE=wellKnownSymbol$6("replace"),max$2=Math.max,min$1=Math.min,concat$1=uncurryThis$e([].concat),push$3=uncurryThis$e([].push),stringIndexOf=uncurryThis$e("".indexOf),stringSlice$2=uncurryThis$e("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));fixRegExpWellKnownSymbolLogic("replace",(function(e,t,r){var n=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,r){var n=requireObjectCoercible$1(this),o=isNullOrUndefined$2(e)?void 0:getMethod$2(e,REPLACE);return o?call$8(o,e,n,r):call$8(t,toString$2(n),e,r)},function(e,o){var i=anObject$8(this),a=toString$2(e);if("string"==typeof o&&-1===stringIndexOf(o,n)&&-1===stringIndexOf(o,"$<")){var s=r(t,i,a,o);if(s.done)return s.value}var c=isCallable$3(o);c||(o=toString$2(o));var l=i.global;if(l){var u=i.unicode;i.lastIndex=0}for(var d=[];;){var p=regExpExec(i,a);if(null===p)break;if(push$3(d,p),!l)break;""===toString$2(p[0])&&(i.lastIndex=advanceStringIndex(a,toLength$3(i.lastIndex),u))}for(var f="",h=0,y=0;y<d.length;y++){for(var g=toString$2((p=d[y])[0]),$=max$2(min$1(toIntegerOrInfinity$3(p.index),a.length),0),m=[],S=1;S<p.length;S++)push$3(m,maybeToString(p[S]));var b=p.groups;if(c){var E=concat$1([g],m,$,a);void 0!==b&&push$3(E,b);var A=toString$2(apply(o,void 0,E))}else A=getSubstitution(g,a,$,m,b,o);$>=h&&(f+=stringSlice$2(a,h,$)+A,h=$+g.length)}return f+stringSlice$2(a,h)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var toggleSelection=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||r.forEach((function(t){e.addRange(t)})),t&&t.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function copy(e,t){var r,n,o,i,a,s,c=!1;t||(t={}),r=t.debug||!1;try{if(o=deselectCurrent(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=clipboardToIE11Formatting[t.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){r&&console.error("unable to copy using execCommand: ",o),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){r&&console.error("unable to copy using clipboardData: ",o),r&&console.error("falling back to prompt"),n=format("message"in t?t.message:defaultMessage),window.prompt(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return c}var copyToClipboard=copy,copy$1=getDefaultExportFromCjs(copyToClipboard),aCallable$4=aCallable$7,toObject$3=toObject$8,IndexedObject$1=indexedObject,lengthOfArrayLike$3=lengthOfArrayLike$6,$TypeError$7=TypeError,createMethod$1=function(e){return function(t,r,n,o){aCallable$4(r);var i=toObject$3(t),a=IndexedObject$1(i),s=lengthOfArrayLike$3(i),c=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw $TypeError$7("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in a&&(o=r(o,a[c],c,i));return o}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},fails$9=fails$s,arrayMethodIsStrict$1=function(e,t){var r=[][e];return!!r&&fails$9((function(){r.call(null,t||function(){return 1},1)}))},classof$4=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$4(process),$$h=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$1,CHROME_VERSION=engineV8Version,IS_NODE$2=engineIsNode,CHROME_BUG=!IS_NODE$2&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED=CHROME_BUG||!arrayMethodIsStrict("reduce");$$h({target:"Array",proto:!0,forced:FORCED},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var arrayBufferBasicDetection="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,makeBuiltIn=makeBuiltInExports,defineProperty$1=objectDefineProperty,defineBuiltInAccessor$6=function(e,t,r){return r.get&&makeBuiltIn(r.get,t,{getter:!0}),r.set&&makeBuiltIn(r.set,t,{setter:!0}),defineProperty$1.f(e,t,r)},defineBuiltIn$3=defineBuiltIn$8,defineBuiltIns$2=function(e,t,r){for(var n in t)defineBuiltIn$3(e,n,t[n],r);return e},isPrototypeOf=objectIsPrototypeOf,$TypeError$6=TypeError,anInstance$3=function(e,t){if(isPrototypeOf(t,e))return e;throw $TypeError$6("Incorrect invocation")},toIntegerOrInfinity$2=toIntegerOrInfinity$7,toLength$2=toLength$5,$RangeError$1=RangeError,toIndex$2=function(e){if(void 0===e)return 0;var t=toIntegerOrInfinity$2(e),r=toLength$2(t);if(t!==r)throw $RangeError$1("Wrong length or index");return r},$Array$2=Array,abs=Math.abs,pow$1=Math.pow,floor$3=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,t,r){var n,o,i,a=$Array$2(r),s=8*r-t-1,c=(1<<s)-1,l=c>>1,u=23===t?pow$1(2,-24)-pow$1(2,-77):0,d=e<0||0===e&&1/e<0?1:0,p=0;for((e=abs(e))!=e||e===1/0?(o=e!=e?1:0,n=c):(n=floor$3(log(e)/LN2),e*(i=pow$1(2,-n))<1&&(n--,i*=2),(e+=n+l>=1?u/i:u*pow$1(2,1-l))*i>=2&&(n++,i/=2),n+l>=c?(o=0,n=c):n+l>=1?(o=(e*i-1)*pow$1(2,t),n+=l):(o=e*pow$1(2,l-1)*pow$1(2,t),n=0));t>=8;)a[p++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)a[p++]=255&n,n/=256,s-=8;return a[--p]|=128*d,a},unpack=function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-a;else{if(u===i)return r?NaN:l?-1/0:1/0;r+=pow$1(2,t),u-=a}return(l?-1:1)*r*pow$1(2,u-t)},ieee754={pack:pack,unpack:unpack},toObject$2=toObject$8,toAbsoluteIndex$2=toAbsoluteIndex$4,lengthOfArrayLike$2=lengthOfArrayLike$6,arrayFill$1=function(e){for(var t=toObject$2(this),r=lengthOfArrayLike$2(t),n=arguments.length,o=toAbsoluteIndex$2(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:toAbsoluteIndex$2(i,r);a>o;)t[o++]=e;return t},toPropertyKey=toPropertyKey$3,definePropertyModule=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$6,createProperty$2=function(e,t,r){var n=toPropertyKey(t);n in e?definePropertyModule.f(e,n,createPropertyDescriptor$1(0,r)):e[n]=r},toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$1=lengthOfArrayLike$6,createProperty$1=createProperty$2,$Array$1=Array,max$1=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$1(e),o=toAbsoluteIndex$1(t,n),i=toAbsoluteIndex$1(void 0===r?n:r,n),a=$Array$1(max$1(i-o,0)),s=0;o<i;o++,s++)createProperty$1(a,s,e[o]);return a.length=s,a},global$8=global$o,uncurryThis$d=functionUncurryThis,DESCRIPTORS$7=descriptors,NATIVE_ARRAY_BUFFER=arrayBufferBasicDetection,FunctionName=functionName,createNonEnumerableProperty=createNonEnumerableProperty$9,defineBuiltInAccessor$5=defineBuiltInAccessor$6,defineBuiltIns$1=defineBuiltIns$2,fails$8=fails$s,anInstance$2=anInstance$3,toIntegerOrInfinity$1=toIntegerOrInfinity$7,toLength$1=toLength$5,toIndex$1=toIndex$2,IEEE754=ieee754,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,getOwnPropertyNames=objectGetOwnPropertyNames.f,arrayFill=arrayFill$1,arraySlice$2=arraySliceSimple,setToStringTag$3=setToStringTag$6,InternalStateModule$3=internalState,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,ARRAY_BUFFER$1="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",getInternalArrayBufferState=InternalStateModule$3.getterFor(ARRAY_BUFFER$1),getInternalDataViewState=InternalStateModule$3.getterFor(DATA_VIEW),setInternalState$3=InternalStateModule$3.set,NativeArrayBuffer$1=global$8[ARRAY_BUFFER$1],$ArrayBuffer=NativeArrayBuffer$1,ArrayBufferPrototype$2=$ArrayBuffer&&$ArrayBuffer[PROTOTYPE],$DataView=global$8[DATA_VIEW],DataViewPrototype$2=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,Array$1=global$8.Array,RangeError$1=global$8.RangeError,fill=uncurryThis$d(arrayFill),reverse=uncurryThis$d([].reverse),packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,t,r){defineBuiltInAccessor$5(e[PROTOTYPE],t,{configurable:!0,get:function(){return r(this)[t]}})},get=function(e,t,r,n){var o=toIndex$1(r),i=getInternalDataViewState(e);if(o+t>i.byteLength)throw RangeError$1(WRONG_INDEX);var a=i.bytes,s=o+i.byteOffset,c=arraySlice$2(a,s,s+t);return n?c:reverse(c)},set=function(e,t,r,n,o,i){var a=toIndex$1(r),s=getInternalDataViewState(e);if(a+t>s.byteLength)throw RangeError$1(WRONG_INDEX);for(var c=s.bytes,l=a+s.byteOffset,u=n(+o),d=0;d<t;d++)c[l+d]=u[i?d:t-d-1]};if(NATIVE_ARRAY_BUFFER){var INCORRECT_ARRAY_BUFFER_NAME=PROPER_FUNCTION_NAME$1&&NativeArrayBuffer$1.name!==ARRAY_BUFFER$1;if(fails$8((function(){NativeArrayBuffer$1(1)}))&&fails$8((function(){new NativeArrayBuffer$1(-1)}))&&!fails$8((function(){return new NativeArrayBuffer$1,new NativeArrayBuffer$1(1.5),new NativeArrayBuffer$1(NaN),1!=NativeArrayBuffer$1.length||INCORRECT_ARRAY_BUFFER_NAME&&!CONFIGURABLE_FUNCTION_NAME})))INCORRECT_ARRAY_BUFFER_NAME&&CONFIGURABLE_FUNCTION_NAME&&createNonEnumerableProperty(NativeArrayBuffer$1,"name",ARRAY_BUFFER$1);else{$ArrayBuffer=function(e){return anInstance$2(this,ArrayBufferPrototype$2),new NativeArrayBuffer$1(toIndex$1(e))},$ArrayBuffer[PROTOTYPE]=ArrayBufferPrototype$2;for(var keys$1=getOwnPropertyNames(NativeArrayBuffer$1),j=0,key;keys$1.length>j;)(key=keys$1[j++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer$1[key]);ArrayBufferPrototype$2.constructor=$ArrayBuffer}setPrototypeOf&&getPrototypeOf(DataViewPrototype$2)!==ObjectPrototype&&setPrototypeOf(DataViewPrototype$2,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=uncurryThis$d(DataViewPrototype$2.setInt8);testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||defineBuiltIns$1(DataViewPrototype$2,{setInt8:function(e,t){$setInt8(this,e,t<<24>>24)},setUint8:function(e,t){$setInt8(this,e,t<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function(e){anInstance$2(this,ArrayBufferPrototype$2);var t=toIndex$1(e);setInternalState$3(this,{type:ARRAY_BUFFER$1,bytes:fill(Array$1(t),0),byteLength:t}),DESCRIPTORS$7||(this.byteLength=t,this.detached=!1)},ArrayBufferPrototype$2=$ArrayBuffer[PROTOTYPE],$DataView=function(e,t,r){anInstance$2(this,DataViewPrototype$2),anInstance$2(e,ArrayBufferPrototype$2);var n=getInternalArrayBufferState(e),o=n.byteLength,i=toIntegerOrInfinity$1(t);if(i<0||i>o)throw RangeError$1("Wrong offset");if(i+(r=void 0===r?o-i:toLength$1(r))>o)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{type:DATA_VIEW,buffer:e,byteLength:r,byteOffset:i,bytes:n.bytes}),DESCRIPTORS$7||(this.buffer=e,this.byteLength=r,this.byteOffset=i)},DataViewPrototype$2=$DataView[PROTOTYPE],DESCRIPTORS$7&&(addGetter($ArrayBuffer,"byteLength",getInternalArrayBufferState),addGetter($DataView,"buffer",getInternalDataViewState),addGetter($DataView,"byteLength",getInternalDataViewState),addGetter($DataView,"byteOffset",getInternalDataViewState)),defineBuiltIns$1(DataViewPrototype$2,{getInt8:function(e){return get(this,1,e)[0]<<24>>24},getUint8:function(e){return get(this,1,e)[0]},getInt16:function(e){var t=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=get(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){set(this,1,e,packInt8,t)},setUint8:function(e,t){set(this,1,e,packInt8,t)},setInt16:function(e,t){set(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){set(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){set(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){set(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){set(this,4,e,packFloat32,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){set(this,8,e,packFloat64,t,arguments.length>2?arguments[2]:void 0)}});setToStringTag$3($ArrayBuffer,ARRAY_BUFFER$1),setToStringTag$3($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},getBuiltIn$3=getBuiltIn$9,defineBuiltInAccessor$4=defineBuiltInAccessor$6,wellKnownSymbol$5=wellKnownSymbol$g,DESCRIPTORS$6=descriptors,SPECIES$1=wellKnownSymbol$5("species"),setSpecies$1=function(e){var t=getBuiltIn$3(e);DESCRIPTORS$6&&t&&!t[SPECIES$1]&&defineBuiltInAccessor$4(t,SPECIES$1,{configurable:!0,get:function(){return this}})},$$g=_export,global$7=global$o,arrayBufferModule=arrayBuffer,setSpecies=setSpecies$1,ARRAY_BUFFER="ArrayBuffer",ArrayBuffer$3=arrayBufferModule[ARRAY_BUFFER],NativeArrayBuffer=global$7[ARRAY_BUFFER];$$g({global:!0,constructor:!0,forced:NativeArrayBuffer!==ArrayBuffer$3},{ArrayBuffer:ArrayBuffer$3}),setSpecies(ARRAY_BUFFER);var uncurryThis$c=functionUncurryThis,fails$7=fails$s,isCallable$2=isCallable$n,classof$3=classof$9,getBuiltIn$2=getBuiltIn$9,inspectSource=inspectSource$2,noop=function(){},empty=[],construct=getBuiltIn$2("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$2=uncurryThis$c(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$2(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$2(e))return!1;switch(classof$3(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$2(constructorRegExp,inspectSource(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$2=!construct||fails$7((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isConstructor$1=isConstructor$2,tryToString$1=tryToString$3,$TypeError$5=TypeError,aConstructor$1=function(e){if(isConstructor$1(e))return e;throw $TypeError$5(tryToString$1(e)+" is not a constructor")},anObject$7=anObject$g,aConstructor=aConstructor$1,isNullOrUndefined$1=isNullOrUndefined$5,wellKnownSymbol$4=wellKnownSymbol$g,SPECIES=wellKnownSymbol$4("species"),speciesConstructor$2=function(e,t){var r,n=anObject$7(e).constructor;return void 0===n||isNullOrUndefined$1(r=anObject$7(n)[SPECIES])?t:aConstructor(r)},$$f=_export,uncurryThis$b=functionUncurryThisClause,fails$6=fails$s,ArrayBufferModule=arrayBuffer,anObject$6=anObject$g,toAbsoluteIndex=toAbsoluteIndex$4,toLength=toLength$5,speciesConstructor$1=speciesConstructor$2,ArrayBuffer$2=ArrayBufferModule.ArrayBuffer,DataView$2=ArrayBufferModule.DataView,DataViewPrototype$1=DataView$2.prototype,nativeArrayBufferSlice=uncurryThis$b(ArrayBuffer$2.prototype.slice),getUint8=uncurryThis$b(DataViewPrototype$1.getUint8),setUint8=uncurryThis$b(DataViewPrototype$1.setUint8),INCORRECT_SLICE=fails$6((function(){return!new ArrayBuffer$2(2).slice(1,void 0).byteLength}));$$f({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE},{slice:function(e,t){if(nativeArrayBufferSlice&&void 0===t)return nativeArrayBufferSlice(anObject$6(this),e);for(var r=anObject$6(this).byteLength,n=toAbsoluteIndex(e,r),o=toAbsoluteIndex(void 0===t?r:t,r),i=new(speciesConstructor$1(this,ArrayBuffer$2))(toLength(o-n)),a=new DataView$2(this),s=new DataView$2(i),c=0;n<o;)setUint8(s,c++,getUint8(a,n++));return i}});var uncurryThisAccessor$2=functionUncurryThisAccessor,classof$2=classofRaw$2,$TypeError$4=TypeError,arrayBufferByteLength$2=uncurryThisAccessor$2(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!=classof$2(e))throw $TypeError$4("ArrayBuffer expected");return e.byteLength},uncurryThis$a=functionUncurryThis,arrayBufferByteLength$1=arrayBufferByteLength$2,slice$1=uncurryThis$a(ArrayBuffer.prototype.slice),arrayBufferIsDetached=function(e){if(0!==arrayBufferByteLength$1(e))return!1;try{return slice$1(e,0,0),!1}catch(e){return!0}},DESCRIPTORS$5=descriptors,defineBuiltInAccessor$3=defineBuiltInAccessor$6,isDetached$1=arrayBufferIsDetached,ArrayBufferPrototype$1=ArrayBuffer.prototype;DESCRIPTORS$5&&!("detached"in ArrayBufferPrototype$1)&&defineBuiltInAccessor$3(ArrayBufferPrototype$1,"detached",{configurable:!0,get:function(){return isDetached$1(this)}});var engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$1&&"object"==typeof window&&"object"==typeof document,global$6=global$o,fails$5=fails$s,V8=engineV8Version,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,IS_NODE=engineIsNode,structuredClone$1=global$6.structuredClone,structuredCloneProperTransfer=!!structuredClone$1&&!fails$5((function(){if(IS_DENO&&V8>92||IS_NODE&&V8>94||IS_BROWSER&&V8>97)return!1;var e=new ArrayBuffer(8),t=structuredClone$1(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),global$5=global$o,uncurryThis$9=functionUncurryThis,uncurryThisAccessor$1=functionUncurryThisAccessor,toIndex=toIndex$2,isDetached=arrayBufferIsDetached,arrayBufferByteLength=arrayBufferByteLength$2,PROPER_TRANSFER=structuredCloneProperTransfer,TypeError$3=global$5.TypeError,structuredClone=global$5.structuredClone,ArrayBuffer$1=global$5.ArrayBuffer,DataView$1=global$5.DataView,min=Math.min,ArrayBufferPrototype=ArrayBuffer$1.prototype,DataViewPrototype=DataView$1.prototype,slice=uncurryThis$9(ArrayBufferPrototype.slice),isResizable=uncurryThisAccessor$1(ArrayBufferPrototype,"resizable","get"),maxByteLength=uncurryThisAccessor$1(ArrayBufferPrototype,"maxByteLength","get"),getInt8=uncurryThis$9(DataViewPrototype.getInt8),setInt8=uncurryThis$9(DataViewPrototype.setInt8),arrayBufferTransfer=PROPER_TRANSFER&&function(e,t,r){var n=arrayBufferByteLength(e),o=void 0===t?n:min(toIndex(t),n),i=!isResizable||!isResizable(e);if(isDetached(e))throw TypeError$3("ArrayBuffer is detached");var a=structuredClone(e,{transfer:[e]});if(n==o&&(r||i))return a;if(!r||i)return slice(a,0,o);for(var s=new ArrayBuffer$1(o,maxByteLength&&{maxByteLength:maxByteLength(a)}),c=new DataView$1(a),l=new DataView$1(s),u=0;u<o;u++)setInt8(l,u,getInt8(c,u));return s},$$e=_export,$transfer$1=arrayBufferTransfer;$transfer$1&&$$e({target:"ArrayBuffer",proto:!0},{transfer:function(){return $transfer$1(this,arguments.length?arguments[0]:void 0,!0)}});var $$d=_export,$transfer=arrayBufferTransfer;$transfer&&$$d({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return $transfer(this,arguments.length?arguments[0]:void 0,!1)}});var charAt$2=stringMultibyte.charAt,toString$1=toString$7,InternalStateModule$2=internalState,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$2,STRING_ITERATOR="String Iterator",setInternalState$2=InternalStateModule$2.set,getInternalState=InternalStateModule$2.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString$1(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject(void 0,!0):(e=charAt$2(r,n),t.index+=e.length,createIterResultObject(e,!1))}));var fails$4=fails$s,wellKnownSymbol$3=wellKnownSymbol$g,DESCRIPTORS$4=descriptors,IS_PURE=isPure,ITERATOR$3=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$4((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.size&&(IS_PURE||!DESCRIPTORS$4)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$3]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),uncurryThis$8=functionUncurryThisClause,aCallable$3=aCallable$7,NATIVE_BIND=functionBindNative,bind$3=uncurryThis$8(uncurryThis$8.bind),functionBindContext=function(e,t){return aCallable$3(e),void 0===t?e:NATIVE_BIND?bind$3(e,t):function(){return e.apply(t,arguments)}},DESCRIPTORS$3=descriptors,uncurryThis$7=functionUncurryThis,call$7=functionCall,fails$3=fails$s,objectKeys=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$8,IndexedObject=indexedObject,$assign=Object.assign,defineProperty=Object.defineProperty,concat=uncurryThis$7([].concat),objectAssign=!$assign||fails$3((function(){if(DESCRIPTORS$3&&1!==$assign({b:1},$assign(defineProperty({},"a",{enumerable:!0,get:function(){defineProperty(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$1(e),n=arguments.length,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;n>o;)for(var s,c=IndexedObject(arguments[o++]),l=i?concat(objectKeys(c),i(c)):objectKeys(c),u=l.length,d=0;u>d;)s=l[d++],DESCRIPTORS$3&&!call$7(a,c,s)||(r[s]=c[s]);return r}:$assign,call$6=functionCall,anObject$5=anObject$g,getMethod$1=getMethod$4,iteratorClose$3=function(e,t,r){var n,o;anObject$5(e);try{if(!(n=getMethod$1(e,"return"))){if("throw"===t)throw r;return r}n=call$6(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$5(n),r},anObject$4=anObject$g,iteratorClose$2=iteratorClose$3,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$4(r)[0],r[1]):t(r)}catch(t){iteratorClose$2(e,"throw",t)}},wellKnownSymbol$2=wellKnownSymbol$g,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$2("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof$1=classof$9,getMethod=getMethod$4,isNullOrUndefined=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$g,ITERATOR$1=wellKnownSymbol$1("iterator"),getIteratorMethod$3=function(e){if(!isNullOrUndefined(e))return getMethod(e,ITERATOR$1)||getMethod(e,"@@iterator")||Iterators[classof$1(e)]},call$5=functionCall,aCallable$2=aCallable$7,anObject$3=anObject$g,tryToString=tryToString$3,getIteratorMethod$2=getIteratorMethod$3,$TypeError$3=TypeError,getIterator$2=function(e,t){var r=arguments.length<2?getIteratorMethod$2(e):t;if(aCallable$2(r))return anObject$3(call$5(r,e));throw $TypeError$3(tryToString(e)+" is not iterable")},bind$2=functionBindContext,call$4=functionCall,toObject=toObject$8,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$1,isConstructor=isConstructor$2,lengthOfArrayLike=lengthOfArrayLike$6,createProperty=createProperty$2,getIterator$1=getIterator$2,getIteratorMethod$1=getIteratorMethod$3,$Array=Array,arrayFrom$1=function(e){var t=toObject(e),r=isConstructor(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=bind$2(o,n>2?arguments[2]:void 0));var a,s,c,l,u,d,p=getIteratorMethod$1(t),f=0;if(!p||this===$Array&&isArrayIteratorMethod(p))for(a=lengthOfArrayLike(t),s=r?new this(a):$Array(a);a>f;f++)d=i?o(t[f],f):t[f],createProperty(s,f,d);else for(u=(l=getIterator$1(t,p)).next,s=r?new this:[];!(c=call$4(u,l)).done;f++)d=i?callWithSafeIterationClosing(l,o,[c.value,f],!0):c.value,createProperty(s,f,d);return s.length=f,s},uncurryThis$6=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$6(regexSeparators.exec),floor$2=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$6("".charCodeAt),join$2=uncurryThis$6([].join),push$2=uncurryThis$6([].push),replace$3=uncurryThis$6("".replace),split$2=uncurryThis$6("".split),toLowerCase$1=uncurryThis$6("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=charCodeAt(e,r++);if(o>=55296&&o<=56319&&r<n){var i=charCodeAt(e,r++);56320==(64512&i)?push$2(t,((1023&o)<<10)+(1023&i)+65536):(push$2(t,o),r--)}else push$2(t,o)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$2(e/damp):e>>1,e+=floor$2(e/t);e>baseMinusTMin*tMax>>1;)e=floor$2(e/baseMinusTMin),n+=base;return floor$2(n+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,r,n=[],o=(e=ucs2decode(e)).length,i=initialN,a=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$2(n,fromCharCode(r));var c=n.length,l=c;for(c&&push$2(n,delimiter);l<o;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var d=l+1;if(u-i>floor$2((maxInt-a)/d))throw $RangeError(OVERFLOW_ERROR);for(a+=(u-i)*d,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++a>maxInt)throw $RangeError(OVERFLOW_ERROR);if(r==i){for(var p=a,f=base;;){var h=f<=s?tMin:f>=s+tMax?tMax:f-s;if(p<h)break;var y=p-h,g=base-h;push$2(n,fromCharCode(digitToBasic(h+y%g))),p=floor$2(y/g),f+=base}push$2(n,fromCharCode(digitToBasic(p))),s=adapt(a,d,l==c),a=0,l++}}a++,i++}return join$2(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],o=split$2(replace$3(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<o.length;t++)r=o[t],push$2(n,exec$1(regexNonASCII,r)?"xn--"+encode(r):r);return join$2(n,".")},$TypeError$2=TypeError,validateArgumentsLength$2=function(e,t){if(e<t)throw $TypeError$2("Not enough arguments");return e},arraySlice$1=arraySliceSimple,floor$1=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$1(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$1(e,0,n),t),mergeSort(arraySlice$1(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},arraySort$1=mergeSort,$$c=_export,global$4=global$o,call$3=functionCall,uncurryThis$5=functionUncurryThis,DESCRIPTORS$2=descriptors,USE_NATIVE_URL$1=urlConstructorDetection,defineBuiltIn$2=defineBuiltIn$8,defineBuiltInAccessor$2=defineBuiltInAccessor$6,defineBuiltIns=defineBuiltIns$2,setToStringTag$2=setToStringTag$6,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$1=internalState,anInstance$1=anInstance$3,isCallable$1=isCallable$n,hasOwn$1=hasOwnProperty_1,bind$1=functionBindContext,classof=classof$9,anObject$2=anObject$g,isObject$1=isObject$a,$toString$1=toString$7,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$6,getIterator=getIterator$2,getIteratorMethod=getIteratorMethod$3,validateArgumentsLength$1=validateArgumentsLength$2,wellKnownSymbol=wellKnownSymbol$g,arraySort=arraySort$1,ITERATOR=wellKnownSymbol("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$1=InternalStateModule$1.set,getInternalParamsState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$2)return global$4[e];var t=getOwnPropertyDescriptor(global$4,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$1=global$4.RegExp,TypeError$2=global$4.TypeError,decodeURIComponent=global$4.decodeURIComponent,encodeURIComponent$1=global$4.encodeURIComponent,charAt$1=uncurryThis$5("".charAt),join$1=uncurryThis$5([].join),push$1=uncurryThis$5([].push),replace$2=uncurryThis$5("".replace),shift$1=uncurryThis$5([].shift),splice=uncurryThis$5([].splice),split$1=uncurryThis$5("".split),stringSlice$1=uncurryThis$5("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$1("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=replace$2(e,plus," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=replace$2(t,percentSequence(r--),percentDecode);return t}},find=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$2(encodeURIComponent$1(e),find,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$1(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$1(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$1(e,0)?stringSlice$1(e,1):e:$toString$1(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,c=getIteratorMethod(e);if(c)for(r=(t=getIterator(e,c)).next;!(n=call$3(r,t)).done;){if(i=(o=getIterator(anObject$2(n.value))).next,(a=call$3(i,o)).done||(s=call$3(i,o)).done||!call$3(i,o).done)throw TypeError$2("Expected sequence with length 2");push$1(this.entries,{key:$toString$1(a.value),value:$toString$1(s.value)})}else for(var l in e)hasOwn$1(e,l)&&push$1(this.entries,{key:l,value:$toString$1(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=split$1(t,"="),push$1(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$1(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$1(r,serialize(e.key)+"="+serialize(e.value));return join$1(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$1(this,URLSearchParamsPrototype$1);var e=setInternalState$1(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$2||(this.length=e.entries.length)},URLSearchParamsPrototype$1=URLSearchParamsConstructor.prototype;if(defineBuiltIns(URLSearchParamsPrototype$1,{append:function(e,t){validateArgumentsLength$1(arguments.length,2);var r=getInternalParamsState(this);push$1(r.entries,{key:$toString$1(e),value:$toString$1(t)}),DESCRIPTORS$2||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$1(e),o=0;o<r.length;)r[o].key===n?splice(r,o,1):o++;DESCRIPTORS$2||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=[],o=0;o<t.length;o++)t[o].key===r&&push$1(n,t[o].value);return n},has:function(e){validateArgumentsLength$1(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$1(arguments.length,1);for(var r,n=getInternalParamsState(this),o=n.entries,i=!1,a=$toString$1(e),s=$toString$1(t),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?splice(o,c--,1):(i=!0,r.value=s));i||push$1(o,{key:a,value:s}),DESCRIPTORS$2||(this.length=o.length),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$1(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$2(URLSearchParamsPrototype$1,ITERATOR,URLSearchParamsPrototype$1.entries,{name:"entries"}),defineBuiltIn$2(URLSearchParamsPrototype$1,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),DESCRIPTORS$2&&defineBuiltInAccessor$2(URLSearchParamsPrototype$1,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$c({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$1&&isCallable$1(Headers$1)){var headersHas=uncurryThis$5(HeadersPrototype.has),headersSet=uncurryThis$5(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$1(e)){var t,r=e.body;if(classof(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers$1(e.headers):new Headers$1,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create(e,{body:createPropertyDescriptor(0,$toString$1(r)),headers:createPropertyDescriptor(0,t)})}return e};if(isCallable$1(nativeFetch)&&$$c({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$1(NativeRequest)){var RequestConstructor=function(e){return anInstance$1(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$c({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$b=_export,DESCRIPTORS$1=descriptors,USE_NATIVE_URL=urlConstructorDetection,global$3=global$o,bind=functionBindContext,uncurryThis$4=functionUncurryThis,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$1=defineBuiltInAccessor$6,anInstance=anInstance$3,hasOwn=hasOwnProperty_1,assign=objectAssign,arrayFrom=arrayFrom$1,arraySlice=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$7,setToStringTag$1=setToStringTag$6,validateArgumentsLength=validateArgumentsLength$2,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule=internalState,setInternalState=InternalStateModule.set,getInternalURLState=InternalStateModule.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$3.URL,TypeError$1=global$3.TypeError,parseInt$1=global$3.parseInt,floor=Math.floor,pow=Math.pow,charAt=uncurryThis$4("".charAt),exec=uncurryThis$4(/./.exec),join=uncurryThis$4([].join),numberToString=uncurryThis$4(1..toString),pop=uncurryThis$4([].pop),push=uncurryThis$4([].push),replace$1=uncurryThis$4("".replace),shift=uncurryThis$4([].shift),split=uncurryThis$4("".split),stringSlice=uncurryThis$4("".slice),toLowerCase=uncurryThis$4("".toLowerCase),unshift=uncurryThis$4([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseIPv4=function(e){var t,r,n,o,i,a,s,c=split(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==charAt(o,0)&&(i=exec(HEX_START,o)?16:8,o=stringSlice(o,8==i?1:2)),""===o)a=0;else{if(!exec(10==i?DEC:8==i?OCT:HEX,o))return e;a=parseInt$1(o,i)}push(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow(256,5-t))return null}else if(a>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow(256,3-n);return s},parseIPv6=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,p=function(){return charAt(e,d)};if(":"==p()){if(":"!=charAt(e,1))return;d+=2,u=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=r=0;r<4&&exec(HEX,p());)t=16*t+parseInt$1(p(),16),d++,r++;if("."==p()){if(0==r)return;if(d-=r,l>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;d++}if(!exec(DIGIT,p()))return;for(;exec(DIGIT,p());){if(i=parseInt$1(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}c[l]=256*c[l]+o,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;c[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(a=l-u,l=7;0!=l&&a>0;)s=c[l],c[l--]=c[u+a-1],c[u+--a]=s;else if(8!=l)return;return c},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t},serializeHost=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor(e/256);return join(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=numberToString(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec(ALPHA,charAt(e,0))&&(":"==(r=charAt(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice(e,0,2))&&(2==e.length||"/"===(t=charAt(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,o,i,a=$toString(e);if(t){if(o=this.parse(a))throw TypeError$1(o);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),o=this.parse(a,null,n))throw TypeError$1(o);(i=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=i}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s=this,c=t||SCHEME_START,l=0,u="",d=!1,p=!1,f=!1;for(e=$toString(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace$1(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace$1(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace$1(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);l<=n.length;){switch(o=n[l],c){case SCHEME_START:if(!o||!exec(ALPHA,o)){if(t)return INVALID_SCHEME;c=NO_SCHEME;continue}u+=toLowerCase(o),c=SCHEME;break;case SCHEME:if(o&&(exec(ALPHANUMERIC,o)||"+"==o||"-"==o||"."==o))u+=toLowerCase(o);else{if(":"!=o){if(t)return INVALID_SCHEME;u="",c=NO_SCHEME,l=0;continue}if(t&&(s.isSpecial()!=hasOwn(specialSchemes,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?c=FILE:s.isSpecial()&&r&&r.scheme==s.scheme?c=SPECIAL_RELATIVE_OR_AUTHORITY:s.isSpecial()?c=SPECIAL_AUTHORITY_SLASHES:"/"==n[l+1]?(c=PATH_OR_AUTHORITY,l++):(s.cannotBeABaseURL=!0,push(s.path,""),c=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==o){s.scheme=r.scheme,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=FRAGMENT;break}c="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=o||"/"!=n[l+1]){c=RELATIVE;continue}c=SPECIAL_AUTHORITY_IGNORE_SLASHES,l++;break;case PATH_OR_AUTHORITY:if("/"==o){c=AUTHORITY;break}c=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,o==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query=r.query;else if("/"==o||"\\"==o&&s.isSpecial())c=RELATIVE_SLASH;else if("?"==o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query="",c=QUERY;else{if("#"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.path.length--,c=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",c=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=PATH;continue}c=AUTHORITY}else c=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(c=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=o||"/"!=charAt(u,l+1))continue;l++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){c=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){d&&(u="%40"+u),d=!0,i=arrayFrom(u);for(var h=0;h<i.length;h++){var y=i[h];if(":"!=y||f){var g=percentEncode(y,userinfoPercentEncodeSet);f?s.password+=g:s.username+=g}else f=!0}u=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(d&&""==u)return INVALID_AUTHORITY;l-=arrayFrom(u).length+1,u="",c=HOST}else u+=o;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){c=FILE_HOST;continue}if(":"!=o||p){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",c=PATH_START,t)return;continue}"["==o?p=!0:"]"==o&&(p=!1),u+=o}else{if(""==u)return INVALID_HOST;if(a=s.parseHost(u))return a;if(u="",c=PORT,t==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&s.isSpecial()||t){if(""!=u){var $=parseInt$1(u,10);if($>65535)return INVALID_PORT;s.port=s.isSpecial()&&$===specialSchemes[s.scheme]?null:$,u=""}if(t)return;c=PATH_START;continue}return INVALID_PORT}u+=o;break;case FILE:if(s.scheme="file","/"==o||"\\"==o)c=FILE_SLASH;else{if(!r||"file"!=r.scheme){c=PATH;continue}if(o==EOF)s.host=r.host,s.path=arraySlice(r.path),s.query=r.query;else if("?"==o)s.host=r.host,s.path=arraySlice(r.path),s.query="",c=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(join(arraySlice(n,l),""))||(s.host=r.host,s.path=arraySlice(r.path),s.shortenPath()),c=PATH;continue}s.host=r.host,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",c=FRAGMENT}}break;case FILE_SLASH:if("/"==o||"\\"==o){c=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join(arraySlice(n,l),""))&&(isWindowsDriveLetter(r.path[0],!0)?push(s.path,r.path[0]):s.host=r.host),c=PATH;continue;case FILE_HOST:if(o==EOF||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&isWindowsDriveLetter(u))c=PATH;else if(""==u){if(s.host="",t)return;c=PATH_START}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",c=PATH_START}continue}u+=o;break;case PATH_START:if(s.isSpecial()){if(c=PATH,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EOF&&(c=PATH,"/"!=o))continue}else s.fragment="",c=FRAGMENT;else s.query="",c=QUERY;break;case PATH:if(o==EOF||"/"==o||"\\"==o&&s.isSpecial()||!t&&("?"==o||"#"==o)){if(isDoubleDot(u)?(s.shortenPath(),"/"==o||"\\"==o&&s.isSpecial()||push(s.path,"")):isSingleDot(u)?"/"==o||"\\"==o&&s.isSpecial()||push(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt(u,0)+":"),push(s.path,u)),u="","file"==s.scheme&&(o==EOF||"?"==o||"#"==o))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==o?(s.query="",c=QUERY):"#"==o&&(s.fragment="",c=FRAGMENT)}else u+=percentEncode(o,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==o?(s.query="",c=QUERY):"#"==o?(s.fragment="",c=FRAGMENT):o!=EOF&&(s.path[0]+=percentEncode(o,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=o?o!=EOF&&("'"==o&&s.isSpecial()?s.query+="%27":s.query+="#"==o?"%23":percentEncode(o,C0ControlPercentEncodeSet)):(s.fragment="",c=FRAGMENT);break;case FRAGMENT:o!=EOF&&(s.fragment+=percentEncode(o,fragmentPercentEncodeSet))}l++}},parseHost:function(e){var t,r,n;if("["==charAt(e,0)){if("]"!=charAt(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn(specialSchemes,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=serializeHost(o),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+join(a,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$1(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString(e))?this.query=null:("?"==charAt(e,0)&&(e=stringSlice(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString(e))?("#"==charAt(e,0)&&(e=stringSlice(e,1)),this.fragment="",this.parse(e,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(e){var t=anInstance(this,URLPrototype),r=validateArgumentsLength(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState(t,new URLState(e,!1,r));DESCRIPTORS$1||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$1&&(defineBuiltInAccessor$1(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$1(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$1(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$1(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$1(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$1(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$1(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$1(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$1(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$1(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$1(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$1(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn$1(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn$1(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn$1(URLConstructor,"createObjectURL",bind(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn$1(URLConstructor,"revokeObjectURL",bind(nativeRevokeObjectURL,NativeURL))}setToStringTag$1(URLConstructor,"URL"),$$b({global:!0,constructor:!0,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$1},{URL:URLConstructor});var $$a=_export,call$2=functionCall;$$a({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return call$2(URL.prototype.toString,this)}});var DESCRIPTORS=descriptors,uncurryThis$3=functionUncurryThis,defineBuiltInAccessor=defineBuiltInAccessor$6,URLSearchParamsPrototype=URLSearchParams.prototype,forEach$1=uncurryThis$3(URLSearchParamsPrototype.forEach);function getRandomId(){return Math.random().toString(36).slice(2)}function getObjectKeys(e){return Object.keys(e)}function toStringTag(e){return Object.prototype.toString.call(e)}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function isBigInt(e){return"[object BigInt]"===toStringTag(e)}function isArray(e){return e instanceof Array}function isArrayLike(e){return"function"==typeof NodeList&&"NodeList"===NodeList.name&&e instanceof NodeList||"function"==typeof HTMLCollection&&"HTMLCollection"===HTMLCollection.name&&e instanceof HTMLCollection}function isObjectLike(e){return"object"==typeof e&&null!==e}function isPlainObject(e){return!(!isObjectLike(e)||"[object Object]"!==toStringTag(e))}function isPrototype(e){return!(!isObjectLike(e)||!hasOwnProperty(e,"constructor")||"function"!=typeof e.constructor)}function isBlob(e){return e instanceof Blob}function isArrayBuffer(e){return e instanceof ArrayBuffer}function isURLSearchParams(e){return e instanceof URLSearchParams}function isFormData(e){return e instanceof FormData}function isFile(e){return e instanceof File}function isHeaders(e){return e instanceof Headers}function isDocument(e){return e instanceof Document}function isURL(e){return e instanceof URL}function isClass(e){return"function"==typeof e&&void 0!==e.prototype}function isCN(){const e=navigator.languages;return["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"].some((t=>e.includes(t)))}function isTypedArray(e){return ArrayBuffer.isView(e)}DESCRIPTORS&&!("size"in URLSearchParamsPrototype)&&defineBuiltInAccessor(URLSearchParamsPrototype,"size",{get:function(){var e=0;return forEach$1(this,(function(){e++})),e},configurable:!0,enumerable:!0});const stringify=e=>"".concat(e),primitive=e=>({ok:!0,value:e});function makePrimitiveValue(e){return void 0===e?primitive(stringify(e)):null===e?primitive(e):isNumber(e)&&(e===-1/0||e===1/0||Number.isNaN(e))?primitive(stringify(e)):isBigInt(e)?primitive("".concat(e,"n")):"symbol"==typeof e||"function"==typeof e?primitive(stringify(e.toString())):e instanceof Error?primitive(stringify(e.stack)):e===Object.prototype?{value:null,ok:!1}:e instanceof Object||"object"==typeof e?{value:e,ok:!1}:primitive(e)}function stringifyData(e){const{ok:t,value:r}=makePrimitiveValue(e);return t?r:JSON.stringify(e,((e,t)=>makePrimitiveValue(t).value),2)}function getValueType(e){return void 0===e?"undefined":null===e?"null":isBigInt(e)?"bigint":e instanceof Object?e instanceof Error?"error":"function"==typeof e?"function":"object":typeof e}const unproxyConsole={...console},psLog=["log","info","error","warn","debug"].reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];console[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...r)},e.unproxy[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];unproxyConsole[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...r)},e)),{unproxy:{}});function getAuthSecret(){const e=Math.floor(1e6*Math.random());return String(e).padStart(6,"0")}const formatErrorObj=e=>{if("object"!=typeof e)return null;const{name:t,message:r,stack:n}=Object(e);return!1===[t,r,n].every(Boolean)?null:{name:t,message:r,stack:n}},blob2base64Async=e=>new Promise(((t,r)=>{const n=new FileReader;n.onload=e=>{var r;t(null===(r=e.target)||void 0===r?void 0:r.result)},n.onerror=()=>{r(new Error("blob2base64Async: can not convert"))},n.readAsDataURL(e)})),CONNECT="connect",JOIN="join",LEAVE="leave",CLOSE="close",MESSAGE="message",BROADCAST="broadcast",ERROR="error",PING="ping",PONG="pong",UPDATE_ROOM_INFO="updateRoomInfo";var SERVER_MESSAGE_TYPE=Object.freeze({__proto__:null,BROADCAST:BROADCAST,CLOSE:CLOSE,CONNECT:CONNECT,ERROR:ERROR,JOIN:JOIN,LEAVE:LEAVE,MESSAGE:MESSAGE,PING:PING,PONG:PONG,UPDATE_ROOM_INFO:UPDATE_ROOM_INFO});function makeMessage(e,t){return{role:"client",type:e,data:{...(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&{id:getRandomId()},...t}}}function makeUnicastMessage(e,t,r){return{type:MESSAGE,content:{data:e,from:t,to:r}}}function makeBroadcastMessage(e){return{type:BROADCAST,content:{data:e}}}class RequestItem{constructor(e){_defineProperty(this,"id",""),_defineProperty(this,"method",""),_defineProperty(this,"url",""),_defineProperty(this,"requestType","xhr"),_defineProperty(this,"requestHeader",null),_defineProperty(this,"status",0),_defineProperty(this,"statusText",""),_defineProperty(this,"readyState",0),_defineProperty(this,"response",void 0),_defineProperty(this,"responseReason",null),_defineProperty(this,"responseType",""),_defineProperty(this,"responseHeader",null),_defineProperty(this,"startTime",0),_defineProperty(this,"endTime",0),_defineProperty(this,"costTime",0),_defineProperty(this,"postData",null),_defineProperty(this,"requestPayload",null),_defineProperty(this,"withCredentials",!1),_defineProperty(this,"lastEventId",""),this.id=e}}const MAX_SIZE=2097152,Reason={EXCEED_SIZE:"Exceed maximum limit"};var ReqReadyState;!function(e){e[e.UNSENT=0]="UNSENT",e[e.OPENED=1]="OPENED",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE"}(ReqReadyState||(ReqReadyState={}));const BINARY_FILE_VARIANT="(file)";function formatEntries(e){const t=[];let r=e.next();for(;!r.done;){const[n,o]=r.value;let i;i=isFile(o)?BINARY_FILE_VARIANT:String(o),t.push([n,i]),r=e.next()}return t}function getContentType(e){return e?isFormData(e)?"multipart/form-data":isURLSearchParams(e)?"application/x-www-form-urlencoded;charset=UTF-8":isDocument(e)?"application/xml":isBlob(e)?e.type:"text/plain;charset=UTF-8":null}const CONTENT_TYPE_HEADER="Content-Type";function addContentTypeHeader(e,t){if(!t)return e;const r=getContentType(t);if(!r)return e;const n=[CONTENT_TYPE_HEADER,r];if(!e)return[n];for(let t=0;t<e.length;t++){const[r]=e[t];if(r.toUpperCase()===CONTENT_TYPE_HEADER.toUpperCase())return e}return[...e,n]}async function getFormattedBody(e){if(!e)return null;if(isURLSearchParams(e)||isFormData(e))return formatEntries(e.entries());if(isBlob(e))return"[object Blob]";if(isTypedArray(e))return"[object TypedArray]";if(isDocument(e)){return(new XMLSerializer).serializeToString(e)}return isString(e)?e:toStringTag(e)}class NetworkProxyBase{constructor(e){_defineProperty(this,"socketStore",void 0),_defineProperty(this,"reqMap",Object.create(null)),this.socketStore=e}getRequestMap(){return this.reqMap}getRequest(e){return this.reqMap[e]}removeRequest(e){delete this.reqMap[e]}createRequest(e){return e?this.reqMap[e]?(psLog.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[e]=new RequestItem(e),!0):(psLog.warn('The "id" is required when init request object'),!1)}setRequest(e,t){return!(!e||!t)&&(this.reqMap[e]=t,!0)}sendRequestItem(e,t){var r;if(!1!==(null===(r=NetworkProxyBase.dataProcessor)||void 0===r?void 0:r.call(NetworkProxyBase,t)))try{this.reqMap[e]||(this.reqMap[e]=t);const r=makeMessage("network",{...t},!1);this.socketStore.dispatchEvent("public-data",r),this.socketStore.broadcastMessage(r,t.readyState!==ReqReadyState.DONE),this.deferDeleteRequest(e)}catch(e){psLog.error(e.message)}}deferDeleteRequest(e){const t=this.getRequest(e);t&&t.readyState===ReqReadyState.DONE&&setTimeout((()=>{delete this.reqMap[e]}),3e3)}}_defineProperty(NetworkProxyBase,"dataProcessor",void 0);var uncurryThis$2=functionUncurryThis,SetPrototype$1=Set.prototype,setHelpers={Set:Set,add:uncurryThis$2(SetPrototype$1.add),has:uncurryThis$2(SetPrototype$1.has),remove:uncurryThis$2(SetPrototype$1.delete),proto:SetPrototype$1},has$5=setHelpers.has,aSet$7=function(e){return has$5(e),e},call$1=functionCall,iterateSimple$7=function(e,t,r){for(var n,o,i=r||e.next;!(n=call$1(i,e)).done;)if(void 0!==(o=t(n.value)))return o},uncurryThis$1=functionUncurryThis,iterateSimple$6=iterateSimple$7,SetHelpers$5=setHelpers,Set$3=SetHelpers$5.Set,SetPrototype=SetHelpers$5.proto,forEach=uncurryThis$1(SetPrototype.forEach),keys=uncurryThis$1(SetPrototype.keys),next=keys(new Set$3).next,setIterate=function(e,t,r){return r?iterateSimple$6(keys(e),t,next):forEach(e,t)},SetHelpers$4=setHelpers,iterate$1=setIterate,Set$2=SetHelpers$4.Set,add$3=SetHelpers$4.add,setClone=function(e){var t=new Set$2;return iterate$1(e,(function(e){add$3(t,e)})),t},uncurryThisAccessor=functionUncurryThisAccessor,SetHelpers$3=setHelpers,setSize=uncurryThisAccessor(SetHelpers$3.proto,"size","get")||function(e){return e.size},aCallable$1=aCallable$7,anObject$1=anObject$g,call=functionCall,toIntegerOrInfinity=toIntegerOrInfinity$7,$TypeError$1=TypeError,max=Math.max,SetRecord=function(e,t,r,n){this.set=e,this.size=t,this.has=r,this.keys=n};SetRecord.prototype={getIterator:function(){return anObject$1(call(this.keys,this.set))},includes:function(e){return call(this.has,this.set,e)}};var getSetRecord$7=function(e){anObject$1(e);var t=+e.size;if(t!=t)throw $TypeError$1("Invalid size");return new SetRecord(e,max(toIntegerOrInfinity(t),0),aCallable$1(e.has),aCallable$1(e.keys))},aSet$6=aSet$7,SetHelpers$2=setHelpers,clone$2=setClone,size$4=setSize,getSetRecord$6=getSetRecord$7,iterateSet$2=setIterate,iterateSimple$5=iterateSimple$7,has$4=SetHelpers$2.has,remove$1=SetHelpers$2.remove,setDifference=function(e){var t=aSet$6(this),r=getSetRecord$6(e),n=clone$2(t);return size$4(t)<=r.size?iterateSet$2(t,(function(e){r.includes(e)&&remove$1(n,e)})):iterateSimple$5(r.getIterator(),(function(e){has$4(t,e)&&remove$1(n,e)})),n},getBuiltIn$1=getBuiltIn$9,createEmptySetLike=function(){return{size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},setMethodAcceptSetLike$7=function(e){try{return(new(getBuiltIn$1("Set")))[e](createEmptySetLike()),!0}catch(e){return!1}},$$9=_export,difference=setDifference,setMethodAcceptSetLike$6=setMethodAcceptSetLike$7;$$9({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$6("difference")},{difference:difference});var aSet$5=aSet$7,SetHelpers$1=setHelpers,size$3=setSize,getSetRecord$5=getSetRecord$7,iterateSet$1=setIterate,iterateSimple$4=iterateSimple$7,Set$1=SetHelpers$1.Set,add$2=SetHelpers$1.add,has$3=SetHelpers$1.has,setIntersection=function(e){var t=aSet$5(this),r=getSetRecord$5(e),n=new Set$1;return size$3(t)>r.size?iterateSimple$4(r.getIterator(),(function(e){has$3(t,e)&&add$2(n,e)})):iterateSet$1(t,(function(e){r.includes(e)&&add$2(n,e)})),n},$$8=_export,fails$2=fails$s,intersection=setIntersection,setMethodAcceptSetLike$5=setMethodAcceptSetLike$7,INCORRECT=!setMethodAcceptSetLike$5("intersection")||fails$2((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}));$$8({target:"Set",proto:!0,real:!0,forced:INCORRECT},{intersection:intersection});var aSet$4=aSet$7,has$2=setHelpers.has,size$2=setSize,getSetRecord$4=getSetRecord$7,iterateSet=setIterate,iterateSimple$3=iterateSimple$7,iteratorClose$1=iteratorClose$3,setIsDisjointFrom=function(e){var t=aSet$4(this),r=getSetRecord$4(e);if(size$2(t)<=r.size)return!1!==iterateSet(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==iterateSimple$3(n,(function(e){if(has$2(t,e))return iteratorClose$1(n,"normal",!1)}))},$$7=_export,isDisjointFrom=setIsDisjointFrom,setMethodAcceptSetLike$4=setMethodAcceptSetLike$7;$$7({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$4("isDisjointFrom")},{isDisjointFrom:isDisjointFrom});var aSet$3=aSet$7,size$1=setSize,iterate=setIterate,getSetRecord$3=getSetRecord$7,setIsSubsetOf=function(e){var t=aSet$3(this),r=getSetRecord$3(e);return!(size$1(t)>r.size)&&!1!==iterate(t,(function(e){if(!r.includes(e))return!1}),!0)},$$6=_export,isSubsetOf=setIsSubsetOf,setMethodAcceptSetLike$3=setMethodAcceptSetLike$7;$$6({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$3("isSubsetOf")},{isSubsetOf:isSubsetOf});var aSet$2=aSet$7,has$1=setHelpers.has,size=setSize,getSetRecord$2=getSetRecord$7,iterateSimple$2=iterateSimple$7,iteratorClose=iteratorClose$3,setIsSupersetOf=function(e){var t=aSet$2(this),r=getSetRecord$2(e);if(size(t)<r.size)return!1;var n=r.getIterator();return!1!==iterateSimple$2(n,(function(e){if(!has$1(t,e))return iteratorClose(n,"normal",!1)}))},$$5=_export,isSupersetOf=setIsSupersetOf,setMethodAcceptSetLike$2=setMethodAcceptSetLike$7;$$5({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$2("isSupersetOf")},{isSupersetOf:isSupersetOf});var aSet$1=aSet$7,SetHelpers=setHelpers,clone$1=setClone,getSetRecord$1=getSetRecord$7,iterateSimple$1=iterateSimple$7,add$1=SetHelpers.add,has=SetHelpers.has,remove=SetHelpers.remove,setSymmetricDifference=function(e){var t=aSet$1(this),r=getSetRecord$1(e).getIterator(),n=clone$1(t);return iterateSimple$1(r,(function(e){has(t,e)?remove(n,e):add$1(n,e)})),n},$$4=_export,symmetricDifference=setSymmetricDifference,setMethodAcceptSetLike$1=setMethodAcceptSetLike$7;$$4({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$1("symmetricDifference")},{symmetricDifference:symmetricDifference});var aSet=aSet$7,add=setHelpers.add,clone=setClone,getSetRecord=getSetRecord$7,iterateSimple=iterateSimple$7,setUnion=function(e){var t=aSet(this),r=getSetRecord(e).getIterator(),n=clone(t);return iterateSimple(r,(function(e){add(n,e)})),n},$$3=_export,union=setUnion,setMethodAcceptSetLike=setMethodAcceptSetLike$7;$$3({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike("union")},{union:union});class Atom{constructor(){_defineProperty(this,"store",{}),_defineProperty(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{value:r,ok:n}=makePrimitiveValue(e),o=getRandomId();if(n)return{id:o,type:getValueType(e),value:r};if(t)try{return{id:o,type:"json",value:JSON.stringify(e)}}catch(e){return{id:o,type:"json",value:null}}return this.add(e)}get(e){const t=this.store[e],r=this.instanceStore[e];if(!t)return null;const n={},o=Object.getOwnPropertyDescriptors(t);Object.keys(o).forEach((e=>{const t=o[e];hasOwnProperty(t,"value")&&(t.value=this.transformToAtom(t.value)),n[e]=Atom.getAtomOverview({atomId:getRandomId(),instanceId:r,value:t})}));const i=this.addExtraProperty(e);return{...n,...i}}getOrigin(e){const t=this.store[e];return t||null}add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=getRandomId();let n=r;isPrototype(e)&&(n=t),this.store[r]=e,this.instanceStore[r]=n;const o=Atom.getSemanticValue(e);return Atom.getAtomOverview({atomId:r,value:o,instanceId:n})}static getAtomOverview(e){let{instanceId:t="",atomId:r,value:n}=e;return{id:getRandomId(),type:"atom",__atomId:r,instanceId:t,value:n}}static getSemanticValue(e){if(isPlainObject(e))return"Object {...}";if(isArray(e))return"Array (".concat(e.length,")");return e.constructor.name}addExtraProperty(e){const t=this.store[e],r=this.instanceStore[e],n={};if((t instanceof String||t instanceof Number||t instanceof Boolean)&&(n["[[PrimitiveValue]]"]=this.transformToAtom(t.valueOf())),t instanceof Set){const e={};let r=0;for(const n of t)e[r++]=n;e.size=t.size,n["[[Entries]]"]=this.transformToAtom(e)}if(t instanceof Map){const e={};let r=0;for(const[n,o]of t.entries())e[r++]={key:n,value:o};e.size=t.size,n["[[Entries]]"]=this.transformToAtom(e)}return(isArray(t)||isArrayLike(t))&&(n.length=this.transformToAtom(t.length)),null!==Object.getPrototypeOf(t)?n["[[Prototype]]"]=this.add(Object.getPrototypeOf(t),r):n.___proto___=this.transformToAtom(null),n}}const atom=new Atom;class Client{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{osType:"unknown",osVersion:"unknown",browserType:"unknown",browserVersion:"unknown",framework:"unknown",isDevTools:!1,sdk:"unknown",sdkVersion:"0.0.0"},t=arguments.length>1?arguments[1]:void 0;_defineProperty(this,"info",void 0),_defineProperty(this,"rawInfo",void 0),_defineProperty(this,"plugins",[]),_defineProperty(this,"_name",""),this.info=e,this.rawInfo=t}makeClientInfoMsg(){return{sdk:this.info.sdk,isDevTools:this.info.isDevTools,ua:this.getName(),plugins:this.plugins}}getName(){if(!this._name){const{ua:e,osType:t,osVersion:r,browserType:n,browserVersion:o}=this.info;this._name=e||"".concat(t,"/").concat(r," ").concat(n,"/").concat(o)}return this._name}}class ConfigBase{defaultConfig(){return{}}constructor(){_defineProperty(this,"value",void 0),_defineProperty(this,"mergeConfig",(e=>{const t=Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return this.privateKeys.includes(r)||(e[r]=n),e}),{});return this.value={...this.defaultConfig(),...t},this.value})),this.value=this.defaultConfig()}get(){return this.value}set(e,t){this.value[e]=t}}const ROOM_SESSION_KEY="page-spy-room";var SocketState;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(SocketState||(SocketState={}));const HEARTBEAT_INTERVAL=5e3,INIT_RETRY_INTERVAL=2e3,RETRY_TIME_INCR=1.5,MAX_RETRY_INTERVAL=Math.pow(RETRY_TIME_INCR,4)*INIT_RETRY_INTERVAL;class SocketWrapper{constructor(){_defineProperty(this,"events",{open:[],close:[],error:[],message:[]})}emit(e,t){this.events[e].forEach((e=>{e(t)})),"close"!==e&&"error"!==e||this.clearListeners()}onOpen(e){this.events.open.push(e)}onClose(e){this.events.close.push(e)}onError(e){this.events.error.push(e)}onMessage(e){this.events.message.push(e)}clearListeners(){Object.entries(this.events).forEach((e=>{let[,t]=e;t.splice(0)}))}}class SocketStoreBase{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){var e;const{project:t,title:r}=this.getPageSpyConfig(),n=null===(e=this.getClient)||void 0===e?void 0:e.call(this).getName();this.send({type:UPDATE_ROOM_INFO,content:{info:{name:n,group:t,tags:{title:r,name:n,group:t}}}},!0)}}constructor(){_defineProperty(this,"socketUrl",""),_defineProperty(this,"socketConnection",null),_defineProperty(this,"debuggerConnection",null),_defineProperty(this,"pingTimer",null),_defineProperty(this,"pongTimer",null),_defineProperty(this,"retryTimer",null),_defineProperty(this,"isOffline",!1),_defineProperty(this,"messageCapacity",0),_defineProperty(this,"messages",[]),_defineProperty(this,"events",{debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[],"harbor-clear":[]}),_defineProperty(this,"retryInterval",INIT_RETRY_INTERVAL),_defineProperty(this,"connectable",!0),_defineProperty(this,"getPageSpyConfig",null),_defineProperty(this,"getClient",null),this.addListener("atom-detail",SocketStoreBase.handleResolveAtom),this.addListener("atom-getter",SocketStoreBase.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}async init(e){try{var t,r,n,o,i;if(!e)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===SocketState.OPEN&&await new Promise((e=>{this.socketWrapper.onClose((()=>{this.socketWrapper.clearListeners(),e()})),this.socketWrapper.close()})),null===(t=this.socketWrapper)||void 0===t||t.onOpen((()=>{this.connectOnline()})),null===(r=this.socketWrapper)||void 0===r||r.onMessage((e=>{this.handleMessage(e)})),null===(n=this.socketWrapper)||void 0===n||n.onClose((()=>{this.connectOffline()})),null===(o=this.socketWrapper)||void 0===o||o.onError((()=>{this.connectOffline()})),this.socketUrl=e,null===(i=this.socketWrapper)||void 0===i||i.init(e)}catch(e){psLog.error(e.message)}}addListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeListener(e,t){const r=this.events[e]||[],n=r.indexOf(t);n>-1&&r.splice(n,1)}broadcastMessage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=makeBroadcastMessage(e);this.send(r,t)}close(){var e;this.connectable=!1,this.clearPing(),null===(e=this.socketWrapper)||void 0===e||e.close(),this.messages=[],Object.entries(this.events).forEach((e=>{let[t,r]=e;["atom-detail","atom-getter","debugger-online"].includes(t)||r.splice(0)}))}connectOnline(){this.retryInterval=INIT_RETRY_INTERVAL,this.updateRoomInfo(),this.ping()}connectOffline(){this.socketConnection=null,this.debuggerConnection=null,this.clearPing(),this.retryTimer&&clearTimeout(this.retryTimer),this.connectable&&(this.retryTimer=setTimeout((()=>{this.retryInterval<MAX_RETRY_INTERVAL&&(this.retryInterval*=RETRY_TIME_INCR),this.retryTimer=null,this.tryReconnect()}),this.retryInterval))}tryReconnect(){this.init(this.socketUrl)}ping(){this.pingTimer&&clearTimeout(this.pingTimer),this.pongTimer&&clearTimeout(this.pongTimer),this.pingTimer=setTimeout((()=>{this.send({type:"ping",content:null}),this.pingTimer=null,this.pongTimer=setTimeout((()=>{this.connectOffline(),this.pongTimer=null}),HEARTBEAT_INTERVAL)}),HEARTBEAT_INTERVAL)}clearPing(){this.pingTimer&&(clearTimeout(this.pingTimer),this.pingTimer=null),this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}handlePong(){clearTimeout(this.pongTimer),this.pongTimer=null,this.ping()}handleMessage(e){var t;SocketStoreBase.messageFilters.length&&SocketStoreBase.messageFilters.forEach((t=>{e=t(e)}));const{CONNECT:r,MESSAGE:n,ERROR:o,JOIN:i,PING:a,PONG:s,LEAVE:c,CLOSE:l,BROADCAST:u}=SERVER_MESSAGE_TYPE,d=JSON.parse(e.data),{type:p}=d;switch(p){case r:const{selfConnection:e,roomConnections:a}=d.content;this.socketConnection=e,this.debuggerConnection=a.find((e=>"Debugger"===e.userId))||null;break;case i:case c:const{connection:s}=d.content;"Debugger"===s.userId&&(p===i?(this.debuggerConnection=s,this.sendClientInfo()):this.debuggerConnection=null);break;case n:const{data:u,from:f,to:h}=d.content;h.address===(null===(t=this.socketConnection)||void 0===t?void 0:t.address)&&this.dispatchEvent(u.type,{source:u,from:f,to:h});break;case l:case o:this.connectOffline()}this.handlePong()}dispatchEvent(e,t){var r;["public-data"].includes(e)?this.events["public-data"].forEach((e=>{e(t)})):null===(r=this.events[e])||void 0===r||r.forEach((e=>{e.call(this,t,(e=>{this.unicastMessage(e,t.from)}))}))}unicastMessage(e,t){const r=makeUnicastMessage(e,this.socketConnection,t);this.send(r)}handleFlushBuffer(e){const{latestId:t}=e.source.data,r=this.messages.findIndex((e=>e.content.data.data.id===t));this.messages.slice(r+1).forEach((t=>{const r={type:MESSAGE,content:{data:t.content.data,from:this.socketConnection,to:e.from}};this.send(r,!0)}))}static handleResolveAtom(e,t){let{source:r}=e;const{type:n,data:o}=r;if("atom-detail"===n){const e=atom.get(o)||{};t(makeMessage("atom-detail-".concat(o),e,!1))}}static handleAtomPropertyGetter(e,t){let{source:r}=e;const{type:n,data:o}=r;if("atom-getter"===n){const{id:e,parentId:r,key:n,instanceId:a}=o,s=atom.getOrigin(a),c=atom.getOrigin(r);let l={};var i;if(s&&c)l=null===(i=Object.getOwnPropertyDescriptor(c,n))||void 0===i||null===(i=i.get)||void 0===i?void 0:i.call(s);else l=new Error("Getter computed failed");t(makeMessage("atom-getter-".concat(e),atom.transformToAtom(l)))}}send(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.checkIfSend(e))try{var r;const t=e;t.createdAt=Date.now(),t.requestId=getRandomId();const n=stringifyData(t);null===(r=this.socketWrapper)||void 0===r||r.send(n)}catch(e){psLog.error("Incompatible: ".concat(e.message)),this.connectOffline()}this.checkIfCache(e,t)&&(0!==this.messageCapacity&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(e))}checkIfSend(e){return this.socketWrapper.getState()===SocketState.OPEN&&(!![UPDATE_ROOM_INFO,PING].includes(e.type)||!!this.debuggerConnection)}checkIfCache(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.isOffline&&!t&&![MESSAGE,PING].includes(e.type)}sendClientInfo(){var e;const t=null===(e=this.getClient)||void 0===e?void 0:e.call(this).makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:t},!0)}}_defineProperty(SocketStoreBase,"messageFilters",[]);var n=["U","R","D","L"],t={capture:!0,passive:!0};function r(e,r){window.addEventListener(e,r,t)}function e(e,r){window.removeEventListener(e,r,t)}var o=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},u=function(e,t){return[e[0]-t[0],e[1]-t[1]]},i=function(e){var t=Math.atan2(e[0],-e[1]);return t=t/Math.PI*2,t=(Math.round(t)+4)%4,n[t]};function a(t,a){var s=t.length;if(0===s)throw new TypeError("The `command` must not be an empty array");var c=[],l=0,d=function(e){if(null===e)return l=0,void(c.length=0);if(c[l]=e,l=(l+1)%s,c.length==s){for(var r=0;r<s;r++)if(t[r]!==c[(l+r)%s])return;a()}};!function(t){r("touchstart",(function(n){var a=[],s=function(e){var t=e.targetTouches;if(1===t.length){var r=t[0],n=r.clientX,o=r.clientY;a.push([n,o])}};s(n),r("touchmove",s);var c=function(){if(e("touchmove",s),e("touchend",c),a.length<2)return t(null);var r=u(a[a.length-1],a[0]);if(o(r)<10)return t(null);for(var n=i(r),l=1;l<a.length;l++){var d=u(a[l],a[l-1]);if(!(o(d)<10)&&i(d)!=n)return t(null)}t(n)};r("touchend",c)}))}(d),function(e){r("keydown",(function(t){var r=["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].indexOf(t.key);e(r>=0?n[r]:null)}))}(d)}class WebSocketWrapper extends SocketWrapper{constructor(){super(...arguments),_defineProperty(this,"socketInstance",null)}init(e){this.socketInstance=new WebSocket(e);["open","close","error","message"].forEach((e=>{this.socketInstance.addEventListener(e,(t=>{this.events[e].forEach((e=>{e(t)}))}))}))}send(e){var t;null===(t=this.socketInstance)||void 0===t||t.send(stringifyData(e))}close(){var e;null===(e=this.socketInstance)||void 0===e||e.close()}getState(){var e;return null===(e=this.socketInstance)||void 0===e?void 0:e.readyState}}class WebSocketStore extends SocketStoreBase{constructor(){super(...arguments),_defineProperty(this,"socketWrapper",new WebSocketWrapper)}onOffline(){window.dispatchEvent(new CustomEvent("sdk-inactive")),sessionStorage.removeItem(ROOM_SESSION_KEY)}}var socketStore=new WebSocketStore;class ConsolePlugin{constructor(){_defineProperty(this,"name","ConsolePlugin"),_defineProperty(this,"proxyTypes",["log","info","error","warn","debug"]),_defineProperty(this,"console",{}),_defineProperty(this,"$pageSpyConfig",null)}async onInit(e){let{config:t}=e;ConsolePlugin.hasInitd||(ConsolePlugin.hasInitd=!0,socketStore.addListener("debug",ConsolePlugin.handleDebugger),this.$pageSpyConfig=t,this.init())}init(){var e=this;this.proxyTypes.forEach((t=>{this.console[t]=window.console[t]||window.console.log||(()=>{}),window.console[t]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.printLog({logType:t,logs:n,url:window.location.href})}}))}reset(){this.proxyTypes.forEach((e=>{window.console[e]=this.console[e]}))}onReset(){this.reset(),ConsolePlugin.hasInitd=!1}static handleDebugger(e,t){let{source:r}=e;const{type:n,data:o}=r;if("debug"===n){t(makeMessage("console",{logType:"debug-origin",logs:[{id:getRandomId(),type:"debug-origin",value:o}]}));try{const e=new Function("return ".concat(o))();t(makeMessage("console",{logType:"debug-eval",logs:[atom.transformToAtom(e)]}))}catch(e){t(makeMessage("console",{logType:"error",logs:[{type:"error",value:e.stack}]}))}}}printLog(e){if(e.logs&&e.logs.length){var t,r;const n=null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t?void 0:t.console;if(n){this.reset();const t=n(e);if(this.init(),!1===t)return}this.console[e.logType](...e.logs);const o=makeMessage("console",{...e,time:Date.now(),logs:e.logs.map((e=>atom.transformToAtom(e,!1)))});if(socketStore.broadcastMessage(o),null!==(r=this.$pageSpyConfig)&&void 0!==r&&r.serializeData){const t={...o,data:{...o.data,logs:e.logs.map((e=>atom.transformToAtom(e,!0)))}};socketStore.dispatchEvent("public-data",t)}else socketStore.dispatchEvent("public-data",o)}}}_defineProperty(ConsolePlugin,"hasInitd",!1);class ErrorPlugin{constructor(){_defineProperty(this,"name","ErrorPlugin"),_defineProperty(this,"$pageSpyConfig",null),_defineProperty(this,"uncaughtErrorListener",(e=>{if(e.error){const{message:t,stack:r}=e.error,n=formatErrorObj(e.error);this.sendMessage(r||t,n)}else{const t=e.message||"[PageSpy] An unknown error occurred and no stack trace available";this.sendMessage(t,null)}})),_defineProperty(this,"resourceLoadErrorListener",(e=>{if(!(e instanceof ErrorEvent)){const{target:t}=e;this.sendMessage("[PageSpy] Resource Load Error: Cannot load resource of (".concat(t.src||t.href,")"),null)}})),_defineProperty(this,"rejectionListener",(e=>{const t=formatErrorObj(e.reason);this.sendMessage(e.reason,t)}))}onInit(e){let{config:t}=e;ErrorPlugin.hasInitd||(ErrorPlugin.hasInitd=!0,this.$pageSpyConfig=t,this.onUncaughtError(),this.onResourceLoadError(),this.onUnhandledRejectionError())}onReset(){window.removeEventListener("error",this.uncaughtErrorListener),window.removeEventListener("error",this.resourceLoadErrorListener),window.removeEventListener("unhandledrejection",this.rejectionListener),ErrorPlugin.hasInitd=!1}onUncaughtError(){window.addEventListener("error",this.uncaughtErrorListener)}onResourceLoadError(){window.addEventListener("error",this.resourceLoadErrorListener,!0)}onUnhandledRejectionError(){window.addEventListener("unhandledrejection",this.rejectionListener)}sendMessage(e,t){var r,n;const o={logType:"error",logs:[e],time:Date.now(),url:window.location.href,errorDetail:t};if(!1===(null===(r=this.$pageSpyConfig)||void 0===r||null===(r=r.dataProcessor)||void 0===r||null===(n=r.console)||void 0===n?void 0:n.call(r,o)))return;o.logs=o.logs.map((e=>atom.transformToAtom(e)));const i=makeMessage("console",o);socketStore.dispatchEvent("public-data",i),socketStore.broadcastMessage(i)}}_defineProperty(ErrorPlugin,"hasInitd",!1);var whitespaces$2="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis=functionUncurryThis,requireObjectCoercible=requireObjectCoercible$5,toString=toString$7,whitespaces$1=whitespaces$2,replace=uncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod=function(e){return function(t){var r=toString(requireObjectCoercible(t));return 1&e&&(r=replace(r,ltrim,"")),2&e&&(r=replace(r,rtrim,"$1")),r}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails$1=fails$s,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(e){return fails$1((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e}))},$$2=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$2({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});class WebNetworkProxyBase extends NetworkProxyBase{constructor(){super(socketStore)}}class XhrProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"xhrOpen",null),_defineProperty(this,"xhrSend",null),_defineProperty(this,"xhrSetRequestHeader",null),this.initProxyHandler()}initProxyHandler(){const e=this;if(!window.XMLHttpRequest)return;const{open:t,send:r,setRequestHeader:n}=window.XMLHttpRequest.prototype;this.xhrOpen=t,this.xhrSend=r,this.xhrSetRequestHeader=n,window.XMLHttpRequest.prototype.open=function(){const r=this;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];const a=o[0],s=o[1],c=getRandomId();e.createRequest(c);const l=e.getRequest(c);return l&&(l.url=new URL(s,window.location.href).toString(),l.method=a.toUpperCase(),l.requestType="xhr"),this.pageSpyRequestId=c,this.pageSpyRequestMethod=a,this.pageSpyRequestUrl=s,r.addEventListener("readystatechange",(async()=>{if(l){switch(l.readyState=r.readyState,r.readyState){case r.UNSENT:case r.OPENED:l.status=r.status,l.statusText="Pending",l.startTime||(l.startTime=Date.now());break;case r.HEADERS_RECEIVED:l.status=r.status,l.statusText="Loading";const t=(r.getAllResponseHeaders()||"").trim().split(/[\r\n]+/);l.responseHeader=t.reduce(((e,t)=>{const[r,...n]=t.split(": ");return e.push([r,n.join(": ")]),e}),[]);break;case r.LOADING:l.status=r.status,l.statusText="Loading";break;case r.DONE:l.status=r.status,l.statusText="Done",l.endTime=Date.now(),l.costTime=l.endTime-(l.startTime||l.endTime);const n=await e.formatResponse(r);getObjectKeys(n).forEach((e=>{l[e]=n[e]}));break;default:l.status=r.status,l.statusText="Unknown"}e.sendRequestItem(r.pageSpyRequestId,l)}else psLog.warn("The request object is not found on XMLHttpRequest's readystatechange event")})),t.apply(r,o)},window.XMLHttpRequest.prototype.setRequestHeader=function(t,r){const o=e.getRequest(this.pageSpyRequestId);return o?(o.requestHeader||(o.requestHeader=[]),o.requestHeader.push([String(t),String(r)])):psLog.warn("The request object is not found on XMLHttpRequest's setRequestHeader event"),n.apply(this,[t,r])},window.XMLHttpRequest.prototype.send=function(t){const n=this,{pageSpyRequestId:o}=n,i=e.getRequest(o);return i?(i.responseType=n.responseType,i.withCredentials=n.withCredentials,"GET"!==i.method&&(i.requestHeader=addContentTypeHeader(i.requestHeader,t),getFormattedBody(t).then((t=>{i.requestPayload=t,e.sendRequestItem(n.pageSpyRequestId,i)})))):psLog.warn("The request object is not found on XMLHttpRequest's send event"),r.apply(n,[t])}}reset(){this.xhrOpen&&(window.XMLHttpRequest.prototype.open=this.xhrOpen),this.xhrSend&&(window.XMLHttpRequest.prototype.send=this.xhrSend),this.xhrSetRequestHeader&&(window.XMLHttpRequest.prototype.setRequestHeader=this.xhrSetRequestHeader)}async formatResponse(e){const t={response:"",responseReason:null};switch(e.responseType){case"":case"text":if(isString(e.response))try{t.response=JSON.parse(e.response)}catch(r){t.response=e.response}else void 0!==e.response&&(t.response=toStringTag(e.response));break;case"json":void 0!==e.response&&(t.response=e.response);break;case"blob":case"arraybuffer":if(e.response){let r=e.response;if(isArrayBuffer(r)){const t=e.getResponseHeader("content-type");t&&(r=new Blob([r],{type:t}))}if(isBlob(r))if(r.size<=MAX_SIZE)try{t.response=await blob2base64Async(r)}catch(e){t.response=await r.text(),psLog.error(e.message)}else t.response="[object Blob]",t.responseReason=Reason.EXCEED_SIZE}break;default:void 0!==e.response&&(t.response=Object.prototype.toString.call(e.response))}return t}}var global$2=global$o,promiseNativeConstructor=global$2.Promise,newPromiseCapability$1={},aCallable=aCallable$7,$TypeError=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable(t),this.reject=aCallable(r)};newPromiseCapability$1.f=function(e){return new PromiseCapability(e)};var anObject=anObject$g,isObject=isObject$a,newPromiseCapability=newPromiseCapability$1,promiseResolve$1=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$1=_export,NativePromiseConstructor=promiseNativeConstructor,fails=fails$s,getBuiltIn=getBuiltIn$9,isCallable=isCallable$n,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$1,defineBuiltIn=defineBuiltIn$8,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));if($$1({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn("Promise")),r=isCallable(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}}),isCallable(NativePromiseConstructor)){var method=getBuiltIn("Promise").prototype.finally;NativePromisePrototype.finally!==method&&defineBuiltIn(NativePromisePrototype,"finally",method,{unsafe:!0})}class FetchProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"fetch",null),this.initProxyHandler()}reset(){this.fetch&&(window.fetch=this.fetch)}initProxyHandler(){const e=this,t=window.fetch;t&&(this.fetch=t,window.fetch=function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=t(r,n),i=getRandomId();e.createRequest(i);const a=e.getRequest(i);if(a){let t,s="GET",c=null;isString(r)||isURL(r)?(s=n.method||"GET",t=r,c=n.headers||null):(s=r.method,t=r.url,c=r.headers),a.url=new URL(t,window.location.href).toString(),a.method=s.toUpperCase(),a.requestType="fetch",a.status=0,a.statusText="Pending",a.startTime=Date.now(),a.readyState=XMLHttpRequest.UNSENT,n.credentials&&"omit"!==n.credentials&&(a.withCredentials=!0),c&&(isHeaders(c)?a.requestHeader=[...c.entries()]:isObjectLike(c)?a.requestHeader=Object.entries(c).map((e=>{let[t,r]=e;return[String(t),String(r)]})):a.requestHeader=c.map((e=>{let[t,r]=e;return[String(t),String(r)]}))),"GET"!==a.method&&(a.requestHeader=addContentTypeHeader(a.requestHeader,n.body),getFormattedBody(n.body).then((t=>{a.requestPayload=t,e.sendRequestItem(i,a)}))),e.sendRequestItem(i,a),o.then((t=>{a.endTime=Date.now(),a.costTime=a.endTime-(a.startTime||a.endTime),a.status=t.status||200,a.statusText=t.statusText||"Done",a.responseHeader=[...t.headers.entries()],a.readyState=XMLHttpRequest.HEADERS_RECEIVED,e.sendRequestItem(i,a);const r=t.headers.get("content-type");if(r){if(r.includes("application/json"))return a.responseType="json",t.clone().text();if(r.includes("text/html")||r.includes("text/plain"))return a.responseType="text",t.clone().text()}return a.responseType="blob",t.clone().blob()})).then((async e=>{switch(a.responseType){case"text":case"json":try{a.response=JSON.parse(e)}catch(t){a.response=e,a.responseType="text"}break;case"blob":const t=e;if(t.size<=MAX_SIZE)try{a.response=await blob2base64Async(t)}catch(e){a.response=await t.text(),psLog.error(e.message)}else a.response="[object Blob]",a.responseReason=Reason.EXCEED_SIZE}})).finally((()=>{a.readyState=XMLHttpRequest.DONE,e.sendRequestItem(i,a)}))}else psLog.warn("The request object is not found on window.fetch event");return o})}}class BeaconProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"sendBeacon",null),this.initProxyHandler()}reset(){this.sendBeacon&&(window.navigator.sendBeacon=this.sendBeacon)}initProxyHandler(){const e=window.navigator.sendBeacon;if(!e)return;const t=this;this.sendBeacon=e,window.navigator.sendBeacon=function(r,n){const o=e.call(window.navigator,r,n),i=getRandomId();t.createRequest(i);const a=t.getRequest(i);return a?(a.url=new URL(r,window.location.href).toString(),a.method="POST",a.status=0,a.statusText="Pending",a.requestType="ping",a.requestHeader=addContentTypeHeader(a.requestHeader,n),a.startTime=Date.now(),getFormattedBody(n).then((e=>{a.requestPayload=e,t.sendRequestItem(i,a)})),a.response="",o?(a.status=200,a.statusText="Sent",a.endTime=Date.now(),a.costTime=a.endTime-(a.startTime||a.endTime)):(a.status=500,a.statusText="Unknown"),a.readyState=XMLHttpRequest.DONE,t.sendRequestItem(i,a)):psLog.warn("The request object is not on navigator.sendBeacon event"),o}}}const OriginEventSource=window.EventSource;class SSEProxy extends WebNetworkProxyBase{constructor(){super(),this.initProxyHandler()}initProxyHandler(){if(!window.EventSource)return;const e=this;window.EventSource=class{constructor(t,r){const n=getRandomId(),o=new RequestItem(n);o.url=new URL(t,window.location.href).toString(),o.method="GET",o.requestType="eventsource",o.requestHeader=[["Accept","text/event-stream"],["Cache-Control","no-cache"]],o.readyState=ReqReadyState.UNSENT,o.withCredentials=Boolean(null==r?void 0:r.withCredentials),o.responseHeader=[["Content-Type","text/event-stream"]],o.responseType="text",o.startTime=Date.now();const i=new OriginEventSource(t,r);return i.addEventListener("open",(()=>{o.readyState=ReqReadyState.OPENED,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(n,o)})),i.addEventListener("message",(t=>{let{data:r,lastEventId:i}=t;o.status=200,o.statusText="Done",o.readyState=ReqReadyState.DONE,o.response=r,o.lastEventId=i,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(n,o)})),i.addEventListener("error",(()=>{o.status=400,o.readyState=ReqReadyState.DONE,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(n,o)})),i}}}reset(){window.EventSource=OriginEventSource}}class ResourceCollector extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"observer",null),_defineProperty(this,"excluded",/(beacon|fetch|xmlhttprequest)/i),this.initResourceHandler()}initResourceHandler(){const e=performance.timeOrigin||Date.now()-performance.now();this.observer=new PerformanceObserver((t=>{t.getEntries().forEach((t=>{const{name:r,initiatorType:n,fetchStart:o,responseEnd:i,duration:a,responseStatus:s=0}=t;if(this.excluded.test(n))return;const c=getRandomId();this.createRequest(c);const l=this.getRequest(c);l.method="GET",l.url=r,l.requestType=n,l.readyState=XMLHttpRequest.DONE,l.startTime=e+o,l.endTime=e+i,l.costTime=a,l.response="",l.responseType="resource",l.status=s,this.sendRequestItem(c,l)}))})),this.observer.observe({type:"resource",buffered:!0})}reset(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null}}class NetworkPlugin{constructor(){_defineProperty(this,"name","NetworkPlugin"),_defineProperty(this,"xhrProxy",null),_defineProperty(this,"fetchProxy",null),_defineProperty(this,"beaconProxy",null),_defineProperty(this,"sseProxy",null),_defineProperty(this,"resourceCollector",null)}onInit(e){let{config:t}=e;NetworkPlugin.hasInitd||(NetworkPlugin.hasInitd=!0,NetworkProxyBase.dataProcessor=t.dataProcessor.network,this.xhrProxy=new XhrProxy,this.fetchProxy=new FetchProxy,this.beaconProxy=new BeaconProxy,this.sseProxy=new SSEProxy,this.resourceCollector=new ResourceCollector)}onReset(){var e,t,r,n,o;null===(e=this.xhrProxy)||void 0===e||e.reset(),null===(t=this.fetchProxy)||void 0===t||t.reset(),null===(r=this.beaconProxy)||void 0===r||r.reset(),null===(n=this.sseProxy)||void 0===n||n.reset(),null===(o=this.resourceCollector)||void 0===o||o.reset(),NetworkPlugin.hasInitd=!1}}_defineProperty(NetworkPlugin,"hasInitd",!1);var $=_export,global$1=global$o,setToStringTag=setToStringTag$6;$({global:!0},{Reflect:{}}),setToStringTag(global$1.Reflect,"Reflect",!0),function(scriptGlobalObject,window,document,undefined$1){function is(e,t){return typeof e===t}function testRunner(){var e,t,r,n,o,i;for(var a in tests)if(tests.hasOwnProperty(a)){if(e=[],(t=tests[a]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(r=0;r<t.options.aliases.length;r++)e.push(t.options.aliases[r].toLowerCase());for(n=is(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)1===(i=e[o].split(".")).length?Modernizr[i[0]]=n:(Modernizr[i[0]]&&(!Modernizr[i[0]]||Modernizr[i[0]]instanceof Boolean)||(Modernizr[i[0]]=new Boolean(Modernizr[i[0]])),Modernizr[i[0]][i[1]]=n),classes.push((n?"":"no-")+i.join("-"))}}function setClasses(e){var t=docElement.className,r=Modernizr._config.classPrefix||"";if(isSVG&&(t=t.baseVal),Modernizr._config.enableJSClass){var n=new RegExp("(^|\\s)"+r+"no-js(\\s|$)");t=t.replace(n,"$1"+r+"js$2")}Modernizr._config.enableClasses&&(e.length>0&&(t+=" "+r+e.join(" "+r)),isSVG?docElement.className.baseVal=t:docElement.className=t)}function addTest(e,t){if("object"==typeof e)for(var r in e)hasOwnProp(e,r)&&addTest(r,e[r]);else{var n=(e=e.toLowerCase()).split("."),o=Modernizr[n[0]];if(2===n.length&&(o=o[n[1]]),void 0!==o)return Modernizr;t="function"==typeof t?t():t,1===n.length?Modernizr[n[0]]=t:(!Modernizr[n[0]]||Modernizr[n[0]]instanceof Boolean||(Modernizr[n[0]]=new Boolean(Modernizr[n[0]])),Modernizr[n[0]][n[1]]=t),setClasses([(t&&!1!==t?"":"no-")+n.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function contains(e,t){return!!~(""+e).indexOf(t)}function createElement(){return"function"!=typeof document.createElement?document.createElement(arguments[0]):isSVG?document.createElementNS.call(document,"http://www.w3.org/2000/svg",arguments[0]):document.createElement.apply(document,arguments)}function getBody(){var e=document.body;return e||((e=createElement(isSVG?"svg":"body")).fake=!0),e}function injectElementWithStyles(e,t,r,n){var o,i,a,s,c="modernizr",l=createElement("div"),u=getBody();if(parseInt(r,10))for(;r--;)(a=createElement("div")).id=n?n[r]:c+(r+1),l.appendChild(a);return(o=createElement("style")).type="text/css",o.id="s"+c,(u.fake?u:l).appendChild(o),u.appendChild(l),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),l.id=c,u.fake&&(u.style.background="",u.style.overflow="hidden",s=docElement.style.overflow,docElement.style.overflow="hidden",docElement.appendChild(u)),i=t(l,e),u.fake&&u.parentNode?(u.parentNode.removeChild(u),docElement.style.overflow=s,docElement.offsetHeight):l.parentNode.removeChild(l),!!i}function domToCSS(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function computedStyle(e,t,r){var n;if("getComputedStyle"in window){n=getComputedStyle.call(window,e,t);var o=window.console;if(null!==n)r&&(n=n.getPropertyValue(r));else if(o){o[o.error?"error":"log"].call(o,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else n=!t&&e.currentStyle&&e.currentStyle[r];return n}function nativeTestProps(e,t){var r=e.length;if("CSS"in window&&"supports"in window.CSS){for(;r--;)if(window.CSS.supports(domToCSS(e[r]),t))return!0;return!1}if("CSSSupportsRule"in window){for(var n=[];r--;)n.push("("+domToCSS(e[r])+":"+t+")");return injectElementWithStyles("@supports ("+(n=n.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"===computedStyle(e,null,"position")}))}return undefined$1}function cssToDOM(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,r){return t+r.toUpperCase()})).replace(/^-/,"")}function testProps(e,t,r,n){function o(){a&&(delete mStyle.style,delete mStyle.modElem)}if(n=!is(n,"undefined")&&n,!is(r,"undefined")){var i=nativeTestProps(e,r);if(!is(i,"undefined"))return i}for(var a,s,c,l,u,d=["modernizr","tspan","samp"];!mStyle.style&&d.length;)a=!0,mStyle.modElem=createElement(d.shift()),mStyle.style=mStyle.modElem.style;for(c=e.length,s=0;s<c;s++)if(l=e[s],u=mStyle.style[l],contains(l,"-")&&(l=cssToDOM(l)),mStyle.style[l]!==undefined$1){if(n||is(r,"undefined"))return o(),"pfx"!==t||l;try{mStyle.style[l]=r}catch(e){}if(mStyle.style[l]!==u)return o(),"pfx"!==t||l}return o(),!1}function fnBind(e,t){return function(){return e.apply(t,arguments)}}function testDOMProps(e,t,r){var n;for(var o in e)if(e[o]in t)return!1===r?e[o]:is(n=t[e[o]],"function")?fnBind(n,r||t):n;return!1}function testPropsAll(e,t,r,n,o){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+cssomPrefixes.join(i+" ")+i).split(" ");return is(t,"string")||is(t,"undefined")?testProps(a,t,n,o):testDOMProps(a=(e+" "+domPrefixes.join(i+" ")+i).split(" "),t,r)}function detectDeleteDatabase(e,t){var r=e.deleteDatabase(t);r.onsuccess=function(){addTest("indexeddb.deletedatabase",!0)},r.onerror=function(){addTest("indexeddb.deletedatabase",!1)}}function testAllProps(e,t,r){return testPropsAll(e,undefined$1,undefined$1,t,r)}var tests=[],ModernizrProto={_version:"3.13.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var r=this;setTimeout((function(){t(r[e])}),0)},addTest:function(e,t,r){tests.push({name:e,fn:t,options:r})},addAsyncTest:function(e){tests.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=ModernizrProto,Modernizr=new Modernizr;var classes=[],hasOwnProp;!function(){var e={}.hasOwnProperty;hasOwnProp=is(e,"undefined")||is(e.call,"undefined")?function(e,t){return t in e&&is(e.constructor.prototype[t],"undefined")}:function(t,r){return e.call(t,r)}}();var docElement=document.documentElement,isSVG="svg"===docElement.nodeName.toLowerCase();ModernizrProto._l={},ModernizrProto.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout((function(){Modernizr._trigger(e,Modernizr[e])}),0)},ModernizrProto._trigger=function(e,t){if(this._l[e]){var r=this._l[e];setTimeout((function(){var e;for(e=0;e<r.length;e++)(0,r[e])(t)}),0),delete this._l[e]}},Modernizr._q.push((function(){ModernizrProto.addTest=addTest})),Modernizr.addTest("blobconstructor",(function(){try{return!!new Blob}catch(e){return!1}}),{aliases:["blob-constructor"]}),Modernizr.addAsyncTest((function(){var e,t=["read","readText","write","writeText"];if(navigator.clipboard){addTest("clipboard",!0);for(var r=0;r<t.length;r++)e=!!navigator.clipboard[t[r]],addTest("clipboard."+t[r].toLowerCase(),e)}else addTest("clipboard",!1)})),Modernizr.addTest("cookies",(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),Modernizr.addTest("cors","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest);var omPrefixes="Moz O ms Webkit",cssomPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.split(" "):[];ModernizrProto._cssomPrefixes=cssomPrefixes;var modElem={elem:createElement("modernizr")};Modernizr._q.push((function(){delete modElem.elem}));var mStyle={style:modElem.elem.style};Modernizr._q.unshift((function(){delete mStyle.style}));var domPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.toLowerCase().split(" "):[];ModernizrProto._domPrefixes=domPrefixes,ModernizrProto.testAllProps=testPropsAll;var atRule=function(e){var t,r=prefixes.length,n=window.CSSRule;if(void 0===n)return undefined$1;if(!e)return!1;if((t=(e=e.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in n)return"@"+e;for(var o=0;o<r;o++){var i=prefixes[o];if(i.toUpperCase()+"_"+t in n)return"@-"+i.toLowerCase()+"-"+e}return!1};ModernizrProto.atRule=atRule;var prefixed=ModernizrProto.prefixed=function(e,t,r){return 0===e.indexOf("@")?atRule(e):(-1!==e.indexOf("-")&&(e=cssToDOM(e)),t?testPropsAll(e,t,r):testPropsAll(e,"pfx"))},crypto=prefixed("crypto",window);Modernizr.addTest("crypto",!!prefixed("subtle",crypto)),Modernizr.addTest("customelements","customElements"in window),Modernizr.addTest("customevent","CustomEvent"in window&&"function"==typeof window.CustomEvent),Modernizr.addTest("dataview","undefined"!=typeof DataView&&"getFloat64"in DataView.prototype),Modernizr.addAsyncTest((function(){var e=new Image;e.onerror=function(){addTest("exiforientation",!1)},e.onload=function(){addTest("exiforientation",2!==e.width)},e.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="})),Modernizr.addAsyncTest((function(){var e;try{e=prefixed("indexedDB",window)}catch(e){}if(e){var t,r="modernizr-"+Math.random();try{t=e.open(r)}catch(e){return void addTest("indexeddb",!1)}t.onerror=function(n){!t.error||"InvalidStateError"!==t.error.name&&"UnknownError"!==t.error.name?(addTest("indexeddb",!0),detectDeleteDatabase(e,r)):(addTest("indexeddb",!1),n.preventDefault())},t.onsuccess=function(){addTest("indexeddb",!0),detectDeleteDatabase(e,r)}}else addTest("indexeddb",!1)})),Modernizr.addTest("proxy","Proxy"in window),Modernizr.addTest("serviceworker","serviceWorker"in navigator),Modernizr.addTest("textencoder",!(!window.TextEncoder||!window.TextEncoder.prototype.encode)),Modernizr.addTest("textdecoder",!(!window.TextDecoder||!window.TextDecoder.prototype.decode)),Modernizr.addTest("typedarrays","ArrayBuffer"in window),Modernizr.addTest("webanimations","animate"in createElement("div")),Modernizr.addTest("webgl",(function(){return"WebGLRenderingContext"in window})),ModernizrProto.testAllProps=testAllProps,Modernizr.addTest("backgroundcliptext",(function(){return testAllProps("backgroundClip","text")})),Modernizr.addTest("borderimage",testAllProps("borderImage","url() 1",!0)),Modernizr.addTest("cssgridlegacy",testAllProps("grid-columns","10px",!0)),Modernizr.addTest("cssgrid",testAllProps("grid-template-rows","none",!0));var supportsFn=window.CSS&&window.CSS.supports.bind(window.CSS)||window.supportsCSS;Modernizr.addTest("customproperties",!!supportsFn&&(supportsFn("--f:0")||supportsFn("--f",0))),Modernizr.addTest("flexgap",(function(){var e=createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(createElement("div")),e.appendChild(createElement("div")),docElement.appendChild(e);var t=1===e.scrollHeight;return e.parentNode.removeChild(e),t})),Modernizr.addTest("focuswithin",(function(){try{document.querySelector(":focus-within")}catch(e){return!1}return!0})),Modernizr.addTest("hsla",(function(){var e=createElement("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",contains(e.backgroundColor,"rgba")||contains(e.backgroundColor,"hsla")})),Modernizr.addTest("cssmask",testAllProps("maskRepeat","repeat-x",!0));var prefixes=ModernizrProto._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];ModernizrProto._prefixes=prefixes,Modernizr.addTest("csspositionsticky",(function(){var e="position:",t=createElement("a").style;return t.cssText=e+prefixes.join("sticky;"+e).slice(0,-9),-1!==t.position.indexOf("sticky")})),Modernizr.addTest("rgba",(function(){var e=createElement("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1})),Modernizr.addTest("intersectionobserver","IntersectionObserver"in window),Modernizr.addTest("mutationobserver",!!window.MutationObserver||!!window.WebKitMutationObserver),Modernizr.addTest("passiveeventlisteners",(function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),r=function(){};window.addEventListener("testPassiveEventSupport",r,t),window.removeEventListener("testPassiveEventSupport",r,t)}catch(e){}return e})),Modernizr.addTest("shadowroot","attachShadow"in createElement("div")),Modernizr.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),Modernizr.addTest("arrow",(function(){try{eval("()=>{}")}catch(e){return!1}return!0})),Modernizr.addTest("class",(function(){try{eval("class A{}")}catch(e){return!1}return!0})),Modernizr.addTest("es6collections",!!(window.Map&&window.Set&&window.WeakMap&&window.WeakSet)),Modernizr.addTest("generators",(function(){try{new Function("function* test() {}")()}catch(e){return!1}return!0})),Modernizr.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),Modernizr.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),Modernizr.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),Modernizr.addTest("promises",(function(){return"Promise"in window&&"resolve"in window.Promise&&"reject"in window.Promise&&"all"in window.Promise&&"race"in window.Promise&&function(){var e;return new window.Promise((function(t){e=t})),"function"==typeof e}()})),Modernizr.addTest("restparameters",(function(){try{eval("function f(...rest) {}")}catch(e){return!1}return!0})),Modernizr.addTest("spreadarray",(function(){try{eval("(function f(){})(...[1])")}catch(e){return!1}return!0})),Modernizr.addTest("stringtemplate",(function(){try{return"-1-"===eval("(function(){var a=1; return `-${a}-`;})()")}catch(e){return!1}})),Modernizr.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.includes)),Modernizr.addTest("es6symbol",!!("function"==typeof Symbol&&Symbol.for&&Symbol.hasInstance&&Symbol.isConcatSpreadable&&Symbol.iterator&&Symbol.keyFor&&Symbol.match&&Symbol.prototype&&Symbol.replace&&Symbol.search&&Symbol.species&&Symbol.split&&Symbol.toPrimitive&&Symbol.toStringTag&&Symbol.unscopables)),Modernizr.addTest("es7array",!(!Array.prototype||!Array.prototype.includes)),Modernizr.addTest("restdestructuringarray",(function(){try{eval("var [...rest]=[1]")}catch(e){return!1}return!0})),Modernizr.addTest("restdestructuringobject",(function(){try{eval("var {...rest}={a:1}")}catch(e){return!1}return!0})),Modernizr.addTest("spreadobject",(function(){try{eval("var a={...{b:1}}")}catch(e){return!1}return!0})),Modernizr.addTest("es8object",!(!Object.entries||!Object.values)),Modernizr.addTest("sandbox","sandbox"in createElement("iframe")),Modernizr.addTest("srcdoc","srcdoc"in createElement("iframe")),Modernizr.addTest("canvas",(function(){var e=createElement("canvas");return!(!e.getContext||!e.getContext("2d"))})),Modernizr.addAsyncTest((function(){if(!Modernizr.canvas)return!1;var e=new Image,t=createElement("canvas"),r=t.getContext("2d");e.onload=function(){addTest("apng",(function(){return void 0!==t.getContext&&(r.drawImage(e,0,0),0===r.getImageData(0,0,1,1).data[3])}))},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="})),Modernizr.addTest("imgcrossorigin","crossOrigin"in createElement("img")),Modernizr.addTest("lazyloading","loading"in HTMLImageElement.prototype),Modernizr.addAsyncTest((function(){var e,t,r=createElement("img"),n="sizes"in r;!n&&"srcset"in r?("data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",e="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",t=function(){addTest("sizes",2===r.width)},r.onload=t,r.onerror=t,r.setAttribute("sizes","9px"),r.srcset=e+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 8w",r.src=e):addTest("sizes",n)})),Modernizr.addTest("srcset","srcset"in createElement("img")),Modernizr.addAsyncTest((function(){function e(e,t,r){function n(t){var n=!(!t||"load"!==t.type)&&1===o.width;addTest(e,"webp"===e&&n?new Boolean(n):n),r&&r(t)}var o=new Image;o.onerror=n,o.onload=n,o.src=t}var t=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],r=t.shift();e(r.name,r.uri,(function(r){if(r&&"load"===r.type)for(var n=0;n<t.length;n++)e(t[n].name,t[n].uri)}))})),Modernizr.addTest("beacon","sendBeacon"in navigator),Modernizr.addTest("eventsource","EventSource"in window),Modernizr.addTest("fetch","fetch"in window),Modernizr.addTest("xhr2","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest),Modernizr.addTest("scriptasync","async"in createElement("script")),Modernizr.addTest("scriptdefer","defer"in createElement("script")),Modernizr.addTest("localstorage",(function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}})),Modernizr.addTest("sessionstorage",(function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}})),Modernizr.addTest("urlsearchparams","URLSearchParams"in window);var domPrefixesAll=[""].concat(domPrefixes);ModernizrProto._domPrefixesAll=domPrefixesAll,Modernizr.addTest("peerconnection",!!prefixed("RTCPeerConnection",window)),Modernizr.addTest("datachannel",(function(){if(!Modernizr.peerconnection)return!1;for(var e=0,t=domPrefixesAll.length;e<t;e++){var r=window[domPrefixesAll[e]+"RTCPeerConnection"];if(r){var n=new r(null);return n.close(),"createDataChannel"in n}}return!1})),Modernizr.addTest("getUserMedia","mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices),Modernizr.addTest("resizeobserver","ResizeObserver"in window),Modernizr.addTest("sharedworkers","SharedWorker"in window),Modernizr.addTest("webworkers","Worker"in window),testRunner(),delete ModernizrProto.addTest,delete ModernizrProto.addAsyncTest;for(var i=0;i<Modernizr._q.length;i++)Modernizr._q[i]();scriptGlobalObject.Modernizr=Modernizr}(window,window,document);const FEATURE_MAP={Feature:{blob:{title:"Blob",keyPath:"blob"},clipboard:{title:"Clipboard",keyPath:"clipboard"},crypto:{title:"Crypto",keyPath:"crypto"},customelements:{title:"Custom Elements",keyPath:"custom-elements"},customevent:{title:"Custom Event",keyPath:"event/customevent"},dataview:{title:"DataView",keyPath:"dataview-api"},intersectionobserver:{title:"Intersection Observer",keyPath:"dom/intersection-observer"},mutationobserver:{title:"Mutation Observer",keyPath:"dom/mutationobserver"},passiveeventlisteners:{title:"Passive Event Listeners",keyPath:"dom/passiveeventlisteners"},serviceworker:{title:"Service Worker",keyPath:"serviceworker"},shadowroot:{title:"Shadow DOM",keyPath:"dom/shadowroot"},textencoder:{title:"TextEncoder & TextDecoder",keyPath:"textencoding"},typedarrays:{title:"Typed Arrays",keyPath:"typed-arrays"},webanimations:{title:"Web Animation",keyPath:"webanimations"},webgl:{title:"WebGL",keyPath:"webgl/webgl"},urlsearchparams:{title:"URLSearchParams",keyPath:"url/urlsearchparams"},datachannel:{title:"WebRTC/datachannel",keyPath:"webrtc/datachannel"},getusermedia:{title:"WebRTC/getusermedia",keyPath:"webrtc/getusermedia"},peerconnection:{title:"WebRTC/peerconnection",keyPath:"webrtc/peerconnection"},resizeobserver:{title:"Resizeobserver",keyPath:"window/resizeobserver"},sharedworkers:{title:"Shared Worker",keyPath:"workers/sharedworkers"},webworkers:{title:"Web Worker",keyPath:"workers/webworkers"}},Network:{cors:{title:"CORS",keyPath:"cors"},beacon:{title:"Beacon",keyPath:"network/beacon"},fetch:{title:"Fetch",keyPath:"network/fetch"},xhr2:{title:"XHR2",keyPath:"network/xhr2"}},Javascript:{es6array:{title:"ES6 Array",keyPath:"es6/array"},arrow:{title:"ES6 Arrow Function",keyPath:"es6/arrow"},es6class:{title:"ES6 Class",keyPath:"es6/class"},es6collections:{title:"ES6 Collections",keyPath:"es6/collections"},generators:{title:"ES6 Generators",keyPath:"es6/generators"},es6math:{title:"ES6 Math",keyPath:"es6/math"},es6number:{title:"ES6 Number",keyPath:"es6/number"},es6object:{title:"ES6 Object",keyPath:"es6/object"},promises:{title:"ES6 Promise",keyPath:"es6/promises"},restparameters:{title:"ES6 Rest Parameters",keyPath:"es6/rest-parameters"},spreadarray:{title:"ES6 Array Spread",keyPath:"es6/spread-array"},stringtemplate:{title:"ES6 String Template",keyPath:"es6/string-template"},es6string:{title:"ES6 String",keyPath:"es6/string"},es6symbol:{title:"ES6 Symbol",keyPath:"es6/symbol"},proxy:{title:"ES6 Proxy",keyPath:"proxy"},reflect:{title:"ES6 Reflect",customTest:"\"Reflect\" in window &&\n      typeof window.Reflect === 'object' &&\n      typeof Reflect.has === 'function' &&\n      [\n        'apply',\n        'construct',\n        'defineProperty',\n        'deleteProperty',\n        'getOwnPropertyDescriptor',\n        'getPrototypeOf',\n        'has',\n        'isExtensible',\n        'ownKeys',\n        'preventExtensions',\n        'setPrototypeOf',\n      ].every((i) => Reflect.has(Reflect, i))"},es7array:{title:"ES7 Array",keyPath:"es7/array"},restdestructuringarray:{title:"ES7 Rest Destructuring",keyPath:"es7/rest-destructuring"},spreadobject:{title:"ES7 Object Spread",keyPath:"es7/spread-object"},es8object:{title:"ES8 Object",keyPath:"es8/object"},finally:{title:"ES9 Promise Finally",customTest:"<ES6 Promise> && !!Promise.prototype.finally"}},CSS:{backgroundcliptext:{title:"Background Clip Text",keyPath:"css/backgroundcliptext"},borderimage:{title:"Border Image",keyPath:"css/borderimage"},cssgrid:{title:"CSS Grid",keyPath:"css/cssgrid"},customproperties:{title:"Custom Properties",keyPath:"css/customproperties"},flexgap:{title:"Flex Gap",keyPath:"css/flexgap"},focuswithin:{title:"Focus Within",keyPath:"css/focuswithin"},hsla:{title:"HSLA",keyPath:"css/hsla"},cssmask:{title:"Mask",keyPath:"css/mask"},csspositionsticky:{title:"Position Sticky",keyPath:"css/positionsticky"},rgba:{title:"RGBA",keyPath:"css/rgba"}},Element:{sandbox:{title:"iframe/sandbox",keyPath:"iframe/sandbox"},srcdoc:{title:"iframe/srcdoc",keyPath:"iframe/srcdoc"},apng:{title:"img/apng",keyPath:"img/apng"},imgcrossorigin:{title:"img/crossorigin",keyPath:"img/crossorigin"},exiforientation:{title:"img/exif-orientation",keyPath:"img/exif-orientation"},lazyloading:{title:"img/lazyloading",keyPath:"img/lazyloading"},sizes:{title:"img/sizes",keyPath:"img/sizes"},srcset:{title:"img/srcset",keyPath:"img/srcset"},webp:{title:"img/webp",keyPath:"img/webp"},prefetch:{title:"link/prefetch",keyPath:"link/prefetch"},scriptasync:{title:"script/async",keyPath:"script/async"},scriptdefer:{title:"script/defer",keyPath:"script/defer"}},Storage:{cookies:{title:"Cookies",keyPath:"storage/cookies"},indexeddb:{title:"IndexedDB",keyPath:"storage/indexeddb"},localstorage:{title:"LocalStorage",keyPath:"storage/localstorage"},sessionstorage:{title:"SessionStorage",keyPath:"storage/sessionstorage"}}},GITHUB_BASE_URL="https://github.com/Modernizr/Modernizr/tree/master/feature-detects",asyncFeatureKey=["indexeddb","apng","avif","exiforientation","webp"];function computeAsyncFeature(e){return new Promise((t=>{Modernizr.on(e,(e=>{t(e)}))}))}async function computeResult(){const e={Feature:[],Network:[],Javascript:[],CSS:[],Element:[],Storage:[]};getObjectKeys(FEATURE_MAP).forEach((t=>{const r=FEATURE_MAP[t],n=getObjectKeys(r).map((async e=>{const t=r[e];return t.keyPath&&(t.keyPath="".concat(GITHUB_BASE_URL,"/").concat(t.keyPath,".js")),asyncFeatureKey.indexOf(e)>-1?t.supported=await computeAsyncFeature(e):t.supported=Modernizr[e],t}));e[t]=n}));for(const t in e)hasOwnProperty(e,t)&&(e[t]=await Promise.all(e[t]));return e}window.Modernizr.addTest("finally",Modernizr.promises&&!!Promise.prototype.finally),window.Modernizr.addTest("reflect","Reflect"in window&&"object"==typeof window.Reflect&&"function"==typeof Reflect.has&&["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","setPrototypeOf"].every((e=>Reflect.has(Reflect,e))));class SystemPlugin{constructor(){_defineProperty(this,"name","SystemPlugin"),_defineProperty(this,"$pageSpyConfig",null),_defineProperty(this,"_cache",null)}onInit(e){let{config:t}=e;SystemPlugin.hasInitd||(SystemPlugin.hasInitd=!0,this.$pageSpyConfig=t,this.onceInitPublicData(),socketStore.addListener("refresh",(async(e,t)=>{let{source:r}=e;const{data:n}=r;if("system"===n){const e=await this.getSystemInfo();if(null===e)return;t(e)}})),socketStore.addListener("harbor-clear",(()=>{this.onceInitPublicData()})))}async onceInitPublicData(){const e=await this.getSystemInfo();null!==e&&socketStore.dispatchEvent("public-data",e)}onReset(){SystemPlugin.hasInitd=!1}async getSystemInfo(){var e,t;if(!this._cache){const e=await computeResult();this._cache={system:{ua:navigator.userAgent},features:e}}return!1===(null===(e=this.$pageSpyConfig)||void 0===e||null===(e=e.dataProcessor)||void 0===e||null===(t=e.system)||void 0===t?void 0:t.call(e,this._cache))?null:makeMessage("system",this._cache)}}_defineProperty(SystemPlugin,"hasInitd",!1);class PagePlugin{constructor(){_defineProperty(this,"name","PagePlugin"),_defineProperty(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;PagePlugin.hasInitd||(PagePlugin.hasInitd=!0,this.$pageSpyConfig=t,socketStore.addListener("refresh",((e,t)=>{let{source:r}=e;const{data:n}=r;if("page"===n){var o,i;const e=PagePlugin.collectHtml();if(!1===(null===(o=this.$pageSpyConfig)||void 0===o||null===(o=o.dataProcessor)||void 0===o||null===(i=o.page)||void 0===i?void 0:i.call(o,e)))return;const r=makeMessage("page",e);socketStore.dispatchEvent("public-data",r),t(r)}})))}onReset(){PagePlugin.hasInitd=!1}static collectHtml(){return{html:document.documentElement.outerHTML,location:window.location}}}_defineProperty(PagePlugin,"hasInitd",!1);class StoragePlugin{constructor(){_defineProperty(this,"name","StoragePlugin"),_defineProperty(this,"originSetItem",null),_defineProperty(this,"originRemoveItem",null),_defineProperty(this,"originClear",null),_defineProperty(this,"cookieStoreChangeListener",null),_defineProperty(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;StoragePlugin.hasInitd||(StoragePlugin.hasInitd=!0,this.$pageSpyConfig=t,this.listenRefreshEvent(),this.onceInitPublicData(),this.initStorageProxy(),socketStore.addListener("harbor-clear",(()=>{this.onceInitPublicData()})))}onReset(){this.originClear&&(Storage.prototype.clear=this.originClear),this.originRemoveItem&&(Storage.prototype.removeItem=this.originRemoveItem),this.originSetItem&&(Storage.prototype.setItem=this.originSetItem),this.cookieStoreChangeListener&&window.cookieStore&&window.cookieStore.removeEventListener("change",this.cookieStoreChangeListener),StoragePlugin.hasInitd=!1}async sendRefresh(e){let t=null;switch(e){case"localStorage":case"sessionStorage":t=this.takeStorage(e);break;case"cookie":t=await this.takeCookie()}t&&this.sendStorageItem(t)}listenRefreshEvent(){socketStore.addListener("refresh",(async e=>{let{source:t}=e;const{data:r}=t;this.sendRefresh(r)}))}takeStorage(e){const t={type:e,action:"get",data:[]},r=window[e],n=r.length;if(!n)return t;for(let e=0;e<=n-1;e++){const n=r.key(e);if(n){const e=r.getItem(n)||"";t.data.push({name:n,value:e})}}return t}async takeCookie(){const e={type:"cookie",action:"get",data:[]};return window.cookieStore?e.data=await window.cookieStore.getAll():document.cookie&&(e.data=document.cookie.split("; ").map((e=>{const[t,r]=e.split("=");return{name:t,value:r}}))),e}initStorageProxy(){const{clear:e,removeItem:t,setItem:r}=Storage.prototype;this.originClear=e,this.originRemoveItem=t,this.originSetItem=r;const n=this;Storage.prototype.clear=function(){e.call(this);const t={type:n.getStorageType(this),action:"clear"};n.sendStorageItem(t)},Storage.prototype.removeItem=function(e){t.call(this,e);const r={type:n.getStorageType(this),action:"remove",name:String(e)};n.sendStorageItem(r)},Storage.prototype.setItem=function(e,t){r.call(this,e,t);const o={type:n.getStorageType(this),action:"set",name:String(e),value:String(t)};n.sendStorageItem(o)},window.cookieStore&&(this.cookieStoreChangeListener=e=>{const{changed:t,deleted:r}=e;t.length>0&&t.forEach((e=>{const t={type:"cookie",action:"set",...e};this.sendStorageItem(t)})),r.length>0&&r.forEach((e=>{const t={type:"cookie",action:"remove",name:e.name};this.sendStorageItem(t)}))},window.cookieStore.addEventListener("change",this.cookieStoreChangeListener))}async onceInitPublicData(){(await Promise.all([this.takeStorage("localStorage"),this.takeStorage("sessionStorage"),this.takeCookie()])).forEach((e=>{var t,r;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(r=t.storage)||void 0===r?void 0:r.call(t,e)))return;const n=makeMessage("storage",e);socketStore.dispatchEvent("public-data",n)}))}getStorageType(e){return e===localStorage?"localStorage":e===sessionStorage?"sessionStorage":e.constructor.name}sendStorageItem(e){var t,r;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(r=t.storage)||void 0===r?void 0:r.call(t,e)))return;const n=makeMessage("storage",e);socketStore.dispatchEvent("public-data",n),socketStore.broadcastMessage(n,!0)}}function promisify(e){return new Promise(((t,r)=>{e.addEventListener("success",(()=>{t(e.result)})),e.addEventListener("error",(()=>{r()}))}))}_defineProperty(StoragePlugin,"hasInitd",!1);class DatabasePlugin{constructor(){_defineProperty(this,"name","DatabasePlugin"),_defineProperty(this,"originAdd",null),_defineProperty(this,"originPut",null),_defineProperty(this,"originDelete",null),_defineProperty(this,"originClear",null),_defineProperty(this,"originDrop",null),_defineProperty(this,"$pageSpyConfig",null)}static get isSupport(){return!!(IDBFactory&&IDBObjectStore&&window.indexedDB&&window.indexedDB.databases)}onInit(e){let{config:t}=e;DatabasePlugin.isSupport&&(DatabasePlugin.hasInitd||(DatabasePlugin.hasInitd=!0,this.$pageSpyConfig=t,this.listenEvents(),this.initIndexedDBProxy()))}onReset(){this.originAdd&&(IDBObjectStore.prototype.add=this.originAdd),this.originPut&&(IDBObjectStore.prototype.put=this.originPut),this.originClear&&(IDBObjectStore.prototype.clear=this.originClear),this.originDelete&&(IDBObjectStore.prototype.delete=this.originDelete),this.originDrop&&(IDBFactory.prototype.deleteDatabase=this.originDrop),DatabasePlugin.hasInitd=!1}listenEvents(){socketStore.addListener("refresh",(async e=>{let{source:t}=e;if("indexedDB"===t.data){const e={action:"basic",result:await this.takeBasicInfo()};this.sendData(e)}})),socketStore.addListener("database-pagination",(async e=>{let{source:t}=e;const{db:r,store:n,page:o}=t.data,i=await this.getStoreDataWithPagination({db:r,store:n,page:o});this.sendData(i)}))}initIndexedDBProxy(){const{put:e,add:t,delete:r,clear:n}=IDBObjectStore.prototype;this.originAdd=t,this.originPut=e,this.originDelete=r,this.originClear=n;const o=this;[{origin:e,method:"put"},{origin:t,method:"add"},{origin:r,method:"delete"},{origin:n,method:"clear"}].forEach((e=>{let{origin:t,method:r}=e;IDBObjectStore.prototype[r]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];const a=t.apply(this,n),s={action:"clear"===r?"clear":"update",database:this.transaction.db.name,store:this.name};return a.addEventListener("success",(()=>{o.sendData(s)})),a}}));const i=IDBFactory.prototype.deleteDatabase;this.originDrop=i,IDBFactory.prototype.deleteDatabase=function(e){const t=i.call(this,e),r={action:"drop",database:e};return t.addEventListener("success",(()=>{o.sendData(r)})),t}}async takeBasicInfo(){const e=await window.indexedDB.databases();if(!e.length)return null;const t=e.filter((e=>e.name&&e.version));if(!t.length)return null;const r=await Promise.all(t.map((e=>this.getDBData(e))));return r.filter(Boolean)}async getDBData(e){try{const t={name:e.name,version:e.version,stores:[]},r=await promisify(window.indexedDB.open(e.name,e.version));if(r.objectStoreNames.length){const e=[...r.objectStoreNames].map((e=>r.transaction(e,"readonly").objectStore(e)));t.stores=e.map((e=>{const{name:t,keyPath:r,autoIncrement:n,indexNames:o}=e;return{name:t,keyPath:r,autoIncrement:n,indexes:[...o]}}))}return t}catch(e){return psLog.error("Failed to get indexedDB data, more info: ".concat(e.message)),null}}async getStoreDataWithPagination(e){let{db:t,store:r,page:n}=e;const o={action:"get",database:null,store:null,page:{current:n,prev:null,next:null},total:0,data:[]};if(n<1)return o;const i=await promisify(window.indexedDB.open(t)),a=i.transaction(r,"readonly").objectStore(r);o.database={name:i.name,version:i.version},o.store={name:a.name,keyPath:a.keyPath,autoIncrement:a.autoIncrement,indexes:[...a.indexNames]},o.total=await promisify(a.count());const s=50*(n-1),c=50*n;o.page.prev=n>1?n-1:null,o.page.next=s+50<o.total?n+1:null;let l=0;const u=a.openCursor();return new Promise(((e,t)=>{u.addEventListener("success",(()=>{const t=u.result;t?(l>=s&&l<c&&o.data.push({key:t.key,value:t.value}),l++,t.continue()):e(o)})),u.addEventListener("error",t)}))}sendData(e){var t,r;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(r=t.database)||void 0===r?void 0:r.call(t,e)))return;const n=makeMessage("database",e);socketStore.broadcastMessage(n,!0),["update","clear","drop"].includes(e.action)&&socketStore.dispatchEvent("public-data",n)}}_defineProperty(DatabasePlugin,"hasInitd",!1);const joinQuery=e=>{const t=new URLSearchParams;return Object.entries(e).forEach((e=>{let[r,n]=e;t.append(r,String(n))})),t.toString()};class Request{constructor(e){if(this.config=e,!e.api)throw Error("The api base url cannot be empty")}get base(){return this.config.api}getScheme(){return this.config.enableSSL?["https://","wss://"]:["http://","ws://"]}createRoom(){const{project:e,title:t,useSecret:r,secret:n}=this.config,o=this.getScheme(),i=joinQuery({name:navigator.userAgent,group:e,title:t});return fetch("".concat(o[0]).concat(this.base,"/api/v1/room/create?").concat(i),{method:"POST",body:JSON.stringify({useSecret:r,secret:n})}).then((e=>e.json())).then((e=>{const{name:t,address:r}=e.data||{};return{roomUrl:this.getRoomUrl(r),address:r,name:t}})).catch((e=>{throw Error("Request create room failed: ".concat(e.message))}))}getRoomUrl(e){const t=this.getScheme(),{useSecret:r,secret:n}=this.config;return"".concat(t[1]).concat(this.base,"/api/v1/ws/room/join?").concat(joinQuery({address:e,name:"client:".concat(getRandomId()),userId:"Client",forceCreate:!0,useSecret:r,secret:n}))}}const STICKY_RADIUS="50%",FULLY_RADIUS="100%",POSITION_CACHE_ID="page-spy-position";function getPosition(e){return window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e}function moveable(e){const t=localStorage.getItem(POSITION_CACHE_ID);if(t){const[r,n]=t.split(",");+r<window.innerWidth&&+n<window.innerHeight&&(e.style.left="".concat(r,"px"),e.style.top="".concat(n,"px"))}let r,n;const o={xAxis:0,yAxis:0},i={x:0,y:0};function a(){if(!o.xAxis&&!o.yAxis)return;const{left:t,top:n}=e.getBoundingClientRect();t>0&&t<o.xAxis&&n>0&&n<o.yAxis?e.isHidden=!1:(r&&clearTimeout(r),r=setTimeout((()=>{r=null,e.disableHidden||(t<=0?e.classList.add("hidden-in-left"):t>=o.xAxis&&e.classList.add("hidden-in-right"),n<=0?e.classList.add("hidden-in-top"):n>=o.yAxis&&e.classList.add("hidden-in-bottom"),e.isHidden=!0)}),1e3))}function s(t){t.preventDefault();const{clientX:r,clientY:a}=getPosition(t),s=r-i.x,c=a-i.y;[s,c].some((e=>Math.abs(e)>5))&&(e.isMoveEvent=!0);let l=n.x+s;l<=0?(l=0,e.style.setProperty("--left-radius",STICKY_RADIUS)):l>=o.xAxis?(l=o.xAxis,e.style.setProperty("--right-radius",STICKY_RADIUS)):(e.style.setProperty("--left-radius",FULLY_RADIUS),e.style.setProperty("--right-radius",FULLY_RADIUS));let u=n.y+c;u<=0?(u=0,e.style.setProperty("--top-radius",STICKY_RADIUS)):u>o.yAxis?(u=o.yAxis,e.style.setProperty("--bottom-radius",STICKY_RADIUS)):(e.style.setProperty("--top-radius",FULLY_RADIUS),e.style.setProperty("--bottom-radius",FULLY_RADIUS)),e.style.left="".concat(l,"px"),e.style.top="".concat(u,"px")}function c(){i.x=0,i.y=0;const{left:t,top:r}=e.getBoundingClientRect();localStorage.setItem(POSITION_CACHE_ID,"".concat(t,",").concat(r)),a(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",c)}function l(t){t.stopPropagation(),r&&clearTimeout(r),e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left"),e.isMoveEvent=!1,n=e.getBoundingClientRect(),o.xAxis=window.innerWidth-n.width,o.yAxis=window.innerHeight-n.height;const{clientX:a,clientY:l}=getPosition(t);i.x=a,i.y=l,document.addEventListener("mousemove",s,!1),document.addEventListener("mouseup",c,!1),document.addEventListener("touchmove",s,{capture:!1,passive:!1}),document.addEventListener("touchend",c,!1)}e.addEventListener("mousedown",l,!1),e.addEventListener("touchstart",l,{capture:!1,passive:!1}),e.addEventListener("mouseover",(()=>{e.disableHidden=!0,e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left")}),!1),e.addEventListener("mouseleave",(()=>{e.disableHidden=!1,a()}),!1)}var img$3="data:image/svg+xml,%3csvg width='255' height='255' viewBox='0 0 255 255' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M183 24L81 126V141.5L90 150.5H105L145 110.5H160.5L169.5 119.5V133.5L72 231' stroke='url(%23paint0_linear_106_8)' stroke-width='25' stroke-linecap='round' /%3e %3cdefs%3e %3clinearGradient id='paint0_linear_106_8' x1='127.5' y1='24' x2='127.5' y2='231' gradientUnits='userSpaceOnUse'%3e %3cstop stop-color='%233D0C7C' /%3e %3cstop offset='0.519204' stop-color='%234E00B1' /%3e %3cstop offset='1' stop-color='%23EFDFFF' /%3e %3c/linearGradient%3e %3c/defs%3e%3c/svg%3e",img$2="data:image/svg+xml,%3csvg width='250' height='250' viewBox='0 0 250 250' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M62.7935 118.088L173.383 7.49889L174.046 6.83527C179.024 1.85756 187.095 1.85756 192.072 6.83527C197.028 11.7914 197.053 19.8192 192.127 24.8057L89.0585 129.147V133.294L91.8232 136.059H95.9703L138.164 93.8963L163.706 94.588L181.677 112.559V137.441L75.926 243.192C70.9635 248.155 62.9177 248.155 57.9552 243.192C52.9927 238.23 52.9928 230.184 57.9552 225.222L155.412 127.765V123.618L152.647 120.853H148.5L107.029 162.324H79.3819L62.7935 145.735V118.088Z' fill='white' /%3e%3c/svg%3e",_document$currentScri;const nodeId="__pageSpy";class Config extends ConfigBase{constructor(){super(...arguments),_defineProperty(this,"privateKeys",["secret"]),_defineProperty(this,"defaultConfig",(()=>{const e={api:"",project:"default",title:"--",enableSSL:null,disabledPlugins:[],offline:!1,messageCapacity:1e3,useSecret:!1,secret:"",serializeData:!1,dataProcessor:{},clientOrigin:"",autoRender:!0,logo:img$3,primaryColor:"#8434e9",modal:{logo:img$2,title:"PageSpy"},gesture:null};if(!Config.scriptLink)return e;try{const{host:t,origin:r,protocol:n}=new URL(Config.scriptLink);return{...e,api:t,clientOrigin:r,enableSSL:n.startsWith("https")}}catch(t){return e}}))}}function styleInject(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}_defineProperty(Config,"scriptLink",null===(_document$currentScri=document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src);var css_248z$2=".toast-d8zWd {\n  position: fixed;\n  left: 50%;\n  top: 10%;\n  transform: translate3d(-50%, 0, 0);\n  max-width: 50vw;\n  padding: 0.71428571em 0.85714286em;\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  font-weight: 500;\n  color: var(--primary-color);\n  background-color: #fff;\n  border-radius: 0.28571429em;\n  box-shadow: 0px 4px 4px 2px rgba(0, 0, 0, 0.05);\n  z-index: 99999;\n}\n.toast-d8zWd {\n  animation: slideIn-4mB0Y 0.3s ease-in-out forwards;\n}\n@keyframes slideIn-4mB0Y {\n  0% {\n    transform: translate3d(-50%, 1.78571429em, 0);\n    opacity: 0;\n  }\n  80% {\n    transform: translate3d(-50%, -0.71428571em, 0);\n  }\n  100% {\n    transform: translate3d(-50%, 0, 0);\n    opacity: 1;\n  }\n}\n",classes$2={toast:"toast-d8zWd",slideIn:"slideIn-4mB0Y"};styleInject(css_248z$2);class toast{constructor(){if(new.target===toast)throw new Error("Cannot call `new toast()`")}static get root(){var e;return null!==(e=document.querySelector("#".concat(nodeId)))&&void 0!==e?e:document.body}static message(e){const t=document.createElement("div");t.classList.add("page-spy-toast",classes$2.toast),t.innerText=String(e),toast.root.appendChild(t);const r=setTimeout((()=>{toast.root.contains(t)&&toast.root.removeChild(t),toast.timer===r&&(toast.timer=null)}),3e3);toast.timer=r}static destroy(){const e=toast.root.querySelectorAll(".page-spy-toast");e.length&&([...e].forEach((e=>{toast.root.contains(e)&&toast.root.removeChild(e)})),toast.timer&&clearTimeout(toast.timer)),toast.timer=null}}_defineProperty(toast,"timer",null);const source={zh:{copyLink:"复制在线调试链接",copied:"复制成功",copyFailed:"复制失败"},en:{copyLink:"Copy online debug link",copied:"Copied",copyFailed:"Copy failed"}},locales=isCN()?source.zh:source.en;var img$1="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3e %3cpath d='M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z' /%3e %3cpath d='M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1' /%3e %3c/g%3e%3c/svg%3e",css_248z$1=".modal-rlFLa {\n  display: none;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 13000;\n  font-size: 14px;\n  line-height: 1;\n}\n.modal-rlFLa.show {\n  display: block;\n}\n.modal-rlFLa.show {\n  animation: fadeIn-mXj-N 0.3s ease-in-out forwards;\n}\n@keyframes fadeIn-mXj-N {\n  0% {\n    background-color: rgba(0, 0, 0, 0);\n  }\n  100% {\n    background-color: rgba(0, 0, 0, 0.3);\n  }\n}\n.modal-rlFLa.show .content-KlWkz {\n  animation: scaleIn-JuIZH 0.3s ease-in forwards;\n}\n@keyframes scaleIn-JuIZH {\n  0% {\n    opacity: 0;\n    transform: translate3d(-50%, -50%, 0) scale(0.8);\n  }\n  70% {\n    opacity: 1;\n    transform: translate3d(-50%, -50%, 0) scale(1.1);\n  }\n  100% {\n    transform: translate3d(-50%, -50%, 0) scale(1);\n  }\n}\n.modal-rlFLa.leaving {\n  display: block;\n}\n.modal-rlFLa.leaving {\n  animation: fadeOut-daRKq 0.3s ease-in-out forwards;\n}\n@keyframes fadeOut-daRKq {\n  0% {\n    background-color: rgba(0, 0, 0, 0.3);\n  }\n  100% {\n    background-color: rgba(0, 0, 0, 0);\n  }\n}\n.modal-rlFLa.leaving .content-KlWkz {\n  animation: scaleOut-8Pf5H 0.3s ease-out forwards;\n}\n@keyframes scaleOut-8Pf5H {\n  0% {\n    opacity: 1;\n    transform: translate3d(-50%, -50%, 0) scale(1);\n  }\n  30% {\n    transform: translate3d(-50%, -50%, 0) scale(1.1);\n  }\n  60% {\n    opacity: 0;\n    transform: translate3d(-50%, -50%, 0) scale(0.9);\n  }\n  100% {\n    opacity: 0;\n    transform: translate3d(-50%, -50%, 0) scale(0.9);\n  }\n}\n.modal-rlFLa .content-KlWkz {\n  position: absolute;\n  left: 50%;\n  top: 45%;\n  transform: translate3d(-50%, -50%, 0);\n  width: 90%;\n  background-color: #fafafa;\n  border-radius: 0.42857143em;\n  overflow: hidden;\n}\n@media screen and (min-width: 440px) {\n  .modal-rlFLa .content-KlWkz {\n    max-width: 70%;\n  }\n}\n@media screen and (min-width: 768px) {\n  .modal-rlFLa .content-KlWkz {\n    max-width: 55%;\n  }\n}\n@media screen and (min-width: 1024px) {\n  .modal-rlFLa .content-KlWkz {\n    max-width: 40%;\n  }\n}\n@media screen and (min-width: 1440px) {\n  .modal-rlFLa .content-KlWkz {\n    max-width: 30%;\n  }\n}\n@media screen and (min-width: 1920px) {\n  .modal-rlFLa .content-KlWkz {\n    max-width: 25%;\n  }\n}\n.modal-rlFLa .header-M30Wi {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 0.57142857em 1em;\n  color: white;\n  background-color: var(--primary-color);\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN {\n  display: flex;\n  align-items: center;\n  gap: 0.57142857em;\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN .logo-OM-Sp {\n  height: 2em;\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN b {\n  font-size: 1.42857143em;\n}\n.modal-rlFLa .header-M30Wi .headerRight-Y8nGg {\n  padding: 6px;\n  cursor: pointer;\n}\n.modal-rlFLa .header-M30Wi .headerRight-Y8nGg .close-bRwD3 {\n  width: 1.71428571em;\n  height: 1.71428571em;\n}\n.modal-rlFLa .main-SA0Hu {\n  padding: 1em;\n}\n.modal-rlFLa .footer-op1wT {\n  display: flex;\n  justify-content: flex-end;\n  align-items: center;\n  gap: 0.57142857em;\n  padding: 0.57142857em 1em;\n  border-top: 1px solid #dedede;\n}\n.modal-rlFLa button {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-width: 4.28571429em;\n  padding: 0.42857143em 0.42857143em;\n  gap: 0.28571429em;\n  letter-spacing: 0.4px;\n  border: 1px solid #333;\n  border-radius: 0.28571429em;\n  background-color: white;\n  color: #333;\n  cursor: pointer;\n  white-space: nowrap;\n  transition: all ease-in-out 100ms;\n  font-size: 0.92857143em;\n}\n.modal-rlFLa button[data-primary] {\n  border-color: var(--primary-color);\n  background-color: var(--primary-color);\n  color: white;\n}\n.modal-rlFLa button[data-dashed] {\n  border-style: dashed;\n}\n.modal-rlFLa button:disabled {\n  border-color: #c8c8c8;\n  background-color: #c8c8c8;\n  color: white;\n  cursor: not-allowed;\n}\n.modal-rlFLa button:active {\n  opacity: 0.7;\n}\n.modal-rlFLa button img,\n.modal-rlFLa button svg {\n  width: 1.42857143em;\n  height: 1.42857143em;\n}\n@media screen and (max-width: 440px) {\n  .modal-rlFLa button img,\n  .modal-rlFLa button svg {\n    display: none;\n  }\n}\n",classes$1={modal:"modal-rlFLa",fadeIn:"fadeIn-mXj-N",content:"content-KlWkz",scaleIn:"scaleIn-JuIZH",fadeOut:"fadeOut-daRKq",scaleOut:"scaleOut-8Pf5H",header:"header-M30Wi",headerLeft:"headerLeft-RfzaN",logo:"logo-OM-Sp",headerRight:"headerRight-Y8nGg",close:"close-bRwD3",main:"main-SA0Hu",footer:"footer-op1wT"};styleInject(css_248z$1);var img="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cpath fill='white' d='m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z' /%3e%3c/svg%3e";const defaultConfig={logo:"",title:"",content:document.createElement("div"),footer:[],mounted:document.body};class modal{constructor(){if(new.target===modal)throw new Error("Cannot call `new modal()`")}static get rendered(){return modal.config.mounted.contains(modal.root)}static query(e){var t;return null===(t=modal.root)||void 0===t?void 0:t.querySelector(".".concat(e))}static build(e){modal.config={...modal.config,...e},modal.root||(modal.root=(new DOMParser).parseFromString(modal.template,"text/html").querySelector(".".concat(classes$1.modal)),modal.root.addEventListener("click",(e=>{e.stopPropagation(),modal.close()})),modal.query(classes$1.content).addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),modal.query(classes$1.headerRight).addEventListener("click",(()=>{modal.close()})),modal.query(classes$1.logo).setAttribute("src",modal.config.logo),modal.query(classes$1.title).textContent=modal.config.title)}static show(e){var t,r;if(!modal.root)return void psLog.info("modal has not been ready.");const{content:n,footer:o,mounted:i}=modal.config,a=null!==(t=null==e?void 0:e.content)&&void 0!==t?t:n,s=null!==(r=null==e?void 0:e.footer)&&void 0!==r?r:o,c=modal.query(classes$1.main),l=modal.query(classes$1.footer);c.innerHTML="",isString(a)?c.insertAdjacentHTML("afterbegin",a):c.appendChild(a),l.innerHTML="",s.forEach((e=>{isString(e)?l.insertAdjacentHTML("beforeend",e):l.insertAdjacentElement("beforeend",e)})),modal.rendered||i.appendChild(modal.root),modal.root.classList.add("show")}static close(){modal.root&&modal.rendered&&(modal.root.classList.remove("show"),modal.root.classList.add("leaving"),setTimeout((()=>{var e;null===(e=modal.root)||void 0===e||e.classList.remove("leaving")}),300))}static reset(){modal.config=defaultConfig,modal.root=null}}_defineProperty(modal,"config",defaultConfig),_defineProperty(modal,"template",'\n  <div class="'.concat(classes$1.modal,'">\n    <div class="').concat(classes$1.content,'">\n      \x3c!-- Header --\x3e\n      <div class="').concat(classes$1.header,'">\n        <div class="').concat(classes$1.headerLeft,'">\n          <img class="').concat(classes$1.logo,'" />\n          <b class="').concat(classes$1.title,'"></b>\n        </div>\n        <div class="').concat(classes$1.headerRight,'">\n          <img class="').concat(classes$1.close,'" src="').concat(img,'" />\n        </div>\n      </div>\n\n      \x3c!-- Main content --\x3e\n      <div class="').concat(classes$1.main,'"></div>\n\n      \x3c!-- Footer --\x3e\n      <div class="').concat(classes$1.footer,'"></div>\n    </div>\n  </div>\n  '));var css_248z="#__pageSpy {\n  font-size: 14px;\n  line-height: 1;\n}\n#__pageSpy .page-spy-logo {\n  --top-radius: 100%;\n  --right-radius: 100%;\n  --bottom-radius: 100%;\n  --left-radius: 100%;\n  position: fixed;\n  right: 2.85714286em;\n  bottom: 5.71428571em;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 5.71428571em;\n  height: 5.71428571em;\n  font-size: 1em;\n  border-radius: 5.71428571em;\n  background-color: #fff;\n  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n  cursor: pointer;\n  z-index: 13000;\n  transition: opacity ease-in-out 0.3s, transform ease-in-out 0.3s, background-color ease-in-out 0.3s, filter ease-in-out 0.3s;\n}\n#__pageSpy .page-spy-logo.inactive {\n  background-color: #a2a2a2;\n  filter: grayscale(1);\n}\n#__pageSpy .page-spy-logo::after {\n  content: '';\n  display: block;\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  transform: rotateZ(45deg);\n  background-color: white;\n  border-top-left-radius: var(--top-radius);\n  border-top-right-radius: var(--right-radius);\n  border-bottom-right-radius: var(--bottom-radius);\n  border-bottom-left-radius: var(--left-radius);\n  transition: border-radius linear 0.15s;\n}\n#__pageSpy .page-spy-logo .hidden-mixin {\n  opacity: 0.35;\n}\n#__pageSpy .page-spy-logo.hidden-in-top {\n  opacity: 0.35;\n  transform: translateY(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-top img {\n  transform: translateY(30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right {\n  opacity: 0.35;\n  transform: translateX(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right img {\n  transform: translateX(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom {\n  opacity: 0.35;\n  transform: translateY(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom img {\n  transform: translateY(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left {\n  opacity: 0.35;\n  transform: translateX(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left img {\n  transform: translateX(30%);\n}\n#__pageSpy .page-spy-logo img {\n  position: relative;\n  display: block;\n  z-index: 100;\n  transition: transform ease-in-out 0.1s 0.4s;\n  width: 3.57142857em;\n  pointer-events: none;\n  -webkit-user-select: none;\n          user-select: none;\n}\n.connectInfo-9svvO {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  gap: 4px;\n}\n.connectInfo-9svvO > p {\n  flex: 1 0 0;\n  text-align: center;\n  overflow: hidden;\n}\n.connectInfo-9svvO > p span {\n  font-size: 0.85714286em;\n  color: #aaa;\n}\n.connectInfo-9svvO > p b {\n  display: block;\n  margin-top: 12px;\n  font-size: 1.28571429em;\n  color: #333;\n}\n",classes={connectInfo:"connectInfo-9svvO"};styleInject(css_248z);var version="2.1.2";class PageSpy{static get pluginsWithOrder(){return[...PageSpy.plugins.pre,...PageSpy.plugins.normal,...PageSpy.plugins.post]}static registerPlugin(e){if(!e)return;if(isClass(e))return void psLog.error("PageSpy.registerPlugin() expect to pass an instance, not a class");if(!e.name)return void psLog.error("The ".concat(e.constructor.name,' plugin should provide a "name" property'));const t=PageSpy.pluginsWithOrder.some((t=>t.name===e.name));if(t)return void psLog.info("The ".concat(e.name,' has registered. Consider the following reasons:\n      - Duplicate register one same plugin;\n      - Plugin\'s "name" conflict with others, you can print all registered plugins by "PageSpy.plugins";'));PageSpy.plugins[e.enforce||"normal"].push(e)}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_defineProperty(this,"root",null),_defineProperty(this,"version",version),_defineProperty(this,"request",null),_defineProperty(this,"address",""),_defineProperty(this,"socketStore",socketStore),_defineProperty(this,"config",new Config),_defineProperty(this,"cacheTimer",null),PageSpy.instance)return psLog.warn("Cannot initialize PageSpy multiple times"),PageSpy.instance;if(isArray(e.gesture)){if(e.gesture.length<4)throw new Error("[PageSpy] The length of gesture commands must be at least 4.");a(e.gesture,(()=>{PageSpy.instance||this.init(e)}))}else this.init(e)}updateConfiguration(){const{messageCapacity:e,offline:t,useSecret:r}=this.config.get();if(!0===r){const e=JSON.parse(sessionStorage.getItem(ROOM_SESSION_KEY));this.config.set("secret",(null==e?void 0:e.secret)||getAuthSecret())}socketStore.connectable=!0,socketStore.getPageSpyConfig=()=>this.config.get(),socketStore.getClient=()=>PageSpy.client,socketStore.isOffline=t,socketStore.messageCapacity=e}async init(e){PageSpy.instance=this;const t=this.config.mergeConfig(e);this.updateConfiguration(),this.triggerPlugins("onInit",{config:t,socketStore:socketStore}),!1===t.offline&&(this.request=new Request(t),this.cacheIsInvalid()?await this.createNewConnection():this.useOldConnection(),document.addEventListener("visibilitychange",(()=>{!document.hidden&&socketStore.getSocket().getState()!==SocketState.OPEN&&socketStore.connectable&&this.useOldConnection()}))),psLog.log("Plugins inited"),t.autoRender&&this.render()}cacheIsInvalid(){try{const e=sessionStorage.getItem(ROOM_SESSION_KEY);if(!e)return!0;const t=JSON.parse(e);if(!t.address)return!0;const r=this.config.get();return["project","title","useSecret"].some((e=>t[e]!==r[e]))}catch(e){return!0}}async createNewConnection(){if(!this.request)return void psLog.error("Cannot get the Request");const e=await this.request.createRoom();this.address=e.address,socketStore.init(e.roomUrl),sessionStorage.removeItem(ROOM_SESSION_KEY),this.refreshRoomInfo()}useOldConnection(){var e;const t=sessionStorage.getItem(ROOM_SESSION_KEY);if(!t)throw new Error("The cache info is invalid when useOldConnection");const{address:r}=JSON.parse(t);this.address=r,this.refreshRoomInfo();const n=null===(e=this.request)||void 0===e?void 0:e.getRoomUrl(this.address);n&&socketStore.init(n)}refreshRoomInfo(){this.saveSession(),this.cacheTimer=setInterval((()=>{socketStore.getSocket().getState()===SocketState.OPEN&&this.saveSession()}),15e3)}saveSession(){const{project:e,title:t,useSecret:r,secret:n}=this.config.get(),o=JSON.stringify({address:this.address,project:e,title:t,useSecret:r,secret:n});sessionStorage.setItem(ROOM_SESSION_KEY,o)}triggerPlugins(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const{disabledPlugins:o}=this.config.get();PageSpy.pluginsWithOrder.forEach((t=>{var n;isArray(o)&&o.length&&o.includes(t.name)||null===(n=t[e])||void 0===n||n.apply(t,[{...r[0],modal:modal,toast:toast},r.slice(1)])}))}render(){if(document.querySelector("#".concat(nodeId)))psLog.warn("Cannot render the widget because it has been in the DOM");else if(void 0!==document)"loading"===document.readyState?window.addEventListener("DOMContentLoaded",this.render.bind(this)):this.startRender();else{let e;const t=()=>{document&&"complete"===document.readyState?(e&&clearTimeout(e),this.startRender()):e=setTimeout(t,1)};e=setTimeout(t,1)}}startRender(){const e=this.config.get(),{project:t,clientOrigin:r,title:n,logo:o,useSecret:i,secret:a,primaryColor:s,modal:c}=e,l=(new DOMParser).parseFromString('\n      \x3c!-- PageSpy Root Container --\x3e\n      <div id="'.concat(nodeId,'" style="--primary-color: #8434e9">\n        <div class="page-spy-logo">\n          <img src="').concat(o,'" alt="Logo" />\n        </div>\n      </div>\n\n      \x3c!-- Default content for modal --\x3e\n      <div class="').concat(classes.connectInfo,'">\n        <p>\n          <span>Device ID</span>\n          <b style="font-family: \'Monaco\'" class="page-spy-device-id">\n            ').concat(this.address.slice(0,4)||"--","\n          </b>\n        </p>\n        ").concat(i&&a?'\n        <p>\n          <span>Secret</span>\n          <b class="page-spy-secret">'.concat(a,"</b>\n        </p>"):"",'\n        <p>\n          <span>Project</span>\n          <b class="page-spy-project">').concat(t,'</b>\n        </p>\n        <p>\n          <span>Title</span>\n          <b class="page-spy-title">').concat(n,'</b>\n        </p>\n      </div>\n\n      \x3c!-- Default button for modal --\x3e\n      <button class="page-spy-btn" data-primary id="page-spy-copy-link">\n        <img src="').concat(img$1,'" alt="Copy" />\n        <span>').concat(locales.copyLink,"</span>\n      </button>\n    "),"text/html"),u=e=>l.querySelector.call(l,e),d=u("#".concat(nodeId));d.style.setProperty("--primary-color",s),this.root=d;const p=u(".page-spy-logo");moveable(p);p.addEventListener("click",(()=>{p.isMoveEvent||p.isHidden||modal.show()}),!1),window.addEventListener("sdk-inactive",(()=>{p.classList.add("inactive")}));const f=(h=classes.connectInfo,u(".".concat(h)));var h;const y=u("#page-spy-copy-link");y.addEventListener("click",(()=>{let e="".concat(r,"/#/devtools?address=").concat(encodeURIComponent(this.address));i&&(e+="&secret=".concat(a));const t=copy$1(e)?locales.copied:locales.copyFailed;modal.close(),toast.message(t)})),modal.build({logo:c.logo||img$2,title:c.title||"PageSpy",content:f,footer:[y],mounted:d}),document.documentElement.insertAdjacentElement("beforeend",d),this.triggerPlugins("onMounted",{config:e,root:d,socketStore:socketStore}),this.handleDeviceDPR(),psLog.log("Render success")}handleDeviceDPR(){const e=window.devicePixelRatio||1,t=document.querySelector('[name="viewport"]');if(t){const r=(t.getAttribute("content")||"").match(/initial-scale=\d+(\.\d+)?/);(r?parseFloat(r[0].split("=")[1]):1)<1&&(this.root.style.fontSize="".concat(14*e,"px"))}}updateRoomInfo(e){if(!e)return;const{project:t,title:r}=e;if(t){this.config.set("project",String(t));const e=document.querySelector(".page-spy-project");e&&(e.textContent=String(t))}if(r){this.config.set("title",String(r));const e=document.querySelector(".page-spy-title");e&&(e.textContent=String(r))}socketStore.updateRoomInfo()}abort(){this.triggerPlugins("onReset"),PageSpy.instance=null,socketStore.close(),modal.reset();const e=document.querySelector("#".concat(nodeId));e&&document.documentElement.removeChild(e)}}_defineProperty(PageSpy,"instance",null),_defineProperty(PageSpy,"plugins",{pre:[],normal:[],post:[]}),_defineProperty(PageSpy,"client",new Client({ua:navigator.userAgent,sdk:"browser",sdkVersion:version}));const INTERNAL_PLUGINS=[new ConsolePlugin,new ErrorPlugin,new NetworkPlugin,new StoragePlugin,new DatabasePlugin,new PagePlugin,new SystemPlugin];return INTERNAL_PLUGINS.forEach((e=>{PageSpy.registerPlugin(e)})),PageSpy}();
//# sourceMappingURL=index.min.js.map


  }
}