mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-10-01 15:32:12 +08:00
39 lines
225 KiB
JavaScript
39 lines
225 KiB
JavaScript
(function(){System.register([],function(exports,module){"use strict";return{execute:function(){var __vite_style__=document.createElement("style");
|
|
/**
|
|
* @vue/shared v3.5.21
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/
|
|
function makeMap(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}__vite_style__.textContent='html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display: inline;*zoom: 1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left: -7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align: middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow: visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height: 13px;*width: 13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}\n/*$vite$:1*/',document.head.appendChild(__vite_style__),exports({E:getDefaultExportFromCjs,a:createTextVNode,b:resolveComponent,c:createElementBlock,d:defineComponent,e:renderList,f:createBlock,g:normalizeStyle,h:h,i:inject,j:resolveDynamicComponent,l:ref,n:normalizeClass,o:openBlock,p:provide,q:createCommentVNode,r:renderSlot,s:withCtx,u:useComponent,v:nextTick,w:watch,x:watchEffect,y:shallowReactive,z:onScopeDispose});const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith("onUpdate:"),extend$1=Object.assign,remove=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$d=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$d.call(e,t),isArray$2=Array.isArray,isMap$1=e=>"[object Map]"===toTypeString(e),isSet$1=e=>"[object Set]"===toTypeString(e),isFunction$2=e=>"function"==typeof e,isString$1=e=>"string"==typeof e,isSymbol$1=e=>"symbol"==typeof e,isObject$4=e=>null!==e&&"object"==typeof e,isPromise=e=>(isObject$4(e)||isFunction$2(e))&&isFunction$2(e.then)&&isFunction$2(e.catch),objectToString$1=Object.prototype.toString,toTypeString=e=>objectToString$1.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject$1=e=>"[object Object]"===toTypeString(e),isIntegerKey=e=>isString$1(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},camelizeRE=/-\w/g,camelize=cacheStringFunction(e=>e.replace(camelizeRE,e=>e.slice(1).toUpperCase())),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(e=>e.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(e=>e.charAt(0).toUpperCase()+e.slice(1)),toHandlerKey=cacheStringFunction(e=>e?`on${capitalize(e)}`:""),hasChanged=(e,t)=>!Object.is(e,t),invokeArrayFns=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},def=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},looseToNumber=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function normalizeStyle(e){if(isArray$2(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=isString$1(r)?parseStringStyle(r):normalizeStyle(r);if(s)for(const e in s)t[e]=s[e]}return t}if(isString$1(e)||isObject$4(e))return e}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(e){const t={};return e.replace(styleCommentRE,"").split(listDelimiterRE).forEach(e=>{if(e){const n=e.split(propertyDelimiterRE);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function normalizeClass(e){let t="";if(isString$1(e))t=e;else if(isArray$2(e))for(let n=0;n<e.length;n++){const r=normalizeClass(e[n]);r&&(t+=r+" ")}else if(isObject$4(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(e){return!!e||""===e}const isRef$1=e=>!(!e||!0!==e.__v_isRef),toDisplayString=exports("t",e=>isString$1(e)?e:null==e?"":isArray$2(e)||isObject$4(e)&&(e.toString===objectToString$1||!isFunction$2(e.toString))?isRef$1(e)?toDisplayString(e.value):JSON.stringify(e,replacer,2):String(e)),replacer=(e,t)=>isRef$1(t)?replacer(e,t.value):isMap$1(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[stringifySymbol(t,r)+" =>"]=n,e),{})}:isSet$1(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>stringifySymbol(e))}:isSymbol$1(t)?stringifySymbol(t):!isObject$4(t)||isArray$2(t)||isPlainObject$1(t)?t:String(t),stringifySymbol=(e,t="")=>{var n;return isSymbol$1(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};
|
|
/**
|
|
* @vue/reactivity v3.5.21
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/
|
|
let activeEffectScope,activeSub;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){1===++this._on&&(this.prevScope=activeEffectScope,activeEffectScope=this)}off(){this._on>0&&0===--this._on&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function getCurrentScope(){return activeEffectScope}function onScopeDispose(e,t=!1){activeEffectScope&&activeEffectScope.cleanups.push(e)}const pausedQueueEffects=new WeakSet;class ReactiveEffect{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,activeEffectScope&&activeEffectScope.active&&activeEffectScope.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||batch(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);const e=activeSub,t=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=e,shouldTrack=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)removeSub(e);this.deps=this.depsTail=void 0,cleanupEffect(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}}let batchDepth=0,batchedSub,batchedComputed;function batch(e,t=!1){if(e.flags|=8,t)return e.next=batchedComputed,void(batchedComputed=e);e.next=batchedSub,batchedSub=e}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let e=batchedComputed;for(batchedComputed=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;batchedSub;){let n=batchedSub;for(batchedSub=void 0;n;){const r=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(t){e||(e=t)}n=r}}if(e)throw e}function prepareDeps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cleanupDeps(e){let t,n=e.depsTail,r=n;for(;r;){const e=r.prevDep;-1===r.version?(r===n&&(n=e),removeSub(r),removeDep(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function isDirty(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(refreshComputed(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function refreshComputed(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===globalVersion)return;if(e.globalVersion=globalVersion,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!isDirty(e)))return;e.flags|=2;const t=e.dep,n=activeSub,r=shouldTrack;activeSub=e,shouldTrack=!0;try{prepareDeps(e);const n=e.fn(e._value);(0===t.version||hasChanged(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(s){throw t.version++,s}finally{activeSub=n,shouldTrack=r,cleanupDeps(e),e.flags&=-3}}function removeSub(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)removeSub(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function removeDep(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const e=trackStack.pop();shouldTrack=void 0===e||e}function cleanupEffect(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=activeSub;activeSub=void 0;try{t()}finally{activeSub=e}}}let globalVersion=0;class Link{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==activeSub)t=this.activeLink=new Link(activeSub,this),activeSub.deps?(t.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=t,activeSub.depsTail=t):activeSub.deps=activeSub.depsTail=t,addSub(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=activeSub.depsTail,t.nextDep=void 0,activeSub.depsTail.nextDep=t,activeSub.depsTail=t,activeSub.deps===t&&(activeSub.deps=e)}return t}trigger(e){this.version++,globalVersion++,this.notify(e)}notify(e){startBatch();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{endBatch()}}}function addSub(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)addSub(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(e,t,n){if(shouldTrack&&activeSub){let t=targetMap.get(e);t||targetMap.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Dep),r.map=t,r.key=n),r.track()}}function trigger(e,t,n,r,s,o){const i=targetMap.get(e);if(!i)return void globalVersion++;const a=e=>{e&&e.trigger()};if(startBatch(),"clear"===t)i.forEach(a);else{const s=isArray$2(e),o=s&&isIntegerKey(n);if(s&&"length"===n){const e=Number(r);i.forEach((t,n)=>{("length"===n||n===ARRAY_ITERATE_KEY||!isSymbol$1(n)&&n>=e)&&a(t)})}else switch((void 0!==n||i.has(void 0))&&a(i.get(n)),o&&a(i.get(ARRAY_ITERATE_KEY)),t){case"add":s?o&&a(i.get("length")):(a(i.get(ITERATE_KEY)),isMap$1(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"delete":s||(a(i.get(ITERATE_KEY)),isMap$1(e)&&a(i.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap$1(e)&&a(i.get(ITERATE_KEY))}}endBatch()}function reactiveReadArray(e){const t=toRaw(e);return t===e?t:(track(t,"iterate",ARRAY_ITERATE_KEY),isShallow(e)?t:t.map(toReactive))}function shallowReadArray(e){return track(e=toRaw(e),"iterate",ARRAY_ITERATE_KEY),e}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator$1(this,Symbol.iterator,toReactive)},concat(...e){return reactiveReadArray(this).concat(...e.map(e=>isArray$2(e)?reactiveReadArray(e):e))},entries(){return iterator$1(this,"entries",e=>(e[1]=toReactive(e[1]),e))},every(e,t){return apply$1(this,"every",e,t,void 0,arguments)},filter(e,t){return apply$1(this,"filter",e,t,e=>e.map(toReactive),arguments)},find(e,t){return apply$1(this,"find",e,t,toReactive,arguments)},findIndex(e,t){return apply$1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return apply$1(this,"findLast",e,t,toReactive,arguments)},findLastIndex(e,t){return apply$1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return apply$1(this,"forEach",e,t,void 0,arguments)},includes(...e){return searchProxy(this,"includes",e)},indexOf(...e){return searchProxy(this,"indexOf",e)},join(e){return reactiveReadArray(this).join(e)},lastIndexOf(...e){return searchProxy(this,"lastIndexOf",e)},map(e,t){return apply$1(this,"map",e,t,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...e){return noTracking(this,"push",e)},reduce(e,...t){return reduce(this,"reduce",e,t)},reduceRight(e,...t){return reduce(this,"reduceRight",e,t)},shift(){return noTracking(this,"shift")},some(e,t){return apply$1(this,"some",e,t,void 0,arguments)},splice(...e){return noTracking(this,"splice",e)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(e){return reactiveReadArray(this).toSorted(e)},toSpliced(...e){return reactiveReadArray(this).toSpliced(...e)},unshift(...e){return noTracking(this,"unshift",e)},values(){return iterator$1(this,"values",toReactive)}};function iterator$1(e,t,n){const r=shallowReadArray(e),s=r[t]();return r===e||isShallow(e)||(s._next=s.next,s.next=()=>{const e=s._next();return e.value&&(e.value=n(e.value)),e}),s}const arrayProto$1=Array.prototype;function apply$1(e,t,n,r,s,o){const i=shallowReadArray(e),a=i!==e&&!isShallow(e),c=i[t];if(c!==arrayProto$1[t]){const t=c.apply(e,o);return a?toReactive(t):t}let l=n;i!==e&&(a?l=function(t,r){return n.call(this,toReactive(t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));const u=c.call(i,l,r);return a&&s?s(u):u}function reduce(e,t,n,r){const s=shallowReadArray(e);let o=n;return s!==e&&(isShallow(e)?n.length>3&&(o=function(t,r,s){return n.call(this,t,r,s,e)}):o=function(t,r,s){return n.call(this,t,toReactive(r),s,e)}),s[t](o,...r)}function searchProxy(e,t,n){const r=toRaw(e);track(r,"iterate",ARRAY_ITERATE_KEY);const s=r[t](...n);return-1!==s&&!1!==s||!isProxy(n[0])?s:(n[0]=toRaw(n[0]),r[t](...n))}function noTracking(e,t,n=[]){pauseTracking(),startBatch();const r=toRaw(e)[t].apply(e,n);return endBatch(),resetTracking(),r}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(isSymbol$1));function hasOwnProperty$c(e){isSymbol$1(e)||(e=String(e));const t=toRaw(this);return track(t,"has",e),t.hasOwnProperty(e)}class BaseReactiveHandler{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const r=this._isReadonly,s=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return s;if("__v_raw"===t)return n===(r?s?shallowReadonlyMap:readonlyMap:s?shallowReactiveMap:reactiveMap).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=isArray$2(e);if(!r){let e;if(o&&(e=arrayInstrumentations[t]))return e;if("hasOwnProperty"===t)return hasOwnProperty$c}const i=Reflect.get(e,t,isRef(e)?e:n);return(isSymbol$1(t)?builtInSymbols.has(t):isNonTrackableKeys(t))?i:(r||track(e,"get",t),s?i:isRef(i)?o&&isIntegerKey(t)?i:i.value:isObject$4(i)?r?readonly(i):reactive(i):i)}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,t,n,r){let s=e[t];if(!this._isShallow){const t=isReadonly(s);if(isShallow(n)||isReadonly(n)||(s=toRaw(s),n=toRaw(n)),!isArray$2(e)&&isRef(s)&&!isRef(n))return t||(s.value=n),!0}const o=isArray$2(e)&&isIntegerKey(t)?Number(t)<e.length:hasOwn(e,t),i=Reflect.set(e,t,n,isRef(e)?e:r);return e===toRaw(r)&&(o?hasChanged(n,s)&&trigger(e,"set",t,n):trigger(e,"add",t,n)),i}deleteProperty(e,t){const n=hasOwn(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&trigger(e,"delete",t,void 0),r}has(e,t){const n=Reflect.has(e,t);return isSymbol$1(t)&&builtInSymbols.has(t)||track(e,"has",t),n}ownKeys(e){return track(e,"iterate",isArray$2(e)?"length":ITERATE_KEY),Reflect.ownKeys(e)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),shallowReadonlyHandlers=new ReadonlyReactiveHandler(!0),toShallow=e=>e,getProto=e=>Reflect.getPrototypeOf(e);function createIterableMethod(e,t,n){return function(...r){const s=this.__v_raw,o=toRaw(s),i=isMap$1(o),a="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,l=s[e](...r),u=n?toShallow:t?toReadonly:toReactive;return!t&&track(o,"iterate",c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function createInstrumentations(e,t){const n={get(n){const r=this.__v_raw,s=toRaw(r),o=toRaw(n);e||(hasChanged(n,o)&&track(s,"get",n),track(s,"get",o));const{has:i}=getProto(s),a=t?toShallow:e?toReadonly:toReactive;return i.call(s,n)?a(r.get(n)):i.call(s,o)?a(r.get(o)):void(r!==s&&r.get(n))},get size(){const t=this.__v_raw;return!e&&track(toRaw(t),"iterate",ITERATE_KEY),t.size},has(t){const n=this.__v_raw,r=toRaw(n),s=toRaw(t);return e||(hasChanged(t,s)&&track(r,"has",t),track(r,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)},forEach(n,r){const s=this,o=s.__v_raw,i=toRaw(o),a=t?toShallow:e?toReadonly:toReactive;return!e&&track(i,"iterate",ITERATE_KEY),o.forEach((e,t)=>n.call(r,a(e),a(t),s))}};extend$1(n,e?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(e){t||isShallow(e)||isReadonly(e)||(e=toRaw(e));const n=toRaw(this);return getProto(n).has.call(n,e)||(n.add(e),trigger(n,"add",e,e)),this},set(e,n){t||isShallow(n)||isReadonly(n)||(n=toRaw(n));const r=toRaw(this),{has:s,get:o}=getProto(r);let i=s.call(r,e);i||(e=toRaw(e),i=s.call(r,e));const a=o.call(r,e);return r.set(e,n),i?hasChanged(n,a)&&trigger(r,"set",e,n):trigger(r,"add",e,n),this},delete(e){const t=toRaw(this),{has:n,get:r}=getProto(t);let s=n.call(t,e);s||(e=toRaw(e),s=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return s&&trigger(t,"delete",e,void 0),o},clear(){const e=toRaw(this),t=0!==e.size,n=e.clear();return t&&trigger(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=createIterableMethod(r,e,t)}),n}function createInstrumentationGetter(e,t){const n=createInstrumentations(e,t);return(t,r,s)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(hasOwn(n,r)&&r in t?n:t,r,s)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive(e){return isReadonly(e)?e:createReactiveObject(e,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(e){return createReactiveObject(e,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(e){return createReactiveObject(e,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(e){return createReactiveObject(e,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(e,t,n,r,s){if(!isObject$4(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=getTargetType(e);if(0===o)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,2===o?r:n);return s.set(e,a),a}function isReactive(e){return isReadonly(e)?isReactive(e.__v_raw):!(!e||!e.__v_isReactive)}function isReadonly(e){return!(!e||!e.__v_isReadonly)}function isShallow(e){return!(!e||!e.__v_isShallow)}function isProxy(e){return!!e&&!!e.__v_raw}function toRaw(e){const t=e&&e.__v_raw;return t?toRaw(t):e}function markRaw(e){return!hasOwn(e,"__v_skip")&&Object.isExtensible(e)&&def(e,"__v_skip",!0),e}const toReactive=e=>isObject$4(e)?reactive(e):e,toReadonly=e=>isObject$4(e)?readonly(e):e;function isRef(e){return!!e&&!0===e.__v_isRef}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}class RefImpl{constructor(e,t){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:toRaw(e),this._value=t?e:toReactive(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||isShallow(e)||isReadonly(e);e=n?e:toRaw(e),hasChanged(e,t)&&(this._rawValue=e,this._value=n?e:toReactive(e),this.dep.trigger())}}function unref(e){return isRef(e)?e.value:e}const shallowUnwrapHandlers={get:(e,t,n)=>"__v_raw"===t?e:unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return isRef(s)&&!isRef(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}class ComputedRefImpl{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&activeSub!==this)return batch(this,!0),!0}get value(){const e=this.dep.track();return refreshComputed(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function computed$1(e,t,n=!1){let r,s;isFunction$2(e)?r=e:(r=e.get,s=e.set);return new ComputedRefImpl(r,s,n)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(e,t=!1,n=activeWatcher){if(n){let t=cleanupMap.get(n);t||cleanupMap.set(n,t=[]),t.push(e)}}function watch$1(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:c}=n,l=e=>s?e:isShallow(e)||!1===s||0===s?traverse(e,1):traverse(e);let u,d,p,h,f=!1,g=!1;if(isRef(e)?(d=()=>e.value,f=isShallow(e)):isReactive(e)?(d=()=>l(e),f=!0):isArray$2(e)?(g=!0,f=e.some(e=>isReactive(e)||isShallow(e)),d=()=>e.map(e=>isRef(e)?e.value:isReactive(e)?l(e):isFunction$2(e)?c?c(e,2):e():void 0)):d=isFunction$2(e)?t?c?()=>c(e,2):e:()=>{if(p){pauseTracking();try{p()}finally{resetTracking()}}const t=activeWatcher;activeWatcher=u;try{return c?c(e,3,[h]):e(h)}finally{activeWatcher=t}}:NOOP,t&&s){const e=d,t=!0===s?1/0:s;d=()=>traverse(e(),t)}const m=getCurrentScope(),y=()=>{u.stop(),m&&m.active&&remove(m.effects,u)};if(o&&t){const e=t;t=(...t)=>{e(...t),y()}}let b=g?new Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const v=e=>{if(1&u.flags&&(u.dirty||e))if(t){const e=u.run();if(s||f||(g?e.some((e,t)=>hasChanged(e,b[t])):hasChanged(e,b))){p&&p();const n=activeWatcher;activeWatcher=u;try{const n=[e,b===INITIAL_WATCHER_VALUE?void 0:g&&b[0]===INITIAL_WATCHER_VALUE?[]:b,h];b=e,c?c(t,3,n):t(...n)}finally{activeWatcher=n}}}else u.run()};return a&&a(v),u=new ReactiveEffect(d),u.scheduler=i?()=>i(v,!1):v,h=e=>onWatcherCleanup(e,!1,u),p=u.onStop=()=>{const e=cleanupMap.get(u);if(e){if(c)c(e,4);else for(const t of e)t();cleanupMap.delete(u)}},t?r?v(!0):b=u.run():i?i(v.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function traverse(e,t=1/0,n){if(t<=0||!isObject$4(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,isRef(e))traverse(e.value,t,n);else if(isArray$2(e))for(let r=0;r<e.length;r++)traverse(e[r],t,n);else if(isSet$1(e)||isMap$1(e))e.forEach(e=>{traverse(e,t,n)});else if(isPlainObject$1(e)){for(const r in e)traverse(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&traverse(e[r],t,n)}return e}
|
|
/**
|
|
* @vue/runtime-core v3.5.21
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const stack=[];let isWarning=!1;function warn$1(e,...t){if(isWarning)return;isWarning=!0,pauseTracking();const n=stack.length?stack[stack.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=getComponentTrace();if(r)callWithErrorHandling(r,n,11,[e+t.map(e=>{var t,n;return null!=(n=null==(t=e.toString)?void 0:t.call(e))?n:JSON.stringify(e)}).join(""),n&&n.proxy,s.map(({vnode:e})=>`at <${formatComponentName(n,e.type)}>`).join("\n"),s]);else{const n=[`[Vue warn]: ${e}`,...t];s.length&&n.push("\n",...formatTrace(s)),console.warn(...n)}resetTracking(),isWarning=!1}function getComponentTrace(){let e=stack[stack.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function formatTrace(e){const t=[];return e.forEach((e,n)=>{t.push(...0===n?[]:["\n"],...formatTraceEntry(e))}),t}function formatTraceEntry({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=!!e.component&&null==e.component.parent,s=` at <${formatComponentName(e.component,e.type,r)}`,o=">"+n;return e.props?[s,...formatProps(e.props),o]:[s+o]}function formatProps(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(n=>{t.push(...formatProp(n,e[n]))}),n.length>3&&t.push(" ..."),t}function formatProp(e,t,n){return isString$1(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:isRef(t)?(t=formatProp(e,toRaw(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):isFunction$2(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=toRaw(t),n?t:[`${e}=`,t])}function callWithErrorHandling(e,t,n,r){try{return r?e(...r):e()}catch(s){handleError(s,t,n)}}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction$2(e)){const s=callWithErrorHandling(e,t,n,r);return s&&isPromise(s)&&s.catch(e=>{handleError(e,t,n)}),s}if(isArray$2(e)){const s=[];for(let o=0;o<e.length;o++)s.push(callWithAsyncErrorHandling(e[o],t,n,r));return s}}function handleError(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||EMPTY_OBJ;if(t){let r=t.parent;const s=t.proxy,i=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,s,i))return;r=r.parent}if(o)return pauseTracking(),callWithErrorHandling(o,null,10,[e,s,i]),void resetTracking()}logError(e,n,s,r,i)}function logError(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const queue=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(e){const t=currentFlushPromise||resolvedPromise;return e?t.then(this?e.bind(this):e):t}function findInsertionIndex(e){let t=flushIndex+1,n=queue.length;for(;t<n;){const r=t+n>>>1,s=queue[r],o=getId(s);o<e||o===e&&2&s.flags?t=r+1:n=r}return t}function queueJob(e){if(!(1&e.flags)){const t=getId(e),n=queue[queue.length-1];!n||!(2&e.flags)&&t>=getId(n)?queue.push(e):queue.splice(findInsertionIndex(t),0,e),e.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(e){isArray$2(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&-1===e.id?activePostFlushCbs.splice(postFlushIndex+1,0,e):1&e.flags||(pendingPostFlushCbs.push(e),e.flags|=1),queueFlush()}function flushPreFlushCbs(e,t,n=flushIndex+1){for(;n<queue.length;n++){const t=queue[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;queue.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function flushPostFlushCbs(e){if(pendingPostFlushCbs.length){const e=[...new Set(pendingPostFlushCbs)].sort((e,t)=>getId(e)-getId(t));if(pendingPostFlushCbs.length=0,activePostFlushCbs)return void activePostFlushCbs.push(...e);for(activePostFlushCbs=e,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const e=activePostFlushCbs[postFlushIndex];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=e=>null==e.id?2&e.flags?-1:1/0:e.id;function flushJobs(e){try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const e=queue[flushIndex];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),callWithErrorHandling(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){const e=queue[flushIndex];e&&(e.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){const t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function withCtx(e,t=currentRenderingInstance,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&setBlockTracking(-1);const s=setCurrentRenderingInstance(t);let o;try{o=e(...n)}finally{setCurrentRenderingInstance(s),r._d&&setBlockTracking(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function withDirectives(e,t){if(null===currentRenderingInstance)return e;const n=getComponentPublicInstance(currentRenderingInstance),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,o,i,a=EMPTY_OBJ]=t[s];e&&(isFunction$2(e)&&(e={mounted:e,updated:e}),e.deep&&traverse(o),r.push({dir:e,instance:n,value:o,oldValue:void 0,arg:i,modifiers:a}))}return e}function invokeDirectiveHook(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let c=a.dir[r];c&&(pauseTracking(),callWithAsyncErrorHandling(c,n,8,[e.el,a,e,t]),resetTracking())}}const TeleportEndKey=Symbol("_vte"),isTeleport=e=>e.__isTeleport,leaveCbKey=Symbol("_leaveCb");function setTransitionHooks(e,t){6&e.shapeFlag&&e.component?(e.transition=t,setTransitionHooks(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function defineComponent(e,t){return isFunction$2(e)?(()=>extend$1({name:e.name},t,{setup:e}))():e}function markAsyncBoundary(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const pendingSetRefMap=new WeakMap;function setRef(e,t,n,r,s=!1){if(isArray$2(e))return void e.forEach((e,o)=>setRef(e,t&&(isArray$2(t)?t[o]:t),n,r,s));if(isAsyncWrapper(r)&&!s)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&setRef(e,t,n,r.component.subTree));const o=4&r.shapeFlag?getComponentPublicInstance(r.component):r.el,i=s?null:o,{i:a,r:c}=e,l=t&&t.r,u=a.refs===EMPTY_OBJ?a.refs={}:a.refs,d=a.setupState,p=toRaw(d),h=d===EMPTY_OBJ?NO:e=>hasOwn(p,e);if(null!=l&&l!==c)if(invalidatePendingSetRef(t),isString$1(l))u[l]=null,h(l)&&(d[l]=null);else if(isRef(l)){l.value=null;const e=t;e.k&&(u[e.k]=null)}if(isFunction$2(c))callWithErrorHandling(c,a,12,[i,u]);else{const t=isString$1(c),r=isRef(c);if(t||r){const a=()=>{if(e.f){const n=t?h(c)?d[c]:u[c]:c.value;if(s)isArray$2(n)&&remove(n,o);else if(isArray$2(n))n.includes(o)||n.push(o);else if(t)u[c]=[o],h(c)&&(d[c]=u[c]);else{const t=[o];c.value=t,e.k&&(u[e.k]=t)}}else t?(u[c]=i,h(c)&&(d[c]=i)):r&&(c.value=i,e.k&&(u[e.k]=i))};if(i){const t=()=>{a(),pendingSetRefMap.delete(e)};t.id=-1,pendingSetRefMap.set(e,t),queuePostRenderEffect(t,n)}else invalidatePendingSetRef(e),a()}}}function invalidatePendingSetRef(e){const t=pendingSetRefMap.get(e);t&&(t.flags|=8,pendingSetRefMap.delete(e))}const isComment=e=>8===e.nodeType;function forEachElement(e,t){if(isComment(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(isComment(r))if("]"===r.data){if(0===--n)break}else"["===r.data&&n++;r=r.nextSibling}}else t(e)}getGlobalThis().requestIdleCallback,getGlobalThis().cancelIdleCallback;const isAsyncWrapper=e=>!!e.type.__asyncLoader;function defineAsyncComponent(e){isFunction$2(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,hydrate:o,timeout:i,suspensible:a=!0,onError:c}=e;let l,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch(e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t((d++,u=null,p())),()=>n(e),d+1)});throw e}).then(t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||(t.bu=[])).push(()=>r=!0);const s=()=>{r||n()},i=o?()=>{const n=o(s,t=>forEachElement(e,t));n&&(t.bum||(t.bum=[])).push(n)}:s;l?i():p().then(()=>!t.isUnmounted&&i())},get __asyncResolved(){return l},setup(){const e=currentInstance;if(markAsyncBoundary(e),l)return()=>createInnerComp(l,e);const t=t=>{u=null,handleError(t,e,13,!r)};if(a&&e.suspense||isInSSRComponentSetup)return p().then(t=>()=>createInnerComp(t,e)).catch(e=>(t(e),()=>r?createVNode(r,{error:e}):null));const o=ref(!1),c=ref(),d=ref(!!s);return s&&setTimeout(()=>{d.value=!1},s),null!=i&&setTimeout(()=>{if(!o.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}},i),p().then(()=>{o.value=!0,e.parent&&isKeepAlive(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>o.value&&l?createInnerComp(l,e):c.value&&r?createVNode(r,{error:c.value}):n&&!d.value?createVNode(n):void 0}})}function createInnerComp(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,i=createVNode(e,r,s);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const isKeepAlive=e=>e.type.__isKeepAlive;function onActivated(e,t){registerKeepAliveHook(e,"a",t)}function onDeactivated(e,t){registerKeepAliveHook(e,"da",t)}function registerKeepAliveHook(e,t,n=currentInstance){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(injectHook(t,r,n),n){let e=n.parent;for(;e&&e.parent;)isKeepAlive(e.parent.vnode)&&injectToKeepAliveRoot(r,t,n,e),e=e.parent}}function injectToKeepAliveRoot(e,t,n,r){const s=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],s)},n)}function injectHook(e,t,n=currentInstance,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{pauseTracking();const s=setCurrentInstance(n),o=callWithAsyncErrorHandling(t,n,e,r);return s(),resetTracking(),o});return r?s.unshift(o):s.push(o),o}}const createHook=e=>(t,n=currentInstance)=>{isInSSRComponentSetup&&"sp"!==e||injectHook(e,(...e)=>t(...e),n)},onBeforeMount=createHook("bm"),onMounted=exports("H",createHook("m")),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=exports("m",createHook("bum")),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(e,t=currentInstance){injectHook("ec",e,t)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(e,t){return resolveAsset(COMPONENTS,e,!0,t)||e}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(e){return isString$1(e)?resolveAsset(COMPONENTS,e,!1)||e:e||NULL_DYNAMIC_COMPONENT}function resolveDirective(e){return resolveAsset(DIRECTIVES,e)}function resolveAsset(e,t,n=!0,r=!1){const s=currentRenderingInstance||currentInstance;if(s){const n=s.type;if(e===COMPONENTS){const e=getComponentName(n,!1);if(e&&(e===t||e===camelize(t)||e===capitalize(camelize(t))))return n}const o=resolve(s[e]||n[e],t)||resolve(s.appContext[e],t);return!o&&r?n:o}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,n,r){let s;const o=n,i=isArray$2(e);if(i||isString$1(e)){let n=!1,r=!1;i&&isReactive(e)&&(n=!isShallow(e),r=isReadonly(e),e=shallowReadArray(e)),s=new Array(e.length);for(let i=0,a=e.length;i<a;i++)s[i]=t(n?r?toReadonly(toReactive(e[i])):toReactive(e[i]):e[i],i,void 0,o)}else if("number"==typeof e){s=new Array(e);for(let n=0;n<e;n++)s[n]=t(n+1,n,void 0,o)}else if(isObject$4(e))if(e[Symbol.iterator])s=Array.from(e,(e,n)=>t(e,n,void 0,o));else{const n=Object.keys(e);s=new Array(n.length);for(let r=0,i=n.length;r<i;r++){const i=n[r];s[r]=t(e[i],i,r,o)}}else s=[];return s}function renderSlot(e,t,n={},r,s){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.ce)return openBlock(),createBlock(Fragment,null,[createVNode("slot",n,r&&r())],64);let o=e[t];o&&o._c&&(o._d=!1),openBlock();const i=o&&ensureValidVNode(o(n)),a=n.key||i&&i.key,c=createBlock(Fragment,{key:(a&&!isSymbol$1(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||(r?r():[]),i&&1===e._?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function ensureValidVNode(e){return e.some(e=>!isVNode(e)||e.type!==Comment&&!(e.type===Fragment&&!ensureValidVNode(e.children)))?e:null}const getPublicInstance=e=>e?isStatefulComponent(e)?getComponentPublicInstance(e):getPublicInstance(e.parent):null,publicPropertiesMap=extend$1(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>getPublicInstance(e.parent),$root:e=>getPublicInstance(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>resolveMergedOptions(e),$forceUpdate:e=>e.f||(e.f=()=>{queueJob(e.update)}),$nextTick:e=>e.n||(e.n=nextTick.bind(e.proxy)),$watch:e=>instanceWatch.bind(e)}),hasSetupBinding=(e,t)=>e!==EMPTY_OBJ&&!e.__isScriptSetup&&hasOwn(e,t),PublicInstanceProxyHandlers={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:c}=e;let l;if("$"!==t[0]){const a=i[t];if(void 0!==a)switch(a){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(hasSetupBinding(r,t))return i[t]=1,r[t];if(s!==EMPTY_OBJ&&hasOwn(s,t))return i[t]=2,s[t];if((l=e.propsOptions[0])&&hasOwn(l,t))return i[t]=3,o[t];if(n!==EMPTY_OBJ&&hasOwn(n,t))return i[t]=4,n[t];shouldCacheAccess&&(i[t]=0)}}const u=publicPropertiesMap[t];let d,p;return u?("$attrs"===t&&track(e.attrs,"get",""),u(e)):(d=a.__cssModules)&&(d=d[t])?d:n!==EMPTY_OBJ&&hasOwn(n,t)?(i[t]=4,n[t]):(p=c.config.globalProperties,hasOwn(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return hasSetupBinding(s,t)?(s[t]=n,!0):r!==EMPTY_OBJ&&hasOwn(r,t)?(r[t]=n,!0):!hasOwn(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(o[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o,type:i}},a){let c,l;return!!(n[a]||e!==EMPTY_OBJ&&"$"!==a[0]&&hasOwn(e,a)||hasSetupBinding(t,a)||(c=o[0])&&hasOwn(c,a)||hasOwn(r,a)||hasOwn(publicPropertiesMap,a)||hasOwn(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:hasOwn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function normalizePropsOrEmits(e){return isArray$2(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let shouldCacheAccess=!0;function applyOptions(e){const t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:h,updated:f,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:v,unmounted:S,render:E,renderTracked:T,renderTriggered:_,errorCaptured:A,serverPrefetch:O,expose:$,inheritAttrs:w,components:C,directives:R,filters:x}=t;if(l&&resolveInjections(l,r,null),i)for(const k in i){const e=i[k];isFunction$2(e)&&(r[k]=e.bind(n))}if(s){const t=s.call(n,n);isObject$4(t)&&(e.data=reactive(t))}if(shouldCacheAccess=!0,o)for(const k in o){const e=o[k],t=isFunction$2(e)?e.bind(n,n):isFunction$2(e.get)?e.get.bind(n,n):NOOP,s=!isFunction$2(e)&&isFunction$2(e.set)?e.set.bind(n):NOOP,i=computed({get:t,set:s});Object.defineProperty(r,k,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(a)for(const k in a)createWatcher(a[k],r,n,k);if(c){const e=isFunction$2(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{provide(t,e[t])})}function P(e,t){isArray$2(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&callHook(u,e,"c"),P(onBeforeMount,d),P(onMounted,p),P(onBeforeUpdate,h),P(onUpdated,f),P(onActivated,g),P(onDeactivated,m),P(onErrorCaptured,A),P(onRenderTracked,T),P(onRenderTriggered,_),P(onBeforeUnmount,b),P(onUnmounted,S),P(onServerPrefetch,O),isArray$2($))if($.length){const t=e.exposed||(e.exposed={});$.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===NOOP&&(e.render=E),null!=w&&(e.inheritAttrs=w),C&&(e.components=C),R&&(e.directives=R),O&&markAsyncBoundary(e)}function resolveInjections(e,t,n=NOOP){isArray$2(e)&&(e=normalizeInject(e));for(const r in e){const n=e[r];let s;s=isObject$4(n)?"default"in n?inject(n.from||r,n.default,!0):inject(n.from||r):inject(n),isRef(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}function callHook(e,t,n){callWithAsyncErrorHandling(isArray$2(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){let s=r.includes(".")?createPathGetter(n,r):()=>n[r];if(isString$1(e)){const n=t[e];isFunction$2(n)&&watch(s,n)}else if(isFunction$2(e))watch(s,e.bind(n));else if(isObject$4(e))if(isArray$2(e))e.forEach(e=>createWatcher(e,t,n,r));else{const r=isFunction$2(e.handler)?e.handler.bind(n):t[e.handler];isFunction$2(r)&&watch(s,r,e)}}function resolveMergedOptions(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let c;return a?c=a:s.length||n||r?(c={},s.length&&s.forEach(e=>mergeOptions(c,e,i,!0)),mergeOptions(c,t,i)):c=t,isObject$4(t)&&o.set(t,c),c}function mergeOptions(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&mergeOptions(e,o,n,!0),s&&s.forEach(t=>mergeOptions(e,t,n,!0));for(const i in t)if(r&&"expose"===i);else{const r=internalOptionMergeStrats[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(e,t){return t?e?function(){return extend$1(isFunction$2(e)?e.call(this,this):e,isFunction$2(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$2(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mergeAsArray(e,t){return e?[...new Set([].concat(e,t))]:t}function mergeObjectOptions(e,t){return e?extend$1(Object.create(null),e,t):t}function mergeEmitsOrPropsOptions(e,t){return e?isArray$2(e)&&isArray$2(t)?[...new Set([...e,...t])]:extend$1(Object.create(null),normalizePropsOrEmits(e),normalizePropsOrEmits(null!=t?t:{})):t}function mergeWatchOptions(e,t){if(!e)return t;if(!t)return e;const n=extend$1(Object.create(null),e);for(const r in t)n[r]=mergeAsArray(e[r],t[r]);return n}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(e,t){return function(t,n=null){isFunction$2(t)||(t=extend$1({},t)),null==n||isObject$4(n)||(n=null);const r=createAppContext(),s=new WeakSet,o=[];let i=!1;const a=r.app={_uid:uid$1++,_component:t,_props:n,_container:null,_context:r,_instance:null,version:version,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&isFunction$2(e.install)?(s.add(e),e.install(a,...t)):isFunction$2(e)&&(s.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(s,o,c){if(!i){const o=a._ceVNode||createVNode(t,n);return o.appContext=r,!0===c?c="svg":!1===c&&(c=void 0),e(o,s,c),i=!0,a._container=s,s.__vue_app__=a,getComponentPublicInstance(o.component)}},onUnmount(e){o.push(e)},unmount(){i&&(callWithAsyncErrorHandling(o,a._instance,16),e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,a),runWithContext(e){const t=currentApp;currentApp=a;try{return e()}finally{currentApp=t}}};return a}}let currentApp=null;function provide(e,t){if(currentInstance){let n=currentInstance.provides;const r=currentInstance.parent&¤tInstance.parent.provides;r===n&&(n=currentInstance.provides=Object.create(r)),n[e]=t}else;}function inject(e,t,n=!1){const r=getCurrentInstance();if(r||currentApp){let s=currentApp?currentApp._context.provides:r?null==r.parent||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&isFunction$2(t)?t.call(r&&r.proxy):t}}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,n,r=!1){const s={},o=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:shallowReactive(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function updateProps(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=toRaw(s),[c]=e.propsOptions;let l=!1;if(!(r||i>0)||16&i){let r;setFullProps(e,t,s,o)&&(l=!0);for(const o in a)t&&(hasOwn(t,o)||(r=hyphenate(o))!==o&&hasOwn(t,r))||(c?!n||void 0===n[o]&&void 0===n[r]||(s[o]=resolvePropValue(c,a,o,void 0,e,!0)):delete s[o]);if(o!==a)for(const e in o)t&&hasOwn(t,e)||(delete o[e],l=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let i=n[r];if(isEmitListener(e.emitsOptions,i))continue;const u=t[i];if(c)if(hasOwn(o,i))u!==o[i]&&(o[i]=u,l=!0);else{const t=camelize(i);s[t]=resolvePropValue(c,a,t,u,e,!1)}else u!==o[i]&&(o[i]=u,l=!0)}}l&&trigger(e.attrs,"set","")}function setFullProps(e,t,n,r){const[s,o]=e.propsOptions;let i,a=!1;if(t)for(let c in t){if(isReservedProp(c))continue;const l=t[c];let u;s&&hasOwn(s,u=camelize(c))?o&&o.includes(u)?(i||(i={}))[u]=l:n[u]=l:isEmitListener(e.emitsOptions,c)||c in r&&l===r[c]||(r[c]=l,a=!0)}if(o){const t=toRaw(n),r=i||EMPTY_OBJ;for(let i=0;i<o.length;i++){const a=o[i];n[a]=resolvePropValue(s,t,a,r[a],e,!hasOwn(r,a))}}return a}function resolvePropValue(e,t,n,r,s,o){const i=e[n];if(null!=i){const e=hasOwn(i,"default");if(e&&void 0===r){const e=i.default;if(i.type!==Function&&!i.skipFactory&&isFunction$2(e)){const{propsDefaults:o}=s;if(n in o)r=o[n];else{const i=setCurrentInstance(s);r=o[n]=e.call(null,t),i()}}else r=e;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!e?r=!1:!i[1]||""!==r&&r!==hyphenate(n)||(r=!0))}return r}const mixinPropsCache=new WeakMap;function normalizePropsOptions(e,t,n=!1){const r=n?mixinPropsCache:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let c=!1;if(!isFunction$2(e)){const r=e=>{c=!0;const[n,r]=normalizePropsOptions(e,t,!0);extend$1(i,n),r&&a.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!o&&!c)return isObject$4(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$2(o))for(let u=0;u<o.length;u++){const e=camelize(o[u]);validatePropName(e)&&(i[e]=EMPTY_OBJ)}else if(o)for(const u in o){const e=camelize(u);if(validatePropName(e)){const t=o[u],n=i[e]=isArray$2(t)||isFunction$2(t)?{type:t}:extend$1({},t),r=n.type;let s=!1,c=!0;if(isArray$2(r))for(let e=0;e<r.length;++e){const t=r[e],n=isFunction$2(t)&&t.name;if("Boolean"===n){s=!0;break}"String"===n&&(c=!1)}else s=isFunction$2(r)&&"Boolean"===r.name;n[0]=s,n[1]=c,(s||hasOwn(n,"default"))&&a.push(e)}}const l=[i,a];return isObject$4(e)&&r.set(e,l),l}function validatePropName(e){return"$"!==e[0]&&!isReservedProp(e)}const isInternalKey=e=>"_"===e||"_ctx"===e||"$stable"===e,normalizeSlotValue=e=>isArray$2(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,n)=>{if(t._n)return t;const r=withCtx((...e)=>normalizeSlotValue(t(...e)),n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{const r=e._ctx;for(const s in e){if(isInternalKey(s))continue;const n=e[s];if(isFunction$2(n))t[s]=normalizeSlot(s,n,r);else if(null!=n){const e=normalizeSlotValue(n);t[s]=()=>e}}},normalizeVNodeSlots=(e,t)=>{const n=normalizeSlotValue(t);e.slots.default=()=>n},assignSlots=(e,t,n)=>{for(const r in t)!n&&isInternalKey(r)||(e[r]=t[r])},initSlots=(e,t,n)=>{const r=e.slots=createInternalObject();if(32&e.vnode.shapeFlag){const e=t._;e?(assignSlots(r,t,n),n&&def(r,"_",e,!0)):normalizeObjectSlots(t,r)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=EMPTY_OBJ;if(32&r.shapeFlag){const e=t._;e?n&&1===e?o=!1:assignSlots(s,t,n):(o=!t.$stable,normalizeObjectSlots(t,s)),i=t}else t&&(normalizeVNodeSlots(e,t),i={default:1});if(o)for(const a in s)isInternalKey(a)||null!=i[a]||delete s[a]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){getGlobalThis().__VUE__=!0;const{insert:n,remove:r,patchProp:s,createElement:o,createText:i,createComment:a,setText:c,setElementText:l,parentNode:u,nextSibling:d,setScopeId:p=NOOP,insertStaticContent:h}=e,f=(e,t,n,r=null,s=null,o=null,i=void 0,a=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!isSameVNodeType(e,t)&&(r=B(e),j(e,s,o,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:l,ref:u,shapeFlag:d}=t;switch(l){case Text:g(e,t,n,r);break;case Comment:m(e,t,n,r);break;case Static:null==e&&y(t,n,r,i);break;case Fragment:O(e,t,n,r,s,o,i,a,c);break;default:1&d?b(e,t,n,r,s,o,i,a,c):6&d?$(e,t,n,r,s,o,i,a,c):(64&d||128&d)&&l.process(e,t,n,r,s,o,i,a,c,V)}null!=u&&s?setRef(u,e&&e.ref,o,t||e,!t):null==u&&e&&null!=e.ref&&setRef(e.ref,null,o,e,!0)},g=(e,t,r,s)=>{if(null==e)n(t.el=i(t.children),r,s);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},m=(e,t,r,s)=>{null==e?n(t.el=a(t.children||""),r,s):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=h(e.children,t,n,r,e.el,e.anchor)},b=(e,t,n,r,s,o,i,a,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?v(t,n,r,s,o,i,a,c):T(e,t,s,o,i,a,c)},v=(e,t,r,i,a,c,u,d)=>{let p,h;const{props:f,shapeFlag:g,transition:m,dirs:y}=e;if(p=e.el=o(e.type,c,f&&f.is,f),8&g?l(p,e.children):16&g&&E(e.children,p,null,i,a,resolveChildrenNamespace(e,c),u,d),y&&invokeDirectiveHook(e,null,i,"created"),S(p,e,e.scopeId,u,i),f){for(const e in f)"value"===e||isReservedProp(e)||s(p,e,null,f[e],c,i);"value"in f&&s(p,"value",null,f.value,c),(h=f.onVnodeBeforeMount)&&invokeVNodeHook(h,i,e)}y&&invokeDirectiveHook(e,null,i,"beforeMount");const b=needTransition(a,m);b&&m.beforeEnter(p),n(p,t,r),((h=f&&f.onVnodeMounted)||b||y)&&queuePostRenderEffect(()=>{h&&invokeVNodeHook(h,i,e),b&&m.enter(p),y&&invokeDirectiveHook(e,null,i,"mounted")},a)},S=(e,t,n,r,s)=>{if(n&&p(e,n),r)for(let o=0;o<r.length;o++)p(e,r[o]);if(s){let n=s.subTree;if(t===n||isSuspense(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=s.vnode;S(e,t,t.scopeId,t.slotScopeIds,s.parent)}}},E=(e,t,n,r,s,o,i,a,c=0)=>{for(let l=c;l<e.length;l++){const c=e[l]=a?cloneIfMounted(e[l]):normalizeVNode(e[l]);f(null,c,t,n,r,s,o,i,a)}},T=(e,t,n,r,o,i,a)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||EMPTY_OBJ,f=t.props||EMPTY_OBJ;let g;if(n&&toggleRecurse(n,!1),(g=f.onVnodeBeforeUpdate)&&invokeVNodeHook(g,n,t,e),p&&invokeDirectiveHook(t,e,n,"beforeUpdate"),n&&toggleRecurse(n,!0),(h.innerHTML&&null==f.innerHTML||h.textContent&&null==f.textContent)&&l(c,""),d?_(e.dynamicChildren,d,c,n,r,resolveChildrenNamespace(t,o),i):a||P(e,t,c,null,n,r,resolveChildrenNamespace(t,o),i,!1),u>0){if(16&u)A(c,h,f,n,o);else if(2&u&&h.class!==f.class&&s(c,"class",null,f.class,o),4&u&&s(c,"style",h.style,f.style,o),8&u){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const r=e[t],i=h[r],a=f[r];a===i&&"value"!==r||s(c,r,i,a,o,n)}}1&u&&e.children!==t.children&&l(c,t.children)}else a||null!=d||A(c,h,f,n,o);((g=f.onVnodeUpdated)||p)&&queuePostRenderEffect(()=>{g&&invokeVNodeHook(g,n,t,e),p&&invokeDirectiveHook(t,e,n,"updated")},r)},_=(e,t,n,r,s,o,i)=>{for(let a=0;a<t.length;a++){const c=e[a],l=t[a],d=c.el&&(c.type===Fragment||!isSameVNodeType(c,l)||198&c.shapeFlag)?u(c.el):n;f(c,l,d,null,r,s,o,i,!0)}},A=(e,t,n,r,o)=>{if(t!==n){if(t!==EMPTY_OBJ)for(const i in t)isReservedProp(i)||i in n||s(e,i,t[i],null,o,r);for(const i in n){if(isReservedProp(i))continue;const a=n[i],c=t[i];a!==c&&"value"!==i&&s(e,i,c,a,o,r)}"value"in n&&s(e,"value",t.value,n.value,o)}},O=(e,t,r,s,o,a,c,l,u)=>{const d=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(l=l?l.concat(g):g),null==e?(n(d,r,s),n(p,r,s),E(t.children||[],r,p,o,a,c,l,u)):h>0&&64&h&&f&&e.dynamicChildren?(_(e.dynamicChildren,f,r,o,a,c,l),(null!=t.key||o&&t===o.subTree)&&traverseStaticChildren(e,t,!0)):P(e,t,r,p,o,a,c,l,u)},$=(e,t,n,r,s,o,i,a,c)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?s.ctx.activate(t,n,r,i,c):w(t,n,r,s,o,i,c):C(e,t,c)},w=(e,t,n,r,s,o,i)=>{const a=e.component=createComponentInstance(e,r,s);if(isKeepAlive(e)&&(a.ctx.renderer=V),setupComponent(a,!1,i),a.asyncDep){if(s&&s.registerDep(a,R,i),!e.el){const r=a.subTree=createVNode(Comment);m(null,r,t,n),e.placeholder=r.el}}else R(a,e,t,n,s,o,i)},C=(e,t,n)=>{const r=t.component=e.component;if(shouldUpdateComponent(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void x(r,t,n);r.next=t,r.update()}else t.el=e.el,r.vnode=t},R=(e,t,n,r,s,o,i)=>{const a=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{const n=locateNonHydratedAsyncRoot(e);if(n)return t&&(t.el=l.el,x(e,t,i)),void n.asyncDep.then(()=>{e.isUnmounted||a()})}let d,p=t;toggleRecurse(e,!1),t?(t.el=l.el,x(e,t,i)):t=l,n&&invokeArrayFns(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&invokeVNodeHook(d,c,t,l),toggleRecurse(e,!0);const h=renderComponentRoot(e),g=e.subTree;e.subTree=h,f(g,h,u(g.el),B(g),e,s,o),t.el=h.el,null===p&&updateHOCHostEl(e,h.el),r&&queuePostRenderEffect(r,s),(d=t.props&&t.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(d,c,t,l),s)}else{let i;const{el:a,props:c}=t,{bm:l,m:u,parent:d,root:p,type:h}=e,g=isAsyncWrapper(t);toggleRecurse(e,!1),l&&invokeArrayFns(l),!g&&(i=c&&c.onVnodeBeforeMount)&&invokeVNodeHook(i,d,t),toggleRecurse(e,!0);{p.ce&&!1!==p.ce._def.shadowRoot&&p.ce._injectChildStyle(h);const i=e.subTree=renderComponentRoot(e);f(null,i,n,r,e,s,o),t.el=i.el}if(u&&queuePostRenderEffect(u,s),!g&&(i=c&&c.onVnodeMounted)){const e=t;queuePostRenderEffect(()=>invokeVNodeHook(i,d,e),s)}(256&t.shapeFlag||d&&isAsyncWrapper(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&queuePostRenderEffect(e.a,s),e.isMounted=!0,t=n=r=null}};e.scope.on();const c=e.effect=new ReactiveEffect(a);e.scope.off();const l=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>queueJob(d),toggleRecurse(e,!0),l()},x=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,updateProps(e,t.props,r,n),updateSlots(e,t.children,n),pauseTracking(),flushPreFlushCbs(e),resetTracking()},P=(e,t,n,r,s,o,i,a,c=!1)=>{const u=e&&e.children,d=e?e.shapeFlag:0,p=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void I(u,p,n,r,s,o,i,a,c);if(256&h)return void k(u,p,n,r,s,o,i,a,c)}8&f?(16&d&&L(u,s,o),p!==u&&l(n,p)):16&d?16&f?I(u,p,n,r,s,o,i,a,c):L(u,s,o,!0):(8&d&&l(n,""),16&f&&E(p,n,r,s,o,i,a,c))},k=(e,t,n,r,s,o,i,a,c)=>{t=t||EMPTY_ARR;const l=(e=e||EMPTY_ARR).length,u=t.length,d=Math.min(l,u);let p;for(p=0;p<d;p++){const r=t[p]=c?cloneIfMounted(t[p]):normalizeVNode(t[p]);f(e[p],r,n,null,s,o,i,a,c)}l>u?L(e,s,o,!0,!1,d):E(t,n,r,s,o,i,a,c,d)},I=(e,t,n,r,s,o,i,a,c)=>{let l=0;const u=t.length;let d=e.length-1,p=u-1;for(;l<=d&&l<=p;){const r=e[l],u=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);if(!isSameVNodeType(r,u))break;f(r,u,n,null,s,o,i,a,c),l++}for(;l<=d&&l<=p;){const r=e[d],l=t[p]=c?cloneIfMounted(t[p]):normalizeVNode(t[p]);if(!isSameVNodeType(r,l))break;f(r,l,n,null,s,o,i,a,c),d--,p--}if(l>d){if(l<=p){const e=p+1,d=e<u?t[e].el:r;for(;l<=p;)f(null,t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]),n,d,s,o,i,a,c),l++}}else if(l>p)for(;l<=d;)j(e[l],s,o,!0),l++;else{const h=l,g=l,m=new Map;for(l=g;l<=p;l++){const e=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);null!=e.key&&m.set(e.key,l)}let y,b=0;const v=p-g+1;let S=!1,E=0;const T=new Array(v);for(l=0;l<v;l++)T[l]=0;for(l=h;l<=d;l++){const r=e[l];if(b>=v){j(r,s,o,!0);continue}let u;if(null!=r.key)u=m.get(r.key);else for(y=g;y<=p;y++)if(0===T[y-g]&&isSameVNodeType(r,t[y])){u=y;break}void 0===u?j(r,s,o,!0):(T[u-g]=l+1,u>=E?E=u:S=!0,f(r,t[u],n,null,s,o,i,a,c),b++)}const _=S?getSequence(T):EMPTY_ARR;for(y=_.length-1,l=v-1;l>=0;l--){const e=g+l,d=t[e],p=t[e+1],h=e+1<u?p.el||p.placeholder:r;0===T[l]?f(null,d,n,h,s,o,i,a,c):S&&(y<0||l!==_[y]?D(d,n,h,2):y--)}}},D=(e,t,s,o,i=null)=>{const{el:a,type:c,transition:l,children:u,shapeFlag:p}=e;if(6&p)return void D(e.component.subTree,t,s,o);if(128&p)return void e.suspense.move(t,s,o);if(64&p)return void c.move(e,t,s,V);if(c===Fragment){n(a,t,s);for(let e=0;e<u.length;e++)D(u[e],t,s,o);return void n(e.anchor,t,s)}if(c===Static)return void(({el:e,anchor:t},r,s)=>{let o;for(;e&&e!==t;)o=d(e),n(e,r,s),e=o;n(t,r,s)})(e,t,s);if(2!==o&&1&p&&l)if(0===o)l.beforeEnter(a),n(a,t,s),queuePostRenderEffect(()=>l.enter(a),i);else{const{leave:o,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?r(a):n(a,t,s)},d=()=>{a._isLeaving&&a[leaveCbKey](!0),o(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else n(a,t,s)},j=(e,t,n,r=!1,s=!1)=>{const{type:o,props:i,ref:a,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:h}=e;if(-2===d&&(s=!1),null!=a&&(pauseTracking(),setRef(a,null,n,e,!0),resetTracking()),null!=h&&(t.renderCache[h]=void 0),256&u)return void t.ctx.deactivate(e);const f=1&u&&p,g=!isAsyncWrapper(e);let m;if(g&&(m=i&&i.onVnodeBeforeUnmount)&&invokeVNodeHook(m,t,e),6&u)F(e.component,n,r);else{if(128&u)return void e.suspense.unmount(n,r);f&&invokeDirectiveHook(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,V,r):l&&!l.hasOnce&&(o!==Fragment||d>0&&64&d)?L(l,t,n,!1,!0):(o===Fragment&&384&d||!s&&16&u)&&L(c,t,n),r&&N(e)}(g&&(m=i&&i.onVnodeUnmounted)||f)&&queuePostRenderEffect(()=>{m&&invokeVNodeHook(m,t,e),f&&invokeDirectiveHook(e,null,t,"unmounted")},n)},N=e=>{const{type:t,el:n,anchor:s,transition:o}=e;if(t===Fragment)return void M(n,s);if(t===Static)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=d(e),r(e),e=n;r(t)})(e);const i=()=>{r(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:r}=o,s=()=>t(n,i);r?r(e.el,i,s):s()}else i()},M=(e,t)=>{let n;for(;e!==t;)n=d(e),r(e),e=n;r(t)},F=(e,t,n)=>{const{bum:r,scope:s,job:o,subTree:i,um:a,m:c,a:l}=e;invalidateMount(c),invalidateMount(l),r&&invokeArrayFns(r),s.stop(),o&&(o.flags|=8,j(i,e,t,n)),a&&queuePostRenderEffect(a,t),queuePostRenderEffect(()=>{e.isUnmounted=!0},t)},L=(e,t,n,r=!1,s=!1,o=0)=>{for(let i=o;i<e.length;i++)j(e[i],t,n,r,s)},B=e=>{if(6&e.shapeFlag)return B(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=d(e.anchor||e.el),n=t&&t[TeleportEndKey];return n?d(n):t};let H=!1;const U=(e,t,n)=>{null==e?t._vnode&&j(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),t._vnode=e,H||(H=!0,flushPreFlushCbs(),flushPostFlushCbs(),H=!1)},V={p:f,um:j,m:D,r:N,mt:w,mc:E,pc:P,pbc:_,n:B,o:e};return{render:U,hydrate:undefined,createApp:createAppAPI(U)}}function resolveChildrenNamespace({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function toggleRecurse({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function needTransition(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function traverseStaticChildren(e,t,n=!1){const r=e.children,s=t.children;if(isArray$2(r)&&isArray$2(s))for(let o=0;o<r.length;o++){const e=r[o];let t=s[o];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=s[o]=cloneIfMounted(s[o]),t.el=e.el),n||-2===t.patchFlag||traverseStaticChildren(e,t)),t.type===Text&&-1!==t.patchFlag&&(t.el=e.el),t.type!==Comment||t.el||(t.el=e.el)}}function getSequence(e){const t=e.slice(),n=[0];let r,s,o,i,a;const c=e.length;for(r=0;r<c;r++){const c=e[r];if(0!==c){if(s=n[n.length-1],e[s]<c){t[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,e[n[a]]<c?o=a+1:i=a;c<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function locateNonHydratedAsyncRoot(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:locateNonHydratedAsyncRoot(t)}function invalidateMount(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey);function watchEffect(e,t){return doWatch(e,null,t)}function watch(e,t,n){return doWatch(e,t,n)}function doWatch(e,t,n=EMPTY_OBJ){const{immediate:r,deep:s,flush:o,once:i}=n,a=extend$1({},n),c=t&&r||!t&&"post"!==o;let l;if(isInSSRComponentSetup)if("sync"===o){const e=useSSRContext();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){const e=()=>{};return e.stop=NOOP,e.resume=NOOP,e.pause=NOOP,e}const u=currentInstance;a.call=(e,t,n)=>callWithAsyncErrorHandling(e,u,t,n);let d=!1;"post"===o?a.scheduler=e=>{queuePostRenderEffect(e,u&&u.suspense)}:"sync"!==o&&(d=!0,a.scheduler=(e,t)=>{t?e():queueJob(e)}),a.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};const p=watch$1(e,t,a);return isInSSRComponentSetup&&(l?l.push(p):c&&p()),p}function instanceWatch(e,t,n){const r=this.proxy,s=isString$1(e)?e.includes(".")?createPathGetter(r,e):()=>r[e]:e.bind(r,r);let o;isFunction$2(t)?o=t:(o=t.handler,n=t);const i=setCurrentInstance(this),a=doWatch(s,o.bind(r),n);return i(),a}function createPathGetter(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const getModelModifiers=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${camelize(t)}Modifiers`]||e[`${hyphenate(t)}Modifiers`];function emit(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||EMPTY_OBJ;let s=n;const o=t.startsWith("update:"),i=o&&getModelModifiers(r,t.slice(7));let a;i&&(i.trim&&(s=n.map(e=>isString$1(e)?e.trim():e)),i.number&&(s=n.map(looseToNumber)));let c=r[a=toHandlerKey(t)]||r[a=toHandlerKey(camelize(t))];!c&&o&&(c=r[a=toHandlerKey(hyphenate(t))]),c&&callWithAsyncErrorHandling(c,e,6,s);const l=r[a+"Once"];if(l){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,callWithAsyncErrorHandling(l,e,6,s)}}const mixinEmitsCache=new WeakMap;function normalizeEmitsOptions(e,t,n=!1){const r=n?mixinEmitsCache:t.emitsCache,s=r.get(e);if(void 0!==s)return s;const o=e.emits;let i={},a=!1;if(!isFunction$2(e)){const r=e=>{const n=normalizeEmitsOptions(e,t,!0);n&&(a=!0,extend$1(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return o||a?(isArray$2(o)?o.forEach(e=>i[e]=null):extend$1(i,o),isObject$4(e)&&r.set(e,i),i):(isObject$4(e)&&r.set(e,null),null)}function isEmitListener(e,t){return!(!e||!isOn(t))&&(t=t.slice(2).replace(/Once$/,""),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}function markAttrsAccessed(){}function renderComponentRoot(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:d,data:p,setupState:h,ctx:f,inheritAttrs:g}=e,m=setCurrentRenderingInstance(e);let y,b;try{if(4&n.shapeFlag){const e=s||r,t=e;y=normalizeVNode(l.call(t,e,u,d,h,p,f)),b=a}else{const e=t;0,y=normalizeVNode(e.length>1?e(d,{attrs:a,slots:i,emit:c}):e(d,null)),b=t.props?a:getFunctionalFallthrough(a)}}catch(S){blockStack.length=0,handleError(S,e,1),y=createVNode(Comment)}let v=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=v;e.length&&7&t&&(o&&e.some(isModelListener)&&(b=filterModelListeners(b,o)),v=cloneVNode(v,b,!1,!0))}return n.dirs&&(v=cloneVNode(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&setTransitionHooks(v,n.transition),y=v,setCurrentRenderingInstance(m),y}const getFunctionalFallthrough=e=>{let t;for(const n in e)("class"===n||"style"===n||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{const n={};for(const r in e)isModelListener(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:c}=t,l=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!s&&!a||a&&a.$stable)||r!==i&&(r?!i||hasPropsChanged(r,i,l):!!i);if(1024&c)return!0;if(16&c)return r?hasPropsChanged(r,i,l):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==r[n]&&!isEmitListener(l,n))return!0}}return!1}function hasPropsChanged(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(t[o]!==e[o]&&!isEmitListener(n,o))return!0}return!1}function updateHOCHostEl({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r!==e)break;(e=t.vnode).el=n,t=t.parent}}const isSuspense=e=>e.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$2(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}const Fragment=exports("F",Symbol.for("v-fgt")),Text=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(e=!1){blockStack.push(currentBlock=e?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(e,t=!1){isBlockTreeEnabled+=e,e<0&¤tBlock&&t&&(currentBlock.hasOnce=!0)}function setupBlock(e){return e.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(e),e}function createElementBlock(e,t,n,r,s,o){return setupBlock(createBaseVNode(e,t,n,r,s,o,!0))}function createBlock(e,t,n,r,s){return setupBlock(createVNode(e,t,n,r,s,!0))}function isVNode(e){return!!e&&!0===e.__v_isVNode}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}const normalizeKey=({key:e})=>null!=e?e:null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?isString$1(e)||isRef(e)||isFunction$2(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e:null);function createBaseVNode(e,t=null,n=null,r=0,s=null,o=(e===Fragment?0:1),i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&normalizeKey(t),ref:t&&normalizeRef(t),scopeId:currentScopeId,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return a?(normalizeChildren(c,n),128&o&&e.normalize(c)):n&&(c.shapeFlag|=isString$1(n)?8:16),isBlockTreeEnabled>0&&!i&¤tBlock&&(c.patchFlag>0||6&o)&&32!==c.patchFlag&¤tBlock.push(c),c}const createVNode=_createVNode;function _createVNode(e,t=null,n=null,r=0,s=null,o=!1){if(e&&e!==NULL_DYNAMIC_COMPONENT||(e=Comment),isVNode(e)){const r=cloneVNode(e,t,!0);return n&&normalizeChildren(r,n),isBlockTreeEnabled>0&&!o&¤tBlock&&(6&r.shapeFlag?currentBlock[currentBlock.indexOf(e)]=r:currentBlock.push(r)),r.patchFlag=-2,r}if(isClassComponent(e)&&(e=e.__vccOpts),t){t=guardReactiveProps(t);let{class:e,style:n}=t;e&&!isString$1(e)&&(t.class=normalizeClass(e)),isObject$4(n)&&(isProxy(n)&&!isArray$2(n)&&(n=extend$1({},n)),t.style=normalizeStyle(n))}return createBaseVNode(e,t,n,r,s,isString$1(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$4(e)?4:isFunction$2(e)?2:0,o,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend$1({},e):e:null}function cloneVNode(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:c}=e,l=t?mergeProps(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&normalizeKey(l),ref:t&&t.ref?n&&o?isArray$2(o)?o.concat(normalizeRef(t)):[o,normalizeRef(t)]:normalizeRef(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cloneVNode(e.ssContent),ssFallback:e.ssFallback&&cloneVNode(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&setTransitionHooks(u,c.clone(u)),u}function createTextVNode(e=" ",t=0){return createVNode(Text,null,e,t)}function createCommentVNode(e="",t=!1){return t?(openBlock(),createBlock(Comment,null,e)):createVNode(Comment,null,e)}function normalizeVNode(e){return null==e||"boolean"==typeof e?createVNode(Comment):isArray$2(e)?createVNode(Fragment,null,e.slice()):isVNode(e)?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(isArray$2(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),normalizeChildren(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||isInternalObject(t)?3===r&¤tRenderingInstance&&(1===currentRenderingInstance.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=currentRenderingInstance}}else isFunction$2(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),64&r?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=normalizeClass([t.class,r.class]));else if("style"===e)t.style=normalizeStyle([t.style,r.style]);else if(isOn(e)){const n=t[e],s=r[e];!s||n===s||isArray$2(n)&&n.includes(s)||(t[e]=n?[].concat(n,s):s)}else""!==e&&(t[e]=r[e])}return t}function invokeVNodeHook(e,t,n,r=null){callWithAsyncErrorHandling(e,t,7,[n,r])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||emptyAppContext,o={uid:uid++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(r,s),emitsOptions:normalizeEmitsOptions(r,s),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:r.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=emit.bind(null,o),e.ce&&e.ce(o),o}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const e=getGlobalThis(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};internalSetCurrentInstance=t("__VUE_INSTANCE_SETTERS__",e=>currentInstance=e),setInSSRSetupState=t("__VUE_SSR_SETTERS__",e=>isInSSRComponentSetup=e)}const setCurrentInstance=e=>{const t=currentInstance;return internalSetCurrentInstance(e),e.scope.on(),()=>{e.scope.off(),internalSetCurrentInstance(t)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return 4&e.vnode.shapeFlag}let isInSSRComponentSetup=!1;function setupComponent(e,t=!1,n=!1){t&&setInSSRSetupState(t);const{props:r,children:s}=e.vnode,o=isStatefulComponent(e);initProps(e,r,o,t),initSlots(e,s,n||t);const i=o?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),i}function setupStatefulComponent(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);const{setup:r}=n;if(r){pauseTracking();const n=e.setupContext=r.length>1?createSetupContext(e):null,s=setCurrentInstance(e),o=callWithErrorHandling(r,e,0,[e.props,n]),i=isPromise(o);if(resetTracking(),s(),!i&&!e.sp||isAsyncWrapper(e)||markAsyncBoundary(e),i){if(o.then(unsetCurrentInstance,unsetCurrentInstance),t)return o.then(t=>{handleSetupResult(e,t)}).catch(t=>{handleError(t,e,0)});e.asyncDep=o}else handleSetupResult(e,o)}else finishComponentSetup(e)}function handleSetupResult(e,t,n){isFunction$2(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$4(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e)}function finishComponentSetup(e,t,n){const r=e.type;e.render||(e.render=r.render||NOOP);{const t=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),t()}}}const attrsProxyHandlers={get:(e,t)=>(track(e,"get",""),e[t])};function createSetupContext(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,attrsProxyHandlers),slots:e.slots,emit:e.emit,expose:t}}function getComponentPublicInstance(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get:(t,n)=>n in t?t[n]:n in publicPropertiesMap?publicPropertiesMap[n](e):void 0,has:(e,t)=>t in e||t in publicPropertiesMap})):e.proxy}const classifyRE=/(?:^|[-_])\w/g,classify=e=>e.replace(classifyRE,e=>e.toUpperCase()).replace(/[-_]/g,"");function getComponentName(e,t=!0){return isFunction$2(e)?e.displayName||e.name:e.name||t&&e.__name}function formatComponentName(e,t,n=!1){let r=getComponentName(t);if(!r&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(r=e[1])}if(!r&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?classify(r):n?"App":"Anonymous"}function isClassComponent(e){return isFunction$2(e)&&"__vccOpts"in e}const computed=exports("k",(e,t)=>computed$1(e,t,isInSSRComponentSetup));function h(e,t,n){const r=(e,t,n)=>{setBlockTracking(-1);try{return createVNode(e,t,n)}finally{setBlockTracking(1)}},s=arguments.length;return 2===s?isObject$4(t)&&!isArray$2(t)?isVNode(t)?r(e,null,[t]):r(e,t):r(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&isVNode(n)&&(n=[n]),r(e,t,n))}const version="3.5.21";
|
|
/**
|
|
* @vue/runtime-dom v3.5.21
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let policy;const tt="undefined"!=typeof window&&window.trustedTypes;if(tt)try{policy=tt.createPolicy("vue",{createHTML:e=>e})}catch(e){}const unsafeToTrustedHTML=policy?e=>policy.createHTML(e):e=>e,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc="undefined"!=typeof document?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s="svg"===t?doc.createElementNS(svgNS,e):"mathml"===t?doc.createElementNS(mathmlNS,e):n?doc.createElement(e,{is:n}):doc.createElement(e);return"select"===e&&r&&null!=r.multiple&&s.setAttribute("multiple",r.multiple),s},createText:e=>doc.createTextNode(e),createComment:e=>doc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>doc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),s!==o&&(s=s.nextSibling););else{templateContainer.innerHTML=unsafeToTrustedHTML("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);const s=templateContainer.content;if("svg"===r||"mathml"===r){const e=s.firstChild;for(;e.firstChild;)s.appendChild(e.firstChild);s.removeChild(e)}t.insertBefore(s,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},vtcKey=Symbol("_vtc");function patchClass(e,t,n){const r=e[vtcKey];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),CSS_VAR_TEXT=Symbol(""),displayRE=/(?:^|;)\s*display\s*:/;function patchStyle(e,t,n){const r=e.style,s=isString$1(n);let o=!1;if(n&&!s){if(t)if(isString$1(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&setStyle(r,t,"")}else for(const e in t)null==n[e]&&setStyle(r,e,"");for(const e in n)"display"===e&&(o=!0),setStyle(r,e,n[e])}else if(s){if(t!==n){const e=r[CSS_VAR_TEXT];e&&(n+=";"+e),r.cssText=n,o=displayRE.test(n)}}else t&&e.removeAttribute("style");vShowOriginalDisplay in e&&(e[vShowOriginalDisplay]=o?r.display:"",e[vShowHidden]&&(r.display="none"))}const importantRE=/\s*!important$/;function setStyle(e,t,n){if(isArray$2(n))n.forEach(n=>setStyle(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=autoPrefix(e,t);importantRE.test(n)?e.setProperty(hyphenate(r),n.replace(importantRE,""),"important"):e[r]=n}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(e,t){const n=prefixCache[t];if(n)return n;let r=camelize(t);if("filter"!==r&&r in e)return prefixCache[t]=r;r=capitalize(r);for(let s=0;s<prefixes.length;s++){const n=prefixes[s]+r;if(n in e)return prefixCache[t]=n}return t}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(e,t,n,r,s,o=isSpecialBooleanAttr(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(xlinkNS,t.slice(6,t.length)):e.setAttributeNS(xlinkNS,t,n):null==n||o&&!includeBooleanAttr(n)?e.removeAttribute(t):e.setAttribute(t,o?"":isSymbol$1(n)?String(n):n)}function patchDOMProp(t,n,r,s,o){if("innerHTML"===n||"textContent"===n)return void(null!=r&&(t[n]="innerHTML"===n?unsafeToTrustedHTML(r):r));const i=t.tagName;if("value"===n&&"PROGRESS"!==i&&!i.includes("-")){const e="OPTION"===i?t.getAttribute("value")||"":t.value,s=null==r?"checkbox"===t.type?"on":"":String(r);return e===s&&"_value"in t||(t.value=s),null==r&&t.removeAttribute(n),void(t._value=r)}let a=!1;if(""===r||null==r){const e=typeof t[n];"boolean"===e?r=includeBooleanAttr(r):null==r&&"string"===e?(r="",a=!0):"number"===e&&(r=0,a=!0)}try{t[n]=r}catch(e){}a&&t.removeAttribute(o||n)}function addEventListener(e,t,n,r){e.addEventListener(t,n,r)}function removeEventListener(e,t,n,r){e.removeEventListener(t,n,r)}const veiKey=Symbol("_vei");function patchEvent(e,t,n,r,s=null){const o=e[veiKey]||(e[veiKey]={}),i=o[t];if(r&&i)i.value=r;else{const[n,a]=parseName(t);if(r){addEventListener(e,n,o[t]=createInvoker(r,s),a)}else i&&(removeEventListener(e,n,i,a),o[t]=void 0)}}const optionsModifierRE=/(?:Once|Passive|Capture)$/;function parseName(e){let t;if(optionsModifierRE.test(e)){let n;for(t={};n=e.match(optionsModifierRE);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):hyphenate(e.slice(2)),t]}let cachedNow=0;const p=Promise.resolve(),getNow=()=>cachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();callWithAsyncErrorHandling(patchStopImmediatePropagation(e,n.value),t,5,[e])};return n.value=e,n.attached=getNow(),n}function patchStopImmediatePropagation(e,t){if(isArray$2(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}const isNativeOn=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,patchProp=(e,t,n,r,s,o)=>{const i="svg"===s;"class"===t?patchClass(e,r,i):"style"===t?patchStyle(e,n,r):isOn(t)?isModelListener(t)||patchEvent(e,t,n,r,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):shouldSetAsProp(e,t,r,i))?(patchDOMProp(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||patchAttr(e,t,r,i,o,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&isString$1(r)?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),patchAttr(e,t,r,i)):patchDOMProp(e,camelize(t),r,o,t)};function shouldSetAsProp(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&isNativeOn(t)&&isFunction$2(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!isNativeOn(t)||!isString$1(n))&&t in e}const rendererOptions=extend$1({patchProp:patchProp},nodeOps);let renderer;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}const createApp=(...e)=>{const t=ensureRenderer().createApp(...e),{mount:n}=t;return t.mount=e=>{const r=normalizeContainer(e);if(!r)return;const s=t._component;isFunction$2(s)||s.render||s.template||(s.template=r.innerHTML),1===r.nodeType&&(r.textContent="");const o=n(r,!1,resolveRootNamespace(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function resolveRootNamespace(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function normalizeContainer(e){if(isString$1(e)){return document.querySelector(e)}return e}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}events.exports=s,events.exports.once=function(e,t){return new Promise(function(n,r){function s(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,s,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var s,o,c,l;if(i(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),c=o[t]),void 0===c)c=o[t]=n,++e._eventsCount;else if("function"==typeof c?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(s=a(e))>0&&c.length>s&&!c.warned){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=l.bind(r);return s.listener=n,r.wrapFn=s,s}function d(e,t,n){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(s):h(s,s.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){r.once&&e.removeEventListener(t,s),n(o)})}}return Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,o=this._events;if(void 0!==o)s=s&&void 0===o.error;else if(!s)return!1;if(s){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=h(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return i(t),this.on(e,u(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return i(t),this.prependListener(e,u(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,s,o,a;if(i(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,s=o;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var s,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(s=o[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},events.exports}var eventsExports=requireEvents();const EventEmitter=getDefaultExportFromCjs(eventsExports);var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$d=Object.prototype,hasOwnProperty$b=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var n=hasOwnProperty$b.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var s=!0}catch(e){}var o=nativeObjectToString$1.call(t);return s&&(n?t[symToStringTag$1]=r:delete t[symToStringTag$1]),o}var objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString(e){return nativeObjectToString.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return null!=e&&"object"==typeof e}var symbolTag$2="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==symbolTag$2}function arrayMap(e,t){for(var n=-1,r=null==e?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var isArray$1=Array.isArray,symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray$1(e))return arrayMap(e,baseToString)+"";if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function isObject$3(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function identity(e){return e}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$3(e))return!1;var t=baseGetTag(e);return t==funcTag$2||t==genTag$1||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(t){if(null!=t){try{return funcToString$1.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$b=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$a=objectProto$b.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$a).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject$3(e)||isMasked(e))&&(isFunction$1(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var n=getValue(e,t);return baseIsNative(n)?n:void 0}var WeakMap$1=getNative(root,"WeakMap"),objectCreate=Object.create,baseCreate=function(){function e(){}return function(t){if(!isObject$3(t))return{};if(objectCreate)return objectCreate(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function apply(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function noop$1(){}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(e){var t=0,n=0;return function(){var r=nativeNow(),s=HOT_SPAN-(r-n);if(n=r,s>0){if(++t>=HOT_COUNT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function constant(e){return function(){return e}}var defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),baseSetToString=defineProperty?function(e,t){return defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:constant(t),writable:!0})}:identity,setToString=shortOut(baseSetToString);function arrayEach(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function baseFindIndex(e,t,n,r){for(var s=e.length,o=n+-1;++o<s;)if(t(e[o],o,e))return o;return-1}function baseIsNaN(e){return e!=e}function strictIndexOf(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}function baseIndexOf(e,t,n){return t==t?strictIndexOf(e,t,n):baseFindIndex(e,baseIsNaN,n)}function arrayIncludes(e,t){return!!(null==e?0:e.length)&&baseIndexOf(e,t,0)>-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var n=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER$1:t)&&("number"==n||"symbol"!=n&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function baseAssignValue(e,t,n){"__proto__"==t&&defineProperty?defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function eq(e,t){return e===t||e!=e&&t!=t}var objectProto$a=Object.prototype,hasOwnProperty$9=objectProto$a.hasOwnProperty;function assignValue(e,t,n){var r=e[t];hasOwnProperty$9.call(e,t)&&eq(r,n)&&(void 0!==n||t in e)||baseAssignValue(e,t,n)}var nativeMax=Math.max;function overRest(e,t,n){return t=nativeMax(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=nativeMax(r.length-t,0),i=Array(o);++s<o;)i[s]=r[t+s];s=-1;for(var a=Array(t+1);++s<t;)a[s]=r[s];return a[t]=n(i),apply(e,this,a)}}function baseRest(e,t){return setToString(overRest(e,t,identity),e+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction$1(e)}var objectProto$9=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$9)}function baseTimes(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var argsTag$2="[object Arguments]";function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==argsTag$2}var objectProto$8=Object.prototype,hasOwnProperty$8=objectProto$8.hasOwnProperty,propertyIsEnumerable$1=objectProto$8.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&hasOwnProperty$8.call(e,"callee")&&!propertyIsEnumerable$1.call(e,"callee")};function stubFalse(){return!1}var freeExports$2="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer$1=nativeIsBuffer||stubFalse,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$1="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$2="[object Number]",objectTag$2="[object Object]",regexpTag$2="[object RegExp]",setTag$5="[object Set]",stringTag$2="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseUnary(e){return function(t){return e(t)}}typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$2]=typedArrayTags[boolTag$2]=typedArrayTags[dataViewTag$3]=typedArrayTags[dateTag$2]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$2]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag$2]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$2]=typedArrayTags[weakMapTag$2]=!1;var freeExports$1="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{var t=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return t||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$1=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$7=Object.prototype,hasOwnProperty$7=objectProto$7.hasOwnProperty;function arrayLikeKeys(e,t){var n=isArray$1(e),r=!n&&isArguments(e),s=!n&&!r&&isBuffer$1(e),o=!n&&!r&&!s&&isTypedArray$1(e),i=n||r||s||o,a=i?baseTimes(e.length,String):[],c=a.length;for(var l in e)!hasOwnProperty$7.call(e,l)||i&&("length"==l||s&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||isIndex(l,c))||a.push(l);return a}function overArg(e,t){return function(n){return e(t(n))}}var nativeKeys=overArg(Object.keys,Object),objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function baseKeys(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var n in Object(e))hasOwnProperty$6.call(e,n)&&"constructor"!=n&&t.push(n);return t}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray$1(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var n=t[e];return n===HASH_UNDEFINED$2?void 0:n}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty$4.call(t,e)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}function Hash(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(e,t){for(var n=e.length;n--;)if(eq(e[n][0],t))return n;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,n=assocIndexOf(t,e);return!(n<0)&&(n==t.length-1?t.pop():splice.call(t,n,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?void 0:t[n][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var n=this.__data__,r=assocIndexOf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ListCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var n=e.__data__;return isKeyable(t)?n["string"==typeof t?"string":"hash"]:n.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var n=getMapData(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function MapCache(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],o=n.cache;if(o.has(s))return o.get(s);var i=e.apply(this,r);return n.cache=o.set(s,i)||o,i};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize(e,function(e){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),e}),n=t.cache;return t}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,function(e,n,r,s){t.push(r?s.replace(reEscapeChar,"$1"):n||e)}),t});function toString$1(e){return null==e?"":baseToString(e)}function castPath(e,t){return isArray$1(e)?e:isKey(e,t)?[e]:stringToPath(toString$1(e))}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function arrayPush(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}var spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable(e){return isArray$1(e)||isArguments(e)||!!(spreadableSymbol&&e&&e[spreadableSymbol])}function baseFlatten(e,t,n,r,s){var o=-1,i=e.length;for(n||(n=isFlattenable),s||(s=[]);++o<i;){var a=e[o];n(a)&&arrayPush(s,a)}return s}var getPrototype=overArg(Object.getPrototypeOf,Object);function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function stackGet(e){return this.__data__.get(e)}function stackHas(e){return this.__data__.has(e)}var LARGE_ARRAY_SIZE$1=200;function stackSet(e,t){var n=this.__data__;if(n instanceof ListCache){var r=n.__data__;if(!Map$1||r.length<LARGE_ARRAY_SIZE$1-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new MapCache(r)}return n.set(e,t),this.size=n.size,this}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root.Buffer:void 0;function cloneBuffer(e,t){return e.slice()}function arrayFilter(e,t){for(var n=-1,r=null==e?0:e.length,s=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[s++]=i)}return o}function stubArray(){return[]}Buffer$1&&Buffer$1.allocUnsafe;var objectProto$3=Object.prototype,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),function(t){return propertyIsEnumerable.call(e,t)}))}:stubArray;function baseGetAllKeys(e,t,n){var r=t(e);return isArray$1(e)?r:arrayPush(r,n(e))}function getAllKeys(e){return baseGetAllKeys(e,keys,getSymbols)}var DataView=getNative(root,"DataView"),Promise$1=getNative(root,"Promise"),Set$1=getNative(root,"Set"),mapTag$4="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$4="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag$2||Map$1&&getTag(new Map$1)!=mapTag$4||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$4||WeakMap$1&&getTag(new WeakMap$1)!=weakMapTag$1)&&(getTag=function(e){var t=baseGetTag(e),n=t==objectTag$1?e.constructor:void 0,r=n?toSource(n):"";if(r)switch(r){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$4;case promiseCtorString:return promiseTag;case setCtorString:return setTag$4;case weakMapCtorString:return weakMapTag$1}return t});var objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty;function initCloneArray(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&hasOwnProperty$3.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Uint8Array$1=root.Uint8Array;function cloneArrayBuffer(e){var t=new e.constructor(e.byteLength);return new Uint8Array$1(t).set(new Uint8Array$1(e)),t}function cloneDataView(e,t){var n=cloneArrayBuffer(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var reFlags=/\w*$/;function cloneRegExp(e){var t=new e.constructor(e.source,reFlags.exec(e));return t.lastIndex=e.lastIndex,t}var symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol(e){return symbolValueOf?Object(symbolValueOf.call(e)):{}}function cloneTypedArray(e,t){var n=cloneArrayBuffer(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var boolTag$1="[object Boolean]",dateTag$1="[object Date]",mapTag$3="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$3="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(e,t,n){var r=e.constructor;switch(t){case arrayBufferTag$1:return cloneArrayBuffer(e);case boolTag$1:case dateTag$1:return new r(+e);case dataViewTag$1:return cloneDataView(e);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(e);case mapTag$3:return new r;case numberTag$1:case stringTag$1:return new r(e);case regexpTag$1:return cloneRegExp(e);case setTag$3:return new r;case symbolTag$1:return cloneSymbol(e)}}function initCloneObject(e){return"function"!=typeof e.constructor||isPrototype(e)?{}:baseCreate(getPrototype(e))}var mapTag$2="[object Map]";function baseIsMap(e){return isObjectLike(e)&&getTag(e)==mapTag$2}var nodeIsMap=nodeUtil&&nodeUtil.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,setTag$2="[object Set]";function baseIsSet(e){return isObjectLike(e)&&getTag(e)==setTag$2}var nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};function baseClone(e,t,n,r,s,o){var i;if(void 0!==i)return i;if(!isObject$3(e))return e;var a=isArray$1(e);if(a)i=initCloneArray(e);else{var c=getTag(e),l=c==funcTag||c==genTag;if(isBuffer$1(e))return cloneBuffer(e);if(c==objectTag||c==argsTag||l&&!s)i=l?{}:initCloneObject(e);else{if(!cloneableTags[c])return s?e:{};i=initCloneByTag(e,c)}}o||(o=new Stack);var u=o.get(e);if(u)return u;o.set(e,i),isSet(e)?e.forEach(function(r){i.add(baseClone(r,t,n,r,e,o))}):isMap(e)&&e.forEach(function(r,s){i.set(s,baseClone(r,t,n,s,e,o))});var d=a?void 0:getAllKeys(e);return arrayEach(d||e,function(r,s){d&&(r=e[s=r]),assignValue(i,s,baseClone(r,t,n,s,e,o))}),i}cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$1]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag$1]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(e){return baseClone(e,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED),this}function setCacheHas(e){return this.__data__.has(e)}function SetCache(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new MapCache;++t<n;)this.add(e[t])}function cacheHas(e,t){return e.has(t)}function setToArray(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function hasPath(e,t,n){for(var r=-1,s=(t=castPath(t,e)).length,o=!1;++r<s;){var i=toKey(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=s?o:!!(s=null==e?0:e.length)&&isLength(s)&&isIndex(i,s)&&(isArray$1(e)||isArguments(e))}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty;function baseHas(e,t){return null!=e&&hasOwnProperty$2.call(e,t)}function has(e,t){return null!=e&&hasPath(e,t,baseHas)}var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty;function isEmpty(e){if(null==e)return!0;if(isArrayLike(e)&&(isArray$1(e)||"string"==typeof e||"function"==typeof e.splice||isBuffer$1(e)||isTypedArray$1(e)||isArguments(e)))return!e.length;var t=getTag(e);if(t==mapTag||t==setTag)return!e.size;if(isPrototype(e))return!baseKeys(e).length;for(var n in e)if(hasOwnProperty$1.call(e,n))return!1;return!0}function baseSet(e,t,n,r){if(!isObject$3(e))return e;for(var s=-1,o=(t=castPath(t,e)).length,i=o-1,a=e;null!=a&&++s<o;){var c=toKey(t[s]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=i){var u=a[c];void 0===(l=void 0)&&(l=isObject$3(u)?u:isIndex(t[s+1])?[]:{})}assignValue(a,c,l),a=a[c]}return e}function set(e,t,n){return null==e?e:baseSet(e,t,n)}var INFINITY=1/0,createSet=Set$1&&1/setToArray(new Set$1([,-0]))[1]==INFINITY?function(e){return new Set$1(e)}:noop$1,LARGE_ARRAY_SIZE=200;function baseUniq(e,t,n){var r=-1,s=arrayIncludes,o=e.length,i=!0,a=[],c=a;if(o>=LARGE_ARRAY_SIZE){var l=createSet(e);if(l)return setToArray(l);i=!1,s=cacheHas,c=new SetCache}else c=a;e:for(;++r<o;){var u=e[r],d=u;if(u=0!==u?u:0,i&&d==d){for(var p=c.length;p--;)if(c[p]===d)continue e;a.push(u)}else s(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}var union=baseRest(function(e){return baseUniq(baseFlatten(e,1,isArrayLikeObject))});class ObservedData{}class SimpleObservedData extends ObservedData{data={};event=new eventsExports.EventEmitter;constructor(e){super(),this.data=e}update(e,t){t?setValueByKeyPath(t,e,this.data):this.data=e;const n={updateData:e,path:t??""};t&&this.event.emit(t,n),this.event.emit("",n)}on(e,t,n){n?.immediate&&t(this.getData(e)),this.event.on(e,t)}off(e,t){this.event.off(e,t)}getData(e){return e?getValueByKeyPath(e,this.data):this.data}destroy(){}}class DataSource extends EventEmitter{isInit=!1;app;mockData;#e="base";#t;#n;#r;#s=[];#o=[];constructor(e){super(),this.#t=e.schema.id,this.#n=e.schema,this.app=e.app,this.setFields(e.schema.fields),this.setMethods(e.schema.methods||[]);let t=e.initialData;const n=e.ObservedDataClass||SimpleObservedData;if("editor"===this.app.platform){const n=cloneDeep(e.schema.mocks||[]);this.mockData=n.find(e=>e.useInEditor)?.data||this.getDefaultData(),t=cloneDeep(this.mockData)}else if("boolean"==typeof e.useMock&&e.useMock){const n=cloneDeep(e.schema.mocks||[]);this.mockData=n.find(e=>e.enable)?.data,t=cloneDeep(this.mockData)||this.getDefaultData()}else{if(e.initialData)return this.#r=new n(e.initialData??{}),void(this.isInit=!0);t=this.getDefaultData()}this.#r=new n(t??{})}get id(){return this.#t}get type(){return this.#e}get schema(){return this.#n}get fields(){return this.#s}get methods(){return this.#o}setFields(e){this.#s=e}setMethods(e){this.#o=e}get data(){return this.#r.getData("")}setData(e,t){this.#r.update(e,t);const n={updateData:e,path:t};this.emit("change",n)}setValue(e,t){return this.setData(t,e)}onDataChange(e,t){this.#r.on(e,t)}offDataChange(e,t){this.#r.off(e,t)}getDefaultData(){return getDefaultValueFromFields(this.#s)}async init(){this.isInit=!0}destroy(){this.#s=[],this.removeAllListeners(),this.#r.destroy()}}const urlencoded=e=>Object.entries(e).reduce((e,[t,n])=>{let r=n;return"object"==typeof n&&(r=JSON.stringify(n)),void 0!==n?`${e}${e?"&":""}${globalThis.encodeURIComponent(t)}=${globalThis.encodeURIComponent(`${r}`)}`:e},""),webRequest=async e=>{const{url:t,method:n="GET",headers:r={},params:s={},data:o={},...i}=e,a=urlencoded(s);let c=JSON.stringify(o);r["Content-Type"]?.includes("application/x-www-form-urlencoded")&&(c=urlencoded(o));return(await globalThis.fetch(a?`${t}?${a}`:t,{method:n,headers:r,body:"GET"===n?void 0:c,...i})).json()};class HttpDataSource extends DataSource{isLoading=!1;error;httpOptions;#i;#a=[];#c=[];#e="http";constructor(e){const{options:t}=e.schema;super(e),this.httpOptions=t,"function"==typeof e.request?this.#i=e.request:"function"==typeof globalThis.fetch&&(this.#i=webRequest),this.methods.forEach(e=>{"function"==typeof e.content&&("beforeRequest"===e.timing&&this.#a.push(e.content),"afterRequest"===e.timing&&this.#c.push(e.content))})}get type(){return this.#e}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(e={}){this.isLoading=!0;const{url:t,params:n,data:r,headers:s,...o}=this.httpOptions;let i={url:"function"==typeof t?t({app:this.app,dataSource:this}):t,params:"function"==typeof n?n({app:this.app,dataSource:this}):n,data:"function"==typeof r?r({app:this.app,dataSource:this}):r,headers:"function"==typeof s?s({app:this.app,dataSource:this}):s,...o,...e};try{for(const e of this.#a)await e({options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.beforeRequest&&(i=await this.schema.beforeRequest(i,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let e=await(this.#i?.(i));for(const t of this.#c)await t({res:e,options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.afterResponse&&(e=await this.schema.afterResponse(e,{app:this.app,dataSource:this,options:i})),this.schema.responseOptions?.dataPath){const t=getValueByKeyPath(this.schema.responseOptions.dataPath,e);this.setData(t)}else this.setData(e)}this.error=void 0}catch(a){this.error={msg:a.message},this.emit("error",a)}this.isLoading=!1}get(e){return this.request({...e,method:"GET"})}post(e){return this.request({...e,method:"POST"})}}const cache=new Map,getDeps=(e,t,n)=>{let r;if(n){const n=[];t.forEach(e=>{traverseNode(e,e=>{n.push(e.id)})}),r=`${e.id}:${n.join(":")}`}else r=`${e.id}:${t.map(e=>e.id).join(":")}`;if(cache.has(r))return cache.get(r);const s=new Watcher;s.addTarget(new Target({id:e.id,type:"data-source",isTarget:(t,n)=>!`${t}`.includes(DSL_NODE_KEY_COPY_PREFIX)&&isDataSourceTarget(e,t,n,!0)})),s.addTarget(new Target({id:e.id,type:"cond",isTarget:(t,n)=>isDataSourceCondTarget(e,t,n,!0)})),s.collect(t,{},!0);const{deps:o}=s.getTarget(e.id,"data-source"),{deps:i}=s.getTarget(e.id,"cond"),a={deps:o,condDeps:i};return cache.set(r,a),a},compiledCondition=(t,n)=>{let r=!0;for(const{op:s,value:o,range:i,field:a}of t){const[t,...c]=a,l=n[t];if(!l||!c.length)break;try{const e=getValueByKeyPath(c.join("."),l);if(!compiledCond(s,e,o,i)){r=!1;break}}catch(e){console.warn(e)}}return r},compliedConditions=(e,t)=>{if(!e[NODE_CONDS_KEY]||!Array.isArray(e[NODE_CONDS_KEY])||!e[NODE_CONDS_KEY].length)return!0;for(const{cond:n}of e[NODE_CONDS_KEY])if(n&&compiledCondition(n,t))return!0;return!1},updateNode=(e,t)=>{if(isPage(e)||isPageFragment(e)){const n=t.items?.findIndex(t=>t.id===e.id);t.items.splice(n,1,e)}else replaceChildNode(e,t.items)},createIteratorContentData=(e,t,n=[],r={})=>{const s={...r,[t]:{}};let o=cloneDeep(r[t]),i=s[t];return n.forEach((t,r)=>{Object.assign(i,o),r!==n.length-1?(Array.isArray(o[t])&&(o[t]={},i[t]={}),o=o[t],i=i[t]):i[t]=e}),s},compliedDataSourceField=(t,n)=>{const[r,...s]=t,o=r.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(o>-1){const i=n[r.substring(o+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)];if(!i)return t;try{return getValueByKeyPath(s.join("."),i)}catch(e){return t}}return t},template=(t,n)=>t.replace(dataSourceTemplateRegExp,(t,r)=>{try{return getValueByKeyPath(r,n)}catch(e){return t}}),compiledNodeField=(e,t)=>"string"==typeof e?template(e,t):e?.isBindDataSource&&e.dataSourceId?t[e.dataSourceId]:e?.isBindDataSourceField&&e.dataSourceId&&"string"==typeof e.template?template(e.template,t[e.dataSourceId]):Array.isArray(e)&&"string"==typeof e[0]?compliedDataSourceField(e,t):e,compliedIteratorItem=({compile:e,dsId:t,item:n,deps:r,condDeps:s,inEditor:o,ctxData:i})=>{const{items:a,...c}=n,l=cloneDeep(c);return s[c.id]?.keys.length&&!o&&(l.condResult=compliedConditions(c,i)),Array.isArray(a)&&a.length?l.items=a.map(n=>compliedIteratorItem({compile:e,dsId:t,item:n,deps:r,condDeps:s,inEditor:o,ctxData:i})):a&&(l.items=a),r[l.id]?.keys.length?compiledNode(e,l,{[t]:r},t):l},registerDataSourceOnDemand=async(e,t)=>{const{dataSourceMethodsDeps:n={},dataSourceCondDeps:r={},dataSourceDeps:s={},dataSources:o=[]}=e,i={};o.forEach(e=>{let o=r[e.id]||{};Object.keys(o).length||(o=s[e.id]||{}),Object.keys(o).length||(o=n[e.id]||{}),Object.keys(o).length&&t[e.type]&&(i[e.type]=t[e.type])});const a=await Promise.all(Object.values(i).map(e=>e())),c={};return a.forEach((e,t)=>{const n=Object.keys(i)[t];c[n]=e.default}),c};class DataSourceManager extends EventEmitter{static dataSourceClassMap=new Map([["base",DataSource],["http",HttpDataSource]]);static ObservedDataClass=SimpleObservedData;static waitInitSchemaList=new Map;static register(e,t){DataSourceManager.dataSourceClassMap.set(e,t),DataSourceManager.waitInitSchemaList?.forEach((t,n)=>{const r=t[e]||[];for(let e=r.shift();e;e=r.shift()){const t=n.addDataSource(e);t&&n.init(t)}})}static getDataSourceClass(e){return DataSourceManager.dataSourceClassMap.get(e)}static clearDataSourceClass(){DataSourceManager.dataSourceClassMap.clear(),DataSourceManager.dataSourceClassMap.set("base",DataSource),DataSourceManager.dataSourceClassMap.set("http",HttpDataSource)}static registerObservedData(e){DataSourceManager.ObservedDataClass=e}app;dataSourceMap=new Map;data={};initialData={};useMock=!1;constructor({app:e,useMock:t,initialData:n}){super(),DataSourceManager.waitInitSchemaList.set(this,{}),this.app=e,this.useMock=t,n&&(this.initialData=n,this.data={...n}),e.dsl?.dataSources?.forEach(e=>{this.addDataSource(e)}),this.isAllDataSourceRegistered()?this.callDsInit():this.on("registered-all",()=>{this.callDsInit()})}async init(e){if(!(e.isInit||this.app.jsEngine&&e.schema.disabledInitInJsEngine?.includes(this.app.jsEngine))){for(const t of e.methods){if("function"!=typeof t.content)return;"beforeInit"===t.timing&&await t.content({params:{},dataSource:e,app:this.app})}await e.init();for(const t of e.methods){if("function"!=typeof t.content)return;"afterInit"===t.timing&&await t.content({params:{},dataSource:e,app:this.app})}}}get(e){return this.dataSourceMap.get(e)}addDataSource(e){if(!e)return;const t=DataSourceManager.dataSourceClassMap.get(e.type);if(!t){let t=DataSourceManager.waitInitSchemaList.get(this);return t||(t={},DataSourceManager.waitInitSchemaList.set(this,t)),t[e.type]?t[e.type].push(e):t[e.type]=[e],void(this.data[e.id]=this.initialData[e.id]??getDefaultValueFromFields(e.fields))}const n=new t({app:this.app,schema:e,request:this.app.request,useMock:this.useMock,initialData:this.initialData[e.id],ObservedDataClass:DataSourceManager.ObservedDataClass});return this.dataSourceMap.set(e.id,n),this.data[n.id]=n.data,n.on("change",e=>{this.setData(n,e)}),this.isAllDataSourceRegistered()&&this.emit("registered-all"),n}setData(e,t){this.data[e.id]=e.data,this.emit("change",e.id,t)}removeDataSource(e){this.get(e)?.destroy(),delete this.data[e],this.dataSourceMap.delete(e)}updateSchema(e){for(const t of e){if(!this.get(t.id))return;this.removeDataSource(t.id)}for(const t of e){this.addDataSource(cloneDeep(t));const e=this.get(t.id);e&&this.init(e)}}compiledNode(e,t,n=!1){if(e[NODE_DISABLE_DATA_SOURCE_KEY])return e;const{items:r,...s}=e,o=cloneDeep(s);return r&&(o.items=Array.isArray(r)&&n?r.map(e=>this.compiledNode(e,t,n)):r),!1===s.condResult||!1===s.visible?o:compiledNode(e=>compiledNodeField(e,this.data),o,this.app.dsl?.dataSourceDeps||{},t)}compliedConds(e){return!!e[NODE_DISABLE_DATA_SOURCE_KEY]||compliedConditions(e,this.data)}compliedIteratorItemConds(e,t,n=[]){const[r,...s]=n,o=this.get(r);if(!o)return!0;const i=createIteratorContentData(e,o.id,s,this.data);return compliedConditions(t,i)}compliedIteratorItems(e,t,n=[]){const[r,...s]=n,o=this.get(r);if(!o)return t;const i="editor"===this.app.platform,a=createIteratorContentData(e,o.id,s,this.data),{deps:c={},condDeps:l={}}=getDeps(o.schema,t,i);return Object.keys(c).length||Object.keys(l).length?t.map(e=>compliedIteratorItem({compile:e=>compiledNodeField(e,a),dsId:o.id,item:e,deps:c,condDeps:l,inEditor:i,ctxData:a})):t}isAllDataSourceRegistered(){return!this.app.dsl?.dataSources?.length||this.dataSourceMap.size===this.app.dsl.dataSources.length}destroy(){this.removeAllListeners(),this.data={},this.initialData={},this.dataSourceMap.forEach(e=>{e.destroy()}),this.dataSourceMap.clear(),DataSourceManager.waitInitSchemaList.delete(this)}onDataChange(e,t,n){return this.get(e)?.onDataChange(t,n)}offDataChange(e,t,n){return this.get(e)?.offDataChange(t,n)}callDsInit(){const e=Array.from(this.dataSourceMap);"function"==typeof Promise.allSettled?Promise.allSettled(e.map(([,e])=>this.init(e))).then(t=>{const n={},r={};t.forEach((t,s)=>{const o=e[s][0];"fulfilled"===t.status?this.data[o]?n[o]=this.data[o]:delete n[o]:"rejected"===t.status&&(delete n[o],r[o]=t.reason)}),this.emit("init",n,r)}):Promise.all(e.map(([,e])=>this.init(e))).then(()=>{this.emit("init",this.data)}).catch(()=>{this.emit("init",this.data)})}}const createDataSourceManager=(e,t,n)=>{const{dsl:r,platform:s}=e;if(!r?.dataSources)return;const o=new DataSourceManager({app:e,useMock:t,initialData:n});return r.dataSources&&r.dataSourceCondDeps&&"editor"!==s&&getNodes(getDepNodeIds(r.dataSourceCondDeps),r.items).forEach(e=>{e.condResult=o.compliedConds(e),updateNode(e,r)}),r.dataSources&&r.dataSourceDeps&&getNodes(getDepNodeIds(r.dataSourceDeps),r.items).forEach(e=>{updateNode(o.compiledNode(e),r)}),"nodejs"===e.jsEngine||o.on("change",(t,n)=>{const s=r.dataSourceDeps?.[t]||{},i=r.dataSourceCondDeps?.[t]||{},a=union([...Object.keys(i),...Object.keys(s)]);for(const c of r.items)if("editor"===e.platform||isPage(c)&&c.id===e.page?.data.id||isPageFragment(c)){const r=getNodes(a,[c]).map(t=>{"editor"!==e.platform&&(t.condResult=o.compliedConds(t));const n=o.compiledNode(t);if("function"==typeof e.page?.setData){isPage(n)?e.page.setData(n):c.id!==e.page.data.id||e.page.instance||replaceChildNode(n,[e.page.data]),e.getNode(t.id)?.setData(n);for(const[,t]of e.pageFragments)t.data.id===n.id?t.setData(n):t.data.id===c.id&&(t.getNode(n.id)?.setData(n),t.instance||replaceChildNode(n,[t.data]))}return n});r.length&&o.emit("update-data",r,t,n,c.id)}}),o};
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */function __awaiter(t,n,r,s){return new(r||(r=Promise))(function(n,o){function i(t){try{c(s.next(t))}catch(e){o(e)}}function a(t){try{c(s.throw(t))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}c((s=s.apply(t,[])).next())})}const segments=[];function Match(e,t,n="*"){if(e===n)return!0;segments.length=0;let r=0,s=0,o=0,i=0;for(let d=0,p=e.length;d<p;d+=1){const t=e[d];t===n&&(r+=1,d>i&&segments.push(e.substring(i,d)),segments.push(t),i=d+1)}if(i<e.length&&segments.push(e.substring(i)),r?(s=e.length-r,o=1/0):o=s=e.length,0===segments.length)return e===t;const a=t.length;if(a<s||a>o)return!1;let c=segments.length-1,l=t.length-1,u=!1;for(;;){const e=segments[c];if(c-=1,e===n)u=!0;else{const n=l+1-e.length,r=t.lastIndexOf(e,n);if(-1===r||r>n)return!1;if(u)l=r-1,u=!1;else{if(r!==n)return!1;l-=e.length}}if(0>c)break}return!0}class WildcardObject{constructor(e,t,n,r=void 0){this.obj=e,this.delimiter=t,this.wildcard=n,this.is_match=r}shortMatch(e,t){if(e===t)return!0;if(e===this.wildcard)return!0;if(this.is_match)return this.is_match(e,t);const n=e.indexOf(this.wildcard);if(n>-1){const r=e.substr(n+1);if(0===n||t.substring(0,n)===e.substring(0,n)){const e=r.length;return!(e>0)||t.substr(-e)===r}}return!1}match(e,t){return this.is_match?this.is_match(e,t):e===t||e===this.wildcard||t===this.wildcard||this.shortMatch(e,t)||Match(e,t,this.wildcard)}handleArray(e,t,n,r,s={}){let o=e.indexOf(this.delimiter,n),i=!1;-1===o&&(i=!0,o=e.length);const a=e.substring(n,o);let c=0;for(const l of t){const t=c.toString(),n=""===r?t:r+this.delimiter+c;(a===this.wildcard||a===t||this.shortMatch(a,t))&&(i?s[n]=l:this.goFurther(e,l,o+1,n,s)),c++}return s}handleObject(e,t,n,r,s={}){let o=e.indexOf(this.delimiter,n),i=!1;-1===o&&(i=!0,o=e.length);const a=e.substring(n,o);for(let c in t){c=c.toString();const n=""===r?c:r+this.delimiter+c;(a===this.wildcard||a===c||this.shortMatch(a,c))&&(i?s[n]=t[c]:this.goFurther(e,t[c],o+1,n,s))}return s}goFurther(e,t,n,r,s={}){return Array.isArray(t)?this.handleArray(e,t,n,r,s):this.handleObject(e,t,n,r,s)}get(e){return this.goFurther(e,this.obj,0,"")}}class ObjectPath{static get(e,t,n=!1){if(!t)return;let r=t;for(const s of e)if(s in r)r=r[s];else{if(!n)return;r[s]=Object.create({}),r=r[s]}return r}static set(e,t,n){if(!n)return;if(0===e.length){for(const e in n)delete n[e];for(const e in t)n[e]=t[e];return}const r=e.slice(),s=r.pop(),o=ObjectPath.get(r,n,!0);return"object"==typeof o&&(o[s]=t),t}}let wasm,WASM_VECTOR_LEN=0,cachegetUint8Memory0=null;function getUint8Memory0(){return null!==cachegetUint8Memory0&&cachegetUint8Memory0.buffer===wasm.memory.buffer||(cachegetUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachegetUint8Memory0}let cachedTextEncoder=new TextEncoder("utf-8");const encodeString="function"==typeof cachedTextEncoder.encodeInto?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){const n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}};function passStringToWasm0(e,t,n){if(void 0===n){const n=cachedTextEncoder.encode(e),r=t(n.length);return getUint8Memory0().subarray(r,r+n.length).set(n),WASM_VECTOR_LEN=n.length,r}let r=e.length,s=t(r);const o=getUint8Memory0();let i=0;for(;i<r;i++){const t=e.charCodeAt(i);if(t>127)break;o[s+i]=t}if(i!==r){0!==i&&(e=e.slice(i)),s=n(s,r,r=i+3*e.length);const t=getUint8Memory0().subarray(s+i,s+r);i+=encodeString(e,t).written}return WASM_VECTOR_LEN=i,s}function is_match(e,t){var n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,s=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),o=WASM_VECTOR_LEN;return 0!==wasm.is_match(n,r,s,o)}async function load(t,n){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,n)}catch(e){if("application/wasm"==t.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const r=await t.arrayBuffer();return await WebAssembly.instantiate(r,n)}{const e=await WebAssembly.instantiate(t,n);return e instanceof WebAssembly.Instance?{instance:e,module:t}:e}}async function init(e){("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:t,module:n}=await load(await e,{});return wasm=t.exports,init.__wbindgen_wasm_module=n,wasm}const defaultUpdateOptions={only:[],source:"",debug:!1,data:void 0,queue:!1,force:!1};function log(e,t){console.debug(e,t)}function getDefaultOptions(){return{delimiter:".",debug:!1,extraDebug:!1,useMute:!0,notRecursive:";",param:":",wildcard:"*",experimentalMatch:!1,queue:!1,defaultBulkValue:!0,useCache:!1,useSplitCache:!1,useIndicesCache:!1,maxSimultaneousJobs:1e3,maxQueueRuns:1e3,log:log,Promise:Promise}}function isObject$2(e){return e&&e.constructor?"Object"===e.constructor.name:"object"==typeof e&&null!==e}class DeepState{constructor(e={},t={}){this.jobsRunning=0,this.updateQueue=[],this.subscribeQueue=[],this.listenersIgnoreCache=new WeakMap,this.is_match=null,this.destroyed=!1,this.queueRuns=0,this.groupId=0,this.namedGroups=[],this.numberGroups=[],this.traceId=0,this.traceMap=new Map,this.tracing=[],this.savedTrace=[],this.collection=null,this.collections=0,this.cache=new Map,this.splitCache=new Map,this.indices=new Map,this.indicesCount=new Map,this.lastExecs=new WeakMap,this.listeners=new Map,this.waitingListeners=new Map,this.options=Object.assign(Object.assign({},getDefaultOptions()),t),this.data=e,this.id=0,this.options.useCache?(this.pathGet=this.cacheGet,this.pathSet=this.cacheSet):(this.pathGet=ObjectPath.get,this.pathSet=ObjectPath.set),t.Promise?this.resolved=t.Promise.resolve():this.resolved=Promise.resolve(),this.muted=new Set,this.mutedListeners=new Set,this.scan=new WildcardObject(this.data,this.options.delimiter,this.options.wildcard),this.destroyed=!1}getDefaultListenerOptions(){return{bulk:!1,bulkValue:this.options.defaultBulkValue,debug:!1,source:"",data:void 0,queue:!1,group:!1}}cacheGet(e,t=this.data,n=!1){const r=e.join(this.options.delimiter),s=this.cache.get(r);if(s){const e=s.deref();if(e)return e}const o=ObjectPath.get(e,t,n);return(isObject$2(o)||Array.isArray(o))&&this.cache.set(r,new WeakRef(o)),o}cacheSet(e,t,n=this.data){const r=e.join(this.options.delimiter);return isObject$2(t)||Array.isArray(t)?this.cache.set(r,new WeakRef(t)):this.cache.delete(r),ObjectPath.set(e,t,n)}silentSet(e,t){return this.pathSet(this.split(e),t,this.data)}loadWasmMatcher(e){return __awaiter(this,void 0,void 0,function*(){yield init(e),this.is_match=is_match,this.scan=new WildcardObject(this.data,this.options.delimiter,this.options.wildcard,this.is_match)})}same(e,t){return(["number","string","undefined","boolean"].includes(typeof e)||null===e)&&t===e}getListeners(){return this.listeners}destroy(){this.destroyed=!0,this.data=void 0,this.listeners=new Map,this.waitingListeners=new Map,this.updateQueue=[],this.jobsRunning=0}match(e,t,n=!0){return this.is_match?this.is_match(e,t):e===t||(e===this.options.wildcard||t===this.options.wildcard||!(!n&&this.getIndicesCount(this.options.delimiter,e)<this.getIndicesCount(this.options.delimiter,t))&&this.scan.match(e,t))}getIndicesOf(e,t){if(this.options.useIndicesCache&&this.indices.has(t))return this.indices.get(t);const n=e.length;if(0==n)return[];let r,s=0,o=[];for(;(r=t.indexOf(e,s))>-1;)o.push(r),s=r+n;return this.options.useIndicesCache&&this.indices.set(t,o),o}getIndicesCount(e,t){if(this.options.useIndicesCache&&this.indicesCount.has(t))return this.indicesCount.get(t);const n=e.length;if(0==n)return 0;let r,s=0,o=0;for(;(r=t.indexOf(e,s))>-1;)o++,s=r+n;return this.options.useIndicesCache&&this.indicesCount.set(t,o),o}cutPath(e,t){if(""===t)return"";if((e=this.cleanNotRecursivePath(e))===(t=this.cleanNotRecursivePath(t)))return e;const n=this.getIndicesCount(this.options.delimiter,t),r=this.getIndicesOf(this.options.delimiter,e);return e.substring(0,r[n])}trimPath(e){return(e=this.cleanNotRecursivePath(e)).charAt(0)===this.options.delimiter?e.substr(1):e}split(e){if(""===e)return[];if(!this.options.useSplitCache)return e.split(this.options.delimiter);const t=this.splitCache.get(e);if(t)return t.slice();const n=e.split(this.options.delimiter);return this.splitCache.set(e,n.slice()),n}isWildcard(e){return e.includes(this.options.wildcard)||this.hasParams(e)}isNotRecursive(e){return e.endsWith(this.options.notRecursive)}cleanNotRecursivePath(e){return this.isNotRecursive(e)?e.substring(0,e.length-1):e}hasParams(e){return e.includes(this.options.param)}getParamsInfo(e){let t={replaced:"",original:e,params:{}},n=0,r=[];for(const s of this.split(e)){t.params[n]={original:s,replaced:"",name:""};const e=new RegExp(`\\${this.options.param}([^\\${this.options.delimiter}\\${this.options.param}]+)`,"g");let o=e.exec(s);o?(t.params[n].name=o[1],e.lastIndex=0,t.params[n].replaced=s.replace(e,this.options.wildcard),r.push(t.params[n].replaced),n++):(delete t.params[n],r.push(s),n++)}return t.replaced=r.join(this.options.delimiter),t}getParams(e,t){if(!e)return;const n=this.split(t),r={};for(const s in e.params){r[e.params[s].name]=n[s]}return r}waitForAll(e,t){const n={};for(let r of e)n[r]={dirty:!1},this.hasParams(r)&&(n[r].paramsInfo=this.getParamsInfo(r)),n[r].isWildcard=this.isWildcard(r),n[r].isRecursive=!this.isNotRecursive(r);return this.waitingListeners.set(e,{fn:t,paths:n}),t(n),function(){this.waitingListeners.delete(e)}}executeWaitingListeners(e){if(!this.destroyed)for(const t of this.waitingListeners.values()){const{fn:n,paths:r}=t;let s=0,o=0;for(let t in r){const n=r[t];let i=!1;n.isRecursive&&(e=this.cutPath(e,t)),n.isWildcard&&this.match(t,e)&&(i=!0),e===t&&(i=!0),i&&(n.dirty=!0),n.dirty&&s++,o++}s===o&&n(r)}}subscribeAll(e,t,n=this.getDefaultListenerOptions()){if(this.destroyed)return()=>{};let r=[],s=0,o=null;"boolean"==typeof n.group&&n.group?(this.groupId++,o=this.groupId,n.bulk=!0):"string"==typeof n.group&&(n.bulk=!0,o=n.group);for(const i of e)r.push(this.subscribe(i,t,n,{all:e,index:s,groupId:o})),s++;return function(){for(const e of r)e()}}getCleanListenersCollection(e={}){return Object.assign({listeners:new Map,isRecursive:!1,isWildcard:!1,hasParams:!1,match:void 0,paramsInfo:void 0,path:void 0,originalPath:void 0,count:0},e)}getCleanListener(e,t=this.getDefaultListenerOptions()){return{fn:e,options:Object.assign(Object.assign({},this.getDefaultListenerOptions()),t),groupId:null}}getListenerCollectionMatch(e,t,n){e=this.cleanNotRecursivePath(e);const r=this;return function(s,o=!1){let i=e;return t?s=r.cutPath(s,e):i=r.cutPath(r.cleanNotRecursivePath(e),s),o&&console.log("[getListenerCollectionMatch]",{listenerPath:e,scopedListenerPath:i,path:s,isRecursive:t,isWildcard:n}),!(!n||!r.match(i,s,t))||i===s}}getListenersCollection(e,t){if(this.listeners.has(e)){let n=this.listeners.get(e);return n.listeners.set(++this.id,t),t.id=this.id,n}const n=this.hasParams(e);let r;n&&(r=this.getParamsInfo(e));let s={isRecursive:!this.isNotRecursive(e),isWildcard:this.isWildcard(e),hasParams:n,paramsInfo:r,originalPath:e,path:n?r.replaced:e};s.isRecursive||(s.path=this.cleanNotRecursivePath(s.path));let o=this.getCleanListenersCollection(Object.assign(Object.assign({},s),{match:this.getListenerCollectionMatch(s.path,s.isRecursive,s.isWildcard)}));return this.id++,o.listeners.set(this.id,t),t.id=this.id,this.listeners.set(s.originalPath,o),o}subscribe(e,t,n=this.getDefaultListenerOptions(),r={all:[e],index:0,groupId:null}){if(this.destroyed)return()=>{};this.jobsRunning++;const s="subscribe";let o=this.getCleanListener(t,n);n.group&&(n.bulk=!0,"string"==typeof n.group?o.groupId=n.group:r.groupId&&(o.groupId=r.groupId)),this.listenersIgnoreCache.set(o,{truthy:[],falsy:[]});const i=this.getListenersCollection(e,o);n.debug&&console.log("[subscribe]",{listenerPath:e,options:n}),i.count++;let a=!0;if(o.groupId&&("string"==typeof o.groupId?this.namedGroups.includes(o.groupId)?a=!1:this.namedGroups.push(o.groupId):"number"==typeof o.groupId&&(this.numberGroups.includes(o.groupId)?a=!1:this.numberGroups.push(o.groupId))),a){const r=this.cleanNotRecursivePath(i.path),a=this.split(r);if(i.isWildcard){const a=this.scan.get(r);if(n.bulk){const r=[];for(const e in a)this.isMuted(e)||r.push({path:e,params:this.getParams(i.paramsInfo,e),value:a[e]});this.isMuted(t)||t(r,{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:void 0},options:n,params:void 0})}else for(const r in a)this.isMuted(r)||this.isMuted(t)||t(a[r],{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(r)},params:this.getParams(i.paramsInfo,r),options:n})}else this.isMuted(r)||this.isMuted(t)||t(this.pathGet(a,this.data),{type:s,listener:o,listenersCollection:i,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(e)},params:this.getParams(i.paramsInfo,r),options:n})}return this.debugSubscribe(o,i,e),this.jobsRunning--,this.unsubscribe(e,this.id)}unsubscribe(e,t){const n=this.listeners,r=n.get(e);return function(){r.listeners.delete(t),r.count--,0===r.count&&n.delete(e)}}runQueuedListeners(){if(!this.destroyed&&0!==this.subscribeQueue.length)if(0===this.jobsRunning){this.queueRuns=0;const e=[...this.subscribeQueue];for(let t=0,n=e.length;t<n;t++)e[t]();this.subscribeQueue.length=0}else{if(this.queueRuns++,this.queueRuns>=this.options.maxQueueRuns)throw this.queueRuns=0,new Error("Maximal number of queue runs exhausted.");Promise.resolve().then(()=>this.runQueuedListeners()).catch(e=>{throw e})}}getQueueNotifyListeners(e,t=[]){for(const n in e){if(this.isMuted(n))continue;let{single:r,bulk:s}=e[n];for(const e of r){let n=!1,r=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(r=e.listener.id+":"+e.eventInfo.path.listener);for(const e of t)if(r===e.resolvedIdPath){n=!0;break}if(n)continue;const s=this.debugTime(e);if(!this.isMuted(e.listener.fn))if(e.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>{e.listener.fn(e.value?e.value():void 0,e.eventInfo)});else{let n=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(n=e.listener.id+":"+e.eventInfo.path.listener),t.push({id:e.listener.id,resolvedPath:e.eventInfo.path.resolved,resolvedIdPath:n,originalFn:e.listener.fn,fn:()=>{e.listener.fn(e.value?e.value():void 0,e.eventInfo)},options:e.listener.options,groupId:e.listener.groupId})}this.debugListener(s,e)}for(const e of s){let n=!1;for(const o of t)if(o.id===e.listener.id){n=!0;break}if(n)continue;const r=this.debugTime(e),s=[];for(const t of e.value)s.push(Object.assign(Object.assign({},t),{value:t.value?t.value():void 0}));if(!this.isMuted(e.listener.fn))if(e.listener.options.queue&&this.jobsRunning)this.subscribeQueue.push(()=>!this.jobsRunning&&(e.listener.fn(s,e.eventInfo),!0));else{let n=e.listener.id+":"+e.eventInfo.path.resolved;e.eventInfo.path.resolved||(n=e.listener.id+":"+e.eventInfo.path.listener),t.push({id:e.listener.id,resolvedPath:e.eventInfo.path.resolved,resolvedIdPath:n,originalFn:e.listener.fn,fn:()=>{e.listener.fn(s,e.eventInfo)},options:e.listener.options,groupId:e.listener.groupId})}this.debugListener(r,e)}}return Promise.resolve().then(()=>this.runQueuedListeners()),t}shouldIgnore(e,t){if(!e.options.ignore)return!1;for(const n of e.options.ignore){if(t.startsWith(n))return!0;if(this.is_match&&this.is_match(n,t))return!0;{const e=this.cutPath(t,n);if(this.match(n,e))return!0}}return!1}getSubscribedListeners(e,t,n,r="update",s=null){n=Object.assign(Object.assign({},defaultUpdateOptions),n);const o={};for(let[i,a]of this.listeners)if(a.match(e)){o[i]={single:[],bulk:[],bulkData:[]};const c=a.paramsInfo?this.getParams(a.paramsInfo,e):void 0,l=this.cutPath(e,i),u=a.isRecursive||a.isWildcard?()=>this.get(l):()=>t,d=[{value:u,path:e,params:c}];for(const t of a.listeners.values())this.shouldIgnore(t,e)?t.options.debug&&console.log("[getSubscribedListeners] Listener was not fired because it was ignored.",{listener:t,listenersCollection:a}):t.options.bulk?o[i].bulk.push({listener:t,listenersCollection:a,eventInfo:{type:r,listener:t,path:{listener:i,update:s||e,resolved:void 0},params:c,options:n},value:d}):o[i].single.push({listener:t,listenersCollection:a,eventInfo:{type:r,listener:t,path:{listener:i,update:s||e,resolved:this.cleanNotRecursivePath(e)},params:c,options:n},value:u})}else if(this.options.extraDebug){let t=!1;for(const n of a.listeners.values())n.options.debug&&(t=!0,console.log("[getSubscribedListeners] Listener was not fired because there was no match.",{listener:n,listenersCollection:a,updatePath:e}));t&&a.match(e,!0)}return o}notifySubscribedListeners(e,t,n,r="update",s=null){return this.getQueueNotifyListeners(this.getSubscribedListeners(e,t,n,r,s))}useBulkValue(e){for(const[t,n]of e.listeners){if(n.options.bulk&&n.options.bulkValue)return!0;if(!n.options.bulk)return!0}return!1}getNestedListeners(e,t,n,r="update",s=null){const o={},i={};for(let[a,c]of this.listeners){if(!c.isRecursive)continue;const l=this.cutPath(a,e);if(this.match(l,e)){o[a]={single:[],bulk:[]};const u=this.trimPath(a.substr(l.length)),d=this.useBulkValue(c);let p;d&&(p=i[u]?i[u]:new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(u),i[u]=p);const h=c.paramsInfo?this.getParams(c.paramsInfo,e):void 0,f=[],g={};for(const[t,i]of c.listeners)if(d)for(const l in p){const u=()=>p[l],d=[e,l].join(this.options.delimiter),m={type:r,listener:i,listenersCollection:c,path:{listener:a,update:s||e,resolved:this.cleanNotRecursivePath(d)},params:h,options:n};this.shouldIgnore(i,e)||(i.options.bulk?(f.push({value:u,path:d,params:h}),g[t]=i):o[a].single.push({listener:i,listenersCollection:c,eventInfo:m,value:u}))}else{const l={type:r,listener:i,listenersCollection:c,path:{listener:a,update:s||e,resolved:void 0},params:h,options:n};if(this.shouldIgnore(i,e))continue;i.options.bulk?(f.push({value:void 0,path:void 0,params:h}),g[t]=i):o[a].single.push({listener:i,listenersCollection:c,eventInfo:l,value:void 0})}for(const t in g){const s=g[t],i={type:r,listener:s,listenersCollection:c,path:{listener:a,update:e,resolved:void 0},options:n,params:h};o[a].bulk.push({listener:s,listenersCollection:c,eventInfo:i,value:f})}}else if(this.options.extraDebug)for(const t of c.listeners.values())t.options.debug&&console.log("[getNestedListeners] Listener was not fired because there was no match.",{listener:t,listenersCollection:c,currentCutPath:l,updatePath:e})}return o}notifyNestedListeners(e,t,n,r="update",s,o=null){return this.getQueueNotifyListeners(this.getNestedListeners(e,t,n,r,o),s)}getNotifyOnlyListeners(e,t,n,r="update",s=null){const o={};if("object"!=typeof n.only||!Array.isArray(n.only)||void 0===n.only[0]||!this.canBeNested(t))return o;for(const i of n.only){const a=new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(i);o[i]={bulk:[],single:[]};for(const t in a){const c=e+this.options.delimiter+t;for(const[l,u]of this.listeners){const d=u.paramsInfo?this.getParams(u.paramsInfo,c):void 0;if(this.match(l,c)){const p=()=>a[t],h=[{value:p,path:c,params:d}];for(const t of u.listeners.values()){const a={type:r,listener:t,listenersCollection:u,path:{listener:l,update:s||e,resolved:this.cleanNotRecursivePath(c)},params:d,options:n};this.shouldIgnore(t,e)||(t.options.bulk?o[i].bulk.some(e=>e.listener===t)||o[i].bulk.push({listener:t,listenersCollection:u,eventInfo:a,value:h}):o[i].single.push({listener:t,listenersCollection:u,eventInfo:a,value:p}))}}}}}return o}runQueue(e){const t=[];for(const n of e)n.options.group?t.includes(n.groupId)||(n.fn(),t.push(n.groupId)):n.fn()}sortAndRunQueue(e,t){e.sort(function(e,t){return e.id-t.id}),this.options.debug&&console.log(`[deep-state-observer] queue for ${t}`,e),this.runQueue(e)}notifyOnly(e,t,n,r="update",s=""){const o=this.getQueueNotifyListeners(this.getNotifyOnlyListeners(e,t,n,r,s));this.sortAndRunQueue(o,e)}canBeNested(e){return"object"==typeof e&&null!==e}getUpdateValues(e,t){let n=t;return"function"==typeof t&&(n=t(e)),{newValue:n,oldValue:e}}wildcardNotify(e,t){let n=[];for(const r of e)this.getQueueNotifyListeners(r,n);for(const r of t)this.executeWaitingListeners(r);return this.jobsRunning--,n}wildcardUpdate(e,t,n=defaultUpdateOptions,r=!1){++this.jobsRunning,n=Object.assign(Object.assign({},defaultUpdateOptions),n);const s=this.scan.get(e),o={};for(const l in s){const e=this.split(l),{oldValue:r,newValue:i}=this.getUpdateValues(s[l],t);this.same(i,r)&&!n.force||(this.pathSet(e,i,this.data),o[l]=i)}const i=[],a=[];for(const l in o){const t=o[l];n.only.length?i.push(this.getNotifyOnlyListeners(l,t,n,"update",e)):(i.push(this.getSubscribedListeners(l,t,n,"update",e)),this.canBeNested(t)&&i.push(this.getNestedListeners(l,t,n,"update",e))),n.debug&&this.options.log("Wildcard update",{path:l,newValue:t}),a.push(l)}if(r){const t=this;return function(){const n=t.wildcardNotify(i,a);t.sortAndRunQueue(n,e)}}const c=this.wildcardNotify(i,a);this.sortAndRunQueue(c,e)}runUpdateQueue(){if(!this.destroyed)for(;this.updateQueue.length&&this.updateQueue.length<this.options.maxSimultaneousJobs;){const e=this.updateQueue.shift();e.options.queue=!1,this.update(e.updatePath,e.fnOrValue,e.options,e.multi)}}updateNotify(e,t,n){const r=this.notifySubscribedListeners(e,t,n);this.canBeNested(t)&&this.notifyNestedListeners(e,t,n,"update",r),this.sortAndRunQueue(r,e),this.executeWaitingListeners(e)}updateNotifyAll(e){let t=[];for(const n of e){const e=n.newValue;if(this.tracing.length){const t=this.tracing[this.tracing.length-1],r=this.traceMap.get(t);r.changed.push({traceId:t,updatePath:n.updatePath,fnOrValue:e,options:n.options}),this.traceMap.set(t,r)}t=t.concat(this.notifySubscribedListeners(n.updatePath,e,n.options)),this.canBeNested(n.newValue)&&this.notifyNestedListeners(n.updatePath,e,n.options,"update",t)}this.runQueue(t)}updateNotifyOnly(e,t,n){this.notifyOnly(e,t,n),this.executeWaitingListeners(e)}update(e,t,n=Object.assign({},defaultUpdateOptions),r=!1){if(this.destroyed)return;if(this.collection)return this.collection.update(e,t,n);if(this.tracing.length){const r=this.tracing[this.tracing.length-1],s=this.traceMap.get(r);s.changed.push({traceId:r,updatePath:e,fnOrValue:t,options:n}),this.traceMap.set(r,s)}const s=this.jobsRunning;if((this.options.queue||n.queue)&&s){if(s>this.options.maxSimultaneousJobs)throw new Error("Maximal simultaneous jobs limit reached.");this.updateQueue.push({updatePath:e,fnOrValue:t,options:n,multi:r});const o=Promise.resolve().then(()=>{this.runUpdateQueue()});return r?function(){return o}:o}if(this.isWildcard(e))return this.wildcardUpdate(e,t,n,r);++this.jobsRunning;const o=this.split(e),i=this.pathGet(o,this.data);let{oldValue:a,newValue:c}=this.getUpdateValues(i,t);if(n.debug&&this.options.log(`Updating ${e} ${n.source?`from ${n.source}`:""}`,{oldValue:a,newValue:c}),this.same(c,a)&&!n.force)return--this.jobsRunning,r?function(){return c}:c;if(this.pathSet(o,c,this.data),null===(n=Object.assign(Object.assign({},defaultUpdateOptions),n)).only)return--this.jobsRunning,r?function(){}:c;if(n.only.length){if(--this.jobsRunning,r){const t=this;return function(){return t.updateNotifyOnly(e,c,n)}}return this.updateNotifyOnly(e,c,n),c}if(r){--this.jobsRunning;const t=this;return function(){return t.updateNotify(e,c,n)}}return this.updateNotify(e,c,n),--this.jobsRunning,c}multi(e=!1){if(this.destroyed)return{update(){return this},done(){},getStack:()=>[]};if(this.collection)return this.collection;const t=this,n=[],r=[];return{update(s,o,i=defaultUpdateOptions){if(e){const e=t.split(s);let r=o;const a=t.pathGet(e,t.data);"function"==typeof r&&(r=r(a)),t.pathSet(e,r,t.data),n.push({updatePath:s,newValue:r,options:i})}else r.push(t.update(s,o,i,!0));return this},done(){if(0===t.collections){if(e)t.updateNotifyAll(n);else for(const e of r)e();n.length=0}},getStack:()=>n}}collect(){return this.collections++,this.collection||(this.collection=this.multi(!0)),this.collection}executeCollected(){if(this.collections--,0===this.collections&&this.collection){const e=this.collection;this.collection=null,e.done()}}getCollectedCount(){return this.collections}getCollectedStack(){return this.collection?this.collection.getStack():[]}get(e=void 0){if(!this.destroyed)return void 0===e||""===e?this.data:this.isWildcard(e)?this.scan.get(e):this.pathGet(this.split(e),this.data)}last(e){let t=this.lastExecs.get(e);t||(t={calls:0},this.lastExecs.set(e,t));const n=++t.calls;this.resolved.then(()=>{n===t.calls&&(this.lastExecs.set(e,{calls:0}),e())})}isMuted(e){if(!this.options.useMute)return!1;if("function"==typeof e)return this.isMutedListener(e);for(const t of this.muted){const n=!this.isNotRecursive(t),r=this.trimPath(t);if(this.match(e,r))return!0;if(this.match(r,e))return!0;if(n){const n=this.cutPath(r,e);if(this.match(n,t))return!0;if(this.match(t,n))return!0}}return!1}isMutedListener(e){return this.mutedListeners.has(e)}mute(e){if("function"==typeof e)return this.mutedListeners.add(e);this.muted.add(e)}unmute(e){if("function"==typeof e)return this.mutedListeners.delete(e);this.muted.delete(e)}debugSubscribe(e,t,n){e.options.debug&&this.options.log("listener subscribed",{listenerPath:n,listener:e,listenersCollection:t})}debugListener(e,t){(t.eventInfo.options.debug||t.listener.options.debug)&&this.options.log("Listener fired",{time:Date.now()-e,info:t})}debugTime(e){return e.listener.options.debug||e.eventInfo.options.debug?Date.now():0}startTrace(e,t=null){this.traceId++;const n=this.traceId+":"+e;return this.traceMap.set(n,{id:n,sort:this.traceId,stack:this.tracing.map(e=>e),additionalData:t,changed:[]}),this.tracing.push(n),n}stopTrace(e){const t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),t}saveTrace(e){const t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),this.savedTrace.push(t),t}getSavedTraces(){const e=this.savedTrace.map(e=>e);return e.sort((e,t)=>e.sort-t.sort),this.savedTrace=[],e}}const ignoreFirstCall=e=>{let t=0;return(...n)=>{if(0!==t)return e(...n);t+=1}};class DeepObservedData extends ObservedData{state;subscribers=new Map;constructor(e){super(),this.state=new DeepState(e)}update=(e,t)=>{this.state?.update(t??"",e)};on=(e,t,n)=>{const r=this.state.subscribe(e,n?.immediate?t:ignoreFirstCall(t)),s=this.subscribers.get(e)??new Map;s.set(t,r),this.subscribers.set(e,s)};off=(e,t)=>{const n=this.subscribers.get(e);n&&(n.get(t)?.(),n.delete(t))};getData=e=>this.state?this.state?.get(e):{};destroy=()=>{this.subscribers.forEach(e=>{e.forEach(e=>e())})}}class Env{isIos=!1;isIphone=!1;isIpad=!1;isAndroid=!1;isAndroidPad=!1;isMac=!1;isWin=!1;isMqq=!1;isWechat=!1;isWeb=!1;isOpenHarmony=!1;constructor(e=globalThis.navigator?.userAgent??"",t={}){e&&(this.isIphone=e.indexOf("iPhone")>=0,this.isIpad=/(iPad).*OS\s([\d_]+)/.test(e),this.isIos=this.isIphone||this.isIpad,this.isAndroid=e.indexOf("Android")>=0,this.isAndroidPad=this.isAndroid&&e.indexOf("Mobile")<0,this.isMac=e.indexOf("Macintosh")>=0,this.isWin=e.indexOf("Windows")>=0,this.isMqq=/QQ\/([\d.]+)/.test(e),this.isWechat=e.indexOf("MicroMessenger")>=0&&e.indexOf("wxwork")<0,this.isOpenHarmony=e.includes("OpenHarmony"),this.isWeb=!(this.isIos||this.isAndroid||this.isOpenHarmony||/(WebOS|BlackBerry)/.test(e)),Object.entries(t).forEach(([e,t])=>{this[e]=t}))}}var NodeType=exports("N",(e=>(e.CONTAINER="container",e.PAGE="page",e.ROOT="app",e.PAGE_FRAGMENT="page-fragment",e))(NodeType||{}));const NODE_CONDS_KEY="displayConds",NODE_DISABLE_DATA_SOURCE_KEY="_tmagic_node_disabled_data_source",NODE_DISABLE_CODE_BLOCK_KEY="_tmagic_node_disabled_code_block";var ActionType=(e=>(e.COMP="comp",e.CODE="code",e.DATA_SOURCE="data-source",e))(ActionType||{}),HookType=(e=>(e.CODE="code",e))(HookType||{}),HookCodeType=(e=>(e.CODE="code",e.DATA_SOURCE_METHOD="data-source-method",e))(HookCodeType||{});const toLine=exports("A",(e="")=>e.replace(/\B([A-Z])/g,"-$1").toLowerCase()),getNodePath=(e,t=[])=>{const n=[],r=function(e,t){if(!Array.isArray(t))return null;for(let s=0,o=t.length;s<o;s++){const o=t[s];if(n.push(o),`${o.id}`==`${e}`)return o;if(o.items){const t=r(e,o.items);if(t)return t}n.pop()}return null};return r(e,t),n},filterXSS=e=>e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),getUrlParam=(e,t)=>{const n=location.href,r=new RegExp(`[?&#]${e}=([^&#]+)`,"gi"),s=n.match(r);let o;return s&&s.length>0?(o=s[s.length-1].split("="),o&&o.length>1?filterXSS(o[1]):""):""},isObject$1=e=>"[object Object]"===Object.prototype.toString.call(e),isPage=e=>!!e&&Boolean(e.type?.toLowerCase()===NodeType.PAGE),isPageFragment=e=>!!e&&Boolean(e.type?.toLowerCase()===NodeType.PAGE_FRAGMENT),isNumber$1=e=>/^(-?\d+)(\.\d+)?$/.test(e),getKeysArray=e=>`${e}`.replace(/\[(\d+)\]/g,".$1").split("."),getValueByKeyPath=(e="",t={})=>(Array.isArray(e)?e:getKeysArray(e)).reduce((n,r)=>{if(isObject$1(n))return n[r];if(Array.isArray(n)&&/^\d*$/.test(`${r}`))return n[r];throw new Error(`${t}中不存在${e}`)},t),setValueByKeyPath=(e,t,n={})=>set(n,e,t),getNodes=(e,t=[])=>{const n=[],r=function(e,t){if(Array.isArray(t))for(const s of t){const t=e.findIndex(e=>`${e}`==`${s.id}`);t>-1&&(e.splice(t,1),n.push(s)),s.items&&r(e,s.items)}};return r(e,t),n},getDepKeys=(e={},t)=>Array.from(Object.values(e).reduce((e,n)=>((n[t]?.keys||[]).forEach(t=>e.add(t)),e),new Set)),getDepNodeIds=(e={})=>Array.from(Object.values(e).reduce((e,t)=>(Object.keys(t).forEach(t=>{e.add(t)}),e),new Set)),replaceChildNode=(e,t,n)=>{const r=getNodePath(e.id,t),s=r.pop();let o=r.pop();if(!s)return void console.warn(`未找到目标节点(${e.id})`);if(!o)return void console.warn(`未找到父节点(${e.id})`);const i=o.items?.findIndex(e=>e.id===s.id);o.items.splice(i,1,e)},DSL_NODE_KEY_COPY_PREFIX="__tmagic__",IS_DSL_NODE_KEY=exports("I","__tmagic__dslNode"),PAGE_FRAGMENT_CONTAINER_ID_KEY=exports("P","tmagic-page-fragment-container-id"),compiledNode=(t,n,r={},s)=>{let o=[];if(s){const e=r[s];o=e?.[n.id].keys||[]}else o=getDepKeys(r,n.id);return o.forEach(r=>{const s=getKeysArray(r),o=s.map((e,t)=>t<s.length-1?e:`${DSL_NODE_KEY_COPY_PREFIX}${e}`);let i,a=getValueByKeyPath(o,n);if(void 0===a)try{const e=getValueByKeyPath(r,n);setValueByKeyPath(o.join("."),e,n),a=e}catch(e){return void console.warn(e)}try{i=t(a)}catch(e){console.error(e),i=""}setValueByKeyPath(r,i,n)}),n},compiledCond=(e,t,n,r=[])=>{switch("string"==typeof t&&void 0===n&&(n=""),e){case"is":case"=":return t===n;case"not":case"!=":return t!==n;case">":return t>n;case">=":return t>=n;case"<":return t<n;case"<=":return t<=n;case"between":return r.length>1&&t>=r[0]&&t<=r[1];case"not_between":return r.length<2||t<r[0]||t>r[1];case"include":return t?.includes?.(n);case"not_include":return void 0===t||!t.includes?.(n)}return!1},getDefaultValueFromFields=t=>{const n={},r={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return t.forEach(t=>{if(void 0===t.defaultValue)"object"!==t.type?t.type?n[t.name]=r[t.type]:n[t.name]=void 0:n[t.name]=t.fields?getDefaultValueFromFields(t.fields):r.object;else{if("array"===t.type&&!Array.isArray(t.defaultValue))return void(n[t.name]=r.array);if("object"===t.type&&!isObject$1(t.defaultValue)){if("string"==typeof t.defaultValue){try{n[t.name]=JSON.parse(t.defaultValue)}catch(e){n[t.name]=r.object,console.warn("defaultValue 解析失败",t.defaultValue,e)}return}return void(n[t.name]=r.object)}n[t.name]=cloneDeep(t.defaultValue)}}),n},DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX=exports("D","ds-field::"),DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX="ds-field-changed",dataSourceTemplateRegExp=/\$\{([\s\S]+?)\}/g,isDslNode=exports("G",e=>void 0===e[IS_DSL_NODE_KEY]||!0===e[IS_DSL_NODE_KEY]),traverseNode=(e,t,n=[],r=!1)=>{r||t(e,n),Array.isArray(e.items)&&e.items.length&&(n.push(e),e.items.forEach(e=>{traverseNode(e,t,[...n],r)})),r&&t(e,n)};class FlowState{isAbort;constructor(){this.isAbort=!1}abort(){this.isAbort=!0}reset(){this.isAbort=!1}}class EventHelper extends eventsExports.EventEmitter{app;eventQueue=[];nodeEventList=new Map;dataSourceEventList=new Map;beforeEventHandler;afterEventHandler;constructor({app:e,beforeEventHandler:t,afterEventHandler:n}){super(),this.beforeEventHandler=t,this.afterEventHandler=n,this.app=e}destroy(){this.removeNodeEvents(),this.removeAllListeners(),this.nodeEventList.clear(),this.dataSourceEventList.clear()}bindNodeEvents(e){e.events?.forEach((t,n)=>{if(!t.name)return;let r=`${t.name}_${e.data.id}`;const s=t.name.split(".");s.length>1&&(r=`${s[1]}_${s[0]}`);let o=Symbol(r);e.eventKeys.has(r)?o=e.eventKeys.get(r):e.eventKeys.set(r,o);const i=(t,...r)=>{this.eventHandler(n,e,r)};this.nodeEventList.set(i,o),this.on(o,i)})}removeNodeEvents(){for(const e of Array.from(this.nodeEventList.keys())){const t=this.nodeEventList.get(e);t&&this.off(t,e)}this.nodeEventList.clear()}bindDataSourceEvents(){const e=Array.from(this.app.dataSourceManager?.dataSourceMap.values()||[]);this.removeDataSourceEvents(e);for(const t of e){const e=this.dataSourceEventList.get(t.id)??new Map;for(const n of t.schema.events||[]){const[r,...s]=n.name?.split(".")||[];if(!r)return;const o=(...e)=>{this.eventHandler(n,t,e)};e.set(n.name,o),r===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?t?.onDataChange(s.join("."),o):t.on(r,o)}this.dataSourceEventList.set(t.id,e)}}removeDataSourceEvents(e){if(this.dataSourceEventList.size){for(const t of e){const e=this.dataSourceEventList.get(t.id);if(!e)return;for(const n of Array.from(e.keys())){const[r,...s]=n.split(".");r===DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX?t.offDataChange(s.join("."),e.get(n)):t.off(r,e.get(n))}}this.dataSourceEventList.clear()}}getEventQueue(){return this.eventQueue}addEventToQueue(e){this.eventQueue.push(e)}async eventHandler(t,n,r){const s="number"==typeof t?n.events[t]:t;if("function"==typeof this.beforeEventHandler&&this.beforeEventHandler({eventConfig:s,source:n,args:r}),has(s,"actions")){const e=new FlowState,{actions:o}=s;for(let s=0;s<o.length&&!e?.isAbort;s++)if("number"==typeof t){const o=n.events[t].actions[s];await this.actionHandler(o,n,r,e)}else await this.actionHandler(o[s],n,r,e);e.reset()}else try{await this.compActionHandler(s,n,r)}catch(e){if(!this.app.errorHandler)throw e;this.app.errorHandler(e,n,{type:"action-handler",config:s,...r})}"function"==typeof this.afterEventHandler&&this.afterEventHandler({eventConfig:s,source:n,args:r})}async actionHandler(t,n,r,s){try{if(t.actionType===ActionType.COMP){const e=t;await this.compActionHandler(e,n,r)}else if(t.actionType===ActionType.CODE){if(n.data[NODE_DISABLE_CODE_BLOCK_KEY])return;const e=t;await this.app.runCode(e.codeId,e.params||{},r,s)}else if(t.actionType===ActionType.DATA_SOURCE){if(n.data[NODE_DISABLE_DATA_SOURCE_KEY])return;const e=t,[o,i]=e.dataSourceMethod;await this.app.runDataSourceMethod(o,i,e.params||{},r,s)}}catch(e){if(!this.app.errorHandler)throw e;this.app.errorHandler(e,n,{type:"action-handler",config:t,flowState:s,...r})}}async compActionHandler(e,t,n){if(!this.app.page)throw new Error("当前没有页面");let{method:r,to:s}=e;Array.isArray(r)&&([s,r]=r);const o=[],i=this.app.getNode(s);i&&o.push(i);for(const[,c]of this.app.pageFragments){const e=c.getNode(s);e&&o.push(e)}if(0===o.length)return void this.addEventToQueue({toId:s,method:r,fromCpt:t,args:n});const a=[];for(const c of o)c.instance?"function"==typeof c.instance[r]&&a.push(c.instance[r](t,...n)):c.addEventToQueue({method:r,fromCpt:t,args:n});await Promise.all(a)}}class Flexible{designWidth=375;tid;constructor(e){"complete"===globalThis.document.readyState?this.setBodyFontSize():globalThis.document.addEventListener("DOMContentLoaded",this.setBodyFontSize,!1),globalThis.addEventListener("resize",this.resizeHandler,!1),globalThis.addEventListener("pageshow",this.pageshowHandler,!1),void 0!==e?.designWidth&&this.setDesignWidth(e.designWidth)}destroy(){globalThis.document.removeEventListener("DOMContentLoaded",this.setBodyFontSize,!1),globalThis.removeEventListener("resize",this.resizeHandler,!1),globalThis.removeEventListener("pageshow",this.pageshowHandler,!1)}setDesignWidth(e){this.designWidth=e,this.refreshRem()}setBodyFontSize(){globalThis.document.body.style.fontSize=".12rem"}refreshRem(){const{width:e}=document.documentElement.getBoundingClientRect(),t=e/(this.designWidth/100);globalThis.document.documentElement.style.fontSize=`${t}px`,globalThis.document.documentElement.style.fontSize=`${this.correctRem(t)}px`}correctRem(e){const{document:t}=globalThis,n=t.createElement("div");n.style.cssText="width:1rem;height:0;overflow:hidden;position:absolute;z-index:-1;visibility:hidden;",t.documentElement.appendChild(n);const r=n.offsetWidth;return t.documentElement.removeChild(n),Math.abs(r-e)>1?e**2/r:e}resizeHandler=()=>{clearTimeout(this.tid),this.tid=setTimeout(()=>{this.refreshRem(),this.tid=void 0},300)};pageshowHandler=e=>{e.persisted&&this.resizeHandler()}}class Store{data;constructor({initialData:e={}}={}){this.data=e}set(e,t){this.data[e]=t}get(e){return this.data[e]}}class Node extends eventsExports.EventEmitter{data;style;events=[];instance=null;page;parent;app;store;eventKeys=new Map;eventQueue=[];constructor(e){super(),this.store=new Store({initialData:e.app.nodeStoreInitialData?.()||{}}),this.page=e.page,this.parent=e.parent,this.app=e.app,this.setData(e.config),this.listenLifeSafe()}setData(t){this.data=t;const{events:n,style:r}=t;this.events=n||[],this.style=r||{};try{!this.instance||Object.isFrozen(this.instance)||!1===Object.getOwnPropertyDescriptor(this.instance,"config")?.writable||this.instance.__isVue||(this.instance.config=t)}catch(e){}this.emit("update-data",t)}addEventToQueue(e){this.eventQueue.push(e)}registerMethod(e){if(e){this.instance||(this.instance={});for(const[t,n]of Object.entries(e))"function"==typeof n&&(this.instance[t]=n)}}setInstance(e){this.instance=e}async runHookCode(e,t){if("function"==typeof this.data[e])return void(await this.data[e](this));const n=this.data[e];if(n?.hookType===HookType.CODE)for(const r of n.hookData){const{codeType:e=HookCodeType.CODE,codeId:n,params:s={}}=r;e===HookCodeType.CODE&&"string"==typeof n?await this.app.runCode(n,t||s,[],void 0,this):e===HookCodeType.DATA_SOURCE_METHOD&&Array.isArray(n)&&n.length>1&&await this.app.runDataSourceMethod(n[0],n[1],t||s,[],void 0,this)}}destroy(){this.eventQueue.length=0,this.instance=null,this.events=[],this.style={},this.removeAllListeners()}listenLifeSafe(){this.once("created",e=>{this.once("destroy",()=>{this.instance=null,!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("destroy"),this.listenLifeSafe()}),e&&this.setInstance(e),!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("created")}),this.once("mounted",e=>{(async()=>{e&&this.setInstance(e);for(let t=this.eventQueue.shift();t;t=this.eventQueue.shift())"function"==typeof e[t.method]&&await e[t.method](t.fromCpt,...t.args);if(this.app.eventHelper){for(const t of this.app.eventHelper.getEventQueue())for(const[,n]of this.app.pageFragments){const r=n.getNode(t.toId);r&&r===this&&("function"==typeof e[t.method]&&await e[t.method](t.fromCpt,...t.args),t.handled=!0)}this.app.eventHelper.eventQueue=this.app.eventHelper.getEventQueue().filter(e=>!e.handled)}!0!==this.data[NODE_DISABLE_CODE_BLOCK_KEY]&&this.runHookCode("mounted")})()})}}class IteratorContainer extends Node{nodes=[];setData(e){this.resetNodes(),super.setData(e)}resetNodes(){this.nodes?.forEach(e=>{e.forEach(e=>{e.destroy()})}),this.nodes=[]}initNode(e,t,n){if(n.has(e.id)&&n.get(e.id)?.destroy(),e.type&&this.app.iteratorContainerType.has(e.type)){const r=new IteratorContainer({config:e,parent:t,page:this.page,app:this.app});return n.set(e.id,r),void this.app.eventHelper?.bindNodeEvents(r)}const r=new Node({config:e,parent:t,page:this.page,app:this.app});if(this.app.eventHelper?.bindNodeEvents(r),n.set(e.id,r),e.type&&this.app.pageFragmentContainerType.has(e.type)&&e.pageFragmentId){const t=this.app.dsl?.items?.find(t=>t.id===e.pageFragmentId);t&&(e.items=[t])}e.items?.forEach(e=>{this.initNode(e,r,n)})}setNodes(e,t){const n=this.nodes[t]||new Map;e.forEach(e=>{this.initNode(e,this,n)}),this.nodes[t]=n}getNode(e,t){return this.nodes[t]?.get(e)}destroy(){super.destroy(),this.resetNodes()}}class Page extends Node{nodes=new Map;constructor(e){super(e),this.setNode(e.config.id,this),e.config.items.forEach(e=>{this.initNode(e,this)})}initNode(e,t){if(e.type&&this.app.iteratorContainerType.has(e.type))return void this.setNode(e.id,new IteratorContainer({config:e,parent:t,page:this,app:this.app}));const n=new(e.type&&App.nodeClassMap.get(e.type)||Node)({config:e,parent:t,page:this,app:this.app});if(this.setNode(e.id,n),e.type&&this.app.pageFragmentContainerType.has(e.type)&&e.pageFragmentId){const t=this.app.dsl?.items?.find(t=>t.id===e.pageFragmentId);t&&this.app.pageFragments.set(e.id,new Page({config:t,app:this.app}))}e.items?.forEach(e=>{this.initNode(e,n)})}getNode(e,{iteratorContainerId:t,iteratorIndex:n,pageFragmentContainerId:r}={}){if(this.nodes.has(e))return this.nodes.get(e);if(r)return this.app.pageFragments.get(r)?.getNode(e,{iteratorContainerId:t,iteratorIndex:n});if(Array.isArray(t)&&t.length&&Array.isArray(n)){let r=this.nodes.get(t[0]);for(let e=1,s=t.length;e<s;e++)r=r?.getNode(t[e],n[e-1]);return r?.getNode(e,n[n.length-1])}}setNode(e,t){this.nodes.set(e,t)}deleteNode(e){this.nodes.delete(e)}destroy(){this.nodes.forEach(e=>{e!==this&&e.destroy()}),this.nodes.clear(),super.destroy()}}const style2Obj=e=>{if("string"!=typeof e)return e;const t={};return e.split(";").forEach(e=>{if(!e)return;const n=e.split(":");let r=n.shift(),s=n.join(":");r&&(r=r.replace(/^\s*/,"").replace(/\s*$/,""),s=s.replace(/^\s*/,"").replace(/\s*$/,""),r=r.split("-").map((e,t)=>t>0?`${e[0].toUpperCase()}${e.substr(1)}`:e).join(""),t[r]=s)}),t},fillBackgroundImage=e=>!e||/^url/.test(e)||/^linear-gradient/.test(e)?e:`url(${e})`,getTransform=(e,t)=>{if(!e)return[];const n=Object.entries(e).map(([e,n])=>n.trim()?("rotate"===e&&isNumber$1(n)&&(n=`${n}deg`),"hippy"!==t?`${e}(${n})`:{[e]:n}):"");if("hippy"===t)return n;const r=n.join(" ");return r.trim()?r:"none"},transformStyle=(e,t)=>{if(!e)return{};let n={};const r={};n="string"==typeof e?style2Obj(e):{...e};const s="hippy"===t,o=["zIndex","opacity","fontWeight"];return Object.entries(n).forEach(([e,n])=>{"scale"===e&&!r.transform&&s?r.transform=[{scale:n}]:"backgroundImage"!==e||s?"transform"===e&&"string"!=typeof n?r[e]=getTransform(n,t):!o.includes(e)&&n&&/^[-]?[0-9]*[.]?[0-9]*$/.test(n)?r[e]=s?n:n/100+"rem":r[e]=n:n&&(r[e]=fillBackgroundImage(n))}),r},COMMON_EVENT_PREFIX=exports("C","magic:common:events:");class App extends eventsExports.EventEmitter{static nodeClassMap=new Map;static registerNode(e,t){App.nodeClassMap.set(e,t)}env;dsl;codeDsl;dataSourceManager;page;pageFragments=new Map;useMock=!1;platform="mobile";jsEngine="browser";components=new Map;pageFragmentContainerType=new Set(["page-fragment-container"]);iteratorContainerType=new Set(["iterator-container"]);request;transformStyle;eventHelper;errorHandler;nodeStoreInitialData;flexible;constructor(e){if(super(),e.env?this.setEnv(e.env):this.setEnv(e.ua),this.errorHandler=e.errorHandler,this.codeDsl=e.config?.codeBlocks,e.platform&&(this.platform=e.platform),e.jsEngine&&(this.jsEngine=e.jsEngine),e.nodeStoreInitialData&&(this.nodeStoreInitialData=e.nodeStoreInitialData),e.pageFragmentContainerType){(Array.isArray(e.pageFragmentContainerType)?e.pageFragmentContainerType:[e.pageFragmentContainerType]).forEach(e=>{this.pageFragmentContainerType.add(e)})}if(e.iteratorContainerType){(Array.isArray(e.iteratorContainerType)?e.iteratorContainerType:[e.iteratorContainerType]).forEach(e=>{this.iteratorContainerType.add(e)})}"boolean"==typeof e.useMock&&(this.useMock=e.useMock),"browser"!==this.jsEngine||e.disabledFlexible||(this.flexible=new Flexible({designWidth:e.designWidth})),"editor"!==this.platform&&(this.eventHelper=new EventHelper({app:this,beforeEventHandler:e.beforeEventHandler,afterEventHandler:e.afterEventHandler})),this.transformStyle=e.transformStyle||(e=>transformStyle(e,this.jsEngine)),e.request&&(this.request=e.request),e.config&&this.setConfig(e.config,e.curPage,e.dataSourceManagerInitialData)}setEnv(e){this.env=e&&"string"!=typeof e?e:new Env(e)}setDesignWidth(e){this.flexible?.setDesignWidth(e)}setConfig(e,t,n){this.dsl=e,!t&&e.items.length&&(t=e.items[0].id),this.dataSourceManager&&this.dataSourceManager.destroy(),this.dataSourceManager=createDataSourceManager(this,this.useMock,n),this.codeDsl=e.codeBlocks;const r=t||this.page?.data?.id;super.emit("dsl-change",{dsl:e,curPage:r}),this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.setPage(r),this.dataSourceManager&&(this.dataSourceManager.isAllDataSourceRegistered()?this.eventHelper?.bindDataSourceEvents():this.dataSourceManager.once("registered-all",()=>{this.eventHelper?.bindDataSourceEvents()}))}setPage(e){const t=this.dsl?.items.find(t=>`${t.id}`==`${e}`);if(!t)return this.deletePage(),void super.emit("page-change");if(this.page){if(t===this.page.data)return;this.page.destroy()}if(this.page=new Page({config:t,app:this}),this.eventHelper){this.eventHelper.removeNodeEvents();for(const[,e]of this.page.nodes)this.eventHelper.bindNodeEvents(e);for(const[,e]of this.pageFragments)for(const[,t]of e.nodes)this.eventHelper.bindNodeEvents(t)}super.emit("page-change",this.page)}deletePage(){this.page?.destroy(),this.eventHelper?.removeNodeEvents(),this.page=void 0}getPage(e){return e?this.page&&`${this.page.data.id}`==`${e}`?this.page:void 0:this.page}getNode(e,t){return this.page?.getNode(e,t)}registerComponent(e,t){this.components.set(e,t)}unregisterComponent(e){this.components.delete(e)}resolveComponent(e){return this.components.get(e)}emit(e,...t){const[n,...r]=t;return this.eventHelper&&n instanceof Node&&n.data?.id&&n.eventKeys.has(`${String(e)}_${n.data.id}`)?this.eventHelper?.emit(n.eventKeys.get(`${String(e)}_${n.data.id}`),n,...r):super.emit(e,...t)}async runCode(t,n,r,s,o){if(!t||isEmpty(this.codeDsl))return;const i=this.codeDsl?.[t]?.content;if("function"==typeof i)try{await i({app:this,params:n,eventParams:r,flowState:s,node:o})}catch(e){if(!this.errorHandler)throw e;this.errorHandler(e,void 0,{type:"run-code",codeId:t,params:n,eventParams:r,flowState:s,node:o})}}async runDataSourceMethod(t,n,r,s,o,i){if(!t||!n)return;const a=this.dataSourceManager?.get(t);if(a)try{const e=(a.methods||[]).find(e=>e.name===n);e&&"function"==typeof e.content?await e.content({app:this,params:r,dataSource:a,eventParams:s,flowState:o,node:i}):"function"==typeof a[n]&&await a[n]()}catch(e){if(!this.errorHandler)throw e;this.errorHandler(e,a,{type:"data-source-method",params:r,eventParams:s,flowState:o,node:i})}}destroy(){this.removeAllListeners(),this.page?.destroy(),this.page=void 0,this.pageFragments.forEach(e=>{e.destroy()}),this.pageFragments.clear(),this.flexible?.destroy(),this.flexible=void 0,this.eventHelper?.destroy(),this.dsl=void 0,this.dataSourceManager?.destroy(),this.dataSourceManager=void 0,this.codeDsl=void 0,this.components.clear(),this.nodeStoreInitialData=void 0}}var DepTargetType=(e=>(e.DEFAULT="default",e.CODE_BLOCK="code-block",e.DATA_SOURCE="data-source",e.DATA_SOURCE_METHOD="data-source-method",e.DATA_SOURCE_COND="data-source-cond",e))(DepTargetType||{});class Target{isTarget;id;name;type=DepTargetType.DEFAULT;deps={};isCollectByDefault;constructor(e){this.isTarget=e.isTarget,this.id=e.id,this.name=e.name,this.isCollectByDefault=e.isCollectByDefault??!0,e.type&&(this.type=e.type),e.initialDeps&&(this.deps=e.initialDeps)}updateDep({id:e,name:t,key:n,data:r}){const s=this.deps[e]||{name:t,keys:[]};s.name=t,s.data=r,this.deps[e]=s,-1===s.keys.indexOf(n)&&s.keys.push(n)}removeDep(e,t){if(void 0===e)return void Object.keys(this.deps).forEach(e=>{delete this.deps[e]});const n=this.deps[e];if(n)if(t){const r=n.keys.indexOf(t);n.keys.splice(r,1),0===n.keys.length&&delete this.deps[e]}else delete this.deps[e]}hasDep(e,t){const n=this.deps[e];return Boolean(n?.keys.find(e=>e===t))}destroy(){this.deps={}}}const isIncludeArrayField=(e,t)=>{let n=t;return e.some((t,r)=>{const s=n.find(({name:e})=>e===t);return n=s?.fields||[],s&&"array"===s.type&&/^(?!\d+$).*$/.test(`${e[r+1]}`)&&r<e.length-1})},isDataSourceTemplate=(e,t,n=!1)=>{const r=e.match(dataSourceTemplateRegExp)||[];if(r.length<=0)return!1;const s=[],o=[];return r.forEach(e=>{const n=e.substring(2,e.length-1),r=getKeysArray(n),i=r.shift();i&&i===t.id&&(isIncludeArrayField(r,t.fields)?s.push(e):o.push(e))}),n?s.length>0:o.length>0},isSpecificDataSourceTemplate=(e,t)=>e?.isBindDataSourceField&&e.dataSourceId&&e.dataSourceId===t&&"string"==typeof e.template,isUseDataSourceField=(e,t)=>{if(!Array.isArray(e)||"string"!=typeof e[0])return!1;const[n]=e,r=n.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(-1===r)return!1;return n.substring(r+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)===t},isDataSourceTarget=(e,t,n,r=!1)=>{if(!n||!["string","object"].includes(typeof n))return!1;if(`${t}`.startsWith(NODE_CONDS_KEY))return!1;if("string"==typeof n)return isDataSourceTemplate(n,e,r);if(isObject$1(n)&&n?.isBindDataSource&&n.dataSourceId&&n.dataSourceId===e.id)return!0;if(isSpecificDataSourceTemplate(n,e.id))return!0;if(isUseDataSourceField(n,e.id)){const[,...t]=n,s=isIncludeArrayField(t,e.fields);return r?s:!s}return!1},isDataSourceCondTarget=(e,t,n,r=!1)=>{if(!Array.isArray(n)||!e)return!1;const[s,...o]=n;if(s!==e.id||!`${t}`.startsWith(NODE_CONDS_KEY))return!1;if(e.fields?.find(e=>e.name===o[0])){const t=isIncludeArrayField(o,e.fields);return r?t:!t}return!1},traverseTarget=(e,t,n)=>{for(const r of Object.values(e))for(const e of Object.values(r))n&&e.type!==n||t(e)};class Watcher{targetsList={};childrenProp="items";idProp="id";nameProp="name";constructor(e){e?.initialTargets&&(this.targetsList=e.initialTargets),e?.childrenProp&&(this.childrenProp=e.childrenProp)}getTargetsList(){return this.targetsList}getTargets(e=DepTargetType.DEFAULT){return this.targetsList[e]||{}}addTarget(e){const t=this.getTargets(e.type)||{};this.targetsList[e.type]=t,t[e.id]=e}getTarget(e,t=DepTargetType.DEFAULT){return this.getTargets(t)[e]}hasTarget(e,t=DepTargetType.DEFAULT){return Boolean(this.getTarget(e,t))}hasSpecifiedTypeTarget(e=DepTargetType.DEFAULT){return Object.keys(this.getTargets(e)).length>0}removeTarget(e,t=DepTargetType.DEFAULT){const n=this.getTargets(t);n[e]&&(n[e].destroy(),delete n[e])}removeTargets(e=DepTargetType.DEFAULT){const t=this.targetsList[e];if(t){for(const e of Object.values(t))e.destroy();delete this.targetsList[e]}}clearTargets(){for(const e of Object.keys(this.targetsList))delete this.targetsList[e]}collect(e,t={},n=!1,r){this.collectByCallback(e,r,({node:e,target:r})=>{this.removeTargetDep(r,e),this.collectItem(e,r,t,n)})}collectByCallback(e,t,n){traverseTarget(this.targetsList,r=>{if(t||r.isCollectByDefault)for(const t of e)n({node:t,target:r})},t)}clear(e,t){let{targetsList:n}=this;t&&(n={[t]:this.getTargets(t)});const r=[];traverseTarget(n,t=>{if(e)for(const n of e)t.removeDep(n[this.idProp]),Array.isArray(n[this.childrenProp])&&n[this.childrenProp].length&&!r.includes(n[this.idProp])&&(r.push(n[this.idProp]),this.clear(n[this.childrenProp]));else t.removeDep()})}clearByType(e,t){this.clear(t,e)}collectItem(e,t,n={},r=!1){const s=[DepTargetType.DATA_SOURCE,DepTargetType.DATA_SOURCE_COND,DepTargetType.DATA_SOURCE_METHOD];if(e[NODE_DISABLE_DATA_SOURCE_KEY]&&s.includes(t.type))return;if(e[NODE_DISABLE_CODE_BLOCK_KEY]&&t.type===DepTargetType.CODE_BLOCK)return;const o=(s,i="")=>{const a=(s,a)=>{const c=s===this.childrenProp,l=i?`${i}.${s}`:s;if(t.isTarget(l,a))t.updateDep({id:e[this.idProp],name:`${e[this.nameProp]||e[this.idProp]}`,data:n,key:l});else if(!c&&Array.isArray(a))for(let e=0,t=a.length;e<t;e++){const t=a[e];isObject$1(t)&&o(t,`${l}[${e}]`)}else isObject$1(a)&&o(a,l);if(c&&r&&Array.isArray(a))for(const e of a)this.collectItem(e,t,n,r)};for(const[e,t]of Object.entries(s))void 0!==t&&""!==t&&a(e,t)};o(e)}removeTargetDep(e,t,n){if(e.removeDep(t[this.idProp],n),void 0===n&&Array.isArray(t[this.childrenProp])&&t[this.childrenProp].length)for(const r of t[this.childrenProp])this.removeTargetDep(e,r,n)}}const scriptRel="modulepreload",assetsURL=function(e){return"/tmagic-editor/playground/runtime/vue/page/"+e},seen={},__vitePreload=function(e,t,n){let r=Promise.resolve();function s(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&s(e.reason);return e().catch(s)})},components={button:()=>__vitePreload(()=>module.import("./index-legacy-DUW78s6z.js"),void 0),container:()=>__vitePreload(()=>module.import("./Container-legacy-CNSnNQxe.js"),void 0),img:()=>__vitePreload(()=>module.import("./index-legacy-B8TBKR5k.js"),void 0),"iterator-container":()=>__vitePreload(()=>module.import("./IteratorContainer-legacy-DD31s6Kr.js"),void 0),overlay:()=>__vitePreload(()=>module.import("./index-legacy-GzDSacW1.js"),void 0),page:()=>__vitePreload(()=>module.import("./index-legacy-DR1X9oBQ.js"),void 0),"page-fragment":()=>__vitePreload(()=>module.import("./PageFragment-legacy-0KEFaiu-.js"),void 0),"page-fragment-container":()=>__vitePreload(()=>module.import("./PageFragmentContainer-legacy-CsBGwj_o.js"),void 0),qrcode:()=>__vitePreload(()=>module.import("./index-legacy-nQNUWAgo.js"),void 0),text:()=>__vitePreload(()=>module.import("./index-legacy-DA367VbM.js"),void 0)},datasources={},plugins={};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,{iterator:iterator,toStringTag:toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||toStringTag in e||iterator in e)},isEmptyObject=t=>{if(!isObject(t)||isBuffer(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),isArray(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(isBuffer(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let i;for(r=0;r<o;r++)i=s[r],t.call(null,e[i],i,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(n,r)=>{const s=e&&findKey(t,r)||r;isPlainObject(t[s])&&isPlainObject(n)?t[s]=merge(t[s],n):isPlainObject(n)?t[s]=merge({},n):isArray(n)?t[s]=n.slice():t[s]=n};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&forEach(arguments[r],n);return t}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(t,r)=>{n&&isFunction(t)?e[r]=bind(t,n):e[r]=t},{allOwnKeys:r}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const n=(e&&e[iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];isFunction(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet=(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[toStringTag]&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[r]=e;const s=isArray(e)?[]:{};return forEach(e,(e,t)=>{const o=n(e,r+1);!isUndefined(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=(setImmediateSupported="function"==typeof setImmediate,postMessageSupported=isFunction(_global.postMessage),setImmediateSupported?setImmediate:postMessageSupported?(token=`axios@${Math.random()}`,callbacks=[],_global.addEventListener("message",({source:e,data:t})=>{e===_global&&t===token&&callbacks.length&&callbacks.shift()()},!1),e=>{callbacks.push(e),_global.postMessage(token,"*")}):e=>setTimeout(e));var setImmediateSupported,postMessageSupported,token,callbacks;const asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):"undefined"!=typeof process&&process.nextTick||_setImmediate,isIterable=e=>null!=e&&isFunction(e[iterator]),utils$1={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:isEmptyObject,isReadableStream:isReadableStream,isRequest:isRequest,isResponse:isResponse,isHeaders:isHeaders,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject,isAsyncFn:isAsyncFn,isThenable:isThenable,setImmediate:_setImmediate,asap:asap,isIterable:isIterable};function AxiosError$1(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,s,o)=>{const i=Object.create(prototype$1);return utils$1.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),AxiosError$1.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils$1.isUndefined(t[e])})).metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils$1.isDate(e))return e.toISOString();if(utils$1.isBoolean(e))return e.toString();if(!a&&utils$1.isBlob(e))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(e)||utils$1.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(utils$1.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils$1.isArray(e)&&isFlatArray(e)||(utils$1.isFileList(e)||utils$1.endsWith(n,"[]"))&&(a=utils$1.toArray(e)))return n=removeBrackets(n),a.forEach(function(e,r){!utils$1.isUndefined(e)&&null!==e&&t.append(!0===i?renderKey([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(s,n,o),c(e)),!1)}const u=[],d=Object.assign(predicates,{defaultVisitor:l,convertValue:c,isVisitable:isVisitable});if(!utils$1.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!utils$1.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),utils$1.forEach(n,function(n,o){!0===(!(utils$1.isUndefined(n)||null===n)&&s.call(t,n,utils$1.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),u.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils$1.forEach(this.handlers,function(t){null!==t&&e(t)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hasBrowserEnv,hasStandardBrowserEnv:hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin:origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(e,t,n,r){return platform.isNode&&utils$1.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function formDataToJSON(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;if(o=!o&&utils$1.isArray(r)?r.length:o,a)return utils$1.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i;r[o]&&utils$1.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],s)&&utils$1.isArray(r[o])&&(r[o]=arrayToObject(r[o])),!i}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(e,r)=>{t(parsePropPath(e),r,n,0)}),n}return null}function stringifySafely(t,n,r){if(utils$1.isString(t))try{return(n||JSON.parse)(t),utils$1.trim(t)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(t)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=utils$1.isObject(e);s&&utils$1.isHTMLForm(e)&&(e=new FormData(e));if(utils$1.isFormData(e))return r?JSON.stringify(formDataToJSON(e)):e;if(utils$1.isArrayBuffer(e)||utils$1.isBuffer(e)||utils$1.isStream(e)||utils$1.isFile(e)||utils$1.isBlob(e)||utils$1.isReadableStream(e))return e;if(utils$1.isArrayBufferView(e))return e.buffer;if(utils$1.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((o=utils$1.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData$1(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,s="json"===this.responseType;if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||s)){const r=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&ignoreDuplicateOf[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,s){return utils$1.isFunction(r)?r.call(this,t,n):(s&&(t=n),utils$1.isString(t)?utils$1.isString(r)?-1!==t.indexOf(r):utils$1.isRegExp(r)?r.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}let AxiosHeaders$1=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=normalizeHeader(t);if(!s)throw new Error("header name must be a non-empty string");const o=utils$1.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=normalizeValue(e))}const o=(e,t)=>utils$1.forEach(e,(e,n)=>s(e,n,t));if(utils$1.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(utils$1.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))o(parseHeaders(e),t);else if(utils$1.isObject(e)&&utils$1.isIterable(e)){let n,r,s={};for(const t of e){if(!utils$1.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?utils$1.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=normalizeHeader(e)){const n=utils$1.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return parseTokens(e);if(utils$1.isFunction(t))return t.call(this,e,n);if(utils$1.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const n=utils$1.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=normalizeHeader(e)){const s=utils$1.findKey(n,e);!s||t&&!matchHeaderValue(n,n[s],s,t)||(delete n[s],r=!0)}}return utils$1.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!matchHeaderValue(this,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return utils$1.forEach(this,(r,s)=>{const o=utils$1.findKey(n,s);if(o)return t[o]=normalizeValue(r),void delete t[s];const i=e?formatHeader(s):String(s).trim();i!==s&&delete t[s],t[i]=normalizeValue(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils$1.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&utils$1.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils$1.isArray(e)?e.forEach(r):r(e),this}};function transformData(e,t){const n=this||defaults,r=t||n,s=AxiosHeaders$1.from(r.headers);let o=r.data;return utils$1.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function isCancel$1(e){return!(!e||!e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,null==e?"canceled":e,AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}function settle(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];s||(s=c),n[o]=a,r[o]=c;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}function throttle(e,t){let n,r,s=0,o=1e3/t;const i=(t,o=Date.now())=>{s=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=o?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},o-a)))},()=>n&&i(n)]}AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils$1.freezeMethods(AxiosHeaders$1),utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});const progressEventReducer=(e,t,n=3)=>{let r=0;const s=speedometer(50,250);return throttle(n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,c=s(a);r=o;e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},progressEventDecorator=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];utils$1.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),utils$1.isString(r)&&i.push("path="+r),utils$1.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||0==n)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(e,t,n,r){return utils$1.isPlainObject(e)&&utils$1.isPlainObject(t)?utils$1.merge.call({caseless:r},e,t):utils$1.isPlainObject(t)?utils$1.merge({},t):utils$1.isArray(t)?t.slice():t}function s(e,t,n,s){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!utils$1.isUndefined(t))return r(void 0,t)}function i(e,t){return utils$1.isUndefined(t)?utils$1.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s(headersToObject(e),headersToObject(t),0,!0)};return utils$1.forEach(Object.keys({...e,...t}),function(r){const o=c[r]||s,i=o(e[r],t[r],r);utils$1.isUndefined(i)&&o!==a||(n[r]=i)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=AxiosHeaders$1.from(a),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),utils$1.isFormData(r))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(platform.hasStandardBrowserEnv&&(s&&utils$1.isFunction(s)&&(s=s(t)),s||!1!==s&&isURLSameOrigin(t.url))){const e=o&&i&&cookies.read(i);e&&a.set(o,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){const r=resolveConfig(e);let s=r.data;const o=AxiosHeaders$1.from(r.headers).normalize();let i,a,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function f(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function m(){if(!g)return;const r=AxiosHeaders$1.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||transitionalDefaults;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new AxiosError$1(t,s.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,g)),g=null},void 0===s&&o.setContentType(null),"setRequestHeader"in g&&utils$1.forEach(o.toJSON(),function(e,t){g.setRequestHeader(t,e)}),utils$1.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),h&&([c,u]=progressEventReducer(h,!0),g.addEventListener("progress",c)),p&&g.upload&&([a,l]=progressEventReducer(p),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(i=t=>{g&&(n(!t||t.type?new CanceledError$1(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=parseProtocol(r.url);y&&-1===platform.protocols.indexOf(y)?n(new AxiosError$1("Unsupported protocol "+y+":",AxiosError$1.ERR_BAD_REQUEST,e)):g.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof AxiosError$1?t:new CanceledError$1(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>utils$1.asap(i),a}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{const s=readBytes(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},isFetchSupported="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,isReadableStreamSupported=isFetchSupported&&"function"==typeof ReadableStream,encodeText=isFetchSupported&&("function"==typeof TextEncoder?(encoder=new TextEncoder,e=>encoder.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var encoder;const test=(t,...n)=>{try{return!!t(...n)}catch(e){return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=65536,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};var res;isFetchSupported&&(res=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!resolvers[e]&&(resolvers[e]=utils$1.isFunction(res[e])?t=>t[e]():(t,n)=>{throw new AxiosError$1(`Response type '${e}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,n)})}));const getBodyLength=async e=>{if(null==e)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e)){const t=new Request(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e)?e.byteLength:(utils$1.isURLSearchParams(e)&&(e+=""),utils$1.isString(e)?(await encodeText(e)).byteLength:void 0)},resolveBodyLength=async(e,t)=>{const n=utils$1.toFiniteNumber(e.getContentLength());return null==n?getBodyLength(t):n},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=resolveConfig(e);l=l?(l+"").toLowerCase():"text";let h,f=composeSignals([s,o&&o.toAbortSignal()],i);const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let m;try{if(c&&supportsRequestStream&&"get"!==n&&"head"!==n&&0!==(m=await resolveBodyLength(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(utils$1.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=progressEventDecorator(m,progressEventReducer(asyncDecorator(c)));r=trackStream(n.body,DEFAULT_CHUNK_SIZE,e,t)}}utils$1.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;h=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let o=await fetch(h,p);const i=supportsResponseStream&&("stream"===l||"response"===l);if(supportsResponseStream&&(a||i&&g)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=utils$1.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&progressEventDecorator(t,progressEventReducer(asyncDecorator(a),!0))||[];o=new Response(trackStream(o.body,DEFAULT_CHUNK_SIZE,n,()=>{r&&r(),g&&g()}),e)}l=l||"text";let y=await resolvers[utils$1.findKey(resolvers,l)||"text"](o,e);return!i&&g&&g(),await new Promise((t,n)=>{settle(t,n,{data:y,headers:AxiosHeaders$1.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})})}catch(y){if(g&&g(),y&&"TypeError"===y.name&&/Load failed|fetch/i.test(y.message))throw Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,h),{cause:y.cause||y});throw AxiosError$1.from(y,y&&y.code,e,h)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch(e){}Object.defineProperty(t,"adapterName",{value:n})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||null===e||!1===e,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!isResolvedHandle(n)&&(r=knownAdapters[(t=String(n)).toLowerCase()],void 0===r))throw new AxiosError$1(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+o]=r}if(!r){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new AxiosError$1("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders$1.from(t.headers),t},function(t){return isCancel$1(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders$1.from(t.response.headers))),Promise.reject(t)})}const VERSION$1="1.11.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};function assertOptions(e,t,n){if("object"!=typeof e)throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new AxiosError$1("option "+o+" must be "+n,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new AxiosError$1("Unknown option "+o,AxiosError$1.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,n){function r(e,t){return"[Axios v"+VERSION$1+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new AxiosError$1(r(s," has been removed"+(t?" in "+t:"")),AxiosError$1.ERR_DEPRECATED);return t&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},validators$1.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(e){this.defaults=e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{r.stack?n&&!String(r.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+n):r.stack=n}catch(e){}}throw r}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig$1(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),null!=r&&(utils$1.isFunction(r)?t.paramsSerializer={serialize:r}:validator.assertOptions(r,{encode:validators.function,serialize:validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&utils$1.merge(s.common,s[t.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=AxiosHeaders$1.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...i),e.push(...c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=i.length;let p=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{p=e(p)}catch(h){t.call(this,h);break}}try{l=dispatchRequest.call(this,p)}catch(h){return Promise.reject(h)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig$1(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(e){Axios$1.prototype[e]=function(t,n){return this.request(mergeConfig$1(n||{},{method:e,url:t,data:(n||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,s){return this.request(mergeConfig$1(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Axios$1.prototype[e]=t(),Axios$1.prototype[e+"Form"]=t(!0)});let CancelToken$1=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new CanceledError$1(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function spread$1(e){return function(t){return e.apply(null,t)}}function isAxiosError$1(e){return utils$1.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig$1(e,t))},n}Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios:Axios,AxiosError:AxiosError,CanceledError:CanceledError,isCancel:isCancel,CancelToken:CancelToken,VERSION:VERSION,all:all,Cancel:Cancel,isAxiosError:isAxiosError,spread:spread,toFormData:toFormData,AxiosHeaders:AxiosHeaders,HttpStatusCode:HttpStatusCode,formToJSON:formToJSON,getAdapter:getAdapter,mergeConfig:mergeConfig}=axios,requestHandler=function(e){return e},responseHandler=function(e){return e},service=axios.create({withCredentials:!0,timeout:7e3});service.interceptors.request.use(requestHandler),service.interceptors.response.use(responseHandler);const request={install(e){e.provide("request",service)}},useDsl=exports("B",(e=inject("app"),t)=>{if(!e)throw new Error("useDsl must be used after MagicApp is created");const n=t?e.pageFragments.get(t):null,r=ref(t?n?.data:e.page?.data);t?e.on("dsl-change",()=>{r.value=n?.data}):e.on("page-change",()=>{r.value=e.page?.data});const s=(s,o,i,a)=>{if(!(!s.length||t&&n?.data.id!==a||!t&&e.page?.data.id!==a)){for(const e of s)isPage(e)&&!t&&e.id===a||isPageFragment(e)&&t?r.value=e:replaceChildNode(reactive(e),[r.value]);nextTick(()=>{e.emit("replaced-node",{nodes:s,sourceId:o,...i})})}};return e.dataSourceManager&&(e.dataSourceManager.on("update-data",s),onBeforeUnmount(()=>{e.dataSourceManager.off("update-data",s)})),{app:e,pageConfig:r}});function useComponent(e=""){let t,n,r;return"string"==typeof e?t=e:({componentType:t,app:n}=e),t&&""!==t||(t="container"),n||(n=inject("app")),r=n?.resolveComponent(t),r||t.startsWith("magic-ui-")||(t=`magic-ui-${toLine(t)}`,r=n?.resolveComponent(t)),r??t}const _sfc_main=defineComponent({__name:"App",setup(e){const{pageConfig:t}=useDsl(),n=useComponent("page");return(e,r)=>(openBlock(),createBlock(resolveDynamicComponent(unref(n)),{config:unref(t)},null,8,["config"]))}}),getLocalConfig=()=>{const configStr=localStorage.getItem("magicDSL");if(!configStr)return[];try{return[eval(`(${configStr})`)]}catch(err){return console.error("Error parsing localStorage magicDSL:",err),[]}};DataSourceManager.registerObservedData(DeepObservedData);const vueApp=createApp(_sfc_main);vueApp.use(request);const dsl=((getUrlParam("localPreview")?getLocalConfig():window.magicDSL)||[])[0]||{},app=new App({ua:window.navigator.userAgent,config:dsl,request:service,curPage:getUrlParam("page"),useMock:Boolean(getUrlParam("useMock"))});app.setDesignWidth(app.env.isWeb?window.document.documentElement.getBoundingClientRect().width:375),Object.entries(components).forEach(([e,t])=>{app.registerComponent(e,defineAsyncComponent(t))}),Object.values(plugins).forEach(e=>{vueApp.use(e,{app:app})}),vueApp.provide("userRender",({h:e,type:t,props:n={},attrs:r={},style:s,className:o,on:i,directives:a=[]})=>{const c={...n,...r,style:s,class:o};if(i)for(const[l,u]of Object.entries(i))c[`on${l[0].toLocaleUpperCase()}${l.substring(1)}`]=u;return a.length?withDirectives(e(t,c),a.map(e=>[resolveDirective(e.name),e.value,e.modifiers])):e(t,c)}),registerDataSourceOnDemand(dsl,datasources).then(e=>{Object.entries(e).forEach(([e,t])=>{DataSourceManager.register(e,t)}),vueApp.config.globalProperties.app=app,vueApp.provide("app",app),vueApp.mount("#app")})}}})})();
|
|
//# sourceMappingURL=index-legacy-BcevF5gJ.js.map
|