tmagic-editor/playground/runtime/vue/page/assets/src-legacy-BZrNK1xm.js
2026-03-17 09:41:49 +00:00

2 lines
182 KiB
JavaScript

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