@devframes/plugin-code-server--assets 1.3.2 → 1.3.3

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.
@@ -1 +1 @@
1
- import{t as e}from"./index-BMYAbf4V.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge};
1
+ import{t as e}from"./index-CMSPcnRq.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge};
@@ -0,0 +1,3 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,T=te(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),re=/\B([A-Z])/g,E=te(e=>e.replace(re,`-$1`).toLowerCase()),D=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),ie=te(e=>e?`on${D(e)}`:``),O=(e,t)=>!Object.is(e,t),ae=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},k=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se,ce=()=>se||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function le(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?pe(r):le(r);if(i)for(let e in i)t[e]=i[e]}return t}if(g(e)||v(e))return e}var ue=/;(?![^(]*\))/g,de=/:([^]+)/,fe=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function pe(e){let t={};return e.replace(fe,e=>e.startsWith(`/*`)?``:e).split(ue).forEach(e=>{if(e){let n=e.split(de);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var me=e(`itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function he(e){return!!e||e===``}function ge(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=be(e[i],t[i],n);return r}function _e(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&be(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function ve(e,t,n){let r=f(e),i=f(t);if(r||i||(r=p(e),i=p(t),r||i))return r&&i?_e(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!be(e[r],t[r],n))return!1}return String(e)===String(t)}function ye(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function be(e,t,n){if(e===t)return!0;let r=m(e),i=m(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=_(e),i=_(t),r||i?e===t:(r=d(e),i=d(t),r||i?r&&i?ye(e,t,n,ge):!1:(r=v(e),i=v(t),r||i?!r||!i?!1:ye(e,t,n,ve):String(e)===String(t))))}var xe=e=>!!(e&&e.__v_isRef===!0),j=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?xe(e)?j(e.value):JSON.stringify(e,Se,2):String(e),Se=(e,t)=>xe(t)?Se(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ce(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ce(e))}:_(t)?Ce(t):v(t)&&!d(t)&&!C(t)?String(t):t,Ce=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,M,we=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&M&&(M.active?(this.parent=M,this.index=(M.scopes||(M.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=M;try{return M=this,e()}finally{M=t}}}on(){++this._on===1&&(this.prevScope=M,M=this)}off(){if(this._on>0&&--this._on===0){if(M===this)M=this.prevScope;else{let e=M;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Te(){return M}function Ee(e,t=!1){M&&(M.active?M.cleanups.push(e):e())}var N,De=new WeakSet,Oe=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,M&&(M.active?M.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,De.has(this)&&(De.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Me(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ge(this),Fe(this);let e=N,t=Ve;N=this,Ve=!0;try{return this.fn()}finally{Ie(this),N=e,Ve=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ze(e);this.deps=this.depsTail=void 0,Ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?De.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Le(this)&&this.run()}get dirty(){return Le(this)}},ke=0,Ae,je;function Me(e,t=!1){e.flags|=8,t?(e.next=je,je=e):(e.next=Ae,Ae=e)}function Ne(){ke++}function Pe(){if(--ke>0)return;if(je){let e=je;for(je=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ae;){let t=Ae;for(Ae=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Fe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ie(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),ze(r),Be(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Le(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Re(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Re(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ke)||(e.globalVersion=Ke,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Le(e))))return;e.flags|=2;let t=e.dep,n=N,r=Ve;N=e,Ve=!0;try{Fe(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{N=n,Ve=r,Ie(e),e.flags&=-3}}function ze(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ze(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Be(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ve=!0,He=[];function Ue(){He.push(Ve),Ve=!1}function We(){let e=He.pop();Ve=e===void 0||e}function Ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=N;N=void 0;try{t()}finally{N=e}}}var Ke=0,qe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Je=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!N||!Ve||N===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==N)t=this.activeLink=new qe(N,this),N.deps?(t.prevDep=N.depsTail,N.depsTail.nextDep=t,N.depsTail=t):N.deps=N.depsTail=t,Ye(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=N.depsTail,t.nextDep=void 0,N.depsTail.nextDep=t,N.depsTail=t,N.deps===t&&(N.deps=e)}return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Ne();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Pe()}}};function Ye(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ye(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Xe=new WeakMap,Ze=Symbol(``),Qe=Symbol(``),$e=Symbol(``);function P(e,t,n){if(Ve&&N){let t=Xe.get(e);t||Xe.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Je),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Xe.get(e);if(!o){Ke++;return}let s=e=>{e&&e.trigger()};if(Ne(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===$e||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get($e)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ze)),f(e)&&s(o.get(Qe)));break;case`delete`:i||(s(o.get(Ze)),f(e)&&s(o.get(Qe)));break;case`set`:f(e)&&s(o.get(Ze))}}Pe()}function tt(e){let t=F(e);return t===e||(P(t,`iterate`,$e),Vt(e))?t:Bt(e)?zt(e)?t.map(e=>Gt(Wt(e))):t.map(Gt):t.map(Wt)}function nt(e){return P(e=F(e),`iterate`,$e),e}function rt(e,t){return Bt(e)?Gt(zt(e)?Wt(t):t):Wt(t)}var it={__proto__:null,[Symbol.iterator](){return at(this,Symbol.iterator,e=>rt(this,e))},concat(...e){return tt(this).concat(...e.map(e=>d(e)?tt(e):e))},entries(){return at(this,`entries`,e=>(e[1]=rt(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>rt(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>rt(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>rt(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return tt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return tt(this).toReversed()},toSorted(e){return tt(this).toSorted(e)},toSpliced(...e){return tt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return at(this,`values`,e=>rt(this,e))}};function at(e,t,n){let r=nt(e),i=r[t],a=i.call(r);if(r!==e&&!Vt(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>ot(a.next(),n),i!==st[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>ot(a._next(),n)}return a}function ot(e,t){return e.done||(e.value=t(e.value)),e}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=nt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Wt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,rt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=nt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=rt(e,t)),n.call(this,t,rt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?rt(e,c):c}function ut(e,t,n){let r=F(e);P(r,`iterate`,$e);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function dt(e,t,n=[]){Ue(),Ne();let r=F(e)[t].apply(e,n);return Pe(),We(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=F(this);return P(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=it[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,I(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||P(e,`get`,t),i))return o;if(I(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=F(i),n=F(n)),!a&&I(i)&&!I(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,I(e)?e:r);return e===F(r)&&s&&(o?O(n,i)&&et(e,`set`,t,n,i):et(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&et(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return _(t)&&pt.has(t)||P(e,`has`,t),n}ownKeys(e){return P(e,`iterate`,d(e)?`length`:Ze),Reflect.ownKeys(e)}},_t=class extends ht{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},vt=new gt,yt=new _t,bt=new gt(!0),xt=e=>e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Gt:Wt;return!t&&P(a,`iterate`,l?Qe:Ze),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(O(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Gt:Wt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(F(t),`iterate`,Ze),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(O(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=F(a),s=t?xt:e?Gt:Wt;return!e&&P(o,`iterate`,Ze),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=F(this),r=St(n),i=F(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){t||Vt(n)||Bt(n)||(n=F(n));let r=F(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=F(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=F(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(u(n,i)&&i in r?n:r,i,a)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function Ut(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&k(e,`__v_skip`,!0),e}var Wt=e=>v(e)?Ft(e):e,Gt=e=>v(e)?Lt(e):e;function I(e){return e?e.__v_isRef===!0:!1}function Kt(e){return Jt(e,!1)}function qt(e){return Jt(e,!0)}function Jt(e,t){return I(e)?e:new Yt(e,t)}var Yt=class{constructor(e,t){this.dep=new Je,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:Wt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:F(e),O(e,t)&&(this._rawValue=e,this._value=n?e:Wt(e),this.dep.trigger())}};function L(e){return I(e)?e.value:e}var Xt={get:(e,t,n)=>t===`__v_raw`?e:L(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return I(i)&&!I(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Zt(e){return zt(e)?e:new Proxy(e,Xt)}var Qt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Je(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ke-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&N!==this)return Me(this,!0),!0}get value(){let e=this.dep.track();return Re(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function $t(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Qt(r,i,n)}var en={},tn=new WeakMap,nn=void 0;function rn(e,t=!1,n=nn){if(n){let t=tn.get(n);t||tn.set(n,t=[]),t.push(e)}}function an(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?on(e,1):on(e),m,g,_,v,y=!1,b=!1;if(I(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(I(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Ue();try{_()}finally{We()}}let t=nn;nn=m;try{return f?f(e,3,[v]):e(v)}finally{nn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>on(e(),t)}let x=Te(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{try{return e(...t)}finally{S()}}}let C=b?Array(e.length).fill(en):en,w=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>O(e,C[t])):O(t,C))){let e=nn;Ue();try{_&&_(),nn=m;let e=[t,C===en?void 0:b&&C[0]===en?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{nn=e,We()}}}else m.run()}};return u&&u(w),m=new Oe(g),m.scheduler=l?()=>l(w,!1):w,v=e=>rn(e,!1,m),_=m.onStop=()=>{let e=tn.get(m);if(e){if(f)f(e,4);else for(let t of e)t();tn.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function on(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,I(e))on(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)on(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{on(e,t,n)});else if(C(e)){for(let r in e)on(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&on(e[r],t,n)}return e}function sn(e,t,n,r){try{return r?e(...r):e()}catch(e){ln(e,t,n)}}function cn(e,t,n,r){if(h(e)){let i=sn(e,t,n,r);return i&&y(i)&&i.catch(e=>{ln(e,t,n,void 0,!0)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(cn(e[a],t,n,r));return i}}function ln(e,n,r,i=!0,a=!1){let o=n?n.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:c}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,o=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n&&!t.isUnmounted&&(!a||t.scope.active)){for(let t=0;t<n.length;t++)if(n[t](e,i,o)===!1)return}t=t.parent}if(s){Ue(),sn(s,null,10,[e,i,o]),We();return}}un(e,r,o,i,c)}function un(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var R=[],dn=-1,fn=[],pn=null,mn=0,hn=Promise.resolve(),gn=null;function _n(e){let t=gn||hn;return e?t.then(this?e.bind(this):e):t}function vn(e){let t=dn+1,n=R.length;for(;t<n;){let r=t+n>>>1,i=R[r],a=En(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function yn(e){if(!(e.flags&1)){let t=En(e),n=R[R.length-1];!n||!(e.flags&2)&&t>=En(n)?R.push(e):R.splice(vn(t),0,e),e.flags|=1,bn()}}function bn(){gn||=hn.then(Dn)}function xn(e){if(!d(e))pn&&e.id===-1?pn.splice(mn+1,0,e):e.flags&1||(fn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)fn.push(e[t]);bn()}function Sn(e,t,n,r=dn+1){for(;r<R.length;r++){let n=R[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;R.splice(r,1),r=e?r-1:dn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Cn(e,t,n=0){if(fn.length){let e=fn,r=0;if(t){e=[];for(let i=0;i<fn.length;i++){let a=fn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?fn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>En(e)-En(t));if(fn.length=r,pn){for(let e=0;e<i.length;e++)pn.push(i[e]);return}for(pn=i,mn=0;mn<pn.length;mn++){let e=pn[mn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}pn=null,mn=0}}var wn=!1;function Tn(e,t){if(wn){e();return}let n=t===void 0?void 0:new Set(fn);e(),wn=!0;try{Sn(void 0,t),Cn(void 0,n,t)}finally{wn=!1}}var En=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Dn(e){try{for(dn=0;dn<R.length;dn++){let e=R[dn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),sn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;dn<R.length;dn++){let e=R[dn];e&&(e.flags&=-2)}dn=-1,R.length=0,Cn(e),gn=null,(R.length||fn.length)&&Dn(e)}}var z=null,On=null;function kn(e){let t=z;return z=e,On=e&&e.type.__scopeId||null,t}function An(e,t=z,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Gi(-1);let i=kn(t),a=Hi.length,o;try{o=e(...n)}finally{for(let e=Hi.length;e>a;e--)Ui();kn(i),r._d&&Gi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function jn(e,n){if(z===null)return e;let r=Ea(z),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&on(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Mn(e,t,n,r){let i=e;if(r===`beforeMount`)e._mount=e;else if(r===`beforeUpdate`){let n=t&&t._mount;n&&(n._latest=e,e._mount=n)}else if(r===`mounted`){let t=e._latest;e._mount=e._latest=void 0,t&&(i=t,t._mount=void 0)}let a=i.dirs,o=t&&t.dirs;for(let c=0;c<a.length;c++){let l=a[c];o?l.oldValue=o[c].value:r===`mounted`&&l.oldValue!==void 0&&(l=s({},l,{oldValue:void 0}));let u=l.dir[r];u&&(Ue(),cn(u,n,8,[e.el,l,i,t]),We())}}function Nn(e,t){if(Y){let n=Y.provides,r=Y.parent&&Y.parent.provides;r===n&&(n=Y.provides=Object.create(r)),n[e]=t}}function Pn(e,t,n=!1){let r=fa();if(r||Jr){let i=Jr?Jr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}var Fn=Symbol.for(`v-scx`),In=()=>Pn(Fn);function Ln(e,t,n){return Rn(e,t,n)}function Rn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(va){if(c===`sync`){let e=In();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Y;u.call=(e,t,n)=>cn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{e.i=p,V(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():yn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=an(e,n,u);return va&&(f?f.push(h):d&&h()),h}function zn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Bn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=ha(this),s=Rn(i,a.bind(r),n);return o(),s}function Bn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Vn=Symbol(`_vte`),Hn=e=>e.__isTeleport,Un=Symbol(`_leaveCb`);function Wn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Bi){t=n;break}}return t}function Gn(e){if(!tr(e))return Hn(e.type)&&e.children?Wn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function Kn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Kn(Hn(n.type)&&Gn(n)||n,t)}else if(e.shapeFlag&128){let n=e.suspense;if(n){let e=n.isHydrating?n.pendingBranch:n.activeBranch;e&&Kn(e,t.clone(e))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===H&&d(e.children)){let n=ti(e.children,!1);n&&Kn(n,t)}}function qn(e){if(e.component)return qn(e.component.subTree);if(e.type===H){let t=d(e.children)&&ti(e.children,!1);return t?qn(t):void 0}if(e.type!==Bi)return e}function Jn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Yn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Xn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Zn=new WeakMap;function Qn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Qn(e,n&&(d(n)?n[t]:n),r,a,o));return}if(er(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Qn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?Ea(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=F(v),b=v===t?i:e=>!Xn(_,e)&&u(y,e),x=(e,t)=>!(t&&Xn(_,t));if(m!=null&&m!==p){if($n(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(I(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))sn(p,f,12,[l,_]);else{let t=g(p),n=I(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Zn.delete(e)};t.id=-1,Zn.set(e,t),V(t,r)}else $n(e),i()}}}function $n(e){let t=Zn.get(e);t&&(t.flags|=8,Zn.delete(e))}ce().requestIdleCallback,ce().cancelIdleCallback;var er=e=>!!e.type.__asyncLoader,tr=e=>e.type.__isKeepAlive;function nr(e,t){ir(e,`a`,t)}function rr(e,t){ir(e,`da`,t)}function ir(e,t,n=Y){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(or(t,r,n),n){let e=n.parent;for(;e&&e.parent;)tr(e.parent.vnode)&&ar(r,t,n,e),e=e.parent}}function ar(e,t,n,r){let i=or(t,e,r,!0),a=or(`um`,()=>c(r[t],i),n);a.flags=16}function or(e,t,n=Y,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ue();let i=ha(n),a=cn(t,n,e,r);return i(),We(),a};return r?i.unshift(a):i.push(a),a}}var sr=e=>(t,n=Y)=>{va&&e!==`sp`||or(e,(...e)=>t(...e),n)},cr=sr(`bm`),lr=sr(`m`),ur=sr(`bu`),dr=sr(`u`),fr=sr(`bum`),pr=sr(`um`),mr=sr(`sp`),hr=sr(`rtg`),gr=sr(`rtc`);function _r(e,t=Y){or(`ec`,e,t)}var vr=`components`,yr=Symbol.for(`v-ndc`);function br(e){return g(e)?xr(vr,e,!1)||e:e||yr}function xr(e,t,n=!0,r=!1){let i=z||Y;if(i){let n=i.type;if(e===vr){let e=Da(n,!1);if(e&&(e===t||e===T(t)||e===D(T(t))))return n}let a=Sr(i[e]||n[e],t)||Sr(i.appContext[e],t);return!a&&r?n:a}}function Sr(e,t){return e&&(e[t]||e[T(t)]||e[D(T(t))])}function Cr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=nt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Gt(Wt(e[n])):Wt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){if(!Number.isInteger(e)||e<0)i=[];else{i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}}else if(v(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function wr(e,t,n,r,i,a){if(n??={},z.ce||z.parent&&er(z.parent)&&z.parent.ce){let e=a!=null&&n.key==null?s({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),W(),qi(H,null,[q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Hi.length;W();let l;try{let i=o&&Tr(o(n)),s=n.key||a||i&&i.key;l=qi(H,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Hi.length;e>c;e--)Ui();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function Tr(e){return e.some(e=>!Ji(e)||!(e.type===Bi||e.type===H&&!Tr(e.children)))?e:null}var Er=e=>e?_a(e)?Ea(e):Er(e.parent):null,Dr=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Er(e.parent),$root:e=>Er(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ir(e),$forceUpdate:e=>e.f||=()=>{yn(e.update)},$nextTick:e=>e.n||=_n.bind(e.proxy),$watch:e=>zn.bind(e)}),Or=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),kr={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(Or(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else jr&&(s[n]=0)}let d=Dr[n],f,p;if(d)return n===`$attrs`&&P(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return Or(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||Or(n,c)||u(o,c)||u(i,c)||u(Dr,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Ar(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var jr=!0;function Mr(e){let t=Ir(e),n=e.proxy,i=e.ctx;jr=!1,t.beforeCreate&&Pr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:ne,errorCaptured:T,serverPrefetch:re,expose:E,inheritAttrs:D,components:ie,directives:O,filters:ae}=t;if(u&&Nr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(jr=!0,o)for(let e in o){let t=o[e],a=X({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Fr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Nn(t,e[t])})}f&&Pr(f,e,`c`);function k(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(cr,p),k(lr,m),k(ur,g),k(dr,_),k(nr,y),k(rr,b),k(_r,T),k(gr,te),k(hr,ne),k(fr,S),k(pr,w),k(mr,re),d(E)){if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ee&&e.render===r&&(e.render=ee),D!=null&&(e.inheritAttrs=D),ie&&(e.components=ie),O&&(e.directives=O),re&&Yn(e)}function Nr(e,t,n=r){d(e)&&(e=Vr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Pn(r.from||n,r.default,!0):Pn(r.from||n):Pn(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Pr(e,t,n){cn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Fr(e,t,n,r){let i=r.includes(`.`)?Bn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Ln(i,n)}else if(h(e))Ln(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Fr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Ln(i,r,e)}}}function Ir(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Lr(c,e,o,!0)),Lr(c,t,o)),v(t)&&a.set(t,c),c}function Lr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Lr(e,a,n,!0),i&&i.forEach(t=>Lr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Rr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Rr={data:zr,props:Ur,emits:Ur,methods:Hr,computed:Hr,beforeCreate:B,created:B,beforeMount:B,mounted:B,beforeUpdate:B,updated:B,beforeDestroy:B,beforeUnmount:B,destroyed:B,unmounted:B,activated:B,deactivated:B,errorCaptured:B,serverPrefetch:B,components:Hr,directives:Hr,watch:Wr,provide:zr,inject:Br};function zr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Br(e,t){return Hr(Vr(e),Vr(t))}function Vr(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function B(e,t){return e?[...new Set([].concat(e,t))]:t}function Hr(e,t){return e?s(Object.create(null),e,t):t}function Ur(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),Ar(e),Ar(t??{})):t}function Wr(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=B(e[r],t[r]);return n}function Gr(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Kr=0;function qr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Gr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Kr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:ka,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||q(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,Ea(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(cn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=Jr;Jr=l;try{return e()}finally{Jr=t}}};return l}}var Jr=null,Yr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Xr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Yr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(oe)));let c,l=i[c=ie(n)]||i[c=ie(T(n))];!l&&o&&(l=i[c=ie(E(n))]),l&&cn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,cn(u,e,6,a)}}var Zr=new WeakMap;function Qr(e,t,n=!1){let r=n?Zr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Qr(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function $r(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,E(t))||u(e,t))}function ei(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=kn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ra(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ra(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ni(c)}}catch(t){Hi.length=0,ln(t,e,1),v=q(Bi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=ri(y,a)),b=ea(b,y,!1,!0))}return n.dirs&&(b=ea(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Kn(Hn(b.type)&&Gn(b)||b,n.transition),v=b,kn(_),v}function ti(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(Ji(r)){if(r.type!==Bi||r.children===`v-if`){if(n)return;n=r}}else return}return n}var ni=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},ri=(e,t)=>{let n={};for(let r in e)o(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function ii(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?ai(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(oi(o,r,n)&&!$r(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||ai(r,o,l):!!o;return!1}function ai(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!u(e,a)||oi(t,e,a)&&!$r(n,a))return!0}return!1}function oi(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!be(r,i):r!==i}function si({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var ci={},li=()=>Object.create(ci),ui=e=>Object.getPrototypeOf(e)===ci;function di(e,t,n,r=!1){let i={},a=li();e.propsDefaults=Object.create(null),pi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:It(i):e.type.props?i:a,e.attrs=a}function fi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=F(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if($r(e.emitsOptions,o))continue;let d=t[o];if(c){if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=T(o);i[t]=mi(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{pi(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(u(t,a)||(r=E(a))!==a&&u(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=mi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&u(t,e)||(delete a[e],l=!0)}l&&et(e.attrs,`set`,``)}function pi(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(ee(t))continue;let l=n[t],d;a&&u(a,d=T(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:$r(e.emitsOptions,t)||t in i&&l===i[t]||(i[t]=l,s=!0)}if(o){let n=F(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=mi(a,n,s,i[s],e,!u(i,s))}}return s}function mi(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=ha(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===E(n))&&(r=!0))}return r}var hi=new WeakMap;function gi(e,r,i=!1){let a=i?hi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=gi(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=T(c[e]);_i(n)&&(l[n]=t)}else if(c)for(let e in c){let t=T(e);if(_i(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function _i(e){return e[0]!==`$`&&!ee(e)}var vi=e=>e===`_`||e===`_ctx`||e===`$stable`,yi=e=>d(e)?e.map(ra):[ra(e)],bi=(e,t,n)=>{if(t._n)return t;let r=An((...e)=>yi(t(...e)),n);return r._c=!1,r},xi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(vi(n))continue;let i=e[n];if(h(i))t[n]=bi(n,i,r);else if(i!=null){let e=yi(i);t[n]=()=>e}}},Si=(e,t)=>{let n=yi(t);e.slots.default=()=>n},Ci=(e,t,n)=>{for(let r in t)(n||!vi(r))&&(e[r]=t[r])},wi=(e,t,n)=>{let r=e.slots=li();if(e.vnode.shapeFlag&32){let e=t._;e?(Ci(r,t,n),n&&k(r,`_`,e,!0)):xi(t,r)}else t&&Si(e,t)},Ti=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Ci(a,n,r):(o=!n.$stable,xi(n,a)),s=n}else n&&(Si(e,n),s={default:1});if(o)for(let e in a)!vi(e)&&s[e]==null&&delete a[e]},V=Ri;function Ei(e){return Di(e)}function Di(e,i){let a=ce();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,r,i=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Yi(e,t)&&(i=ve(e),A(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===n&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case zi:y(e,t,r,i);break;case Bi:b(e,t,r,i);break;case Vi:e??x(t,r,i,s);break;case H:ie(e,t,r,i,a,o,s,c,l);break;default:f&1?w(e,t,r,i,a,o,s,c,l):f&6?O(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,be)}d!=null&&a?Qn(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&Qn(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),re(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&T(e.children,d,null,r,i,Oi(e,a),s,u),_&&Mn(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&sa(f,r,e)}_&&Mn(e,null,r,`beforeMount`);let v=Ai(i,g);v?g.beforeEnter(d):g&&!g.persisted&&(d[Li]=!0),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&V(()=>{try{f&&sa(f,r,e),v&&g.enter(d),_&&Mn(e,null,r,`mounted`)}finally{}},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Ii(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},T=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?ia(e[l]):ra(e[l]);v(null,c,t,n,r,i,a,o,s)}},re=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&ki(r,!1),(g=h.onVnodeBeforeUpdate)&&sa(g,r,n,e),f&&Mn(n,e,r,`beforeUpdate`),r&&ki(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?E(e.dynamicChildren,d,l,r,i,Oi(n,a),o):s||ue(e,n,l,null,r,i,Oi(n,a),o,!1),u>0){if(u&16)D(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&D(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&V(()=>{g&&sa(g,r,n,e),f&&Mn(n,e,r,`updated`)},i)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||Fi(c),d=u&&(c.type===H||!Yi(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},D=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!ee(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ee(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ie=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),T(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&ji(e,t,!0)):ue(e,t,n,f,i,a,s,c,l)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):oe(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=da(e,r,i);if(tr(e)&&(s.ctx.renderer=be),ya(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o,a),!e.el){let r=s.subTree=q(Bi);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},oe=(e,t,n)=>{let r=t.component=e.component;if(ii(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,le(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Ni(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{let t=()=>{e.job.flags&8||(i&&i.pendingBranch?V(t,i):l())};t.flags=48,V(t,i)});return}}let u=t,d;ki(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ae(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&sa(d,s,t,c),ki(e,!0);let f=ei(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el||Fi(p)),ve(p),e,i,a),t.el=f.el,u===null&&si(e,f.el),r&&V(r,i),(d=t.props&&t.props.onVnodeUpdated)&&V(()=>sa(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=er(t);if(ki(e,!1),l&&ae(l),!m&&(o=c&&c.onVnodeBeforeMount)&&sa(o,d,t),ki(e,!0),s&&j){let t=()=>{e.subTree=ei(e),j(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ei(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&V(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;V(()=>sa(o,d,e),i)}(t.shapeFlag&256||d&&er(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&V(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Oe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>yn(u),ki(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,fi(e,t.props,r,n),Ti(e,t.children,n),Ue(),Sn(e),We()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){fe(l,d,n,r,i,a,o,s,c);return}if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?fe(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&T(d,n,r,i,a,o,s,c))},de=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let n=t[p]=l?ia(t[p]):ra(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?_e(e,a,o,!0,!1,f):T(t,r,i,a,o,s,c,l,f)},fe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?ia(t[u]):ra(t[u]);if(Yi(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?ia(t[p]):ra(t[p]);if(Yi(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?ia(t[u]):ra(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)A(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ia(t[u]):ra(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){A(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Yi(n,t[_])){i=_;break}i===void 0?A(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?Mi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Fi(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?pe(n,r,p,2):_--)}}},pe=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)pe(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,be);else if(c===H){o(a,t,n);for(let e=0;e<u.length;e++)pe(u[e],t,n,r);o(e.anchor,t,n)}else if(c===Vi)S(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Un]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),V(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Un];a._isLeaving&&a[Un](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},A=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(Ue(),Qn(s,null,n,e,!0),We()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256&&t.ctx.deactivate(e))return;let h=u&1&&f,g=!er(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&sa(_,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Mn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,be,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?_e(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&_e(c,t,n),r&&me(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&V(()=>{_&&sa(_,t,e),h&&Mn(e,null,t,`unmounted`),v&&(e.el=null)},n)},me=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===H;if(a&&!i){he(n,r);return}if(t===Vi){C(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?qn(e):e,c=()=>{a?m(n)&&he(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},he=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Pi(c),Pi(l),r&&ae(r),i.stop(),a?(a.flags|=8,A(o,e,t,n)):o&&(o.transition=e.vnode.transition,A(o,e,t,n)),s&&V(s,t);let u=()=>{e.isUnmounted=!0};u.flags=16,V(u,t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)A(e[o],t,n,r,i)},ve=e=>{if(e.shapeFlag&6)return ve(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Vn];return n?h(n):t},ye=(e,t,n)=>{Tn(()=>{e==null?t._vnode&&A(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:ua())},be={p:v,um:A,m:pe,r:me,mt:k,mc:T,pc:ue,pbc:E,n:ve,o:e},xe,j;return i&&([xe,j]=i(be)),{render:ye,hydrate:xe,createApp:qr(ye,xe)}}function Oi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ki({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ai(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ji(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=ia(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ji(t,a)),a.type===zi&&(a.patchFlag===-1&&(a=i[e]=ia(a)),a.el=t.el),a.type===Bi&&!a.el&&(a.el=t.el)}}function Mi(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Ni(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ni(t)}function Pi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Fi(e){if(e.placeholder)return e.placeholder;let t=e.component;if(t)return Fi(t.subTree);let n=e.suspense;return n&&n.activeBranch?Fi(n.activeBranch):null}var Ii=e=>e.__isSuspense,Li=Symbol(`_deferredEnter`);function Ri(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):xn(e)}var H=Symbol.for(`v-fgt`),zi=Symbol.for(`v-txt`),Bi=Symbol.for(`v-cmt`),Vi=Symbol.for(`v-stc`),Hi=[],U=null;function W(e=!1){Hi.push(U=e?null:[])}function Ui(){Hi.pop(),U=Hi[Hi.length-1]||null}var Wi=1;function Gi(e,t=!1){Wi+=e,e<0&&U&&t&&(U.hasOnce=!0)}function Ki(e){return e.dynamicChildren=Wi>0?U||n:null,Ui(),Wi>0&&U&&U.push(e),e}function G(e,t,n,r,i,a){return Ki(K(e,t,n,r,i,a,!0))}function qi(e,t,n,r,i){return Ki(q(e,t,n,r,i,!0))}function Ji(e){return e?e.__v_isVNode===!0:!1}function Yi(e,t){return e.type===t.type&&e.key===t.key}var Xi=({key:e})=>e??null,Zi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||I(e)||h(e)?{i:z,r:e,k:t,f:!!n}:e);function K(e,t=null,n=null,r=0,i=null,a=e===H?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xi(t),ref:t&&Zi(t),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:z};return s?(aa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Wi>0&&!o&&U&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&U.push(c),c}var q=Qi;function Qi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==yr||(e=Bi),Ji(e)){let r=ea(e,t,!0);return n&&aa(r,n),Wi>0&&!a&&U&&(r.shapeFlag&6?U[U.indexOf(e)]=r:U.push(r)),r.patchFlag=-2,r}if(Oa(e)&&(e=e.__vccOpts),t){t=$i(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=A(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=le(n))}let o=g(e)?1:Ii(e)?128:Hn(e)?64:v(e)?4:h(e)?2:0;return K(e,t,n,r,i,o,a,!0)}function $i(e){return e?Ht(e)?s({},e):ui(e)?s({},e[Ca]||e):e:null}function ea(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?oa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Xi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Zi(t)):[a,Zi(t)]:Zi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==H?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ea(e.ssContent),ssFallback:e.ssFallback&&ea(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Kn(u,c.clone(u)),u}function J(e=` `,t=0){return q(zi,null,e,t)}function ta(e,t){let n=q(Vi,null,e);return n.staticCount=t,n}function na(e=``,t=!1){return t?(W(),qi(Bi,null,e)):q(Bi,null,e)}function ra(e){return e==null||typeof e==`boolean`?q(Bi):d(e)?q(H,null,e.slice()):Ji(e)?ia(e):q(zi,null,String(e))}function ia(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ea(e)}function aa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),aa(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!ui(t)?t._ctx=z:r===3&&z&&(z.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){aa(e,{default:t});return}t={default:t,_ctx:z},n=32}else t=String(t),r&64?(n=16,t=[J(t)]):n=8;e.children=t,e.shapeFlag|=n}function oa(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=A([t.class,r.class]));else if(e===`style`)t.style=le([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function sa(e,t,n,r=null){cn(e,t,7,[n,r])}var ca=Gr(),la=0;function ua(){return la}function da(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ca,o={uid:la++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new we(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:gi(i,a),emitsOptions:Qr(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=Xr.bind(null,o),e.ce&&e.ce(o),o}var Y=null,fa=()=>Y||z,pa,ma;{let e=ce(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};pa=t(`__VUE_INSTANCE_SETTERS__`,e=>Y=e),ma=t(`__VUE_SSR_SETTERS__`,e=>va=e)}var ha=e=>{let t=Y;return pa(e),e.scope.on(),()=>{e.scope.off(),pa(t)}},ga=()=>{Y&&Y.scope.off(),pa(null)};function _a(e){return e.vnode.shapeFlag&4}var va=!1;function ya(e,t=!1,n=!1){t&&ma(t);let{props:r,children:i}=e.vnode,a=_a(e);di(e,r,a,t),wi(e,i,n||t);let o=a?ba(e,t):void 0;return t&&ma(!1),o}function ba(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,kr);let{setup:r}=n;if(r){Ue();let n=e.setupContext=r.length>1?Ta(e):null,i=ha(e),a=sn(r,e,0,[e.props,n]),o=y(a);if(We(),i(),(o||e.sp)&&!er(e)&&Yn(e),o){if(a.then(ga,ga),t)return a.then(n=>{ma(!0);try{xa(e,n,t)}finally{ma(!1)}}).catch(t=>{ln(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t(`<!---->`)});e.asyncDep=a}else xa(e,a,t)}else Sa(e,t)}function xa(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Zt(t)),Sa(e,n)}function Sa(e,t,n){let i=e.type;e.render||=i.render||r;{let t=ha(e);Ue();try{Mr(e)}finally{We(),t()}}}var Ca=Symbol(),wa={get(e,t){return P(e,`get`,``),t===Ca?e:e[t]}};function Ta(e){return{attrs:new Proxy(e.attrs,wa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ea(e){return e.exposed?e.exposeProxy||=new Proxy(Zt(Ut(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Dr)return Dr[n](e)},has(e,t){return t in e||t in Dr}}):e.proxy}function Da(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function Oa(e){return h(e)&&`__vccOpts`in e}var X=(e,t)=>$t(e,t,va),ka=`3.5.45`,Aa=void 0,ja=typeof window<`u`&&window.trustedTypes;if(ja)try{Aa=ja.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ma=Aa?e=>Aa.createHTML(e):e=>e,Na=`http://www.w3.org/2000/svg`,Pa=`http://www.w3.org/1998/Math/MathML`,Fa=typeof document<`u`?document:null,Ia=Fa&&Fa.createElement(`template`),La={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Fa.createElementNS(Na,e):t===`mathml`?Fa.createElementNS(Pa,e):n?Fa.createElement(e,{is:n}):Fa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Fa.createTextNode(e),createComment:e=>Fa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Fa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Ia.innerHTML=Ma(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Ia.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ra=Symbol(`_vtc`);function za(e,t,n){let r=e[Ra];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ba=Symbol(`_vod`),Va=Symbol(`_vsh`),Ha={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Ba]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Ua(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ua(e,!0),r.enter(e)):r.leave(e,()=>{Ua(e,!1)}):Ua(e,t))},beforeUnmount(e,{value:t}){Ua(e,t)}};function Ua(e,t){e.style.display=t?e[Ba]:`none`,e[Va]=!t}var Wa=Symbol(``),Ga=/(?:^|;)\s*display\s*:/;function Ka(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Ja(r,t,``)}else for(let e in t)n[e]??Ja(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Ja(r,i,``):Qa(e,i,!g(t)&&t?t[i]:void 0,o)||Ja(r,i,o)}}else if(i){if(t!==n){let e=r[Wa];e&&(n+=`;`+e),r.cssText=n,a=Ga.test(n)}}else t&&e.removeAttribute(`style`);Ba in e&&(i&&t===n||(e[Ba]=a?r.display:``),e[Va]&&(r.display=`none`))}var qa=/\s*!important$/;function Ja(e,t,n){if(d(n))n.forEach(n=>Ja(e,t,n));else if(n??=``,t.startsWith(`--`))qa.test(n)?e.setProperty(t,n.replace(qa,``),`important`):e.setProperty(t,n);else{let r=Za(e,t);qa.test(n)?e.setProperty(E(r),n.replace(qa,``),`important`):e[r]=n}}var Ya=[`Webkit`,`Moz`,`ms`],Xa={};function Za(e,t){let n=Xa[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Xa[t]=r;r=D(r);for(let n=0;n<Ya.length;n++){let i=Ya[n]+r;if(i in e)return Xa[t]=i}return t}function Qa(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var $a=`http://www.w3.org/1999/xlink`;function eo(e,t,n,r,i,a=me(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS($a,t.slice(6,t.length)):e.setAttributeNS($a,t,n):n==null||a&&!he(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function to(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Ma(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);r===i&&`_value`in e||(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=he(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function no(e,t,n,r){e.addEventListener(t,n,r)}function ro(e,t,n,r){e.removeEventListener(t,n,r)}var io=Symbol(`_vei`);function ao(e,t,n,r,i=null){let a=e[io]||(e[io]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=co(t);r?no(e,n,a[t]=po(r,i),s):o&&(ro(e,n,o,s),a[t]=void 0)}}var oo=/(Once|Passive|Capture)$/,so=/^on:?(?:Once|Passive|Capture)$/;function co(e){let t,n;for(;(n=e.match(oo))&&!so.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):E(e.slice(2)),t]}var lo=0,uo=Promise.resolve(),fo=()=>lo||=(uo.then(()=>lo=0),Date.now());function po(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&cn(e,t,5,a)}}else cn(r,t,5,[e])};return n.value=e,n.attached=fo(),n}var mo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ho=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?za(e,r,c):t===`style`?Ka(e,n,r):a(t)?o(t)||ao(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):go(e,t,r,c))?(to(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||eo(e,t,r,c,s,t!==`value`)):e._isVueCE&&(_o(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?to(e,T(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),eo(e,t,r,c))};function go(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&mo(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return mo(t)&&g(n)?!1:t in e}function _o(e,t){let n=e._def.props;if(!n)return!1;let r=T(t);return Array.isArray(n)?n.some(e=>T(e)===r):Object.keys(n).some(e=>T(e)===r)}var vo=s({patchProp:ho},La),yo;function bo(){return yo||=Ei(vo)}var xo=((...e)=>{let t=bo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Co(e);if(!r)return;let i=t._component;h(i)||i.render||i.template||(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,So(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function So(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Co(e){return g(e)?document.querySelector(e):e}var Z={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},wo=`__connection.json`,To=`__DEVFRAME_CONNECTION__`,Eo=`x-birpc-session`,Do=`__rpc-dump/index.json`,Oo=`devframe:services`,ko=`devframe_otp`,Ao=`devframe_auth_token`;Z.postMessage.remoteAssetsError;function jo(e){return typeof e==`string`?`'${e}'`:new Fo().serialize(e)}var Mo=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,No=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Mo.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Po(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&No[n]?No[n]:n+128,s=a<128&&No[a]?No[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Fo=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Po(e,t):n===`number`&&r===`number`?e-t:Po(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Po),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Io=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Lo=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Ro=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,zo=[],Bo=class{_data=new Vo;_hash=new Vo([...Io]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)zo[n]=e[t+n]|0;else{let e=zo[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=zo[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;zo[n]=t+zo[n-7]+i+zo[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Lo[n]+zo[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Vo.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Vo(t,i)}},Vo=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Ro.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Ho(e){return new Bo().finalize(e).toBase64()}function Uo(e){return Ho(jo(e))}function Wo(e){return Uo(e)}var Go=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Wo(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}};function Ko(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var qo={blue:Ko(34,39),cyan:Ko(36,39),gray:Ko(90,39),green:Ko(32,39),red:Ko(31,39),yellow:Ko(33,39),bold:Ko(1,22),dim:Ko(2,22),reset:Ko(0,0),underline:Ko(4,24)};function Jo(e,...t){return typeof e==`function`?e(...t):e}var Yo=Error.captureStackTrace,Xo=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,Yo?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function Zo(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function Qo(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Zo(r,i),s=(e={},n={})=>{let r=new Xo({code:i,why:Jo(a.why,e),fix:Jo(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:Jo(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function $o(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
2
+ `)}}var es=$o(qo);function ts(e,{method:t=`warn`}={}){console[t](es(e))}function ns(e){return Qo({...e,reporters:[ts,...e.reporters??[]]})}var rs=ns({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function is(e){if(e.agent&&e.jsonSerializable===!1)throw rs.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function as(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function os(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function ss(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await as(i,n[r]);if(a.issues)throw rs.DF0043({name:e,index:r,issues:os(a.issues)})}return r}async function cs(e,t,n){if(!t)return n;let r=await as(t,n);if(r.issues)throw rs.DF0044({name:e,issues:os(r.issues)});return n}async function ls(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function us(e,t){let n=e.handler;if(!n){let r=await ls(e,t);if(!r.handler)throw rs.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await ss(e.name,r,t),o=await a(...n);return await cs(e.name,i,o)}}var ds=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return us(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw rs.DF0021({name:e.name});is(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw rs.DF0022({name:e.name});is(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await us(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw rs.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function fs(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw ms(t,`undefined`,r,e);return n}return i!==null&&ps(i,r,e,t),n})}function ps(e,t,n,r){if(typeof e==`bigint`)throw ms(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw ms(r,`Map`,t,n);if(e instanceof Set)throw ms(r,`Set`,t,n);if(e instanceof Date)throw ms(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw ms(r,e.constructor?.name??`class instance`,t,n)}function ms(e,t,n,r){let i=hs(n,r);return rs.DF0020({name:e||`<anonymous>`,type:t,path:i})}function hs(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function gs(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var _s=/^[\w+.-]{2,}:\/\//;function vs(e){return e.endsWith(`/`)?e:`${e}/`}function ys(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function bs(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?vs(n)+e.replace(/^\.?\//,``):e);return n}function xs(e,t){if(!t||t===`/`||_s.test(e))return e;let n=ys(t);return e.startsWith(n)?e:bs(n,e)}function Ss(e,t){let n=e.match(_s);return t+(n?e.slice(n[0].length):e)}var Cs=`__DEVFRAME_CONNECTION_META__`,ws=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Ts(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function Es(){return Ts(To)}function Ds(){return Ts(Cs)}function Os(e){if(e)return e;try{let e=localStorage.getItem(ws);if(e)return e}catch{}return Ts(ws)}function ks(e){globalThis[To]=e,globalThis[Cs]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&As(e.authToken)}function As(e){try{localStorage.setItem(ws,e)}catch{}globalThis[ws]=e;let t=Es();t&&(globalThis[To]={...t,authToken:e})}function js(e){let t=xs(wo,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Ms(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Ns(){let e=Es();if(e)return Ms(e,Os()??e.authToken??e.connectionMeta.authToken);let t=Ds();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??js(`./`),authToken:Os(t.authToken)}}async function Ps(e={}){if(e.connection){let t=Ms(e.connection,Os(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return ks(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:js(t[0]??`./`),authToken:Os(e.authToken??e.connectionMeta.authToken)};return ks(n),n}let n=Ns();if(n){let t=Ms(n,Os(e.authToken??n.authToken??n.connectionMeta.authToken));return ks(t),t}let r=[];for(let n of t){let t=xs(wo,n),i=js(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:Os(e.authToken??r.authToken)};return ks(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Fs=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Is(e=ko){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Ls(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function Rs(e=ko){let t=Is(e);return t&&Ls(e),t}async function zs(e,t={}){let n=Rs(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Bs(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Oo,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}var Vs=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Hs(e=21){let t=``,n=e;for(;n--;)t+=Vs[Math.random()*64|0];return t}var Us=Symbol.for(`immer-nothing`),Ws=Symbol.for(`immer-draftable`),Q=Symbol.for(`immer-state`);function $(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Gs=Object,Ks=Gs.getPrototypeOf,qs=`constructor`,Js=`prototype`,Ys=`configurable`,Xs=`enumerable`,Zs=`writable`,Qs=`value`,$s=e=>!!e&&!!e[Q];function ec(e){return e?rc(e)||uc(e)||!!e[Ws]||!!e[qs]?.[Ws]||dc(e)||fc(e):!1}var tc=Gs[Js][qs].toString(),nc=new WeakMap;function rc(e){if(!e||!pc(e))return!1;let t=Ks(e);if(t===null||t===Gs[Js])return!0;let n=Gs.hasOwnProperty.call(t,qs)&&t[qs];if(n===Object)return!0;if(!mc(n))return!1;let r=nc.get(n);return r===void 0&&(r=Function.toString.call(n),nc.set(n,r)),r===tc}function ic(e,t,n=!0){ac(e)===0?(n?Reflect.ownKeys(e):Gs.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ac(e){let t=e[Q];return t?t.type_:uc(e)?1:dc(e)?2:fc(e)?3:0}var oc=(e,t,n=ac(e))=>n===2?e.has(t):Gs[Js].hasOwnProperty.call(e,t),sc=(e,t,n=ac(e))=>n===2?e.get(t):e[t],cc=(e,t,n,r=ac(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function lc(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var uc=Array.isArray,dc=e=>e instanceof Map,fc=e=>e instanceof Set,pc=e=>typeof e==`object`,mc=e=>typeof e==`function`,hc=e=>typeof e==`boolean`;function gc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var _c=e=>pc(e)?e?.[Q]:null,vc=e=>e.copy_||e.base_,yc=e=>e.modified_?e.copy_:e.base_;function bc(e,t){if(dc(e))return new Map(e);if(fc(e))return new Set(e);if(uc(e))return Array[Js].slice.call(e);let n=rc(e);if(t===!0||t===`class_only`&&!n){let t=Gs.getOwnPropertyDescriptors(e);delete t[Q];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Zs]===!1&&(a[Zs]=!0,a[Ys]=!0),(a.get||a.set)&&(t[i]={[Ys]:!0,[Zs]:!0,[Xs]:a[Xs],[Qs]:e[i]})}return Gs.create(Ks(e),t)}{let t=Ks(e);if(t!==null&&n)return{...e};let r=Gs.create(t);return Gs.assign(r,e)}}function xc(e,t=!1){return wc(e)||$s(e)||!ec(e)||(ac(e)>1&&Gs.defineProperties(e,{set:Cc,add:Cc,clear:Cc,delete:Cc}),Gs.freeze(e),t&&ic(e,(e,t)=>{xc(t,!0)},!1)),e}function Sc(){$(2)}var Cc={[Qs]:Sc};function wc(e){return e===null||!pc(e)||Gs.isFrozen(e)}var Tc=`MapSet`,Ec=`Patches`,Dc=`ArrayMethods`,Oc={};function kc(e){let t=Oc[e];return t||$(0,e),t}var Ac=e=>!!Oc[e];function jc(e,t){Oc[e]||(Oc[e]=t)}var Mc,Nc=()=>Mc,Pc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ac(Tc)?kc(Tc):void 0,arrayMethodsPlugin_:Ac(Dc)?kc(Dc):void 0});function Fc(e,t){t&&(e.patchPlugin_=kc(Ec),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ic(e){Lc(e),e.drafts_.forEach(zc),e.drafts_=null}function Lc(e){e===Mc&&(Mc=e.parent_)}var Rc=e=>Mc=Pc(Mc,e);function zc(e){let t=e[Q];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Q].modified_&&(Ic(t),$(4)),ec(e)&&(e=Vc(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Q].base_,e,t)}else e=Vc(t,n);return Hc(t,e,!0),Ic(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Us?void 0:e}function Vc(e,t){if(wc(t))return t;let n=t[Q];if(!n)return Xc(t,e.handledSet_,e);if(!Wc(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Jc(n,e)}return n.copy_}function Hc(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xc(t,n)}function Uc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Wc=(e,t)=>e.scope_===t,Gc=[];function Kc(e,t,n,r){let i=vc(e),a=e.type_;if(r!==void 0&&sc(i,r,a)===t){cc(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ic(i,(e,n)=>{if($s(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Gc;for(let e of o)cc(i,e,n,a)}function qc(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Wc(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=yc(i);Kc(e,i.draft_??i,a,n),Jc(i,r)})}function Jc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Uc(e)}}function Yc(e,t,n){let{scope_:r}=e;if($s(n)){let i=n[Q];Wc(i,r)&&i.callbacks_.push(function(){al(e),Kc(e,n,yc(i),t)})}else ec(n)&&e.callbacks_.push(function(){let i=vc(e);e.type_===3?i.has(n)&&Xc(n,r.handledSet_,r):sc(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Xc(sc(e.copy_,t,e.type_),r.handledSet_,r)})}function Xc(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||$s(e)||t.has(e)||!ec(e)||wc(e)||(t.add(e),ic(e,(r,i)=>{if($s(i)){let t=i[Q];Wc(t,n)&&(cc(e,r,yc(t),e.type_),Uc(t))}else ec(i)&&Xc(i,t,n)})),e}function Zc(e,t){let n=uc(e),r={type_:+!!n,scope_:t?t.scope_:Nc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Qc;n&&(i=[r],a=$c);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Qc={get(e,t){if(t===Q)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=vc(e);if(!oc(i,t,e.type_))return nl(e,i,t);let a=i[t];if(e.finalized_||!ec(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&gc(t))return a;if(a===el(e.base_,t)||tl(e,t,a)){al(e);let n=e.type_===1?+t:t,r=sl(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in vc(e)},ownKeys(e){return Reflect.ownKeys(vc(e))},set(e,t,n){let r=rl(vc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=el(vc(e),t),i=r?.[Q];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(lc(n,r)&&(n!==void 0||oc(e.base_,t,e.type_)))return!0;al(e),il(e)}return e.copy_[t]===n&&(n!==void 0||oc(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Yc(e,t,n)),!0},deleteProperty(e,t){return al(e),el(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),il(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=vc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Zs]:!0,[Ys]:e.type_!==1||t!==`length`,[Xs]:r[Xs],[Qs]:n[t]}},defineProperty(){$(11)},getPrototypeOf(e){return Ks(e.base_)},setPrototypeOf(){$(12)}},$c={};for(let e in Qc){let t=Qc[e];$c[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}$c.deleteProperty=function(e,t){return $c.set.call(this,e,t,void 0)},$c.set=function(e,t,n){return Qc.set.call(this,e[0],t,n,e[0])};function el(e,t){let n=e[Q];return(n?vc(n):e)[t]}function tl(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!ec(n)||n[Q]?!1:e.baseRefs_.has(n)}function nl(e,t,n){let r=rl(t,n);return r?Qs in r?r[Qs]:r.get?.call(e.draft_):void 0}function rl(e,t){if(!(t in e))return;let n=Ks(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ks(n)}}function il(e){e.modified_||(e.modified_=!0,e.parent_&&il(e.parent_))}function al(e){e.copy_||=(e.assigned_=new Map,bc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ol=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(mc(e)&&!mc(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}mc(t)||$(6),n!==void 0&&!mc(n)&&$(7);let r;if(ec(e)){let i=Rc(this),a=sl(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ic(i):Lc(i)}return Fc(i,n),Bc(r,i)}if(!e||!pc(e)){if(r=t(e),r===void 0&&(r=e),r===Us&&(r=void 0),this.autoFreeze_&&xc(r,!0),n){let t=[],i=[];kc(Ec).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}$(1,e)},this.produceWithPatches=(e,t)=>{if(mc(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},hc(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),hc(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),hc(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ec(e)||$(8),$s(e)&&(e=cl(e));let t=Rc(this),n=sl(t,e,void 0);return n[Q].isManual_=!0,Lc(t),n}finishDraft(e,t){let n=e&&e[Q];n&&n.isManual_||$(9);let{scope_:r}=n;return Fc(r,t),Bc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=kc(Ec).applyPatches_;return $s(e)?r(e,t):this.produce(e,e=>r(e,t))}};function sl(e,t,n,r){let[i,a]=dc(t)?kc(Tc).proxyMap_(t,n):fc(t)?kc(Tc).proxySet_(t,n):Zc(t,n);return(n?.scope_??Nc()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?qc(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function cl(e){return $s(e)||$(10,e),ll(e)}function ll(e){if(!ec(e)||wc(e))return e;let t=e[Q],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=bc(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=bc(e,!0);let i=n;return fc(n)&&(n=new Set),ic(i,(e,t)=>{cc(n,e,ll(t))},r),t&&(t.finalized_=!1),n}function ul(){function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=_c(sc(e,n.key_)),i=sc(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||oc(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=sc(n,r),!pc(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[Q];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;ic(e.assigned_,(e,l)=>{let u=sc(o,e,c),f=sc(s,e,c),p=l?oc(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Us?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=ac(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),t!==0&&t!==1||n!==`__proto__`&&n!==qs||$(19),mc(o)&&n===Js&&$(19),o=sc(o,n),o!==null&&pc(o)||$(18,i.join(`/`))}let s=ac(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:$(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:$(17,a)}}),e}function u(e){if(!ec(e))return e;if(uc(e))return e.map(u);if(dc(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(fc(e))return new Set(Array.from(e).map(u));let t=Object.create(Ks(e));for(let n in e)t[n]=u(e[n]);return oc(e,Ws)&&(t[Ws]=e[Ws]),t}function d(e){return $s(e)?u(e):e}jc(Ec,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var dl=new ol,fl=dl.produce,pl=dl.produceWithPatches.bind(dl),ml=dl.applyPatches.bind(dl),hl=1e3;function gl(e,t){if(e.add(t),e.size>hl){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function _l(e){let{enablePatches:t=!1}=e;t&&ul();let n=gs(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Hs())=>{i.has(t)||(ul(),r=ml(r,e),gl(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Hs())=>{if(!i.has(a)){if(gl(i,a),t){let[t,i]=pl(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=fl(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}function vl(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:Z.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:Z.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n,r){let i=[];return i.push(n.on(`updated`,(n,i,o)=>{a||o===r||(i?e.callEvent(`devframe:rpc:server-state:patch`,t,i,o):e.callEvent(`devframe:rpc:server-state:set`,t,n,o))})),()=>{for(let e of i)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=_l({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);let r=!1,a=u.on(`updated`,()=>{r=!0}),l=Hs();return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&t.get(c)===u&&!r&&u.mutate(()=>o(c,e),l)}).catch(e=>{console.error(`Error getting server state`,e)}).finally(a),n.set(c,s(c,u,l)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(Z.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var yl=typeof self==`object`?self:globalThis,bl=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),xl=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Sl(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=bl.has(e)?yl[e]:void 0;return n(new(r??yl.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&xl.has(a))return n(new yl[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Cl(e){return Sl(new Map,e)(0)}var wl=``,{toString:Tl}={},{keys:El}=Object;function Dl(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Tl.call(e).slice(8,-1);switch(n){case`Array`:return[1,wl];case`Object`:return[2,wl];case`Date`:return[3,wl];case`RegExp`:return[4,wl];case`Map`:return[5,wl];case`Set`:return[6,wl];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Ol([e,t]){return e===0&&(t===`function`||t===`symbol`)}function kl(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Dl(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of El(r))(e||!Ol(Dl(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ol(Dl(n))||Ol(Dl(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ol(Dl(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Al(e,t={}){let n=[];return kl(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:jl,stringify:Ml}=JSON,Nl={json:!0,lossy:!0};function Pl(e){return Cl(jl(e))}function Fl(e){return Ml(Al(e,Nl))}function Il(e){return Cl(e)}function Ll(e){return Fl(e)}function Rl(e){return Pl(e)}var zl=new Map;function Bl(e=zl){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?fs(n,r??``):`s:${Ll(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Rl(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Vl(){}function Hl(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function Ul(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function Wl(e){let{onConnected:t=Vl,onError:n=Vl,onDisconnected:r=Vl,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Ao}=${encodeURIComponent(e.authToken)}`);let s=Bl(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){e===`session`?(f(n),t()):u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=Hl(r);if(!e)break;r=e.rest;let{event:t,data:n}=Ul(e.frame);n.length>0&&_(t,n.join(`
3
+ `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l)n(Error(`Devframe SSE channel is closed; message dropped`));else try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[Eo]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function Gl(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Kl=Math.random.bind(Math),ql=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Jl(e=21){let t=``,n=e;for(;n--;)t+=ql[Kl()*64|0];return t}var Yl=6e4,Xl=e=>e,Zl=Xl,{clearTimeout:Ql,setTimeout:$l}=globalThis;function eu(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Xl,deserialize:s=Zl,resolver:c,bind:l=`rpc`,timeout:u=Yl,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Gl(),_=Jl();s.i=_;let v;async function y(n=s){return u>=0&&(v=$l(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Ql(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Ql(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function tu(e,t){let{channel:n,rpcOptions:r={}}=t;return eu(e,{...n,timeout:-1,...r,proxify:!1})}function nu(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Z.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Fs(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Fs(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Z.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Fs(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Z.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Z.client.connectionError,e),m(new Fs(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Fs(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=tu(a.functions,{channel:v,rpcOptions:o});a.register({name:Z.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Fs(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Z.client.connectionError,e),m(e),i.emit(Z.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Fs(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Z.client.connectionError,e)}return i.emit(Z.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Z.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Z.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t)i.emit(Z.client.error,t,String(e[0]));else return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Z.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function ru(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function iu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=ru(n.sse,r??`./`,location);return nu({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Wl({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function au(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:ou(r)?au(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function ou(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function su(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function cu(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function lu(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function uu(e){if(e.error)throw au(e.error);return e.output}function du(e){return e.some(e=>e!=null)}function fu(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function pu(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Il(e):e}function a(e,t){return i(fu(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return lu(r)?uu(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(su(r)){if(du(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(cu(r)){let e=Wo(n),i=r.records[e];if(i)return uu(await s(i,r.serialization));if(r.fallback)return uu(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!du(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function mu(e){let t=pu(await e.fetchJsonFromBases(Do),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var hu=256,gu=class extends Error{name=`StreamClosedError`};function _u(e={}){let t=e.id??Hs(),n=Math.max(0,e.replayWindow??0),r=gs(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new gu(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=yu(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function vu(e={}){let t=e.id??Hs(),n=Math.max(1,e.highWaterMark??hu),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1})}else if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function yu(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var bu=``;function xu(e,t){return`${e}${bu}${t}`}function Su(e){let t=new Map,n=new Map;e.client.register({name:Z.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(xu(e,n))?._push(r,i)}}),e.client.register({name:Z.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=xu(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Z.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=xu(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Z.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(bu);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=xu(n,r),o=t.get(a);if(o)return o;let s=vu({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Z.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=xu(t,r),a=n.get(i);if(a)return a;let o=_u({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function Cu(){}var wu=new Map;function Tu(e){let t=e.url;e.authToken&&(t=`${t}?${Ao}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Cu,onError:i=Cu,onDisconnected:a=Cu,definitions:o=wu}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=Bl(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r)}else i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Eu(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Ss(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Du(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Eu(n.websocket,r??`./`,location);return nu({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Tu({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Ou(e){return e.includes(`:`)}function ku(e,t){return Ou(t)?t:`${e}:${t}`}function Au(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function ju(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Au(a)}function Mu(e,t){return{global:ju(e,t,`global`),project:ju(e,t,`project`)}}function Nu(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Ou(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(ku(t,n),...r)),callEvent:((n,...r)=>e.callEvent(ku(t,n),...r)),callOptional:((n,...r)=>e.callOptional(ku(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(ku(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(ku(t,n),r,i),upload:(n,r)=>e.streaming.upload(ku(t,n),r)}},settings:Mu(e,t),scope:e.scope}}var Pu=128;function Fu(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Pu)}function Iu(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Lu=Object.freeze({type:`object`,additionalProperties:!0});function Ru(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Lu}return Lu}function zu(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Ru(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Bu(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Vu(e,t){return Bu(e,t)??[e]}function Hu(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Uu(e,t={}){let n=t.modelContext??Hu();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Fu(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Iu(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:zu(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Wu(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Wu(e,t,n){try{let r=Vu(n,e.args?.length);return{content:[{type:`text`,text:Gu(await(await us(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Ku(e)}]}}}function Gu(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Ku(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}var qu=`modulepreload`,Ju=function(e,t){return new URL(e,t).href},Yu={},Xu=function(e){return e.pathname.endsWith(`.css`)},Zu=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Qu=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Ju(t,n);let r=s(t),i=Xu(r);return Zu(Yu,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:qu,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function $u(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function ed(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=gs(),a=Array.isArray(t)?t:[t],o=await Ps(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new Go({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new ds(f),m=e.webmcp===!1?void 0:Uu(p),h,g=!1,_=0,v;function y(){_++,v=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Z.broadcast.cacheInvalidate,type:`event`,handler:y}),i.on(Z.client.connectionStatus,y),i.on(Z.client.isTrustedUpdated,y));async function b(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(xs(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let x=e.callTimeout??0,S=x>0?x:1/0,C,w={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+S;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&C.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new Fs(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${x}ms`)}for(;!v&&(t(),!(g||C.status!==`connected`));){let e=_;v=C.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(v=void 0),t}),await v}await v,t()}let o=_;if(r&&e.i&&!g&&C.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},ee=$u(e.transport??`auto`,s);C=ee===`static`?await mu({fetchJsonFromBases:b}):ee===`sse`?iu({...w,sseOptions:e.sseOptions}):Du({...w,wsOptions:e.wsOptions});let te;try{te=new BroadcastChannel(`devframe-auth`)}catch{}let ne,T=!1;function re(e){return((...t)=>T||!ne?e(...t):ne.then(()=>e(...t)))}function E(){g=!0,y();try{h?.(),m?.()}finally{try{te?.close()}finally{C.close?.()}}}let D={events:i,get isTrusted(){return C.isTrusted},get status(){return C.status},get connectionError(){return C.connectionError},get transport(){return C.transport??ee},get connection(){return o},connectionMeta:s,ensureTrusted:C.ensureTrusted,requestTrust:C.requestTrust,requestTrustWithToken:async e=>(As(e),o={...o,authToken:e},C.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await C.requestTrustWithCode(e);if(!t)return!1;As(t),o={...o,authToken:t};try{te?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>C.requestAuthCode(e),call:re(C.call),callEvent:re(C.callEvent),callOptional:re(C.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:E};D.sharedState=vl(D),D.streaming=Su(D),D.services=Bs(D);let ie=new Map;D.scope=(e=>{if(!e)return D;let t=ie.get(e);return t||(t=Nu(D,e),ie.set(e,t)),t}),f.rpc=D;function O(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ae(){if(e.simpleAuth!==!1&&O()&&typeof globalThis.prompt==`function`)for(await D.requestAuthCode().catch(()=>{});!D.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await D.requestTrustWithCode(t))return}}async function k(){let t=await C.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await zs(D,{param:n}):!1;t||r||D.isTrusted||await ae()}return ne=k().then(()=>{T=!0},()=>{T=!0}),s.mcp&&Qu(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-DL0_Xrt_.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(D))}).catch(()=>{}),te&&(te.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&D.requestTrustWithToken(e.data.authToken)}),D}var td=ed;function nd(){if(window.parent===window)return()=>{};let e=document.documentElement,t=e.style.getPropertyValue(`--devframe-primary`),n=e.style.getPropertyPriority(`--devframe-primary`),r=!1,i=!1;return Ps().then(({connectionMeta:t})=>{let n=t.configs?.ui?.branding?.primaryColor;!r&&n&&CSS.supports(`color`,n)&&(e.style.setProperty(`--devframe-primary`,n),i=!0)}).catch(()=>{}),()=>{r=!0,i&&(t?e.style.setProperty(`--devframe-primary`,t,n):e.style.removeProperty(`--devframe-primary`))}}var rd=Jn({__name:`FeedbackSpinner`,props:{size:{default:`1em`}},setup(e){let t=e,n=X(()=>typeof t.size==`number`?`${t.size}px`:t.size);return(e,t)=>(W(),G(`span`,{class:`border-2 border-current border-t-transparent rounded-full inline-block animate-spin`,style:le({width:n.value,height:n.value}),role:`status`,"aria-label":`Loading`},null,4))}}),id=Jn({__name:`ActionButton`,props:{as:{},to:{},href:{},icon:{},variant:{default:`action`},size:{default:`md`},loading:{type:Boolean},disabled:{type:Boolean}},setup(e){let t=e,n=X(()=>t.as?t.as:t.href!=null||t.to!=null?`a`:`button`),r=X(()=>n.value===`a`),i=X(()=>n.value===`button`),a=X(()=>t.size===`sm`),o=X(()=>t.variant===`primary`?a.value?`btn-primary text-sm`:`btn-primary`:t.variant===`text`?a.value?`btn-text text-sm`:`btn-text`:a.value?`btn-action-sm`:`btn-action`),s=X(()=>t.disabled||t.loading);return(t,a)=>(W(),qi(br(n.value),{class:A([o.value,{"pointer-events-none op-mute":s.value&&!i.value}]),href:r.value?e.href??e.to:void 0,to:e.as&&e.to!=null?e.to:void 0,disabled:i.value?s.value:void 0,"aria-disabled":s.value||void 0,"aria-busy":e.loading||void 0},{default:An(()=>[e.loading?(W(),qi(rd,{key:0,size:`1em`})):e.icon?(W(),G(`span`,{key:1,class:A(e.icon),"aria-hidden":`true`},null,2)):na(``,!0),wr(t.$slots,`default`)]),_:3},8,[`class`,`href`,`to`,`disabled`,`aria-disabled`,`aria-busy`]))}}),ad={key:0,class:`absolute inset-0 z-nav flex flex-col items-center justify-center gap-4 p-8 text-center bg-base color-base font-sans`},od={class:`flex flex-col gap-1`},sd={class:`text-lg font-medium`},cd={class:`text-sm color-muted max-w-sm`},ld={key:0,class:`mt-1 max-w-sm break-words font-mono text-xs color-faint`},ud=Jn({__name:`ConnectionOverlay`,props:{status:{},error:{}},setup(e){let t=e,n={connecting:{icon:`i-ph-plugs-connected-duotone`,title:`Connecting…`,body:`Establishing a connection to the devframe server.`},disconnected:{icon:`i-ph-plugs-duotone`,title:`Disconnected`,body:`Lost the connection to the devframe server. Reload once it is back up.`},unauthorized:{icon:`i-ph-lock-key-duotone`,title:`Not authorized`,body:`Reopen the link printed by your dev server, then reload.`},error:{icon:`i-ph-warning-octagon-duotone`,title:`Connection failed`,body:`Could not reach the devframe server.`}},r=X(()=>n[t.status]);return(t,n)=>e.status!==`connected`&&r.value?(W(),G(`div`,ad,[K(`div`,{class:A([r.value.icon,`text-4xl color-active`])},null,2),K(`div`,od,[K(`p`,sd,j(r.value.title),1),K(`p`,cd,j(r.value.body),1),e.error&&e.status===`error`?(W(),G(`code`,ld,j(e.error),1)):na(``,!0)]),e.status===`connecting`?na(``,!0):(W(),qi(id,{key:0,variant:`primary`,size:`sm`,onClick:n[0]||=()=>t.location.reload()},{default:An(()=>[...n[1]||=[J(` Reload `,-1)]]),_:1}))])):na(``,!0)}}),dd=Jn({__name:`EditorFrame`,props:{connect:{},port:{}},setup(e){let t=e,n=Kt(null),r=null;function i(){return t.connect.url?t.connect.url:t.port==null?null:`${location.protocol}//${location.hostname}:${t.port}${t.connect.path??`/`}`}function a(){let e=i();if(e&&n.value&&e!==r){if(t.connect.cookie){let{name:e,value:n}=t.connect.cookie;document.cookie=`${e}=${n}; path=/; SameSite=Lax`}r=e,n.value.src=e}}return lr(a),Ln(()=>[t.connect,t.port],a,{deep:!0}),(e,t)=>(W(),G(`iframe`,{ref_key:`frame`,ref:n,class:`h-full w-full border-0 bg-base`,title:`Editor`,allow:`clipboard-read; clipboard-write; cross-origin-isolated`},null,512))}}),fd={class:`absolute inset-0 flex of-y-auto p-6 box-border bg-base color-base font-sans`},pd={class:`m-auto w-full max-w-[560px]`},md={class:`flex items-center gap-1.5 mb-2.5 text-xs tracking-wider uppercase color-muted`},hd={key:0,class:`flex items-center gap-2.5`},gd={class:`flex items-center gap-2.5`},_d={class:`text-sm color-muted`},vd={key:0,class:`mt-4 px-3.5 py-3 rounded-md border border-base bg-secondary text-sm`},yd={class:`flex flex-wrap items-center gap-x-2 gap-y-1`},bd=[`href`],xd={class:`font-mono color-base px-1.5 py-0.5 rounded bg-base border border-base tracking-wider`},Sd={class:`flex flex-col gap-3 mb-5`},Cd={class:`block mb-1 text-xs color-muted`},wd={class:`flex items-center gap-2 px-2.5 py-2 rounded-md border border-base bg-secondary`},Td={class:`flex-1 of-x-auto whitespace-nowrap font-mono text-xs color-base`},Ed={class:`flex flex-wrap items-center gap-2.5`},Dd={class:`mb-5 text-sm leading-relaxed color-muted`},Od={key:0,class:`mb-4 px-3 py-2.5 rounded-md border border-error/35 bg-error/10 text-error text-sm whitespace-pre-wrap break-words`},kd={class:`flex flex-wrap gap-x-4 gap-y-1.5 mb-5 text-xs color-muted`},Ad={class:`font-mono color-base`},jd={key:0},Md={class:`font-mono color-base`},Nd={key:1},Pd={class:`font-mono color-base`},Fd={class:`font-mono color-base`},Id=`https://coder.com/docs/code-server/latest/install`,Ld=`https://github.com/coder/code-server`,Rd=Jn({__name:`LauncherView`,props:{phase:{},detection:{},server:{},busy:{type:Boolean},canViewInTerminal:{type:Boolean}},emits:[`launch`,`recheck`,`viewInTerminal`],setup(e,{emit:t}){let n=e,r=t,i=[{label:`Install script (Linux / macOS)`,command:`curl -fsSL https://code-server.dev/install.sh | sh`},{label:`npm`,command:`npm install -g code-server`},{label:`Homebrew`,command:`brew install code-server`}],a=Kt(null);function o(e){navigator.clipboard?.writeText(e).then(()=>{a.value=e,setTimeout(()=>{a.value===e&&(a.value=null)},1200)}).catch(()=>{})}let s=X(()=>n.detection.mode===`tunnel`?`tunnel`:n.detection.backend===`ms-code-serve-web`?`code serve-web`:`code-server`),c=X(()=>n.server.status===`error`?n.server.error:void 0);return(t,n)=>(W(),G(`div`,fd,[K(`div`,pd,[K(`p`,md,[n[3]||=K(`span`,{class:`i-ph-code-duotone text-sm`},null,-1),K(`span`,null,j(s.value),1)]),e.phase===`connecting`?(W(),G(`div`,hd,[q(rd,{size:`1rem`,class:`color-muted`}),n[4]||=K(`span`,{class:`text-sm color-muted`},`Connecting to devframe…`,-1)])):e.phase===`starting`?(W(),G(H,{key:1},[K(`div`,gd,[q(rd,{size:`1rem`,class:`color-muted`}),K(`span`,_d,j(e.detection.mode===`tunnel`?`Opening the tunnel…`:`Starting the editor…`),1),e.canViewInTerminal?(W(),qi(id,{key:0,variant:`text`,size:`sm`,icon:`i-ph-terminal-window-duotone`,onClick:n[0]||=e=>r(`viewInTerminal`)},{default:An(()=>[...n[5]||=[J(` View in terminal `,-1)]]),_:1})):na(``,!0)]),e.server.login?(W(),G(`div`,vd,[n[9]||=K(`p`,{class:`mb-2 color-muted`},` Authorize the tunnel to continue: `,-1),K(`p`,yd,[n[7]||=K(`span`,{class:`color-muted`},`Open`,-1),K(`a`,{href:e.server.login.url,target:`_blank`,rel:`noreferrer`,class:`color-active hover:underline underline-offset-2 inline-flex items-center gap-1`},[J(j(e.server.login.url)+` `,1),n[6]||=K(`span`,{class:`i-ph-arrow-square-out size-3.5`},null,-1)],8,bd),n[8]||=K(`span`,{class:`color-muted`},`and enter code`,-1),K(`code`,xd,j(e.server.login.code),1)])])):na(``,!0)],64)):e.phase===`not-installed`?(W(),G(H,{key:2},[n[12]||=ta(`<h1 class="mb-2 text-[1.35rem] font-semibold"> No editor found </h1><p class="mb-5 text-sm leading-relaxed color-muted"> Install <code class="font-mono color-base">code-server</code> (VS Code in the browser), or the Microsoft <code class="font-mono color-base">code</code> CLI for <code class="font-mono color-base">code serve-web</code>. Pick whichever fits your setup, then re-check. </p>`,2),K(`div`,Sd,[(W(),G(H,null,Cr(i,({label:e,command:t})=>K(`div`,{key:e},[K(`label`,Cd,j(e),1),K(`div`,wd,[K(`code`,Td,j(t),1),q(id,{variant:`action`,size:`sm`,class:`shrink-0 text-[11px]`,onClick:e=>o(t)},{default:An(()=>[J(j(a.value===t?`Copied`:`Copy`),1)]),_:2},1032,[`onClick`])])])),64))]),K(`div`,Ed,[q(id,{variant:`primary`,icon:e.busy?void 0:`i-ph-arrows-clockwise`,loading:e.busy,disabled:e.busy,onClick:n[1]||=e=>r(`recheck`)},{default:An(()=>[J(j(e.busy?`Checking…`:`Re-check`),1)]),_:1},8,[`icon`,`loading`,`disabled`]),q(id,{variant:`text`,size:`sm`,href:Id,target:`_blank`,rel:`noreferrer`,icon:`i-ph-arrow-square-out`},{default:An(()=>[...n[10]||=[J(` Installation docs `,-1)]]),_:1}),q(id,{variant:`text`,size:`sm`,href:Ld,target:`_blank`,rel:`noreferrer`,icon:`i-ph-github-logo`},{default:An(()=>[...n[11]||=[J(` GitHub `,-1)]]),_:1})])],64)):(W(),G(H,{key:3},[n[17]||=K(`h1`,{class:`mb-2 text-[1.35rem] font-semibold`},` Launch the editor `,-1),K(`p`,Dd,j(e.detection.mode===`tunnel`?`Open a code tunnel and edit this workspace from the hosted vscode.dev editor, right here.`:`Start an editor scoped to this workspace and open VS Code right here, signed in automatically.`),1),c.value?(W(),G(`div`,Od,j(c.value),1)):na(``,!0),K(`div`,kd,[K(`span`,null,[n[13]||=J(`mode `,-1),K(`code`,Ad,j(e.detection.mode),1)]),e.detection.mode===`local`?(W(),G(`span`,jd,[n[14]||=J(`backend `,-1),K(`code`,Md,j(e.detection.backend),1)])):na(``,!0),e.detection.version?(W(),G(`span`,Nd,[n[15]||=J(`version `,-1),K(`code`,Pd,j(e.detection.version),1)])):na(``,!0),K(`span`,null,[n[16]||=J(`binary `,-1),K(`code`,Fd,j(e.detection.bin),1)])]),q(id,{variant:`primary`,icon:e.busy?void 0:`i-ph-rocket-launch-duotone`,loading:e.busy,disabled:e.busy,onClick:n[2]||=e=>r(`launch`)},{default:An(()=>[J(j(e.busy?`Starting…`:e.detection.mode===`tunnel`?`Open tunnel`:`Launch editor`),1)]),_:1},8,[`icon`,`loading`,`disabled`])],64))])]))}}),zd=`devframes:plugin:code-server:state`,Bd=Ft({connected:!1,status:`connecting`,error:null,backend:null}),Vd=qt(null);function Hd(e){Bd.status=e.status,Bd.connected=e.status===`connected`,Bd.error=e.connectionError?.message??null}async function Ud(){try{let e=await td();Vd.value=e,Bd.backend=e.connectionMeta.backend,Hd(e),e.events.on(`connection:status`,()=>Hd(e)),e.connectionMeta.backend===`websocket`&&e.ensureTrusted(5e3).catch(()=>{})}catch(e){Bd.status=`error`,Bd.error=e?.message??String(e)}}function Wd(){return Vd}var Gd=`devframes:plugin:code-server:detect`,Kd=`devframes:plugin:code-server:status`,qd=`devframes:plugin:code-server:start`,Jd=`devframes:plugin:code-server:stop`,Yd=`devframe:docks`,Xd=`devframes_plugin_terminals`,Zd=`hub:docks:activate`;function Qd(){let e=Wd(),t=Ft({checked:!1,installed:!1,bin:`code-server`,backend:`code-server`,mode:`local`}),n=Ft({status:`stopped`}),r=qt(void 0),i=Kt(!1),a=Kt(!1),o=X(()=>a.value&&!!n.terminalSessionId),s=X(()=>n.status===`running`?r.value?`running`:`starting`:n.status===`starting`||i.value&&n.status!==`error`?`starting`:t.checked?t.installed?`launch`:`not-installed`:`connecting`);function c(e){e&&(Object.assign(t,e.detection),Object.assign(n,e.server),e.connect&&(r.value=e.connect))}async function l(t,...r){let i=e.value;if(i)try{return await i.call(t,...r)}catch(e){n.status=`error`,n.error=e instanceof Error?e.message:String(e);return}}async function u(){if(!i.value){i.value=!0;try{c(await l(qd,{}))}finally{i.value=!1}}}async function d(){if(!i.value){i.value=!0;try{c(await l(Jd)),r.value=void 0}finally{i.value=!1}}}async function f(){let e=n.terminalSessionId;e&&await l(Zd,{dockId:Xd,params:{sessionId:e}})}async function p(){if(!i.value){i.value=!0;try{await l(Gd)}finally{i.value=!1}}}async function m(){c(await l(Kd));let i=e.value;if(!i)return;let a=await i.sharedState.get(zd,{initialValue:{detection:t,server:n}}),o=a.value();Object.assign(t,o.detection),Object.assign(n,o.server);let s=a.on(`updated`,e=>{Object.assign(t,e.detection),Object.assign(n,e.server),n.status===`running`&&!r.value&&l(Kd).then(e=>{e?.connect&&(r.value=e.connect)}),n.status!==`running`&&(r.value=void 0)});Ee(()=>s?.()),await h(i)}async function h(e){let t=e=>Array.isArray(e)&&e.some(e=>e?.id===Xd);try{let n=await e.sharedState.get(Yd,{initialValue:[]});a.value=t(n.value());let r=n.on(`updated`,e=>{a.value=t(e)});Ee(()=>r?.())}catch{}}return{detection:t,server:n,connect:r,busy:i,phase:s,canViewInTerminal:o,launch:u,stop:d,recheck:p,viewInTerminal:f,bootstrap:m}}var $d={class:`relative h-full w-full of-hidden bg-base color-base`},ef=Jn({__name:`App`,setup(e,{expose:t}){let{detection:n,server:r,connect:i,busy:a,phase:o,canViewInTerminal:s,launch:c,stop:l,recheck:u,viewInTerminal:d,bootstrap:f}=Qd(),p=X(()=>!!i.value);return lr(async()=>{await Ud(),await f()}),t({stop:l}),(e,t)=>(W(),G(`div`,$d,[p.value?jn((W(),qi(dd,{key:0,connect:L(i),port:L(r).port},null,8,[`connect`,`port`])),[[Ha,L(o)===`running`]]):na(``,!0),L(o)===`running`?na(``,!0):(W(),qi(Rd,{key:1,phase:L(o),detection:L(n),server:L(r),busy:L(a),"can-view-in-terminal":L(s),onLaunch:L(c),onRecheck:L(u),onViewInTerminal:L(d)},null,8,[`phase`,`detection`,`server`,`busy`,`can-view-in-terminal`,`onLaunch`,`onRecheck`,`onViewInTerminal`])),q(ud,{status:L(Bd).status,error:L(Bd).error},null,8,[`status`,`error`])]))}}),tf=window.matchMedia(`(prefers-color-scheme: dark)`);function nf(e){document.documentElement.classList.toggle(`dark`,e),document.documentElement.classList.toggle(`light`,!e)}nf(tf.matches),tf.addEventListener(`change`,e=>nf(e.matches)),xo(ef).mount(`#app`),nd();export{Hs as t};
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <base href="./" />
7
7
  <title>Code Server</title>
8
- <script type="module" crossorigin src="./assets/index-BMYAbf4V.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-CMSPcnRq.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-uU8MSFDm.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/plugin-code-server--assets",
3
3
  "type": "module",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "description": "Prebuilt browser assets (SPA) for @devframes/plugin-code-server, served on demand through devframe's remote-assets back-proxy.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -1,3 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),ee=e=>x(e).slice(8,-1),S=e=>x(e)===`[object Object]`,C=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,te=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ne=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},re=/-\w/g,w=ne(e=>e.replace(re,e=>e.slice(1).toUpperCase())),ie=/\B([A-Z])/g,T=ne(e=>e.replace(ie,`-$1`).toLowerCase()),E=ne(e=>e.charAt(0).toUpperCase()+e.slice(1)),ae=ne(e=>e?`on${E(e)}`:``),D=(e,t)=>!Object.is(e,t),oe=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},O=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},se=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ce,le=()=>ce||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ue(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?me(r):ue(r);if(i)for(let e in i)t[e]=i[e]}return t}if(g(e)||v(e))return e}var de=/;(?![^(]*\))/g,fe=/:([^]+)/,pe=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function me(e){let t={};return e.replace(pe,e=>e.startsWith(`/*`)?``:e).split(de).forEach(e=>{if(e){let n=e.split(fe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function k(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=k(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var he=e(`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function ge(e){return!!e||e===``}function _e(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=xe(e[i],t[i],n);return r}function ve(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&xe(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function ye(e,t,n){let r=f(e),i=f(t);if(r||i||(r=p(e),i=p(t),r||i))return r&&i?ve(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!xe(e[r],t[r],n))return!1}return String(e)===String(t)}function be(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function xe(e,t,n){if(e===t)return!0;let r=m(e),i=m(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=_(e),i=_(t),r||i?e===t:(r=d(e),i=d(t),r||i?r&&i?be(e,t,n,_e):!1:(r=v(e),i=v(t),r||i?!r||!i?!1:be(e,t,n,ye):String(e)===String(t))))}var Se=e=>!!(e&&e.__v_isRef===!0),A=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?Se(e)?A(e.value):JSON.stringify(e,Ce,2):String(e),Ce=(e,t)=>Se(t)?Ce(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[we(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>we(e))}:_(t)?we(t):v(t)&&!d(t)&&!S(t)?String(t):t,we=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,j,Te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&j&&(j.active?(this.parent=j,this.index=(j.scopes||(j.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=j;try{return j=this,e()}finally{j=t}}}on(){++this._on===1&&(this.prevScope=j,j=this)}off(){if(this._on>0&&--this._on===0){if(j===this)j=this.prevScope;else{let e=j;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ee(){return j}function De(e,t=!1){j&&j.cleanups.push(e)}var M,Oe=new WeakSet,ke=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,j&&(j.active?j.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Oe.has(this)&&(Oe.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ne(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ke(this),Ie(this);let e=M,t=He;M=this,He=!0;try{return this.fn()}finally{Le(this),M=e,He=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Be(e);this.deps=this.depsTail=void 0,Ke(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Oe.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Re(this)&&this.run()}get dirty(){return Re(this)}},Ae=0,je,Me;function Ne(e,t=!1){e.flags|=8,t?(e.next=Me,Me=e):(e.next=je,je=e)}function Pe(){Ae++}function Fe(){if(--Ae>0)return;if(Me){let e=Me;for(Me=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;je;){let t=je;for(je=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ie(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Le(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Be(r),Ve(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Re(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ze(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ze(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qe)||(e.globalVersion=qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Re(e))))return;e.flags|=2;let t=e.dep,n=M,r=He;M=e,He=!0;try{Ie(e);let n=e.fn(e._value);(t.version===0||D(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{M=n,He=r,Le(e),e.flags&=-3}}function Be(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Be(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ve(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var He=!0,Ue=[];function We(){Ue.push(He),He=!1}function Ge(){let e=Ue.pop();He=e===void 0||e}function Ke(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var qe=0,Je=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ye=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!M||!He||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Je(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,Xe(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=M.depsTail,t.nextDep=void 0,M.depsTail.nextDep=t,M.depsTail=t,M.deps===t&&(M.deps=e)}return t}trigger(e){this.version++,qe++,this.notify(e)}notify(e){Pe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Fe()}}};function Xe(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Xe(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ze=new WeakMap,Qe=Symbol(``),$e=Symbol(``),et=Symbol(``);function N(e,t,n){if(He&&M){let t=Ze.get(e);t||Ze.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ye),r.map=t,r.key=n),r.track()}}function tt(e,t,n,r,i,a){let o=Ze.get(e);if(!o){qe++;return}let s=e=>{e&&e.trigger()};if(Pe(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&C(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===et||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(et)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Qe)),f(e)&&s(o.get($e)));break;case`delete`:i||(s(o.get(Qe)),f(e)&&s(o.get($e)));break;case`set`:f(e)&&s(o.get(Qe))}}Fe()}function nt(e){let t=P(e);return t===e||(N(t,`iterate`,et),Ht(e))?t:Vt(e)?Bt(e)?t.map(e=>Kt(Gt(e))):t.map(Kt):t.map(Gt)}function rt(e){return N(e=P(e),`iterate`,et),e}function it(e,t){return Vt(e)?Kt(Bt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return lt(this,`every`,e,t,void 0,arguments)},filter(e,t){return lt(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return lt(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return lt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return lt(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return lt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return lt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return dt(this,`includes`,e)},indexOf(...e){return dt(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return dt(this,`lastIndexOf`,e)},map(e,t){return lt(this,`map`,e,t,void 0,arguments)},pop(){return ft(this,`pop`)},push(...e){return ft(this,`push`,e)},reduce(e,...t){return ut(this,`reduce`,e,t)},reduceRight(e,...t){return ut(this,`reduceRight`,e,t)},shift(){return ft(this,`shift`)},some(e,t){return lt(this,`some`,e,t,void 0,arguments)},splice(...e){return ft(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return ft(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t],a=i.call(r);if(r!==e&&!Ht(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>st(a.next(),n),i!==ct[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>st(a._next(),n)}return a}function st(e,t){return e.done||(e.value=t(e.value)),e}var ct=Array.prototype;function lt(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Ht(e),c=o[t];if(c!==ct[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function ut(e,t,n,r){let i=rt(e),a=i!==e&&!Ht(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function dt(e,t,n){let r=P(e);N(r,`iterate`,et);let i=r[t](...n);return(i===-1||i===!1)&&Ut(n[0])?(n[0]=P(n[0]),r[t](...n)):i}function ft(e,t,n=[]){We(),Pe();let r=P(e)[t].apply(e,n);return Fe(),Ge(),r}var pt=e(`__proto__,__v_isRef,__isVue`),mt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function ht(e){_(e)||(e=String(e));let t=P(this);return N(t,`has`,e),t.hasOwnProperty(e)}var gt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Pt:Nt:i?Mt:jt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return ht}let o=Reflect.get(e,t,F(e)?e:n);if((_(t)?mt.has(t):pt(t))||(r||N(e,`get`,t),i))return o;if(F(o)){let e=a&&C(t)?o:o.value;return r&&v(e)?Rt(e):e}return v(o)?r?Rt(o):It(o):o}},_t=class extends gt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&C(t);if(!this._isShallow){let e=Vt(i);if(!Ht(n)&&!Vt(n)&&(i=P(i),n=P(n)),!a&&F(i)&&!F(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,F(e)?e:r);return e===P(r)&&s&&(o?D(n,i)&&tt(e,`set`,t,n,i):tt(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&tt(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return _(t)&&mt.has(t)||N(e,`has`,t),n}ownKeys(e){return N(e,`iterate`,d(e)?`length`:Qe),Reflect.ownKeys(e)}},vt=class extends gt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},yt=new _t,bt=new vt,xt=new _t(!0),St=e=>e,Ct=e=>Reflect.getPrototypeOf(e);function wt(e,t,n){return function(...r){let i=this.__v_raw,a=P(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?St:t?Kt:Gt;return!t&&N(a,`iterate`,l?$e:Qe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Tt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Et(e,t){let n={get(n){let r=this.__v_raw,i=P(r),a=P(n);e||(D(n,a)&&N(i,`get`,n),N(i,`get`,a));let{has:o}=Ct(i),s=t?St:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&N(P(t),`iterate`,Qe),t.size},has(t){let n=this.__v_raw,r=P(n),i=P(t);return e||(D(t,i)&&N(r,`has`,t),N(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=P(a),s=t?St:e?Kt:Gt;return!e&&N(o,`iterate`,Qe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:Tt(`add`),set:Tt(`set`),delete:Tt(`delete`),clear:Tt(`clear`)}:{add(e){let n=P(this),r=Ct(n),i=P(e),a=!t&&!Ht(e)&&!Vt(e)?i:e;return r.has.call(n,a)||D(e,a)&&r.has.call(n,e)||D(i,a)&&r.has.call(n,i)||(n.add(a),tt(n,`add`,a,a)),this},set(e,n){t||Ht(n)||Vt(n)||(n=P(n));let r=P(this),{has:i,get:a}=Ct(r),o=i.call(r,e);o||=(e=P(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?D(n,s)&&tt(r,`set`,e,n,s):tt(r,`add`,e,n),this},delete(e){let t=P(this),{has:n,get:r}=Ct(t),i=n.call(t,e);i||=(e=P(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&tt(t,`delete`,e,void 0,a),o},clear(){let e=P(this),t=e.size!==0,n=e.clear();return t&&tt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=wt(r,e,t)}),n}function Dt(e,t){let n=Et(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(u(n,i)&&i in r?n:r,i,a)}var Ot={get:Dt(!1,!1)},kt={get:Dt(!1,!0)},At={get:Dt(!0,!1)},jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap;function Ft(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function It(e){return Vt(e)?e:zt(e,!1,yt,Ot,jt)}function Lt(e){return zt(e,!1,xt,kt,Mt)}function Rt(e){return zt(e,!0,bt,At,Nt)}function zt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Ft(ee(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Bt(e){return Vt(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function Vt(e){return!!(e&&e.__v_isReadonly)}function Ht(e){return!!(e&&e.__v_isShallow)}function Ut(e){return e?!!e.__v_raw:!1}function P(e){let t=e&&e.__v_raw;return t?P(t):e}function Wt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&O(e,`__v_skip`,!0),e}var Gt=e=>v(e)?It(e):e,Kt=e=>v(e)?Rt(e):e;function F(e){return e?e.__v_isRef===!0:!1}function qt(e){return Yt(e,!1)}function Jt(e){return Yt(e,!0)}function Yt(e,t){return F(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new Ye,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:P(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Ht(e)||Vt(e);e=n?e:P(e),D(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function I(e){return F(e)?e.value:e}var Zt={get:(e,t,n)=>t===`__v_raw`?e:I(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return F(i)&&!F(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Qt(e){return Bt(e)?e:new Proxy(e,Zt)}var $t=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ye(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&M!==this)return Ne(this,!0),!0}get value(){let e=this.dep.track();return ze(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function en(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new $t(r,i,n)}var tn={},nn=new WeakMap,rn=void 0;function an(e,t=!1,n=rn){if(n){let t=nn.get(n);t||nn.set(n,t=[]),t.push(e)}}function on(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Ht(e)||o===!1||o===0?sn(e,1):sn(e),m,g,_,v,y=!1,b=!1;if(F(e)?(g=()=>e.value,y=Ht(e)):Bt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Bt(e)||Ht(e)),g=()=>e.map(e=>{if(F(e))return e.value;if(Bt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){We();try{_()}finally{Ge()}}let t=rn;rn=m;try{return f?f(e,3,[v]):e(v)}finally{rn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>sn(e(),t)}let x=Ee(),ee=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{try{return e(...t)}finally{ee()}}}let S=b?Array(e.length).fill(tn):tn,C=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>D(e,S[t])):D(t,S))){let e=rn;We();try{_&&_(),rn=m;let e=[t,S===tn?void 0:b&&S[0]===tn?[]:S,v];S=t,f?f(n,3,e):n(...e)}finally{rn=e,Ge()}}}else m.run()}};return u&&u(C),m=new ke(g),m.scheduler=l?()=>l(C,!1):C,v=e=>an(e,!1,m),_=m.onStop=()=>{let e=nn.get(m);if(e){if(f)f(e,4);else for(let t of e)t();nn.delete(m)}},n?a?C(!0):S=m.run():l?l(C.bind(null,!0),!0):m.run(),ee.pause=m.pause.bind(m),ee.resume=m.resume.bind(m),ee.stop=ee,ee}function sn(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,F(e))sn(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)sn(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{sn(e,t,n)});else if(S(e)){for(let r in e)sn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&sn(e[r],t,n)}return e}function cn(e,t,n,r){try{return r?e(...r):e()}catch(e){un(e,t,n)}}function ln(e,t,n,r){if(h(e)){let i=cn(e,t,n,r);return i&&y(i)&&i.catch(e=>{un(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(ln(e[a],t,n,r));return i}}function un(e,n,r,i=!0){let a=n?n.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,a=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n){for(let t=0;t<n.length;t++)if(n[t](e,i,a)===!1)return}t=t.parent}if(o){We(),cn(o,null,10,[e,i,a]),Ge();return}}dn(e,r,a,i,s)}function dn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var L=[],fn=-1,pn=[],mn=null,hn=0,gn=Promise.resolve(),_n=null;function vn(e){let t=_n||gn;return e?t.then(this?e.bind(this):e):t}function yn(e){let t=fn+1,n=L.length;for(;t<n;){let r=t+n>>>1,i=L[r],a=Dn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function bn(e){if(!(e.flags&1)){let t=Dn(e),n=L[L.length-1];!n||!(e.flags&2)&&t>=Dn(n)?L.push(e):L.splice(yn(t),0,e),e.flags|=1,xn()}}function xn(){_n||=gn.then(On)}function Sn(e){if(!d(e))mn&&e.id===-1?mn.splice(hn+1,0,e):e.flags&1||(pn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)pn.push(e[t]);xn()}function Cn(e,t,n,r=fn+1){for(;r<L.length;r++){let n=L[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;L.splice(r,1),r=e?r-1:fn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function wn(e,t,n=0){if(pn.length){let e=pn,r=0;if(t){e=[];for(let i=0;i<pn.length;i++){let a=pn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?pn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>Dn(e)-Dn(t));if(pn.length=r,mn){for(let e=0;e<i.length;e++)mn.push(i[e]);return}for(mn=i,hn=0;hn<mn.length;hn++){let e=mn[hn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}mn=null,hn=0}}var Tn=!1;function En(e,t){if(Tn){e();return}let n=t===void 0?void 0:new Set(pn);e(),Tn=!0;try{Cn(void 0,t),wn(void 0,n,t)}finally{Tn=!1}}var Dn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function On(e){try{for(fn=0;fn<L.length;fn++){let e=L[fn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),cn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;fn<L.length;fn++){let e=L[fn];e&&(e.flags&=-2)}fn=-1,L.length=0,wn(e),_n=null,(L.length||pn.length)&&On(e)}}var R=null,kn=null;function An(e){let t=R;return R=e,kn=e&&e.type.__scopeId||null,t}function jn(e,t=R,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Gi(-1);let i=An(t),a=Hi.length,o;try{o=e(...n)}finally{for(let e=Hi.length;e>a;e--)Ui();An(i),r._d&&Gi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Mn(e,n){if(R===null)return e;let r=Ta(R),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&sn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Nn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(We(),ln(c,n,8,[e.el,s,e,t]),Ge())}}function Pn(e,t){if(J){let n=J.provides,r=J.parent&&J.parent.provides;r===n&&(n=J.provides=Object.create(r)),n[e]=t}}function Fn(e,t,n=!1){let r=fa();if(r||Yr){let i=Yr?Yr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}var In=Symbol.for(`v-scx`),Ln=()=>Fn(In);function Rn(e,t,n){return zn(e,t,n)}function zn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(va){if(c===`sync`){let e=Ln();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=J;u.call=(e,t,n)=>ln(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{e.i=p,B(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():bn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=on(e,n,u);return va&&(f?f.push(h):d&&h()),h}function Bn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Vn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=ha(this),s=zn(i,a.bind(r),n);return o(),s}function Vn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Hn=Symbol(`_vte`),Un=e=>e.__isTeleport,Wn=Symbol(`_leaveCb`);function Gn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Bi){t=n;break}}return t}function Kn(e){if(!nr(e))return Un(e.type)&&e.children?Gn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function qn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;qn(Un(n.type)&&Kn(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===V&&d(e.children)){let n=ni(e.children,!1);n&&qn(n,t)}}function Jn(e){if(e.component)return Jn(e.component.subTree);if(e.type===V){let t=d(e.children)&&ni(e.children,!1);return t?Jn(t):void 0}if(e.type!==Bi)return e}function Yn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Xn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Zn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Qn=new WeakMap;function $n(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>$n(e,n&&(d(n)?n[t]:n),r,a,o));return}if(tr(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&$n(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?Ta(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=P(v),b=v===t?i:e=>!Zn(_,e)&&u(y,e),x=(e,t)=>!(t&&Zn(_,t));if(m!=null&&m!==p){if(er(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(F(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))cn(p,f,12,[l,_]);else{let t=g(p),n=F(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Qn.delete(e)};t.id=-1,Qn.set(e,t),B(t,r)}else er(e),i()}}}function er(e){let t=Qn.get(e);t&&(t.flags|=8,Qn.delete(e))}le().requestIdleCallback,le().cancelIdleCallback;var tr=e=>!!e.type.__asyncLoader,nr=e=>e.type.__isKeepAlive;function rr(e,t){ar(e,`a`,t)}function ir(e,t){ar(e,`da`,t)}function ar(e,t,n=J){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(sr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)nr(e.parent.vnode)&&or(r,t,n,e),e=e.parent}}function or(e,t,n,r){let i=sr(t,e,r,!0);mr(()=>{c(r[t],i)},n)}function sr(e,t,n=J,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{We();let i=ha(n),a=ln(t,n,e,r);return i(),Ge(),a};return r?i.unshift(a):i.push(a),a}}var cr=e=>(t,n=J)=>{va&&e!==`sp`||sr(e,(...e)=>t(...e),n)},lr=cr(`bm`),ur=cr(`m`),dr=cr(`bu`),fr=cr(`u`),pr=cr(`bum`),mr=cr(`um`),hr=cr(`sp`),gr=cr(`rtg`),_r=cr(`rtc`);function vr(e,t=J){sr(`ec`,e,t)}var yr=`components`,br=Symbol.for(`v-ndc`);function xr(e){return g(e)?Sr(yr,e,!1)||e:e||br}function Sr(e,t,n=!0,r=!1){let i=R||J;if(i){let n=i.type;if(e===yr){let e=Ea(n,!1);if(e&&(e===t||e===w(t)||e===E(w(t))))return n}let a=Cr(i[e]||n[e],t)||Cr(i.appContext[e],t);return!a&&r?n:a}}function Cr(e,t){return e&&(e[t]||e[w(t)]||e[E(w(t))])}function wr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Bt(e),r=!1,s=!1;n&&(r=!Ht(e),s=Vt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Kt(Gt(e[n])):Gt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){if(!Number.isInteger(e)||e<0)i=[];else{i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}}else if(v(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function Tr(e,t,n,r,i,a){if(n??={},R.ce||R.parent&&tr(R.parent)&&R.parent.ce){let e=a!=null&&n.key==null?s({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),U(),qi(V,null,[K(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Hi.length;U();let l;try{let i=o&&Er(o(n)),s=n.key||a||i&&i.key;l=qi(V,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Hi.length;e>c;e--)Ui();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function Er(e){return e.some(e=>!Ji(e)||!(e.type===Bi||e.type===V&&!Er(e.children)))?e:null}var Dr=e=>e?_a(e)?Ta(e):Dr(e.parent):null,Or=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Dr(e.parent),$root:e=>Dr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Lr(e),$forceUpdate:e=>e.f||=()=>{bn(e.update)},$nextTick:e=>e.n||=vn.bind(e.proxy),$watch:e=>Bn.bind(e)}),kr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Ar={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(kr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else Mr&&(s[n]=0)}let d=Or[n],f,p;if(d)return n===`$attrs`&&N(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return kr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||kr(n,c)||u(o,c)||u(i,c)||u(Or,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function jr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Mr=!0;function Nr(e){let t=Lr(e),n=e.proxy,i=e.ctx;Mr=!1,t.beforeCreate&&Fr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:ee,destroyed:S,unmounted:C,render:te,renderTracked:ne,renderTriggered:re,errorCaptured:w,serverPrefetch:ie,expose:T,inheritAttrs:E,components:ae,directives:D,filters:oe}=t;if(u&&Pr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=It(t))}if(Mr=!0,o)for(let e in o){let t=o[e],a=Y({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Ir(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Pn(t,e[t])})}f&&Fr(f,e,`c`);function O(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O(lr,p),O(ur,m),O(dr,g),O(fr,_),O(rr,y),O(ir,b),O(vr,w),O(_r,ne),O(gr,re),O(pr,ee),O(mr,C),O(hr,ie),d(T)){if(T.length){let t=e.exposed||={};T.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}te&&e.render===r&&(e.render=te),E!=null&&(e.inheritAttrs=E),ae&&(e.components=ae),D&&(e.directives=D),ie&&Xn(e)}function Pr(e,t,n=r){d(e)&&(e=Hr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Fn(r.from||n,r.default,!0):Fn(r.from||n):Fn(r),F(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Fr(e,t,n){ln(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ir(e,t,n,r){let i=r.includes(`.`)?Vn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Rn(i,n)}else if(h(e))Rn(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Ir(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Rn(i,r,e)}}}function Lr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Rr(c,e,o,!0)),Rr(c,t,o)),v(t)&&a.set(t,c),c}function Rr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Rr(e,a,n,!0),i&&i.forEach(t=>Rr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=zr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var zr={data:Br,props:Wr,emits:Wr,methods:Ur,computed:Ur,beforeCreate:z,created:z,beforeMount:z,mounted:z,beforeUpdate:z,updated:z,beforeDestroy:z,beforeUnmount:z,destroyed:z,unmounted:z,activated:z,deactivated:z,errorCaptured:z,serverPrefetch:z,components:Ur,directives:Ur,watch:Gr,provide:Br,inject:Vr};function Br(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Vr(e,t){return Ur(Hr(e),Hr(t))}function Hr(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function z(e,t){return e?[...new Set([].concat(e,t))]:t}function Ur(e,t){return e?s(Object.create(null),e,t):t}function Wr(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),jr(e),jr(t??{})):t}function Gr(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=z(e[r],t[r]);return n}function Kr(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var qr=0;function Jr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Kr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:qr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Oa,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||K(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,Ta(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(ln(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=Yr;Yr=l;try{return e()}finally{Yr=t}}};return l}}var Yr=null,Xr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${w(t)}Modifiers`]||e[`${T(t)}Modifiers`];function Zr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Xr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(se)));let c,l=i[c=ae(n)]||i[c=ae(w(n))];!l&&o&&(l=i[c=ae(T(n))]),l&&ln(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,ln(u,e,6,a)}}var Qr=new WeakMap;function $r(e,t,n=!1){let r=n?Qr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=$r(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function ei(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,T(t))||u(e,t))}function ti(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=An(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ra(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ra(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ri(c)}}catch(t){Hi.length=0,un(t,e,1),v=K(Bi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=ii(y,a)),b=ea(b,y,!1,!0))}return n.dirs&&(b=ea(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&qn(Un(b.type)&&Kn(b)||b,n.transition),v=b,An(_),v}function ni(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(Ji(r)){if(r.type!==Bi||r.children===`v-if`){if(n)return;n=r}}else return}return n}var ri=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},ii=(e,t)=>{let n={};for(let r in e)o(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function ai(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?oi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(si(o,r,n)&&!ei(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||oi(r,o,l):!!o;return!1}function oi(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!u(e,a)||si(t,e,a)&&!ei(n,a))return!0}return!1}function si(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!xe(r,i):r!==i}function ci({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var li={},ui=()=>Object.create(li),di=e=>Object.getPrototypeOf(e)===li;function fi(e,t,n,r=!1){let i={},a=ui();e.propsDefaults=Object.create(null),mi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Lt(i):e.type.props?i:a,e.attrs=a}function pi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=P(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(ei(e.emitsOptions,o))continue;let d=t[o];if(c){if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=w(o);i[t]=hi(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{mi(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(u(t,a)||(r=T(a))!==a&&u(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=hi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&u(t,e)||(delete a[e],l=!0)}l&&tt(e.attrs,`set`,``)}function mi(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(te(t))continue;let l=n[t],d;a&&u(a,d=w(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:ei(e.emitsOptions,t)||t in i&&l===i[t]||(i[t]=l,s=!0)}if(o){let n=P(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=hi(a,n,s,i[s],e,!u(i,s))}}return s}function hi(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=ha(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===T(n))&&(r=!0))}return r}var gi=new WeakMap;function _i(e,r,i=!1){let a=i?gi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=_i(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=w(c[e]);vi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=w(e);if(vi(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function vi(e){return e[0]!==`$`&&!te(e)}var yi=e=>e===`_`||e===`_ctx`||e===`$stable`,bi=e=>d(e)?e.map(ra):[ra(e)],xi=(e,t,n)=>{if(t._n)return t;let r=jn((...e)=>bi(t(...e)),n);return r._c=!1,r},Si=(e,t,n)=>{let r=e._ctx;for(let n in e){if(yi(n))continue;let i=e[n];if(h(i))t[n]=xi(n,i,r);else if(i!=null){let e=bi(i);t[n]=()=>e}}},Ci=(e,t)=>{let n=bi(t);e.slots.default=()=>n},wi=(e,t,n)=>{for(let r in t)(n||!yi(r))&&(e[r]=t[r])},Ti=(e,t,n)=>{let r=e.slots=ui();if(e.vnode.shapeFlag&32){let e=t._;e?(wi(r,t,n),n&&O(r,`_`,e,!0)):Si(t,r)}else t&&Ci(e,t)},Ei=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:wi(a,n,r):(o=!n.$stable,Si(n,a)),s=n}else n&&(Ci(e,n),s={default:1});if(o)for(let e in a)!yi(e)&&s[e]==null&&delete a[e]},B=Ri;function Di(e){return Oi(e)}function Oi(e,i){let a=le();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,r,i=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Yi(e,t)&&(i=ye(e),k(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===n&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case zi:y(e,t,r,i);break;case Bi:b(e,t,r,i);break;case Vi:e??x(t,r,i,s);break;case V:ae(e,t,r,i,a,o,s,c,l);break;default:f&1?C(e,t,r,i,a,o,s,c,l):f&6?D(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,xe)}d!=null&&a?$n(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&$n(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},ee=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},C=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)ne(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ie(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},ne=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&w(e.children,d,null,r,i,ki(e,a),s,u),_&&Nn(e,null,r,`created`),re(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!te(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&sa(f,r,e)}_&&Nn(e,null,r,`beforeMount`);let v=ji(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&B(()=>{try{f&&sa(f,r,e),v&&g.enter(d),_&&Nn(e,null,r,`mounted`)}finally{}},i)},re=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Li(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;re(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?ia(e[l]):ra(e[l]);v(null,c,t,n,r,i,a,o,s)}},ie=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&Ai(r,!1),(g=h.onVnodeBeforeUpdate)&&sa(g,r,n,e),f&&Nn(n,e,r,`beforeUpdate`),r&&Ai(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?T(e.dynamicChildren,d,l,r,i,ki(n,a),o):s||de(e,n,l,null,r,i,ki(n,a),o,!1),u>0){if(u&16)E(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&E(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&B(()=>{g&&sa(g,r,n,e),f&&Nn(n,e,r,`updated`)},i)},T=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||Ii(c),d=u&&(c.type===V||!Yi(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},E=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!te(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(te(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ae=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),w(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(T(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Mi(e,t,!0)):de(e,t,n,f,i,a,s,c,l)},D=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):O(t,n,r,i,a,o,c):se(e,t,c)},O=(e,t,n,r,i,a,o)=>{let s=e.component=da(e,r,i);if(nr(e)&&(s.ctx.renderer=xe),ya(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ce,o,a),!e.el){let r=s.subTree=K(Bi);b(null,r,t,n),e.placeholder=r.el}}else ce(s,e,t,n,i,a,o)},se=(e,t,n)=>{let r=t.component=e.component;if(ai(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,ue(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},ce=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Pi(e);if(n){t&&(t.el=c.el,ue(e,t,o)),n.asyncDep.then(()=>{B(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ai(e,!1),t?(t.el=c.el,ue(e,t,o)):t=c,n&&oe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&sa(d,s,t,c),Ai(e,!0);let f=ti(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&ci(e,f.el),r&&B(r,i),(d=t.props&&t.props.onVnodeUpdated)&&B(()=>sa(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=tr(t);if(Ai(e,!1),l&&oe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&sa(o,d,t),Ai(e,!0),s&&A){let t=()=>{e.subTree=ti(e),A(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ti(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&B(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;B(()=>sa(o,d,e),i)}(t.shapeFlag&256||d&&tr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&B(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ke(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>bn(u),Ai(e,!0),l()},ue=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,pi(e,t.props,r,n),Ei(e,t.children,n),We(),Cn(e),Ge()},de=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){pe(l,d,n,r,i,a,o,s,c);return}if(f&256){fe(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ve(l,i,a),d!==l&&p(n,d)):u&16?m&16?pe(l,d,n,r,i,a,o,s,c):ve(l,i,a,!0):(u&8&&p(n,``),m&16&&w(d,n,r,i,a,o,s,c))},fe=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let n=t[p]=l?ia(t[p]):ra(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?ve(e,a,o,!0,!1,f):w(t,r,i,a,o,s,c,l,f)},pe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?ia(t[u]):ra(t[u]);if(Yi(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?ia(t[p]):ra(t[p]);if(Yi(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?ia(t[u]):ra(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)k(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ia(t[u]):ra(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,ee=0,S=Array(b);for(u=0;u<b;u++)S[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){k(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(S[_-h]===0&&Yi(n,t[_])){i=_;break}i===void 0?k(n,a,o,!0):(S[i-h]=u+1,i>=ee?ee=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let C=x?Ni(S):n;for(_=C.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Ii(f):i;S[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==C[_]?me(n,r,p,2):_--)}}},me=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)me(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,xe);else if(c===V){o(a,t,n);for(let e=0;e<u.length;e++)me(u[e],t,n,r);o(e.anchor,t,n)}else if(c===Vi)ee(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Wn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),B(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Wn];a._isLeaving&&a[Wn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},k=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(We(),$n(s,null,n,e,!0),Ge()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!tr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&sa(_,t,e),u&6)_e(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Nn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==V||d>0&&d&64)?ve(l,t,n,!1,!0):(a===V&&d&384||!i&&u&16)&&ve(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&B(()=>{_&&sa(_,t,e),h&&Nn(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===V;if(a&&!i){ge(n,r);return}if(t===Vi){S(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?Jn(e):e,c=()=>{a?m(n)&&ge(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},ge=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},_e=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Fi(c),Fi(l),r&&oe(r),i.stop(),a?(a.flags|=8,k(o,e,t,n)):e.vnode.el&&o&&(o.transition=e.vnode.transition,k(o,e,t,n)),s&&B(s,t),B(()=>{e.isUnmounted=!0},t)},ve=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)k(e[o],t,n,r,i)},ye=e=>{if(e.shapeFlag&6)return ye(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Hn];return n?h(n):t},be=(e,t,n)=>{En(()=>{e==null?t._vnode&&k(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:ua())},xe={p:v,um:k,m:me,r:he,mt:O,mc:w,pc:de,pbc:T,n:ye,o:e},Se,A;return i&&([Se,A]=i(xe)),{render:be,hydrate:Se,createApp:Jr(be,Se)}}function ki({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Ai({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ji(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Mi(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=ia(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Mi(t,a)),a.type===zi&&(a.patchFlag===-1&&(a=i[e]=ia(a)),a.el=t.el),a.type===Bi&&!a.el&&(a.el=t.el)}}function Ni(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Pi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Pi(t)}function Fi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ii(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Ii(t.subTree):null}var Li=e=>e.__isSuspense;function Ri(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):Sn(e)}var V=Symbol.for(`v-fgt`),zi=Symbol.for(`v-txt`),Bi=Symbol.for(`v-cmt`),Vi=Symbol.for(`v-stc`),Hi=[],H=null;function U(e=!1){Hi.push(H=e?null:[])}function Ui(){Hi.pop(),H=Hi[Hi.length-1]||null}var Wi=1;function Gi(e,t=!1){Wi+=e,e<0&&H&&t&&(H.hasOnce=!0)}function Ki(e){return e.dynamicChildren=Wi>0?H||n:null,Ui(),Wi>0&&H&&H.push(e),e}function W(e,t,n,r,i,a){return Ki(G(e,t,n,r,i,a,!0))}function qi(e,t,n,r,i){return Ki(K(e,t,n,r,i,!0))}function Ji(e){return e?e.__v_isVNode===!0:!1}function Yi(e,t){return e.type===t.type&&e.key===t.key}var Xi=({key:e})=>e??null,Zi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||F(e)||h(e)?{i:R,r:e,k:t,f:!!n}:e);function G(e,t=null,n=null,r=0,i=null,a=e===V?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xi(t),ref:t&&Zi(t),scopeId:kn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:R};return s?(aa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Wi>0&&!o&&H&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&H.push(c),c}var K=Qi;function Qi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==br||(e=Bi),Ji(e)){let r=ea(e,t,!0);return n&&aa(r,n),Wi>0&&!a&&H&&(r.shapeFlag&6?H[H.indexOf(e)]=r:H.push(r)),r.patchFlag=-2,r}if(Da(e)&&(e=e.__vccOpts),t){t=$i(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=k(e)),v(n)&&(Ut(n)&&!d(n)&&(n=s({},n)),t.style=ue(n))}let o=g(e)?1:Li(e)?128:Un(e)?64:v(e)?4:h(e)?2:0;return G(e,t,n,r,i,o,a,!0)}function $i(e){return e?Ut(e)||di(e)?s({},e):e:null}function ea(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?oa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Xi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Zi(t)):[a,Zi(t)]:Zi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==V?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ea(e.ssContent),ssFallback:e.ssFallback&&ea(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&qn(u,c.clone(u)),u}function q(e=` `,t=0){return K(zi,null,e,t)}function ta(e,t){let n=K(Vi,null,e);return n.staticCount=t,n}function na(e=``,t=!1){return t?(U(),qi(Bi,null,e)):K(Bi,null,e)}function ra(e){return e==null||typeof e==`boolean`?K(Bi):d(e)?K(V,null,e.slice()):Ji(e)?ia(e):K(zi,null,String(e))}function ia(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ea(e)}function aa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),aa(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!di(t)?t._ctx=R:r===3&&R&&(R.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){aa(e,{default:t});return}t={default:t,_ctx:R},n=32}else t=String(t),r&64?(n=16,t=[q(t)]):n=8;e.children=t,e.shapeFlag|=n}function oa(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=k([t.class,r.class]));else if(e===`style`)t.style=ue([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function sa(e,t,n,r=null){ln(e,t,7,[n,r])}var ca=Kr(),la=0;function ua(){return la}function da(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ca,o={uid:la++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Te(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:_i(i,a),emitsOptions:$r(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=n?n.root:o,o.emit=Zr.bind(null,o),e.ce&&e.ce(o),o}var J=null,fa=()=>J||R,pa,ma;{let e=le(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};pa=t(`__VUE_INSTANCE_SETTERS__`,e=>J=e),ma=t(`__VUE_SSR_SETTERS__`,e=>va=e)}var ha=e=>{let t=J;return pa(e),e.scope.on(),()=>{e.scope.off(),pa(t)}},ga=()=>{J&&J.scope.off(),pa(null)};function _a(e){return e.vnode.shapeFlag&4}var va=!1;function ya(e,t=!1,n=!1){t&&ma(t);let{props:r,children:i}=e.vnode,a=_a(e);fi(e,r,a,t),Ti(e,i,n||t);let o=a?ba(e,t):void 0;return t&&ma(!1),o}function ba(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ar);let{setup:r}=n;if(r){We();let n=e.setupContext=r.length>1?wa(e):null,i=ha(e),a=cn(r,e,0,[e.props,n]),o=y(a);if(Ge(),i(),(o||e.sp)&&!tr(e)&&Xn(e),o){if(a.then(ga,ga),t)return a.then(n=>{ma(!0);try{xa(e,n,t)}finally{ma(!1)}}).catch(t=>{un(t,e,0)});e.asyncDep=a}else xa(e,a,t)}else Sa(e,t)}function xa(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Qt(t)),Sa(e,n)}function Sa(e,t,n){let i=e.type;e.render||=i.render||r;{let t=ha(e);We();try{Nr(e)}finally{Ge(),t()}}}var Ca={get(e,t){return N(e,`get`,``),e[t]}};function wa(e){return{attrs:new Proxy(e.attrs,Ca),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ta(e){return e.exposed?e.exposeProxy||=new Proxy(Qt(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Or)return Or[n](e)},has(e,t){return t in e||t in Or}}):e.proxy}function Ea(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function Da(e){return h(e)&&`__vccOpts`in e}var Y=(e,t)=>en(e,t,va),Oa=`3.5.44`,ka=void 0,Aa=typeof window<`u`&&window.trustedTypes;if(Aa)try{ka=Aa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ja=ka?e=>ka.createHTML(e):e=>e,Ma=`http://www.w3.org/2000/svg`,Na=`http://www.w3.org/1998/Math/MathML`,Pa=typeof document<`u`?document:null,Fa=Pa&&Pa.createElement(`template`),Ia={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Pa.createElementNS(Ma,e):t===`mathml`?Pa.createElementNS(Na,e):n?Pa.createElement(e,{is:n}):Pa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Pa.createTextNode(e),createComment:e=>Pa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Fa.innerHTML=ja(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Fa.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},La=Symbol(`_vtc`);function Ra(e,t,n){let r=e[La];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var za=Symbol(`_vod`),Ba=Symbol(`_vsh`),Va={name:`show`,beforeMount(e,{value:t},{transition:n}){e[za]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Ha(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ha(e,!0),r.enter(e)):r.leave(e,()=>{Ha(e,!1)}):Ha(e,t))},beforeUnmount(e,{value:t}){Ha(e,t)}};function Ha(e,t){e.style.display=t?e[za]:`none`,e[Ba]=!t}var Ua=Symbol(``),Wa=/(?:^|;)\s*display\s*:/;function Ga(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??qa(r,t,``)}else for(let e in t)n[e]??qa(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?qa(r,i,``):Za(e,i,!g(t)&&t?t[i]:void 0,o)||qa(r,i,o)}}else if(i){if(t!==n){let e=r[Ua];e&&(n+=`;`+e),r.cssText=n,a=Wa.test(n)}}else t&&e.removeAttribute(`style`);za in e&&(i&&t===n||(e[za]=a?r.display:``),e[Ba]&&(r.display=`none`))}var Ka=/\s*!important$/;function qa(e,t,n){if(d(n))n.forEach(n=>qa(e,t,n));else if(n??=``,t.startsWith(`--`))Ka.test(n)?e.setProperty(t,n.replace(Ka,``),`important`):e.setProperty(t,n);else{let r=Xa(e,t);Ka.test(n)?e.setProperty(T(r),n.replace(Ka,``),`important`):e[r]=n}}var Ja=[`Webkit`,`Moz`,`ms`],Ya={};function Xa(e,t){let n=Ya[t];if(n)return n;let r=w(t);if(r!==`filter`&&r in e)return Ya[t]=r;r=E(r);for(let n=0;n<Ja.length;n++){let i=Ja[n]+r;if(i in e)return Ya[t]=i}return t}function Za(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Qa=`http://www.w3.org/1999/xlink`;function $a(e,t,n,r,i,a=he(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Qa,t.slice(6,t.length)):e.setAttributeNS(Qa,t,n):n==null||a&&!ge(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function eo(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ja(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);r===i&&`_value`in e||(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ge(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function to(e,t,n,r){e.addEventListener(t,n,r)}function no(e,t,n,r){e.removeEventListener(t,n,r)}var ro=Symbol(`_vei`);function io(e,t,n,r,i=null){let a=e[ro]||(e[ro]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=so(t);r?to(e,n,a[t]=fo(r,i),s):o&&(no(e,n,o,s),a[t]=void 0)}}var ao=/(Once|Passive|Capture)$/,oo=/^on:?(?:Once|Passive|Capture)$/;function so(e){let t,n;for(;(n=e.match(ao))&&!oo.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):T(e.slice(2)),t]}var co=0,lo=Promise.resolve(),uo=()=>co||=(lo.then(()=>co=0),Date.now());function fo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&ln(e,t,5,a)}}else ln(r,t,5,[e])};return n.value=e,n.attached=uo(),n}var po=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mo=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Ra(e,r,c):t===`style`?Ga(e,n,r):a(t)?o(t)||io(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):ho(e,t,r,c))?(eo(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||$a(e,t,r,c,s,t!==`value`)):e._isVueCE&&(go(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?eo(e,w(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),$a(e,t,r,c))};function ho(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&po(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return po(t)&&g(n)?!1:t in e}function go(e,t){let n=e._def.props;if(!n)return!1;let r=w(t);return Array.isArray(n)?n.some(e=>w(e)===r):Object.keys(n).some(e=>w(e)===r)}var _o=s({patchProp:mo},Ia),vo;function yo(){return vo||=Di(_o)}var bo=((...e)=>{let t=yo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=So(e);if(!r)return;let i=t._component;h(i)||i.render||i.template||(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,xo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function xo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function So(e){return g(e)?document.querySelector(e):e}var X={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},Co=`__connection.json`,wo=`__DEVFRAME_CONNECTION__`,To=`x-birpc-session`,Eo=`__rpc-dump/index.json`,Do=`devframe:services`,Oo=`devframe_otp`,ko=`devframe_auth_token`;X.postMessage.remoteAssetsError;function Ao(e){return typeof e==`string`?`'${e}'`:new Po().serialize(e)}var jo=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Mo=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[jo.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function No(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Mo[n]?Mo[n]:n+128,s=a<128&&Mo[a]?Mo[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Po=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?No(e,t):n===`number`&&r===`number`?e-t:No(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(No),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Fo=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Io=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Lo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Ro=[],zo=class{_data=new Bo;_hash=new Bo([...Fo]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)Ro[n]=e[t+n]|0;else{let e=Ro[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Ro[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Ro[n]=t+Ro[n-7]+i+Ro[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Io[n]+Ro[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Bo.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Bo(t,i)}},Bo=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Lo.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Vo(e){return new zo().finalize(e).toBase64()}function Ho(e){return Vo(Ao(e))}function Uo(e){return Ho(e)}var Wo=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Uo(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}};function Go(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var Ko={blue:Go(34,39),cyan:Go(36,39),gray:Go(90,39),green:Go(32,39),red:Go(31,39),yellow:Go(33,39),bold:Go(1,22),dim:Go(2,22),reset:Go(0,0),underline:Go(4,24)};function qo(e,...t){return typeof e==`function`?e(...t):e}var Jo=Error.captureStackTrace,Yo=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,Jo?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function Xo(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function Zo(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||Xo(r,i),s=(e={},n={})=>{let r=new Yo({code:i,why:qo(a.why,e),fix:qo(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:qo(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Qo(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
2
- `)}}var $o=Qo(Ko);function es(e,{method:t=`warn`}={}){console[t]($o(e))}function ts(e){return Zo({...e,reporters:[es,...e.reporters??[]]})}var ns=ts({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function rs(e){if(e.agent&&e.jsonSerializable===!1)throw ns.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function is(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function as(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function os(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await is(i,n[r]);if(a.issues)throw ns.DF0043({name:e,index:r,issues:as(a.issues)})}return r}async function ss(e,t,n){if(!t)return n;let r=await is(t,n);if(r.issues)throw ns.DF0044({name:e,issues:as(r.issues)});return n}async function cs(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function ls(e,t){let n=e.handler;if(!n){let r=await cs(e,t);if(!r.handler)throw ns.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await os(e.name,r,t),o=await a(...n);return await ss(e.name,i,o)}}var us=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return ls(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw ns.DF0021({name:e.name});rs(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw ns.DF0022({name:e.name});rs(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await ls(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw ns.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function ds(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw ps(t,`undefined`,r,e);return n}return i!==null&&fs(i,r,e,t),n})}function fs(e,t,n,r){if(typeof e==`bigint`)throw ps(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw ps(r,`Map`,t,n);if(e instanceof Set)throw ps(r,`Set`,t,n);if(e instanceof Date)throw ps(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw ps(r,e.constructor?.name??`class instance`,t,n)}function ps(e,t,n,r){let i=ms(n,r);return ns.DF0020({name:e||`<anonymous>`,type:t,path:i})}function ms(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function hs(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var gs=/^[\w+.-]{2,}:\/\//;function _s(e){return e.endsWith(`/`)?e:`${e}/`}function vs(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function ys(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?_s(n)+e.replace(/^\.?\//,``):e);return n}function bs(e,t){if(!t||t===`/`||gs.test(e))return e;let n=vs(t);return e.startsWith(n)?e:ys(n,e)}function xs(e,t){let n=e.match(gs);return t+(n?e.slice(n[0].length):e)}var Ss=`__DEVFRAME_CONNECTION_META__`,Cs=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function ws(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function Ts(){return ws(wo)}function Es(){return ws(Ss)}function Ds(e){if(e)return e;try{let e=localStorage.getItem(Cs);if(e)return e}catch{}return ws(Cs)}function Os(e){globalThis[wo]=e,globalThis[Ss]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&ks(e.authToken)}function ks(e){try{localStorage.setItem(Cs,e)}catch{}globalThis[Cs]=e;let t=Ts();t&&(globalThis[wo]={...t,authToken:e})}function As(e){let t=bs(Co,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function js(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Ms(){let e=Ts();if(e)return js(e,Ds()??e.authToken??e.connectionMeta.authToken);let t=Es();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??As(`./`),authToken:Ds(t.authToken)}}async function Ns(e={}){if(e.connection){let t=js(e.connection,Ds(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return Os(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:As(t[0]??`./`),authToken:Ds(e.authToken??e.connectionMeta.authToken)};return Os(n),n}let n=Ms();if(n){let t=js(n,Ds(e.authToken??n.authToken??n.connectionMeta.authToken));return Os(t),t}let r=[];for(let n of t){let t=bs(Co,n),i=As(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:Ds(e.authToken??r.authToken)};return Os(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Ps=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Fs(e=Oo){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Is(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function Ls(e=Oo){let t=Fs(e);return t&&Is(e),t}async function Rs(e,t={}){let n=Ls(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function zs(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Do,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}var Bs=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Vs(e=21){let t=``,n=e;for(;n--;)t+=Bs[Math.random()*64|0];return t}var Hs=Symbol.for(`immer-nothing`),Us=Symbol.for(`immer-draftable`),Z=Symbol.for(`immer-state`);function Q(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var $=Object,Ws=$.getPrototypeOf,Gs=`constructor`,Ks=`prototype`,qs=`configurable`,Js=`enumerable`,Ys=`writable`,Xs=`value`,Zs=e=>!!e&&!!e[Z];function Qs(e){return e?tc(e)||cc(e)||!!e[Us]||!!e[Gs]?.[Us]||lc(e)||uc(e):!1}var $s=$[Ks][Gs].toString(),ec=new WeakMap;function tc(e){if(!e||!dc(e))return!1;let t=Ws(e);if(t===null||t===$[Ks])return!0;let n=$.hasOwnProperty.call(t,Gs)&&t[Gs];if(n===Object)return!0;if(!fc(n))return!1;let r=ec.get(n);return r===void 0&&(r=Function.toString.call(n),ec.set(n,r)),r===$s}function nc(e,t,n=!0){rc(e)===0?(n?Reflect.ownKeys(e):$.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function rc(e){let t=e[Z];return t?t.type_:cc(e)?1:lc(e)?2:uc(e)?3:0}var ic=(e,t,n=rc(e))=>n===2?e.has(t):$[Ks].hasOwnProperty.call(e,t),ac=(e,t,n=rc(e))=>n===2?e.get(t):e[t],oc=(e,t,n,r=rc(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function sc(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var cc=Array.isArray,lc=e=>e instanceof Map,uc=e=>e instanceof Set,dc=e=>typeof e==`object`,fc=e=>typeof e==`function`,pc=e=>typeof e==`boolean`;function mc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var hc=e=>dc(e)?e?.[Z]:null,gc=e=>e.copy_||e.base_,_c=e=>e.modified_?e.copy_:e.base_;function vc(e,t){if(lc(e))return new Map(e);if(uc(e))return new Set(e);if(cc(e))return Array[Ks].slice.call(e);let n=tc(e);if(t===!0||t===`class_only`&&!n){let t=$.getOwnPropertyDescriptors(e);delete t[Z];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ys]===!1&&(a[Ys]=!0,a[qs]=!0),(a.get||a.set)&&(t[i]={[qs]:!0,[Ys]:!0,[Js]:a[Js],[Xs]:e[i]})}return $.create(Ws(e),t)}{let t=Ws(e);if(t!==null&&n)return{...e};let r=$.create(t);return $.assign(r,e)}}function yc(e,t=!1){return Sc(e)||Zs(e)||!Qs(e)||(rc(e)>1&&$.defineProperties(e,{set:xc,add:xc,clear:xc,delete:xc}),$.freeze(e),t&&nc(e,(e,t)=>{yc(t,!0)},!1)),e}function bc(){Q(2)}var xc={[Xs]:bc};function Sc(e){return e===null||!dc(e)||$.isFrozen(e)}var Cc=`MapSet`,wc=`Patches`,Tc=`ArrayMethods`,Ec={};function Dc(e){let t=Ec[e];return t||Q(0,e),t}var Oc=e=>!!Ec[e];function kc(e,t){Ec[e]||(Ec[e]=t)}var Ac,jc=()=>Ac,Mc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Oc(Cc)?Dc(Cc):void 0,arrayMethodsPlugin_:Oc(Tc)?Dc(Tc):void 0});function Nc(e,t){t&&(e.patchPlugin_=Dc(wc),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pc(e){Fc(e),e.drafts_.forEach(Lc),e.drafts_=null}function Fc(e){e===Ac&&(Ac=e.parent_)}var Ic=e=>Ac=Mc(Ac,e);function Lc(e){let t=e[Z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Z].modified_&&(Pc(t),Q(4)),Qs(e)&&(e=zc(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Z].base_,e,t)}else e=zc(t,n);return Bc(t,e,!0),Pc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Hs?void 0:e}function zc(e,t){if(Sc(t))return t;let n=t[Z];if(!n)return Jc(t,e.handledSet_,e);if(!Hc(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Kc(n,e)}return n.copy_}function Bc(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yc(t,n)}function Vc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Hc=(e,t)=>e.scope_===t,Uc=[];function Wc(e,t,n,r){let i=gc(e),a=e.type_;if(r!==void 0&&ac(i,r,a)===t){oc(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;nc(i,(e,n)=>{if(Zs(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Uc;for(let e of o)oc(i,e,n,a)}function Gc(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Hc(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=_c(i);Wc(e,i.draft_??i,a,n),Kc(i,r)})}function Kc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Vc(e)}}function qc(e,t,n){let{scope_:r}=e;if(Zs(n)){let i=n[Z];Hc(i,r)&&i.callbacks_.push(function(){rl(e),Wc(e,n,_c(i),t)})}else Qs(n)&&e.callbacks_.push(function(){let i=gc(e);e.type_===3?i.has(n)&&Jc(n,r.handledSet_,r):ac(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Jc(ac(e.copy_,t,e.type_),r.handledSet_,r)})}function Jc(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Zs(e)||t.has(e)||!Qs(e)||Sc(e)||(t.add(e),nc(e,(r,i)=>{if(Zs(i)){let t=i[Z];Hc(t,n)&&(oc(e,r,_c(t),e.type_),Vc(t))}else Qs(i)&&Jc(i,t,n)})),e}function Yc(e,t){let n=cc(e),r={type_:+!!n,scope_:t?t.scope_:jc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Xc;n&&(i=[r],a=Zc);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Xc={get(e,t){if(t===Z)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=gc(e);if(!ic(i,t,e.type_))return el(e,i,t);let a=i[t];if(e.finalized_||!Qs(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&mc(t))return a;if(a===Qc(e.base_,t)||$c(e,t,a)){rl(e);let n=e.type_===1?+t:t,r=al(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in gc(e)},ownKeys(e){return Reflect.ownKeys(gc(e))},set(e,t,n){let r=tl(gc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Qc(gc(e),t),i=r?.[Z];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(sc(n,r)&&(n!==void 0||ic(e.base_,t,e.type_)))return!0;rl(e),nl(e)}return e.copy_[t]===n&&(n!==void 0||ic(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),qc(e,t,n)),!0},deleteProperty(e,t){return rl(e),Qc(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),nl(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=gc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ys]:!0,[qs]:e.type_!==1||t!==`length`,[Js]:r[Js],[Xs]:n[t]}},defineProperty(){Q(11)},getPrototypeOf(e){return Ws(e.base_)},setPrototypeOf(){Q(12)}},Zc={};for(let e in Xc){let t=Xc[e];Zc[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Zc.deleteProperty=function(e,t){return Zc.set.call(this,e,t,void 0)},Zc.set=function(e,t,n){return Xc.set.call(this,e[0],t,n,e[0])};function Qc(e,t){let n=e[Z];return(n?gc(n):e)[t]}function $c(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!Qs(n)||n[Z]?!1:e.baseRefs_.has(n)}function el(e,t,n){let r=tl(t,n);return r?Xs in r?r[Xs]:r.get?.call(e.draft_):void 0}function tl(e,t){if(!(t in e))return;let n=Ws(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ws(n)}}function nl(e){e.modified_||(e.modified_=!0,e.parent_&&nl(e.parent_))}function rl(e){e.copy_||=(e.assigned_=new Map,vc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var il=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(fc(e)&&!fc(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}fc(t)||Q(6),n!==void 0&&!fc(n)&&Q(7);let r;if(Qs(e)){let i=Ic(this),a=al(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Pc(i):Fc(i)}return Nc(i,n),Rc(r,i)}if(!e||!dc(e)){if(r=t(e),r===void 0&&(r=e),r===Hs&&(r=void 0),this.autoFreeze_&&yc(r,!0),n){let t=[],i=[];Dc(wc).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Q(1,e)},this.produceWithPatches=(e,t)=>{if(fc(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},pc(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),pc(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),pc(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Qs(e)||Q(8),Zs(e)&&(e=ol(e));let t=Ic(this),n=al(t,e,void 0);return n[Z].isManual_=!0,Fc(t),n}finishDraft(e,t){let n=e&&e[Z];n&&n.isManual_||Q(9);let{scope_:r}=n;return Nc(r,t),Rc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Dc(wc).applyPatches_;return Zs(e)?r(e,t):this.produce(e,e=>r(e,t))}};function al(e,t,n,r){let[i,a]=lc(t)?Dc(Cc).proxyMap_(t,n):uc(t)?Dc(Cc).proxySet_(t,n):Yc(t,n);return(n?.scope_??jc()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Gc(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function ol(e){return Zs(e)||Q(10,e),sl(e)}function sl(e){if(!Qs(e)||Sc(e))return e;let t=e[Z],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=vc(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=vc(e,!0);let i=n;return uc(n)&&(n=new Set),nc(i,(e,t)=>{oc(n,e,sl(t))},r),t&&(t.finalized_=!1),n}function cl(){function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=hc(ac(e,n.key_)),i=ac(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||ic(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=ac(n,r),!dc(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[Z];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;nc(e.assigned_,(e,l)=>{let u=ac(o,e,c),f=ac(s,e,c),p=l?ic(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Hs?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=rc(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),t!==0&&t!==1||n!==`__proto__`&&n!==Gs||Q(19),fc(o)&&n===Ks&&Q(19),o=ac(o,n),o!==null&&dc(o)||Q(18,i.join(`/`))}let s=rc(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:Q(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:Q(17,a)}}),e}function u(e){if(!Qs(e))return e;if(cc(e))return e.map(u);if(lc(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(uc(e))return new Set(Array.from(e).map(u));let t=Object.create(Ws(e));for(let n in e)t[n]=u(e[n]);return ic(e,Us)&&(t[Us]=e[Us]),t}function d(e){return Zs(e)?u(e):e}kc(wc,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var ll=new il,ul=ll.produce,dl=ll.produceWithPatches.bind(ll),fl=ll.applyPatches.bind(ll),pl=1e3;function ml(e,t){if(e.add(t),e.size>pl){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function hl(e){let{enablePatches:t=!1}=e;t&&cl();let n=hs(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Vs())=>{i.has(t)||(cl(),r=fl(r,e),ml(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Vs())=>{if(!i.has(a)){if(ml(i,a),t){let[t,i]=dl(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=ul(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}function gl(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:X.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:X.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n,r){let i=[];return i.push(n.on(`updated`,(n,i,o)=>{a||o===r||(i?e.callEvent(`devframe:rpc:server-state:patch`,t,i,o):e.callEvent(`devframe:rpc:server-state:set`,t,n,o))})),()=>{for(let e of i)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=hl({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);let r=!1,a=u.on(`updated`,()=>{r=!0}),l=Vs();return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&t.get(c)===u&&!r&&u.mutate(()=>o(c,e),l)}).catch(e=>{console.error(`Error getting server state`,e)}).finally(a),n.set(c,s(c,u,l)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise((t,n)=>{if(e.isTrusted)d().then(t,n);else{t(u);let n=!1;e.events.on(X.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var _l=typeof self==`object`?self:globalThis,vl=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),yl=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function bl(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=vl.has(e)?_l[e]:void 0;return n(new(r??_l.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&yl.has(a))return n(new _l[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function xl(e){return bl(new Map,e)(0)}var Sl=``,{toString:Cl}={},{keys:wl}=Object;function Tl(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Cl.call(e).slice(8,-1);switch(n){case`Array`:return[1,Sl];case`Object`:return[2,Sl];case`Date`:return[3,Sl];case`RegExp`:return[4,Sl];case`Map`:return[5,Sl];case`Set`:return[6,Sl];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function El([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Dl(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Tl(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of wl(r))(e||!El(Tl(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(El(Tl(n))||El(Tl(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!El(Tl(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Ol(e,t={}){let n=[];return Dl(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:kl,stringify:Al}=JSON,jl={json:!0,lossy:!0};function Ml(e){return xl(kl(e))}function Nl(e){return Al(Ol(e,jl))}function Pl(e){return xl(e)}function Fl(e){return Nl(e)}function Il(e){return Ml(e)}var Ll=new Map;function Rl(e=Ll){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?ds(n,r??``):`s:${Fl(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Il(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function zl(){}function Bl(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function Vl(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function Hl(e){let{onConnected:t=zl,onError:n=zl,onDisconnected:r=zl,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${ko}=${encodeURIComponent(e.authToken)}`);let s=Rl(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){e===`session`?(f(n),t()):u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=Bl(r);if(!e)break;r=e.rest;let{event:t,data:n}=Vl(e.frame);n.length>0&&_(t,n.join(`
3
- `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l)n(Error(`Devframe SSE channel is closed; message dropped`));else try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[To]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function Ul(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Wl=Math.random.bind(Math),Gl=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Kl(e=21){let t=``,n=e;for(;n--;)t+=Gl[Wl()*64|0];return t}var ql=6e4,Jl=e=>e,Yl=Jl,{clearTimeout:Xl,setTimeout:Zl}=globalThis;function Ql(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Jl,deserialize:s=Yl,resolver:c,bind:l=`rpc`,timeout:u=ql,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Ul(),_=Kl();s.i=_;let v;async function y(n=s){return u>=0&&(v=Zl(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Xl(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Xl(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function $l(e,t){let{channel:n,rpcOptions:r={}}=t;return Ql(e,{...n,timeout:-1,...r,proxify:!1})}function eu(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(X.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Ps(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Ps(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(X.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Ps(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(X.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(X.client.connectionError,e),m(new Ps(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Ps(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=$l(a.functions,{channel:v,rpcOptions:o});a.register({name:X.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Ps(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(X.client.connectionError,e),m(e),i.emit(X.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Ps(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(X.client.connectionError,e)}return i.emit(X.client.isTrustedUpdated,c),t.isTrusted}async function ee(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(X.client.isTrustedUpdated,!0)),t}async function S(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function C(){return c?!0:x(b??``)}async function te(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:C,requestTrustWithToken:x,requestTrustWithCode:ee,requestAuthCode:S,ensureTrusted:te,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(X.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t)i.emit(X.client.error,t,String(e[0]));else return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(X.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function tu(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function nu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=tu(n.sse,r??`./`,location);return eu({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Hl({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function ru(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:iu(r)?ru(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function iu(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function au(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function ou(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function su(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function cu(e){if(e.error)throw ru(e.error);return e.output}function lu(e){return e.some(e=>e!=null)}function uu(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function du(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Pl(e):e}function a(e,t){return i(uu(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return su(r)?cu(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(au(r)){if(lu(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(ou(r)){let e=Uo(n),i=r.records[e];if(i)return cu(await s(i,r.serialization));if(r.fallback)return cu(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!lu(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function fu(e){let t=du(await e.fetchJsonFromBases(Eo),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var pu=256,mu=class extends Error{name=`StreamClosedError`};function hu(e={}){let t=e.id??Vs(),n=Math.max(0,e.replayWindow??0),r=hs(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new mu(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=_u(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function gu(e={}){let t=e.id??Vs(),n=Math.max(1,e.highWaterMark??pu),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1})}else if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function _u(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var vu=``;function yu(e,t){return`${e}${vu}${t}`}function bu(e){let t=new Map,n=new Map;e.client.register({name:X.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(yu(e,n))?._push(r,i)}}),e.client.register({name:X.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=yu(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:X.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=yu(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(X.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(vu);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=yu(n,r),o=t.get(a);if(o)return o;let s=gu({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(X.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=yu(t,r),a=n.get(i);if(a)return a;let o=hu({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function xu(){}var Su=new Map;function Cu(e){let t=e.url;e.authToken&&(t=`${t}?${ko}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=xu,onError:i=xu,onDisconnected:a=xu,definitions:o=Su}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=Rl(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r)}else i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function wu(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return xs(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Tu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=wu(n.websocket,r??`./`,location);return eu({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cu({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function Eu(e){return e.includes(`:`)}function Du(e,t){return Eu(t)?t:`${e}:${t}`}function Ou(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function ku(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return Ou(a)}function Au(e,t){return{global:ku(e,t,`global`),project:ku(e,t,`project`)}}function ju(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Eu(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(Du(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Du(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Du(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Du(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Du(t,n),r,i),upload:(n,r)=>e.streaming.upload(Du(t,n),r)}},settings:Au(e,t),scope:e.scope}}var Mu=128;function Nu(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Mu)}function Pu(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Fu=Object.freeze({type:`object`,additionalProperties:!0});function Iu(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Fu}return Fu}function Lu(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Iu(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Ru(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function zu(e,t){return Ru(e,t)??[e]}function Bu(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Vu(e,t={}){let n=t.modelContext??Bu();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Nu(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Pu(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Lu(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Hu(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Hu(e,t,n){try{let r=zu(n,e.args?.length);return{content:[{type:`text`,text:Uu(await(await ls(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Wu(e)}]}}}function Uu(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Wu(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}var Gu=`modulepreload`,Ku=function(e,t){return new URL(e,t).href},qu={},Ju=function(e){return e.pathname.endsWith(`.css`)},Yu=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Xu=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Ku(t,n);let r=s(t),i=Ju(r);return Yu(qu,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Gu,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Zu(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Qu(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=hs(),a=Array.isArray(t)?t:[t],o=await Ns(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new Wo({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new us(f),m=e.webmcp===!1?void 0:Vu(p),h,g=!1,_=0,v;function y(){_++,v=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:X.broadcast.cacheInvalidate,type:`event`,handler:y}),i.on(X.client.connectionStatus,y),i.on(X.client.isTrustedUpdated,y));async function b(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(bs(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let x=e.callTimeout??0,ee=x>0?x:1/0,S,C={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+ee;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&S.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new Ps(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${x}ms`)}for(;!v&&(t(),!(g||S.status!==`connected`));){let e=_;v=S.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(v=void 0),t}),await v}await v,t()}let o=_;if(r&&e.i&&!g&&S.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},te=Zu(e.transport??`auto`,s);S=te===`static`?await fu({fetchJsonFromBases:b}):te===`sse`?nu({...C,sseOptions:e.sseOptions}):Tu({...C,wsOptions:e.wsOptions});let ne;try{ne=new BroadcastChannel(`devframe-auth`)}catch{}let re,w=!1;function ie(e){return((...t)=>w||!re?e(...t):re.then(()=>e(...t)))}function T(){g=!0,y();try{h?.(),m?.()}finally{try{ne?.close()}finally{S.close?.()}}}let E={events:i,get isTrusted(){return S.isTrusted},get status(){return S.status},get connectionError(){return S.connectionError},get transport(){return S.transport??te},get connection(){return o},connectionMeta:s,ensureTrusted:S.ensureTrusted,requestTrust:S.requestTrust,requestTrustWithToken:async e=>(ks(e),o={...o,authToken:e},S.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await S.requestTrustWithCode(e);if(!t)return!1;ks(t),o={...o,authToken:t};try{ne?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>S.requestAuthCode(e),call:ie(S.call),callEvent:ie(S.callEvent),callOptional:ie(S.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:T};E.sharedState=gl(E),E.streaming=bu(E),E.services=zs(E);let ae=new Map;E.scope=(e=>{if(!e)return E;let t=ae.get(e);return t||(t=ju(E,e),ae.set(e,t)),t}),f.rpc=E;function D(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function oe(){if(e.simpleAuth!==!1&&D()&&typeof globalThis.prompt==`function`)for(await E.requestAuthCode().catch(()=>{});!E.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await E.requestTrustWithCode(t))return}}async function O(){let t=await S.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Rs(E,{param:n}):!1;t||r||E.isTrusted||await oe()}return re=O().then(()=>{w=!0},()=>{w=!0}),s.mcp&&Xu(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-ilKXKeWm.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(E))}).catch(()=>{}),ne&&(ne.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&E.requestTrustWithToken(e.data.authToken)}),E}var $u=Qu;function ed(){if(window.parent===window)return()=>{};let e=document.documentElement,t=e.style.getPropertyValue(`--devframe-primary`),n=e.style.getPropertyPriority(`--devframe-primary`),r=!1,i=!1;return Ns().then(({connectionMeta:t})=>{let n=t.configs?.ui?.branding?.primaryColor;!r&&n&&CSS.supports(`color`,n)&&(e.style.setProperty(`--devframe-primary`,n),i=!0)}).catch(()=>{}),()=>{r=!0,i&&(t?e.style.setProperty(`--devframe-primary`,t,n):e.style.removeProperty(`--devframe-primary`))}}var td=Yn({__name:`FeedbackSpinner`,props:{size:{default:`1em`}},setup(e){let t=e,n=Y(()=>typeof t.size==`number`?`${t.size}px`:t.size);return(e,t)=>(U(),W(`span`,{class:`border-2 border-current border-t-transparent rounded-full inline-block animate-spin`,style:ue({width:n.value,height:n.value}),role:`status`,"aria-label":`Loading`},null,4))}}),nd=Yn({__name:`ActionButton`,props:{as:{},to:{},href:{},icon:{},variant:{default:`action`},size:{default:`md`},loading:{type:Boolean},disabled:{type:Boolean}},setup(e){let t=e,n=Y(()=>t.as?t.as:t.href!=null||t.to!=null?`a`:`button`),r=Y(()=>n.value===`a`),i=Y(()=>n.value===`button`),a=Y(()=>t.size===`sm`),o=Y(()=>t.variant===`primary`?a.value?`btn-primary text-sm`:`btn-primary`:t.variant===`text`?a.value?`btn-text text-sm`:`btn-text`:a.value?`btn-action-sm`:`btn-action`),s=Y(()=>t.disabled||t.loading);return(t,a)=>(U(),qi(xr(n.value),{class:k([o.value,{"pointer-events-none op-mute":s.value&&!i.value}]),href:r.value?e.href??e.to:void 0,to:e.as&&e.to!=null?e.to:void 0,disabled:i.value?s.value:void 0,"aria-disabled":s.value||void 0,"aria-busy":e.loading||void 0},{default:jn(()=>[e.loading?(U(),qi(td,{key:0,size:`1em`})):e.icon?(U(),W(`span`,{key:1,class:k(e.icon),"aria-hidden":`true`},null,2)):na(``,!0),Tr(t.$slots,`default`)]),_:3},8,[`class`,`href`,`to`,`disabled`,`aria-disabled`,`aria-busy`]))}}),rd={key:0,class:`absolute inset-0 z-nav flex flex-col items-center justify-center gap-4 p-8 text-center bg-base color-base font-sans`},id={class:`flex flex-col gap-1`},ad={class:`text-lg font-medium`},od={class:`text-sm color-muted max-w-sm`},sd={key:0,class:`mt-1 max-w-sm break-words font-mono text-xs color-faint`},cd=Yn({__name:`ConnectionOverlay`,props:{status:{},error:{}},setup(e){let t=e,n={connecting:{icon:`i-ph-plugs-connected-duotone`,title:`Connecting…`,body:`Establishing a connection to the devframe server.`},disconnected:{icon:`i-ph-plugs-duotone`,title:`Disconnected`,body:`Lost the connection to the devframe server. Reload once it is back up.`},unauthorized:{icon:`i-ph-lock-key-duotone`,title:`Not authorized`,body:`Reopen the link printed by your dev server, then reload.`},error:{icon:`i-ph-warning-octagon-duotone`,title:`Connection failed`,body:`Could not reach the devframe server.`}},r=Y(()=>n[t.status]);return(t,n)=>e.status!==`connected`&&r.value?(U(),W(`div`,rd,[G(`div`,{class:k([r.value.icon,`text-4xl color-active`])},null,2),G(`div`,id,[G(`p`,ad,A(r.value.title),1),G(`p`,od,A(r.value.body),1),e.error&&e.status===`error`?(U(),W(`code`,sd,A(e.error),1)):na(``,!0)]),e.status===`connecting`?na(``,!0):(U(),qi(nd,{key:0,variant:`primary`,size:`sm`,onClick:n[0]||=()=>t.location.reload()},{default:jn(()=>[...n[1]||=[q(` Reload `,-1)]]),_:1}))])):na(``,!0)}}),ld=Yn({__name:`EditorFrame`,props:{connect:{},port:{}},setup(e){let t=e,n=qt(null),r=null;function i(){return t.connect.url?t.connect.url:t.port==null?null:`${location.protocol}//${location.hostname}:${t.port}${t.connect.path??`/`}`}function a(){let e=i();if(e&&n.value&&e!==r){if(t.connect.cookie){let{name:e,value:n}=t.connect.cookie;document.cookie=`${e}=${n}; path=/; SameSite=Lax`}r=e,n.value.src=e}}return ur(a),Rn(()=>[t.connect,t.port],a,{deep:!0}),(e,t)=>(U(),W(`iframe`,{ref_key:`frame`,ref:n,class:`h-full w-full border-0 bg-base`,title:`Editor`,allow:`clipboard-read; clipboard-write; cross-origin-isolated`},null,512))}}),ud={class:`absolute inset-0 flex of-y-auto p-6 box-border bg-base color-base font-sans`},dd={class:`m-auto w-full max-w-[560px]`},fd={class:`flex items-center gap-1.5 mb-2.5 text-xs tracking-wider uppercase color-muted`},pd={key:0,class:`flex items-center gap-2.5`},md={class:`flex items-center gap-2.5`},hd={class:`text-sm color-muted`},gd={key:0,class:`mt-4 px-3.5 py-3 rounded-md border border-base bg-secondary text-sm`},_d={class:`flex flex-wrap items-center gap-x-2 gap-y-1`},vd=[`href`],yd={class:`font-mono color-base px-1.5 py-0.5 rounded bg-base border border-base tracking-wider`},bd={class:`flex flex-col gap-3 mb-5`},xd={class:`block mb-1 text-xs color-muted`},Sd={class:`flex items-center gap-2 px-2.5 py-2 rounded-md border border-base bg-secondary`},Cd={class:`flex-1 of-x-auto whitespace-nowrap font-mono text-xs color-base`},wd={class:`flex flex-wrap items-center gap-2.5`},Td={class:`mb-5 text-sm leading-relaxed color-muted`},Ed={key:0,class:`mb-4 px-3 py-2.5 rounded-md border border-error/35 bg-error/10 text-error text-sm whitespace-pre-wrap break-words`},Dd={class:`flex flex-wrap gap-x-4 gap-y-1.5 mb-5 text-xs color-muted`},Od={class:`font-mono color-base`},kd={key:0},Ad={class:`font-mono color-base`},jd={key:1},Md={class:`font-mono color-base`},Nd={class:`font-mono color-base`},Pd=`https://coder.com/docs/code-server/latest/install`,Fd=`https://github.com/coder/code-server`,Id=Yn({__name:`LauncherView`,props:{phase:{},detection:{},server:{},busy:{type:Boolean},canViewInTerminal:{type:Boolean}},emits:[`launch`,`recheck`,`viewInTerminal`],setup(e,{emit:t}){let n=e,r=t,i=[{label:`Install script (Linux / macOS)`,command:`curl -fsSL https://code-server.dev/install.sh | sh`},{label:`npm`,command:`npm install -g code-server`},{label:`Homebrew`,command:`brew install code-server`}],a=qt(null);function o(e){navigator.clipboard?.writeText(e).then(()=>{a.value=e,setTimeout(()=>{a.value===e&&(a.value=null)},1200)}).catch(()=>{})}let s=Y(()=>n.detection.mode===`tunnel`?`tunnel`:n.detection.backend===`ms-code-serve-web`?`code serve-web`:`code-server`),c=Y(()=>n.server.status===`error`?n.server.error:void 0);return(t,n)=>(U(),W(`div`,ud,[G(`div`,dd,[G(`p`,fd,[n[3]||=G(`span`,{class:`i-ph-code-duotone text-sm`},null,-1),G(`span`,null,A(s.value),1)]),e.phase===`connecting`?(U(),W(`div`,pd,[K(td,{size:`1rem`,class:`color-muted`}),n[4]||=G(`span`,{class:`text-sm color-muted`},`Connecting to devframe…`,-1)])):e.phase===`starting`?(U(),W(V,{key:1},[G(`div`,md,[K(td,{size:`1rem`,class:`color-muted`}),G(`span`,hd,A(e.detection.mode===`tunnel`?`Opening the tunnel…`:`Starting the editor…`),1),e.canViewInTerminal?(U(),qi(nd,{key:0,variant:`text`,size:`sm`,icon:`i-ph-terminal-window-duotone`,onClick:n[0]||=e=>r(`viewInTerminal`)},{default:jn(()=>[...n[5]||=[q(` View in terminal `,-1)]]),_:1})):na(``,!0)]),e.server.login?(U(),W(`div`,gd,[n[9]||=G(`p`,{class:`mb-2 color-muted`},` Authorize the tunnel to continue: `,-1),G(`p`,_d,[n[7]||=G(`span`,{class:`color-muted`},`Open`,-1),G(`a`,{href:e.server.login.url,target:`_blank`,rel:`noreferrer`,class:`color-active hover:underline underline-offset-2 inline-flex items-center gap-1`},[q(A(e.server.login.url)+` `,1),n[6]||=G(`span`,{class:`i-ph-arrow-square-out size-3.5`},null,-1)],8,vd),n[8]||=G(`span`,{class:`color-muted`},`and enter code`,-1),G(`code`,yd,A(e.server.login.code),1)])])):na(``,!0)],64)):e.phase===`not-installed`?(U(),W(V,{key:2},[n[12]||=ta(`<h1 class="mb-2 text-[1.35rem] font-semibold"> No editor found </h1><p class="mb-5 text-sm leading-relaxed color-muted"> Install <code class="font-mono color-base">code-server</code> (VS Code in the browser), or the Microsoft <code class="font-mono color-base">code</code> CLI for <code class="font-mono color-base">code serve-web</code>. Pick whichever fits your setup, then re-check. </p>`,2),G(`div`,bd,[(U(),W(V,null,wr(i,({label:e,command:t})=>G(`div`,{key:e},[G(`label`,xd,A(e),1),G(`div`,Sd,[G(`code`,Cd,A(t),1),K(nd,{variant:`action`,size:`sm`,class:`shrink-0 text-[11px]`,onClick:e=>o(t)},{default:jn(()=>[q(A(a.value===t?`Copied`:`Copy`),1)]),_:2},1032,[`onClick`])])])),64))]),G(`div`,wd,[K(nd,{variant:`primary`,icon:e.busy?void 0:`i-ph-arrows-clockwise`,loading:e.busy,disabled:e.busy,onClick:n[1]||=e=>r(`recheck`)},{default:jn(()=>[q(A(e.busy?`Checking…`:`Re-check`),1)]),_:1},8,[`icon`,`loading`,`disabled`]),K(nd,{variant:`text`,size:`sm`,href:Pd,target:`_blank`,rel:`noreferrer`,icon:`i-ph-arrow-square-out`},{default:jn(()=>[...n[10]||=[q(` Installation docs `,-1)]]),_:1}),K(nd,{variant:`text`,size:`sm`,href:Fd,target:`_blank`,rel:`noreferrer`,icon:`i-ph-github-logo`},{default:jn(()=>[...n[11]||=[q(` GitHub `,-1)]]),_:1})])],64)):(U(),W(V,{key:3},[n[17]||=G(`h1`,{class:`mb-2 text-[1.35rem] font-semibold`},` Launch the editor `,-1),G(`p`,Td,A(e.detection.mode===`tunnel`?`Open a code tunnel and edit this workspace from the hosted vscode.dev editor, right here.`:`Start an editor scoped to this workspace and open VS Code right here, signed in automatically.`),1),c.value?(U(),W(`div`,Ed,A(c.value),1)):na(``,!0),G(`div`,Dd,[G(`span`,null,[n[13]||=q(`mode `,-1),G(`code`,Od,A(e.detection.mode),1)]),e.detection.mode===`local`?(U(),W(`span`,kd,[n[14]||=q(`backend `,-1),G(`code`,Ad,A(e.detection.backend),1)])):na(``,!0),e.detection.version?(U(),W(`span`,jd,[n[15]||=q(`version `,-1),G(`code`,Md,A(e.detection.version),1)])):na(``,!0),G(`span`,null,[n[16]||=q(`binary `,-1),G(`code`,Nd,A(e.detection.bin),1)])]),K(nd,{variant:`primary`,icon:e.busy?void 0:`i-ph-rocket-launch-duotone`,loading:e.busy,disabled:e.busy,onClick:n[2]||=e=>r(`launch`)},{default:jn(()=>[q(A(e.busy?`Starting…`:e.detection.mode===`tunnel`?`Open tunnel`:`Launch editor`),1)]),_:1},8,[`icon`,`loading`,`disabled`])],64))])]))}}),Ld=`devframes:plugin:code-server:state`,Rd=It({connected:!1,status:`connecting`,error:null,backend:null}),zd=Jt(null);function Bd(e){Rd.status=e.status,Rd.connected=e.status===`connected`,Rd.error=e.connectionError?.message??null}async function Vd(){try{let e=await $u();zd.value=e,Rd.backend=e.connectionMeta.backend,Bd(e),e.events.on(`connection:status`,()=>Bd(e)),e.connectionMeta.backend===`websocket`&&e.ensureTrusted(5e3).catch(()=>{})}catch(e){Rd.status=`error`,Rd.error=e?.message??String(e)}}function Hd(){return zd}var Ud=`devframes:plugin:code-server:detect`,Wd=`devframes:plugin:code-server:status`,Gd=`devframes:plugin:code-server:start`,Kd=`devframes:plugin:code-server:stop`,qd=`devframe:docks`,Jd=`devframes_plugin_terminals`,Yd=`hub:docks:activate`;function Xd(){let e=Hd(),t=It({checked:!1,installed:!1,bin:`code-server`,backend:`code-server`,mode:`local`}),n=It({status:`stopped`}),r=Jt(void 0),i=qt(!1),a=qt(!1),o=Y(()=>a.value&&!!n.terminalSessionId),s=Y(()=>n.status===`running`?r.value?`running`:`starting`:n.status===`starting`||i.value&&n.status!==`error`?`starting`:t.checked?t.installed?`launch`:`not-installed`:`connecting`);function c(e){e&&(Object.assign(t,e.detection),Object.assign(n,e.server),e.connect&&(r.value=e.connect))}async function l(t,...r){let i=e.value;if(i)try{return await i.call(t,...r)}catch(e){n.status=`error`,n.error=e instanceof Error?e.message:String(e);return}}async function u(){if(!i.value){i.value=!0;try{c(await l(Gd,{}))}finally{i.value=!1}}}async function d(){if(!i.value){i.value=!0;try{c(await l(Kd)),r.value=void 0}finally{i.value=!1}}}async function f(){let e=n.terminalSessionId;e&&await l(Yd,{dockId:Jd,params:{sessionId:e}})}async function p(){if(!i.value){i.value=!0;try{await l(Ud)}finally{i.value=!1}}}async function m(){c(await l(Wd));let i=e.value;if(!i)return;let a=await i.sharedState.get(Ld,{initialValue:{detection:t,server:n}}),o=a.value();Object.assign(t,o.detection),Object.assign(n,o.server);let s=a.on(`updated`,e=>{Object.assign(t,e.detection),Object.assign(n,e.server),n.status===`running`&&!r.value&&l(Wd).then(e=>{e?.connect&&(r.value=e.connect)}),n.status!==`running`&&(r.value=void 0)});De(()=>s?.()),await h(i)}async function h(e){let t=e=>Array.isArray(e)&&e.some(e=>e?.id===Jd);try{let n=await e.sharedState.get(qd,{initialValue:[]});a.value=t(n.value());let r=n.on(`updated`,e=>{a.value=t(e)});De(()=>r?.())}catch{}}return{detection:t,server:n,connect:r,busy:i,phase:s,canViewInTerminal:o,launch:u,stop:d,recheck:p,viewInTerminal:f,bootstrap:m}}var Zd={class:`relative h-full w-full of-hidden bg-base color-base`},Qd=Yn({__name:`App`,setup(e,{expose:t}){let{detection:n,server:r,connect:i,busy:a,phase:o,canViewInTerminal:s,launch:c,stop:l,recheck:u,viewInTerminal:d,bootstrap:f}=Xd(),p=Y(()=>!!i.value);return ur(async()=>{await Vd(),await f()}),t({stop:l}),(e,t)=>(U(),W(`div`,Zd,[p.value?Mn((U(),qi(ld,{key:0,connect:I(i),port:I(r).port},null,8,[`connect`,`port`])),[[Va,I(o)===`running`]]):na(``,!0),I(o)===`running`?na(``,!0):(U(),qi(Id,{key:1,phase:I(o),detection:I(n),server:I(r),busy:I(a),"can-view-in-terminal":I(s),onLaunch:I(c),onRecheck:I(u),onViewInTerminal:I(d)},null,8,[`phase`,`detection`,`server`,`busy`,`can-view-in-terminal`,`onLaunch`,`onRecheck`,`onViewInTerminal`])),K(cd,{status:I(Rd).status,error:I(Rd).error},null,8,[`status`,`error`])]))}}),$d=window.matchMedia(`(prefers-color-scheme: dark)`);function ef(e){document.documentElement.classList.toggle(`dark`,e),document.documentElement.classList.toggle(`light`,!e)}ef($d.matches),$d.addEventListener(`change`,e=>ef(e.matches)),bo(Qd).mount(`#app`),ed();export{Vs as t};