instaui 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. instaui/components/component.py +1 -1
  2. instaui/components/element.py +37 -17
  3. instaui/components/html/checkbox.py +0 -7
  4. instaui/components/html/select.py +1 -1
  5. instaui/components/vfor.py +1 -1
  6. instaui/consts.py +4 -0
  7. instaui/dependencies/component_dependency.py +16 -0
  8. instaui/dependencies/plugin_dependency.py +28 -0
  9. instaui/fastapi_server/debug_mode_router.py +0 -1
  10. instaui/fastapi_server/dependency_router.py +21 -0
  11. instaui/fastapi_server/resource.py +34 -0
  12. instaui/fastapi_server/server.py +147 -95
  13. instaui/html_tools.py +19 -105
  14. instaui/page_info.py +1 -11
  15. instaui/runtime/_app.py +9 -20
  16. instaui/runtime/resource.py +13 -48
  17. instaui/static/insta-ui.esm-browser.prod.js +3663 -3663
  18. instaui/static/insta-ui.ico +0 -0
  19. instaui/static/insta-ui.iife.js +29 -29
  20. instaui/static/templates/debug/sse.html +2 -2
  21. instaui/static/templates/web.html +32 -76
  22. instaui/static/templates/zero.html +48 -32
  23. instaui/systems/file_system.py +3 -14
  24. instaui/template/web_template.py +40 -46
  25. instaui/template/zero_template.py +95 -15
  26. instaui/ui/__init__.py +4 -5
  27. instaui/ui_functions/ui_page.py +3 -18
  28. instaui/vars/path_var.py +2 -1
  29. instaui/zero/func.py +115 -0
  30. instaui/zero/scope.py +12 -1
  31. instaui/zero/test.html +44 -0
  32. {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/METADATA +1 -1
  33. {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/RECORD +35 -32
  34. instaui/dependencies/__init__.py +0 -15
  35. instaui/dependencies/component_registrar.py +0 -82
  36. instaui/dependencies/installer.py +0 -5
  37. instaui/fastapi_server/config_router.py +0 -60
  38. {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/LICENSE +0 -0
  39. {instaui-0.1.1.dist-info → instaui-0.1.3.dist-info}/WHEEL +0 -0
Binary file
@@ -1,29 +1,29 @@
1
- var InstaUI=function(f){"use strict";var Ps=Object.defineProperty;var ks=(f,U,_)=>U in f?Ps(f,U,{enumerable:!0,configurable:!0,writable:!0,value:_}):f[U]=_;var B=(f,U,_)=>ks(f,typeof U!="symbol"?U+"":U,_);function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=U(f);let _e,Pe,ke;function mn(e){_e=e.queryPath,Pe=e.pathParams,ke=e.queryParams}function Ne(){return{path:_e,...Pe===void 0?{}:{params:Pe},...ke===void 0?{}:{queryParams:ke}}}var Y;(e=>{function t(i){return i.type==="ref"}e.isRef=t;function n(i){return i.type==="vComputed"}e.isVueComputed=n;function r(i){return i.type==="jsComputed"}e.isJsComputed=r;function o(i){return i.type==="webComputed"}e.isWebComputed=o;function s(i){return i.type==="data"}e.isConstData=s})(Y||(Y={}));var j;(e=>{function t(v){return v.type==="ref"||v.type==="computed"||v.type==="webComputed"||v.type==="data"}e.isVar=t;function n(v){return v.type==="ref"}e.isRef=n;function r(v){return v.type==="routePar"}e.isRouterParams=r;function o(v){return v.type==="routeAct"}e.isRouterAction=o;function s(v){return v.type==="data"}e.isConstData=s;function i(v){return v.type==="computed"}e.isComputed=i;function c(v){return v.type==="webComputed"}e.isWebComputed=c;function l(v){return v.type==="js"}e.isJs=l;function d(v){return v.type==="jsOutput"}e.isJsOutput=d;function u(v){return v.type==="vf"}e.isVForItem=u;function a(v){return v.type==="vf-i"}e.isVForIndex=a;function h(v){return v.type==="sp"}e.isSlotProp=h;function p(v){return v.type==="event"}e.isEventContext=p;function m(v){return v.type==="ele_ref"}e.isElementRef=m;function y(v){return v.type!==void 0}e.IsBinding=y})(j||(j={}));var Ce;(e=>{function t(n){return n.url!==void 0}e.isWebEventHandler=t})(Ce||(Ce={}));class gn extends Map{constructor(t){super(),this.factory=t}getOrDefault(t){if(!this.has(t)){const n=this.factory();return this.set(t,n),n}return super.get(t)}}function se(e){return new gn(e)}function ie(e){return typeof e=="function"?e():f.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ie=()=>{};function je(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Ae(e,t=!1){function n(a,{flush:h="sync",deep:p=!1,timeout:m,throwOnTimeout:y}={}){let v=null;const O=[new Promise(S=>{v=f.watch(e,C=>{a(C)!==t&&(v?v():f.nextTick(()=>v==null?void 0:v()),S(C))},{flush:h,deep:p,immediate:!0})})];return m!=null&&O.push(je(m,y).then(()=>ie(e)).finally(()=>v==null?void 0:v())),Promise.race(O)}function r(a,h){if(!f.isRef(a))return n(C=>C===a,h);const{flush:p="sync",deep:m=!1,timeout:y,throwOnTimeout:v}=h??{};let E=null;const S=[new Promise(C=>{E=f.watch([e,a],([$,M])=>{t!==($===M)&&(E?E():f.nextTick(()=>E==null?void 0:E()),C($))},{flush:p,deep:m,immediate:!0})})];return y!=null&&S.push(je(y,v).then(()=>ie(e)).finally(()=>(E==null||E(),ie(e)))),Promise.race(S)}function o(a){return n(h=>!!h,a)}function s(a){return r(null,a)}function i(a){return r(void 0,a)}function c(a){return n(Number.isNaN,a)}function l(a,h){return n(p=>{const m=Array.from(p);return m.includes(a)||m.includes(ie(a))},h)}function d(a){return u(1,a)}function u(a=1,h){let p=-1;return n(()=>(p+=1,p>=a),h)}return Array.isArray(ie(e))?{toMatch:n,toContains:l,changed:d,changedTimes:u,get not(){return Ae(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:s,toBeNaN:c,toBeUndefined:i,changed:d,changedTimes:u,get not(){return Ae(e,!t)}}}function vn(e){return Ae(e)}function yn(e,t,n){let r;f.isRef(n)?r={evaluating:n}:r=n||{};const{lazy:o=!1,evaluating:s=void 0,shallow:i=!0,onError:c=Ie}=r,l=f.ref(!o),d=i?f.shallowRef(t):f.ref(t);let u=0;return f.watchEffect(async a=>{if(!l.value)return;u++;const h=u;let p=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const m=await e(y=>{a(()=>{s&&(s.value=!1),p||y()})});h===u&&(d.value=m)}catch(m){c(m)}finally{s&&h===u&&(s.value=!1),p=!0}}),o?f.computed(()=>(l.value=!0,d.value)):d}function En(e,t,n){const{immediate:r=!0,delay:o=0,onError:s=Ie,onSuccess:i=Ie,resetOnExecute:c=!0,shallow:l=!0,throwError:d}={},u=l?f.shallowRef(t):f.ref(t),a=f.ref(!1),h=f.ref(!1),p=f.shallowRef(void 0);async function m(E=0,...O){c&&(u.value=t),p.value=void 0,a.value=!1,h.value=!0,E>0&&await je(E);const S=typeof e=="function"?e(...O):e;try{const C=await S;u.value=C,a.value=!0,i(C)}catch(C){if(p.value=C,s(C),d)throw C}finally{h.value=!1}return u.value}r&&m(o);const y={state:u,isReady:a,isLoading:h,error:p,execute:m};function v(){return new Promise((E,O)=>{vn(h).toBe(!1).then(()=>E(y)).catch(O)})}return{...y,then(E,O){return v().then(E,O)}}}function L(e,t){t=t||{};const n=[...Object.keys(t),"__Vue"],r=[...Object.values(t),_];try{return new Function(...n,`return (${e})`)(...r)}catch(o){throw new Error(o+" in function code: "+e)}}function wn(e){if(e.startsWith(":")){e=e.slice(1);try{return L(e)}catch(t){throw new Error(t+" in function code: "+e)}}}function et(e){return e.constructor.name==="AsyncFunction"}function Rn(e,t){return f.ref(e.value)}function On(e,t,n){const{bind:r={},code:o,const:s=[]}=e,i=Object.values(r).map((u,a)=>s[a]===1?u:t.getVueRefObjectOrValue(u));if(et(new Function(o)))return yn(async()=>{const u=Object.fromEntries(Object.keys(r).map((a,h)=>[a,i[h]]));return await L(o,u)()},null,{lazy:!0});const c=Object.fromEntries(Object.keys(r).map((u,a)=>[u,i[a]])),l=L(o,c);return f.computed(l)}function bn(e,t,n){const{inputs:r=[],code:o,slient:s,data:i,asyncInit:c=null}=e,l=s||Array(r.length).fill(0),d=i||Array(r.length).fill(0),u=r.filter((y,v)=>l[v]===0&&d[v]===0).map(y=>t.getVueRefObject(y));function a(){return r.map((y,v)=>d[v]===1?y:t.getObjectToValue(y))}const h=L(o),p=f.shallowRef(null),m={immediate:!0,deep:!0};return et(h)?(p.value=c,f.watch(u,async()=>{p.value=await h(...a())},m)):f.watch(u,()=>{p.value=h(...a())},m),f.readonly(p)}function Sn(e,t){const{init:n}=e;return f.shallowRef(n??null)}function Pn(){return[]}const ae=se(Pn);function tt(e,t){const n=ae.getOrDefault(e.id),r=new Map;return n.push(r),t.replaceSnapshot({scopeSnapshot:nt()}),(e.vars||[]).forEach(o=>{r.set(o.id,Cn(o,t))}),(e.web_computed||[]).forEach(o=>{const{init:s}=o;r.set(o.id,f.ref(s))}),n.length-1}function nt(){const e=new Map;for(const[n,r]of ae){const o=r[r.length-1];e.set(n,[o])}function t(n){return rt(n,e)}return{getVueRef:t}}function kn(e){return rt(e,ae)}function rt(e,t){const n=t.get(e.sid);if(!n)throw new Error(`Scope ${e.sid} not found`);const o=n[n.length-1].get(e.id);if(!o)throw new Error(`Var ${e.id} not found in scope ${e.sid}`);return o}function Nn(e){ae.delete(e)}function ot(e,t){const n=ae.get(e);n&&n.splice(t,1)}function Cn(e,t,n){if(Y.isRef(e))return Rn(e);if(Y.isVueComputed(e))return On(e,t);if(Y.isJsComputed(e))return bn(e,t);if(Y.isWebComputed(e))return Sn(e);if(Y.isConstData(e))return e.value;throw new Error(`Invalid var config: ${e}`)}const me=se(()=>[]);function In(e){const t=f.shallowRef();me.getOrDefault(e.sid).push(t)}function jn(e){me.has(e)&&me.delete(e)}function st(){const e=new Map(Array.from(me.entries()).map(([n,r])=>[n,r[r.length-1]]));function t(n){return e.get(n.sid)}return{getRef:t}}const ge=se(()=>[]);function An(e){const t=ge.getOrDefault(e);return t.push(f.shallowRef({})),t.length-1}function Tn(e,t,n){ge.get(e)[t].value=n}function $n(e){ge.delete(e)}function xn(){const e=new Map;for(const[n,r]of ge){const o=r[r.length-1];e.set(n,o)}function t(n){return e.get(n.id).value[n.name]}return{getPropsValue:t}}function it(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function ve(e,t){return at(e,{valueFn:t})}function at(e,t){const{valueFn:n,keyFn:r}=t;return Object.fromEntries(Object.entries(e).map(([o,s])=>[r?r(o,s):o,n(s,o)]))}function ct(e,t,n){if(Array.isArray(t)){const[o,...s]=t;switch(o){case"!":return!e;case"+":return e+s[0];case"~+":return s[0]+e}}const r=ut(t,n);return e[r]}function ut(e,t){if(typeof e=="string"||typeof e=="number")return e;if(!Array.isArray(e))throw new Error(`Invalid path ${e}`);const[n,...r]=e;switch(n){case"bind":if(!t)throw new Error("No bindable function provided");return t(r[0]);default:throw new Error(`Invalid flag ${n} in array at ${e}`)}}function ce(e,t,n){return t.reduce((r,o)=>ct(r,o,n),e)}function Te(e,t,n,r){t.reduce((o,s,i)=>{if(i===t.length-1)o[ut(s,r)]=n;else return ct(o,s,r)},e)}const lt=new Map,$e=se(()=>new Map),ft=new Set,ht=Symbol("vfor");function Dn(e){const t=dt()??{};f.provide(ht,{...t,[e.fid]:e.key})}function dt(){return f.inject(ht,void 0)}function Mn(){const e=dt(),t=new Map;return e===void 0||Object.keys(e).forEach(n=>{t.set(n,e[n])}),t}function Fn(e,t,n,r){const o=H();if(r){ft.add(e);return}let s;if(n)s=new Kn(o,t);else{const i=Array.isArray(t)?t:Object.entries(t).map(([c,l],d)=>[l,c,d]);s=new Gn(i,o)}lt.set(e,s)}function Bn(e,t,n){const r=$e.getOrDefault(e);r.has(t)||r.set(t,f.ref(n)),r.get(t).value=n}function Wn(e){const t=new Set;function n(o){t.add(o)}function r(){const o=$e.get(e);o!==void 0&&o.forEach((s,i)=>{t.has(i)||o.delete(i)})}return{add:n,removeUnusedKeys:r}}function Ln(e){const t=e,n=Mn();function r(o){const s=n.get(o)??t;return $e.get(o).get(s).value}return{getVForIndex:r}}function Vn(e){return lt.get(e.binding.fid).createRefObjectWithPaths(e)}function Un(e){return ft.has(e)}class Gn{constructor(t,n){this.array=t,this.snapshot=n}createRefObjectWithPaths(t){const{binding:n}=t,{vforSnapshot:r}=t,{path:o=[]}=n,s=[...o],i=r.getVForIndex(n.fid);return s.unshift(i),f.customRef(()=>({get:()=>ce(this.array,s,this.snapshot.getObjectToValue),set:()=>{throw new Error("Cannot set value to a constant array")}}))}}class Kn{constructor(t,n){B(this,"_isDictSource");this.snapshot=t,this.binding=n}isDictSource(t){if(this._isDictSource===void 0){const n=f.toValue(t);this._isDictSource=n!==null&&!Array.isArray(n)}return this._isDictSource}createRefObjectWithPaths(t){const{binding:n}=t,{path:r=[]}=n,o=[...r],{vforSnapshot:s}=t,i=this.snapshot.getVueRefObject(this.binding),c=this.isDictSource(i),l=s.getVForIndex(n.fid),d=c&&o.length===0?[0]:[];return o.unshift(l,...d),f.customRef(()=>({get:()=>{const u=f.toValue(i),a=c?Object.entries(u).map(([h,p],m)=>[p,h,m]):u;try{return ce(f.toValue(a),o,this.snapshot.getObjectToValue)}catch{return}},set:u=>{const a=f.toValue(i);if(c){const h=Object.keys(a);if(l>=h.length)throw new Error("Cannot set value to a non-existent key");const p=h[l];Te(a,[p],u,this.snapshot.getObjectToValue);return}Te(a,o,u,this.snapshot.getObjectToValue)}}))}}function Hn(e,t,n=!1){return n&&(e=`$computed(${e})`,t={...t,$computed:f.computed}),L(e,t)}function pt(e,t,n){const{paths:r,getBindableValueFn:o}=t,{paths:s,getBindableValueFn:i}=t;return r===void 0||r.length===0?e:f.customRef(()=>({get(){try{return ce(f.toValue(e),r,o)}catch{return}},set(c){Te(f.toValue(e),s||r,c,i)}}))}function mt(e){return e==null}function qn(){return gt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function gt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const zn=typeof Proxy=="function",Jn="devtools-plugin:setup",Qn="plugin:settings:set";let ee,xe;function Yn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,xe=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,xe=globalThis.perf_hooks.performance):ee=!1),ee}function Xn(){return Yn()?xe.now():Date.now()}class Zn{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const c=t.settings[i];r[i]=c.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),c=JSON.parse(i);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Xn()}},n&&n.on(Qn,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(d=>{this.targetQueue.push({method:c,args:l,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _n(e,t){const n=e,r=gt(),o=qn(),s=zn&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Jn,e,t);else{const i=s?new Zn(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var P={};const G=typeof document<"u";function vt(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function er(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&vt(e.default)}const A=Object.assign;function De(e,t){const n={};for(const r in t){const o=t[r];n[r]=W(o)?o.map(e):e(o)}return n}const ue=()=>{},W=Array.isArray;function k(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const yt=/#/g,tr=/&/g,nr=/\//g,rr=/=/g,or=/\?/g,Et=/\+/g,sr=/%5B/g,ir=/%5D/g,wt=/%5E/g,ar=/%60/g,Rt=/%7B/g,cr=/%7C/g,Ot=/%7D/g,ur=/%20/g;function Me(e){return encodeURI(""+e).replace(cr,"|").replace(sr,"[").replace(ir,"]")}function lr(e){return Me(e).replace(Rt,"{").replace(Ot,"}").replace(wt,"^")}function Fe(e){return Me(e).replace(Et,"%2B").replace(ur,"+").replace(yt,"%23").replace(tr,"%26").replace(ar,"`").replace(Rt,"{").replace(Ot,"}").replace(wt,"^")}function fr(e){return Fe(e).replace(rr,"%3D")}function hr(e){return Me(e).replace(yt,"%23").replace(or,"%3F")}function dr(e){return e==null?"":hr(e).replace(nr,"%2F")}function te(e){try{return decodeURIComponent(""+e)}catch{P.NODE_ENV!=="production"&&k(`Error decoding "${e}". Using original value`)}return""+e}const pr=/\/$/,mr=e=>e.replace(pr,"");function Be(e,t,n="/"){let r,o={},s="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c<l&&c>=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,c>-1?c:t.length),o=e(s)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=yr(r??t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:te(i)}}function gr(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function bt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function St(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&z(t.matched[r],n.matched[o])&&Pt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function z(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Pt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!vr(e[n],t[n]))return!1;return!0}function vr(e,t){return W(e)?kt(e,t):W(t)?kt(t,e):e===t}function kt(e,t){return W(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function yr(e,t){if(e.startsWith("/"))return e;if(P.NODE_ENV!=="production"&&!t.startsWith("/"))return k(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,c;for(i=0;i<r.length;i++)if(c=r[i],c!==".")if(c==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i).join("/")}const J={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ne;(function(e){e.pop="pop",e.push="push"})(ne||(ne={}));var X;(function(e){e.back="back",e.forward="forward",e.unknown=""})(X||(X={}));const We="";function Nt(e){if(!e)if(G){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),mr(e)}const Er=/^[^#]+#/;function Ct(e,t){return e.replace(Er,"#")+t}function wr(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ye=()=>({left:window.scrollX,top:window.scrollY});function Rr(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(P.NODE_ENV!=="production"&&typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const s=document.querySelector(e.el);if(r&&s){k(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{k(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){P.NODE_ENV!=="production"&&k(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=wr(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function It(e,t){return(history.state?history.state.position-t:-1)+e}const Le=new Map;function Or(e,t){Le.set(e,t)}function br(e){const t=Le.get(e);return Le.delete(e),t}let Sr=()=>location.protocol+"//"+location.host;function jt(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let c=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(c);return l[0]!=="/"&&(l="/"+l),bt(l,"")}return bt(n,e)+r+o}function Pr(e,t,n,r){let o=[],s=[],i=null;const c=({state:h})=>{const p=jt(e,location),m=n.value,y=t.value;let v=0;if(h){if(n.value=p,t.value=h,i&&i===m){i=null;return}v=y?h.position-y.position:0}else r(p);o.forEach(E=>{E(n.value,m,{delta:v,type:ne.pop,direction:v?v>0?X.forward:X.back:X.unknown})})};function l(){i=n.value}function d(h){o.push(h);const p=()=>{const m=o.indexOf(h);m>-1&&o.splice(m,1)};return s.push(p),p}function u(){const{history:h}=window;h.state&&h.replaceState(A({},h.state,{scroll:ye()}),"")}function a(){for(const h of s)h();s=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:d,destroy:a}}function At(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?ye():null}}function kr(e){const{history:t,location:n}=window,r={value:jt(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,d,u){const a=e.indexOf("#"),h=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+l:Sr()+e+l;try{t[u?"replaceState":"pushState"](d,"",h),o.value=d}catch(p){P.NODE_ENV!=="production"?k("Error with push/replace State",p):console.error(p),n[u?"replace":"assign"](h)}}function i(l,d){const u=A({},t.state,At(o.value.back,l,o.value.forward,!0),d,{position:o.value.position});s(l,u,!0),r.value=l}function c(l,d){const u=A({},o.value,t.state,{forward:l,scroll:ye()});P.NODE_ENV!=="production"&&!t.state&&k(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
2
-
3
- history.replaceState(history.state, '', url)
4
-
5
- You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(u.current,u,!0);const a=A({},At(r.value,l,null),{position:u.position+1},d);s(l,a,!1),r.value=l}return{location:r,state:o,push:c,replace:i}}function Tt(e){e=Nt(e);const t=kr(e),n=Pr(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=A({location:"",base:e,go:r,createHref:Ct.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Nr(e=""){let t=[],n=[We],r=0;e=Nt(e);function o(c){r++,r!==n.length&&n.splice(r),n.push(c)}function s(c,l,{direction:d,delta:u}){const a={direction:d,delta:u,type:ne.pop};for(const h of t)h(c,l,a)}const i={location:We,state:{},base:e,createHref:Ct.bind(null,e),replace(c){n.splice(r--,1),o(c)},push(c,l){o(c)},listen(c){return t.push(c),()=>{const l=t.indexOf(c);l>-1&&t.splice(l,1)}},destroy(){t=[],n=[We],r=0},go(c,l=!0){const d=this.location,u=c<0?X.back:X.forward;r=Math.max(0,Math.min(r+c,n.length-1)),l&&s(this.location,d,{direction:u,delta:c})}};return Object.defineProperty(i,"location",{enumerable:!0,get:()=>n[r]}),i}function Cr(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),P.NODE_ENV!=="production"&&!e.endsWith("#/")&&!e.endsWith("#")&&k(`A hash base must end with a "#":
6
- "${e}" should be "${e.replace(/#.*$/,"#")}".`),Tt(e)}function Ee(e){return typeof e=="string"||e&&typeof e=="object"}function $t(e){return typeof e=="string"||typeof e=="symbol"}const Ve=Symbol(P.NODE_ENV!=="production"?"navigation failure":"");var xt;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xt||(xt={}));const Ir={1({location:e,currentLocation:t}){return`No match for
7
- ${JSON.stringify(e)}${t?`
8
- while being at
9
- `+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ar(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function re(e,t){return P.NODE_ENV!=="production"?A(new Error(Ir[e](t)),{type:e,[Ve]:!0},t):A(new Error,{type:e,[Ve]:!0},t)}function K(e,t){return e instanceof Error&&Ve in e&&(t==null||!!(e.type&t))}const jr=["params","query","hash"];function Ar(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of jr)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Dt="[^/]+?",Tr={sensitive:!1,strict:!1,start:!0,end:!0},$r=/[.+*?^${}()[\]/\\]/g;function xr(e,t){const n=A({},Tr,t),r=[];let o=n.start?"^":"";const s=[];for(const d of e){const u=d.length?[]:[90];n.strict&&!d.length&&(o+="/");for(let a=0;a<d.length;a++){const h=d[a];let p=40+(n.sensitive?.25:0);if(h.type===0)a||(o+="/"),o+=h.value.replace($r,"\\$&"),p+=40;else if(h.type===1){const{value:m,repeatable:y,optional:v,regexp:E}=h;s.push({name:m,repeatable:y,optional:v});const O=E||Dt;if(O!==Dt){p+=10;try{new RegExp(`(${O})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${m}" (${O}): `+C.message)}}let S=y?`((?:${O})(?:/(?:${O}))*)`:`(${O})`;a||(S=v&&d.length<2?`(?:/${S})`:"/"+S),v&&(S+="?"),o+=S,p+=20,v&&(p+=-8),y&&(p+=-20),O===".*"&&(p+=-50)}u.push(p)}r.push(u)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function c(d){const u=d.match(i),a={};if(!u)return null;for(let h=1;h<u.length;h++){const p=u[h]||"",m=s[h-1];a[m.name]=p&&m.repeatable?p.split("/"):p}return a}function l(d){let u="",a=!1;for(const h of e){(!a||!u.endsWith("/"))&&(u+="/"),a=!1;for(const p of h)if(p.type===0)u+=p.value;else if(p.type===1){const{value:m,repeatable:y,optional:v}=p,E=m in d?d[m]:"";if(W(E)&&!y)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const O=W(E)?E.join("/"):E;if(!O)if(v)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):a=!0);else throw new Error(`Missing required param "${m}"`);u+=O}}return u||"/"}return{re:i,score:r,keys:s,parse:c,stringify:l}}function Dr(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Mt(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=Dr(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(Ft(r))return 1;if(Ft(o))return-1}return o.length-r.length}function Ft(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Mr={type:0,value:""},Fr=/[a-zA-Z0-9_]/;function Br(e){if(!e)return[[]];if(e==="/")return[[Mr]];if(!e.startsWith("/"))throw new Error(P.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${d}": ${p}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let c=0,l,d="",u="";function a(){d&&(n===0?s.push({type:0,value:d}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:d,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function h(){d+=l}for(;c<e.length;){if(l=e[c++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(d&&a(),i()):l===":"?(a(),n=1):h();break;case 4:h(),n=r;break;case 1:l==="("?n=2:Fr.test(l)?h():(a(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:a(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${d}"`),a(),i(),o}function Wr(e,t,n){const r=xr(Br(e.path),n);if(P.NODE_ENV!=="production"){const s=new Set;for(const i of r.keys)s.has(i.name)&&k(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),s.add(i.name)}const o=A(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Lr(e,t){const n=[],r=new Map;t=Vt({strict:!1,end:!0,sensitive:!1},t);function o(a){return r.get(a)}function s(a,h,p){const m=!p,y=Wt(a);P.NODE_ENV!=="production"&&Kr(y,h),y.aliasOf=p&&p.record;const v=Vt(t,a),E=[y];if("alias"in a){const C=typeof a.alias=="string"?[a.alias]:a.alias;for(const $ of C)E.push(Wt(A({},y,{components:p?p.record.components:y.components,path:$,aliasOf:p?p.record:y})))}let O,S;for(const C of E){const{path:$}=C;if(h&&$[0]!=="/"){const M=h.record.path,V=M[M.length-1]==="/"?"":"/";C.path=h.record.path+($&&V+$)}if(P.NODE_ENV!=="production"&&C.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
10
- See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(O=Wr(C,h,v),P.NODE_ENV!=="production"&&h&&$[0]==="/"&&qr(O,h),p?(p.alias.push(O),P.NODE_ENV!=="production"&&Gr(p,O)):(S=S||O,S!==O&&S.alias.push(O),m&&a.name&&!Lt(O)&&(P.NODE_ENV!=="production"&&Hr(a,h),i(a.name))),Ut(O)&&l(O),y.children){const M=y.children;for(let V=0;V<M.length;V++)s(M[V],O,p&&p.children[V])}p=p||O}return S?()=>{i(S)}:ue}function i(a){if($t(a)){const h=r.get(a);h&&(r.delete(a),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(a);h>-1&&(n.splice(h,1),a.record.name&&r.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function c(){return n}function l(a){const h=zr(a,n);n.splice(h,0,a),a.record.name&&!Lt(a)&&r.set(a.record.name,a)}function d(a,h){let p,m={},y,v;if("name"in a&&a.name){if(p=r.get(a.name),!p)throw re(1,{location:a});if(P.NODE_ENV!=="production"){const S=Object.keys(a.params||{}).filter(C=>!p.keys.find($=>$.name===C));S.length&&k(`Discarded invalid param(s) "${S.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}v=p.record.name,m=A(Bt(h.params,p.keys.filter(S=>!S.optional).concat(p.parent?p.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),a.params&&Bt(a.params,p.keys.map(S=>S.name))),y=p.stringify(m)}else if(a.path!=null)y=a.path,P.NODE_ENV!=="production"&&!y.startsWith("/")&&k(`The Matcher cannot resolve relative paths but received "${y}". Unless you directly called \`matcher.resolve("${y}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),p=n.find(S=>S.re.test(y)),p&&(m=p.parse(y),v=p.record.name);else{if(p=h.name?r.get(h.name):n.find(S=>S.re.test(h.path)),!p)throw re(1,{location:a,currentLocation:h});v=p.record.name,m=A({},h.params,a.params),y=p.stringify(m)}const E=[];let O=p;for(;O;)E.unshift(O.record),O=O.parent;return{name:v,path:y,params:m,matched:E,meta:Ur(E)}}e.forEach(a=>s(a));function u(){n.length=0,r.clear()}return{addRoute:s,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:o}}function Bt(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Wt(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Vr(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Vr(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Lt(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ur(e){return e.reduce((t,n)=>A(t,n.meta),{})}function Vt(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ue(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Gr(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Ue.bind(null,n)))return k(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(Ue.bind(null,n)))return k(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Kr(e,t){t&&t.record.name&&!e.name&&!e.path&&k(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Hr(e,t){for(let n=t;n;n=n.parent)if(n.record.name===e.name)throw new Error(`A route named "${String(e.name)}" has been added as a ${t===n?"child":"descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`)}function qr(e,t){for(const n of t.keys)if(!e.keys.find(Ue.bind(null,n)))return k(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function zr(e,t){let n=0,r=t.length;for(;n!==r;){const s=n+r>>1;Mt(e,t[s])<0?r=s:n=s+1}const o=Jr(e);return o&&(r=t.lastIndexOf(o,r-1),P.NODE_ENV!=="production"&&r<0&&k(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)),r}function Jr(e){let t=e;for(;t=t.parent;)if(Ut(t)&&Mt(e,t)===0)return t}function Ut({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Qr(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(Et," "),i=s.indexOf("="),c=te(i<0?s:s.slice(0,i)),l=i<0?null:te(s.slice(i+1));if(c in t){let d=t[c];W(d)||(d=t[c]=[d]),d.push(l)}else t[c]=l}return t}function Gt(e){let t="";for(let n in e){const r=e[n];if(n=fr(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(W(r)?r.map(s=>s&&Fe(s)):[r&&Fe(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Yr(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=W(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Xr=Symbol(P.NODE_ENV!=="production"?"router view location matched":""),Kt=Symbol(P.NODE_ENV!=="production"?"router view depth":""),we=Symbol(P.NODE_ENV!=="production"?"router":""),Ge=Symbol(P.NODE_ENV!=="production"?"route location":""),Ke=Symbol(P.NODE_ENV!=="production"?"router view location":"");function le(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Q(e,t,n,r,o,s=i=>i()){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((c,l)=>{const d=h=>{h===!1?l(re(4,{from:n,to:t})):h instanceof Error?l(h):Ee(h)?l(re(2,{from:t,to:h})):(i&&r.enterCallbacks[o]===i&&typeof h=="function"&&i.push(h),c())},u=s(()=>e.call(r&&r.instances[o],t,n,P.NODE_ENV!=="production"?Zr(d,t,n):d));let a=Promise.resolve(u);if(e.length<3&&(a=a.then(d)),P.NODE_ENV!=="production"&&e.length>2){const h=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
11
- ${e.toString()}
12
- . If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof u=="object"&&"then"in u)a=a.then(p=>d._called?p:(k(h),Promise.reject(new Error("Invalid navigation guard"))));else if(u!==void 0&&!d._called){k(h),l(new Error("Invalid navigation guard"));return}}a.catch(h=>l(h))})}function Zr(e,t,n){let r=0;return function(){r++===1&&k(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function He(e,t,n,r,o=s=>s()){const s=[];for(const i of e){P.NODE_ENV!=="production"&&!i.components&&!i.children.length&&k(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);for(const c in i.components){let l=i.components[c];if(P.NODE_ENV!=="production"){if(!l||typeof l!="object"&&typeof l!="function")throw k(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){k(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const d=l;l=()=>d}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__warnedDefineAsync=!0,k(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(vt(l)){const u=(l.__vccOpts||l)[t];u&&s.push(Q(u,n,r,i,c,o))}else{let d=l();P.NODE_ENV!=="production"&&!("catch"in d)&&(k(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),d=Promise.resolve(d)),s.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const a=er(u)?u.default:u;i.mods[c]=u,i.components[c]=a;const p=(a.__vccOpts||a)[t];return p&&Q(p,n,r,i,c,o)()}))}}}return s}function Ht(e){const t=f.inject(we),n=f.inject(Ge);let r=!1,o=null;const s=f.computed(()=>{const u=f.unref(e.to);return P.NODE_ENV!=="production"&&(!r||u!==o)&&(Ee(u)||(r?k(`Invalid value for prop "to" in useLink()
13
- - to:`,u,`
14
- - previous to:`,o,`
15
- - props:`,e):k(`Invalid value for prop "to" in useLink()
16
- - to:`,u,`
17
- - props:`,e)),o=u,r=!0),t.resolve(u)}),i=f.computed(()=>{const{matched:u}=s.value,{length:a}=u,h=u[a-1],p=n.matched;if(!h||!p.length)return-1;const m=p.findIndex(z.bind(null,h));if(m>-1)return m;const y=qt(u[a-2]);return a>1&&qt(h)===y&&p[p.length-1].path!==y?p.findIndex(z.bind(null,u[a-2])):m}),c=f.computed(()=>i.value>-1&&no(n.params,s.value.params)),l=f.computed(()=>i.value>-1&&i.value===n.matched.length-1&&Pt(n.params,s.value.params));function d(u={}){if(to(u)){const a=t[f.unref(e.replace)?"replace":"push"](f.unref(e.to)).catch(ue);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}if(P.NODE_ENV!=="production"&&G){const u=f.getCurrentInstance();if(u){const a={route:s.value,isActive:c.value,isExactActive:l.value,error:null};u.__vrl_devtools=u.__vrl_devtools||[],u.__vrl_devtools.push(a),f.watchEffect(()=>{a.route=s.value,a.isActive=c.value,a.isExactActive=l.value,a.error=Ee(f.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:s,href:f.computed(()=>s.value.href),isActive:c,isExactActive:l,navigate:d}}function _r(e){return e.length===1?e[0]:e}const eo=f.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ht,setup(e,{slots:t}){const n=f.reactive(Ht(e)),{options:r}=f.inject(we),o=f.computed(()=>({[zt(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[zt(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_r(t.default(n));return e.custom?s:f.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}});function to(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function no(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!W(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function qt(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const zt=(e,t,n)=>e??t??n,ro=f.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){P.NODE_ENV!=="production"&&so();const r=f.inject(Ke),o=f.computed(()=>e.route||r.value),s=f.inject(Kt,0),i=f.computed(()=>{let d=f.unref(s);const{matched:u}=o.value;let a;for(;(a=u[d])&&!a.components;)d++;return d}),c=f.computed(()=>o.value.matched[i.value]);f.provide(Kt,f.computed(()=>i.value+1)),f.provide(Xr,c),f.provide(Ke,o);const l=f.ref();return f.watch(()=>[l.value,c.value,e.name],([d,u,a],[h,p,m])=>{u&&(u.instances[a]=d,p&&p!==u&&d&&d===h&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),d&&u&&(!p||!z(u,p)||!h)&&(u.enterCallbacks[a]||[]).forEach(y=>y(d))},{flush:"post"}),()=>{const d=o.value,u=e.name,a=c.value,h=a&&a.components[u];if(!h)return Jt(n.default,{Component:h,route:d});const p=a.props[u],m=p?p===!0?d.params:typeof p=="function"?p(d):p:null,y=E=>{E.component.isUnmounted&&(a.instances[u]=null)},v=f.h(h,A({},m,t,{onVnodeUnmounted:y,ref:l}));if(P.NODE_ENV!=="production"&&G&&v.ref){const E={depth:i.value,name:a.name,path:a.path,meta:a.meta};(W(v.ref)?v.ref.map(S=>S.i):[v.ref.i]).forEach(S=>{S.__vrv_devtools=E})}return Jt(n.default,{Component:v,route:d})||v}}});function Jt(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const oo=ro;function so(){const e=f.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const r=t==="KeepAlive"?"keep-alive":"transition";k(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
18
- Use slot props instead:
19
-
20
- <router-view v-slot="{ Component }">
21
- <${r}>
22
- <component :is="Component" />
23
- </${r}>
24
- </router-view>`)}}function fe(e,t){const n=A({},e,{matched:e.matched.map(r=>vo(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Re(e){return{_custom:{display:e}}}let io=0;function ao(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=io++;_n({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{typeof o.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),o.on.inspectComponent((u,a)=>{u.instanceData&&u.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:fe(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:u,componentInstance:a})=>{if(a.__vrv_devtools){const h=a.__vrv_devtools;u.tags.push({label:(h.name?`${h.name.toString()}: `:"")+h.path,textColor:0,tooltip:"This component is rendered by &lt;router-view&gt;",backgroundColor:Qt})}W(a.__vrl_devtools)&&(a.__devtoolsApi=o,a.__vrl_devtools.forEach(h=>{let p=h.route.path,m=Zt,y="",v=0;h.error?(p=h.error,m=ho,v=po):h.isExactActive?(m=Xt,y="This is exactly active"):h.isActive&&(m=Yt,y="This link is active"),u.tags.push({label:p,textColor:v,tooltip:y,backgroundColor:m})}))}),f.watch(t.currentRoute,()=>{l(),o.notifyComponentUpdate(),o.sendInspectorTree(c),o.sendInspectorState(c)});const s="router:navigations:"+r;o.addTimelineLayer({id:s,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((u,a)=>{o.addTimelineEvent({layerId:s,event:{title:"Error during Navigation",subtitle:a.fullPath,logType:"error",time:o.now(),data:{error:u},groupId:a.meta.__navigationId}})});let i=0;t.beforeEach((u,a)=>{const h={guard:Re("beforeEach"),from:fe(a,"Current Location during this navigation"),to:fe(u,"Target location")};Object.defineProperty(u.meta,"__navigationId",{value:i++}),o.addTimelineEvent({layerId:s,event:{time:o.now(),title:"Start of navigation",subtitle:u.fullPath,data:h,groupId:u.meta.__navigationId}})}),t.afterEach((u,a,h)=>{const p={guard:Re("afterEach")};h?(p.failure={_custom:{type:Error,readOnly:!0,display:h?h.message:"",tooltip:"Navigation Failure",value:h}},p.status=Re("❌")):p.status=Re("✅"),p.from=fe(a,"Current Location during this navigation"),p.to=fe(u,"Target location"),o.addTimelineEvent({layerId:s,event:{title:"End of navigation",subtitle:u.fullPath,time:o.now(),data:p,logType:h?"warning":"default",groupId:u.meta.__navigationId}})});const c="router-inspector:"+r;o.addInspector({id:c,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!d)return;const u=d;let a=n.getRoutes().filter(h=>!h.parent||!h.parent.record.components);a.forEach(tn),u.filter&&(a=a.filter(h=>qe(h,u.filter.toLowerCase()))),a.forEach(h=>en(h,t.currentRoute.value)),u.rootNodes=a.map(_t)}let d;o.on.getInspectorTree(u=>{d=u,u.app===e&&u.inspectorId===c&&l()}),o.on.getInspectorState(u=>{if(u.app===e&&u.inspectorId===c){const h=n.getRoutes().find(p=>p.record.__vd_id===u.nodeId);h&&(u.state={options:uo(h)})}}),o.sendInspectorTree(c),o.sendInspectorState(c)})}function co(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function uo(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${co(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Qt=15485081,Yt=2450411,Xt=8702998,lo=2282478,Zt=16486972,fo=6710886,ho=16704226,po=12131356;function _t(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:lo}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Zt}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Qt}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Xt}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Yt}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:fo});let r=n.__vd_id;return r==null&&(r=String(mo++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(_t)}}let mo=0;const go=/^\/(.*)\/([a-z]*)$/;function en(e,t){const n=t.matched.length&&z(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>z(r,e.record))),e.children.forEach(r=>en(r,t))}function tn(e){e.__vd_match=!1,e.children.forEach(tn)}function qe(e,t){const n=String(e.re).match(go);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(i=>qe(i,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),s=te(o);return!t.startsWith("/")&&(s.includes(t)||o.includes(t))||s.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(i=>qe(i,t))}function vo(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function yo(e){const t=Lr(e.routes,e),n=e.parseQuery||Qr,r=e.stringifyQuery||Gt,o=e.history;if(P.NODE_ENV!=="production"&&!o)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const s=le(),i=le(),c=le(),l=f.shallowRef(J);let d=J;G&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=De.bind(null,g=>""+g),a=De.bind(null,dr),h=De.bind(null,te);function p(g,R){let w,b;return $t(g)?(w=t.getRecordMatcher(g),P.NODE_ENV!=="production"&&!w&&k(`Parent route "${String(g)}" not found when adding child route`,R),b=R):b=g,t.addRoute(b,w)}function m(g){const R=t.getRecordMatcher(g);R?t.removeRoute(R):P.NODE_ENV!=="production"&&k(`Cannot remove non-existent route "${String(g)}"`)}function y(){return t.getRoutes().map(g=>g.record)}function v(g){return!!t.getRecordMatcher(g)}function E(g,R){if(R=A({},R||l.value),typeof g=="string"){const N=Be(n,g,R.path),x=t.resolve({path:N.path},R),Z=o.createHref(N.fullPath);return P.NODE_ENV!=="production"&&(Z.startsWith("//")?k(`Location "${g}" resolved to "${Z}". A resolved location cannot start with multiple slashes.`):x.matched.length||k(`No match found for location with path "${g}"`)),A(N,x,{params:h(x.params),hash:te(N.hash),redirectedFrom:void 0,href:Z})}if(P.NODE_ENV!=="production"&&!Ee(g))return k(`router.resolve() was passed an invalid location. This will fail in production.
25
- - Location:`,g),E({});let w;if(g.path!=null)P.NODE_ENV!=="production"&&"params"in g&&!("name"in g)&&Object.keys(g.params).length&&k(`Path "${g.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=A({},g,{path:Be(n,g.path,R.path).path});else{const N=A({},g.params);for(const x in N)N[x]==null&&delete N[x];w=A({},g,{params:a(N)}),R.params=a(R.params)}const b=t.resolve(w,R),T=g.hash||"";P.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&k(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),b.params=u(h(b.params));const D=gr(r,A({},g,{hash:lr(T),path:b.path})),I=o.createHref(D);return P.NODE_ENV!=="production"&&(I.startsWith("//")?k(`Location "${g}" resolved to "${I}". A resolved location cannot start with multiple slashes.`):b.matched.length||k(`No match found for location with path "${g.path!=null?g.path:g}"`)),A({fullPath:D,hash:T,query:r===Gt?Yr(g.query):g.query||{}},b,{redirectedFrom:void 0,href:I})}function O(g){return typeof g=="string"?Be(n,g,l.value.path):A({},g)}function S(g,R){if(d!==g)return re(8,{from:R,to:g})}function C(g){return V(g)}function $(g){return C(A(O(g),{replace:!0}))}function M(g){const R=g.matched[g.matched.length-1];if(R&&R.redirect){const{redirect:w}=R;let b=typeof w=="function"?w(g):w;if(typeof b=="string"&&(b=b.includes("?")||b.includes("#")?b=O(b):{path:b},b.params={}),P.NODE_ENV!=="production"&&b.path==null&&!("name"in b))throw k(`Invalid redirect found:
26
- ${JSON.stringify(b,null,2)}
27
- when navigating to "${g.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return A({query:g.query,hash:g.hash,params:b.path!=null?{}:g.params},b)}}function V(g,R){const w=d=E(g),b=l.value,T=g.state,D=g.force,I=g.replace===!0,N=M(w);if(N)return V(A(O(N),{state:typeof N=="object"?A({},T,N.state):T,force:D,replace:I}),R||w);const x=w;x.redirectedFrom=R;let Z;return!D&&St(r,b,w)&&(Z=re(16,{to:x,from:b}),dn(b,b,!0,!1)),(Z?Promise.resolve(Z):un(x,b)).catch(F=>K(F)?K(F,2)?F:Ye(F):Qe(F,x,b)).then(F=>{if(F){if(K(F,2))return P.NODE_ENV!=="production"&&St(r,E(F.to),x)&&R&&(R._count=R._count?R._count+1:1)>30?(k(`Detected a possibly infinite redirection in a navigation guard when going from "${b.fullPath}" to "${x.fullPath}". Aborting to avoid a Stack Overflow.
28
- Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):V(A({replace:I},O(F.to),{state:typeof F.to=="object"?A({},T,F.to.state):T,force:D}),R||x)}else F=fn(x,b,!0,I,T);return ln(x,b,F),F})}function Os(g,R){const w=S(g,R);return w?Promise.reject(w):Promise.resolve()}function ze(g){const R=Se.values().next().value;return R&&typeof R.runWithContext=="function"?R.runWithContext(g):g()}function un(g,R){let w;const[b,T,D]=Eo(g,R);w=He(b.reverse(),"beforeRouteLeave",g,R);for(const N of b)N.leaveGuards.forEach(x=>{w.push(Q(x,g,R))});const I=Os.bind(null,g,R);return w.push(I),oe(w).then(()=>{w=[];for(const N of s.list())w.push(Q(N,g,R));return w.push(I),oe(w)}).then(()=>{w=He(T,"beforeRouteUpdate",g,R);for(const N of T)N.updateGuards.forEach(x=>{w.push(Q(x,g,R))});return w.push(I),oe(w)}).then(()=>{w=[];for(const N of D)if(N.beforeEnter)if(W(N.beforeEnter))for(const x of N.beforeEnter)w.push(Q(x,g,R));else w.push(Q(N.beforeEnter,g,R));return w.push(I),oe(w)}).then(()=>(g.matched.forEach(N=>N.enterCallbacks={}),w=He(D,"beforeRouteEnter",g,R,ze),w.push(I),oe(w))).then(()=>{w=[];for(const N of i.list())w.push(Q(N,g,R));return w.push(I),oe(w)}).catch(N=>K(N,8)?N:Promise.reject(N))}function ln(g,R,w){c.list().forEach(b=>ze(()=>b(g,R,w)))}function fn(g,R,w,b,T){const D=S(g,R);if(D)return D;const I=R===J,N=G?history.state:{};w&&(b||I?o.replace(g.fullPath,A({scroll:I&&N&&N.scroll},T)):o.push(g.fullPath,T)),l.value=g,dn(g,R,w,I),Ye()}let pe;function bs(){pe||(pe=o.listen((g,R,w)=>{if(!pn.listening)return;const b=E(g),T=M(b);if(T){V(A(T,{replace:!0,force:!0}),b).catch(ue);return}d=b;const D=l.value;G&&Or(It(D.fullPath,w.delta),ye()),un(b,D).catch(I=>K(I,12)?I:K(I,2)?(V(A(O(I.to),{force:!0}),b).then(N=>{K(N,20)&&!w.delta&&w.type===ne.pop&&o.go(-1,!1)}).catch(ue),Promise.reject()):(w.delta&&o.go(-w.delta,!1),Qe(I,b,D))).then(I=>{I=I||fn(b,D,!1),I&&(w.delta&&!K(I,8)?o.go(-w.delta,!1):w.type===ne.pop&&K(I,20)&&o.go(-1,!1)),ln(b,D,I)}).catch(ue)}))}let Je=le(),hn=le(),be;function Qe(g,R,w){Ye(g);const b=hn.list();return b.length?b.forEach(T=>T(g,R,w)):(P.NODE_ENV!=="production"&&k("uncaught error during route navigation:"),console.error(g)),Promise.reject(g)}function Ss(){return be&&l.value!==J?Promise.resolve():new Promise((g,R)=>{Je.add([g,R])})}function Ye(g){return be||(be=!g,bs(),Je.list().forEach(([R,w])=>g?w(g):R()),Je.reset()),g}function dn(g,R,w,b){const{scrollBehavior:T}=e;if(!G||!T)return Promise.resolve();const D=!w&&br(It(g.fullPath,0))||(b||!w)&&history.state&&history.state.scroll||null;return f.nextTick().then(()=>T(g,R,D)).then(I=>I&&Rr(I)).catch(I=>Qe(I,g,R))}const Xe=g=>o.go(g);let Ze;const Se=new Set,pn={currentRoute:l,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:y,resolve:E,options:e,push:C,replace:$,go:Xe,back:()=>Xe(-1),forward:()=>Xe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:hn.add,isReady:Ss,install(g){const R=this;g.component("RouterLink",eo),g.component("RouterView",oo),g.config.globalProperties.$router=R,Object.defineProperty(g.config.globalProperties,"$route",{enumerable:!0,get:()=>f.unref(l)}),G&&!Ze&&l.value===J&&(Ze=!0,C(o.location).catch(T=>{P.NODE_ENV!=="production"&&k("Unexpected error when starting the router:",T)}));const w={};for(const T in J)Object.defineProperty(w,T,{get:()=>l.value[T],enumerable:!0});g.provide(we,R),g.provide(Ge,f.shallowReactive(w)),g.provide(Ke,l);const b=g.unmount;Se.add(g),g.unmount=function(){Se.delete(g),Se.size<1&&(d=J,pe&&pe(),pe=null,l.value=J,Ze=!1,be=!1),b()},P.NODE_ENV!=="production"&&G&&ao(g,R,t)}};function oe(g){return g.reduce((R,w)=>R.then(()=>ze(w)),Promise.resolve())}return pn}function Eo(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const c=t.matched[i];c&&(e.matched.find(d=>z(d,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(d=>z(d,l))||o.push(l))}return[n,r,o]}function wo(){return f.inject(we)}function Ro(e){return f.inject(Ge)}function H(e){let t=nt(),n=xn(),r=Ln(e),o=st(),s=wo(),i=Ro();function c(m){m.scopeSnapshot&&(t=m.scopeSnapshot),m.slotSnapshot&&(n=m.slotSnapshot),m.vforSnapshot&&(r=m.vforSnapshot),m.elementRefSnapshot&&(o=m.elementRefSnapshot),m.routerSnapshot&&(s=m.routerSnapshot)}function l(m){if(j.isVar(m))return f.toValue(d(m));if(j.isVForItem(m))return Un(m.fid)?r.getVForIndex(m.fid):f.toValue(d(m));if(j.isVForIndex(m))return r.getVForIndex(m.fid);if(j.isJs(m)){const{code:y,bind:v}=m,E=ve(v,O=>u(O));return Hn(y,E)()}if(j.isSlotProp(m))return n.getPropsValue(m);if(j.isRouterParams(m))return f.toValue(d(m));throw new Error(`Invalid binding: ${m}`)}function d(m){if(j.isVar(m)){const y=t.getVueRef(m)||kn(m);return pt(y,{paths:m.path,getBindableValueFn:l})}if(j.isVForItem(m))return Vn({binding:m,vforSnapshot:r});if(j.isVForIndex(m))return()=>l(m);if(j.isRouterParams(m)){const{prop:y="params"}=m;return pt(()=>i[y],{paths:m.path,getBindableValueFn:l})}throw new Error(`Invalid binding: ${m}`)}function u(m){if(j.isVar(m)||j.isVForItem(m))return d(m);if(j.isVForIndex(m))return l(m);if(j.isJs(m))return null;if(j.isRouterParams(m))return d(m);throw new Error(`Invalid binding: ${m}`)}function a(m){if(j.isVar(m))return{sid:m.sid,id:m.id};if(j.isVForItem(m))return{type:"vf",fid:m.fid};if(j.isVForIndex(m))return{type:"vf-i",fid:m.fid,value:null};if(j.isJs(m))return null}function h(m){var y,v;(y=m.vars)==null||y.forEach(E=>{d({type:"ref",...E}).value=E.val}),(v=m.ele_refs)==null||v.forEach(E=>{o.getRef({sid:E.sid,id:E.id}).value[E.method](...E.args)})}function p(m,y){if(mt(y)||mt(m.values))return;y=y;const v=m.values,E=m.skips||new Array(y.length).fill(0);y.forEach((O,S)=>{if(E[S]===1)return;if(j.isVar(O)){const $=d(O);$.value=v[S];return}if(j.isRouterAction(O)){const $=v[S],M=s[$.fn];M(...$.args);return}if(j.isElementRef(O)){const $=o.getRef(O).value,M=v[S];$[M.method](...M.args);return}if(j.isJsOutput(O)){const $=v[S],M=L($);typeof M=="function"&&M();return}const C=d(O);C.value=v[S]})}return{getObjectToValue:l,getVueRefObject:d,getVueRefObjectOrValue:u,getBindingServerInfo:a,updateRefFromServer:h,updateEventRefFromServer:p,replaceSnapshot:c}}function Oo(e,t,n){return new bo(e,t,n)}class bo{constructor(t,n,r){B(this,"taskQueue",[]);B(this,"id2TaskMap",new Map);B(this,"input2TaskIdMap",se(()=>[]));this.snapshots=r;const o=[],s=i=>{var l;const c=new So(i,r);return this.id2TaskMap.set(c.id,c),(l=i.inputs)==null||l.forEach(d=>{const u=`${d.sid}-${d.id}`;this.input2TaskIdMap.getOrDefault(u).push(c.id)}),c};t==null||t.forEach(i=>{const c=s(i);o.push(c)}),n==null||n.forEach(i=>{const c={type:"ref",sid:i.sid,id:i.id},l={...i,immediate:!0,outputs:[c,...i.outputs||[]]},d=s(l);o.push(d)}),o.forEach(i=>{const{deep:c=!0,once:l,flush:d,immediate:u=!0}=i.watchConfig,a={immediate:u,deep:c,once:l,flush:d},h=this._getWatchTargets(i);f.watch(h,([p])=>{i.modify=!0,this.taskQueue.push(new Po(i)),this._scheduleNextTick()},a)})}_getWatchTargets(t){if(!t.watchConfig.inputs)return[];const n=t.slientInputs;return t.watchConfig.inputs.filter((o,s)=>(j.isVar(o)||j.isVForItem(o)||j.isRouterParams(o))&&!n[s]).map(o=>this.snapshots.getVueRefObjectOrValue(o))}_scheduleNextTick(){f.nextTick(()=>this._runAllTasks())}_runAllTasks(){const t=this.taskQueue.slice();this.taskQueue.length=0,this._setTaskNodeRelations(t),t.forEach(n=>{n.run()})}_setTaskNodeRelations(t){t.forEach(n=>{const r=this._findNextNodes(n,t);n.appendNextNodes(...r),r.forEach(o=>{o.appendPrevNodes(n)})})}_findNextNodes(t,n){const r=t.watchTask.watchConfig.outputs;if(r&&r.length<=0)return[];const o=this._getCalculatorTasksByOutput(t.watchTask.watchConfig.outputs);return n.filter(s=>o.has(s.watchTask.id)&&s.watchTask.id!==t.watchTask.id)}_getCalculatorTasksByOutput(t){const n=new Set;return t==null||t.forEach(r=>{const o=`${r.sid}-${r.id}`;(this.input2TaskIdMap.get(o)||[]).forEach(i=>n.add(i))}),n}}class So{constructor(t,n){B(this,"modify",!0);B(this,"_running",!1);B(this,"id");B(this,"_runningPromise",null);B(this,"_runningPromiseResolve",null);B(this,"_inputInfos");this.watchConfig=t,this.snapshot=n,this.id=Symbol(t.debug),this._inputInfos=this.createInputInfos()}createInputInfos(){const{inputs:t=[]}=this.watchConfig,n=this.watchConfig.data||new Array(t.length).fill(0),r=this.watchConfig.slient||new Array(t.length).fill(0);return{const_data:n,slients:r}}get slientInputs(){return this._inputInfos.slients}getServerInputs(){const{const_data:t}=this._inputInfos;return this.watchConfig.inputs?this.watchConfig.inputs.map((n,r)=>t[r]===0?this.snapshot.getObjectToValue(n):n):[]}get running(){return this._running}get runningPromise(){return this._runningPromise}setRunning(){this._running=!0,this._runningPromise=new Promise(t=>{this._runningPromiseResolve=t}),this._trySetRunningRef(!0)}taskDone(){this._running=!1,this._runningPromiseResolve&&(this._runningPromiseResolve(),this._runningPromiseResolve=null),this._trySetRunningRef(!1)}_trySetRunningRef(t){if(this.watchConfig.running){const n=this.snapshot.getVueRefObject(this.watchConfig.running);n.value=t}}}class Po{constructor(t){B(this,"prevNodes",[]);B(this,"nextNodes",[]);B(this,"_runningPrev",!1);this.watchTask=t}appendPrevNodes(...t){this.prevNodes.push(...t)}appendNextNodes(...t){this.nextNodes.push(...t)}hasNextNodes(){return this.nextNodes.length>0}async run(){if(this.prevNodes.length>0&&!this._runningPrev)try{this._runningPrev=!0,await Promise.all(this.prevNodes.map(t=>t.run()))}finally{this._runningPrev=!1}if(this.watchTask.running){await this.watchTask.runningPromise;return}if(this.watchTask.modify){this.watchTask.modify=!1,this.watchTask.setRunning();try{await ko(this.watchTask)}finally{this.watchTask.taskDone()}}}}async function ko(e){const{outputs:t,url:n,key:r}=e.watchConfig,o=e.snapshot,s=e.getServerInputs(),i={key:r,input:s,page:Ne()},c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!t)return;const l=await c.json();o.updateEventRefFromServer(l,t)}class No{constructor(t){B(this,"varMap",new Map)}collectVar(t){this.varMap.set(`${t.sid}-${t.id}`,t)}getRef(t){return this.varMap.get(`${t.sid}-${t.id}`)}getWebComputed(t){return this.varMap.get(`${t.sid}-${t.id}`)}getJsComputed(t){return this.varMap.get(`${t.sid}-${t.id}`)}}let nn;function Co(e){nn=new No(e)}function Io(){return nn}function jo(e,t){const{on:n,code:r,immediate:o,deep:s,once:i,flush:c,bind:l={}}=e,d=ve(l,h=>t.getVueRefObject(h)),u=L(r,d),a=Array.isArray(n)?n.map(h=>t.getVueRefObject(h)):t.getVueRefObject(n);return f.watch(a,u,{immediate:o,deep:s,once:i,flush:c})}function Ao(e,t){const{inputs:n=[],outputs:r=[],slient:o,data:s,code:i,immediate:c=!0,deep:l,once:d,flush:u}=e,a=o||new Array(n.length).fill(0),h=s||new Array(n.length).fill(0),p=L(i),m=n.filter((E,O)=>a[O]===0&&h[O]===0).map(E=>t.getVueRefObject(E)),y=r.length>1;function v(){return n.map((E,O)=>h[O]===0?f.toRaw(f.toValue(t.getVueRefObject(E))):E)}f.watch(m,()=>{let E=p(...v());r.length!==0&&(y||(E=[E]),r.forEach((O,S)=>{const C=E[S];t.getVueRefObject(O).value=C}))},{immediate:c,deep:l,once:d,flush:u})}function To(e,t){return Object.assign({},...Object.entries(e??{}).map(([n,r])=>{const o=r.map(c=>{if(Ce.isWebEventHandler(c)){const l=$o(c.bind,t);return xo(c,l,t)}else return Do(c,t)}),i=L(" (...args)=> Promise.all(promises(...args))",{promises:(...c)=>o.map(async l=>{await l(...c)})});return{[n]:i}}))}function $o(e,t){return(...n)=>(e??[]).map(r=>{if(j.isEventContext(r)){if(r.path.startsWith(":")){const o=r.path.slice(1);return L(o)(...n)}return ce(n[0],r.path.split("."))}return j.IsBinding(r)?t.getObjectToValue(r):r})}function xo(e,t,n){const{url:r,hKey:o,key:s}=e,i=s!==void 0?{key:s}:{};async function c(...l){let d={};const u=t(...l),a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bind:u,hKey:o,...i,page:Ne(),...d})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const h=await a.json();n.updateEventRefFromServer(h,e.set)}return c}function Do(e,t){const{code:n,inputs:r=[],set:o}=e,s=L(n);function i(...c){const l=(r??[]).map(u=>{if(j.isEventContext(u)){if(u.path.startsWith(":")){const a=u.path.slice(1);return L(a)(...c)}return ce(c[0],u.path.split("."))}return j.IsBinding(u)?t.getObjectToValue(u):u}),d=s(...l);if(o!==void 0){const a=o.length===1?[d]:d,h=a.map(p=>p===void 0?1:0);t.updateEventRefFromServer({values:a,skips:h},o)}}return i}function Mo(e,t){const n=[];(e.bStyle||[]).forEach(s=>{Array.isArray(s)?n.push(...s.map(i=>t.getObjectToValue(i))):n.push(ve(s,i=>t.getObjectToValue(i)))});const r=f.normalizeStyle([e.style||{},n]);return{hasStyle:r&&Object.keys(r).length>0,styles:r}}function Fo(e,t){const n=e.classes;if(!n)return null;if(typeof n=="string")return f.normalizeClass(n);const{str:r,map:o,bind:s}=n,i=[];return r&&i.push(r),o&&i.push(ve(o,c=>t.getObjectToValue(c))),s&&i.push(...s.map(c=>t.getObjectToValue(c))),f.normalizeClass(i)}function Bo(e,t){var r;const n={};return it(e.bProps||{},(o,s)=>{n[s]=Wo(t.getObjectToValue(o),s)}),(r=e.proxyProps)==null||r.forEach(o=>{const s=t.getObjectToValue(o);typeof s=="object"&&it(s,(i,c)=>{n[c]=i})}),{...e.props||{},...n}}function Wo(e,t){return t==="innerText"?f.toDisplayString(e):e}function Lo(e,{slots:t}){const{id:n,use:r}=e.propsInfo,o=An(n);return f.onUnmounted(()=>{$n(n)}),()=>{const s=e.propsValue;return Tn(n,o,Object.fromEntries(r.map(i=>[i,s[i]]))),f.h(f.Fragment,null,t.default())}}const Vo=f.defineComponent(Lo,{props:["propsInfo","propsValue"]});function Uo(e,t){if(!e.slots)return null;const n=e.slots??{};return Array.isArray(n)?t?he(n):()=>he(n):at(n,{keyFn:i=>i===":"?"default":i,valueFn:i=>{const{items:c}=i;return l=>{if(i.scope){const d=()=>i.props?rn(i.props,l,c):he(c);return f.h(de,{scope:i.scope},d)}return i.props?rn(i.props,l,c):he(c)}}})}function rn(e,t,n){return f.h(Vo,{propsInfo:e,propsValue:t},()=>he(n))}function he(e){const t=(e??[]).map(n=>f.h(q,{component:n}));return t.length<=0?null:t}function Go(e,t){const n={},r=[];return(e||[]).forEach(o=>{const{sys:s,name:i,arg:c,value:l,mf:d}=o;if(i==="vmodel"){const u=t.getVueRefObject(l);if(n[`onUpdate:${c}`]=a=>{u.value=a},s===1){const a=d?Object.fromEntries(d.map(h=>[h,!0])):{};r.push([f.vModelDynamic,u.value,void 0,a])}else n[c]=u.value}else if(i==="vshow"){const u=t.getVueRefObject(l);r.push([f.vShow,u.value])}else console.warn(`Directive ${i} is not supported yet`)}),{newProps:n,directiveArray:r}}function Ko(e,t){const{eRef:n}=e;return n===void 0?{}:{ref:t.getRef(n)}}function Ho(e){const t=H(),n=st();return()=>{const{tag:r}=e.component,o=j.IsBinding(r)?t.getObjectToValue(r):r,s=f.resolveDynamicComponent(o),i=typeof s=="string",c=Fo(e.component,t),{styles:l,hasStyle:d}=Mo(e.component,t),u=To(e.component.events??{},t),a=Uo(e.component,i),h=Bo(e.component,t),{newProps:p,directiveArray:m}=Go(e.component.dir,t),y=Ko(e.component,n),v=f.normalizeProps({...h,...u,...p,...y})||{};d&&(v.style=l),c&&(v.class=c);const E=f.h(s,{...v},a);return m.length>0?f.withDirectives(E,m):E}}const q=f.defineComponent(Ho,{props:["component"]});function on(e,t){var n,r;if(e){e.vars&&e.vars.forEach(i=>{Io().collectVar(i)});const o=tt(e,H(t)),s=H(t);Oo(e.py_watch,e.web_computed,s),(n=e.vue_watch)==null||n.forEach(i=>jo(i,s)),(r=e.js_watch)==null||r.forEach(i=>Ao(i,s)),e.eRefs&&e.eRefs.forEach(i=>{In(i)}),f.onUnmounted(()=>{ot(e.id,o),jn(e.id)})}}function qo(e,{slots:t}){const{scope:n}=e;return on(n),()=>f.h(f.Fragment,null,t.default())}const de=f.defineComponent(qo,{props:["scope"]}),zo=f.defineComponent(e=>{const{scope:t,items:n,vforInfo:r}=e;return Dn(r),on(t,r.key),n.length===1?()=>f.h(q,{component:n[0]}):()=>n.map(s=>f.h(q,{component:s}))},{props:["scope","items","vforInfo"]});function Jo(e,t){const{state:n,isReady:r,isLoading:o}=En(async()=>{let s=e;const i=t;if(!s&&!i)throw new Error("Either config or configUrl must be provided");if(!s&&i&&(s=await(await fetch(i)).json()),!s)throw new Error("Failed to load config");return s},{});return{config:n,isReady:r,isLoading:o}}function Qo(e,t){let n;return t.component?n=`Error captured from component:tag: ${t.component.tag} ; id: ${t.component.id} `:n="Error captured from app init",console.group(n),console.error("Component:",t.component),console.error("Error:",e),console.groupEnd(),!1}const Yo={class:"app-box"},Xo={key:0,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}},Zo=((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})(f.defineComponent({__name:"App",props:{config:{},configUrl:{}},setup(e){const t=e,{config:n,isLoading:r}=Jo(t.config,t.configUrl);let o=null;return f.watch(n,s=>{o=s,s.url&&mn({version:s.version,queryPath:s.url.path,pathParams:s.url.params}),Co(s)}),f.onErrorCaptured(Qo),(s,i)=>(f.openBlock(),f.createElementBlock("div",Yo,[f.unref(r)?(f.openBlock(),f.createElementBlock("div",Xo,i[0]||(i[0]=[f.createElementVNode("p",{style:{margin:"auto"}},"Loading ...",-1)]))):(f.openBlock(),f.createElementBlock("div",{key:1,class:f.normalizeClass(["insta-main",f.unref(n).class])},[f.createVNode(f.unref(de),{scope:f.unref(o).scope},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(o).items,c=>(f.openBlock(),f.createBlock(f.unref(q),{component:c},null,8,["component"]))),256))]),_:1},8,["scope"])],2))]))}}),[["__scopeId","data-v-687dcc1a"]]);function _o(e){const{on:t,scope:n,items:r}=e,o=H();return()=>{const s=o.getObjectToValue(t),i=()=>s?r.map(c=>f.h(q,{component:c})):void 0;return f.h(de,{scope:n},i)}}const es=f.defineComponent(_o,{props:["on","scope","items"]});function ts(e){const{start:t=0,end:n,step:r=1}=e;let o=[];if(r>0)for(let s=t;s<n;s+=r)o.push(s);else for(let s=t;s>n;s+=r)o.push(s);return o}function ns(e){const{array:t,bArray:n,items:r,fkey:o,fid:s,scope:i,num:c,tsGroup:l={}}=e,d=t===void 0,u=c!==void 0,a=d?n:t,h=H();Fn(s,a,d,u);const m=as(o??"index");return f.onUnmounted(()=>{Nn(i.id)}),()=>{const y=os(u,d,a,h,c),v=Wn(s),E=y.map((O,S)=>{const C=m(O,S);return v.add(C),Bn(s,C,S),f.h(zo,{scope:e.scope,items:r,vforInfo:{fid:s,key:C},key:C})});return v.removeUnusedKeys(),l&&Object.keys(l).length>0?f.h(f.TransitionGroup,l,{default:()=>E}):E}}const rs=f.defineComponent(ns,{props:["array","items","fid","bArray","scope","num","fkey","tsGroup"]});function os(e,t,n,r,o){if(e){let i=0;return typeof o=="number"?i=o:i=r.getObjectToValue(o)??0,ts({end:Math.max(0,i)})}const s=t?r.getObjectToValue(n)||[]:n;return typeof s=="object"?Object.values(s):s}const ss=e=>e,is=(e,t)=>t;function as(e){const t=wn(e);return typeof t=="function"?t:e==="item"?ss:is}function cs(e){return e.map(n=>{if(n.tag){const s=n;return f.h(q,{component:s})}const r=f.resolveDynamicComponent(sn),o=n;return f.h(r,{scope:o})})}const sn=f.defineComponent(e=>{const t=e.scope;return()=>cs(t.items??[])},{props:["scope"]});function us(e){return e.map(t=>{if(t.tag){const o=t;return f.h(q,{component:o})}const n=f.resolveDynamicComponent(sn),r=t;return f.h(n,{scope:r})})}const ls=f.defineComponent(e=>{const{scope:t,on:n,items:r}=e,o=f.shallowRef(r),s=tt(t),i=H();return Oe.createDynamicWatchRefresh(n,i,async()=>{const{items:c,on:l}=await Oe.fetchRemote(e,i);return o.value=c,l}),f.onUnmounted(()=>{ot(t.id,s)}),()=>us(o.value)},{props:["sid","url","hKey","on","bind","items","scope"]});var Oe;(e=>{function t(r,o,s){let i=null,c=r,l=c.map(u=>o.getVueRefObject(u));function d(){i&&i(),i=f.watch(l,async()=>{c=await s(),l=c.map(u=>o.getVueRefObject(u)),d()},{deep:!0})}return d(),()=>{i&&i()}}e.createDynamicWatchRefresh=t;async function n(r,o){const s=Object.values(r.bind).map(u=>({sid:u.sid,id:u.id,value:o.getObjectToValue(u)})),i={sid:r.sid,bind:s,hKey:r.hKey,page:Ne()},c={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)},l=await fetch(r.url,c);if(!l.ok)throw new Error("Failed to fetch data");return await l.json()}e.fetchRemote=n})(Oe||(Oe={}));function fs(e){const{scope:t,items:n}=e;return()=>{const r=n.map(o=>f.h(q,{component:o}));return f.h(de,{scope:t},()=>r)}}const an=f.defineComponent(fs,{props:["scope","items"]});function hs(e){const{on:t,case:n,default:r}=e,o=H();return()=>{const s=o.getObjectToValue(t),i=n.map(c=>{const{value:l,items:d,scope:u}=c.props;if(s===l)return f.h(an,{scope:u,items:d,key:["case",l].join("-")})}).filter(c=>c);if(r&&!i.length){const{items:c,scope:l}=r.props;i.push(f.h(an,{scope:l,items:c,key:"default"}))}return f.h(f.Fragment,i)}}const ds=f.defineComponent(hs,{props:["case","on","default"]});function ps(e,{slots:t}){const{name:n="fade",tag:r}=e;return()=>f.h(f.TransitionGroup,{name:n,tag:r},{default:t.default})}const ms=f.defineComponent(ps,{props:["name","tag"]});function gs(e){const{content:t,r:n=0}=e,r=H(),o=n===1?()=>r.getObjectToValue(t):()=>t;return()=>f.toDisplayString(o())}const vs=f.defineComponent(gs,{props:["content","r"]});function ys(e){if(!e.router)throw new Error("Router config is not provided.");const{routes:t,kAlive:n=!1}=e.router;return t.map(o=>cn(o,n))}function cn(e,t){var l;const{server:n=!1,vueItem:r,scope:o}=e,s=()=>{if(n)throw new Error("Server-side rendering is not supported yet.");return Promise.resolve(Es(r,o,t))},i=(l=r.children)==null?void 0:l.map(d=>cn(d,t)),c={...r,children:i,component:s};return r.component.length===0&&delete c.component,i===void 0&&delete c.children,c}function Es(e,t,n){const{path:r,component:o}=e,s=f.h(de,{scope:t,key:r},()=>o.map(c=>f.h(q,{component:c})));return n?f.h(f.KeepAlive,null,()=>s):s}function ws(e,t){const{mode:n="hash"}=t.router,r=n==="hash"?Cr():n==="memory"?Nr():Tt();e.use(yo({history:r,routes:ys(t)}))}function Rs(e,t){e.component("insta-ui",Zo),e.component("vif",es),e.component("vfor",rs),e.component("match",ds),e.component("refresh",ls),e.component("ts-group",ms),e.component("content",vs),t.router&&ws(e,t)}return Rs}(Vue);
29
- //# sourceMappingURL=insta-ui.iife.js.map
1
+ var InstaUI=function(f){"use strict";var Ps=Object.defineProperty;var ks=(f,U,_)=>U in f?Ps(f,U,{enumerable:!0,configurable:!0,writable:!0,value:_}):f[U]=_;var B=(f,U,_)=>ks(f,typeof U!="symbol"?U+"":U,_);function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=U(f);let _e,Pe,ke;function mn(e){_e=e.queryPath,Pe=e.pathParams,ke=e.queryParams}function Ne(){return{path:_e,...Pe===void 0?{}:{params:Pe},...ke===void 0?{}:{queryParams:ke}}}var Y;(e=>{function t(i){return i.type==="ref"}e.isRef=t;function n(i){return i.type==="vComputed"}e.isVueComputed=n;function r(i){return i.type==="jsComputed"}e.isJsComputed=r;function o(i){return i.type==="webComputed"}e.isWebComputed=o;function s(i){return i.type==="data"}e.isConstData=s})(Y||(Y={}));var j;(e=>{function t(v){return v.type==="ref"||v.type==="computed"||v.type==="webComputed"||v.type==="data"}e.isVar=t;function n(v){return v.type==="ref"}e.isRef=n;function r(v){return v.type==="routePar"}e.isRouterParams=r;function o(v){return v.type==="routeAct"}e.isRouterAction=o;function s(v){return v.type==="data"}e.isConstData=s;function i(v){return v.type==="computed"}e.isComputed=i;function c(v){return v.type==="webComputed"}e.isWebComputed=c;function l(v){return v.type==="js"}e.isJs=l;function d(v){return v.type==="jsOutput"}e.isJsOutput=d;function u(v){return v.type==="vf"}e.isVForItem=u;function a(v){return v.type==="vf-i"}e.isVForIndex=a;function h(v){return v.type==="sp"}e.isSlotProp=h;function p(v){return v.type==="event"}e.isEventContext=p;function m(v){return v.type==="ele_ref"}e.isElementRef=m;function y(v){return v.type!==void 0}e.IsBinding=y})(j||(j={}));var Ce;(e=>{function t(n){return n.url!==void 0}e.isWebEventHandler=t})(Ce||(Ce={}));class gn extends Map{constructor(t){super(),this.factory=t}getOrDefault(t){if(!this.has(t)){const n=this.factory();return this.set(t,n),n}return super.get(t)}}function se(e){return new gn(e)}function ie(e){return typeof e=="function"?e():f.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ie=()=>{};function je(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Ae(e,t=!1){function n(a,{flush:h="sync",deep:p=!1,timeout:m,throwOnTimeout:y}={}){let v=null;const O=[new Promise(S=>{v=f.watch(e,C=>{a(C)!==t&&(v?v():f.nextTick(()=>v==null?void 0:v()),S(C))},{flush:h,deep:p,immediate:!0})})];return m!=null&&O.push(je(m,y).then(()=>ie(e)).finally(()=>v==null?void 0:v())),Promise.race(O)}function r(a,h){if(!f.isRef(a))return n(C=>C===a,h);const{flush:p="sync",deep:m=!1,timeout:y,throwOnTimeout:v}=h??{};let E=null;const S=[new Promise(C=>{E=f.watch([e,a],([$,M])=>{t!==($===M)&&(E?E():f.nextTick(()=>E==null?void 0:E()),C($))},{flush:p,deep:m,immediate:!0})})];return y!=null&&S.push(je(y,v).then(()=>ie(e)).finally(()=>(E==null||E(),ie(e)))),Promise.race(S)}function o(a){return n(h=>!!h,a)}function s(a){return r(null,a)}function i(a){return r(void 0,a)}function c(a){return n(Number.isNaN,a)}function l(a,h){return n(p=>{const m=Array.from(p);return m.includes(a)||m.includes(ie(a))},h)}function d(a){return u(1,a)}function u(a=1,h){let p=-1;return n(()=>(p+=1,p>=a),h)}return Array.isArray(ie(e))?{toMatch:n,toContains:l,changed:d,changedTimes:u,get not(){return Ae(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:s,toBeNaN:c,toBeUndefined:i,changed:d,changedTimes:u,get not(){return Ae(e,!t)}}}function vn(e){return Ae(e)}function yn(e,t,n){let r;f.isRef(n)?r={evaluating:n}:r=n||{};const{lazy:o=!1,evaluating:s=void 0,shallow:i=!0,onError:c=Ie}=r,l=f.ref(!o),d=i?f.shallowRef(t):f.ref(t);let u=0;return f.watchEffect(async a=>{if(!l.value)return;u++;const h=u;let p=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const m=await e(y=>{a(()=>{s&&(s.value=!1),p||y()})});h===u&&(d.value=m)}catch(m){c(m)}finally{s&&h===u&&(s.value=!1),p=!0}}),o?f.computed(()=>(l.value=!0,d.value)):d}function En(e,t,n){const{immediate:r=!0,delay:o=0,onError:s=Ie,onSuccess:i=Ie,resetOnExecute:c=!0,shallow:l=!0,throwError:d}={},u=l?f.shallowRef(t):f.ref(t),a=f.ref(!1),h=f.ref(!1),p=f.shallowRef(void 0);async function m(E=0,...O){c&&(u.value=t),p.value=void 0,a.value=!1,h.value=!0,E>0&&await je(E);const S=typeof e=="function"?e(...O):e;try{const C=await S;u.value=C,a.value=!0,i(C)}catch(C){if(p.value=C,s(C),d)throw C}finally{h.value=!1}return u.value}r&&m(o);const y={state:u,isReady:a,isLoading:h,error:p,execute:m};function v(){return new Promise((E,O)=>{vn(h).toBe(!1).then(()=>E(y)).catch(O)})}return{...y,then(E,O){return v().then(E,O)}}}function L(e,t){t=t||{};const n=[...Object.keys(t),"__Vue"],r=[...Object.values(t),_];try{return new Function(...n,`return (${e})`)(...r)}catch(o){throw new Error(o+" in function code: "+e)}}function wn(e){if(e.startsWith(":")){e=e.slice(1);try{return L(e)}catch(t){throw new Error(t+" in function code: "+e)}}}function et(e){return e.constructor.name==="AsyncFunction"}function Rn(e,t){return f.ref(e.value)}function On(e,t,n){const{bind:r={},code:o,const:s=[]}=e,i=Object.values(r).map((u,a)=>s[a]===1?u:t.getVueRefObjectOrValue(u));if(et(new Function(o)))return yn(async()=>{const u=Object.fromEntries(Object.keys(r).map((a,h)=>[a,i[h]]));return await L(o,u)()},null,{lazy:!0});const c=Object.fromEntries(Object.keys(r).map((u,a)=>[u,i[a]])),l=L(o,c);return f.computed(l)}function bn(e,t,n){const{inputs:r=[],code:o,slient:s,data:i,asyncInit:c=null}=e,l=s||Array(r.length).fill(0),d=i||Array(r.length).fill(0),u=r.filter((y,v)=>l[v]===0&&d[v]===0).map(y=>t.getVueRefObject(y));function a(){return r.map((y,v)=>d[v]===1?y:t.getObjectToValue(y))}const h=L(o),p=f.shallowRef(null),m={immediate:!0,deep:!0};return et(h)?(p.value=c,f.watch(u,async()=>{p.value=await h(...a())},m)):f.watch(u,()=>{p.value=h(...a())},m),f.readonly(p)}function Sn(e,t){const{init:n}=e;return f.shallowRef(n??null)}function Pn(){return[]}const ae=se(Pn);function tt(e,t){const n=ae.getOrDefault(e.id),r=new Map;return n.push(r),t.replaceSnapshot({scopeSnapshot:nt()}),(e.vars||[]).forEach(o=>{r.set(o.id,Cn(o,t))}),(e.web_computed||[]).forEach(o=>{const{init:s}=o;r.set(o.id,f.ref(s))}),n.length-1}function nt(){const e=new Map;for(const[n,r]of ae){const o=r[r.length-1];e.set(n,[o])}function t(n){return rt(n,e)}return{getVueRef:t}}function kn(e){return rt(e,ae)}function rt(e,t){const n=t.get(e.sid);if(!n)throw new Error(`Scope ${e.sid} not found`);const o=n[n.length-1].get(e.id);if(!o)throw new Error(`Var ${e.id} not found in scope ${e.sid}`);return o}function Nn(e){ae.delete(e)}function ot(e,t){const n=ae.get(e);n&&n.splice(t,1)}function Cn(e,t,n){if(Y.isRef(e))return Rn(e);if(Y.isVueComputed(e))return On(e,t);if(Y.isJsComputed(e))return bn(e,t);if(Y.isWebComputed(e))return Sn(e);if(Y.isConstData(e))return e.value;throw new Error(`Invalid var config: ${e}`)}const me=se(()=>[]);function In(e){const t=f.shallowRef();me.getOrDefault(e.sid).push(t)}function jn(e){me.has(e)&&me.delete(e)}function st(){const e=new Map(Array.from(me.entries()).map(([n,r])=>[n,r[r.length-1]]));function t(n){return e.get(n.sid)}return{getRef:t}}const ge=se(()=>[]);function An(e){const t=ge.getOrDefault(e);return t.push(f.shallowRef({})),t.length-1}function Tn(e,t,n){ge.get(e)[t].value=n}function $n(e){ge.delete(e)}function xn(){const e=new Map;for(const[n,r]of ge){const o=r[r.length-1];e.set(n,o)}function t(n){return e.get(n.id).value[n.name]}return{getPropsValue:t}}function it(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function ve(e,t){return at(e,{valueFn:t})}function at(e,t){const{valueFn:n,keyFn:r}=t;return Object.fromEntries(Object.entries(e).map(([o,s])=>[r?r(o,s):o,n(s,o)]))}function ct(e,t,n){if(Array.isArray(t)){const[o,...s]=t;switch(o){case"!":return!e;case"+":return e+s[0];case"~+":return s[0]+e}}const r=ut(t,n);return e[r]}function ut(e,t){if(typeof e=="string"||typeof e=="number")return e;if(!Array.isArray(e))throw new Error(`Invalid path ${e}`);const[n,...r]=e;switch(n){case"bind":if(!t)throw new Error("No bindable function provided");return t(r[0]);default:throw new Error(`Invalid flag ${n} in array at ${e}`)}}function ce(e,t,n){return t.reduce((r,o)=>ct(r,o,n),e)}function Te(e,t,n,r){t.reduce((o,s,i)=>{if(i===t.length-1)o[ut(s,r)]=n;else return ct(o,s,r)},e)}const lt=new Map,$e=se(()=>new Map),ft=new Set,ht=Symbol("vfor");function Dn(e){const t=dt()??{};f.provide(ht,{...t,[e.fid]:e.key})}function dt(){return f.inject(ht,void 0)}function Mn(){const e=dt(),t=new Map;return e===void 0||Object.keys(e).forEach(n=>{t.set(n,e[n])}),t}function Fn(e,t,n,r){const o=H();if(r){ft.add(e);return}let s;if(n)s=new Kn(o,t);else{const i=Array.isArray(t)?t:Object.entries(t).map(([c,l],d)=>[l,c,d]);s=new Gn(i,o)}lt.set(e,s)}function Bn(e,t,n){const r=$e.getOrDefault(e);r.has(t)||r.set(t,f.ref(n)),r.get(t).value=n}function Wn(e){const t=new Set;function n(o){t.add(o)}function r(){const o=$e.get(e);o!==void 0&&o.forEach((s,i)=>{t.has(i)||o.delete(i)})}return{add:n,removeUnusedKeys:r}}function Ln(e){const t=e,n=Mn();function r(o){const s=n.get(o)??t;return $e.get(o).get(s).value}return{getVForIndex:r}}function Vn(e){return lt.get(e.binding.fid).createRefObjectWithPaths(e)}function Un(e){return ft.has(e)}class Gn{constructor(t,n){this.array=t,this.snapshot=n}createRefObjectWithPaths(t){const{binding:n}=t,{vforSnapshot:r}=t,{path:o=[]}=n,s=[...o],i=r.getVForIndex(n.fid);return s.unshift(i),f.customRef(()=>({get:()=>ce(this.array,s,this.snapshot.getObjectToValue),set:()=>{throw new Error("Cannot set value to a constant array")}}))}}class Kn{constructor(t,n){B(this,"_isDictSource");this.snapshot=t,this.binding=n}isDictSource(t){if(this._isDictSource===void 0){const n=f.toValue(t);this._isDictSource=n!==null&&!Array.isArray(n)}return this._isDictSource}createRefObjectWithPaths(t){const{binding:n}=t,{path:r=[]}=n,o=[...r],{vforSnapshot:s}=t,i=this.snapshot.getVueRefObject(this.binding),c=this.isDictSource(i),l=s.getVForIndex(n.fid),d=c&&o.length===0?[0]:[];return o.unshift(l,...d),f.customRef(()=>({get:()=>{const u=f.toValue(i),a=c?Object.entries(u).map(([h,p],m)=>[p,h,m]):u;try{return ce(f.toValue(a),o,this.snapshot.getObjectToValue)}catch{return}},set:u=>{const a=f.toValue(i);if(c){const h=Object.keys(a);if(l>=h.length)throw new Error("Cannot set value to a non-existent key");const p=h[l];Te(a,[p],u,this.snapshot.getObjectToValue);return}Te(a,o,u,this.snapshot.getObjectToValue)}}))}}function Hn(e,t,n=!1){return n&&(e=`$computed(${e})`,t={...t,$computed:f.computed}),L(e,t)}function pt(e,t,n){const{paths:r,getBindableValueFn:o}=t,{paths:s,getBindableValueFn:i}=t;return r===void 0||r.length===0?e:f.customRef(()=>({get(){try{return ce(f.toValue(e),r,o)}catch{return}},set(c){Te(f.toValue(e),s||r,c,i)}}))}function mt(e){return e==null}function qn(){return gt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function gt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const zn=typeof Proxy=="function",Jn="devtools-plugin:setup",Qn="plugin:settings:set";let ee,xe;function Yn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,xe=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,xe=globalThis.perf_hooks.performance):ee=!1),ee}function Xn(){return Yn()?xe.now():Date.now()}class Zn{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const c=t.settings[i];r[i]=c.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),c=JSON.parse(i);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Xn()}},n&&n.on(Qn,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(d=>{this.targetQueue.push({method:c,args:l,resolve:d})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _n(e,t){const n=e,r=gt(),o=qn(),s=zn&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Jn,e,t);else{const i=s?new Zn(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var P={};const G=typeof document<"u";function vt(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function er(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&vt(e.default)}const A=Object.assign;function De(e,t){const n={};for(const r in t){const o=t[r];n[r]=W(o)?o.map(e):e(o)}return n}const ue=()=>{},W=Array.isArray;function k(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const yt=/#/g,tr=/&/g,nr=/\//g,rr=/=/g,or=/\?/g,Et=/\+/g,sr=/%5B/g,ir=/%5D/g,wt=/%5E/g,ar=/%60/g,Rt=/%7B/g,cr=/%7C/g,Ot=/%7D/g,ur=/%20/g;function Me(e){return encodeURI(""+e).replace(cr,"|").replace(sr,"[").replace(ir,"]")}function lr(e){return Me(e).replace(Rt,"{").replace(Ot,"}").replace(wt,"^")}function Fe(e){return Me(e).replace(Et,"%2B").replace(ur,"+").replace(yt,"%23").replace(tr,"%26").replace(ar,"`").replace(Rt,"{").replace(Ot,"}").replace(wt,"^")}function fr(e){return Fe(e).replace(rr,"%3D")}function hr(e){return Me(e).replace(yt,"%23").replace(or,"%3F")}function dr(e){return e==null?"":hr(e).replace(nr,"%2F")}function te(e){try{return decodeURIComponent(""+e)}catch{P.NODE_ENV!=="production"&&k(`Error decoding "${e}". Using original value`)}return""+e}const pr=/\/$/,mr=e=>e.replace(pr,"");function Be(e,t,n="/"){let r,o={},s="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c<l&&c>=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,c>-1?c:t.length),o=e(s)),c>-1&&(r=r||t.slice(0,c),i=t.slice(c,t.length)),r=yr(r??t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:te(i)}}function gr(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function bt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function St(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&z(t.matched[r],n.matched[o])&&Pt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function z(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Pt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!vr(e[n],t[n]))return!1;return!0}function vr(e,t){return W(e)?kt(e,t):W(t)?kt(t,e):e===t}function kt(e,t){return W(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function yr(e,t){if(e.startsWith("/"))return e;if(P.NODE_ENV!=="production"&&!t.startsWith("/"))return k(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,c;for(i=0;i<r.length;i++)if(c=r[i],c!==".")if(c==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i).join("/")}const J={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ne;(function(e){e.pop="pop",e.push="push"})(ne||(ne={}));var X;(function(e){e.back="back",e.forward="forward",e.unknown=""})(X||(X={}));const We="";function Nt(e){if(!e)if(G){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),mr(e)}const Er=/^[^#]+#/;function Ct(e,t){return e.replace(Er,"#")+t}function wr(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const ye=()=>({left:window.scrollX,top:window.scrollY});function Rr(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#");if(P.NODE_ENV!=="production"&&typeof e.el=="string"&&(!r||!document.getElementById(e.el.slice(1))))try{const s=document.querySelector(e.el);if(r&&s){k(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{k(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o){P.NODE_ENV!=="production"&&k(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=wr(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function It(e,t){return(history.state?history.state.position-t:-1)+e}const Le=new Map;function Or(e,t){Le.set(e,t)}function br(e){const t=Le.get(e);return Le.delete(e),t}let Sr=()=>location.protocol+"//"+location.host;function jt(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let c=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(c);return l[0]!=="/"&&(l="/"+l),bt(l,"")}return bt(n,e)+r+o}function Pr(e,t,n,r){let o=[],s=[],i=null;const c=({state:h})=>{const p=jt(e,location),m=n.value,y=t.value;let v=0;if(h){if(n.value=p,t.value=h,i&&i===m){i=null;return}v=y?h.position-y.position:0}else r(p);o.forEach(E=>{E(n.value,m,{delta:v,type:ne.pop,direction:v?v>0?X.forward:X.back:X.unknown})})};function l(){i=n.value}function d(h){o.push(h);const p=()=>{const m=o.indexOf(h);m>-1&&o.splice(m,1)};return s.push(p),p}function u(){const{history:h}=window;h.state&&h.replaceState(A({},h.state,{scroll:ye()}),"")}function a(){for(const h of s)h();s=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:d,destroy:a}}function At(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?ye():null}}function kr(e){const{history:t,location:n}=window,r={value:jt(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,d,u){const a=e.indexOf("#"),h=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+l:Sr()+e+l;try{t[u?"replaceState":"pushState"](d,"",h),o.value=d}catch(p){P.NODE_ENV!=="production"?k("Error with push/replace State",p):console.error(p),n[u?"replace":"assign"](h)}}function i(l,d){const u=A({},t.state,At(o.value.back,l,o.value.forward,!0),d,{position:o.value.position});s(l,u,!0),r.value=l}function c(l,d){const u=A({},o.value,t.state,{forward:l,scroll:ye()});P.NODE_ENV!=="production"&&!t.state&&k(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
2
+
3
+ history.replaceState(history.state, '', url)
4
+
5
+ You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),s(u.current,u,!0);const a=A({},At(r.value,l,null),{position:u.position+1},d);s(l,a,!1),r.value=l}return{location:r,state:o,push:c,replace:i}}function Tt(e){e=Nt(e);const t=kr(e),n=Pr(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=A({location:"",base:e,go:r,createHref:Ct.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Nr(e=""){let t=[],n=[We],r=0;e=Nt(e);function o(c){r++,r!==n.length&&n.splice(r),n.push(c)}function s(c,l,{direction:d,delta:u}){const a={direction:d,delta:u,type:ne.pop};for(const h of t)h(c,l,a)}const i={location:We,state:{},base:e,createHref:Ct.bind(null,e),replace(c){n.splice(r--,1),o(c)},push(c,l){o(c)},listen(c){return t.push(c),()=>{const l=t.indexOf(c);l>-1&&t.splice(l,1)}},destroy(){t=[],n=[We],r=0},go(c,l=!0){const d=this.location,u=c<0?X.back:X.forward;r=Math.max(0,Math.min(r+c,n.length-1)),l&&s(this.location,d,{direction:u,delta:c})}};return Object.defineProperty(i,"location",{enumerable:!0,get:()=>n[r]}),i}function Cr(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),P.NODE_ENV!=="production"&&!e.endsWith("#/")&&!e.endsWith("#")&&k(`A hash base must end with a "#":
6
+ "${e}" should be "${e.replace(/#.*$/,"#")}".`),Tt(e)}function Ee(e){return typeof e=="string"||e&&typeof e=="object"}function $t(e){return typeof e=="string"||typeof e=="symbol"}const Ve=Symbol(P.NODE_ENV!=="production"?"navigation failure":"");var xt;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xt||(xt={}));const Ir={1({location:e,currentLocation:t}){return`No match for
7
+ ${JSON.stringify(e)}${t?`
8
+ while being at
9
+ `+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Ar(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function re(e,t){return P.NODE_ENV!=="production"?A(new Error(Ir[e](t)),{type:e,[Ve]:!0},t):A(new Error,{type:e,[Ve]:!0},t)}function K(e,t){return e instanceof Error&&Ve in e&&(t==null||!!(e.type&t))}const jr=["params","query","hash"];function Ar(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of jr)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Dt="[^/]+?",Tr={sensitive:!1,strict:!1,start:!0,end:!0},$r=/[.+*?^${}()[\]/\\]/g;function xr(e,t){const n=A({},Tr,t),r=[];let o=n.start?"^":"";const s=[];for(const d of e){const u=d.length?[]:[90];n.strict&&!d.length&&(o+="/");for(let a=0;a<d.length;a++){const h=d[a];let p=40+(n.sensitive?.25:0);if(h.type===0)a||(o+="/"),o+=h.value.replace($r,"\\$&"),p+=40;else if(h.type===1){const{value:m,repeatable:y,optional:v,regexp:E}=h;s.push({name:m,repeatable:y,optional:v});const O=E||Dt;if(O!==Dt){p+=10;try{new RegExp(`(${O})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${m}" (${O}): `+C.message)}}let S=y?`((?:${O})(?:/(?:${O}))*)`:`(${O})`;a||(S=v&&d.length<2?`(?:/${S})`:"/"+S),v&&(S+="?"),o+=S,p+=20,v&&(p+=-8),y&&(p+=-20),O===".*"&&(p+=-50)}u.push(p)}r.push(u)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,n.sensitive?"":"i");function c(d){const u=d.match(i),a={};if(!u)return null;for(let h=1;h<u.length;h++){const p=u[h]||"",m=s[h-1];a[m.name]=p&&m.repeatable?p.split("/"):p}return a}function l(d){let u="",a=!1;for(const h of e){(!a||!u.endsWith("/"))&&(u+="/"),a=!1;for(const p of h)if(p.type===0)u+=p.value;else if(p.type===1){const{value:m,repeatable:y,optional:v}=p,E=m in d?d[m]:"";if(W(E)&&!y)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const O=W(E)?E.join("/"):E;if(!O)if(v)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):a=!0);else throw new Error(`Missing required param "${m}"`);u+=O}}return u||"/"}return{re:i,score:r,keys:s,parse:c,stringify:l}}function Dr(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Mt(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const s=Dr(r[n],o[n]);if(s)return s;n++}if(Math.abs(o.length-r.length)===1){if(Ft(r))return 1;if(Ft(o))return-1}return o.length-r.length}function Ft(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Mr={type:0,value:""},Fr=/[a-zA-Z0-9_]/;function Br(e){if(!e)return[[]];if(e==="/")return[[Mr]];if(!e.startsWith("/"))throw new Error(P.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${d}": ${p}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let c=0,l,d="",u="";function a(){d&&(n===0?s.push({type:0,value:d}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:d,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function h(){d+=l}for(;c<e.length;){if(l=e[c++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(d&&a(),i()):l===":"?(a(),n=1):h();break;case 4:h(),n=r;break;case 1:l==="("?n=2:Fr.test(l)?h():(a(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:a(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${d}"`),a(),i(),o}function Wr(e,t,n){const r=xr(Br(e.path),n);if(P.NODE_ENV!=="production"){const s=new Set;for(const i of r.keys)s.has(i.name)&&k(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),s.add(i.name)}const o=A(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Lr(e,t){const n=[],r=new Map;t=Vt({strict:!1,end:!0,sensitive:!1},t);function o(a){return r.get(a)}function s(a,h,p){const m=!p,y=Wt(a);P.NODE_ENV!=="production"&&Kr(y,h),y.aliasOf=p&&p.record;const v=Vt(t,a),E=[y];if("alias"in a){const C=typeof a.alias=="string"?[a.alias]:a.alias;for(const $ of C)E.push(Wt(A({},y,{components:p?p.record.components:y.components,path:$,aliasOf:p?p.record:y})))}let O,S;for(const C of E){const{path:$}=C;if(h&&$[0]!=="/"){const M=h.record.path,V=M[M.length-1]==="/"?"":"/";C.path=h.record.path+($&&V+$)}if(P.NODE_ENV!=="production"&&C.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
10
+ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if(O=Wr(C,h,v),P.NODE_ENV!=="production"&&h&&$[0]==="/"&&qr(O,h),p?(p.alias.push(O),P.NODE_ENV!=="production"&&Gr(p,O)):(S=S||O,S!==O&&S.alias.push(O),m&&a.name&&!Lt(O)&&(P.NODE_ENV!=="production"&&Hr(a,h),i(a.name))),Ut(O)&&l(O),y.children){const M=y.children;for(let V=0;V<M.length;V++)s(M[V],O,p&&p.children[V])}p=p||O}return S?()=>{i(S)}:ue}function i(a){if($t(a)){const h=r.get(a);h&&(r.delete(a),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(a);h>-1&&(n.splice(h,1),a.record.name&&r.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function c(){return n}function l(a){const h=zr(a,n);n.splice(h,0,a),a.record.name&&!Lt(a)&&r.set(a.record.name,a)}function d(a,h){let p,m={},y,v;if("name"in a&&a.name){if(p=r.get(a.name),!p)throw re(1,{location:a});if(P.NODE_ENV!=="production"){const S=Object.keys(a.params||{}).filter(C=>!p.keys.find($=>$.name===C));S.length&&k(`Discarded invalid param(s) "${S.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}v=p.record.name,m=A(Bt(h.params,p.keys.filter(S=>!S.optional).concat(p.parent?p.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),a.params&&Bt(a.params,p.keys.map(S=>S.name))),y=p.stringify(m)}else if(a.path!=null)y=a.path,P.NODE_ENV!=="production"&&!y.startsWith("/")&&k(`The Matcher cannot resolve relative paths but received "${y}". Unless you directly called \`matcher.resolve("${y}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),p=n.find(S=>S.re.test(y)),p&&(m=p.parse(y),v=p.record.name);else{if(p=h.name?r.get(h.name):n.find(S=>S.re.test(h.path)),!p)throw re(1,{location:a,currentLocation:h});v=p.record.name,m=A({},h.params,a.params),y=p.stringify(m)}const E=[];let O=p;for(;O;)E.unshift(O.record),O=O.parent;return{name:v,path:y,params:m,matched:E,meta:Ur(E)}}e.forEach(a=>s(a));function u(){n.length=0,r.clear()}return{addRoute:s,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:c,getRecordMatcher:o}}function Bt(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Wt(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Vr(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Vr(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Lt(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ur(e){return e.reduce((t,n)=>A(t,n.meta),{})}function Vt(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Ue(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Gr(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Ue.bind(null,n)))return k(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(Ue.bind(null,n)))return k(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Kr(e,t){t&&t.record.name&&!e.name&&!e.path&&k(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Hr(e,t){for(let n=t;n;n=n.parent)if(n.record.name===e.name)throw new Error(`A route named "${String(e.name)}" has been added as a ${t===n?"child":"descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`)}function qr(e,t){for(const n of t.keys)if(!e.keys.find(Ue.bind(null,n)))return k(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function zr(e,t){let n=0,r=t.length;for(;n!==r;){const s=n+r>>1;Mt(e,t[s])<0?r=s:n=s+1}const o=Jr(e);return o&&(r=t.lastIndexOf(o,r-1),P.NODE_ENV!=="production"&&r<0&&k(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)),r}function Jr(e){let t=e;for(;t=t.parent;)if(Ut(t)&&Mt(e,t)===0)return t}function Ut({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Qr(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(Et," "),i=s.indexOf("="),c=te(i<0?s:s.slice(0,i)),l=i<0?null:te(s.slice(i+1));if(c in t){let d=t[c];W(d)||(d=t[c]=[d]),d.push(l)}else t[c]=l}return t}function Gt(e){let t="";for(let n in e){const r=e[n];if(n=fr(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(W(r)?r.map(s=>s&&Fe(s)):[r&&Fe(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Yr(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=W(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Xr=Symbol(P.NODE_ENV!=="production"?"router view location matched":""),Kt=Symbol(P.NODE_ENV!=="production"?"router view depth":""),we=Symbol(P.NODE_ENV!=="production"?"router":""),Ge=Symbol(P.NODE_ENV!=="production"?"route location":""),Ke=Symbol(P.NODE_ENV!=="production"?"router view location":"");function le(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Q(e,t,n,r,o,s=i=>i()){const i=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((c,l)=>{const d=h=>{h===!1?l(re(4,{from:n,to:t})):h instanceof Error?l(h):Ee(h)?l(re(2,{from:t,to:h})):(i&&r.enterCallbacks[o]===i&&typeof h=="function"&&i.push(h),c())},u=s(()=>e.call(r&&r.instances[o],t,n,P.NODE_ENV!=="production"?Zr(d,t,n):d));let a=Promise.resolve(u);if(e.length<3&&(a=a.then(d)),P.NODE_ENV!=="production"&&e.length>2){const h=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
11
+ ${e.toString()}
12
+ . If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof u=="object"&&"then"in u)a=a.then(p=>d._called?p:(k(h),Promise.reject(new Error("Invalid navigation guard"))));else if(u!==void 0&&!d._called){k(h),l(new Error("Invalid navigation guard"));return}}a.catch(h=>l(h))})}function Zr(e,t,n){let r=0;return function(){r++===1&&k(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,r===1&&e.apply(null,arguments)}}function He(e,t,n,r,o=s=>s()){const s=[];for(const i of e){P.NODE_ENV!=="production"&&!i.components&&!i.children.length&&k(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);for(const c in i.components){let l=i.components[c];if(P.NODE_ENV!=="production"){if(!l||typeof l!="object"&&typeof l!="function")throw k(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){k(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const d=l;l=()=>d}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__warnedDefineAsync=!0,k(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(vt(l)){const u=(l.__vccOpts||l)[t];u&&s.push(Q(u,n,r,i,c,o))}else{let d=l();P.NODE_ENV!=="production"&&!("catch"in d)&&(k(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),d=Promise.resolve(d)),s.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const a=er(u)?u.default:u;i.mods[c]=u,i.components[c]=a;const p=(a.__vccOpts||a)[t];return p&&Q(p,n,r,i,c,o)()}))}}}return s}function Ht(e){const t=f.inject(we),n=f.inject(Ge);let r=!1,o=null;const s=f.computed(()=>{const u=f.unref(e.to);return P.NODE_ENV!=="production"&&(!r||u!==o)&&(Ee(u)||(r?k(`Invalid value for prop "to" in useLink()
13
+ - to:`,u,`
14
+ - previous to:`,o,`
15
+ - props:`,e):k(`Invalid value for prop "to" in useLink()
16
+ - to:`,u,`
17
+ - props:`,e)),o=u,r=!0),t.resolve(u)}),i=f.computed(()=>{const{matched:u}=s.value,{length:a}=u,h=u[a-1],p=n.matched;if(!h||!p.length)return-1;const m=p.findIndex(z.bind(null,h));if(m>-1)return m;const y=qt(u[a-2]);return a>1&&qt(h)===y&&p[p.length-1].path!==y?p.findIndex(z.bind(null,u[a-2])):m}),c=f.computed(()=>i.value>-1&&no(n.params,s.value.params)),l=f.computed(()=>i.value>-1&&i.value===n.matched.length-1&&Pt(n.params,s.value.params));function d(u={}){if(to(u)){const a=t[f.unref(e.replace)?"replace":"push"](f.unref(e.to)).catch(ue);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}if(P.NODE_ENV!=="production"&&G){const u=f.getCurrentInstance();if(u){const a={route:s.value,isActive:c.value,isExactActive:l.value,error:null};u.__vrl_devtools=u.__vrl_devtools||[],u.__vrl_devtools.push(a),f.watchEffect(()=>{a.route=s.value,a.isActive=c.value,a.isExactActive=l.value,a.error=Ee(f.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:s,href:f.computed(()=>s.value.href),isActive:c,isExactActive:l,navigate:d}}function _r(e){return e.length===1?e[0]:e}const eo=f.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ht,setup(e,{slots:t}){const n=f.reactive(Ht(e)),{options:r}=f.inject(we),o=f.computed(()=>({[zt(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[zt(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_r(t.default(n));return e.custom?s:f.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}});function to(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function no(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!W(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function qt(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const zt=(e,t,n)=>e??t??n,ro=f.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){P.NODE_ENV!=="production"&&so();const r=f.inject(Ke),o=f.computed(()=>e.route||r.value),s=f.inject(Kt,0),i=f.computed(()=>{let d=f.unref(s);const{matched:u}=o.value;let a;for(;(a=u[d])&&!a.components;)d++;return d}),c=f.computed(()=>o.value.matched[i.value]);f.provide(Kt,f.computed(()=>i.value+1)),f.provide(Xr,c),f.provide(Ke,o);const l=f.ref();return f.watch(()=>[l.value,c.value,e.name],([d,u,a],[h,p,m])=>{u&&(u.instances[a]=d,p&&p!==u&&d&&d===h&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),d&&u&&(!p||!z(u,p)||!h)&&(u.enterCallbacks[a]||[]).forEach(y=>y(d))},{flush:"post"}),()=>{const d=o.value,u=e.name,a=c.value,h=a&&a.components[u];if(!h)return Jt(n.default,{Component:h,route:d});const p=a.props[u],m=p?p===!0?d.params:typeof p=="function"?p(d):p:null,y=E=>{E.component.isUnmounted&&(a.instances[u]=null)},v=f.h(h,A({},m,t,{onVnodeUnmounted:y,ref:l}));if(P.NODE_ENV!=="production"&&G&&v.ref){const E={depth:i.value,name:a.name,path:a.path,meta:a.meta};(W(v.ref)?v.ref.map(S=>S.i):[v.ref.i]).forEach(S=>{S.__vrv_devtools=E})}return Jt(n.default,{Component:v,route:d})||v}}});function Jt(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const oo=ro;function so(){const e=f.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const r=t==="KeepAlive"?"keep-alive":"transition";k(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
18
+ Use slot props instead:
19
+
20
+ <router-view v-slot="{ Component }">
21
+ <${r}>
22
+ <component :is="Component" />
23
+ </${r}>
24
+ </router-view>`)}}function fe(e,t){const n=A({},e,{matched:e.matched.map(r=>vo(r,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Re(e){return{_custom:{display:e}}}let io=0;function ao(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const r=io++;_n({id:"org.vuejs.router"+(r?"."+r:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},o=>{typeof o.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),o.on.inspectComponent((u,a)=>{u.instanceData&&u.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:fe(t.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:u,componentInstance:a})=>{if(a.__vrv_devtools){const h=a.__vrv_devtools;u.tags.push({label:(h.name?`${h.name.toString()}: `:"")+h.path,textColor:0,tooltip:"This component is rendered by &lt;router-view&gt;",backgroundColor:Qt})}W(a.__vrl_devtools)&&(a.__devtoolsApi=o,a.__vrl_devtools.forEach(h=>{let p=h.route.path,m=Zt,y="",v=0;h.error?(p=h.error,m=ho,v=po):h.isExactActive?(m=Xt,y="This is exactly active"):h.isActive&&(m=Yt,y="This link is active"),u.tags.push({label:p,textColor:v,tooltip:y,backgroundColor:m})}))}),f.watch(t.currentRoute,()=>{l(),o.notifyComponentUpdate(),o.sendInspectorTree(c),o.sendInspectorState(c)});const s="router:navigations:"+r;o.addTimelineLayer({id:s,label:`Router${r?" "+r:""} Navigations`,color:4237508}),t.onError((u,a)=>{o.addTimelineEvent({layerId:s,event:{title:"Error during Navigation",subtitle:a.fullPath,logType:"error",time:o.now(),data:{error:u},groupId:a.meta.__navigationId}})});let i=0;t.beforeEach((u,a)=>{const h={guard:Re("beforeEach"),from:fe(a,"Current Location during this navigation"),to:fe(u,"Target location")};Object.defineProperty(u.meta,"__navigationId",{value:i++}),o.addTimelineEvent({layerId:s,event:{time:o.now(),title:"Start of navigation",subtitle:u.fullPath,data:h,groupId:u.meta.__navigationId}})}),t.afterEach((u,a,h)=>{const p={guard:Re("afterEach")};h?(p.failure={_custom:{type:Error,readOnly:!0,display:h?h.message:"",tooltip:"Navigation Failure",value:h}},p.status=Re("❌")):p.status=Re("✅"),p.from=fe(a,"Current Location during this navigation"),p.to=fe(u,"Target location"),o.addTimelineEvent({layerId:s,event:{title:"End of navigation",subtitle:u.fullPath,time:o.now(),data:p,logType:h?"warning":"default",groupId:u.meta.__navigationId}})});const c="router-inspector:"+r;o.addInspector({id:c,label:"Routes"+(r?" "+r:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!d)return;const u=d;let a=n.getRoutes().filter(h=>!h.parent||!h.parent.record.components);a.forEach(tn),u.filter&&(a=a.filter(h=>qe(h,u.filter.toLowerCase()))),a.forEach(h=>en(h,t.currentRoute.value)),u.rootNodes=a.map(_t)}let d;o.on.getInspectorTree(u=>{d=u,u.app===e&&u.inspectorId===c&&l()}),o.on.getInspectorState(u=>{if(u.app===e&&u.inspectorId===c){const h=n.getRoutes().find(p=>p.record.__vd_id===u.nodeId);h&&(u.state={options:uo(h)})}}),o.sendInspectorTree(c),o.sendInspectorState(c)})}function co(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function uo(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(r=>`${r.name}${co(r)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(r=>r.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(r=>r.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const Qt=15485081,Yt=2450411,Xt=8702998,lo=2282478,Zt=16486972,fo=6710886,ho=16704226,po=12131356;function _t(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:lo}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Zt}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:Qt}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Xt}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Yt}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:fo});let r=n.__vd_id;return r==null&&(r=String(mo++),n.__vd_id=r),{id:r,label:n.path,tags:t,children:e.children.map(_t)}}let mo=0;const go=/^\/(.*)\/([a-z]*)$/;function en(e,t){const n=t.matched.length&&z(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(r=>z(r,e.record))),e.children.forEach(r=>en(r,t))}function tn(e){e.__vd_match=!1,e.children.forEach(tn)}function qe(e,t){const n=String(e.re).match(go);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(i=>qe(i,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),s=te(o);return!t.startsWith("/")&&(s.includes(t)||o.includes(t))||s.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(i=>qe(i,t))}function vo(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function yo(e){const t=Lr(e.routes,e),n=e.parseQuery||Qr,r=e.stringifyQuery||Gt,o=e.history;if(P.NODE_ENV!=="production"&&!o)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const s=le(),i=le(),c=le(),l=f.shallowRef(J);let d=J;G&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=De.bind(null,g=>""+g),a=De.bind(null,dr),h=De.bind(null,te);function p(g,R){let w,b;return $t(g)?(w=t.getRecordMatcher(g),P.NODE_ENV!=="production"&&!w&&k(`Parent route "${String(g)}" not found when adding child route`,R),b=R):b=g,t.addRoute(b,w)}function m(g){const R=t.getRecordMatcher(g);R?t.removeRoute(R):P.NODE_ENV!=="production"&&k(`Cannot remove non-existent route "${String(g)}"`)}function y(){return t.getRoutes().map(g=>g.record)}function v(g){return!!t.getRecordMatcher(g)}function E(g,R){if(R=A({},R||l.value),typeof g=="string"){const N=Be(n,g,R.path),x=t.resolve({path:N.path},R),Z=o.createHref(N.fullPath);return P.NODE_ENV!=="production"&&(Z.startsWith("//")?k(`Location "${g}" resolved to "${Z}". A resolved location cannot start with multiple slashes.`):x.matched.length||k(`No match found for location with path "${g}"`)),A(N,x,{params:h(x.params),hash:te(N.hash),redirectedFrom:void 0,href:Z})}if(P.NODE_ENV!=="production"&&!Ee(g))return k(`router.resolve() was passed an invalid location. This will fail in production.
25
+ - Location:`,g),E({});let w;if(g.path!=null)P.NODE_ENV!=="production"&&"params"in g&&!("name"in g)&&Object.keys(g.params).length&&k(`Path "${g.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),w=A({},g,{path:Be(n,g.path,R.path).path});else{const N=A({},g.params);for(const x in N)N[x]==null&&delete N[x];w=A({},g,{params:a(N)}),R.params=a(R.params)}const b=t.resolve(w,R),T=g.hash||"";P.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&k(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),b.params=u(h(b.params));const D=gr(r,A({},g,{hash:lr(T),path:b.path})),I=o.createHref(D);return P.NODE_ENV!=="production"&&(I.startsWith("//")?k(`Location "${g}" resolved to "${I}". A resolved location cannot start with multiple slashes.`):b.matched.length||k(`No match found for location with path "${g.path!=null?g.path:g}"`)),A({fullPath:D,hash:T,query:r===Gt?Yr(g.query):g.query||{}},b,{redirectedFrom:void 0,href:I})}function O(g){return typeof g=="string"?Be(n,g,l.value.path):A({},g)}function S(g,R){if(d!==g)return re(8,{from:R,to:g})}function C(g){return V(g)}function $(g){return C(A(O(g),{replace:!0}))}function M(g){const R=g.matched[g.matched.length-1];if(R&&R.redirect){const{redirect:w}=R;let b=typeof w=="function"?w(g):w;if(typeof b=="string"&&(b=b.includes("?")||b.includes("#")?b=O(b):{path:b},b.params={}),P.NODE_ENV!=="production"&&b.path==null&&!("name"in b))throw k(`Invalid redirect found:
26
+ ${JSON.stringify(b,null,2)}
27
+ when navigating to "${g.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return A({query:g.query,hash:g.hash,params:b.path!=null?{}:g.params},b)}}function V(g,R){const w=d=E(g),b=l.value,T=g.state,D=g.force,I=g.replace===!0,N=M(w);if(N)return V(A(O(N),{state:typeof N=="object"?A({},T,N.state):T,force:D,replace:I}),R||w);const x=w;x.redirectedFrom=R;let Z;return!D&&St(r,b,w)&&(Z=re(16,{to:x,from:b}),dn(b,b,!0,!1)),(Z?Promise.resolve(Z):un(x,b)).catch(F=>K(F)?K(F,2)?F:Ye(F):Qe(F,x,b)).then(F=>{if(F){if(K(F,2))return P.NODE_ENV!=="production"&&St(r,E(F.to),x)&&R&&(R._count=R._count?R._count+1:1)>30?(k(`Detected a possibly infinite redirection in a navigation guard when going from "${b.fullPath}" to "${x.fullPath}". Aborting to avoid a Stack Overflow.
28
+ Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):V(A({replace:I},O(F.to),{state:typeof F.to=="object"?A({},T,F.to.state):T,force:D}),R||x)}else F=fn(x,b,!0,I,T);return ln(x,b,F),F})}function Os(g,R){const w=S(g,R);return w?Promise.reject(w):Promise.resolve()}function ze(g){const R=Se.values().next().value;return R&&typeof R.runWithContext=="function"?R.runWithContext(g):g()}function un(g,R){let w;const[b,T,D]=Eo(g,R);w=He(b.reverse(),"beforeRouteLeave",g,R);for(const N of b)N.leaveGuards.forEach(x=>{w.push(Q(x,g,R))});const I=Os.bind(null,g,R);return w.push(I),oe(w).then(()=>{w=[];for(const N of s.list())w.push(Q(N,g,R));return w.push(I),oe(w)}).then(()=>{w=He(T,"beforeRouteUpdate",g,R);for(const N of T)N.updateGuards.forEach(x=>{w.push(Q(x,g,R))});return w.push(I),oe(w)}).then(()=>{w=[];for(const N of D)if(N.beforeEnter)if(W(N.beforeEnter))for(const x of N.beforeEnter)w.push(Q(x,g,R));else w.push(Q(N.beforeEnter,g,R));return w.push(I),oe(w)}).then(()=>(g.matched.forEach(N=>N.enterCallbacks={}),w=He(D,"beforeRouteEnter",g,R,ze),w.push(I),oe(w))).then(()=>{w=[];for(const N of i.list())w.push(Q(N,g,R));return w.push(I),oe(w)}).catch(N=>K(N,8)?N:Promise.reject(N))}function ln(g,R,w){c.list().forEach(b=>ze(()=>b(g,R,w)))}function fn(g,R,w,b,T){const D=S(g,R);if(D)return D;const I=R===J,N=G?history.state:{};w&&(b||I?o.replace(g.fullPath,A({scroll:I&&N&&N.scroll},T)):o.push(g.fullPath,T)),l.value=g,dn(g,R,w,I),Ye()}let pe;function bs(){pe||(pe=o.listen((g,R,w)=>{if(!pn.listening)return;const b=E(g),T=M(b);if(T){V(A(T,{replace:!0,force:!0}),b).catch(ue);return}d=b;const D=l.value;G&&Or(It(D.fullPath,w.delta),ye()),un(b,D).catch(I=>K(I,12)?I:K(I,2)?(V(A(O(I.to),{force:!0}),b).then(N=>{K(N,20)&&!w.delta&&w.type===ne.pop&&o.go(-1,!1)}).catch(ue),Promise.reject()):(w.delta&&o.go(-w.delta,!1),Qe(I,b,D))).then(I=>{I=I||fn(b,D,!1),I&&(w.delta&&!K(I,8)?o.go(-w.delta,!1):w.type===ne.pop&&K(I,20)&&o.go(-1,!1)),ln(b,D,I)}).catch(ue)}))}let Je=le(),hn=le(),be;function Qe(g,R,w){Ye(g);const b=hn.list();return b.length?b.forEach(T=>T(g,R,w)):(P.NODE_ENV!=="production"&&k("uncaught error during route navigation:"),console.error(g)),Promise.reject(g)}function Ss(){return be&&l.value!==J?Promise.resolve():new Promise((g,R)=>{Je.add([g,R])})}function Ye(g){return be||(be=!g,bs(),Je.list().forEach(([R,w])=>g?w(g):R()),Je.reset()),g}function dn(g,R,w,b){const{scrollBehavior:T}=e;if(!G||!T)return Promise.resolve();const D=!w&&br(It(g.fullPath,0))||(b||!w)&&history.state&&history.state.scroll||null;return f.nextTick().then(()=>T(g,R,D)).then(I=>I&&Rr(I)).catch(I=>Qe(I,g,R))}const Xe=g=>o.go(g);let Ze;const Se=new Set,pn={currentRoute:l,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:y,resolve:E,options:e,push:C,replace:$,go:Xe,back:()=>Xe(-1),forward:()=>Xe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:c.add,onError:hn.add,isReady:Ss,install(g){const R=this;g.component("RouterLink",eo),g.component("RouterView",oo),g.config.globalProperties.$router=R,Object.defineProperty(g.config.globalProperties,"$route",{enumerable:!0,get:()=>f.unref(l)}),G&&!Ze&&l.value===J&&(Ze=!0,C(o.location).catch(T=>{P.NODE_ENV!=="production"&&k("Unexpected error when starting the router:",T)}));const w={};for(const T in J)Object.defineProperty(w,T,{get:()=>l.value[T],enumerable:!0});g.provide(we,R),g.provide(Ge,f.shallowReactive(w)),g.provide(Ke,l);const b=g.unmount;Se.add(g),g.unmount=function(){Se.delete(g),Se.size<1&&(d=J,pe&&pe(),pe=null,l.value=J,Ze=!1,be=!1),b()},P.NODE_ENV!=="production"&&G&&ao(g,R,t)}};function oe(g){return g.reduce((R,w)=>R.then(()=>ze(w)),Promise.resolve())}return pn}function Eo(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const c=t.matched[i];c&&(e.matched.find(d=>z(d,c))?r.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(d=>z(d,l))||o.push(l))}return[n,r,o]}function wo(){return f.inject(we)}function Ro(e){return f.inject(Ge)}function H(e){let t=nt(),n=xn(),r=Ln(e),o=st(),s=wo(),i=Ro();function c(m){m.scopeSnapshot&&(t=m.scopeSnapshot),m.slotSnapshot&&(n=m.slotSnapshot),m.vforSnapshot&&(r=m.vforSnapshot),m.elementRefSnapshot&&(o=m.elementRefSnapshot),m.routerSnapshot&&(s=m.routerSnapshot)}function l(m){if(j.isVar(m))return f.toValue(d(m));if(j.isVForItem(m))return Un(m.fid)?r.getVForIndex(m.fid):f.toValue(d(m));if(j.isVForIndex(m))return r.getVForIndex(m.fid);if(j.isJs(m)){const{code:y,bind:v}=m,E=ve(v,O=>u(O));return Hn(y,E)()}if(j.isSlotProp(m))return n.getPropsValue(m);if(j.isRouterParams(m))return f.toValue(d(m));throw new Error(`Invalid binding: ${m}`)}function d(m){if(j.isVar(m)){const y=t.getVueRef(m)||kn(m);return pt(y,{paths:m.path,getBindableValueFn:l})}if(j.isVForItem(m))return Vn({binding:m,vforSnapshot:r});if(j.isVForIndex(m))return()=>l(m);if(j.isRouterParams(m)){const{prop:y="params"}=m;return pt(()=>i[y],{paths:m.path,getBindableValueFn:l})}throw new Error(`Invalid binding: ${m}`)}function u(m){if(j.isVar(m)||j.isVForItem(m))return d(m);if(j.isVForIndex(m))return l(m);if(j.isJs(m))return null;if(j.isRouterParams(m))return d(m);throw new Error(`Invalid binding: ${m}`)}function a(m){if(j.isVar(m))return{sid:m.sid,id:m.id};if(j.isVForItem(m))return{type:"vf",fid:m.fid};if(j.isVForIndex(m))return{type:"vf-i",fid:m.fid,value:null};if(j.isJs(m))return null}function h(m){var y,v;(y=m.vars)==null||y.forEach(E=>{d({type:"ref",...E}).value=E.val}),(v=m.ele_refs)==null||v.forEach(E=>{o.getRef({sid:E.sid,id:E.id}).value[E.method](...E.args)})}function p(m,y){if(mt(y)||mt(m.values))return;y=y;const v=m.values,E=m.skips||new Array(y.length).fill(0);y.forEach((O,S)=>{if(E[S]===1)return;if(j.isVar(O)){const $=d(O);$.value=v[S];return}if(j.isRouterAction(O)){const $=v[S],M=s[$.fn];M(...$.args);return}if(j.isElementRef(O)){const $=o.getRef(O).value,M=v[S];$[M.method](...M.args);return}if(j.isJsOutput(O)){const $=v[S],M=L($);typeof M=="function"&&M();return}const C=d(O);C.value=v[S]})}return{getObjectToValue:l,getVueRefObject:d,getVueRefObjectOrValue:u,getBindingServerInfo:a,updateRefFromServer:h,updateEventRefFromServer:p,replaceSnapshot:c}}function Oo(e,t,n){return new bo(e,t,n)}class bo{constructor(t,n,r){B(this,"taskQueue",[]);B(this,"id2TaskMap",new Map);B(this,"input2TaskIdMap",se(()=>[]));this.snapshots=r;const o=[],s=i=>{var l;const c=new So(i,r);return this.id2TaskMap.set(c.id,c),(l=i.inputs)==null||l.forEach(d=>{const u=`${d.sid}-${d.id}`;this.input2TaskIdMap.getOrDefault(u).push(c.id)}),c};t==null||t.forEach(i=>{const c=s(i);o.push(c)}),n==null||n.forEach(i=>{const c={type:"ref",sid:i.sid,id:i.id},l={...i,immediate:!0,outputs:[c,...i.outputs||[]]},d=s(l);o.push(d)}),o.forEach(i=>{const{deep:c=!0,once:l,flush:d,immediate:u=!0}=i.watchConfig,a={immediate:u,deep:c,once:l,flush:d},h=this._getWatchTargets(i);f.watch(h,([p])=>{i.modify=!0,this.taskQueue.push(new Po(i)),this._scheduleNextTick()},a)})}_getWatchTargets(t){if(!t.watchConfig.inputs)return[];const n=t.slientInputs;return t.watchConfig.inputs.filter((o,s)=>(j.isVar(o)||j.isVForItem(o)||j.isRouterParams(o))&&!n[s]).map(o=>this.snapshots.getVueRefObjectOrValue(o))}_scheduleNextTick(){f.nextTick(()=>this._runAllTasks())}_runAllTasks(){const t=this.taskQueue.slice();this.taskQueue.length=0,this._setTaskNodeRelations(t),t.forEach(n=>{n.run()})}_setTaskNodeRelations(t){t.forEach(n=>{const r=this._findNextNodes(n,t);n.appendNextNodes(...r),r.forEach(o=>{o.appendPrevNodes(n)})})}_findNextNodes(t,n){const r=t.watchTask.watchConfig.outputs;if(r&&r.length<=0)return[];const o=this._getCalculatorTasksByOutput(t.watchTask.watchConfig.outputs);return n.filter(s=>o.has(s.watchTask.id)&&s.watchTask.id!==t.watchTask.id)}_getCalculatorTasksByOutput(t){const n=new Set;return t==null||t.forEach(r=>{const o=`${r.sid}-${r.id}`;(this.input2TaskIdMap.get(o)||[]).forEach(i=>n.add(i))}),n}}class So{constructor(t,n){B(this,"modify",!0);B(this,"_running",!1);B(this,"id");B(this,"_runningPromise",null);B(this,"_runningPromiseResolve",null);B(this,"_inputInfos");this.watchConfig=t,this.snapshot=n,this.id=Symbol(t.debug),this._inputInfos=this.createInputInfos()}createInputInfos(){const{inputs:t=[]}=this.watchConfig,n=this.watchConfig.data||new Array(t.length).fill(0),r=this.watchConfig.slient||new Array(t.length).fill(0);return{const_data:n,slients:r}}get slientInputs(){return this._inputInfos.slients}getServerInputs(){const{const_data:t}=this._inputInfos;return this.watchConfig.inputs?this.watchConfig.inputs.map((n,r)=>t[r]===0?this.snapshot.getObjectToValue(n):n):[]}get running(){return this._running}get runningPromise(){return this._runningPromise}setRunning(){this._running=!0,this._runningPromise=new Promise(t=>{this._runningPromiseResolve=t}),this._trySetRunningRef(!0)}taskDone(){this._running=!1,this._runningPromiseResolve&&(this._runningPromiseResolve(),this._runningPromiseResolve=null),this._trySetRunningRef(!1)}_trySetRunningRef(t){if(this.watchConfig.running){const n=this.snapshot.getVueRefObject(this.watchConfig.running);n.value=t}}}class Po{constructor(t){B(this,"prevNodes",[]);B(this,"nextNodes",[]);B(this,"_runningPrev",!1);this.watchTask=t}appendPrevNodes(...t){this.prevNodes.push(...t)}appendNextNodes(...t){this.nextNodes.push(...t)}hasNextNodes(){return this.nextNodes.length>0}async run(){if(this.prevNodes.length>0&&!this._runningPrev)try{this._runningPrev=!0,await Promise.all(this.prevNodes.map(t=>t.run()))}finally{this._runningPrev=!1}if(this.watchTask.running){await this.watchTask.runningPromise;return}if(this.watchTask.modify){this.watchTask.modify=!1,this.watchTask.setRunning();try{await ko(this.watchTask)}finally{this.watchTask.taskDone()}}}}async function ko(e){const{outputs:t,url:n,key:r}=e.watchConfig,o=e.snapshot,s=e.getServerInputs(),i={key:r,input:s,page:Ne()},c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!t)return;const l=await c.json();o.updateEventRefFromServer(l,t)}class No{constructor(t){B(this,"varMap",new Map)}collectVar(t){this.varMap.set(`${t.sid}-${t.id}`,t)}getRef(t){return this.varMap.get(`${t.sid}-${t.id}`)}getWebComputed(t){return this.varMap.get(`${t.sid}-${t.id}`)}getJsComputed(t){return this.varMap.get(`${t.sid}-${t.id}`)}}let nn;function Co(e){nn=new No(e)}function Io(){return nn}function jo(e,t){const{on:n,code:r,immediate:o,deep:s,once:i,flush:c,bind:l={}}=e,d=ve(l,h=>t.getVueRefObject(h)),u=L(r,d),a=Array.isArray(n)?n.map(h=>t.getVueRefObject(h)):t.getVueRefObject(n);return f.watch(a,u,{immediate:o,deep:s,once:i,flush:c})}function Ao(e,t){const{inputs:n=[],outputs:r=[],slient:o,data:s,code:i,immediate:c=!0,deep:l,once:d,flush:u}=e,a=o||new Array(n.length).fill(0),h=s||new Array(n.length).fill(0),p=L(i),m=n.filter((E,O)=>a[O]===0&&h[O]===0).map(E=>t.getVueRefObject(E)),y=r.length>1;function v(){return n.map((E,O)=>h[O]===0?f.toRaw(f.toValue(t.getVueRefObject(E))):E)}f.watch(m,()=>{let E=p(...v());r.length!==0&&(y||(E=[E]),r.forEach((O,S)=>{const C=E[S];t.getVueRefObject(O).value=C}))},{immediate:c,deep:l,once:d,flush:u})}function To(e,t){return Object.assign({},...Object.entries(e??{}).map(([n,r])=>{const o=r.map(c=>{if(Ce.isWebEventHandler(c)){const l=$o(c.bind,t);return xo(c,l,t)}else return Do(c,t)}),i=L(" (...args)=> Promise.all(promises(...args))",{promises:(...c)=>o.map(async l=>{await l(...c)})});return{[n]:i}}))}function $o(e,t){return(...n)=>(e??[]).map(r=>{if(j.isEventContext(r)){if(r.path.startsWith(":")){const o=r.path.slice(1);return L(o)(...n)}return ce(n[0],r.path.split("."))}return j.IsBinding(r)?t.getObjectToValue(r):r})}function xo(e,t,n){const{url:r,hKey:o,key:s}=e,i=s!==void 0?{key:s}:{};async function c(...l){let d={};const u=t(...l),a=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bind:u,hKey:o,...i,page:Ne(),...d})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const h=await a.json();n.updateEventRefFromServer(h,e.set)}return c}function Do(e,t){const{code:n,inputs:r=[],set:o}=e,s=L(n);function i(...c){const l=(r??[]).map(u=>{if(j.isEventContext(u)){if(u.path.startsWith(":")){const a=u.path.slice(1);return L(a)(...c)}return ce(c[0],u.path.split("."))}return j.IsBinding(u)?t.getObjectToValue(u):u}),d=s(...l);if(o!==void 0){const a=o.length===1?[d]:d,h=a.map(p=>p===void 0?1:0);t.updateEventRefFromServer({values:a,skips:h},o)}}return i}function Mo(e,t){const n=[];(e.bStyle||[]).forEach(s=>{Array.isArray(s)?n.push(...s.map(i=>t.getObjectToValue(i))):n.push(ve(s,i=>t.getObjectToValue(i)))});const r=f.normalizeStyle([e.style||{},n]);return{hasStyle:r&&Object.keys(r).length>0,styles:r}}function Fo(e,t){const n=e.classes;if(!n)return null;if(typeof n=="string")return f.normalizeClass(n);const{str:r,map:o,bind:s}=n,i=[];return r&&i.push(r),o&&i.push(ve(o,c=>t.getObjectToValue(c))),s&&i.push(...s.map(c=>t.getObjectToValue(c))),f.normalizeClass(i)}function Bo(e,t){var r;const n={};return it(e.bProps||{},(o,s)=>{n[s]=Wo(t.getObjectToValue(o),s)}),(r=e.proxyProps)==null||r.forEach(o=>{const s=t.getObjectToValue(o);typeof s=="object"&&it(s,(i,c)=>{n[c]=i})}),{...e.props||{},...n}}function Wo(e,t){return t==="innerText"?f.toDisplayString(e):e}function Lo(e,{slots:t}){const{id:n,use:r}=e.propsInfo,o=An(n);return f.onUnmounted(()=>{$n(n)}),()=>{const s=e.propsValue;return Tn(n,o,Object.fromEntries(r.map(i=>[i,s[i]]))),f.h(f.Fragment,null,t.default())}}const Vo=f.defineComponent(Lo,{props:["propsInfo","propsValue"]});function Uo(e,t){if(!e.slots)return null;const n=e.slots??{};return Array.isArray(n)?t?he(n):()=>he(n):at(n,{keyFn:i=>i===":"?"default":i,valueFn:i=>{const{items:c}=i;return l=>{if(i.scope){const d=()=>i.props?rn(i.props,l,c):he(c);return f.h(de,{scope:i.scope},d)}return i.props?rn(i.props,l,c):he(c)}}})}function rn(e,t,n){return f.h(Vo,{propsInfo:e,propsValue:t},()=>he(n))}function he(e){const t=(e??[]).map(n=>f.h(q,{component:n}));return t.length<=0?null:t}function Go(e,t){const n={},r=[];return(e||[]).forEach(o=>{const{sys:s,name:i,arg:c,value:l,mf:d}=o;if(i==="vmodel"){const u=t.getVueRefObject(l);if(n[`onUpdate:${c}`]=a=>{u.value=a},s===1){const a=d?Object.fromEntries(d.map(h=>[h,!0])):{};r.push([f.vModelDynamic,u.value,void 0,a])}else n[c]=u.value}else if(i==="vshow"){const u=t.getVueRefObject(l);r.push([f.vShow,u.value])}else console.warn(`Directive ${i} is not supported yet`)}),{newProps:n,directiveArray:r}}function Ko(e,t){const{eRef:n}=e;return n===void 0?{}:{ref:t.getRef(n)}}function Ho(e){const t=H(),n=st();return()=>{const{tag:r}=e.component,o=j.IsBinding(r)?t.getObjectToValue(r):r,s=f.resolveDynamicComponent(o),i=typeof s=="string",c=Fo(e.component,t),{styles:l,hasStyle:d}=Mo(e.component,t),u=To(e.component.events??{},t),a=Uo(e.component,i),h=Bo(e.component,t),{newProps:p,directiveArray:m}=Go(e.component.dir,t),y=Ko(e.component,n),v=f.normalizeProps({...h,...u,...p,...y})||{};d&&(v.style=l),c&&(v.class=c);const E=f.h(s,{...v},a);return m.length>0?f.withDirectives(E,m):E}}const q=f.defineComponent(Ho,{props:["component"]});function on(e,t){var n,r;if(e){e.vars&&e.vars.forEach(i=>{Io().collectVar(i)});const o=tt(e,H(t)),s=H(t);Oo(e.py_watch,e.web_computed,s),(n=e.vue_watch)==null||n.forEach(i=>jo(i,s)),(r=e.js_watch)==null||r.forEach(i=>Ao(i,s)),e.eRefs&&e.eRefs.forEach(i=>{In(i)}),f.onUnmounted(()=>{ot(e.id,o),jn(e.id)})}}function qo(e,{slots:t}){const{scope:n}=e;return on(n),()=>f.h(f.Fragment,null,t.default())}const de=f.defineComponent(qo,{props:["scope"]}),zo=f.defineComponent(e=>{const{scope:t,items:n,vforInfo:r}=e;return Dn(r),on(t,r.key),n.length===1?()=>f.h(q,{component:n[0]}):()=>n.map(s=>f.h(q,{component:s}))},{props:["scope","items","vforInfo"]});function Jo(e,t){const{state:n,isReady:r,isLoading:o}=En(async()=>{let s=e;const i=t;if(!s&&!i)throw new Error("Either config or configUrl must be provided");if(!s&&i&&(s=await(await fetch(i)).json()),!s)throw new Error("Failed to load config");return s},{});return{config:n,isReady:r,isLoading:o}}function Qo(e,t){let n;return t.component?n=`Error captured from component:tag: ${t.component.tag} ; id: ${t.component.id} `:n="Error captured from app init",console.group(n),console.error("Component:",t.component),console.error("Error:",e),console.groupEnd(),!1}const Yo={class:"app-box"},Xo={key:0,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}},Zo=((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})(f.defineComponent({__name:"App",props:{config:{},configUrl:{}},setup(e){const t=e,{config:n,isLoading:r}=Jo(t.config,t.configUrl);let o=null;return f.watch(n,s=>{o=s,s.url&&mn({version:s.version,queryPath:s.url.path,pathParams:s.url.params}),Co(s)}),f.onErrorCaptured(Qo),(s,i)=>(f.openBlock(),f.createElementBlock("div",Yo,[f.unref(r)?(f.openBlock(),f.createElementBlock("div",Xo,i[0]||(i[0]=[f.createElementVNode("p",{style:{margin:"auto"}},"Loading ...",-1)]))):(f.openBlock(),f.createElementBlock("div",{key:1,class:f.normalizeClass(["insta-main",f.unref(n).class])},[f.createVNode(f.unref(de),{scope:f.unref(o).scope},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(o).items,c=>(f.openBlock(),f.createBlock(f.unref(q),{component:c},null,8,["component"]))),256))]),_:1},8,["scope"])],2))]))}}),[["__scopeId","data-v-687dcc1a"]]);function _o(e){const{on:t,scope:n,items:r}=e,o=H();return()=>{const s=o.getObjectToValue(t),i=()=>s?r.map(c=>f.h(q,{component:c})):void 0;return f.h(de,{scope:n},i)}}const es=f.defineComponent(_o,{props:["on","scope","items"]});function ts(e){const{start:t=0,end:n,step:r=1}=e;let o=[];if(r>0)for(let s=t;s<n;s+=r)o.push(s);else for(let s=t;s>n;s+=r)o.push(s);return o}function ns(e){const{array:t,bArray:n,items:r,fkey:o,fid:s,scope:i,num:c,tsGroup:l={}}=e,d=t===void 0,u=c!==void 0,a=d?n:t,h=H();Fn(s,a,d,u);const m=as(o??"index");return f.onUnmounted(()=>{Nn(i.id)}),()=>{const y=os(u,d,a,h,c),v=Wn(s),E=y.map((O,S)=>{const C=m(O,S);return v.add(C),Bn(s,C,S),f.h(zo,{scope:e.scope,items:r,vforInfo:{fid:s,key:C},key:C})});return v.removeUnusedKeys(),l&&Object.keys(l).length>0?f.h(f.TransitionGroup,l,{default:()=>E}):E}}const rs=f.defineComponent(ns,{props:["array","items","fid","bArray","scope","num","fkey","tsGroup"]});function os(e,t,n,r,o){if(e){let i=0;return typeof o=="number"?i=o:i=r.getObjectToValue(o)??0,ts({end:Math.max(0,i)})}const s=t?r.getObjectToValue(n)||[]:n;return typeof s=="object"?Object.values(s):s}const ss=e=>e,is=(e,t)=>t;function as(e){const t=wn(e);return typeof t=="function"?t:e==="item"?ss:is}function cs(e){return e.map(n=>{if(n.tag){const s=n;return f.h(q,{component:s})}const r=f.resolveDynamicComponent(sn),o=n;return f.h(r,{scope:o})})}const sn=f.defineComponent(e=>{const t=e.scope;return()=>cs(t.items??[])},{props:["scope"]});function us(e){return e.map(t=>{if(t.tag){const o=t;return f.h(q,{component:o})}const n=f.resolveDynamicComponent(sn),r=t;return f.h(n,{scope:r})})}const ls=f.defineComponent(e=>{const{scope:t,on:n,items:r}=e,o=f.shallowRef(r),s=tt(t),i=H();return Oe.createDynamicWatchRefresh(n,i,async()=>{const{items:c,on:l}=await Oe.fetchRemote(e,i);return o.value=c,l}),f.onUnmounted(()=>{ot(t.id,s)}),()=>us(o.value)},{props:["sid","url","hKey","on","bind","items","scope"]});var Oe;(e=>{function t(r,o,s){let i=null,c=r,l=c.map(u=>o.getVueRefObject(u));function d(){i&&i(),i=f.watch(l,async()=>{c=await s(),l=c.map(u=>o.getVueRefObject(u)),d()},{deep:!0})}return d(),()=>{i&&i()}}e.createDynamicWatchRefresh=t;async function n(r,o){const s=Object.values(r.bind).map(u=>({sid:u.sid,id:u.id,value:o.getObjectToValue(u)})),i={sid:r.sid,bind:s,hKey:r.hKey,page:Ne()},c={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)},l=await fetch(r.url,c);if(!l.ok)throw new Error("Failed to fetch data");return await l.json()}e.fetchRemote=n})(Oe||(Oe={}));function fs(e){const{scope:t,items:n}=e;return()=>{const r=n.map(o=>f.h(q,{component:o}));return f.h(de,{scope:t},()=>r)}}const an=f.defineComponent(fs,{props:["scope","items"]});function hs(e){const{on:t,case:n,default:r}=e,o=H();return()=>{const s=o.getObjectToValue(t),i=n.map(c=>{const{value:l,items:d,scope:u}=c.props;if(s===l)return f.h(an,{scope:u,items:d,key:["case",l].join("-")})}).filter(c=>c);if(r&&!i.length){const{items:c,scope:l}=r.props;i.push(f.h(an,{scope:l,items:c,key:"default"}))}return f.h(f.Fragment,i)}}const ds=f.defineComponent(hs,{props:["case","on","default"]});function ps(e,{slots:t}){const{name:n="fade",tag:r}=e;return()=>f.h(f.TransitionGroup,{name:n,tag:r},{default:t.default})}const ms=f.defineComponent(ps,{props:["name","tag"]});function gs(e){const{content:t,r:n=0}=e,r=H(),o=n===1?()=>r.getObjectToValue(t):()=>t;return()=>f.toDisplayString(o())}const vs=f.defineComponent(gs,{props:["content","r"]});function ys(e){if(!e.router)throw new Error("Router config is not provided.");const{routes:t,kAlive:n=!1}=e.router;return t.map(o=>cn(o,n))}function cn(e,t){var l;const{server:n=!1,vueItem:r,scope:o}=e,s=()=>{if(n)throw new Error("Server-side rendering is not supported yet.");return Promise.resolve(Es(r,o,t))},i=(l=r.children)==null?void 0:l.map(d=>cn(d,t)),c={...r,children:i,component:s};return r.component.length===0&&delete c.component,i===void 0&&delete c.children,c}function Es(e,t,n){const{path:r,component:o}=e,s=f.h(de,{scope:t,key:r},()=>o.map(c=>f.h(q,{component:c})));return n?f.h(f.KeepAlive,null,()=>s):s}function ws(e,t){const{mode:n="hash"}=t.router,r=n==="hash"?Cr():n==="memory"?Nr():Tt();e.use(yo({history:r,routes:ys(t)}))}function Rs(e,t){e.component("insta-ui",Zo),e.component("vif",es),e.component("vfor",rs),e.component("match",ds),e.component("refresh",ls),e.component("ts-group",ms),e.component("content",vs),t.router&&ws(e,t)}return Rs}(Vue);
29
+ //# sourceMappingURL=insta-ui.iife.js.map
@@ -10,9 +10,9 @@
10
10
  left: 50%;
11
11
  transform: translateX(-50%);
12
12
  height: 75px;
13
- background-color: rgba(186, 230, 253, 0.8);
13
+ background-color: rgba(104, 184, 93, 0.8);
14
14
  border: 1px solid #dee2e6;
15
- box-shadow: 0 4px 6px rgba(186, 230, 253, 0.5);
15
+ box-shadow: 0 4px 6px rgba(104, 184, 93, 0.5);
16
16
  border-radius: 4px;
17
17
  color: #343a40;
18
18
  font-size: 16px;
@@ -7,25 +7,22 @@
7
7
  <head>
8
8
  <meta charset="UTF-8" />
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
- <link href="{{ favicon_url }}" rel="shortcut icon" />
11
- <title>{{ title }}</title>
10
+ <link href="{{ model.favicon_url }}" rel="shortcut icon" />
11
+ <title>{{ model.title }}</title>
12
12
 
13
- {% for link in css_links %}
14
- <link rel="stylesheet" href="{{ prefix | safe }}{{link}}" />
13
+ {%- for link in model.css_links %}
14
+ <link rel="stylesheet" href="{{ model.prefix | safe }}{{link}}" />
15
15
  {% endfor -%}
16
16
 
17
- {% for content in style_tags %}
17
+ {%- for content in model.style_tags %}
18
18
  <style>{{content}}</style>
19
19
  {% endfor -%}
20
20
 
21
- {{ sse_style(is_debug) }}
21
+ {{ sse_style(model.is_debug) }}
22
22
  </head>
23
23
 
24
24
  <body>
25
-
26
- <div id="loading"><insta-ui :config="config"></insta-ui></div>
27
-
28
- {{ sse_html(is_debug) }}
25
+ {{ sse_html(model.is_debug) }}
29
26
 
30
27
  <div id="app">
31
28
  <insta-ui :config="config"></insta-ui>
@@ -33,44 +30,19 @@
33
30
 
34
31
  <script type="importmap">
35
32
  {
36
- "imports":{{import_maps | safe}}
33
+ "imports":{{model.import_maps_string | safe}}
37
34
  }
38
35
  </script>
39
36
 
40
- {% for info in js_links %}
41
- <script src="{{ prefix | safe }}{{info.link}}" {{info.create_attrs_str()}}></script>
42
- {% endfor -%}
37
+ {%- for info in model.js_links -%}
38
+ <script src="{{ model.prefix | safe }}{{info.link}}"></script>
39
+ {%- endfor -%}
43
40
 
44
- {% for content in script_tags %}
41
+ {%- for content in model.script_tags -%}
45
42
  <script>{{content}}</script>
46
- {% endfor -%}
47
-
43
+ {%- endfor -%}
48
44
 
49
- {% if is_remote_config %}
50
- <script>
51
- async function queryConfig() {
52
-
53
- const url = `{{config_fetch_url | safe}}`;
54
- const pageInfo = {path:'{{query_path | safe}}',params:{{query_path_params | safe}},queryParams:{{query_params | safe}}};
55
- const response = await fetch(url,{
56
- method: 'POST',
57
- headers: {
58
- 'Content-Type': 'application/json'
59
- },
60
- body: JSON.stringify({key: '{{config_fetch_key | safe}}', page: pageInfo}),
61
- });
62
-
63
- if (!response.ok) {
64
- throw new Error(`HTTP error! status: ${response.status}`);
65
- }
66
-
67
- const data = await response.json();
68
- return data;
69
- }
70
- </script>
71
- {% endif %}
72
-
73
- {{ sse_script(is_debug) }}
45
+ {{ sse_script(model.is_debug) }}
74
46
 
75
47
  <script type="module">
76
48
  import { createApp } from 'vue'
@@ -79,40 +51,24 @@
79
51
  const False = false;
80
52
  const None = undefined;
81
53
 
82
- async function createVueApp(config, targetSelector) {
83
- const app = createApp({
84
- setup() {
85
- return {
86
- config
87
- }
88
- }
89
- })
90
-
91
- installInsta(app,config)
92
-
93
- {% for info in vue_app_use %}
94
- app.use(await import('{{info.name | safe }}'))
95
- {% endfor %}
96
-
97
- {% for info in vue_app_component %}
98
- app.component('{{info.name | safe}}',(await import('{{info.url | safe }}')).default)
99
- {% endfor %}
100
- app.mount(targetSelector)
101
- }
102
-
103
- {% if has_preload %}
104
- await createVueApp({{preload_json | safe}}, '#loading');
105
- {% endif %}
106
-
107
- {% if is_remote_config %}
108
- const appConfig = await queryConfig();
109
- {% else %}
110
- const appConfig = {{config_json | safe}};
111
- {% endif %}
112
-
113
- await createVueApp(appConfig, '#app');
114
- document.getElementById('loading').remove();
115
-
54
+ const appConfig = {{model.config_dict | safe}};
55
+
56
+ const app = createApp({
57
+ setup() {
58
+ return {
59
+ config:appConfig
60
+ }
61
+ }
62
+ })
63
+
64
+ installInsta(app, appConfig)
65
+ {% for info in model.vue_app_component -%}
66
+ app.component('{{info.name | safe}}',(await import('{{info.url | safe }}')).default)
67
+ {% endfor -%}
68
+ {% for plugin_url in model.vue_app_use -%}
69
+ app.use(await import('{{plugin_url | safe }}'))
70
+ {% endfor -%}
71
+ app.mount('#app')
116
72
  </script>
117
73
  </body>
118
74
  </html>