mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-03-25 14:53:34 +00:00
2 lines
175 KiB
JavaScript
2 lines
175 KiB
JavaScript
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),__exportAll=(e,t)=>{let n={};for(var r in e)__defProp(n,r,{get:e[r],enumerable:!0});return t||__defProp(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=__getOwnPropNames(t),a=0,o=i.length,s;a<o;a++)s=i[a],!__hasOwnProp.call(e,s)&&s!==n&&__defProp(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=__getOwnPropDesc(t,s))||r.enumerable});return e},__toESM=(e,t,n)=>(n=e==null?{}:__create(__getProtoOf(e)),__copyProps(t||!e||!e.__esModule?__defProp(n,`default`,{value:e,enumerable:!0}):n,e));function makeMap(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),isModelListener=e=>e.startsWith(`onUpdate:`),extend=Object.assign,remove=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},hasOwnProperty$13=Object.prototype.hasOwnProperty,hasOwn=(e,t)=>hasOwnProperty$13.call(e,t),isArray$1=Array.isArray,isMap$1=e=>toTypeString(e)===`[object Map]`,isSet$1=e=>toTypeString(e)===`[object Set]`,isFunction$1=e=>typeof e==`function`,isString=e=>typeof e==`string`,isSymbol$1=e=>typeof e==`symbol`,isObject$3=e=>typeof e==`object`&&!!e,isPromise=e=>(isObject$3(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),objectToString$1=Object.prototype.toString,toTypeString=e=>objectToString$1.call(e),toRawType=e=>toTypeString(e).slice(8,-1),isPlainObject=e=>toTypeString(e)===`[object Object]`,isIntegerKey=e=>isString(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,isReservedProp=makeMap(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),cacheStringFunction=e=>{let 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=>{let t=parseFloat(e);return isNaN(t)?e:t},_globalThis,getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{});function normalizeStyle(e){if(isArray$1(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=isString(r)?parseStringStyle(r):normalizeStyle(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(isString(e)||isObject$3(e))return e}var listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(e){let t={};return e.replace(styleCommentRE,``).split(listDelimiterRE).forEach(e=>{if(e){let n=e.split(propertyDelimiterRE);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function normalizeClass(e){let t=``;if(isString(e))t=e;else if(isArray$1(e))for(let n=0;n<e.length;n++){let r=normalizeClass(e[n]);r&&(t+=r+` `)}else if(isObject$3(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var specialBooleanAttrs=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,isSpecialBooleanAttr=makeMap(specialBooleanAttrs),isBooleanAttr=makeMap(specialBooleanAttrs+`,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);function includeBooleanAttr(e){return!!e||e===``}var isRef$1=e=>!!(e&&e.__v_isRef===!0),toDisplayString=e=>isString(e)?e:e==null?``:isArray$1(e)||isObject$3(e)&&(e.toString===objectToString$1||!isFunction$1(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$3(t)&&!isArray$1(t)&&!isPlainObject(t)?String(t):t,stringifySymbol=(e,t=``)=>{var n;return isSymbol$1(e)?`Symbol(${e.description??t})`:e},activeEffectScope,EffectScope=class{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){this._isPaused=!0;let e,t;if(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){this._isPaused=!1;let e,t;if(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){let t=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=t}}}on(){++this._on===1&&(this.prevScope=activeEffectScope,activeEffectScope=this)}off(){this._on>0&&--this._on===0&&(activeEffectScope=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(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){let 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)}var activeSub,pausedQueueEffects=new WeakSet,ReactiveEffect=class{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(){this.flags&64&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||batch(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);let e=activeSub,t=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=e,shouldTrack=t,this.flags&=-3}}stop(){if(this.flags&1){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(){this.flags&64?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}},batchDepth=0,batchedSub,batchedComputed;function batch(e,t=!1){if(e.flags|=8,t){e.next=batchedComputed,batchedComputed=e;return}e.next=batchedSub,batchedSub=e}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let e=batchedComputed;for(batchedComputed=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;batchedSub;){let t=batchedSub;for(batchedSub=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||(e=t)}t=n}}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;){let e=r.prevDep;r.version===-1?(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(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===globalVersion)||(e.globalVersion=globalVersion,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!isDirty(e))))return;e.flags|=2;let t=e.dep,n=activeSub,r=shouldTrack;activeSub=e,shouldTrack=!0;try{prepareDeps(e);let n=e.fn(e._value);(t.version===0||hasChanged(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{activeSub=n,shouldTrack=r,cleanupDeps(e),e.flags&=-3}}function removeSub(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.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){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var shouldTrack=!0,trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){let e=trackStack.pop();shouldTrack=e===void 0?!0:e}function cleanupEffect(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=activeSub;activeSub=void 0;try{t()}finally{activeSub=e}}}var globalVersion=0,Link=class{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}},Dep=class{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(t===void 0||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(t.version===-1&&(t.version=this.version,t.nextDep)){let 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{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++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)addSub(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var 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,i,a){let o=targetMap.get(e);if(!o){globalVersion++;return}let s=e=>{e&&e.trigger()};if(startBatch(),t===`clear`)o.forEach(s);else{let i=isArray$1(e),a=i&&isIntegerKey(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ARRAY_ITERATE_KEY||!isSymbol$1(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ARRAY_ITERATE_KEY)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ITERATE_KEY)),isMap$1(e)&&s(o.get(MAP_KEY_ITERATE_KEY)));break;case`delete`:i||(s(o.get(ITERATE_KEY)),isMap$1(e)&&s(o.get(MAP_KEY_ITERATE_KEY)));break;case`set`:isMap$1(e)&&s(o.get(ITERATE_KEY));break}}endBatch()}function reactiveReadArray(e){let 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}var arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...e){return reactiveReadArray(this).concat(...e.map(e=>isArray$1(e)?reactiveReadArray(e):e))},entries(){return iterator(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(this,`values`,toReactive)}};function iterator(e,t,n){let r=shallowReadArray(e),i=r[t]();return r!==e&&!isShallow(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var arrayProto=Array.prototype;function apply$1(e,t,n,r,i,a){let o=shallowReadArray(e),s=o!==e&&!isShallow(e),c=o[t];if(c!==arrayProto[t]){let t=c.apply(e,a);return s?toReactive(t):t}let l=n;o!==e&&(s?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)}));let u=c.call(o,l,r);return s&&i?i(u):u}function reduce(e,t,n,r){let i=shallowReadArray(e),a=n;return i!==e&&(isShallow(e)?n.length>3&&(a=function(t,r,i){return n.call(this,t,r,i,e)}):a=function(t,r,i){return n.call(this,t,toReactive(r),i,e)}),i[t](a,...r)}function searchProxy(e,t,n){let r=toRaw(e);track(r,`iterate`,ARRAY_ITERATE_KEY);let i=r[t](...n);return(i===-1||i===!1)&&isProxy(n[0])?(n[0]=toRaw(n[0]),r[t](...n)):i}function noTracking(e,t,n=[]){pauseTracking(),startBatch();let r=toRaw(e)[t].apply(e,n);return endBatch(),resetTracking(),r}var isNonTrackableKeys=makeMap(`__proto__,__v_isRef,__isVue`),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(isSymbol$1));function hasOwnProperty$12(e){isSymbol$1(e)||(e=String(e));let t=toRaw(this);return track(t,`has`,e),t.hasOwnProperty(e)}var BaseReactiveHandler=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?shallowReadonlyMap:readonlyMap:i?shallowReactiveMap:reactiveMap).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=isArray$1(e);if(!r){let e;if(a&&(e=arrayInstrumentations[t]))return e;if(t===`hasOwnProperty`)return hasOwnProperty$12}let o=Reflect.get(e,t,isRef(e)?e:n);if((isSymbol$1(t)?builtInSymbols.has(t):isNonTrackableKeys(t))||(r||track(e,`get`,t),i))return o;if(isRef(o)){let e=a&&isIntegerKey(t)?o:o.value;return r&&isObject$3(e)?readonly(e):e}return isObject$3(o)?r?readonly(o):reactive(o):o}},MutableReactiveHandler=class extends BaseReactiveHandler{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=isReadonly(i);if(!isShallow(n)&&!isReadonly(n)&&(i=toRaw(i),n=toRaw(n)),!isArray$1(e)&&isRef(i)&&!isRef(n))return t||(i.value=n),!0}let a=isArray$1(e)&&isIntegerKey(t)?Number(t)<e.length:hasOwn(e,t),o=Reflect.set(e,t,n,isRef(e)?e:r);return e===toRaw(r)&&(a?hasChanged(n,i)&&trigger(e,`set`,t,n,i):trigger(e,`add`,t,n)),o}deleteProperty(e,t){let n=hasOwn(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&trigger(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!isSymbol$1(t)||!builtInSymbols.has(t))&&track(e,`has`,t),n}ownKeys(e){return track(e,`iterate`,isArray$1(e)?`length`:ITERATE_KEY),Reflect.ownKeys(e)}},ReadonlyReactiveHandler=class extends BaseReactiveHandler{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),toShallow=e=>e,getProto=e=>Reflect.getPrototypeOf(e);function createIterableMethod(e,t,n){return function(...r){let i=this.__v_raw,a=toRaw(i),o=isMap$1(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?toShallow:t?toReadonly:toReactive;return!t&&track(a,`iterate`,c?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function createInstrumentations(e,t){let n={get(n){let r=this.__v_raw,i=toRaw(r),a=toRaw(n);e||(hasChanged(n,a)&&track(i,`get`,n),track(i,`get`,a));let{has:o}=getProto(i),s=t?toShallow:e?toReadonly:toReactive;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&track(toRaw(t),`iterate`,ITERATE_KEY),t.size},has(t){let n=this.__v_raw,r=toRaw(n),i=toRaw(t);return e||(hasChanged(t,i)&&track(r,`has`,t),track(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=toRaw(a),s=t?toShallow:e?toReadonly:toReactive;return!e&&track(o,`iterate`,ITERATE_KEY),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return extend(n,e?{add:createReadonlyMethod(`add`),set:createReadonlyMethod(`set`),delete:createReadonlyMethod(`delete`),clear:createReadonlyMethod(`clear`)}:{add(e){!t&&!isShallow(e)&&!isReadonly(e)&&(e=toRaw(e));let 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));let r=toRaw(this),{has:i,get:a}=getProto(r),o=i.call(r,e);o||(e=toRaw(e),o=i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?hasChanged(n,s)&&trigger(r,`set`,e,n,s):trigger(r,`add`,e,n),this},delete(e){let t=toRaw(this),{has:n,get:r}=getProto(t),i=n.call(t,e);i||(e=toRaw(e),i=n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&trigger(t,`delete`,e,void 0,a),o},clear(){let e=toRaw(this),t=e.size!==0,n,r=e.clear();return t&&trigger(e,`clear`,void 0,void 0,void 0),r}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=createIterableMethod(r,e,t)}),n}function createInstrumentationGetter(e,t){let n=createInstrumentations(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(hasOwn(n,r)&&r in t?n:t,r,i)}var mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},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 createReactiveObject(e,t,n,r,i){if(!isObject$3(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=getTargetType(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}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:!1}function toRaw(e){let 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}var toReactive=e=>isObject$3(e)?reactive(e):e,toReadonly=e=>isObject$3(e)?readonly(e):e;function isRef(e){return e?e.__v_isRef===!0:!1}function ref(e){return createRef(e,!1)}function createRef(e,t){return isRef(e)?e:new RefImpl(e,t)}var RefImpl=class{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){let 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}var shallowUnwrapHandlers={get:(e,t,n)=>t===`__v_raw`?e:unref(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return isRef(i)&&!isRef(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function proxyRefs(e){return isReactive(e)?e:new Proxy(e,shallowUnwrapHandlers)}var ComputedRefImpl=class{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,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){let 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,i;return isFunction$1(e)?r=e:(r=e.get,i=e.set),new ComputedRefImpl(r,i,n)}var INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap,activeWatcher=void 0;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){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:isShallow(e)||i===!1||i===0?traverse(e,1):traverse(e),u,d,f,p,m=!1,g=!1;if(isRef(e)?(d=()=>e.value,m=isShallow(e)):isReactive(e)?(d=()=>l(e),m=!0):isArray$1(e)?(g=!0,m=e.some(e=>isReactive(e)||isShallow(e)),d=()=>e.map(e=>{if(isRef(e))return e.value;if(isReactive(e))return l(e);if(isFunction$1(e))return c?c(e,2):e()})):d=isFunction$1(e)?t?c?()=>c(e,2):e:()=>{if(f){pauseTracking();try{f()}finally{resetTracking()}}let t=activeWatcher;activeWatcher=u;try{return c?c(e,3,[p]):e(p)}finally{activeWatcher=t}}:NOOP,t&&i){let e=d,t=i===!0?1/0:i;d=()=>traverse(e(),t)}let _=getCurrentScope(),v=()=>{u.stop(),_&&_.active&&remove(_.effects,u)};if(a&&t){let e=t;t=(...t)=>{e(...t),v()}}let y=g?Array(e.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE,b=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let e=u.run();if(i||m||(g?e.some((e,t)=>hasChanged(e,y[t])):hasChanged(e,y))){f&&f();let n=activeWatcher;activeWatcher=u;try{let n=[e,y===INITIAL_WATCHER_VALUE?void 0:g&&y[0]===INITIAL_WATCHER_VALUE?[]:y,p];y=e,c?c(t,3,n):t(...n)}finally{activeWatcher=n}}}else u.run()};return s&&s(b),u=new ReactiveEffect(d),u.scheduler=o?()=>o(b,!1):b,p=e=>onWatcherCleanup(e,!1,u),f=u.onStop=()=>{let e=cleanupMap.get(u);if(e){if(c)c(e,4);else for(let t of e)t();cleanupMap.delete(u)}},t?r?b(!0):y=u.run():o?o(b.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function traverse(e,t=1/0,n){if(t<=0||!isObject$3(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,isRef(e))traverse(e.value,t,n);else if(isArray$1(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(e)){for(let r in e)traverse(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&traverse(e[r],t,n)}return e}function callWithErrorHandling(e,t,n,r){try{return r?e(...r):e()}catch(e){handleError(e,t,n)}}function callWithAsyncErrorHandling(e,t,n,r){if(isFunction$1(e)){let i=callWithErrorHandling(e,t,n,r);return i&&isPromise(i)&&i.catch(e=>{handleError(e,t,n)}),i}if(isArray$1(e)){let i=[];for(let a=0;a<e.length;a++)i.push(callWithAsyncErrorHandling(e[a],t,n,r));return i}}function handleError(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||EMPTY_OBJ;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){pauseTracking(),callWithErrorHandling(a,null,10,[e,i,o]),resetTracking();return}}logError(e,n,i,r,o)}function logError(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var queue=[],flushIndex=-1,pendingPostFlushCbs=[],activePostFlushCbs=null,postFlushIndex=0,resolvedPromise=Promise.resolve(),currentFlushPromise=null;function nextTick(e){let 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;){let r=t+n>>>1,i=queue[r],a=getId(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function queueJob(e){if(!(e.flags&1)){let t=getId(e),n=queue[queue.length-1];!n||!(e.flags&2)&&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$1(e)?pendingPostFlushCbs.push(...e):activePostFlushCbs&&e.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,e):e.flags&1||(pendingPostFlushCbs.push(e),e.flags|=1),queueFlush()}function flushPreFlushCbs(e,t,n=flushIndex+1){for(;n<queue.length;n++){let t=queue[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;queue.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function flushPostFlushCbs(e){if(pendingPostFlushCbs.length){let e=[...new Set(pendingPostFlushCbs)].sort((e,t)=>getId(e)-getId(t));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...e);return}for(activePostFlushCbs=e,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){let e=activePostFlushCbs[postFlushIndex];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}var getId=e=>e.id==null?e.flags&2?-1:1/0:e.id;function flushJobs(e){try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){let e=queue[flushIndex];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),callWithErrorHandling(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){let e=queue[flushIndex];e&&(e.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(e),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs(e)}}var currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(e){let t=currentRenderingInstance;return currentRenderingInstance=e,currentScopeId=e&&e.type.__scopeId||null,t}function withCtx(e,t=currentRenderingInstance,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&setBlockTracking(-1);let i=setCurrentRenderingInstance(t),a;try{a=e(...n)}finally{setCurrentRenderingInstance(i),r._d&&setBlockTracking(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function withDirectives(e,t){if(currentRenderingInstance===null)return e;let n=getComponentPublicInstance(currentRenderingInstance),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[i,a,o,s=EMPTY_OBJ]=t[e];i&&(isFunction$1(i)&&(i={mounted:i,updated:i}),i.deep&&traverse(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function invokeDirectiveHook(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(pauseTracking(),callWithAsyncErrorHandling(c,n,8,[e.el,s,e,t]),resetTracking())}}var TeleportEndKey=Symbol(`_vte`),isTeleport=e=>e.__isTeleport,leaveCbKey=Symbol(`_leaveCb`);function setTransitionHooks(e,t){e.shapeFlag&6&&e.component?(e.transition=t,setTransitionHooks(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function defineComponent(e,t){return isFunction$1(e)?extend({name:e.name},t,{setup:e}):e}function markAsyncBoundary(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}var pendingSetRefMap=new WeakMap;function setRef(e,t,n,r,i=!1){if(isArray$1(e)){e.forEach((e,a)=>setRef(e,t&&(isArray$1(t)?t[a]:t),n,r,i));return}if(isAsyncWrapper(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&setRef(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?getComponentPublicInstance(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===EMPTY_OBJ?s.refs={}:s.refs,d=s.setupState,f=toRaw(d),p=d===EMPTY_OBJ?NO:e=>hasOwn(f,e),m=e=>!0;if(l!=null&&l!==c){if(invalidatePendingSetRef(t),isString(l))u[l]=null,p(l)&&(d[l]=null);else if(isRef(l)){m(l)&&(l.value=null);let e=t;e.k&&(u[e.k]=null)}}if(isFunction$1(c))callWithErrorHandling(c,s,12,[o,u]);else{let t=isString(c),r=isRef(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)isArray$1(n)&&remove(n,a);else if(isArray$1(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),pendingSetRefMap.delete(e)};t.id=-1,pendingSetRefMap.set(e,t),queuePostRenderEffect(t,n)}else invalidatePendingSetRef(e),s()}}}function invalidatePendingSetRef(e){let t=pendingSetRefMap.get(e);t&&(t.flags|=8,pendingSetRefMap.delete(e))}var isComment=e=>e.nodeType===8,requestIdleCallback=getGlobalThis().requestIdleCallback||(e=>setTimeout(e,1)),cancelIdleCallback=getGlobalThis().cancelIdleCallback||(e=>clearTimeout(e));function forEachElement(e,t){if(isComment(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(isComment(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var isAsyncWrapper=e=>!!e.type.__asyncLoader;function defineAsyncComponent(e){isFunction$1(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return defineComponent({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||(t.bu=[])).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>forEachElement(e,t));n&&(t.bum||(t.bum=[])).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=currentInstance;if(markAsyncBoundary(e),u)return()=>createInnerComp(u,e);let t=t=>{l=null,handleError(t,e,13,!r)};if(s&&e.suspense||isInSSRComponentSetup)return p().then(t=>()=>createInnerComp(t,e)).catch(e=>(t(e),()=>r?createVNode(r,{error:e}):null));let a=ref(!1),c=ref(),d=ref(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&isKeepAlive(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return createInnerComp(u,e);if(c.value&&r)return createVNode(r,{error:c.value});if(n&&!d.value)return createInnerComp(n,e)}}})}function createInnerComp(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=createVNode(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var 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){let 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){let i=injectHook(t,e,r,!0);onUnmounted(()=>{remove(r[t],i)},n)}function injectHook(e,t,n=currentInstance,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...r)=>{pauseTracking();let i=setCurrentInstance(n),a=callWithAsyncErrorHandling(t,n,e,r);return i(),resetTracking(),a});return r?i.unshift(a):i.push(a),a}}var createHook=e=>(t,n=currentInstance)=>{(!isInSSRComponentSetup||e===`sp`)&&injectHook(e,(...e)=>t(...e),n)},onBeforeMount=createHook(`bm`),onMounted=createHook(`m`),onBeforeUpdate=createHook(`bu`),onUpdated=createHook(`u`),onBeforeUnmount=createHook(`bum`),onUnmounted=createHook(`um`),onServerPrefetch=createHook(`sp`),onRenderTriggered=createHook(`rtg`),onRenderTracked=createHook(`rtc`);function onErrorCaptured(e,t=currentInstance){injectHook(`ec`,e,t)}var COMPONENTS=`components`,DIRECTIVES=`directives`,NULL_DYNAMIC_COMPONENT=Symbol.for(`v-ndc`);function resolveDynamicComponent(e){return isString(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){let i=currentRenderingInstance||currentInstance;if(i){let n=i.type;if(e===COMPONENTS){let e=getComponentName(n,!1);if(e&&(e===t||e===camelize(t)||e===capitalize(camelize(t))))return n}let a=resolve(i[e]||n[e],t)||resolve(i.appContext[e],t);return!a&&r?n:a}}function resolve(e,t){return e&&(e[t]||e[camelize(t)]||e[capitalize(camelize(t))])}function renderList(e,t,n,r){let i,a=n&&n[r],o=isArray$1(e);if(o||isString(e)){let n=o&&isReactive(e),r=!1,s=!1;n&&(r=!isShallow(e),s=isReadonly(e),e=shallowReadArray(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?toReadonly(toReactive(e[n])):toReactive(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(isObject$3(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function renderSlot(e,t,n={},r,i){if(currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&¤tRenderingInstance.parent.ce){let e=Object.keys(n).length>0;return t!==`default`&&(n.name=t),openBlock(),createBlock(Fragment,null,[createVNode(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),openBlock();let o=a&&ensureValidVNode(a(n)),s=n.key||o&&o.key,c=createBlock(Fragment,{key:(s&&!isSymbol$1(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function ensureValidVNode(e){return e.some(e=>isVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode(e.children)):!0)?e:null}var getPublicInstance=e=>e?isStatefulComponent(e)?getComponentPublicInstance(e):getPublicInstance(e.parent):null,publicPropertiesMap=extend(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(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e,l;if(t[0]!==`$`){let s=o[t];if(s!==void 0)switch(s){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(hasSetupBinding(r,t))return o[t]=1,r[t];else if(i!==EMPTY_OBJ&&hasOwn(i,t))return o[t]=2,i[t];else if((l=e.propsOptions[0])&&hasOwn(l,t))return o[t]=3,a[t];else if(n!==EMPTY_OBJ&&hasOwn(n,t))return o[t]=4,n[t];else shouldCacheAccess&&(o[t]=0)}let u=publicPropertiesMap[t],d,f;if(u)return t===`$attrs`&&track(e.attrs,`get`,``),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==EMPTY_OBJ&&hasOwn(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,hasOwn(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return hasSetupBinding(i,t)?(i[t]=n,!0):r!==EMPTY_OBJ&&hasOwn(r,t)?(r[t]=n,!0):hasOwn(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a,type:o}},s){let c,l;return!!(n[s]||e!==EMPTY_OBJ&&s[0]!==`$`&&hasOwn(e,s)||hasSetupBinding(t,s)||(c=a[0])&&hasOwn(c,s)||hasOwn(r,s)||hasOwn(publicPropertiesMap,s)||hasOwn(i.config.globalProperties,s)||(l=o.__cssModules)&&l[s])},defineProperty(e,t,n){return n.get==null?hasOwn(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function normalizePropsOrEmits(e){return isArray$1(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var shouldCacheAccess=!0;function applyOptions(e){let t=resolveMergedOptions(e),n=e.proxy,r=e.ctx;shouldCacheAccess=!1,t.beforeCreate&&callHook(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:x,render:S,renderTracked:C,renderTriggered:w,errorCaptured:T,serverPrefetch:E,expose:D,inheritAttrs:O,components:k,directives:A,filters:j}=t,M=null;if(l&&resolveInjections(l,r,null),o)for(let e in o){let t=o[e];isFunction$1(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);isObject$3(t)&&(e.data=reactive(t))}if(shouldCacheAccess=!0,a)for(let e in a){let t=a[e],i=computed({get:isFunction$1(t)?t.bind(n,n):isFunction$1(t.get)?t.get.bind(n,n):NOOP,set:!isFunction$1(t)&&isFunction$1(t.set)?t.set.bind(n):NOOP});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)createWatcher(s[e],r,n,e);if(c){let e=isFunction$1(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{provide(t,e[t])})}u&&callHook(u,e,`c`);function N(e,t){isArray$1(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(N(onBeforeMount,d),N(onMounted,f),N(onBeforeUpdate,p),N(onUpdated,m),N(onActivated,g),N(onDeactivated,_),N(onErrorCaptured,T),N(onRenderTracked,C),N(onRenderTriggered,w),N(onBeforeUnmount,y),N(onUnmounted,x),N(onServerPrefetch,E),isArray$1(D))if(D.length){let t=e.exposed||(e.exposed={});D.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===NOOP&&(e.render=S),O!=null&&(e.inheritAttrs=O),k&&(e.components=k),A&&(e.directives=A),E&&markAsyncBoundary(e)}function resolveInjections(e,t,n=NOOP){isArray$1(e)&&(e=normalizeInject(e));for(let n in e){let r=e[n],i;i=isObject$3(r)?`default`in r?inject(r.from||n,r.default,!0):inject(r.from||n):inject(r),isRef(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function callHook(e,t,n){callWithAsyncErrorHandling(isArray$1(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function createWatcher(e,t,n,r){let i=r.includes(`.`)?createPathGetter(n,r):()=>n[r];if(isString(e)){let n=t[e];isFunction$1(n)&&watch(i,n)}else if(isFunction$1(e))watch(i,e.bind(n));else if(isObject$3(e))if(isArray$1(e))e.forEach(e=>createWatcher(e,t,n,r));else{let r=isFunction$1(e.handler)?e.handler.bind(n):t[e.handler];isFunction$1(r)&&watch(i,r,e)}}function resolveMergedOptions(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>mergeOptions(c,e,o,!0)),mergeOptions(c,t,o)),isObject$3(t)&&a.set(t,c),c}function mergeOptions(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&mergeOptions(e,a,n,!0),i&&i.forEach(t=>mergeOptions(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=internalOptionMergeStrats[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var 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(isFunction$1(e)?e.call(this,this):e,isFunction$1(t)?t.call(this,this):t)}:t:e}function mergeInject(e,t){return mergeObjectOptions(normalizeInject(e),normalizeInject(t))}function normalizeInject(e){if(isArray$1(e)){let 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(Object.create(null),e,t):t}function mergeEmitsOrPropsOptions(e,t){return e?isArray$1(e)&&isArray$1(t)?[...new Set([...e,...t])]:extend(Object.create(null),normalizePropsOrEmits(e),normalizePropsOrEmits(t??{})):t}function mergeWatchOptions(e,t){if(!e)return t;if(!t)return e;let n=extend(Object.create(null),e);for(let 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}}var uid$1=0;function createAppAPI(e,t){return function(n,r=null){isFunction$1(n)||(n=extend({},n)),r!=null&&!isObject$3(r)&&(r=null);let i=createAppContext(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:uid$1++,_component:n,_props:r,_container:null,_context:i,_instance:null,version,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&isFunction$1(e.install)?(a.add(e),e.install(c,...t)):isFunction$1(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||createVNode(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,getComponentPublicInstance(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(callWithAsyncErrorHandling(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=currentApp;currentApp=c;try{return e()}finally{currentApp=t}}};return c}}var currentApp=null;function provide(e,t){if(currentInstance){let n=currentInstance.provides,r=currentInstance.parent&¤tInstance.parent.provides;r===n&&(n=currentInstance.provides=Object.create(r)),n[e]=t}}function inject(e,t,n=!1){let r=getCurrentInstance();if(r||currentApp){let i=currentApp?currentApp._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&isFunction$1(t)?t.call(r&&r.proxy):t}}var internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=e=>Object.getPrototypeOf(e)===internalObjectProto;function initProps(e,t,n,r=!1){let i={},a=createInternalObject();e.propsDefaults=Object.create(null),setFullProps(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:shallowReactive(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function updateProps(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=toRaw(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(isEmitListener(e.emitsOptions,o))continue;let u=t[o];if(c)if(hasOwn(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=camelize(o);i[t]=resolvePropValue(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{setFullProps(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!hasOwn(t,a)&&((r=hyphenate(a))===a||!hasOwn(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=resolvePropValue(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!hasOwn(t,e))&&(delete a[e],l=!0)}l&&trigger(e.attrs,`set`,``)}function setFullProps(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(isReservedProp(c))continue;let l=t[c],u;i&&hasOwn(i,u=camelize(c))?!a||!a.includes(u)?n[u]=l:(s||(s={}))[u]=l:isEmitListener(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=toRaw(n),r=s||EMPTY_OBJ;for(let o=0;o<a.length;o++){let s=a[o];n[s]=resolvePropValue(i,t,s,r[s],e,!hasOwn(r,s))}}return o}function resolvePropValue(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=hasOwn(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&isFunction$1(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=setCurrentInstance(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===hyphenate(n))&&(r=!0))}return r}var mixinPropsCache=new WeakMap;function normalizePropsOptions(e,t,n=!1){let r=n?mixinPropsCache:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!isFunction$1(e)){let r=e=>{c=!0;let[n,r]=normalizePropsOptions(e,t,!0);extend(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return isObject$3(e)&&r.set(e,EMPTY_ARR),EMPTY_ARR;if(isArray$1(a))for(let e=0;e<a.length;e++){let t=camelize(a[e]);validatePropName(t)&&(o[t]=EMPTY_OBJ)}else if(a)for(let e in a){let t=camelize(e);if(validatePropName(t)){let n=a[e],r=o[t]=isArray$1(n)||isFunction$1(n)?{type:n}:extend({},n),i=r.type,c=!1,l=!0;if(isArray$1(i))for(let e=0;e<i.length;++e){let t=i[e],n=isFunction$1(t)&&t.name;if(n===`Boolean`){c=!0;break}else n===`String`&&(l=!1)}else c=isFunction$1(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||hasOwn(r,`default`))&&s.push(t)}}let l=[o,s];return isObject$3(e)&&r.set(e,l),l}function validatePropName(e){return e[0]!==`$`&&!isReservedProp(e)}var isInternalKey=e=>e===`_`||e===`_ctx`||e===`$stable`,normalizeSlotValue=e=>isArray$1(e)?e.map(normalizeVNode):[normalizeVNode(e)],normalizeSlot=(e,t,n)=>{if(t._n)return t;let r=withCtx((...e)=>normalizeSlotValue(t(...e)),n);return r._c=!1,r},normalizeObjectSlots=(e,t,n)=>{let r=e._ctx;for(let n in e){if(isInternalKey(n))continue;let i=e[n];if(isFunction$1(i))t[n]=normalizeSlot(n,i,r);else if(i!=null){let e=normalizeSlotValue(i);t[n]=()=>e}}},normalizeVNodeSlots=(e,t)=>{let n=normalizeSlotValue(t);e.slots.default=()=>n},assignSlots=(e,t,n)=>{for(let r in t)(n||!isInternalKey(r))&&(e[r]=t[r])},initSlots=(e,t,n)=>{let r=e.slots=createInternalObject();if(e.vnode.shapeFlag&32){let e=t._;e?(assignSlots(r,t,n),n&&def(r,`_`,e,!0)):normalizeObjectSlots(t,r)}else t&&normalizeVNodeSlots(e,t)},updateSlots=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=EMPTY_OBJ;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:assignSlots(i,t,n):(a=!t.$stable,normalizeObjectSlots(t,i)),o=t}else t&&(normalizeVNodeSlots(e,t),o={default:1});if(a)for(let e in i)!isInternalKey(e)&&o[e]==null&&delete i[e]};function initFeatureFlags(){}var queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(e){return baseCreateRenderer(e)}function baseCreateRenderer(e,t){let n=getGlobalThis();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=NOOP,insertStaticContent:m}=e,g=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!isSameVNodeType(e,t)&&(r=W(e),z(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Text:_(e,t,n,r);break;case Comment:v(e,t,n,r);break;case Static:e??y(t,n,r,o);break;case Fragment:k(e,t,n,r,i,a,o,s,c);break;default:d&1?S(e,t,n,r,i,a,o,s,c):d&6?A(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,q)}u!=null&&i?setRef(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&setRef(e.ref,null,a,e,!0)},_=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},v=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},y=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},b=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},x=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},S=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)C(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),E(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},C=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:g,transition:_,dirs:v}=e;if(f=e.el=o(e.type,c,m&&m.is,m),g&8?u(f,e.children):g&16&&T(e.children,f,null,i,s,resolveChildrenNamespace(e,c),l,d),v&&invokeDirectiveHook(e,null,i,`created`),w(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!isReservedProp(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&invokeVNodeHook(p,i,e)}v&&invokeDirectiveHook(e,null,i,`beforeMount`);let y=needTransition(s,_);y&&_.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||y||v)&&queuePostRenderEffect(()=>{p&&invokeVNodeHook(p,i,e),y&&_.enter(f),v&&invokeDirectiveHook(e,null,i,`mounted`)},s)},w=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t<r.length;t++)p(e,r[t]);if(i){let n=i.subTree;if(t===n||isSuspense(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;w(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},T=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)g(null,e[l]=s?cloneIfMounted(e[l]):normalizeVNode(e[l]),t,n,r,i,a,o,s)},E=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||EMPTY_OBJ,m=t.props||EMPTY_OBJ,g;if(n&&toggleRecurse(n,!1),(g=m.onVnodeBeforeUpdate)&&invokeVNodeHook(g,n,t,e),f&&invokeDirectiveHook(t,e,n,`beforeUpdate`),n&&toggleRecurse(n,!0),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?D(e.dynamicChildren,d,c,n,r,resolveChildrenNamespace(t,i),o):s||F(e,t,c,null,n,r,resolveChildrenNamespace(t,i),o,!1),l>0){if(l&16)O(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=p[r],s=m[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else !s&&d==null&&O(c,p,m,n,i);((g=m.onVnodeUpdated)||f)&&queuePostRenderEffect(()=>{g&&invokeVNodeHook(g,n,t,e),f&&invokeDirectiveHook(t,e,n,`updated`)},r)},D=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];g(c,l,c.el&&(c.type===Fragment||!isSameVNodeType(c,l)||c.shapeFlag&198)?d(c.el):n,null,r,i,a,o,!0)}},O=(e,t,n,r,i)=>{if(t!==n){if(t!==EMPTY_OBJ)for(let o in t)!isReservedProp(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(isReservedProp(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},k=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:g}=t;g&&(l=l?l.concat(g):g),e==null?(r(d,n,i),r(f,n,i),T(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren?(D(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&traverseStaticChildren(e,t,!0)):F(e,t,n,f,a,o,c,l,u)},A=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):j(t,n,r,i,a,o,c):M(e,t,c)},j=(e,t,n,r,i,a,o)=>{let s=e.component=createComponentInstance(e,r,i);if(isKeepAlive(e)&&(s.ctx.renderer=q),setupComponent(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,N,o),!e.el){let r=s.subTree=createVNode(Comment);v(null,r,t,n),e.placeholder=r.el}}else N(s,e,t,n,i,a,o)},M=(e,t,n)=>{let r=t.component=e.component;if(shouldUpdateComponent(e,t,n))if(r.asyncDep&&!r.asyncResolved){P(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},N=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:c,vnode:l}=e;{let n=locateNonHydratedAsyncRoot(e);if(n){t&&(t.el=l.el,P(e,t,o)),n.asyncDep.then(()=>{e.isUnmounted||s()});return}}let u=t,f;toggleRecurse(e,!1),t?(t.el=l.el,P(e,t,o)):t=l,n&&invokeArrayFns(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&invokeVNodeHook(f,c,t,l),toggleRecurse(e,!0);let p=renderComponentRoot(e),m=e.subTree;e.subTree=p,g(m,p,d(m.el),W(m),e,i,a),t.el=p.el,u===null&&updateHOCHostEl(e,p.el),r&&queuePostRenderEffect(r,i),(f=t.props&&t.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(f,c,t,l),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=isAsyncWrapper(t);if(toggleRecurse(e,!1),l&&invokeArrayFns(l),!m&&(o=c&&c.onVnodeBeforeMount)&&invokeVNodeHook(o,d,t),toggleRecurse(e,!0),s&&Y){let t=()=>{e.subTree=renderComponentRoot(e),Y(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._def.shadowRoot!==!1&&f.ce._injectChildStyle(p);let o=e.subTree=renderComponentRoot(e);g(null,o,n,r,e,i,a),t.el=o.el}if(u&&queuePostRenderEffect(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;queuePostRenderEffect(()=>invokeVNodeHook(o,d,e),i)}(t.shapeFlag&256||d&&isAsyncWrapper(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&queuePostRenderEffect(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ReactiveEffect(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>queueJob(u),toggleRecurse(e,!0),l()},P=(e,t,n)=>{t.component=e;let 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()},F=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){L(l,f,n,r,i,a,o,s,c);return}else if(p&256){I(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&U(l,i,a),f!==l&&u(n,f)):d&16?m&16?L(l,f,n,r,i,a,o,s,c):U(l,i,a,!0):(d&8&&u(n,``),m&16&&T(f,n,r,i,a,o,s,c))},I=(e,t,n,r,i,a,o,s,c)=>{e=e||EMPTY_ARR,t=t||EMPTY_ARR;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;f<d;f++){let r=t[f]=c?cloneIfMounted(t[f]):normalizeVNode(t[f]);g(e[f],r,n,null,i,a,o,s,c)}l>u?U(e,i,a,!0,!1,d):T(t,n,r,i,a,o,s,c,d)},L=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);if(isSameVNodeType(r,u))g(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?cloneIfMounted(t[f]):normalizeVNode(t[f]);if(isSameVNodeType(r,l))g(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)g(null,t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)z(e[l],i,a,!0),l++;else{let p=l,m=l,_=new Map;for(l=m;l<=f;l++){let e=t[l]=c?cloneIfMounted(t[l]):normalizeVNode(t[l]);e.key!=null&&_.set(e.key,l)}let v,y=0,b=f-m+1,x=!1,S=0,C=Array(b);for(l=0;l<b;l++)C[l]=0;for(l=p;l<=d;l++){let r=e[l];if(y>=b){z(r,i,a,!0);continue}let u;if(r.key!=null)u=_.get(r.key);else for(v=m;v<=f;v++)if(C[v-m]===0&&isSameVNodeType(r,t[v])){u=v;break}u===void 0?z(r,i,a,!0):(C[u-m]=l+1,u>=S?S=u:x=!0,g(r,t[u],n,null,i,a,o,s,c),y++)}let w=x?getSequence(C):EMPTY_ARR;for(v=w.length-1,l=b-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1<u?f.el||f.placeholder:r;C[l]===0?g(null,d,n,p,i,a,o,s,c):x&&(v<0||l!==w[v]?R(d,n,p,2):v--)}}},R=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){R(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,q);return}if(c===Fragment){r(s,t,n);for(let e=0;e<u.length;e++)R(u[e],t,n,a);r(e.anchor,t,n);return}if(c===Static){b(e,t,n);return}if(a!==2&&d&1&&l)if(a===0)l.beforeEnter(s),r(s,t,n),queuePostRenderEffect(()=>l.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{s._isLeaving&&s[leaveCbKey](!0),a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},z=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(pauseTracking(),setRef(s,null,n,e,!0),resetTracking()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,g=!isAsyncWrapper(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&invokeVNodeHook(_,t,e),u&6)H(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&invokeDirectiveHook(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,q,r):l&&!l.hasOnce&&(a!==Fragment||d>0&&d&64)?U(l,t,n,!1,!0):(a===Fragment&&d&384||!i&&u&16)&&U(c,t,n),r&&B(e)}(g&&(_=o&&o.onVnodeUnmounted)||m)&&queuePostRenderEffect(()=>{_&&invokeVNodeHook(_,t,e),m&&invokeDirectiveHook(e,null,t,`unmounted`)},n)},B=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===Fragment){V(n,r);return}if(t===Static){x(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},V=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},H=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;invalidateMount(c),invalidateMount(l),r&&invokeArrayFns(r),i.stop(),a&&(a.flags|=8,z(o,e,t,n)),s&&queuePostRenderEffect(s,t),queuePostRenderEffect(()=>{e.isUnmounted=!0},t)},U=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)z(e[o],t,n,r,i)},W=e=>{if(e.shapeFlag&6)return W(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[TeleportEndKey];return n?f(n):t},G=!1,K=(e,t,n)=>{e==null?t._vnode&&z(t._vnode,null,null,!0):g(t._vnode||null,e,t,null,null,null,n),t._vnode=e,G||(G=!0,flushPreFlushCbs(),flushPostFlushCbs(),G=!1)},q={p:g,um:z,m:R,r:B,mt:j,mc:T,pc:F,pbc:D,n:W,o:e},J,Y;return t&&([J,Y]=t(q)),{render:K,hydrate:J,createApp:createAppAPI(K,J)}}function resolveChildrenNamespace({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&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){let r=e.children,i=t.children;if(isArray$1(r)&&isArray$1(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=cloneIfMounted(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&traverseStaticChildren(t,a)),a.type===Text&&a.patchFlag!==-1&&(a.el=t.el),a.type===Comment&&!a.el&&(a.el=t.el)}}function getSequence(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function locateNonHydratedAsyncRoot(e){let 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}var 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){let{immediate:r,deep:i,flush:a,once:o}=n,s=extend({},n),c=t&&r||!t&&a!==`post`,l;if(isInSSRComponentSetup){if(a===`sync`){let e=useSSRContext();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){let e=()=>{};return e.stop=NOOP,e.resume=NOOP,e.pause=NOOP,e}}let u=currentInstance;s.call=(e,t,n)=>callWithAsyncErrorHandling(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{queuePostRenderEffect(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():queueJob(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=watch$1(e,t,s);return isInSSRComponentSetup&&(l?l.push(f):c&&f()),f}function instanceWatch(e,t,n){let r=this.proxy,i=isString(e)?e.includes(`.`)?createPathGetter(r,e):()=>r[e]:e.bind(r,r),a;isFunction$1(t)?a=t:(a=t.handler,n=t);let o=setCurrentInstance(this),s=doWatch(i,a.bind(r),n);return o(),s}function createPathGetter(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var getModelModifiers=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${camelize(t)}Modifiers`]||e[`${hyphenate(t)}Modifiers`];function emit(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||EMPTY_OBJ,i=n,a=t.startsWith(`update:`),o=a&&getModelModifiers(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>isString(e)?e.trim():e)),o.number&&(i=n.map(looseToNumber)));let s,c=r[s=toHandlerKey(t)]||r[s=toHandlerKey(camelize(t))];!c&&a&&(c=r[s=toHandlerKey(hyphenate(t))]),c&&callWithAsyncErrorHandling(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,callWithAsyncErrorHandling(l,e,6,i)}}var mixinEmitsCache=new WeakMap;function normalizeEmitsOptions(e,t,n=!1){let r=n?mixinEmitsCache:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!isFunction$1(e)){let r=e=>{let n=normalizeEmitsOptions(e,t,!0);n&&(s=!0,extend(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(isObject$3(e)&&r.set(e,null),null):(isArray$1(a)?a.forEach(e=>o[e]=null):extend(o,a),isObject$3(e)&&r.set(e,o),o)}function isEmitListener(e,t){return!e||!isOn(t)?!1:(t=t.slice(2).replace(/Once$/,``),hasOwn(e,t[0].toLowerCase()+t.slice(1))||hasOwn(e,hyphenate(t))||hasOwn(e,t))}function renderComponentRoot(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:g}=e,_=setCurrentRenderingInstance(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=normalizeVNode(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=normalizeVNode(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:getFunctionalFallthrough(s)}}catch(t){blockStack.length=0,handleError(t,e,1),v=createVNode(Comment)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(isModelListener)&&(y=filterModelListeners(y,a)),b=cloneVNode(b,y,!1,!0))}return n.dirs&&(b=cloneVNode(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&setTransitionHooks(b,n.transition),v=b,setCurrentRenderingInstance(_),v}var getFunctionalFallthrough=e=>{let t;for(let n in e)(n===`class`||n===`style`||isOn(n))&&((t||(t={}))[n]=e[n]);return t},filterModelListeners=(e,t)=>{let n={};for(let r in e)(!isModelListener(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function shouldUpdateComponent(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?hasPropsChanged(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(o[n]!==r[n]&&!isEmitListener(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?hasPropsChanged(r,o,l):!0:!!o;return!1}function hasPropsChanged(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(t[a]!==e[a]&&!isEmitListener(n,a))return!0}return!1}function updateHOCHostEl({vnode:e,parent:t},n){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}var isSuspense=e=>e.__isSuspense;function queueEffectWithSuspense(e,t){t&&t.pendingBranch?isArray$1(e)?t.effects.push(...e):t.effects.push(e):queuePostFlushCb(e)}var Fragment=Symbol.for(`v-fgt`),Text=Symbol.for(`v-txt`),Comment=Symbol.for(`v-cmt`),Static=Symbol.for(`v-stc`),blockStack=[],currentBlock=null;function openBlock(e=!1){blockStack.push(currentBlock=e?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}var 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,i,a){return setupBlock(createBaseVNode(e,t,n,r,i,a,!0))}function createBlock(e,t,n,r,i){return setupBlock(createVNode(e,t,n,r,i,!0))}function isVNode(e){return e?e.__v_isVNode===!0:!1}function isSameVNodeType(e,t){return e.type===t.type&&e.key===t.key}var normalizeKey=({key:e})=>e??null,normalizeRef=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:isString(e)||isRef(e)||isFunction$1(e)?{i:currentRenderingInstance,r:e,k:t,f:!!n}:e);function createBaseVNode(e,t=null,n=null,r=0,i=null,a=e===Fragment?0:1,o=!1,s=!1){let 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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return s?(normalizeChildren(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=isString(n)?8:16),isBlockTreeEnabled>0&&!o&¤tBlock&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&¤tBlock.push(c),c}var createVNode=_createVNode;function _createVNode(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===NULL_DYNAMIC_COMPONENT)&&(e=Comment),isVNode(e)){let r=cloneVNode(e,t,!0);return n&&normalizeChildren(r,n),isBlockTreeEnabled>0&&!a&¤tBlock&&(r.shapeFlag&6?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(e)&&(t.class=normalizeClass(e)),isObject$3(n)&&(isProxy(n)&&!isArray$1(n)&&(n=extend({},n)),t.style=normalizeStyle(n))}let o=isString(e)?1:isSuspense(e)?128:isTeleport(e)?64:isObject$3(e)?4:isFunction$1(e)?2:0;return createBaseVNode(e,t,n,r,i,o,a,!0)}function guardReactiveProps(e){return e?isProxy(e)||isInternalObject(e)?extend({},e):e:null}function cloneVNode(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?mergeProps(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&normalizeKey(l),ref:t&&t.ref?n&&a?isArray$1(a)?a.concat(normalizeRef(t)):[a,normalizeRef(t)]:normalizeRef(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Fragment?o===-1?16:o|16:o,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 e==null||typeof e==`boolean`?createVNode(Comment):isArray$1(e)?createVNode(Fragment,null,e.slice()):isVNode(e)?cloneIfMounted(e):createVNode(Text,null,String(e))}function cloneIfMounted(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cloneVNode(e)}function normalizeChildren(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(isArray$1(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),normalizeChildren(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!isInternalObject(t)?t._ctx=currentRenderingInstance:r===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else isFunction$1(t)?(t={default:t,_ctx:currentRenderingInstance},n=32):(t=String(t),r&64?(n=16,t=[createTextVNode(t)]):n=8);e.children=t,e.shapeFlag|=n}function mergeProps(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=normalizeClass([t.class,r.class]));else if(e===`style`)t.style=normalizeStyle([t.style,r.style]);else if(isOn(e)){let n=t[e],i=r[e];i&&n!==i&&!(isArray$1(n)&&n.includes(i))&&(t[e]=n?[].concat(n,i):i)}else e!==``&&(t[e]=r[e])}return t}function invokeVNodeHook(e,t,n,r=null){callWithAsyncErrorHandling(e,t,7,[n,r])}var emptyAppContext=createAppContext(),uid=0;function createComponentInstance(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||emptyAppContext,a={uid:uid++,vnode:e,type:r,parent:t,appContext:i,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(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(r,i),emitsOptions:normalizeEmitsOptions(r,i),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 a.ctx={_:a},a.root=t?t.root:a,a.emit=emit.bind(null,a),e.ce&&e.ce(a),a}var currentInstance=null,getCurrentInstance=()=>currentInstance||currentRenderingInstance,internalSetCurrentInstance,setInSSRSetupState;{let 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)}var setCurrentInstance=e=>{let t=currentInstance;return internalSetCurrentInstance(e),e.scope.on(),()=>{e.scope.off(),internalSetCurrentInstance(t)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(e){return e.vnode.shapeFlag&4}var isInSSRComponentSetup=!1;function setupComponent(e,t=!1,n=!1){t&&setInSSRSetupState(t);let{props:r,children:i}=e.vnode,a=isStatefulComponent(e);initProps(e,r,a,t),initSlots(e,i,n||t);let o=a?setupStatefulComponent(e,t):void 0;return t&&setInSSRSetupState(!1),o}function setupStatefulComponent(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,PublicInstanceProxyHandlers);let{setup:r}=n;if(r){pauseTracking();let n=e.setupContext=r.length>1?createSetupContext(e):null,i=setCurrentInstance(e),a=callWithErrorHandling(r,e,0,[e.props,n]),o=isPromise(a);if(resetTracking(),i(),(o||e.sp)&&!isAsyncWrapper(e)&&markAsyncBoundary(e),o){if(a.then(unsetCurrentInstance,unsetCurrentInstance),t)return a.then(n=>{handleSetupResult(e,n,t)}).catch(t=>{handleError(t,e,0)});e.asyncDep=a}else handleSetupResult(e,a,t)}else finishComponentSetup(e,t)}function handleSetupResult(e,t,n){isFunction$1(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:isObject$3(t)&&(e.setupState=proxyRefs(t)),finishComponentSetup(e,n)}var compile,installWithProxy;function finishComponentSetup(e,t,n){let r=e.type;if(!e.render){if(!t&&compile&&!r.render){let t=r.template||resolveMergedOptions(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=compile(t,extend(extend({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||NOOP,installWithProxy&&installWithProxy(e)}{let t=setCurrentInstance(e);pauseTracking();try{applyOptions(e)}finally{resetTracking(),t()}}}var attrsProxyHandlers={get(e,t){return track(e,`get`,``),e[t]}};function createSetupContext(e){return{attrs:new Proxy(e.attrs,attrsProxyHandlers),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function getComponentPublicInstance(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(proxyRefs(markRaw(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in publicPropertiesMap)return publicPropertiesMap[n](e)},has(e,t){return t in e||t in publicPropertiesMap}})):e.proxy}function getComponentName(e,t=!0){return isFunction$1(e)?e.displayName||e.name:e.name||t&&e.__name}function isClassComponent(e){return isFunction$1(e)&&`__vccOpts`in e}var computed=(e,t)=>computed$1(e,t,isInSSRComponentSetup);function h(e,t,n){try{setBlockTracking(-1);let r=arguments.length;return r===2?isObject$3(t)&&!isArray$1(t)?isVNode(t)?createVNode(e,null,[t]):createVNode(e,t):createVNode(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&isVNode(n)&&(n=[n]),createVNode(e,t,n))}finally{setBlockTracking(1)}}var version=`3.5.24`,require_events=__commonJSMin(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=b,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||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(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=_(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():v(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?y(i):_(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g;function g(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function _(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function y(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function b(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}S(e,t,a,{once:!0}),t!==`error`&&x(e,i,{once:!0})})}function x(e,t,n){typeof e.on==`function`&&S(e,`error`,t,n)}function S(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),freeGlobal=typeof global==`object`&&global&&global.Object===Object&&global,freeSelf=typeof self==`object`&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function(`return this`)(),Symbol$1=root.Symbol,objectProto$3=Object.prototype,hasOwnProperty$11=objectProto$3.hasOwnProperty,nativeObjectToString$1=objectProto$3.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$11.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var r=!0}catch{}var i=nativeObjectToString$1.call(e);return r&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),i}var nativeObjectToString=Object.prototype.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 e==null?e===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}function isObjectLike(e){return typeof e==`object`&&!!e}var symbolTag$2=`[object Symbol]`;function isSymbol(e){return typeof e==`symbol`||isObjectLike(e)&&baseGetTag(e)==symbolTag$2}function arrayMap(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var isArray=Array.isArray,INFINITY$1=1/0,symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if(typeof e==`string`)return e;if(isArray(e))return arrayMap(e,baseToString)+``;if(isSymbol(e))return symbolToString?symbolToString.call(e):``;var t=e+``;return t==`0`&&1/e==-INFINITY$1?`-0`:t}function isObject$2(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function identity(e){return e}var asyncTag=`[object AsyncFunction]`,funcTag$2=`[object Function]`,genTag$1=`[object GeneratorFunction]`,proxyTag=`[object Proxy]`;function isFunction(e){if(!isObject$2(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 funcToString$1=Function.prototype.toString;function toSource(e){if(e!=null){try{return funcToString$1.call(e)}catch{}try{return e+``}catch{}}return``}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$10=objectProto$2.hasOwnProperty,reIsNative=RegExp(`^`+funcToString.call(hasOwnProperty$10).replace(reRegExpChar,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function baseIsNative(e){return!isObject$2(e)||isMasked(e)?!1:(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return 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$2(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(){}function copyArray(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(e){var t=0,n=0;return function(){var r=nativeNow(),i=HOT_SPAN-(r-n);if(n=r,i>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 e=getNative(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),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=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function baseFindIndex(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function baseIsNaN(e){return e!==e}function strictIndexOf(e,t,n){for(var r=n-1,i=e.length;++r<i;)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!!(e!=null&&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=t??MAX_SAFE_INTEGER$1,!!t&&(n==`number`||n!=`symbol`&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function baseAssignValue(e,t,n){t==`__proto__`&&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 hasOwnProperty$9=Object.prototype.hasOwnProperty;function assignValue(e,t,n){var r=e[t];(!(hasOwnProperty$9.call(e,t)&&eq(r,n))||n===void 0&&!(t in e))&&baseAssignValue(e,t,n)}function copyObject(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?baseAssignValue(n,s,c):assignValue(n,s,c)}return n}var nativeMax=Math.max;function overRest(e,t,n){return t=nativeMax(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=nativeMax(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),apply(e,this,s)}}function baseRest(e,t){return setToString(overRest(e,t,identity),e+``)}var MAX_SAFE_INTEGER=9007199254740991;function isLength(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isArrayLike(e){return e!=null&&isLength(e.length)&&!isFunction(e)}var objectProto$1=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||objectProto$1)}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=Object.prototype,hasOwnProperty$8=objectProto.hasOwnProperty,propertyIsEnumerable$1=objectProto.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=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module==`object`&&module&&!module.nodeType&&module,Buffer$2=freeModule$2&&freeModule$2.exports===freeExports$2?root.Buffer:void 0,isBuffer=(Buffer$2?Buffer$2.isBuffer:void 0)||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={};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;function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}function baseUnary(e){return function(t){return e(t)}}var freeExports$1=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module==`object`&&module&&!module.nodeType&&module,freeProcess=freeModule$1&&freeModule$1.exports===freeExports$1&&freeGlobal.process,nodeUtil=function(){try{return freeModule$1&&freeModule$1.require&&freeModule$1.require(`util`).types||freeProcess&&freeProcess.binding&&freeProcess.binding(`util`)}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,hasOwnProperty$7=Object.prototype.hasOwnProperty;function arrayLikeKeys(e,t){var n=isArray(e),r=!n&&isArguments(e),i=!n&&!r&&isBuffer(e),a=!n&&!r&&!i&&isTypedArray(e),o=n||r||i||a,s=o?baseTimes(e.length,String):[],c=s.length;for(var l in e)(t||hasOwnProperty$7.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||isIndex(l,c)))&&s.push(l);return s}function overArg(e,t){return function(n){return e(t(n))}}var nativeKeys=overArg(Object.keys,Object),hasOwnProperty$6=Object.prototype.hasOwnProperty;function baseKeys(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var n in Object(e))hasOwnProperty$6.call(e,n)&&n!=`constructor`&&t.push(n);return t}function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function nativeKeysIn(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var hasOwnProperty$5=Object.prototype.hasOwnProperty;function baseKeysIn(e){if(!isObject$2(e))return nativeKeysIn(e);var t=isPrototype(e),n=[];for(var r in e)r==`constructor`&&(t||!hasOwnProperty$5.call(e,r))||n.push(r);return n}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,!0):baseKeysIn(e)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||isSymbol(e)?!0:reIsPlainProp.test(e)||!reIsDeepProp.test(e)||t!=null&&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__`,hasOwnProperty$4=Object.prototype.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var n=t[e];return n===HASH_UNDEFINED$2?void 0:n}return hasOwnProperty$4.call(t,e)?t[e]:void 0}var hasOwnProperty$3=Object.prototype.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?t[e]!==void 0:hasOwnProperty$3.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&&t===void 0?HASH_UNDEFINED$1:t,this}function Hash(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;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}var splice=Array.prototype.splice;function listCacheDelete(e){var t=this.__data__,n=assocIndexOf(t,e);return n<0?!1:(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=e==null?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 t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function getMapData(e,t){var n=e.__data__;return isKeyable(t)?n[typeof t==`string`?`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=e==null?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(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(FUNC_ERROR_TEXT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};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 e.charCodeAt(0)===46&&t.push(``),e.replace(rePropName,function(e,n,r,i){t.push(r?i.replace(reEscapeChar,`$1`):n||e)}),t});function toString(e){return e==null?``:baseToString(e)}function castPath(e,t){return isArray(e)?e:isKey(e,t)?[e]:stringToPath(toString(e))}var INFINITY=1/0;function toKey(e){if(typeof e==`string`||isSymbol(e))return e;var t=e+``;return t==`0`&&1/e==-INFINITY?`-0`:t}function arrayPush(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable(e){return isArray(e)||isArguments(e)||!!(spreadableSymbol&&e&&e[spreadableSymbol])}function baseFlatten(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=isFlattenable),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?baseFlatten(s,t-1,n,r,i):arrayPush(i,s):r||(i[i.length]=s)}return i}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){this.size=(this.__data__=new ListCache(e)).size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function baseAssign(e,t){return e&©Object(t,keys(t),e)}function baseAssignIn(e,t){return e&©Object(t,keysIn(t),e)}var freeExports=typeof exports==`object`&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module==`object`&&module&&!module.nodeType&&module,Buffer$1=freeModule&&freeModule.exports===freeExports?root.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(e,t){if(t)return e.slice();var n=e.length,r=allocUnsafe?allocUnsafe(n):new e.constructor(n);return e.copy(r),r}function arrayFilter(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function stubArray(){return[]}var propertyIsEnumerable=Object.prototype.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return e==null?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),function(t){return propertyIsEnumerable.call(e,t)}))}:stubArray;function copySymbols(e,t){return copyObject(e,getSymbols(e),t)}var getSymbolsIn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)arrayPush(t,getSymbols(e)),e=getPrototype(e);return t}:stubArray;function copySymbolsIn(e,t){return copyObject(e,getSymbolsIn(e),t)}function baseGetAllKeys(e,t,n){var r=t(e);return isArray(e)?r:arrayPush(r,n(e))}function getAllKeys(e){return baseGetAllKeys(e,keys,getSymbols)}function getAllKeysIn(e){return baseGetAllKeys(e,keysIn,getSymbolsIn)}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 _getTag_default=getTag,hasOwnProperty$2=Object.prototype.hasOwnProperty;function initCloneArray(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&hasOwnProperty$2.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=t?cloneArrayBuffer(e.buffer):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=t?cloneArrayBuffer(e.buffer):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,n);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,n);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 typeof e.constructor==`function`&&!isPrototype(e)?baseCreate(getPrototype(e)):{}}var mapTag$2=`[object Map]`;function baseIsMap(e){return isObjectLike(e)&&_getTag_default(e)==mapTag$2}var nodeIsMap=nodeUtil&&nodeUtil.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,setTag$2=`[object Set]`;function baseIsSet(e){return isObjectLike(e)&&_getTag_default(e)==setTag$2}var nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$1=4,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={};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;function baseClone(e,t,n,r,i,a){var o,s=t&CLONE_DEEP_FLAG$1,c=t&CLONE_FLAT_FLAG,l=t&CLONE_SYMBOLS_FLAG$1;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!isObject$2(e))return e;var u=isArray(e);if(u){if(o=initCloneArray(e),!s)return copyArray(e,o)}else{var d=_getTag_default(e),f=d==funcTag||d==genTag;if(isBuffer(e))return cloneBuffer(e,s);if(d==objectTag||d==argsTag||f&&!i){if(o=c||f?{}:initCloneObject(e),!s)return c?copySymbolsIn(e,baseAssignIn(o,e)):copySymbols(e,baseAssign(o,e))}else{if(!cloneableTags[d])return i?e:{};o=initCloneByTag(e,d,s)}}a||(a=new Stack);var p=a.get(e);if(p)return p;a.set(e,o),isSet(e)?e.forEach(function(r){o.add(baseClone(r,t,n,r,e,a))}):isMap(e)&&e.forEach(function(r,i){o.set(i,baseClone(r,t,n,i,e,a))});var m=u?void 0:(l?c?getAllKeysIn:getAllKeys:c?keysIn:keys)(e);return arrayEach(m||e,function(r,i){m&&(i=r,r=e[i]),assignValue(o,i,baseClone(r,t,n,i,e,a))}),o}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=e==null?0:e.length;for(this.__data__=new MapCache;++t<n;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;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){t=castPath(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=toKey(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&isLength(i)&&isIndex(o,i)&&(isArray(e)||isArguments(e)))}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function arrayIncludesWith(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var hasOwnProperty$1=Object.prototype.hasOwnProperty;function baseHas(e,t){return e!=null&&hasOwnProperty$1.call(e,t)}function has(e,t){return e!=null&&hasPath(e,t,baseHas)}var mapTag=`[object Map]`,setTag=`[object Set]`,hasOwnProperty=Object.prototype.hasOwnProperty;function isEmpty(e){if(e==null)return!0;if(isArrayLike(e)&&(isArray(e)||typeof e==`string`||typeof e.splice==`function`||isBuffer(e)||isTypedArray(e)||isArguments(e)))return!e.length;var t=_getTag_default(e);if(t==mapTag||t==setTag)return!e.size;if(isPrototype(e))return!baseKeys(e).length;for(var n in e)if(hasOwnProperty.call(e,n))return!1;return!0}function baseSet(e,t,n,r){if(!isObject$2(e))return e;t=castPath(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=toKey(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=isObject$2(u)?u:isIndex(t[i+1])?[]:{})}assignValue(s,c,l),s=s[c]}return e}function set(e,t,n){return e==null?e:baseSet(e,t,n)}var createSet=Set$1&&1/setToArray(new Set$1([,-0]))[1]==1/0?function(e){return new Set$1(e)}:noop,LARGE_ARRAY_SIZE=200;function baseUniq(e,t,n){var r=-1,i=arrayIncludes,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=arrayIncludesWith;else if(a>=LARGE_ARRAY_SIZE){var l=t?null:createSet(e);if(l)return setToArray(l);o=!1,i=cacheHas,c=new SetCache}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var union=baseRest(function(e){return baseUniq(baseFlatten(e,1,isArrayLikeObject,!0))}),ObservedData=class{};function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof(e)}function toPrimitive(e,t){if(_typeof(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_typeof(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive(e,`string`);return _typeof(t)==`symbol`?t:t+``}function _defineProperty(e,t,n){return(t=toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var import_events=__toESM(require_events(),1),SimpleObservedData=class extends ObservedData{constructor(e){super(),_defineProperty(this,`data`,{}),_defineProperty(this,`event`,new import_events.EventEmitter),this.data=e}update(e,t){t?setValueByKeyPath(t,e,this.data):this.data=e;let 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(){}};function _checkPrivateRedeclaration(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _classPrivateFieldInitSpec(e,t,n){_checkPrivateRedeclaration(e,t),t.set(e,n)}function _assertClassBrand(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function _classPrivateFieldSet2(e,t,n){return e.set(_assertClassBrand(e,t),n),n}function _classPrivateFieldGet2(e,t){return e.get(_assertClassBrand(e,t))}var _type$1=new WeakMap,_id=new WeakMap,_schema=new WeakMap,_observedData=new WeakMap,_fields=new WeakMap,_methods=new WeakMap,DataSource=class extends import_events.default{constructor(e){super(),_defineProperty(this,`isInit`,!1),_defineProperty(this,`app`,void 0),_defineProperty(this,`mockData`,void 0),_classPrivateFieldInitSpec(this,_type$1,`base`),_classPrivateFieldInitSpec(this,_id,void 0),_classPrivateFieldInitSpec(this,_schema,void 0),_classPrivateFieldInitSpec(this,_observedData,void 0),_classPrivateFieldInitSpec(this,_fields,[]),_classPrivateFieldInitSpec(this,_methods,[]),_classPrivateFieldSet2(_id,this,e.schema.id),_classPrivateFieldSet2(_schema,this,e.schema),this.app=e.app,this.setFields(e.schema.fields),this.setMethods(e.schema.methods||[]);let t=e.initialData,n=e.ObservedDataClass||SimpleObservedData;if(this.app.platform===`editor`)this.mockData=cloneDeep(e.schema.mocks||[]).find(e=>e.useInEditor)?.data||this.getDefaultData(),t=cloneDeep(this.mockData);else if(typeof e.useMock==`boolean`&&e.useMock)this.mockData=cloneDeep(e.schema.mocks||[]).find(e=>e.enable)?.data,t=cloneDeep(this.mockData)||this.getDefaultData();else if(!e.initialData)t=this.getDefaultData();else{_classPrivateFieldSet2(_observedData,this,new n(e.initialData??{})),this.isInit=!0;return}_classPrivateFieldSet2(_observedData,this,new n(t??{}))}get id(){return _classPrivateFieldGet2(_id,this)}get type(){return _classPrivateFieldGet2(_type$1,this)}get schema(){return _classPrivateFieldGet2(_schema,this)}get fields(){return _classPrivateFieldGet2(_fields,this)}get methods(){return _classPrivateFieldGet2(_methods,this)}setFields(e){_classPrivateFieldSet2(_fields,this,e)}setMethods(e){_classPrivateFieldSet2(_methods,this,e)}get data(){return _classPrivateFieldGet2(_observedData,this).getData(``)}setData(e,t){_classPrivateFieldGet2(_observedData,this).update(e,t);let n={updateData:e,path:t};this.emit(`change`,n)}setValue(e,t){return this.setData(t,e)}onDataChange(e,t,n){_classPrivateFieldGet2(_observedData,this).on(e,t,n)}offDataChange(e,t){_classPrivateFieldGet2(_observedData,this).off(e,t)}getDefaultData(){return getDefaultValueFromFields(_classPrivateFieldGet2(_fields,this))}async init(){this.isInit=!0}destroy(){_classPrivateFieldSet2(_fields,this,[]),this.removeAllListeners(),_classPrivateFieldGet2(_observedData,this).destroy()}},urlencoded=e=>Object.entries(e).reduce((e,[t,n])=>{let r=n;return typeof n==`object`&&(r=JSON.stringify(n)),n===void 0?e:`${e}${e?`&`:``}${globalThis.encodeURIComponent(t)}=${globalThis.encodeURIComponent(`${r}`)}`},``),webRequest=async e=>{let{url:t,method:n=`GET`,headers:r={},params:i={},data:a={},...o}=e,s=urlencoded(i),c=JSON.stringify(a);return r[`Content-Type`]?.includes(`application/x-www-form-urlencoded`)&&(c=urlencoded(a)),(await globalThis.fetch(s?`${t}?${s}`:t,{method:n,headers:r,body:n===`GET`?void 0:c,...o})).json()},_fetch=new WeakMap,_beforeRequest=new WeakMap,_afterRequest=new WeakMap,_type=new WeakMap,HttpDataSource=class extends DataSource{constructor(e){let{options:t}=e.schema;super(e),_defineProperty(this,`isLoading`,!1),_defineProperty(this,`error`,void 0),_defineProperty(this,`httpOptions`,void 0),_classPrivateFieldInitSpec(this,_fetch,void 0),_classPrivateFieldInitSpec(this,_beforeRequest,[]),_classPrivateFieldInitSpec(this,_afterRequest,[]),_classPrivateFieldInitSpec(this,_type,`http`),this.httpOptions=t,typeof e.request==`function`?_classPrivateFieldSet2(_fetch,this,e.request):typeof globalThis.fetch==`function`&&_classPrivateFieldSet2(_fetch,this,webRequest),this.methods.forEach(e=>{typeof e.content==`function`&&(e.timing===`beforeRequest`&&_classPrivateFieldGet2(_beforeRequest,this).push(e.content),e.timing===`afterRequest`&&_classPrivateFieldGet2(_afterRequest,this).push(e.content))})}get type(){return _classPrivateFieldGet2(_type,this)}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(e={}){this.isLoading=!0;let{url:t,params:n,data:r,headers:i,...a}=this.httpOptions,o={url:typeof t==`function`?t({app:this.app,dataSource:this}):t,params:typeof n==`function`?n({app:this.app,dataSource:this}):n,data:typeof r==`function`?r({app:this.app,dataSource:this}):r,headers:typeof i==`function`?i({app:this.app,dataSource:this}):i,...a,...e};try{for(let e of _classPrivateFieldGet2(_beforeRequest,this))await e({options:o,params:{},dataSource:this,app:this.app});if(typeof this.schema.beforeRequest==`function`&&(o=await this.schema.beforeRequest(o,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let e=await _classPrivateFieldGet2(_fetch,this)?.call(this,o);for(let t of _classPrivateFieldGet2(_afterRequest,this))await t({res:e,options:o,params:{},dataSource:this,app:this.app});if(typeof this.schema.afterResponse==`function`&&(e=await this.schema.afterResponse(e,{app:this.app,dataSource:this,options:o})),this.schema.responseOptions?.dataPath){let t=getValueByKeyPath(this.schema.responseOptions.dataPath,e);this.setData(t)}else this.setData(e)}this.error=void 0}catch(e){this.error={msg:e.message},this.emit(`error`,e)}this.isLoading=!1}get(e){return this.request({...e,method:`GET`})}post(e){return this.request({...e,method:`POST`})}},cache=new Map,getDeps=(e,t,n)=>{let r;if(n){let 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);let i=new Watcher;i.addTarget(new Target({id:e.id,type:`data-source`,isTarget:(t,n)=>`${t}`.includes(`__tmagic__`)?!1:isDataSourceTarget(e,t,n,!0)})),i.addTarget(new Target({id:e.id,type:`cond`,isTarget:(t,n)=>isDataSourceCondTarget(e,t,n,!0)})),i.collect(t,{},!0);let{deps:a}=i.getTarget(e.id,`data-source`),{deps:o}=i.getTarget(e.id,`cond`),s={deps:a,condDeps:o};return cache.set(r,s),s},compiledCondition=(e,t)=>{let n=!0;for(let{op:r,value:i,range:a,field:o}of e){let[e,...s]=o,c=t[e];if(!c||!s.length)break;try{if(!compiledCond(r,getValueByKeyPath(s.join(`.`),c),i,a)){n=!1;break}}catch(e){console.warn(e)}}return n},compliedConditions=(e,t)=>{if(!e.displayConds||!Array.isArray(e.displayConds)||!e.displayConds.length)return!0;for(let{cond:n}of e[NODE_CONDS_KEY])if(n&&compiledCondition(n,t))return!0;return!1},updateNode=(e,t)=>{if(isPage(e)||isPageFragment(e)){let 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={})=>{let i={...r,[t]:{}},a=cloneDeep(r[t]),o=i[t];return n.forEach((t,r)=>{if(Object.assign(o,a),r===n.length-1){o[t]=e;return}Array.isArray(a[t])&&(a[t]={},o[t]={}),a=a[t],o=o[t]}),i},compliedDataSourceField=(e,t)=>{let[n,...r]=e,i=n.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);if(i>-1){let a=t[n.substring(i+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)];if(!a)return e;try{return getValueByKeyPath(r.join(`.`),a)}catch{return e}}return e},template=(e,t)=>e.replace(dataSourceTemplateRegExp,(e,n)=>{try{return getValueByKeyPath(n,t)}catch{return e}}),compiledNodeField=(e,t)=>typeof e==`string`?template(e,t):e?.isBindDataSource&&e.dataSourceId?t[e.dataSourceId]:e?.isBindDataSourceField&&e.dataSourceId&&typeof e.template==`string`?template(e.template,t[e.dataSourceId]):Array.isArray(e)&&typeof e[0]==`string`?compliedDataSourceField(e,t):e,compliedIteratorItem=({compile:e,dsId:t,item:n,deps:r,condDeps:i,inEditor:a,ctxData:o})=>{let{items:s,...c}=n,l=cloneDeep(c);return i[c.id]?.keys.length&&!a&&(l.condResult=compliedConditions(c,o)),Array.isArray(s)&&s.length?l.items=s.map(n=>compliedIteratorItem({compile:e,dsId:t,item:n,deps:r,condDeps:i,inEditor:a,ctxData:o})):s&&(l.items=s),r[l.id]?.keys.length?compiledNode(e,l,{[t]:r},t):l},registerDataSourceOnDemand=async(e,t)=>{let{dataSourceMethodsDeps:n={},dataSourceCondDeps:r={},dataSourceDeps:i={},dataSources:a=[]}=e,o={};a.forEach(e=>{let a=r[e.id]||{};Object.keys(a).length||(a=i[e.id]||{}),Object.keys(a).length||(a=n[e.id]||{}),Object.keys(a).length&&t[e.type]&&(o[e.type]=t[e.type])});let s=await Promise.all(Object.values(o).map(e=>e())),c={};return s.forEach((e,t)=>{let n=Object.keys(o)[t];c[n]=e.default}),c},DataSourceManager=class e extends import_events.default{static register(t,n){e.dataSourceClassMap.set(t,n),e.waitInitSchemaList?.forEach((e,n)=>{let r=e[t]||[];for(let e=r.shift();e;e=r.shift()){let t=n.addDataSource(e);t&&n.init(t)}})}static getDataSourceClass(t){return e.dataSourceClassMap.get(t)}static clearDataSourceClass(){e.dataSourceClassMap.clear(),e.dataSourceClassMap.set(`base`,DataSource),e.dataSourceClassMap.set(`http`,HttpDataSource)}static registerObservedData(t){e.ObservedDataClass=t}constructor({app:t,useMock:n,initialData:r}){super(),_defineProperty(this,`app`,void 0),_defineProperty(this,`dataSourceMap`,new Map),_defineProperty(this,`data`,{}),_defineProperty(this,`initialData`,{}),_defineProperty(this,`useMock`,!1),e.waitInitSchemaList.set(this,{}),this.app=t,this.useMock=n,r&&(this.initialData=r,this.data={...r}),t.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(let t of e.methods){if(typeof t.content!=`function`)return;t.timing===`beforeInit`&&await t.content({params:{},dataSource:e,app:this.app})}await e.init();for(let t of e.methods){if(typeof t.content!=`function`)return;t.timing===`afterInit`&&await t.content({params:{},dataSource:e,app:this.app})}}}get(e){return this.dataSourceMap.get(e)}addDataSource(t){if(!t)return;let n=e.dataSourceClassMap.get(t.type);if(!n){let n=e.waitInitSchemaList.get(this);n||(n={},e.waitInitSchemaList.set(this,n)),n[t.type]?n[t.type].push(t):n[t.type]=[t],this.data[t.id]=this.initialData[t.id]??getDefaultValueFromFields(t.fields);return}let r=new n({app:this.app,schema:t,request:this.app.request,useMock:this.useMock,initialData:this.initialData[t.id],ObservedDataClass:e.ObservedDataClass});return this.dataSourceMap.set(t.id,r),this.data[r.id]=r.data,r.on(`change`,e=>{this.setData(r,e)}),this.isAllDataSourceRegistered()&&this.emit(`registered-all`),r}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(let t of e){if(!this.get(t.id))return;this.removeDataSource(t.id)}for(let t of e){this.addDataSource(cloneDeep(t));let e=this.get(t.id);e&&this.init(e)}}compiledNode(e,t,n=!1){if(e._tmagic_node_disabled_data_source)return e;let{items:r,...i}=e,a=cloneDeep(i);return r&&(a.items=Array.isArray(r)&&n?r.map(e=>this.compiledNode(e,t,n)):r),i.condResult===!1||i.condResult===void 0&&i.displayCondsResultReverse?a:compiledNode(e=>compiledNodeField(e,this.data),a,this.app.dsl?.dataSourceDeps||{},t)}compliedConds(e,t=this.data){if(e._tmagic_node_disabled_data_source)return!0;let n=compliedConditions(e,t);return e.displayCondsResultReverse?!n:n}compliedIteratorItemConds(e,t,n=[]){let[r,...i]=n,a=this.get(r);if(!a)return!0;let o=createIteratorContentData(e,a.id,i,this.data);return this.compliedConds(t,o)}compliedIteratorItems(e,t,n=[]){let[r,...i]=n,a=this.get(r);if(!a)return t;let o=this.app.platform===`editor`,s=createIteratorContentData(e,a.id,i,this.data),{deps:c={},condDeps:l={}}=getDeps(a.schema,t,o);return!Object.keys(c).length&&!Object.keys(l).length?t:t.map(e=>compliedIteratorItem({compile:e=>compiledNodeField(e,s),dsId:a.id,item:e,deps:c,condDeps:l,inEditor:o,ctxData:s}))}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(),e.waitInitSchemaList.delete(this)}onDataChange(e,t,n,r){return this.get(e)?.onDataChange(t,n,r)}offDataChange(e,t,n){return this.get(e)?.offDataChange(t,n)}callDsInit(){let e=Array.from(this.dataSourceMap);typeof Promise.allSettled==`function`?Promise.allSettled(e.map(([,e])=>this.init(e))).then(t=>{let n={},r={};t.forEach((t,i)=>{let a=e[i][0];t.status===`fulfilled`?this.data[a]?n[a]=this.data[a]:delete n[a]:t.status===`rejected`&&(delete n[a],r[a]=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)})}};_defineProperty(DataSourceManager,`dataSourceClassMap`,new Map([[`base`,DataSource],[`http`,HttpDataSource]])),_defineProperty(DataSourceManager,`ObservedDataClass`,SimpleObservedData),_defineProperty(DataSourceManager,`waitInitSchemaList`,new Map);var createDataSourceManager=(e,t,n)=>{let{dsl:r,platform:i}=e;if(!r?.dataSources)return;let a=new DataSourceManager({app:e,useMock:t,initialData:n});return r.dataSources&&r.dataSourceCondDeps&&i!==`editor`&&getNodes(getDepNodeIds(r.dataSourceCondDeps),r.items).forEach(e=>{e.condResult=a.compliedConds(e),updateNode(e,r)}),r.dataSources&&r.dataSourceDeps&&getNodes(getDepNodeIds(r.dataSourceDeps),r.items).forEach(e=>{updateNode(a.compiledNode(e),r)}),e.jsEngine===`nodejs`||a.on(`change`,(t,n)=>{let i=r.dataSourceDeps?.[t]||{},o=r.dataSourceCondDeps?.[t]||{},s=union([...Object.keys(o),...Object.keys(i)]);for(let i of r.items)if(e.platform===`editor`||isPage(i)&&i.id===e.page?.data.id||isPageFragment(i)){let r=getNodes(s,[i]).map(t=>{e.platform!==`editor`&&(t.condResult=a.compliedConds(t));let n=a.compiledNode(t);if(typeof e.page?.setData==`function`){isPage(n)?e.page.setData(n):i.id===e.page.data.id&&!e.page.instance&&replaceChildNode(n,[e.page.data]),e.getNode(t.id,{strict:!0})?.setData(n);for(let[,t]of e.pageFragments)t.data.id===n.id?t.setData(n):t.data.id===i.id&&(t.getNode(n.id,{strict:!0})?.setData(n),t.instance||replaceChildNode(n,[t.data]))}return n});r.length&&a.emit(`update-data`,r,t,n,i.id)}}),a};function __awaiter(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var segments=[];function Match(e,t,n=`*`){if(e===n)return!0;segments.length=0;let r=0,i=0,a=0,o=0;for(let t=0,i=e.length;t<i;t+=1){let i=e[t];i===n&&(r+=1,t>o&&segments.push(e.substring(o,t)),segments.push(i),o=t+1)}if(o<e.length&&segments.push(e.substring(o)),r?(i=e.length-r,a=1/0):a=i=e.length,segments.length===0)return e===t;let s=t.length;if(s<i||s>a)return!1;let c=0,l=segments.length-1,u=t.length-1,d=!1;for(;;){let e=segments[l];if(--l,e===n)d=!0;else{let n=u+1-e.length,r=t.lastIndexOf(e,n);if(r===-1||r>n)return!1;if(d)u=r-1,d=!1;else{if(r!==n)return!1;u-=e.length}}if(0>l)break}return!0}var WildcardObject=class{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||e===this.wildcard)return!0;if(this.is_match)return this.is_match(e,t);let n=e.indexOf(this.wildcard);if(n>-1){let r=e.substr(n+1);if(n===0||t.substring(0,n)===e.substring(0,n)){let e=r.length;return e>0?t.substr(-e)===r:!0}}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,i={}){let a=e.indexOf(this.delimiter,n),o=!1;a===-1&&(o=!0,a=e.length);let s=e.substring(n,a),c=0;for(let n of t){let t=c.toString(),l=r===``?t:r+this.delimiter+c;(s===this.wildcard||s===t||this.shortMatch(s,t))&&(o?i[l]=n:this.goFurther(e,n,a+1,l,i)),c++}return i}handleObject(e,t,n,r,i={}){let a=e.indexOf(this.delimiter,n),o=!1;a===-1&&(o=!0,a=e.length);let s=e.substring(n,a);for(let n in t){n=n.toString();let c=r===``?n:r+this.delimiter+n;(s===this.wildcard||s===n||this.shortMatch(s,n))&&(o?i[c]=t[n]:this.goFurther(e,t[n],a+1,c,i))}return i}goFurther(e,t,n,r,i={}){return Array.isArray(t)?this.handleArray(e,t,n,r,i):this.handleObject(e,t,n,r,i)}get(e){return this.goFurther(e,this.obj,0,``)}},ObjectPath=class e{static get(e,t,n=!1){if(!t)return;let r=t;for(let t of e)if(t in r)r=r[t];else if(n)r[t]=Object.create({}),r=r[t];else return;return r}static set(t,n,r){if(!r)return;if(t.length===0){for(let e in r)delete r[e];for(let e in n)r[e]=n[e];return}let i=t.slice(),a=i.pop(),o=e.get(i,r,!0);return typeof o==`object`&&(o[a]=n),n}},wasm,WASM_VECTOR_LEN=0,cachegetUint8Memory0=null;function getUint8Memory0(){return(cachegetUint8Memory0===null||cachegetUint8Memory0.buffer!==wasm.memory.buffer)&&(cachegetUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachegetUint8Memory0}var cachedTextEncoder=new TextEncoder(`utf-8`),encodeString=typeof cachedTextEncoder.encodeInto==`function`?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){let n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}};function passStringToWasm0(e,t,n){if(n===void 0){let 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,i=t(r),a=getUint8Memory0(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3);let t=getUint8Memory0().subarray(i+o,i+r),a=encodeString(e,t);o+=a.written}return WASM_VECTOR_LEN=o,i}function is_match(e,t){var n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,i=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),a=WASM_VECTOR_LEN;return wasm.is_match(n,r,i,a)!==0}async function load(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.headers.get(`Content-Type`)!=`application/wasm`)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",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function init(e){let t={};(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await load(await e,t);return wasm=n.exports,init.__wbindgen_wasm_module=r,wasm}var 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,Promise}}function isObject$1(e){return e&&e.constructor?e.constructor.name===`Object`:typeof e==`object`&&!!e}var DeepState=class{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){let r=e.join(this.options.delimiter),i=this.cache.get(r);if(i){let e=i.deref();if(e)return e}let a=ObjectPath.get(e,t,n);return(isObject$1(a)||Array.isArray(a))&&this.cache.set(r,new WeakRef(a)),a}cacheSet(e,t,n=this.data){let r=e.join(this.options.delimiter);return isObject$1(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)||e===null)&&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?!0:!n&&this.getIndicesCount(this.options.delimiter,e)<this.getIndicesCount(this.options.delimiter,t)?!1:this.scan.match(e,t)}getIndicesOf(e,t){if(this.options.useIndicesCache&&this.indices.has(t))return this.indices.get(t);let n=e.length;if(n==0)return[];let r=0,i,a=[];for(;(i=t.indexOf(e,r))>-1;)a.push(i),r=i+n;return this.options.useIndicesCache&&this.indices.set(t,a),a}getIndicesCount(e,t){if(this.options.useIndicesCache&&this.indicesCount.has(t))return this.indicesCount.get(t);let n=e.length;if(n==0)return 0;let r=0,i,a=0;for(;(i=t.indexOf(e,r))>-1;)a++,r=i+n;return this.options.useIndicesCache&&this.indicesCount.set(t,a),a}cutPath(e,t){if(t===``)return``;if(e=this.cleanNotRecursivePath(e),t=this.cleanNotRecursivePath(t),e===t)return e;let 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),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);let t=this.splitCache.get(e);if(t)return t.slice();let 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(let i of this.split(e)){t.params[n]={original:i,replaced:``,name:``};let e=RegExp(`\\${this.options.param}([^\\${this.options.delimiter}\\${this.options.param}]+)`,`g`),a=e.exec(i);if(a)t.params[n].name=a[1];else{delete t.params[n],r.push(i),n++;continue}e.lastIndex=0,t.params[n].replaced=i.replace(e,this.options.wildcard),r.push(t.params[n].replaced),n++}return t.replaced=r.join(this.options.delimiter),t}getParams(e,t){if(!e)return;let n=this.split(t),r={};for(let t in e.params){let i=e.params[t];r[i.name]=n[t]}return r}waitForAll(e,t){let n={};for(let t of e)n[t]={dirty:!1},this.hasParams(t)&&(n[t].paramsInfo=this.getParamsInfo(t)),n[t].isWildcard=this.isWildcard(t),n[t].isRecursive=!this.isNotRecursive(t);return this.waitingListeners.set(e,{fn:t,paths:n}),t(n),function(){this.waitingListeners.delete(e)}}executeWaitingListeners(e){if(!this.destroyed)for(let t of this.waitingListeners.values()){let{fn:n,paths:r}=t,i=0,a=0;for(let t in r){let n=r[t],o=!1;n.isRecursive&&(e=this.cutPath(e,t)),n.isWildcard&&this.match(t,e)&&(o=!0),e===t&&(o=!0),o&&(n.dirty=!0),n.dirty&&i++,a++}i===a&&n(r)}}subscribeAll(e,t,n=this.getDefaultListenerOptions()){if(this.destroyed)return()=>{};let r=[],i=0,a=null;typeof n.group==`boolean`&&n.group?(this.groupId++,a=this.groupId,n.bulk=!0):typeof n.group==`string`&&(n.bulk=!0,a=n.group);for(let o of e)r.push(this.subscribe(o,t,n,{all:e,index:i,groupId:a})),i++;return function(){for(let 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);let r=this;return function(i,a=!1){let o=e;return t?i=r.cutPath(i,e):o=r.cutPath(r.cleanNotRecursivePath(e),i),a&&console.log(`[getListenerCollectionMatch]`,{listenerPath:e,scopedListenerPath:o,path:i,isRecursive:t,isWildcard:n}),n&&r.match(o,i,t)?!0:o===i}}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}let n=this.hasParams(e),r;n&&(r=this.getParamsInfo(e));let i={isRecursive:!this.isNotRecursive(e),isWildcard:this.isWildcard(e),hasParams:n,paramsInfo:r,originalPath:e,path:n?r.replaced:e};i.isRecursive||(i.path=this.cleanNotRecursivePath(i.path));let a=this.getCleanListenersCollection(Object.assign(Object.assign({},i),{match:this.getListenerCollectionMatch(i.path,i.isRecursive,i.isWildcard)}));return this.id++,a.listeners.set(this.id,t),t.id=this.id,this.listeners.set(i.originalPath,a),a}subscribe(e,t,n=this.getDefaultListenerOptions(),r={all:[e],index:0,groupId:null}){if(this.destroyed)return()=>{};this.jobsRunning++;let i=`subscribe`,a=this.getCleanListener(t,n);n.group&&(n.bulk=!0,typeof n.group==`string`?a.groupId=n.group:r.groupId&&(a.groupId=r.groupId)),this.listenersIgnoreCache.set(a,{truthy:[],falsy:[]});let o=this.getListenersCollection(e,a);n.debug&&console.log(`[subscribe]`,{listenerPath:e,options:n}),o.count++;let s=!0;if(a.groupId&&(typeof a.groupId==`string`?this.namedGroups.includes(a.groupId)?s=!1:this.namedGroups.push(a.groupId):typeof a.groupId==`number`&&(this.numberGroups.includes(a.groupId)?s=!1:this.numberGroups.push(a.groupId))),s){let r=this.cleanNotRecursivePath(o.path),s=this.split(r);if(!o.isWildcard)!this.isMuted(r)&&!this.isMuted(t)&&t(this.pathGet(s,this.data),{type:i,listener:a,listenersCollection:o,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(e)},params:this.getParams(o.paramsInfo,r),options:n});else{let s=this.scan.get(r);if(n.bulk){let r=[];for(let e in s)this.isMuted(e)||r.push({path:e,params:this.getParams(o.paramsInfo,e),value:s[e]});this.isMuted(t)||t(r,{type:i,listener:a,listenersCollection:o,path:{listener:e,update:void 0,resolved:void 0},options:n,params:void 0})}else for(let r in s)!this.isMuted(r)&&!this.isMuted(t)&&t(s[r],{type:i,listener:a,listenersCollection:o,path:{listener:e,update:void 0,resolved:this.cleanNotRecursivePath(r)},params:this.getParams(o.paramsInfo,r),options:n})}}return this.debugSubscribe(a,o,e),this.jobsRunning--,this.unsubscribe(e,this.id)}unsubscribe(e,t){let n=this.listeners,r=n.get(e);return function(){r.listeners.delete(t),r.count--,r.count===0&&n.delete(e)}}runQueuedListeners(){if(!this.destroyed&&this.subscribeQueue.length!==0)if(this.jobsRunning===0){this.queueRuns=0;let 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,Error(`Maximal number of queue runs exhausted.`);Promise.resolve().then(()=>this.runQueuedListeners()).catch(e=>{throw e})}}getQueueNotifyListeners(e,t=[]){for(let n in e){if(this.isMuted(n))continue;let{single:r,bulk:i}=e[n];for(let 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(let e of t)if(r===e.resolvedIdPath){n=!0;break}if(n)continue;let i=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(i,e)}for(let e of i){let n=!1;for(let r of t)if(r.id===e.listener.id){n=!0;break}if(n)continue;let r=this.debugTime(e),i=[];for(let t of e.value)i.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?!1:(e.listener.fn(i,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(i,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(let n of e.options.ignore){if(t.startsWith(n)||this.is_match&&this.is_match(n,t))return!0;{let e=this.cutPath(t,n);if(this.match(n,e))return!0}}return!1}getSubscribedListeners(e,t,n,r=`update`,i=null){n=Object.assign(Object.assign({},defaultUpdateOptions),n);let a={};for(let[o,s]of this.listeners)if(s.match(e)){a[o]={single:[],bulk:[],bulkData:[]};let c=s.paramsInfo?this.getParams(s.paramsInfo,e):void 0,l=this.cutPath(e,o),u=s.isRecursive||s.isWildcard?()=>this.get(l):()=>t,d=[{value:u,path:e,params:c}];for(let t of s.listeners.values()){if(this.shouldIgnore(t,e)){t.options.debug&&console.log(`[getSubscribedListeners] Listener was not fired because it was ignored.`,{listener:t,listenersCollection:s});continue}t.options.bulk?a[o].bulk.push({listener:t,listenersCollection:s,eventInfo:{type:r,listener:t,path:{listener:o,update:i||e,resolved:void 0},params:c,options:n},value:d}):a[o].single.push({listener:t,listenersCollection:s,eventInfo:{type:r,listener:t,path:{listener:o,update:i||e,resolved:this.cleanNotRecursivePath(e)},params:c,options:n},value:u})}}else if(this.options.extraDebug){let t=!1;for(let n of s.listeners.values())n.options.debug&&(t=!0,console.log(`[getSubscribedListeners] Listener was not fired because there was no match.`,{listener:n,listenersCollection:s,updatePath:e}));t&&s.match(e,!0)}return a}notifySubscribedListeners(e,t,n,r=`update`,i=null){return this.getQueueNotifyListeners(this.getSubscribedListeners(e,t,n,r,i))}useBulkValue(e){for(let[t,n]of e.listeners)if(n.options.bulk&&n.options.bulkValue||!n.options.bulk)return!0;return!1}getNestedListeners(e,t,n,r=`update`,i=null){let a={},o={};for(let[s,c]of this.listeners){if(!c.isRecursive)continue;let l=this.cutPath(s,e);if(this.match(l,e)){a[s]={single:[],bulk:[]};let u=this.trimPath(s.substr(l.length)),d=this.useBulkValue(c),f;d&&(f=o[u]?o[u]:new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(u),o[u]=f);let p=c.paramsInfo?this.getParams(c.paramsInfo,e):void 0,m=[],g={};for(let[t,o]of c.listeners)if(d)for(let l in f){let u=()=>f[l],d=[e,l].join(this.options.delimiter),_={type:r,listener:o,listenersCollection:c,path:{listener:s,update:i||e,resolved:this.cleanNotRecursivePath(d)},params:p,options:n};this.shouldIgnore(o,e)||(o.options.bulk?(m.push({value:u,path:d,params:p}),g[t]=o):a[s].single.push({listener:o,listenersCollection:c,eventInfo:_,value:u}))}else{let l={type:r,listener:o,listenersCollection:c,path:{listener:s,update:i||e,resolved:void 0},params:p,options:n};if(this.shouldIgnore(o,e))continue;o.options.bulk?(m.push({value:void 0,path:void 0,params:p}),g[t]=o):a[s].single.push({listener:o,listenersCollection:c,eventInfo:l,value:void 0})}for(let t in g){let i=g[t],o={type:r,listener:i,listenersCollection:c,path:{listener:s,update:e,resolved:void 0},options:n,params:p};a[s].bulk.push({listener:i,listenersCollection:c,eventInfo:o,value:m})}}else if(this.options.extraDebug)for(let 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 a}notifyNestedListeners(e,t,n,r=`update`,i,a=null){return this.getQueueNotifyListeners(this.getNestedListeners(e,t,n,r,a),i)}getNotifyOnlyListeners(e,t,n,r=`update`,i=null){let a={};if(typeof n.only!=`object`||!Array.isArray(n.only)||n.only[0]===void 0||!this.canBeNested(t))return a;for(let o of n.only){let s=new WildcardObject(t,this.options.delimiter,this.options.wildcard).get(o);a[o]={bulk:[],single:[]};for(let t in s){let c=e+this.options.delimiter+t;for(let[l,u]of this.listeners){let d=u.paramsInfo?this.getParams(u.paramsInfo,c):void 0;if(this.match(l,c)){let f=()=>s[t],p=[{value:f,path:c,params:d}];for(let t of u.listeners.values()){let s={type:r,listener:t,listenersCollection:u,path:{listener:l,update:i||e,resolved:this.cleanNotRecursivePath(c)},params:d,options:n};this.shouldIgnore(t,e)||(t.options.bulk?a[o].bulk.some(e=>e.listener===t)||a[o].bulk.push({listener:t,listenersCollection:u,eventInfo:s,value:p}):a[o].single.push({listener:t,listenersCollection:u,eventInfo:s,value:f}))}}}}}return a}runQueue(e){let t=[];for(let 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`,i=``){let a=this.getQueueNotifyListeners(this.getNotifyOnlyListeners(e,t,n,r,i));this.sortAndRunQueue(a,e)}canBeNested(e){return typeof e==`object`&&!!e}getUpdateValues(e,t){let n=t;return typeof t==`function`&&(n=t(e)),{newValue:n,oldValue:e}}wildcardNotify(e,t){let n=[];for(let t of e)this.getQueueNotifyListeners(t,n);for(let e of t)this.executeWaitingListeners(e);return this.jobsRunning--,n}wildcardUpdate(e,t,n=defaultUpdateOptions,r=!1){++this.jobsRunning,n=Object.assign(Object.assign({},defaultUpdateOptions),n);let i=this.scan.get(e),a={};for(let e in i){let r=this.split(e),{oldValue:o,newValue:s}=this.getUpdateValues(i[e],t);(!this.same(s,o)||n.force)&&(this.pathSet(r,s,this.data),a[e]=s)}let o=[],s=[];for(let t in a){let r=a[t];n.only.length?o.push(this.getNotifyOnlyListeners(t,r,n,`update`,e)):(o.push(this.getSubscribedListeners(t,r,n,`update`,e)),this.canBeNested(r)&&o.push(this.getNestedListeners(t,r,n,`update`,e))),n.debug&&this.options.log(`Wildcard update`,{path:t,newValue:r}),s.push(t)}if(r){let t=this;return function(){let n=t.wildcardNotify(o,s);t.sortAndRunQueue(n,e)}}let c=this.wildcardNotify(o,s);this.sortAndRunQueue(c,e)}runUpdateQueue(){if(!this.destroyed)for(;this.updateQueue.length&&this.updateQueue.length<this.options.maxSimultaneousJobs;){let e=this.updateQueue.shift();e.options.queue=!1,this.update(e.updatePath,e.fnOrValue,e.options,e.multi)}}updateNotify(e,t,n){let 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(let n of e){let e=n.newValue;if(this.tracing.length){let 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){let r=this.tracing[this.tracing.length-1],i=this.traceMap.get(r);i.changed.push({traceId:r,updatePath:e,fnOrValue:t,options:n}),this.traceMap.set(r,i)}let i=this.jobsRunning;if((this.options.queue||n.queue)&&i){if(i>this.options.maxSimultaneousJobs)throw Error(`Maximal simultaneous jobs limit reached.`);this.updateQueue.push({updatePath:e,fnOrValue:t,options:n,multi:r});let a=Promise.resolve().then(()=>{this.runUpdateQueue()});return r?function(){return a}:a}if(this.isWildcard(e))return this.wildcardUpdate(e,t,n,r);++this.jobsRunning;let a=this.split(e),o=this.pathGet(a,this.data),{oldValue:s,newValue:c}=this.getUpdateValues(o,t);if(n.debug&&this.options.log(`Updating ${e} ${n.source?`from ${n.source}`:``}`,{oldValue:s,newValue:c}),this.same(c,s)&&!n.force)return--this.jobsRunning,r?function(){return c}:c;if(this.pathSet(a,c,this.data),n=Object.assign(Object.assign({},defaultUpdateOptions),n),n.only===null)return--this.jobsRunning,r?function(){}:c;if(n.only.length){if(--this.jobsRunning,r){let t=this;return function(){return t.updateNotifyOnly(e,c,n)}}return this.updateNotifyOnly(e,c,n),c}if(r){--this.jobsRunning;let 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(){return[]}};if(this.collection)return this.collection;let t=this,n=[],r=[];return{update(i,a,o=defaultUpdateOptions){if(e){let e=t.split(i),r=a,s=t.pathGet(e,t.data);typeof r==`function`&&(r=r(s)),t.pathSet(e,r,t.data),n.push({updatePath:i,newValue:r,options:o})}else r.push(t.update(i,a,o,!0));return this},done(){if(t.collections===0){if(e)t.updateNotifyAll(n);else for(let e of r)e();n.length=0}},getStack(){return n}}}collect(){return this.collections++,this.collection||(this.collection=this.multi(!0)),this.collection}executeCollected(){if(this.collections--,this.collections===0&&this.collection){let 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 e===void 0||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));let 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(typeof e==`function`)return this.isMutedListener(e);for(let t of this.muted){let n=!this.isNotRecursive(t),r=this.trimPath(t);if(this.match(e,r)||this.match(r,e))return!0;if(n){let n=this.cutPath(r,e);if(this.match(n,t)||this.match(t,n))return!0}}return!1}isMutedListener(e){return this.mutedListeners.has(e)}mute(e){if(typeof e==`function`)return this.mutedListeners.add(e);this.muted.add(e)}unmute(e){if(typeof e==`function`)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++;let 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){let t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),t}saveTrace(e){let t=this.traceMap.get(e);return this.tracing.pop(),this.traceMap.delete(e),this.savedTrace.push(t),t}getSavedTraces(){let e=this.savedTrace.map(e=>e);return e.sort((e,t)=>e.sort-t.sort),this.savedTrace=[],e}},ignoreFirstCall=e=>{let t=0;return(...n)=>{if(t===0){t+=1;return}return e(...n)}},DeepObservedData=class extends ObservedData{constructor(e){super(),_defineProperty(this,`state`,void 0),_defineProperty(this,`subscribers`,new Map),_defineProperty(this,`update`,(e,t)=>{this.state?.update(t??``,e)}),_defineProperty(this,`on`,(e,t,n)=>{let r=this.state.subscribe(e,n?.immediate?t:ignoreFirstCall(t)),i=this.subscribers.get(e)??new Map;i.set(t,r),this.subscribers.set(e,i)}),_defineProperty(this,`off`,(e,t)=>{let n=this.subscribers.get(e);n&&(n.get(t)?.(),n.delete(t))}),_defineProperty(this,`getData`,e=>this.state?this.state?.get(e):{}),_defineProperty(this,`destroy`,()=>{this.subscribers.forEach(e=>{e.forEach(e=>e())})}),this.state=new DeepState(e)}},Env=class{constructor(e=globalThis.navigator?.userAgent??``,t={}){_defineProperty(this,`isIos`,!1),_defineProperty(this,`isIphone`,!1),_defineProperty(this,`isIpad`,!1),_defineProperty(this,`isAndroid`,!1),_defineProperty(this,`isAndroidPad`,!1),_defineProperty(this,`isMac`,!1),_defineProperty(this,`isWin`,!1),_defineProperty(this,`isMqq`,!1),_defineProperty(this,`isWechat`,!1),_defineProperty(this,`isWeb`,!1),_defineProperty(this,`isOpenHarmony`,!1),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}))}},NodeType=function(e){return e.CONTAINER=`container`,e.PAGE=`page`,e.ROOT=`app`,e.PAGE_FRAGMENT=`page-fragment`,e}({}),NODE_CONDS_KEY=`displayConds`,NODE_CONDS_RESULT_KEY=`displayCondsResultReverse`,NODE_DISABLE_DATA_SOURCE_KEY=`_tmagic_node_disabled_data_source`,NODE_DISABLE_CODE_BLOCK_KEY=`_tmagic_node_disabled_code_block`,ActionType=function(e){return e.COMP=`comp`,e.CODE=`code`,e.DATA_SOURCE=`data-source`,e}({}),HookType=function(e){return e.CODE=`code`,e}({}),HookCodeType=function(e){return e.CODE=`code`,e.DATA_SOURCE_METHOD=`data-source-method`,e}({}),asyncLoadJs=(()=>{let e=new Map;return(t,n,r=globalThis.document)=>{let i=e.get(r);if(i||(i=new Map,e.set(r,i)),i.get(t))return i.get(t);let a=new Promise((e,i)=>{let a=r.createElement(`script`);a.type=`text/javascript`,n&&(a.crossOrigin=n),a.src=t,r.body.appendChild(a),a.onload=()=>{e()},a.onerror=()=>{i(Error(`加载失败`))},setTimeout(()=>{i(Error(`timeout`))},60*1e3)}).catch(e=>{throw i.delete(t),e});return i.set(t,a),i.get(t)}})(),asyncLoadCss=(()=>{let e=new Map;return(t,n=globalThis.document)=>{let r=e.get(n);if(r||(r=new Map,e.set(n,r)),r.get(t))return r.get(t);let i=new Promise((e,r)=>{let i=n.createElement(`link`);i.rel=`stylesheet`,i.href=t,n.head.appendChild(i),i.onload=()=>{e()},i.onerror=()=>{r(Error(`加载失败`))},setTimeout(()=>{r(Error(`timeout`))},60*1e3)}).catch(e=>{throw r.delete(t),e});return r.set(t,i),r.get(t)}})(),toLine=(e=``)=>e.replace(/\B([A-Z])/g,`-$1`).toLowerCase(),getNodePath=(e,t=[])=>{let n=[],r=function(e,t){if(!Array.isArray(t))return null;for(let i=0,a=t.length;i<a;i++){let a=t[i];if(n.push(a),`${a.id}`==`${e}`)return a;if(a.items){let t=r(e,a.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)=>{let n=t||location.href,r=RegExp(`[?&#]${e}=([^&#]+)`,`gi`),i=n.match(r),a;return i&&i.length>0?(a=i[i.length-1].split(`=`),a&&a.length>1?filterXSS(a[1]):``):``},isObject=e=>Object.prototype.toString.call(e)===`[object Object]`,isPage=e=>e?e.type?.toLowerCase()===NodeType.PAGE:!1,isPageFragment=e=>e?e.type?.toLowerCase()===NodeType.PAGE_FRAGMENT:!1,isNumber=e=>typeof e==`number`&&!isNaN(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(n)||Array.isArray(n)&&/^\d*$/.test(`${r}`))return n[r];throw Error(`${t}中不存在${e}`)},t),setValueByKeyPath=(e,t,n={})=>set(n,e,t),getNodes=(e,t=[])=>{let n=[],r=function(e,t){if(Array.isArray(t))for(let i of t){let t=e.findIndex(e=>`${e}`==`${i.id}`);t>-1&&(e.splice(t,1),n.push(i)),i.items&&r(e,i.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)=>{let r=getNodePath(e.id,t),i=r.pop(),a=r.pop();if(n&&(a=getNodePath(n,t).pop()),!i){console.warn(`未找到目标节点(${e.id})`);return}if(!a){console.warn(`未找到父节点(${e.id})`);return}let o=a.items?.findIndex(e=>e.id===i.id);a.items.splice(o,1,e)},DSL_NODE_KEY_COPY_PREFIX=`__tmagic__`,IS_DSL_NODE_KEY=`__tmagic__dslNode`,PAGE_FRAGMENT_CONTAINER_ID_KEY=`tmagic-page-fragment-container-id`,compiledNode=(e,t,n={},r)=>{let i=[];return i=r?n[r]?.[t.id].keys||[]:getDepKeys(n,t.id),i.forEach(n=>{let r=getKeysArray(n),i=r.map((e,t)=>t<r.length-1?e:`${DSL_NODE_KEY_COPY_PREFIX}${e}`),a=getValueByKeyPath(i,t);if(a===void 0)try{let e=getValueByKeyPath(n,t);setValueByKeyPath(i.join(`.`),e,t),a=e}catch(e){console.warn(e);return}let o;try{o=e(a)}catch(e){console.error(e),o=``}setValueByKeyPath(n,o,t)}),t},compiledCond=(e,t,n,r=[])=>{switch(typeof t==`string`&&n===void 0&&(n=``),e){case`is`:return t===n;case`not`:return t!==n;case`=`:return t===n;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 t===void 0||!t.includes?.(n);default:break}return!1},getDefaultValueFromFields=e=>{let t={},n={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return e.forEach(e=>{if(e.defaultValue!==void 0){if(e.type===`array`&&!Array.isArray(e.defaultValue)){t[e.name]=n.array;return}if(e.type===`object`&&!isObject(e.defaultValue)){if(typeof e.defaultValue==`string`){try{t[e.name]=JSON.parse(e.defaultValue)}catch(r){t[e.name]=n.object,console.warn(`defaultValue 解析失败`,e.defaultValue,r)}return}t[e.name]=n.object;return}t[e.name]=cloneDeep(e.defaultValue);return}if(e.type===`object`){t[e.name]=e.fields?getDefaultValueFromFields(e.fields):n.object;return}if(e.type){t[e.name]=n[e.type];return}t[e.name]=void 0}),t},DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX=`ds-field::`,DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX=`ds-field-changed`,dataSourceTemplateRegExp=/\$\{([\s\S]+?)\}/g,isDslNode=e=>e.__tmagic__dslNode===void 0||e.__tmagic__dslNode===!0,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)},isValueIncludeDataSource=e=>!!(typeof e==`string`&&/\$\{([\s\S]+?)\}/.test(e)||Array.isArray(e)&&`${e[0]}`.startsWith(`ds-field::`)||e?.isBindDataSource&&e.dataSourceId||e?.isBindDataSourceField&&e.dataSourceId),FlowState=class{constructor(){_defineProperty(this,`isAbort`,void 0),this.isAbort=!1}abort(){this.isAbort=!0}reset(){this.isAbort=!1}},EventHelper=class extends import_events.EventEmitter{constructor({app:e,beforeEventHandler:t,afterEventHandler:n}){super(),_defineProperty(this,`app`,void 0),_defineProperty(this,`eventQueue`,[]),_defineProperty(this,`nodeEventList`,new Map),_defineProperty(this,`dataSourceEventList`,new Map),_defineProperty(this,`beforeEventHandler`,void 0),_defineProperty(this,`afterEventHandler`,void 0),this.beforeEventHandler=t,this.afterEventHandler=n,this.app=e}destroy(){this.removeNodeEvents(),this.removeAllListeners(),this.nodeEventList.clear(),this.dataSourceEventList.clear()}initEvents(){if(this.removeNodeEvents(),this.app.page)for(let[,e]of this.app.page.nodes)this.bindNodeEvents(e);for(let[,e]of this.app.pageFragments)for(let[,t]of e.nodes)this.bindNodeEvents(t)}bindNodeEvents(e){e.events?.forEach((t,n)=>{if(!t.name)return;let r=`${t.name}_${e.data.id}`,i=t.name.split(`.`);i.length>1&&(r=`${i[1]}_${i[0]}`);let a=Symbol(r);e.eventKeys.has(r)?a=e.eventKeys.get(r):e.eventKeys.set(r,a);let o=(t,...r)=>{this.eventHandler(n,e,r)};this.nodeEventList.set(o,a),this.on(a,o)})}removeNodeEvents(){for(let e of Array.from(this.nodeEventList.keys())){let t=this.nodeEventList.get(e);t&&this.off(t,e)}this.nodeEventList.clear()}bindDataSourceEvents(){let e=Array.from(this.app.dataSourceManager?.dataSourceMap.values()||[]);this.removeDataSourceEvents(e);for(let t of e){let e=this.dataSourceEventList.get(t.id)??new Map;for(let n of t.schema.events||[]){let[r,...i]=n.name?.split(`.`)||[];if(!r)return;let a=(...e)=>{this.eventHandler(n,t,e)};e.set(n.name,a),r===`ds-field-changed`?t?.onDataChange(i.join(`.`),a):t.on(r,a)}this.dataSourceEventList.set(t.id,e)}}removeDataSourceEvents(e){if(this.dataSourceEventList.size){for(let t of e){let e=this.dataSourceEventList.get(t.id);if(!e)return;for(let n of Array.from(e.keys())){let[r,...i]=n.split(`.`);r===`ds-field-changed`?t.offDataChange(i.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(e,t,n){let r=typeof e==`number`?t.events[e]:e;if(typeof this.beforeEventHandler==`function`&&this.beforeEventHandler({eventConfig:r,source:t,args:n}),has(r,`actions`)){let i=new FlowState,{actions:a}=r;for(let r=0;r<a.length&&!i?.isAbort;r++)if(typeof e==`number`){let a=t.events[e].actions[r];await this.actionHandler(a,t,n,i)}else await this.actionHandler(a[r],t,n,i);i.reset()}else try{await this.compActionHandler(r,t,n)}catch(e){if(this.app.errorHandler)this.app.errorHandler(e,t,{type:`action-handler`,config:r,...n});else throw e}typeof this.afterEventHandler==`function`&&this.afterEventHandler({eventConfig:r,source:t,args:n})}async actionHandler(e,t,n,r){try{if(e.actionType===ActionType.COMP){let r=e;await this.compActionHandler(r,t,n)}else if(e.actionType===ActionType.CODE){if(t.data._tmagic_node_disabled_code_block)return;let i=e;await this.app.runCode(i.codeId,i.params||{},n,r)}else if(e.actionType===ActionType.DATA_SOURCE){if(t.data._tmagic_node_disabled_data_source)return;let i=e,[a,o]=i.dataSourceMethod;await this.app.runDataSourceMethod(a,o,i.params||{},n,r)}}catch(i){if(this.app.errorHandler)this.app.errorHandler(i,t,{type:`action-handler`,config:e,flowState:r,...n});else throw i}}async compActionHandler(e,t,n){if(!this.app.page)throw Error(`当前没有页面`);let{method:r,to:i}=e;Array.isArray(r)&&([i,r]=r);let a=[],o=this.app.getNode(i,{strict:!0});o&&a.push(o);for(let[,e]of this.app.pageFragments){let t=e.getNode(i,{strict:!0});t&&a.push(t)}if(a.length===0){this.addEventToQueue({toId:i,method:r,fromCpt:t,args:n});return}let s=[];for(let e of a)e.instance?typeof e.instance[r]==`function`&&s.push(e.instance[r](t,...n)):e.addEventToQueue({method:r,fromCpt:t,args:n});await Promise.all(s)}},Flexible=class{constructor(e){_defineProperty(this,`designWidth`,375),_defineProperty(this,`tid`,void 0),_defineProperty(this,`resizeHandler`,()=>{clearTimeout(this.tid),this.tid=setTimeout(()=>{this.refreshRem(),this.tid=void 0},300)}),_defineProperty(this,`pageshowHandler`,e=>{e.persisted&&this.resizeHandler()}),globalThis.document.readyState===`complete`?this.setBodyFontSize():globalThis.document.addEventListener(`DOMContentLoaded`,this.setBodyFontSize,!1),globalThis.addEventListener(`resize`,this.resizeHandler,!1),globalThis.addEventListener(`pageshow`,this.pageshowHandler,!1),e?.designWidth!==void 0&&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(){let{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){let{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);let r=n.offsetWidth;return t.documentElement.removeChild(n),Math.abs(r-e)>1?e**2/r:e}},Store=class{constructor({initialData:e={}}={}){_defineProperty(this,`data`,void 0),this.data=e}set(e,t){this.data[e]=t}get(e){return this.data[e]}},Node=class extends import_events.EventEmitter{constructor(e){super(),_defineProperty(this,`data`,void 0),_defineProperty(this,`style`,void 0),_defineProperty(this,`events`,[]),_defineProperty(this,`instance`,null),_defineProperty(this,`page`,void 0),_defineProperty(this,`parent`,void 0),_defineProperty(this,`app`,void 0),_defineProperty(this,`store`,void 0),_defineProperty(this,`eventKeys`,new Map),_defineProperty(this,`eventQueue`,[]),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(e){this.data=e;let{events:t,style:n}=e;this.events=t||[],this.style=n||{};try{this.instance&&!Object.isFrozen(this.instance)&&Object.getOwnPropertyDescriptor(this.instance,`config`)?.writable!==!1&&!this.instance.__isVue&&(this.instance.config=e)}catch{}this.emit(`update-data`,e)}addEventToQueue(e){this.eventQueue.push(e)}registerMethod(e){if(e){this.instance||(this.instance={});for(let[t,n]of Object.entries(e))typeof n==`function`&&(this.instance[t]=n)}}setInstance(e){this.instance=e}async runHookCode(e,t){if(typeof this.data[e]==`function`){await this.data[e](this);return}let n=this.data[e];if(n?.hookType===HookType.CODE)for(let e of n.hookData){let{codeType:n=HookCodeType.CODE,codeId:r,params:i={}}=e;n===HookCodeType.CODE&&typeof r==`string`?await this.app.runCode(r,t||i,[],void 0,this):n===HookCodeType.DATA_SOURCE_METHOD&&Array.isArray(r)&&r.length>1&&await this.app.runDataSourceMethod(r[0],r[1],t||i,[],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,this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`destroy`),this.listenLifeSafe()}),e&&this.setInstance(e),this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`created`)}),this.once(`mounted`,e=>{(async()=>{e&&this.setInstance(e);for(let t=this.eventQueue.shift();t;t=this.eventQueue.shift())typeof e[t.method]==`function`&&await e[t.method](t.fromCpt,...t.args);if(this.app.eventHelper){for(let t of this.app.eventHelper.getEventQueue())for(let[,n]of this.app.pageFragments){let r=n.getNode(t.toId,{strict:!0});r&&r===this&&(typeof e[t.method]==`function`&&await e[t.method](t.fromCpt,...t.args),t.handled=!0)}this.app.eventHelper.eventQueue=this.app.eventHelper.getEventQueue().filter(e=>!e.handled)}this.data._tmagic_node_disabled_code_block!==!0&&this.runHookCode(`mounted`)})()})}},IteratorContainer=class e extends Node{constructor(...e){super(...e),_defineProperty(this,`nodes`,[])}setData(e){this.resetNodes(),super.setData(e)}resetNodes(){this.nodes?.forEach(e=>{e.forEach(e=>{e.destroy()})}),this.nodes=[]}initNode(t,n,r){if(r.has(t.id)&&r.get(t.id)?.destroy(),t.type&&this.app.iteratorContainerType.has(t.type)){let i=new e({config:t,parent:n,page:this.page,app:this.app});r.set(t.id,i),this.app.eventHelper?.bindNodeEvents(i);return}let i=new Node({config:t,parent:n,page:this.page,app:this.app});if(this.app.eventHelper?.bindNodeEvents(i),r.set(t.id,i),t.type&&this.app.pageFragmentContainerType.has(t.type)&&t.pageFragmentId){let e=this.app.dsl?.items?.find(e=>e.id===t.pageFragmentId);e&&(t.items=[e])}t.items?.forEach(e=>{this.initNode(e,i,r)})}setNodes(e,t){let 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()}},Page=class e extends Node{constructor(e){super(e),_defineProperty(this,`nodes`,new Map),this.setNode(e.config.id,this),e.config.items.forEach(e=>{this.initNode(e,this)})}initNode(t,n){if(t.type&&this.app.iteratorContainerType.has(t.type)){this.setNode(t.id,new IteratorContainer({config:t,parent:n,page:this,app:this.app}));return}let r=new(t.type&&(App.nodeClassMap.get(t.type))||Node)({config:t,parent:n,page:this,app:this.app});if(this.setNode(t.id,r),t.type&&this.app.pageFragmentContainerType.has(t.type)&&t.pageFragmentId){let n=this.app.dsl?.items?.find(e=>e.id===t.pageFragmentId);n&&this.app.pageFragments.set(t.id,new e({config:n,app:this.app}))}t.items?.forEach(e=>{this.initNode(e,r)})}getNode(e,{iteratorContainerId:t,iteratorIndex:n,pageFragmentContainerId:r,strict:i}={}){if(this.nodes.has(e))return this.nodes.get(e);if(r)return this.app.pageFragments.get(r)?.getNode(e,{iteratorContainerId:t,iteratorIndex:n,strict:!0});if(Array.isArray(t)&&t.length&&Array.isArray(n)){let r=this.nodes.get(t[0]);for(let e=1,i=t.length;e<i;e++)r=r?.getNode(t[e],n[e-1]);return r?.getNode(e,n[n.length-1])}if(!i&&this.app.pageFragments.size){for(let[,t]of this.app.pageFragments)if(t.nodes.has(e))return t.nodes.get(e)}}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()}},style2Obj=e=>{if(typeof e!=`string`)return e;let t={};return e.split(`;`).forEach(e=>{if(!e)return;let n=e.split(`:`),r=n.shift(),i=n.join(`:`);r&&(r=r.replace(/^\s*/,``).replace(/\s*$/,``),i=i.replace(/^\s*/,``).replace(/\s*$/,``),r=r.split(`-`).map((e,t)=>t>0?`${e[0].toUpperCase()}${e.substr(1)}`:e).join(``),t[r]=i)}),t},fillBackgroundImage=e=>e&&!/^url/.test(e)&&!/^linear-gradient/.test(e)?`url(${e})`:e,getTransform=(e,t)=>{if(!e)return[];let n=Object.entries(e).map(([e,n])=>n.trim()?(e===`rotate`&&isNumber(n)&&(n=`${n}deg`),t===`hippy`?{[e]:n}:`${e}(${n})`):``);if(t===`hippy`)return n;let r=n.join(` `);return r.trim()?r:`none`},transformStyle=(e,t)=>{if(!e)return{};let n={},r={};n=typeof e==`string`?style2Obj(e):{...e};let i=t===`hippy`,a=[`zIndex`,`opacity`,`fontWeight`];return Object.entries(n).forEach(([e,n])=>{e===`scale`&&!r.transform&&i?r.transform=[{scale:n}]:e===`backgroundImage`&&!i?n&&(r[e]=fillBackgroundImage(n)):e===`transform`&&typeof n!=`string`?r[e]=getTransform(n,t):!a.includes(e)&&n&&/^[-]?[0-9]*[.]?[0-9]*$/.test(n)?r[e]=i?n:`${n/100}rem`:r[e]=n}),r},COMMON_EVENT_PREFIX=`magic:common:events:`,App=class e extends import_events.EventEmitter{static registerNode(t,n){e.nodeClassMap.set(t,n)}constructor(e){super(),_defineProperty(this,`env`,void 0),_defineProperty(this,`dsl`,void 0),_defineProperty(this,`codeDsl`,void 0),_defineProperty(this,`dataSourceManager`,void 0),_defineProperty(this,`page`,void 0),_defineProperty(this,`pageFragments`,new Map),_defineProperty(this,`useMock`,!1),_defineProperty(this,`platform`,`mobile`),_defineProperty(this,`jsEngine`,`browser`),_defineProperty(this,`components`,new Map),_defineProperty(this,`pageFragmentContainerType`,new Set([`page-fragment-container`])),_defineProperty(this,`iteratorContainerType`,new Set([`iterator-container`])),_defineProperty(this,`request`,void 0),_defineProperty(this,`transformStyle`,void 0),_defineProperty(this,`eventHelper`,void 0),_defineProperty(this,`errorHandler`,void 0),_defineProperty(this,`nodeStoreInitialData`,void 0),_defineProperty(this,`flexible`,void 0),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)}),e.iteratorContainerType&&(Array.isArray(e.iteratorContainerType)?e.iteratorContainerType:[e.iteratorContainerType]).forEach(e=>{this.iteratorContainerType.add(e)}),typeof e.useMock==`boolean`&&(this.useMock=e.useMock),this.jsEngine===`browser`&&!e.disabledFlexible&&(this.flexible=new Flexible({designWidth:e.designWidth})),this.platform!==`editor`&&(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){!e||typeof e==`string`?this.env=new Env(e):this.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;let 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){let t=this.dsl?.items.find(t=>`${t.id}`==`${e}`);if(!t){this.deletePage(),super.emit(`page-change`);return}if(this.page){if(t===this.page.data)return;this.page.destroy()}this.page=new Page({config:t,app:this}),this.eventHelper?.initEvents(),super.emit(`page-change`,this.page)}deletePage(){this.page?.destroy(),this.eventHelper?.removeNodeEvents(),this.page=void 0}getPage(e){if(!e||this.page&&`${this.page.data.id}`==`${e}`)return 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){let[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(e,t,n,r,i){if(!e||isEmpty(this.codeDsl))return;let a=this.codeDsl?.[e]?.content;if(typeof a==`function`)try{await a({app:this,params:t,eventParams:n,flowState:r,node:i})}catch(a){if(this.errorHandler)this.errorHandler(a,void 0,{type:`run-code`,codeId:e,params:t,eventParams:n,flowState:r,node:i});else throw a}}async runDataSourceMethod(e,t,n,r,i,a){if(!e||!t)return;let o=this.dataSourceManager?.get(e);if(o)try{let e=(o.methods||[]).find(e=>e.name===t);e&&typeof e.content==`function`?await e.content({app:this,params:n,dataSource:o,eventParams:r,flowState:i,node:a}):typeof o[t]==`function`&&await o[t]()}catch(e){if(this.errorHandler)this.errorHandler(e,o,{type:`data-source-method`,params:n,eventParams:r,flowState:i,node:a});else throw e}}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}};_defineProperty(App,`nodeClassMap`,new Map);var DepTargetType=function(e){return 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}({}),Target=class{constructor(e){_defineProperty(this,`isTarget`,void 0),_defineProperty(this,`id`,void 0),_defineProperty(this,`name`,void 0),_defineProperty(this,`type`,DepTargetType.DEFAULT),_defineProperty(this,`deps`,{}),_defineProperty(this,`isCollectByDefault`,void 0),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}){let i=this.deps[e]||{name:t,keys:[]};i.name=t,i.data=r,this.deps[e]=i,i.keys.indexOf(n)===-1&&i.keys.push(n)}removeDep(e,t){if(e===void 0){Object.keys(this.deps).forEach(e=>{delete this.deps[e]});return}let n=this.deps[e];if(n)if(t){let r=n.keys.indexOf(t);n.keys.splice(r,1),n.keys.length===0&&delete this.deps[e]}else delete this.deps[e]}hasDep(e,t){return!!this.deps[e]?.keys.find(e=>e===t)}destroy(){this.deps={}}},isIncludeArrayField=(e,t)=>{let n=t;return e.some((t,r)=>{let i=n.find(({name:e})=>e===t);return n=i?.fields||[],i?.type===`array`&&/^(?!\d+$).*$/.test(`${e[r+1]}`)&&r<e.length-1})},isDataSourceTemplate=(e,t,n=!1)=>{let r=e.match(dataSourceTemplateRegExp)||[];if(r.length<=0)return!1;let i=[],a=[];return r.forEach(e=>{let n=getKeysArray(e.substring(2,e.length-1)),r=n.shift();!r||r!==t.id||(isIncludeArrayField(n,t.fields)?i.push(e):a.push(e))}),n?i.length>0:a.length>0},isSpecificDataSourceTemplate=(e,t)=>e?.isBindDataSourceField&&e.dataSourceId&&e.dataSourceId===t&&typeof e.template==`string`,isUseDataSourceField=(e,t)=>{if(!Array.isArray(e)||typeof e[0]!=`string`)return!1;let[n]=e,r=n.indexOf(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX);return r===-1?!1:n.substring(r+DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX.length)===t},isDataSourceTarget=(e,t,n,r=!1)=>{if(!n||![`string`,`object`].includes(typeof n)||`${t}`.startsWith(`displayConds`))return!1;if(typeof n==`string`)return isDataSourceTemplate(n,e,r);if(isObject(n)&&n?.isBindDataSource&&n.dataSourceId&&n.dataSourceId===e.id||isSpecificDataSourceTemplate(n,e.id))return!0;if(isUseDataSourceField(n,e.id)){let[,...t]=n,i=isIncludeArrayField(t,e.fields);return r?i:!i}return!1},isDataSourceCondTarget=(e,t,n,r=!1)=>{if(!Array.isArray(n)||!e)return!1;let[i,...a]=n;if(i!==e.id||!`${t}`.startsWith(`displayConds`))return!1;if(e.fields?.find(e=>e.name===a[0])){let t=isIncludeArrayField(a,e.fields);return r?t:!t}return!1},traverseTarget=(e,t,n)=>{for(let r of Object.values(e))for(let e of Object.values(r))n&&e.type!==n||t(e)},Watcher=class{constructor(e){_defineProperty(this,`targetsList`,{}),_defineProperty(this,`childrenProp`,`items`),_defineProperty(this,`idProp`,`id`),_defineProperty(this,`nameProp`,`name`),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){let 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!!this.getTarget(e,t)}hasSpecifiedTypeTarget(e=DepTargetType.DEFAULT){return Object.keys(this.getTargets(e)).length>0}removeTarget(e,t=DepTargetType.DEFAULT){let n=this.getTargets(t);n[e]&&(n[e].destroy(),delete n[e])}removeTargets(e=DepTargetType.DEFAULT){let t=this.targetsList[e];if(t){for(let e of Object.values(t))e.destroy();delete this.targetsList[e]}}clearTargets(){for(let 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(let t of e)n({node:t,target:r})},t)}clear(e,t){let{targetsList:n}=this;t&&(n={[t]:this.getTargets(t)});let r=[];traverseTarget(n,t=>{if(e)for(let 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){let i=[DepTargetType.DATA_SOURCE,DepTargetType.DATA_SOURCE_COND,DepTargetType.DATA_SOURCE_METHOD];if(e._tmagic_node_disabled_data_source&&i.includes(t.type)||e._tmagic_node_disabled_code_block&&t.type===DepTargetType.CODE_BLOCK)return;let a=(i,o=``)=>{let s=(i,s)=>{let c=i===this.childrenProp,l=o?`${o}.${i}`:i;if(t.isTarget(l,s))t.updateDep({id:e[this.idProp],name:`${e[this.nameProp]||e[this.idProp]}`,data:n,key:l});else if(!c&&Array.isArray(s))for(let e=0,t=s.length;e<t;e++){let t=s[e];isObject(t)&&a(t,`${l}[${e}]`)}else isObject(s)&&a(s,l);if(c&&r&&Array.isArray(s))for(let e of s)this.collectItem(e,t,n,r)};for(let[e,t]of Object.entries(i))t===void 0||t===``||s(e,t)};a(e)}removeTargetDep(e,t,n){if(e.removeDep(t[this.idProp],n),n===void 0&&Array.isArray(t[this.childrenProp])&&t[this.childrenProp].length)for(let r of t[this.childrenProp])this.removeTargetDep(e,r,n)}},DevToolApi=class{constructor({app:e}){_defineProperty(this,`app`,void 0),this.app=e}openPop(e){if(typeof this.app.openPop==`function`)return this.app.openPop(e)}setDataSourceData(e,t,n){let r=this.app.dataSourceManager?.get(e);r&&r.setData(t,n)}delDataSourceData(){}requestDataSource(e){let t=this.app.dataSourceManager?.get(e);if(t){if(typeof t.refresh==`function`)return t.refresh();if(typeof t.request==`function`)return t.request();t.isInit=!1,this.app.dataSourceManager?.init(t)}}getDisplayCondRealValue(e,t){return this.app.dataSourceManager?.compliedConds({[NODE_CONDS_KEY]:[{cond:[t]}]})}async callHook(e,t,n){let r=this.app.getNode(e);if(r)for(let e of n)await r.runHookCode(t,e.params)}trigger(e,t){let n=this.app.getNode(e);n&&this.app.emit(t.name,n)}updateDsl(e,t,n){}isValueIncludeDataSource(e){return isValueIncludeDataSource(e)}compileDataSourceValue(e){return compiledNodeField(e,this.app.dataSourceManager?.data||{})}updateCode(codeId,value,path){if(!this.app.dsl)return;const{codeBlocks}=this.app.dsl;if(!codeBlocks)return;const code=codeBlocks[codeId];if(!code)return;const newCode=cloneDeep(code);let fuc=value;path===`content`&&typeof value==`string`&&(value.includes(`function`)||value.includes(`=>`))&&eval(`fuc = ${value})`),setValueByKeyPath(path,fuc,newCode),codeBlocks[codeId]=newCode}},src_default=App;export{isArray$1 as $,nextTick as A,watchEffect as B,createElementBlock as C,defineComponent as D,defineAsyncComponent as E,renderList as F,ref as G,withDirectives as H,renderSlot as I,camelize as J,shallowReactive as K,resolveDirective as L,onMounted as M,openBlock as N,h as O,provide as P,includeBooleanAttr as Q,resolveDynamicComponent as R,createCommentVNode as S,createTextVNode as T,onScopeDispose as U,withCtx as V,reactive as W,extend as X,capitalize as Y,hyphenate as Z,registerDataSourceOnDemand as _,getUrlParam as a,isSymbol$1 as at,computed as b,isPageFragment as c,toDisplayString as ct,asyncLoadCss as d,__toESM as dt,isFunction$1 as et,asyncLoadJs as f,DataSourceManager as g,DeepObservedData as h,PAGE_FRAGMENT_CONTAINER_ID_KEY as i,isString as it,onBeforeUnmount as j,inject as k,replaceChildNode as l,__commonJSMin as lt,NodeType as m,COMMON_EVENT_PREFIX as n,isOn as nt,isDslNode as o,normalizeClass as ot,NODE_CONDS_RESULT_KEY as p,unref as q,IS_DSL_NODE_KEY as r,isSpecialBooleanAttr as rt,isPage as s,normalizeStyle as st,src_default as t,isModelListener as tt,toLine as u,__exportAll as ut,Fragment as v,createRenderer as w,createBlock as x,callWithAsyncErrorHandling as y,watch as z};
|
|
//# sourceMappingURL=src-USjmpjAT.js.map
|