@devframes/plugin-code-server--assets 0.9.1 → 0.9.2

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,3 +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()),ie=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),ae=te(e=>e?`on${ie(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,``).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=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,ge=e(he);he+``;function _e(e){return!!e||e===``}function ve(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=ye(e[r],t[r]);return n}function ye(e,t){if(e===t)return!0;let n=m(e),r=m(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=_(e),r=_(t),n||r)return e===t;if(n=d(e),r=d(t),n||r)return n&&r?ve(e,t):!1;if(n=v(e),r=v(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!ye(e[n],t[n]))return!1}}return String(e)===String(t)}var be=e=>!!(e&&e.__v_isRef===!0),A=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?be(e)?A(e.value):JSON.stringify(e,xe,2):String(e),xe=(e,t)=>be(t)?xe(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Se(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Se(e))}:_(t)?Se(t):v(t)&&!d(t)&&!C(t)?String(t):t,Se=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,j,Ce=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 we(){return j}function Te(e,t=!1){j&&j.cleanups.push(e)}var M,Ee=new WeakSet,De=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,Ee.has(this)&&(Ee.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||je(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,We(this),Pe(this);let e=M,t=Be;M=this,Be=!0;try{return this.fn()}finally{Fe(this),M=e,Be=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Re(e);this.deps=this.depsTail=void 0,We(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ee.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ie(this)&&this.run()}get dirty(){return Ie(this)}},Oe=0,ke,Ae;function je(e,t=!1){if(e.flags|=8,t){e.next=Ae,Ae=e;return}e.next=ke,ke=e}function Me(){Oe++}function Ne(){if(--Oe>0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=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 Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=M,r=Be;M=e,Be=!0;try{Pe(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,Be=r,Fe(e),e.flags&=-3}}function Re(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)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0||e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var Ge=0,Ke=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}},qe=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||!Be||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Ke(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,Je(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++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(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)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function N(e,t,n){if(Be&&M){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function $e(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),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===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe))}}Ne()}function et(e){let t=F(e);return t===e?t:(N(t,`iterate`,Qe),P(e)?t:t.map(Vt))}function tt(e){return N(e=F(e),`iterate`,Qe),e}function nt(e,t){return Rt(e)?Ht(Lt(e)?Vt(t):t):Vt(t)}var rt={__proto__:null,[Symbol.iterator](){return it(this,Symbol.iterator,e=>nt(this,e))},concat(...e){return et(this).concat(...e.map(e=>d(e)?et(e):e))},entries(){return it(this,`entries`,e=>(e[1]=nt(this,e[1]),e))},every(e,t){return ot(this,`every`,e,t,void 0,arguments)},filter(e,t){return ot(this,`filter`,e,t,e=>e.map(e=>nt(this,e)),arguments)},find(e,t){return ot(this,`find`,e,t,e=>nt(this,e),arguments)},findIndex(e,t){return ot(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ot(this,`findLast`,e,t,e=>nt(this,e),arguments)},findLastIndex(e,t){return ot(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ot(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ct(this,`includes`,e)},indexOf(...e){return ct(this,`indexOf`,e)},join(e){return et(this).join(e)},lastIndexOf(...e){return ct(this,`lastIndexOf`,e)},map(e,t){return ot(this,`map`,e,t,void 0,arguments)},pop(){return lt(this,`pop`)},push(...e){return lt(this,`push`,e)},reduce(e,...t){return st(this,`reduce`,e,t)},reduceRight(e,...t){return st(this,`reduceRight`,e,t)},shift(){return lt(this,`shift`)},some(e,t){return ot(this,`some`,e,t,void 0,arguments)},splice(...e){return lt(this,`splice`,e)},toReversed(){return et(this).toReversed()},toSorted(e){return et(this).toSorted(e)},toSpliced(...e){return et(this).toSpliced(...e)},unshift(...e){return lt(this,`unshift`,e)},values(){return it(this,`values`,e=>nt(this,e))}};function it(e,t,n){let r=tt(e),i=r[t]();return r!==e&&!P(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var at=Array.prototype;function ot(e,t,n,r,i,a){let o=tt(e),s=o!==e&&!P(e),c=o[t];if(c!==at[t]){let t=c.apply(e,a);return s?Vt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,nt(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 st(e,t,n,r){let i=tt(e),a=i!==e&&!P(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=nt(e,t)),n.call(this,t,nt(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?nt(e,c):c}function ct(e,t,n){let r=F(e);N(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&zt(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function lt(e,t,n=[]){He(),Me();let r=F(e)[t].apply(e,n);return Ne(),Ue(),r}var ut=e(`__proto__,__v_isRef,__isVue`),dt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function ft(e){_(e)||(e=String(e));let t=F(this);return N(t,`has`,e),t.hasOwnProperty(e)}var pt=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?jt:At:i?kt:Ot).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=rt[t]))return e;if(t===`hasOwnProperty`)return ft}let o=Reflect.get(e,t,I(e)?e:n);if((_(t)?dt.has(t):ut(t))||(r||N(e,`get`,t),i))return o;if(I(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Ft(e):e}return v(o)?r?Ft(o):Nt(o):o}},mt=class extends pt{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=Rt(i);if(!P(n)&&!Rt(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?D(n,i)&&$e(e,`set`,t,n,i):$e(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&$e(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!_(t)||!dt.has(t))&&N(e,`has`,t),n}ownKeys(e){return N(e,`iterate`,d(e)?`length`:Xe),Reflect.ownKeys(e)}},ht=class extends pt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},gt=new mt,_t=new ht,vt=new mt(!0),yt=e=>e,bt=e=>Reflect.getPrototypeOf(e);function xt(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?yt:t?Ht:Vt;return!t&&N(a,`iterate`,l?Ze:Xe),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 St(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Ct(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(D(n,a)&&N(i,`get`,n),N(i,`get`,a));let{has:o}=bt(i),s=t?yt:e?Ht:Vt;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(F(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(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=F(a),s=t?yt:e?Ht:Vt;return!e&&N(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:St(`add`),set:St(`set`),delete:St(`delete`),clear:St(`clear`)}:{add(e){let n=F(this),r=bt(n),i=F(e),a=!t&&!P(e)&&!Rt(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),$e(n,`add`,a,a)),this},set(e,n){!t&&!P(n)&&!Rt(n)&&(n=F(n));let r=F(this),{has:i,get:a}=bt(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?D(n,s)&&$e(r,`set`,e,n,s):$e(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=bt(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&&$e(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&$e(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=xt(r,e,t)}),n}function wt(e,t){let n=Ct(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Tt={get:wt(!1,!1)},Et={get:wt(!1,!0)},Dt={get:wt(!0,!1)},Ot=new WeakMap,kt=new WeakMap,At=new WeakMap,jt=new WeakMap;function Mt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Nt(e){return Rt(e)?e:It(e,!1,gt,Tt,Ot)}function Pt(e){return It(e,!1,vt,Et,kt)}function Ft(e){return It(e,!0,_t,Dt,At)}function It(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=Mt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Lt(e){return Rt(e)?Lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function P(e){return!!(e&&e.__v_isShallow)}function zt(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function Bt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&O(e,`__v_skip`,!0),e}var Vt=e=>v(e)?Nt(e):e,Ht=e=>v(e)?Ft(e):e;function I(e){return e?e.__v_isRef===!0:!1}function Ut(e){return Gt(e,!1)}function Wt(e){return Gt(e,!0)}function Gt(e,t){return I(e)?e:new Kt(e,t)}var Kt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:Vt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||P(e)||Rt(e);e=n?e:F(e),D(e,t)&&(this._rawValue=e,this._value=n?e:Vt(e),this.dep.trigger())}};function L(e){return I(e)?e.value:e}var qt={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 Jt(e){return Lt(e)?e:new Proxy(e,qt)}var Yt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-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 je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Xt(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Yt(r,i,n)}var Zt={},Qt=new WeakMap,$t=void 0;function en(e,t=!1,n=$t){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}function tn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:P(e)||o===!1||o===0?nn(e,1):nn(e),m,g,_,v,y=!1,b=!1;if(I(e)?(g=()=>e.value,y=P(e)):Lt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Lt(e)||P(e)),g=()=>e.map(e=>{if(I(e))return e.value;if(Lt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=$t;$t=m;try{return f?f(e,3,[v]):e(v)}finally{$t=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>nn(e(),t)}let x=we(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Zt):Zt,w=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,C[t])):D(t,C))){_&&_();let e=$t;$t=m;try{let e=[t,C===Zt?void 0:b&&C[0]===Zt?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{$t=e}}}else m.run()}};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>en(e,!1,m),_=m.onStop=()=>{let e=Qt.get(m);if(e){if(f)f(e,4);else for(let t of e)t();Qt.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 nn(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))nn(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)nn(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{nn(e,t,n)});else if(C(e)){for(let r in e)nn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function an(e,t,n,r){if(h(e)){let i=rn(e,t,n,r);return i&&y(i)&&i.catch(e=>{on(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(an(e[a],t,n,r));return i}}function on(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){He(),rn(o,null,10,[e,i,a]),Ue();return}}sn(e,r,a,i,s)}function sn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var R=[],cn=-1,ln=[],un=null,dn=0,fn=Promise.resolve(),pn=null;function mn(e){let t=pn||fn;return e?t.then(this?e.bind(this):e):t}function hn(e){let t=cn+1,n=R.length;for(;t<n;){let r=t+n>>>1,i=R[r],a=xn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function gn(e){if(!(e.flags&1)){let t=xn(e),n=R[R.length-1];!n||!(e.flags&2)&&t>=xn(n)?R.push(e):R.splice(hn(t),0,e),e.flags|=1,_n()}}function _n(){pn||=fn.then(Sn)}function vn(e){if(!d(e))un&&e.id===-1?un.splice(dn+1,0,e):e.flags&1||(ln.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)ln.push(e[t]);_n()}function yn(e,t,n=cn+1){for(;n<R.length;n++){let t=R[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;R.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function bn(e){if(ln.length){let e=[...new Set(ln)].sort((e,t)=>xn(e)-xn(t));if(ln.length=0,un){for(let t=0;t<e.length;t++)un.push(e[t]);return}for(un=e,dn=0;dn<un.length;dn++){let e=un[dn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}un=null,dn=0}}var xn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Sn(e){try{for(cn=0;cn<R.length;cn++){let e=R[cn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),rn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;cn<R.length;cn++){let e=R[cn];e&&(e.flags&=-2)}cn=-1,R.length=0,bn(e),pn=null,(R.length||ln.length)&&Sn(e)}}var z=null,Cn=null;function wn(e){let t=z;return z=e,Cn=e&&e.type.__scopeId||null,t}function Tn(e,t=z,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Li(-1);let i=wn(t),a=Pi.length,o;try{o=e(...n)}finally{for(let e=Pi.length;e>a;e--)Fi();wn(i),r._d&&Li(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function En(e,n){if(z===null)return e;let r=ya(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&&nn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Dn(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&&(He(),an(c,n,8,[e.el,s,e,t]),Ue())}}function On(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 kn(e,t,n=!1){let r=ia();if(r||Hr){let i=Hr?Hr._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 An=Symbol.for(`v-scx`),jn=()=>kn(An);function Mn(e,t,n){return Nn(e,t,n)}function Nn(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(ua){if(c===`sync`){let e=jn();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)=>an(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{V(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():gn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=tn(e,n,u);return ua&&(f?f.push(h):d&&h()),h}function Pn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Fn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=sa(this),s=Nn(i,a.bind(r),n);return o(),s}function Fn(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 In=Symbol(`_vte`),Ln=e=>e.__isTeleport,Rn=Symbol(`_leaveCb`);function zn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Mi){t=n;break}}return t}function Bn(e){if(!Yn(e))return Ln(e.type)&&e.children?zn(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 Vn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Vn(Ln(n.type)&&Bn(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Hn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Un(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Wn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Gn=new WeakMap;function Kn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Kn(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Jn(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Kn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ya(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=>!Wn(_,e)&&u(y,e),x=(e,t)=>!(t&&Wn(_,t));if(m!=null&&m!==p){if(qn(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))rn(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(),Gn.delete(e)};t.id=-1,Gn.set(e,t),V(t,r)}else qn(e),i()}}}function qn(e){let t=Gn.get(e);t&&(t.flags|=8,Gn.delete(e))}le().requestIdleCallback,le().cancelIdleCallback;var Jn=e=>!!e.type.__asyncLoader,Yn=e=>e.type.__isKeepAlive;function Xn(e,t){Qn(e,`a`,t)}function Zn(e,t){Qn(e,`da`,t)}function Qn(e,t,n=J){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(er(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Yn(e.parent.vnode)&&$n(r,t,n,e),e=e.parent}}function $n(e,t,n,r){let i=er(t,e,r,!0);sr(()=>{c(r[t],i)},n)}function er(e,t,n=J,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=sa(n),a=an(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var tr=e=>(t,n=J)=>{(!ua||e===`sp`)&&er(e,(...e)=>t(...e),n)},nr=tr(`bm`),rr=tr(`m`),ir=tr(`bu`),ar=tr(`u`),or=tr(`bum`),sr=tr(`um`),cr=tr(`sp`),lr=tr(`rtg`),ur=tr(`rtc`);function dr(e,t=J){er(`ec`,e,t)}var fr=`components`,pr=Symbol.for(`v-ndc`);function mr(e){return g(e)?hr(fr,e,!1)||e:e||pr}function hr(e,t,n=!0,r=!1){let i=z||J;if(i){let n=i.type;if(e===fr){let e=ba(n,!1);if(e&&(e===t||e===T(t)||e===ie(T(t))))return n}let a=gr(i[e]||n[e],t)||gr(i.appContext[e],t);return!a&&r?n:a}}function gr(e,t){return e&&(e[t]||e[T(t)]||e[ie(T(t))])}function _r(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Lt(e),r=!1,s=!1;n&&(r=!P(e),s=Rt(e),e=tt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Ht(Vt(e[n])):Vt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(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 vr(e,t,n,r,i,a){if(n??={},z.ce||z.parent&&Jn(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(),zi(H,null,[q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Pi.length;W();let l;try{let i=o&&yr(o(n)),s=n.key||a||i&&i.key;l=zi(H,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Pi.length;e>c;e--)Fi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function yr(e){return e.some(e=>!Bi(e)||!(e.type===Mi||e.type===H&&!yr(e.children)))?e:null}var br=e=>e?la(e)?ya(e):br(e.parent):null,xr=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=>br(e.parent),$root:e=>br(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ar(e),$forceUpdate:e=>e.f||=()=>{gn(e.update)},$nextTick:e=>e.n||=mn.bind(e.proxy),$watch:e=>Pn.bind(e)}),Sr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Cr={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(Sr(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 Tr&&(s[n]=0)}let d=xr[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 Sr(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)||Sr(n,c)||u(o,c)||u(i,c)||u(xr,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 wr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Tr=!0;function Er(e){let t=Ar(e),n=e.proxy,i=e.ctx;Tr=!1,t.beforeCreate&&Or(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:ie,components:ae,directives:D,filters:oe}=t;if(u&&Dr(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=Nt(t))}if(Tr=!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)kr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{On(t,e[t])})}f&&Or(f,e,`c`);function O(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O(nr,p),O(rr,m),O(ir,g),O(ar,_),O(Xn,y),O(Zn,b),O(dr,T),O(ur,te),O(lr,ne),O(or,S),O(sr,w),O(cr,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),ie!=null&&(e.inheritAttrs=ie),ae&&(e.components=ae),D&&(e.directives=D),re&&Un(e)}function Dr(e,t,n=r){d(e)&&(e=Fr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?kn(r.from||n,r.default,!0):kn(r.from||n):kn(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Or(e,t,n){an(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function kr(e,t,n,r){let i=r.includes(`.`)?Fn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Mn(i,n)}else if(h(e))Mn(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>kr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Mn(i,r,e)}}}function Ar(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=>jr(c,e,o,!0)),jr(c,t,o)),v(t)&&a.set(t,c),c}function jr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&jr(e,a,n,!0),i&&i.forEach(t=>jr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Mr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Mr={data:Nr,props:Lr,emits:Lr,methods:Ir,computed:Ir,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:Ir,directives:Ir,watch:Rr,provide:Nr,inject:Pr};function Nr(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 Pr(e,t){return Ir(Fr(e),Fr(t))}function Fr(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 Ir(e,t){return e?s(Object.create(null),e,t):t}function Lr(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),wr(e),wr(t??{})):t}function Rr(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 zr(){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 Br=0;function Vr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=zr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Br++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Sa,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,ya(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(an(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=Hr;Hr=l;try{return e()}finally{Hr=t}}};return l}}var Hr=null,Ur=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Wr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ur(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(se)));let c,l=i[c=ae(n)]||i[c=ae(T(n))];!l&&o&&(l=i[c=ae(E(n))]),l&&an(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,an(u,e,6,a)}}var Gr=new WeakMap;function Kr(e,t,n=!1){let r=n?Gr: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=Kr(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 qr(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 Jr(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,_=wn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Xi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Xi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Yr(c)}}catch(t){Pi.length=0,on(t,e,1),v=q(Mi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Xr(y,a)),b=Ki(b,y,!1,!0))}return n.dirs&&(b=Ki(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Vn(Ln(b.type)&&Bn(b)||b,n.transition),v=b,wn(_),v}var Yr=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Xr=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Zr(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?Qr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if($r(o,r,n)&&!qr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Qr(r,o,l):!!o;return!1}function Qr(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($r(t,e,a)&&!qr(n,a))return!0}return!1}function $r(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!ye(r,i):r!==i}function ei({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 ti={},ni=()=>Object.create(ti),ri=e=>Object.getPrototypeOf(e)===ti;function ii(e,t,n,r=!1){let i={},a=ni();e.propsDefaults=Object.create(null),oi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Pt(i):e.type.props?i:a,e.attrs=a}function ai(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(qr(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]=si(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{oi(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]=si(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&&$e(e.attrs,`set`,``)}function oi(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:qr(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]=si(a,n,s,i[s],e,!u(i,s))}}return s}function si(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=sa(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 ci=new WeakMap;function li(e,r,i=!1){let a=i?ci: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]=li(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]);ui(n)&&(l[n]=t)}else if(c)for(let e in c){let t=T(e);if(ui(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 ui(e){return e[0]!==`$`&&!ee(e)}var di=e=>e===`_`||e===`_ctx`||e===`$stable`,fi=e=>d(e)?e.map(Xi):[Xi(e)],pi=(e,t,n)=>{if(t._n)return t;let r=Tn((...e)=>fi(t(...e)),n);return r._c=!1,r},mi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(di(n))continue;let i=e[n];if(h(i))t[n]=pi(n,i,r);else if(i!=null){let e=fi(i);t[n]=()=>e}}},hi=(e,t)=>{let n=fi(t);e.slots.default=()=>n},gi=(e,t,n)=>{for(let r in t)(n||!di(r))&&(e[r]=t[r])},_i=(e,t,n)=>{let r=e.slots=ni();if(e.vnode.shapeFlag&32){let e=t._;e?(gi(r,t,n),n&&O(r,`_`,e,!0)):mi(t,r)}else t&&hi(e,t)},vi=(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:gi(a,n,r):(o=!n.$stable,mi(n,a)),s=n}else n&&(hi(e,n),s={default:1});if(o)for(let e in a)!di(e)&&s[e]==null&&delete a[e]},V=Ai;function yi(e){return bi(e)}function bi(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,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Vi(e,t)&&(r=ye(e),k(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ji:y(e,t,n,r);break;case Mi:b(e,t,n,r);break;case Ni:e??x(t,n,r,o);break;case H:ae(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?D(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?Kn(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Kn(e.ref,null,a,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,xi(e,a),s,u),_&&Dn(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)&&ea(f,r,e)}_&&Dn(e,null,r,`beforeMount`);let v=Ci(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&V(()=>{try{f&&ea(f,r,e),v&&g.enter(d),_&&Dn(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||ki(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?Zi(e[l]):Xi(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&&Si(r,!1),(g=h.onVnodeBeforeUpdate)&&ea(g,r,n,e),f&&Dn(n,e,r,`beforeUpdate`),r&&Si(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,xi(n,a),o):s||de(e,n,l,null,r,i,xi(n,a),o,!1),u>0){if(u&16)ie(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&&ie(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&V(()=>{g&&ea(g,r,n,e),f&&Dn(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&&(c.type===H||!Vi(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},ie=(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)}},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),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)&&wi(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=ra(e,r,i);if(Yn(e)&&(s.ctx.renderer=xe),da(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ce,o),!e.el){let r=s.subTree=q(Mi);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(Zr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){ue(r,t,n);return}r.next=t,r.update()}else t.el=e.el,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=Ei(e);if(n){t&&(t.el=c.el,ue(e,t,o)),n.asyncDep.then(()=>{V(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Si(e,!1),t?(t.el=c.el,ue(e,t,o)):t=c,n&&oe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ea(d,s,t,c),Si(e,!0);let f=Jr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&ei(e,f.el),r&&V(r,i),(d=t.props&&t.props.onVnodeUpdated)&&V(()=>ea(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=Jn(t);if(Si(e,!1),l&&oe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ea(o,d,t),Si(e,!0),s&&j){let t=()=>{e.subTree=Jr(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=Jr(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(()=>ea(o,d,e),i)}(t.shapeFlag&256||d&&Jn(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 De(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=()=>gn(u),Si(e,!0),l()},ue=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ai(e,t.props,r,n),vi(e,t.children,n),He(),yn(e),Ue()},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&&T(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;for(p=0;p<f;p++){let n=t[p]=l?Zi(t[p]):Xi(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?ve(e,a,o,!0,!1,f):T(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?Zi(t[u]):Xi(t[u]);if(Vi(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?Zi(t[p]):Xi(t[p]);if(Vi(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?Zi(t[u]):Xi(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?Zi(t[u]):Xi(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){k(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Vi(n,t[_])){i=_;break}i===void 0?k(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?Ti(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||Oi(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?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);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===H){o(a,t,n);for(let e=0;e<u.length;e++)me(u[e],t,n,r);o(e.anchor,t,n);return}if(c===Ni){S(e,t,n);return}if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Rn]?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[Rn];a._isLeaving&&a[Rn](!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&&(i=!1),s!=null&&(He(),Kn(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Jn(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ea(_,t,e),u&6)_e(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Dn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?ve(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&ve(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&V(()=>{_&&ea(_,t,e),h&&Dn(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===H){ge(n,r);return}if(t===Ni){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},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;Di(c),Di(l),r&&oe(r),i.stop(),a&&(a.flags|=8,k(o,e,t,n)),s&&V(s,t),V(()=>{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[In];return n?h(n):t},be=!1,A=(e,t,n)=>{let r;e==null?t._vnode&&(k(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,yn(r),bn(),!1)},xe={p:v,um:k,m:me,r:he,mt:O,mc:T,pc:de,pbc:E,n:ye,o:e},Se,j;return i&&([Se,j]=i(xe)),{render:A,hydrate:Se,createApp:Vr(A,Se)}}function xi({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 Si({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ci(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wi(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]=Zi(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&wi(t,a)),a.type===ji&&(a.patchFlag===-1&&(a=i[e]=Zi(a)),a.el=t.el),a.type===Mi&&!a.el&&(a.el=t.el)}}function Ti(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 Ei(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ei(t)}function Di(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Oi(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Oi(t.subTree):null}var ki=e=>e.__isSuspense;function Ai(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):vn(e)}var H=Symbol.for(`v-fgt`),ji=Symbol.for(`v-txt`),Mi=Symbol.for(`v-cmt`),Ni=Symbol.for(`v-stc`),Pi=[],U=null;function W(e=!1){Pi.push(U=e?null:[])}function Fi(){Pi.pop(),U=Pi[Pi.length-1]||null}var Ii=1;function Li(e,t=!1){Ii+=e,e<0&&U&&t&&(U.hasOnce=!0)}function Ri(e){return e.dynamicChildren=Ii>0?U||n:null,Fi(),Ii>0&&U&&U.push(e),e}function G(e,t,n,r,i,a){return Ri(K(e,t,n,r,i,a,!0))}function zi(e,t,n,r,i){return Ri(q(e,t,n,r,i,!0))}function Bi(e){return e?e.__v_isVNode===!0:!1}function Vi(e,t){return e.type===t.type&&e.key===t.key}var Hi=({key:e})=>e??null,Ui=({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&&Hi(t),ref:t&&Ui(t),scopeId:Cn,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?(Qi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Ii>0&&!o&&U&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&U.push(c),c}var q=Wi;function Wi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===pr)&&(e=Mi),Bi(e)){let r=Ki(e,t,!0);return n&&Qi(r,n),Ii>0&&!a&&U&&(r.shapeFlag&6?U[U.indexOf(e)]=r:U.push(r)),r.patchFlag=-2,r}if(xa(e)&&(e=e.__vccOpts),t){t=Gi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=k(e)),v(n)&&(zt(n)&&!d(n)&&(n=s({},n)),t.style=ue(n))}let o=g(e)?1:ki(e)?128:Ln(e)?64:v(e)?4:h(e)?2:0;return K(e,t,n,r,i,o,a,!0)}function Gi(e){return e?zt(e)||ri(e)?s({},e):e:null}function Ki(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?$i(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Hi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Ui(t)):[a,Ui(t)]:Ui(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&&Ki(e.ssContent),ssFallback:e.ssFallback&&Ki(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Vn(u,c.clone(u)),u}function qi(e=` `,t=0){return q(ji,null,e,t)}function Ji(e,t){let n=q(Ni,null,e);return n.staticCount=t,n}function Yi(e=``,t=!1){return t?(W(),zi(Mi,null,e)):q(Mi,null,e)}function Xi(e){return e==null||typeof e==`boolean`?q(Mi):d(e)?q(H,null,e.slice()):Bi(e)?Zi(e):q(ji,null,String(e))}function Zi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ki(e)}function Qi(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),Qi(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!ri(t)?t._ctx=z:r===3&&z&&(z.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){Qi(e,{default:t});return}t={default:t,_ctx:z},n=32}else t=String(t),r&64?(n=16,t=[qi(t)]):n=8;e.children=t,e.shapeFlag|=n}function $i(...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 ea(e,t,n,r=null){an(e,t,7,[n,r])}var ta=zr(),na=0;function ra(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ta,o={uid:na++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ce(!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:li(i,a),emitsOptions:Kr(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=Wr.bind(null,o),e.ce&&e.ce(o),o}var J=null,ia=()=>J||z,aa,oa;{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)}};aa=t(`__VUE_INSTANCE_SETTERS__`,e=>J=e),oa=t(`__VUE_SSR_SETTERS__`,e=>ua=e)}var sa=e=>{let t=J;return aa(e),e.scope.on(),()=>{e.scope.off(),aa(t)}},ca=()=>{J&&J.scope.off(),aa(null)};function la(e){return e.vnode.shapeFlag&4}var ua=!1;function da(e,t=!1,n=!1){t&&oa(t);let{props:r,children:i}=e.vnode,a=la(e);ii(e,r,a,t),_i(e,i,n||t);let o=a?fa(e,t):void 0;return t&&oa(!1),o}function fa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cr);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?va(e):null,i=sa(e),a=rn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Jn(e)&&Un(e),o){if(a.then(ca,ca),t)return a.then(n=>{oa(!0);try{pa(e,n,t)}finally{oa(!1)}}).catch(t=>{on(t,e,0)});e.asyncDep=a}else pa(e,a,t)}else ga(e,t)}function pa(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Jt(t)),ga(e,n)}var ma,ha;function ga(e,t,n){let i=e.type;if(!e.render){if(!t&&ma&&!i.render){let t=i.template||Ar(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=ma(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,ha&&ha(e)}{let t=sa(e);He();try{Er(e)}finally{Ue(),t()}}}var _a={get(e,t){return N(e,`get`,``),e[t]}};function va(e){return{attrs:new Proxy(e.attrs,_a),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ya(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Bt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xr)return xr[n](e)},has(e,t){return t in e||t in xr}}):e.proxy}function ba(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function xa(e){return h(e)&&`__vccOpts`in e}var Y=(e,t)=>Xt(e,t,ua),Sa=`3.5.41`,Ca=void 0,wa=typeof window<`u`&&window.trustedTypes;if(wa)try{Ca=wa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ta=Ca?e=>Ca.createHTML(e):e=>e,Ea=`http://www.w3.org/2000/svg`,Da=`http://www.w3.org/1998/Math/MathML`,Oa=typeof document<`u`?document:null,ka=Oa&&Oa.createElement(`template`),Aa={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`?Oa.createElementNS(Ea,e):t===`mathml`?Oa.createElementNS(Da,e):n?Oa.createElement(e,{is:n}):Oa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Oa.createTextNode(e),createComment:e=>Oa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oa.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{ka.innerHTML=Ta(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ka.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]}},ja=Symbol(`_vtc`);function Ma(e,t,n){let r=e[ja];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Na=Symbol(`_vod`),Pa=Symbol(`_vsh`),Fa={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Na]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Ia(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),Ia(e,!0),r.enter(e)):r.leave(e,()=>{Ia(e,!1)}):Ia(e,t))},beforeUnmount(e,{value:t}){Ia(e,t)}};function Ia(e,t){e.style.display=t?e[Na]:`none`,e[Pa]=!t}var La=Symbol(``),Ra=/(?:^|;)\s*display\s*:/;function za(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]??Va(r,t,``)}else for(let e in t)n[e]??Va(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Va(r,i,``):Ga(e,i,!g(t)&&t?t[i]:void 0,o)||Va(r,i,o)}}else if(i){if(t!==n){let e=r[La];e&&(n+=`;`+e),r.cssText=n,a=Ra.test(n)}}else t&&e.removeAttribute(`style`);Na in e&&(e[Na]=a?r.display:``,e[Pa]&&(r.display=`none`))}var Ba=/\s*!important$/;function Va(e,t,n){if(d(n))n.forEach(n=>Va(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Wa(e,t);Ba.test(n)?e.setProperty(E(r),n.replace(Ba,``),`important`):e[r]=n}}var Ha=[`Webkit`,`Moz`,`ms`],Ua={};function Wa(e,t){let n=Ua[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Ua[t]=r;r=ie(r);for(let n=0;n<Ha.length;n++){let i=Ha[n]+r;if(i in e)return Ua[t]=i}return t}function Ga(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Ka=`http://www.w3.org/1999/xlink`;function qa(e,t,n,r,i,a=ge(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ka,t.slice(6,t.length)):e.setAttributeNS(Ka,t,n):n==null||a&&!_e(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function Ja(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Ta(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=_e(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 Ya(e,t,n,r){e.addEventListener(t,n,r)}function Xa(e,t,n,r){e.removeEventListener(t,n,r)}var Za=Symbol(`_vei`);function Qa(e,t,n,r,i=null){let a=e[Za]||(e[Za]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=to(t);r?Ya(e,n,a[t]=ao(r,i),s):o&&(Xa(e,n,o,s),a[t]=void 0)}}var $a=/(Once|Passive|Capture)$/,eo=/^on:?(?:Once|Passive|Capture)$/;function to(e){let t,n;for(;(n=e.match($a))&&!eo.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 no=0,ro=Promise.resolve(),io=()=>no||=(ro.then(()=>no=0),Date.now());function ao(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&&an(e,t,5,a)}}else an(r,t,5,[e])};return n.value=e,n.attached=io(),n}var oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,so=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Ma(e,r,c):t===`style`?za(e,n,r):a(t)?o(t)||Qa(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):co(e,t,r,c))?(Ja(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&qa(e,t,r,c,s,t!==`value`)):e._isVueCE&&(lo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Ja(e,T(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),qa(e,t,r,c))};function co(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&oo(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 oo(t)&&g(n)?!1:t in e}function lo(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 uo=s({patchProp:so},Aa),fo;function po(){return fo||=yi(uo)}var mo=((...e)=>{let t=po().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=go(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,ho(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function ho(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function go(e){return g(e)?document.querySelector(e):e}var _o=Hn({__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)=>(W(),G(`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))}}),vo=Hn({__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 px-2.5! py-1!`:`btn-primary`:t.variant===`text`?`inline-flex items-center gap-1.5 op75 hover:op100 transition${a.value?` text-sm`:``}`:a.value?`btn-action-sm`:`btn-action`),s=Y(()=>t.disabled||t.loading);return(t,a)=>(W(),zi(mr(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:Tn(()=>[e.loading?(W(),zi(_o,{key:0,size:`1em`})):e.icon?(W(),G(`span`,{key:1,class:k(e.icon),"aria-hidden":`true`},null,2)):Yi(``,!0),vr(t.$slots,`default`)]),_:3},8,[`class`,`href`,`to`,`disabled`,`aria-disabled`,`aria-busy`]))}}),yo={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`},bo={class:`flex flex-col gap-1`},xo={class:`text-lg font-medium`},So={class:`text-sm color-muted max-w-sm`},Co={key:0,class:`mt-1 max-w-sm break-words font-mono text-xs color-faint`},wo=Hn({__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?(W(),G(`div`,yo,[K(`div`,{class:k([r.value.icon,`text-4xl color-active`])},null,2),K(`div`,bo,[K(`p`,xo,A(r.value.title),1),K(`p`,So,A(r.value.body),1),e.error&&e.status===`error`?(W(),G(`code`,Co,A(e.error),1)):Yi(``,!0)]),e.status===`connecting`?Yi(``,!0):(W(),zi(vo,{key:0,variant:`primary`,size:`sm`,onClick:n[0]||=()=>t.location.reload()},{default:Tn(()=>[...n[1]||=[qi(` Reload `,-1)]]),_:1}))])):Yi(``,!0)}}),To=Hn({__name:`EditorFrame`,props:{connect:{},port:{}},setup(e){let t=e,n=Ut(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 rr(a),Mn(()=>[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))}}),Eo={class:`absolute inset-0 flex items-center justify-center p-6 bg-base color-base font-sans`},Do={class:`w-full max-w-[560px]`},Oo={class:`flex items-center gap-1.5 mb-2.5 text-xs tracking-wider uppercase color-muted`},ko={key:0,class:`flex items-center gap-2.5`},Ao={class:`flex items-center gap-2.5`},jo={class:`text-sm color-muted`},Mo={key:0,class:`mt-4 px-3.5 py-3 rounded-md border border-base bg-secondary text-sm`},No={class:`flex flex-wrap items-center gap-x-2 gap-y-1`},Po=[`href`],Fo={class:`font-mono color-base px-1.5 py-0.5 rounded bg-base border border-base tracking-wider`},Io={class:`flex flex-col gap-3 mb-5`},Lo={class:`block mb-1 text-xs color-muted`},Ro={class:`flex items-center gap-2 px-2.5 py-2 rounded-md border border-base bg-secondary`},zo={class:`flex-1 of-x-auto whitespace-nowrap font-mono text-xs color-base`},Bo={class:`flex flex-wrap items-center gap-2.5`},Vo={class:`mb-5 text-sm leading-relaxed color-muted`},Ho={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`},Uo={class:`flex flex-wrap gap-x-4 gap-y-1.5 mb-5 text-xs color-muted`},Wo={class:`font-mono color-base`},Go={key:0},Ko={class:`font-mono color-base`},qo={key:1},Jo={class:`font-mono color-base`},Yo={class:`font-mono color-base`},Xo=`https://coder.com/docs/code-server/latest/install`,Zo=`https://github.com/coder/code-server`,Qo=Hn({__name:`LauncherView`,props:{phase:{},detection:{},server:{},busy:{type:Boolean}},emits:[`launch`,`recheck`],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=Ut(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)=>(W(),G(`div`,Eo,[K(`div`,Do,[K(`p`,Oo,[n[2]||=K(`span`,{class:`i-ph-code-duotone text-sm`},null,-1),K(`span`,null,A(s.value),1)]),e.phase===`connecting`?(W(),G(`div`,ko,[q(_o,{size:`1rem`,class:`color-muted`}),n[3]||=K(`span`,{class:`text-sm color-muted`},`Connecting to devframe…`,-1)])):e.phase===`starting`?(W(),G(H,{key:1},[K(`div`,Ao,[q(_o,{size:`1rem`,class:`color-muted`}),K(`span`,jo,A(e.detection.mode===`tunnel`?`Opening the tunnel…`:`Starting the editor…`),1)]),e.server.login?(W(),G(`div`,Mo,[n[7]||=K(`p`,{class:`mb-2 color-muted`},` Authorize the tunnel to continue: `,-1),K(`p`,No,[n[5]||=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`},[qi(A(e.server.login.url)+` `,1),n[4]||=K(`span`,{class:`i-ph-arrow-square-out size-3.5`},null,-1)],8,Po),n[6]||=K(`span`,{class:`color-muted`},`and enter code`,-1),K(`code`,Fo,A(e.server.login.code),1)])])):Yi(``,!0)],64)):e.phase===`not-installed`?(W(),G(H,{key:2},[n[10]||=Ji(`<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`,Io,[(W(),G(H,null,_r(i,({label:e,command:t})=>K(`div`,{key:e},[K(`label`,Lo,A(e),1),K(`div`,Ro,[K(`code`,zo,A(t),1),q(vo,{variant:`action`,size:`sm`,class:`shrink-0 text-[11px]`,onClick:e=>o(t)},{default:Tn(()=>[qi(A(a.value===t?`Copied`:`Copy`),1)]),_:2},1032,[`onClick`])])])),64))]),K(`div`,Bo,[q(vo,{variant:`primary`,icon:e.busy?void 0:`i-ph-arrows-clockwise`,loading:e.busy,disabled:e.busy,onClick:n[0]||=e=>r(`recheck`)},{default:Tn(()=>[qi(A(e.busy?`Checking…`:`Re-check`),1)]),_:1},8,[`icon`,`loading`,`disabled`]),q(vo,{variant:`text`,size:`sm`,href:Xo,icon:`i-ph-arrow-square-out`},{default:Tn(()=>[...n[8]||=[qi(` Installation docs `,-1)]]),_:1}),q(vo,{variant:`text`,size:`sm`,href:Zo,icon:`i-ph-github-logo`},{default:Tn(()=>[...n[9]||=[qi(` GitHub `,-1)]]),_:1})])],64)):(W(),G(H,{key:3},[n[15]||=K(`h1`,{class:`mb-2 text-[1.35rem] font-semibold`},` Launch the editor `,-1),K(`p`,Vo,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?(W(),G(`div`,Ho,A(c.value),1)):Yi(``,!0),K(`div`,Uo,[K(`span`,null,[n[11]||=qi(`mode `,-1),K(`code`,Wo,A(e.detection.mode),1)]),e.detection.mode===`local`?(W(),G(`span`,Go,[n[12]||=qi(`backend `,-1),K(`code`,Ko,A(e.detection.backend),1)])):Yi(``,!0),e.detection.version?(W(),G(`span`,qo,[n[13]||=qi(`version `,-1),K(`code`,Jo,A(e.detection.version),1)])):Yi(``,!0),K(`span`,null,[n[14]||=qi(`binary `,-1),K(`code`,Yo,A(e.detection.bin),1)])]),q(vo,{variant:`primary`,icon:e.busy?void 0:`i-ph-rocket-launch-duotone`,loading:e.busy,disabled:e.busy,onClick:n[1]||=e=>r(`launch`)},{default:Tn(()=>[qi(A(e.busy?`Starting…`:e.detection.mode===`tunnel`?`Open tunnel`:`Launch editor`),1)]),_:1},8,[`icon`,`loading`,`disabled`])],64))])]))}}),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`,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`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`}},$o=`__connection.json`,es=`__DEVFRAME_CONNECTION__`,ts=`x-birpc-session`,ns=`__rpc-dump/index.json`,rs=`devframe:services`,is=`devframe_otp`,as=`devframe_auth_token`;X.postMessage.remoteAssetsError;function os(e){return typeof e==`string`?`'${e}'`:new ss().serialize(e)}var ss=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(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(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}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}(),cs=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ls=[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],us=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,ds=[],fs=class{_data=new ps;_hash=new ps([...cs]);_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)ds[n]=e[t+n]|0;else{let e=ds[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=ds[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;ds[n]=t+ds[n-7]+i+ds[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+ls[n]+ds[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=ps.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 ps(t,i)}},ps=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(us.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 ms(e){return new fs().finalize(e).toBase64()}function hs(e){return ms(os(e))}function gs(e){return hs(e)}var _s=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>gs(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 vs(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 ys={blue:vs(34,39),cyan:vs(36,39),gray:vs(90,39),green:vs(32,39),red:vs(31,39),yellow:vs(33,39),bold:vs(1,22),dim:vs(2,22),reset:vs(0,0),underline:vs(4,24)};function bs(e,...t){return typeof e==`function`?e(...t):e}var xs=Error.captureStackTrace,Ss=class e extends Error{name;code;docs;fix;sources;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,xs?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function Cs(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function ws(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||Cs(r,i),s=(e={},n={})=>{let r=new Ss({code:i,why:bs(a.why,e),fix:bs(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Ts(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=Ts(ys);function Ds(e,{method:t=`warn`}={}){console[t](Es(e))}function Os(e){return ws({...e,reporters:[Ds,...e.reporters??[]]})}var ks=Os({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,fix:"Set `jsonSerializable: true` if the payload is JSON-safe, 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."}}});async function As(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function js(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 Ms(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 ks.DF0043({name:e,index:r,issues:js(a.issues)})}return r}async function Ns(e,t,n){if(!t)return n;let r=await As(t,n);if(r.issues)throw ks.DF0044({name:e,issues:js(r.issues)});return n}async function Ps(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 Fs(e,t){let n=e.handler;if(!n){let r=await Ps(e,t);if(!r.handler)throw ks.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 Ms(e.name,r,t),o=await a(...n);return await Ns(e.name,i,o)}}var Is=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 Fs(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 ks.DF0021({name:e.name});Ls(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 ks.DF0022({name:e.name});Ls(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 Fs(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw ks.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 Ls(e){if(e.agent&&e.jsonSerializable!==!0)throw ks.DF0019({name:e.name})}function Rs(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 zs(t,`undefined`,r,e);return n}if(i===null)return n;if(typeof i==`bigint`)throw zs(t,`BigInt`,r,e);if(typeof i==`object`){if(i instanceof Map)throw zs(t,`Map`,r,e);if(i instanceof Set)throw zs(t,`Set`,r,e);if(i instanceof Date)throw zs(t,`Date`,r,e);if(Array.isArray(i))return n;let a=Object.getPrototypeOf(i);if(a!==null&&a!==Object.prototype)throw zs(t,i.constructor?.name??`class instance`,r,e)}return n})}function zs(e,t,n,r){let i=Bs(n,r);return ks.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Bs(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function Vs(){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}}String.fromCharCode;var Hs=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Us=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ws=/^([/\\]\s*){2,}[^/\\]/,Gs=/\/$|\/\?|\/#/,Ks=/^\.?\//;function qs(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?Hs.test(e):Us.test(e)||(t.acceptRelative?Ws.test(e):!1)}function Js(e=``,t){return t?Gs.test(e):e.endsWith(`/`)}function Ys(e=``,t){if(!t)return(Js(e)?e.slice(0,-1):e)||`/`;if(!Js(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function Xs(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(Js(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function Zs(e,t){if(Qs(t)||qs(e))return e;let n=Ys(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return ec(n,e)}function Qs(e){return!e||e===`/`}function $s(e){return e&&e!==`/`}function ec(e,...t){let n=e||``;for(let e of t.filter(e=>$s(e)))if(n){let t=e.replace(Ks,``);n=Xs(n)+t}else n=e;return n}function tc(e,t){let n=e.match(Us);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}var nc=`__DEVFRAME_CONNECTION_META__`,rc=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function ic(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 ac(){return ic(es)}function oc(){return ic(nc)}function sc(e){if(e)return e;try{let e=localStorage.getItem(rc);if(e)return e}catch{}return ic(rc)}function cc(e){globalThis[es]=e,globalThis[nc]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&lc(e.authToken)}function lc(e){try{localStorage.setItem(rc,e)}catch{}globalThis[rc]=e;let t=ac();t&&(globalThis[es]={...t,authToken:e})}function uc(e){let t=Zs($o,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function dc(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function fc(){let e=ac();if(e)return dc(e,sc()??e.authToken??e.connectionMeta.authToken);let t=oc();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??uc(`./`),authToken:sc(t.authToken)}}async function pc(e={}){if(e.connection){let t=dc(e.connection,sc(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return cc(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:uc(t[0]??`./`),authToken:sc(e.authToken??e.connectionMeta.authToken)};return cc(n),n}let n=fc();if(n){let t=dc(n,sc(e.authToken??n.authToken??n.connectionMeta.authToken));return cc(t),t}let r=[];for(let n of t){let t=Zs($o,n),i=uc(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={connectionMeta:r,metaBaseUrl:n.url||i,authToken:sc(e.authToken??r.authToken)};return cc(a),a}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var mc=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function hc(e=is){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function gc(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 _c(e=is){let t=hc(e);return t&&gc(e),t}async function vc(e,t={}){let n=_c(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function yc(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(rs,{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 bc=Symbol.for(`immer-nothing`),xc=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,Sc=$.getPrototypeOf,Cc=`constructor`,wc=`prototype`,Tc=`configurable`,Ec=`enumerable`,Dc=`writable`,Oc=`value`,kc=e=>!!e&&!!e[Z];function Ac(e){return e?Nc(e)||Bc(e)||!!e[xc]||!!e[Cc]?.[xc]||Vc(e)||Hc(e):!1}var jc=$[wc][Cc].toString(),Mc=new WeakMap;function Nc(e){if(!e||!Uc(e))return!1;let t=Sc(e);if(t===null||t===$[wc])return!0;let n=$.hasOwnProperty.call(t,Cc)&&t[Cc];if(n===Object)return!0;if(!Wc(n))return!1;let r=Mc.get(n);return r===void 0&&(r=Function.toString.call(n),Mc.set(n,r)),r===jc}function Pc(e,t,n=!0){Fc(e)===0?(n?Reflect.ownKeys(e):$.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fc(e){let t=e[Z];return t?t.type_:Bc(e)?1:Vc(e)?2:Hc(e)?3:0}var Ic=(e,t,n=Fc(e))=>n===2?e.has(t):$[wc].hasOwnProperty.call(e,t),Lc=(e,t,n=Fc(e))=>n===2?e.get(t):e[t],Rc=(e,t,n,r=Fc(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function zc(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Bc=Array.isArray,Vc=e=>e instanceof Map,Hc=e=>e instanceof Set,Uc=e=>typeof e==`object`,Wc=e=>typeof e==`function`,Gc=e=>typeof e==`boolean`;function Kc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var qc=e=>Uc(e)?e?.[Z]:null,Jc=e=>e.copy_||e.base_,Yc=e=>e.modified_?e.copy_:e.base_;function Xc(e,t){if(Vc(e))return new Map(e);if(Hc(e))return new Set(e);if(Bc(e))return Array[wc].slice.call(e);let n=Nc(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[Dc]===!1&&(a[Dc]=!0,a[Tc]=!0),(a.get||a.set)&&(t[i]={[Tc]:!0,[Dc]:!0,[Ec]:a[Ec],[Oc]:e[i]})}return $.create(Sc(e),t)}{let t=Sc(e);if(t!==null&&n)return{...e};let r=$.create(t);return $.assign(r,e)}}function Zc(e,t=!1){return el(e)||kc(e)||!Ac(e)?e:(Fc(e)>1&&$.defineProperties(e,{set:$c,add:$c,clear:$c,delete:$c}),$.freeze(e),t&&Pc(e,(e,t)=>{Zc(t,!0)},!1),e)}function Qc(){Q(2)}var $c={[Oc]:Qc};function el(e){return e===null||!Uc(e)||$.isFrozen(e)}var tl=`MapSet`,nl=`Patches`,rl=`ArrayMethods`,il={};function al(e){let t=il[e];return t||Q(0,e),t}var ol=e=>!!il[e];function sl(e,t){il[e]||(il[e]=t)}var cl,ll=()=>cl,ul=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ol(tl)?al(tl):void 0,arrayMethodsPlugin_:ol(rl)?al(rl):void 0});function dl(e,t){t&&(e.patchPlugin_=al(nl),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fl(e){pl(e),e.drafts_.forEach(hl),e.drafts_=null}function pl(e){e===cl&&(cl=e.parent_)}var ml=e=>cl=ul(cl,e);function hl(e){let t=e[Z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gl(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Z].modified_&&(fl(t),Q(4)),Ac(e)&&(e=_l(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Z].base_,e,t)}else e=_l(t,n);return vl(t,e,!0),fl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===bc?void 0:e}function _l(e,t){if(el(t))return t;let n=t[Z];if(!n)return El(t,e.handledSet_,e);if(!bl(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);wl(n,e)}return n.copy_}function vl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zc(t,n)}function yl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bl=(e,t)=>e.scope_===t,xl=[];function Sl(e,t,n,r){let i=Jc(e),a=e.type_;if(r!==void 0&&Lc(i,r,a)===t){Rc(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Pc(i,(e,n)=>{if(kc(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??xl;for(let e of o)Rc(i,e,n,a)}function Cl(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!bl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Yc(i);Sl(e,i.draft_??i,a,n),wl(i,r)})}function wl(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)}yl(e)}}function Tl(e,t,n){let{scope_:r}=e;if(kc(n)){let i=n[Z];bl(i,r)&&i.callbacks_.push(function(){Fl(e),Sl(e,n,Yc(i),t)})}else Ac(n)&&e.callbacks_.push(function(){let i=Jc(e);e.type_===3?i.has(n)&&El(n,r.handledSet_,r):Lc(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&El(Lc(e.copy_,t,e.type_),r.handledSet_,r)})}function El(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||kc(e)||t.has(e)||!Ac(e)||el(e)?e:(t.add(e),Pc(e,(r,i)=>{if(kc(i)){let t=i[Z];bl(t,n)&&(Rc(e,r,Yc(t),e.type_),yl(t))}else Ac(i)&&El(i,t,n)}),e)}function Dl(e,t){let n=Bc(e),r={type_:+!!n,scope_:t?t.scope_:ll(),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=Ol;n&&(i=[r],a=kl);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ol={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=Jc(e);if(!Ic(i,t,e.type_))return Ml(e,i,t);let a=i[t];if(e.finalized_||!Ac(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Kc(t))return a;if(a===Al(e.base_,t)||jl(e,t,a)){Fl(e);let n=e.type_===1?+t:t,r=Ll(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Jc(e)},ownKeys(e){return Reflect.ownKeys(Jc(e))},set(e,t,n){let r=Nl(Jc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Al(Jc(e),t),i=r?.[Z];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(zc(n,r)&&(n!==void 0||Ic(e.base_,t,e.type_)))return!0;Fl(e),Pl(e)}return e.copy_[t]===n&&(n!==void 0||Ic(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Tl(e,t,n),!0)},deleteProperty(e,t){return Fl(e),Al(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Pl(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Jc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Dc]:!0,[Tc]:e.type_!==1||t!==`length`,[Ec]:r[Ec],[Oc]:n[t]}},defineProperty(){Q(11)},getPrototypeOf(e){return Sc(e.base_)},setPrototypeOf(){Q(12)}},kl={};for(let e in Ol){let t=Ol[e];kl[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}kl.deleteProperty=function(e,t){return kl.set.call(this,e,t,void 0)},kl.set=function(e,t,n){return Ol.set.call(this,e[0],t,n,e[0])};function Al(e,t){let n=e[Z];return(n?Jc(n):e)[t]}function jl(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Ac(n)||n[Z]?!1:e.baseRefs_.has(n)}function Ml(e,t,n){let r=Nl(t,n);return r?Oc in r?r[Oc]:r.get?.call(e.draft_):void 0}function Nl(e,t){if(!(t in e))return;let n=Sc(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Sc(n)}}function Pl(e){e.modified_||(e.modified_=!0,e.parent_&&Pl(e.parent_))}function Fl(e){e.copy_||=(e.assigned_=new Map,Xc(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(Wc(e)&&!Wc(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Wc(t)||Q(6),n!==void 0&&!Wc(n)&&Q(7);let r;if(Ac(e)){let i=ml(this),a=Ll(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?fl(i):pl(i)}return dl(i,n),gl(r,i)}if(!e||!Uc(e)){if(r=t(e),r===void 0&&(r=e),r===bc&&(r=void 0),this.autoFreeze_&&Zc(r,!0),n){let t=[],i=[];al(nl).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Q(1,e)},this.produceWithPatches=(e,t)=>{if(Wc(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]},Gc(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Gc(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Gc(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ac(e)||Q(8),kc(e)&&(e=Rl(e));let t=ml(this),n=Ll(t,e,void 0);return n[Z].isManual_=!0,pl(t),n}finishDraft(e,t){let n=e&&e[Z];(!n||!n.isManual_)&&Q(9);let{scope_:r}=n;return dl(r,t),gl(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=al(nl).applyPatches_;return kc(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Ll(e,t,n,r){let[i,a]=Vc(t)?al(tl).proxyMap_(t,n):Hc(t)?al(tl).proxySet_(t,n):Dl(t,n);return(n?.scope_??ll()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Cl(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 Rl(e){return kc(e)||Q(10,e),zl(e)}function zl(e){if(!Ac(e)||el(e))return e;let t=e[Z],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xc(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Xc(e,!0);return Pc(n,(e,t)=>{Rc(n,e,zl(t))},r),t&&(t.finalized_=!1),n}function Bl(){function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=qc(Lc(e,n.key_)),i=Lc(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&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)))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=Lc(n,r),!Uc(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;Pc(e.assigned_,(e,l)=>{let u=Lc(o,e,c),f=Lc(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===bc?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=Fc(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===Cc)&&Q(19),Wc(o)&&n===wc&&Q(19),o=Lc(o,n),(o===null||!Uc(o))&&Q(18,i.join(`/`))}let s=Fc(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(!Ac(e))return e;if(Bc(e))return e.map(u);if(Vc(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Hc(e))return new Set(Array.from(e).map(u));let t=Object.create(Sc(e));for(let n in e)t[n]=u(e[n]);return Ic(e,xc)&&(t[xc]=e[xc]),t}function d(e){return kc(e)?u(e):e}sl(nl,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}var Vl=new Il,Hl=Vl.produce,Ul=Vl.produceWithPatches.bind(Vl),Wl=Vl.applyPatches.bind(Vl),Gl=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Kl(e=21){let t=``,n=e;for(;n--;)t+=Gl[Math.random()*64|0];return t}var ql=1e3;function Jl(e,t){if(e.add(t),e.size>ql){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Yl(e){let{enablePatches:t=!1}=e;t&&Bl();let n=Vs(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Kl())=>{i.has(t)||(Bl(),r=Wl(r,e),Jl(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Kl())=>{if(!i.has(a)){if(Jl(i,a),t){let[t,i]=Ul(r,e);r=t,n.emit(`updated`,r,i,a)}else r=Hl(r,e),n.emit(`updated`,r,void 0,a)}},syncIds:i}}function Xl(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){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)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=Yl({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);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),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=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(X.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Zl=typeof self==`object`?self:globalThis,Ql=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),$l=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function eu(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=Ql.has(e)?Zl[e]:void 0;return n(new(r??Zl.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`&&$l.has(a))return n(new Zl[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function tu(e){return eu(new Map,e)(0)}var nu=``,{toString:ru}={},{keys:iu}=Object;function au(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ru.call(e).slice(8,-1);switch(n){case`Array`:return[1,nu];case`Object`:return[2,nu];case`Date`:return[3,nu];case`RegExp`:return[4,nu];case`Map`:return[5,nu];case`Set`:return[6,nu];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function ou([e,t]){return e===0&&(t===`function`||t===`symbol`)}function su(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]=au(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 iu(r))(e||!ou(au(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||!(ou(au(n))||ou(au(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!ou(au(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function cu(e,t={}){let n=[];return su(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:lu,stringify:uu}=JSON,du={json:!0,lossy:!0};function fu(e){return tu(lu(e))}function pu(e){return uu(cu(e,du))}function mu(e){return tu(e)}function hu(e){return pu(e)}function gu(e){return fu(e)}var _u=new Map;function vu(e=_u){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?Rs(n,r??``):`s:${hu(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?gu(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function yu(){}function bu(e){let{onConnected:t=yu,onError:n=yu,onDisconnected:r=yu,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${as}=${encodeURIComponent(e.authToken)}`);let s=vu(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){if(e===`session`){f(n),t();return}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=r.search(/\n\n|\r\n\r\n/);if(e<0)break;let t=r.slice(0,e);r=r.slice(e+(r[e]===`\r`?4:2));let n=`message`,i=[];for(let e of t.split(/\r?\n/))e.startsWith(`:`)||(e.startsWith(`event:`)?n=e.slice(6).trimStart():e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``)));i.length>0&&_(n,i.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`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[ts]: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 xu(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Su=Math.random.bind(Math),Cu=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function wu(e=21){let t=``,n=e;for(;n--;)t+=Cu[Su()*64|0];return t}var Tu=6e4,Eu=e=>e,Du=Eu,{clearTimeout:Ou,setTimeout:ku}=globalThis;function Au(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Eu,deserialize:s=Du,resolver:c,bind:l=`rpc`,timeout:u=Tu,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}=xu(),_=wu();s.i=_;let v;async function y(n=s){return u>=0&&(v=ku(()=>{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{Ou(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&&(Ou(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function ju(e,t){let{channel:n,rpcOptions:r={}}=t;return Au(e,{...n,timeout:-1,...r,proxify:!1})}function Mu(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}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=Mu();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 mc(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new mc(`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 mc(`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 mc(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new mc(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=ju(a.functions,{channel:v,rpcOptions:o});a.register({name:X.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new mc(`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 mc(`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 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(X.client.isTrustedUpdated,!0)),t}async function C(){return c?!0:x(b??``)}async function w(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t=()=>{};return await Promise.race([d.promise.then(t),new Promise((n,r)=>{let i=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e);t=()=>clearTimeout(i)})]),c}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:C,requestTrustWithToken:x,requestTrustWithCode:S,ensureTrusted:w,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]));return}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 Pu(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 Fu(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Pu(n.sse,r??`./`,location);return Nu({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>bu({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 Iu(e){let t=e.cause instanceof Error?e.cause:Lu(e.cause)?Iu(e.cause):e.cause,n=t===void 0?Error(e.message):Error(e.message,{cause:t});n.name=e.name;for(let t of Object.keys(e))t!==`name`&&t!==`message`&&t!==`cause`&&(n[t]=e[t]);return n}function Lu(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Ru(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function zu(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Bu(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Vu(e){if(e.error)throw Iu(e.error);return e.output}function Hu(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 Wu(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?mu(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 Bu(r)?Vu(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(Ru(r)){if(Hu(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(zu(r)){let e=gs(n),i=r.records[e];if(i)return Vu(await s(i,r.serialization));if(r.fallback)return Vu(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Hu(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 Gu(e){let t=Wu(await e.fetchJsonFromBases(ns),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,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 Ku=256,qu=class extends Error{name=`StreamClosedError`};function Ju(e={}){let t=e.id??Kl(),n=Math.max(0,e.replayWindow??0),r=Vs(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new qu(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&a.splice(0,a.length-n)),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=Xu(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 Yu(e={}){let t=e.id??Kl(),n=Math.max(1,e.highWaterMark??Ku),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});return}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 Xu(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 Zu=``;function Qu(e,t){return`${e}${Zu}${t}`}function $u(e){let t=new Map,n=new Map;e.client.register({name:X.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Qu(e,n))?._push(r,i)}}),e.client.register({name:X.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Qu(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=Qu(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(Zu);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=Qu(n,r),o=t.get(a);if(o)return o;let s=Yu({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=Qu(t,r),a=n.get(i);if(a)return a;let o=Ju({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 ed(){}var td=new Map;function nd(e){let t=e.url;e.authToken&&(t=`${t}?${as}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=ed,onError:i=ed,onDisconnected:a=ed,definitions:o=td}=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=vu(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}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);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function rd(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 tc(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function id(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=rd(n.websocket,r??`./`,location);return Nu({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>nd({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 ad(e){return e.includes(`:`)}function od(e,t){return ad(t)?t:`${e}:${t}`}function sd(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return{async get(e){return(await a()).value()[e]},async set(e,t){(await a()).mutate(n=>{n[e]=t})},async delete(e){(await a()).mutate(t=>{delete t[e]})},async all(){return(await a()).value()},async onChange(e){return(await a()).on(`updated`,t=>e(t))}}}function cd(e,t){return{global:sd(e,t,`global`),project:sd(e,t,`project`)}}function ld(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(ad(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(od(t,n),...r)),callEvent:((n,...r)=>e.callEvent(od(t,n),...r)),callOptional:((n,...r)=>e.callOptional(od(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(od(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(od(t,n),r,i),upload:(n,r)=>e.streaming.upload(od(t,n),r)}},settings:cd(e,t),scope:e.scope}}function ud(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") — nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function dd(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Vs(),a=Array.isArray(t)?t:[t],o=await pc(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new _s({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new Is(f);async function m(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Zs(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 h={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},g=ud(e.transport??`auto`,s),_=g===`static`?await Gu({fetchJsonFromBases:m}):g===`sse`?Fu({...h,sseOptions:e.sseOptions}):id({...h,wsOptions:e.wsOptions}),v;try{v=new BroadcastChannel(`devframe-auth`)}catch{}let y,b=!1;function x(e){return((...t)=>b||!y?e(...t):y.then(()=>e(...t)))}let S={events:i,get isTrusted(){return _.isTrusted},get status(){return _.status},get connectionError(){return _.connectionError},get transport(){return _.transport??g},get connection(){return o},connectionMeta:s,ensureTrusted:_.ensureTrusted,requestTrust:_.requestTrust,requestTrustWithToken:async e=>(lc(e),o={...o,authToken:e},_.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await _.requestTrustWithCode(e);if(!t)return!1;lc(t),o={...o,authToken:t};try{v?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},call:x(_.call),callEvent:x(_.callEvent),callOptional:x(_.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:()=>_.close?.()};S.sharedState=Xl(S),S.streaming=$u(S),S.services=yc(S);let C=new Map;S.scope=(e=>{if(!e)return S;let t=C.get(e);return t||(t=ld(S,e),C.set(e,t)),t}),f.rpc=S;function w(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ee(){if(!(e.simpleAuth===!1||!w())&&typeof globalThis.prompt==`function`)for(;!S.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 S.requestTrustWithCode(t))return}}async function te(){let t=await _.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await vc(S,{param:n}):!1;t||r||S.isTrusted||await ee()}return y=te().then(()=>{b=!0},()=>{b=!0}),v&&(v.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&S.requestTrustWithToken(e.data.authToken)}),S}var fd=dd,pd=`devframes:plugin:code-server:state`;function md(e){return fd(e)}var hd=Nt({connected:!1,status:`connecting`,error:null,backend:null}),gd=Wt(null);function _d(e){hd.status=e.status,hd.connected=e.status===`connected`,hd.error=e.connectionError?.message??null}async function vd(){try{let e=await md();gd.value=e,hd.backend=e.connectionMeta.backend,_d(e),e.events.on(`connection:status`,()=>_d(e)),e.connectionMeta.backend===`websocket`&&e.ensureTrusted(5e3).catch(()=>{})}catch(e){hd.status=`error`,hd.error=e?.message??String(e)}}function yd(){return gd}var bd=`devframes:plugin:code-server:detect`,xd=`devframes:plugin:code-server:status`,Sd=`devframes:plugin:code-server:start`,Cd=`devframes:plugin:code-server:stop`;function wd(){let e=yd(),t=Nt({checked:!1,installed:!1,bin:`code-server`,backend:`code-server`,mode:`local`}),n=Nt({status:`stopped`}),r=Wt(void 0),i=Ut(!1),a=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 o(e){e&&(Object.assign(t,e.detection),Object.assign(n,e.server),e.connect&&(r.value=e.connect))}async function s(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 c(){if(!i.value){i.value=!0;try{o(await s(Sd,{}))}finally{i.value=!1}}}async function l(){if(!i.value){i.value=!0;try{o(await s(Cd)),r.value=void 0}finally{i.value=!1}}}async function u(){if(!i.value){i.value=!0;try{await s(bd)}finally{i.value=!1}}}async function d(){o(await s(xd));let i=e.value;if(!i)return;let a=await i.sharedState.get(pd,{initialValue:{detection:t,server:n}}),c=a.value();Object.assign(t,c.detection),Object.assign(n,c.server);let l=a.on(`updated`,e=>{Object.assign(t,e.detection),Object.assign(n,e.server),n.status===`running`&&!r.value&&s(xd).then(e=>{e?.connect&&(r.value=e.connect)}),n.status!==`running`&&(r.value=void 0)});Te(()=>l?.())}return{detection:t,server:n,connect:r,busy:i,phase:a,launch:c,stop:l,recheck:u,bootstrap:d}}var Td={class:`relative h-full w-full of-hidden bg-base color-base`},Ed=Hn({__name:`App`,setup(e,{expose:t}){let{detection:n,server:r,connect:i,busy:a,phase:o,launch:s,stop:c,recheck:l,bootstrap:u}=wd(),d=Y(()=>!!i.value);return rr(async()=>{await vd(),await u()}),t({stop:c}),(e,t)=>(W(),G(`div`,Td,[d.value?En((W(),zi(To,{key:0,connect:L(i),port:L(r).port},null,8,[`connect`,`port`])),[[Fa,L(o)===`running`]]):Yi(``,!0),L(o)===`running`?Yi(``,!0):(W(),zi(Qo,{key:1,phase:L(o),detection:L(n),server:L(r),busy:L(a),onLaunch:L(s),onRecheck:L(l)},null,8,[`phase`,`detection`,`server`,`busy`,`onLaunch`,`onRecheck`])),q(wo,{status:L(hd).status,error:L(hd).error},null,8,[`status`,`error`])]))}}),Dd=window.matchMedia(`(prefers-color-scheme: dark)`);function Od(e){document.documentElement.classList.toggle(`dark`,e),document.documentElement.classList.toggle(`light`,!e)}Od(Dd.matches),Dd.addEventListener(`change`,e=>Od(e.matches)),mo(Ed).mount(`#app`);
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()),ie=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),ae=te(e=>e?`on${ie(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,``).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=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,ge=e(he);he+``;function _e(e){return!!e||e===``}function ve(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=ye(e[r],t[r]);return n}function ye(e,t){if(e===t)return!0;let n=m(e),r=m(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=_(e),r=_(t),n||r)return e===t;if(n=d(e),r=d(t),n||r)return n&&r?ve(e,t):!1;if(n=v(e),r=v(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!ye(e[n],t[n]))return!1}}return String(e)===String(t)}var be=e=>!!(e&&e.__v_isRef===!0),A=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?be(e)?A(e.value):JSON.stringify(e,xe,2):String(e),xe=(e,t)=>be(t)?xe(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Se(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Se(e))}:_(t)?Se(t):v(t)&&!d(t)&&!C(t)?String(t):t,Se=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,j,Ce=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 we(){return j}function Te(e,t=!1){j&&j.cleanups.push(e)}var M,Ee=new WeakSet,De=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,Ee.has(this)&&(Ee.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||je(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,We(this),Pe(this);let e=M,t=Be;M=this,Be=!0;try{return this.fn()}finally{Fe(this),M=e,Be=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Re(e);this.deps=this.depsTail=void 0,We(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ee.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ie(this)&&this.run()}get dirty(){return Ie(this)}},Oe=0,ke,Ae;function je(e,t=!1){if(e.flags|=8,t){e.next=Ae,Ae=e;return}e.next=ke,ke=e}function Me(){Oe++}function Ne(){if(--Oe>0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=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 Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=M,r=Be;M=e,Be=!0;try{Pe(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,Be=r,Fe(e),e.flags&=-3}}function Re(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)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0||e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var Ge=0,Ke=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}},qe=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||!Be||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Ke(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,Je(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++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(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)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function N(e,t,n){if(Be&&M){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function $e(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),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===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe))}}Ne()}function et(e){let t=F(e);return t===e?t:(N(t,`iterate`,Qe),P(e)?t:t.map(Vt))}function tt(e){return N(e=F(e),`iterate`,Qe),e}function nt(e,t){return Rt(e)?Ht(Lt(e)?Vt(t):t):Vt(t)}var rt={__proto__:null,[Symbol.iterator](){return it(this,Symbol.iterator,e=>nt(this,e))},concat(...e){return et(this).concat(...e.map(e=>d(e)?et(e):e))},entries(){return it(this,`entries`,e=>(e[1]=nt(this,e[1]),e))},every(e,t){return ot(this,`every`,e,t,void 0,arguments)},filter(e,t){return ot(this,`filter`,e,t,e=>e.map(e=>nt(this,e)),arguments)},find(e,t){return ot(this,`find`,e,t,e=>nt(this,e),arguments)},findIndex(e,t){return ot(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ot(this,`findLast`,e,t,e=>nt(this,e),arguments)},findLastIndex(e,t){return ot(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ot(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ct(this,`includes`,e)},indexOf(...e){return ct(this,`indexOf`,e)},join(e){return et(this).join(e)},lastIndexOf(...e){return ct(this,`lastIndexOf`,e)},map(e,t){return ot(this,`map`,e,t,void 0,arguments)},pop(){return lt(this,`pop`)},push(...e){return lt(this,`push`,e)},reduce(e,...t){return st(this,`reduce`,e,t)},reduceRight(e,...t){return st(this,`reduceRight`,e,t)},shift(){return lt(this,`shift`)},some(e,t){return ot(this,`some`,e,t,void 0,arguments)},splice(...e){return lt(this,`splice`,e)},toReversed(){return et(this).toReversed()},toSorted(e){return et(this).toSorted(e)},toSpliced(...e){return et(this).toSpliced(...e)},unshift(...e){return lt(this,`unshift`,e)},values(){return it(this,`values`,e=>nt(this,e))}};function it(e,t,n){let r=tt(e),i=r[t]();return r!==e&&!P(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var at=Array.prototype;function ot(e,t,n,r,i,a){let o=tt(e),s=o!==e&&!P(e),c=o[t];if(c!==at[t]){let t=c.apply(e,a);return s?Vt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,nt(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 st(e,t,n,r){let i=tt(e),a=i!==e&&!P(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=nt(e,t)),n.call(this,t,nt(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?nt(e,c):c}function ct(e,t,n){let r=F(e);N(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&zt(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function lt(e,t,n=[]){He(),Me();let r=F(e)[t].apply(e,n);return Ne(),Ue(),r}var ut=e(`__proto__,__v_isRef,__isVue`),dt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function ft(e){_(e)||(e=String(e));let t=F(this);return N(t,`has`,e),t.hasOwnProperty(e)}var pt=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?jt:At:i?kt:Ot).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=rt[t]))return e;if(t===`hasOwnProperty`)return ft}let o=Reflect.get(e,t,I(e)?e:n);if((_(t)?dt.has(t):ut(t))||(r||N(e,`get`,t),i))return o;if(I(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Ft(e):e}return v(o)?r?Ft(o):Nt(o):o}},mt=class extends pt{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=Rt(i);if(!P(n)&&!Rt(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?D(n,i)&&$e(e,`set`,t,n,i):$e(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&$e(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!_(t)||!dt.has(t))&&N(e,`has`,t),n}ownKeys(e){return N(e,`iterate`,d(e)?`length`:Xe),Reflect.ownKeys(e)}},ht=class extends pt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},gt=new mt,_t=new ht,vt=new mt(!0),yt=e=>e,bt=e=>Reflect.getPrototypeOf(e);function xt(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?yt:t?Ht:Vt;return!t&&N(a,`iterate`,l?Ze:Xe),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 St(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Ct(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(D(n,a)&&N(i,`get`,n),N(i,`get`,a));let{has:o}=bt(i),s=t?yt:e?Ht:Vt;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(F(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(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=F(a),s=t?yt:e?Ht:Vt;return!e&&N(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:St(`add`),set:St(`set`),delete:St(`delete`),clear:St(`clear`)}:{add(e){let n=F(this),r=bt(n),i=F(e),a=!t&&!P(e)&&!Rt(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),$e(n,`add`,a,a)),this},set(e,n){!t&&!P(n)&&!Rt(n)&&(n=F(n));let r=F(this),{has:i,get:a}=bt(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?D(n,s)&&$e(r,`set`,e,n,s):$e(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=bt(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&&$e(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&$e(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=xt(r,e,t)}),n}function wt(e,t){let n=Ct(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Tt={get:wt(!1,!1)},Et={get:wt(!1,!0)},Dt={get:wt(!0,!1)},Ot=new WeakMap,kt=new WeakMap,At=new WeakMap,jt=new WeakMap;function Mt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Nt(e){return Rt(e)?e:It(e,!1,gt,Tt,Ot)}function Pt(e){return It(e,!1,vt,Et,kt)}function Ft(e){return It(e,!0,_t,Dt,At)}function It(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=Mt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Lt(e){return Rt(e)?Lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function P(e){return!!(e&&e.__v_isShallow)}function zt(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function Bt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&O(e,`__v_skip`,!0),e}var Vt=e=>v(e)?Nt(e):e,Ht=e=>v(e)?Ft(e):e;function I(e){return e?e.__v_isRef===!0:!1}function Ut(e){return Gt(e,!1)}function Wt(e){return Gt(e,!0)}function Gt(e,t){return I(e)?e:new Kt(e,t)}var Kt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:Vt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||P(e)||Rt(e);e=n?e:F(e),D(e,t)&&(this._rawValue=e,this._value=n?e:Vt(e),this.dep.trigger())}};function L(e){return I(e)?e.value:e}var qt={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 Jt(e){return Lt(e)?e:new Proxy(e,qt)}var Yt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-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 je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Xt(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Yt(r,i,n)}var Zt={},Qt=new WeakMap,$t=void 0;function en(e,t=!1,n=$t){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}function tn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:P(e)||o===!1||o===0?nn(e,1):nn(e),m,g,_,v,y=!1,b=!1;if(I(e)?(g=()=>e.value,y=P(e)):Lt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Lt(e)||P(e)),g=()=>e.map(e=>{if(I(e))return e.value;if(Lt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=$t;$t=m;try{return f?f(e,3,[v]):e(v)}finally{$t=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>nn(e(),t)}let x=we(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Zt):Zt,w=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,C[t])):D(t,C))){_&&_();let e=$t;$t=m;try{let e=[t,C===Zt?void 0:b&&C[0]===Zt?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{$t=e}}}else m.run()}};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>en(e,!1,m),_=m.onStop=()=>{let e=Qt.get(m);if(e){if(f)f(e,4);else for(let t of e)t();Qt.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 nn(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))nn(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)nn(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{nn(e,t,n)});else if(C(e)){for(let r in e)nn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function an(e,t,n,r){if(h(e)){let i=rn(e,t,n,r);return i&&y(i)&&i.catch(e=>{on(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(an(e[a],t,n,r));return i}}function on(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){He(),rn(o,null,10,[e,i,a]),Ue();return}}sn(e,r,a,i,s)}function sn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var R=[],cn=-1,ln=[],un=null,dn=0,fn=Promise.resolve(),pn=null;function mn(e){let t=pn||fn;return e?t.then(this?e.bind(this):e):t}function hn(e){let t=cn+1,n=R.length;for(;t<n;){let r=t+n>>>1,i=R[r],a=xn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function gn(e){if(!(e.flags&1)){let t=xn(e),n=R[R.length-1];!n||!(e.flags&2)&&t>=xn(n)?R.push(e):R.splice(hn(t),0,e),e.flags|=1,_n()}}function _n(){pn||=fn.then(Sn)}function vn(e){if(!d(e))un&&e.id===-1?un.splice(dn+1,0,e):e.flags&1||(ln.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)ln.push(e[t]);_n()}function yn(e,t,n=cn+1){for(;n<R.length;n++){let t=R[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;R.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function bn(e){if(ln.length){let e=[...new Set(ln)].sort((e,t)=>xn(e)-xn(t));if(ln.length=0,un){for(let t=0;t<e.length;t++)un.push(e[t]);return}for(un=e,dn=0;dn<un.length;dn++){let e=un[dn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}un=null,dn=0}}var xn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Sn(e){try{for(cn=0;cn<R.length;cn++){let e=R[cn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),rn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;cn<R.length;cn++){let e=R[cn];e&&(e.flags&=-2)}cn=-1,R.length=0,bn(e),pn=null,(R.length||ln.length)&&Sn(e)}}var z=null,Cn=null;function wn(e){let t=z;return z=e,Cn=e&&e.type.__scopeId||null,t}function Tn(e,t=z,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Li(-1);let i=wn(t),a=Pi.length,o;try{o=e(...n)}finally{for(let e=Pi.length;e>a;e--)Fi();wn(i),r._d&&Li(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function En(e,n){if(z===null)return e;let r=ya(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&&nn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Dn(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&&(He(),an(c,n,8,[e.el,s,e,t]),Ue())}}function On(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 kn(e,t,n=!1){let r=ia();if(r||Hr){let i=Hr?Hr._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 An=Symbol.for(`v-scx`),jn=()=>kn(An);function Mn(e,t,n){return Nn(e,t,n)}function Nn(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(ua){if(c===`sync`){let e=jn();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)=>an(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{V(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():gn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=tn(e,n,u);return ua&&(f?f.push(h):d&&h()),h}function Pn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Fn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=sa(this),s=Nn(i,a.bind(r),n);return o(),s}function Fn(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 In=Symbol(`_vte`),Ln=e=>e.__isTeleport,Rn=Symbol(`_leaveCb`);function zn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Mi){t=n;break}}return t}function Bn(e){if(!Yn(e))return Ln(e.type)&&e.children?zn(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 Vn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Vn(Ln(n.type)&&Bn(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Hn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Un(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Wn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Gn=new WeakMap;function Kn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Kn(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Jn(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Kn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ya(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=>!Wn(_,e)&&u(y,e),x=(e,t)=>!(t&&Wn(_,t));if(m!=null&&m!==p){if(qn(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))rn(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(),Gn.delete(e)};t.id=-1,Gn.set(e,t),V(t,r)}else qn(e),i()}}}function qn(e){let t=Gn.get(e);t&&(t.flags|=8,Gn.delete(e))}le().requestIdleCallback,le().cancelIdleCallback;var Jn=e=>!!e.type.__asyncLoader,Yn=e=>e.type.__isKeepAlive;function Xn(e,t){Qn(e,`a`,t)}function Zn(e,t){Qn(e,`da`,t)}function Qn(e,t,n=J){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(er(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Yn(e.parent.vnode)&&$n(r,t,n,e),e=e.parent}}function $n(e,t,n,r){let i=er(t,e,r,!0);sr(()=>{c(r[t],i)},n)}function er(e,t,n=J,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=sa(n),a=an(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var tr=e=>(t,n=J)=>{(!ua||e===`sp`)&&er(e,(...e)=>t(...e),n)},nr=tr(`bm`),rr=tr(`m`),ir=tr(`bu`),ar=tr(`u`),or=tr(`bum`),sr=tr(`um`),cr=tr(`sp`),lr=tr(`rtg`),ur=tr(`rtc`);function dr(e,t=J){er(`ec`,e,t)}var fr=`components`,pr=Symbol.for(`v-ndc`);function mr(e){return g(e)?hr(fr,e,!1)||e:e||pr}function hr(e,t,n=!0,r=!1){let i=z||J;if(i){let n=i.type;if(e===fr){let e=ba(n,!1);if(e&&(e===t||e===T(t)||e===ie(T(t))))return n}let a=gr(i[e]||n[e],t)||gr(i.appContext[e],t);return!a&&r?n:a}}function gr(e,t){return e&&(e[t]||e[T(t)]||e[ie(T(t))])}function _r(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Lt(e),r=!1,s=!1;n&&(r=!P(e),s=Rt(e),e=tt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Ht(Vt(e[n])):Vt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(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 vr(e,t,n,r,i,a){if(n??={},z.ce||z.parent&&Jn(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(),zi(H,null,[q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Pi.length;W();let l;try{let i=o&&yr(o(n)),s=n.key||a||i&&i.key;l=zi(H,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Pi.length;e>c;e--)Fi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function yr(e){return e.some(e=>!Bi(e)||!(e.type===Mi||e.type===H&&!yr(e.children)))?e:null}var br=e=>e?la(e)?ya(e):br(e.parent):null,xr=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=>br(e.parent),$root:e=>br(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ar(e),$forceUpdate:e=>e.f||=()=>{gn(e.update)},$nextTick:e=>e.n||=mn.bind(e.proxy),$watch:e=>Pn.bind(e)}),Sr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Cr={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(Sr(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 Tr&&(s[n]=0)}let d=xr[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 Sr(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)||Sr(n,c)||u(o,c)||u(i,c)||u(xr,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 wr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Tr=!0;function Er(e){let t=Ar(e),n=e.proxy,i=e.ctx;Tr=!1,t.beforeCreate&&Or(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:ie,components:ae,directives:D,filters:oe}=t;if(u&&Dr(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=Nt(t))}if(Tr=!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)kr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{On(t,e[t])})}f&&Or(f,e,`c`);function O(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O(nr,p),O(rr,m),O(ir,g),O(ar,_),O(Xn,y),O(Zn,b),O(dr,T),O(ur,te),O(lr,ne),O(or,S),O(sr,w),O(cr,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),ie!=null&&(e.inheritAttrs=ie),ae&&(e.components=ae),D&&(e.directives=D),re&&Un(e)}function Dr(e,t,n=r){d(e)&&(e=Fr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?kn(r.from||n,r.default,!0):kn(r.from||n):kn(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Or(e,t,n){an(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function kr(e,t,n,r){let i=r.includes(`.`)?Fn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Mn(i,n)}else if(h(e))Mn(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>kr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Mn(i,r,e)}}}function Ar(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=>jr(c,e,o,!0)),jr(c,t,o)),v(t)&&a.set(t,c),c}function jr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&jr(e,a,n,!0),i&&i.forEach(t=>jr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Mr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Mr={data:Nr,props:Lr,emits:Lr,methods:Ir,computed:Ir,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:Ir,directives:Ir,watch:Rr,provide:Nr,inject:Pr};function Nr(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 Pr(e,t){return Ir(Fr(e),Fr(t))}function Fr(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 Ir(e,t){return e?s(Object.create(null),e,t):t}function Lr(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),wr(e),wr(t??{})):t}function Rr(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 zr(){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 Br=0;function Vr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=zr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Br++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Sa,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,ya(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(an(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=Hr;Hr=l;try{return e()}finally{Hr=t}}};return l}}var Hr=null,Ur=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Wr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ur(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(se)));let c,l=i[c=ae(n)]||i[c=ae(T(n))];!l&&o&&(l=i[c=ae(E(n))]),l&&an(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,an(u,e,6,a)}}var Gr=new WeakMap;function Kr(e,t,n=!1){let r=n?Gr: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=Kr(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 qr(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 Jr(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,_=wn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Xi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Xi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Yr(c)}}catch(t){Pi.length=0,on(t,e,1),v=q(Mi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Xr(y,a)),b=Ki(b,y,!1,!0))}return n.dirs&&(b=Ki(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Vn(Ln(b.type)&&Bn(b)||b,n.transition),v=b,wn(_),v}var Yr=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Xr=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Zr(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?Qr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if($r(o,r,n)&&!qr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Qr(r,o,l):!!o;return!1}function Qr(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($r(t,e,a)&&!qr(n,a))return!0}return!1}function $r(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!ye(r,i):r!==i}function ei({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 ti={},ni=()=>Object.create(ti),ri=e=>Object.getPrototypeOf(e)===ti;function ii(e,t,n,r=!1){let i={},a=ni();e.propsDefaults=Object.create(null),oi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Pt(i):e.type.props?i:a,e.attrs=a}function ai(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(qr(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]=si(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{oi(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]=si(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&&$e(e.attrs,`set`,``)}function oi(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:qr(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]=si(a,n,s,i[s],e,!u(i,s))}}return s}function si(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=sa(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 ci=new WeakMap;function li(e,r,i=!1){let a=i?ci: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]=li(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]);ui(n)&&(l[n]=t)}else if(c)for(let e in c){let t=T(e);if(ui(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 ui(e){return e[0]!==`$`&&!ee(e)}var di=e=>e===`_`||e===`_ctx`||e===`$stable`,fi=e=>d(e)?e.map(Xi):[Xi(e)],pi=(e,t,n)=>{if(t._n)return t;let r=Tn((...e)=>fi(t(...e)),n);return r._c=!1,r},mi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(di(n))continue;let i=e[n];if(h(i))t[n]=pi(n,i,r);else if(i!=null){let e=fi(i);t[n]=()=>e}}},hi=(e,t)=>{let n=fi(t);e.slots.default=()=>n},gi=(e,t,n)=>{for(let r in t)(n||!di(r))&&(e[r]=t[r])},_i=(e,t,n)=>{let r=e.slots=ni();if(e.vnode.shapeFlag&32){let e=t._;e?(gi(r,t,n),n&&O(r,`_`,e,!0)):mi(t,r)}else t&&hi(e,t)},vi=(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:gi(a,n,r):(o=!n.$stable,mi(n,a)),s=n}else n&&(hi(e,n),s={default:1});if(o)for(let e in a)!di(e)&&s[e]==null&&delete a[e]},V=Ai;function yi(e){return bi(e)}function bi(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,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Vi(e,t)&&(r=ye(e),k(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ji:y(e,t,n,r);break;case Mi:b(e,t,n,r);break;case Ni:e??x(t,n,r,o);break;case H:ae(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?D(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?Kn(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Kn(e.ref,null,a,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,xi(e,a),s,u),_&&Dn(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)&&ea(f,r,e)}_&&Dn(e,null,r,`beforeMount`);let v=Ci(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&V(()=>{try{f&&ea(f,r,e),v&&g.enter(d),_&&Dn(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||ki(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?Zi(e[l]):Xi(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&&Si(r,!1),(g=h.onVnodeBeforeUpdate)&&ea(g,r,n,e),f&&Dn(n,e,r,`beforeUpdate`),r&&Si(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,xi(n,a),o):s||de(e,n,l,null,r,i,xi(n,a),o,!1),u>0){if(u&16)ie(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&&ie(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&V(()=>{g&&ea(g,r,n,e),f&&Dn(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&&(c.type===H||!Vi(c,l)||c.shapeFlag&198)?m(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},ie=(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)}},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),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)&&wi(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=ra(e,r,i);if(Yn(e)&&(s.ctx.renderer=xe),da(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ce,o),!e.el){let r=s.subTree=q(Mi);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(Zr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){ue(r,t,n);return}r.next=t,r.update()}else t.el=e.el,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=Ei(e);if(n){t&&(t.el=c.el,ue(e,t,o)),n.asyncDep.then(()=>{V(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Si(e,!1),t?(t.el=c.el,ue(e,t,o)):t=c,n&&oe(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ea(d,s,t,c),Si(e,!0);let f=Jr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&ei(e,f.el),r&&V(r,i),(d=t.props&&t.props.onVnodeUpdated)&&V(()=>ea(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=Jn(t);if(Si(e,!1),l&&oe(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ea(o,d,t),Si(e,!0),s&&j){let t=()=>{e.subTree=Jr(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=Jr(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(()=>ea(o,d,e),i)}(t.shapeFlag&256||d&&Jn(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 De(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=()=>gn(u),Si(e,!0),l()},ue=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ai(e,t.props,r,n),vi(e,t.children,n),He(),yn(e),Ue()},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&&T(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;for(p=0;p<f;p++){let n=t[p]=l?Zi(t[p]):Xi(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?ve(e,a,o,!0,!1,f):T(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?Zi(t[u]):Xi(t[u]);if(Vi(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?Zi(t[p]):Xi(t[p]);if(Vi(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?Zi(t[u]):Xi(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?Zi(t[u]):Xi(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){k(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Vi(n,t[_])){i=_;break}i===void 0?k(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?Ti(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||Oi(f):i;C[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==w[_]?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);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===H){o(a,t,n);for(let e=0;e<u.length;e++)me(u[e],t,n,r);o(e.anchor,t,n);return}if(c===Ni){S(e,t,n);return}if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Rn]?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[Rn];a._isLeaving&&a[Rn](!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&&(i=!1),s!=null&&(He(),Kn(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Jn(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ea(_,t,e),u&6)_e(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Dn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?ve(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&ve(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&V(()=>{_&&ea(_,t,e),h&&Dn(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===H){ge(n,r);return}if(t===Ni){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},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;Di(c),Di(l),r&&oe(r),i.stop(),a&&(a.flags|=8,k(o,e,t,n)),s&&V(s,t),V(()=>{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[In];return n?h(n):t},be=!1,A=(e,t,n)=>{let r;e==null?t._vnode&&(k(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,yn(r),bn(),!1)},xe={p:v,um:k,m:me,r:he,mt:O,mc:T,pc:de,pbc:E,n:ye,o:e},Se,j;return i&&([Se,j]=i(xe)),{render:A,hydrate:Se,createApp:Vr(A,Se)}}function xi({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 Si({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ci(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wi(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]=Zi(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&wi(t,a)),a.type===ji&&(a.patchFlag===-1&&(a=i[e]=Zi(a)),a.el=t.el),a.type===Mi&&!a.el&&(a.el=t.el)}}function Ti(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 Ei(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ei(t)}function Di(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Oi(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Oi(t.subTree):null}var ki=e=>e.__isSuspense;function Ai(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):vn(e)}var H=Symbol.for(`v-fgt`),ji=Symbol.for(`v-txt`),Mi=Symbol.for(`v-cmt`),Ni=Symbol.for(`v-stc`),Pi=[],U=null;function W(e=!1){Pi.push(U=e?null:[])}function Fi(){Pi.pop(),U=Pi[Pi.length-1]||null}var Ii=1;function Li(e,t=!1){Ii+=e,e<0&&U&&t&&(U.hasOnce=!0)}function Ri(e){return e.dynamicChildren=Ii>0?U||n:null,Fi(),Ii>0&&U&&U.push(e),e}function G(e,t,n,r,i,a){return Ri(K(e,t,n,r,i,a,!0))}function zi(e,t,n,r,i){return Ri(q(e,t,n,r,i,!0))}function Bi(e){return e?e.__v_isVNode===!0:!1}function Vi(e,t){return e.type===t.type&&e.key===t.key}var Hi=({key:e})=>e??null,Ui=({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&&Hi(t),ref:t&&Ui(t),scopeId:Cn,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?(Qi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Ii>0&&!o&&U&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&U.push(c),c}var q=Wi;function Wi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===pr)&&(e=Mi),Bi(e)){let r=Ki(e,t,!0);return n&&Qi(r,n),Ii>0&&!a&&U&&(r.shapeFlag&6?U[U.indexOf(e)]=r:U.push(r)),r.patchFlag=-2,r}if(xa(e)&&(e=e.__vccOpts),t){t=Gi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=k(e)),v(n)&&(zt(n)&&!d(n)&&(n=s({},n)),t.style=ue(n))}let o=g(e)?1:ki(e)?128:Ln(e)?64:v(e)?4:h(e)?2:0;return K(e,t,n,r,i,o,a,!0)}function Gi(e){return e?zt(e)||ri(e)?s({},e):e:null}function Ki(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?$i(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Hi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Ui(t)):[a,Ui(t)]:Ui(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&&Ki(e.ssContent),ssFallback:e.ssFallback&&Ki(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Vn(u,c.clone(u)),u}function qi(e=` `,t=0){return q(ji,null,e,t)}function Ji(e,t){let n=q(Ni,null,e);return n.staticCount=t,n}function Yi(e=``,t=!1){return t?(W(),zi(Mi,null,e)):q(Mi,null,e)}function Xi(e){return e==null||typeof e==`boolean`?q(Mi):d(e)?q(H,null,e.slice()):Bi(e)?Zi(e):q(ji,null,String(e))}function Zi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ki(e)}function Qi(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),Qi(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!ri(t)?t._ctx=z:r===3&&z&&(z.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){Qi(e,{default:t});return}t={default:t,_ctx:z},n=32}else t=String(t),r&64?(n=16,t=[qi(t)]):n=8;e.children=t,e.shapeFlag|=n}function $i(...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 ea(e,t,n,r=null){an(e,t,7,[n,r])}var ta=zr(),na=0;function ra(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ta,o={uid:na++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ce(!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:li(i,a),emitsOptions:Kr(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=Wr.bind(null,o),e.ce&&e.ce(o),o}var J=null,ia=()=>J||z,aa,oa;{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)}};aa=t(`__VUE_INSTANCE_SETTERS__`,e=>J=e),oa=t(`__VUE_SSR_SETTERS__`,e=>ua=e)}var sa=e=>{let t=J;return aa(e),e.scope.on(),()=>{e.scope.off(),aa(t)}},ca=()=>{J&&J.scope.off(),aa(null)};function la(e){return e.vnode.shapeFlag&4}var ua=!1;function da(e,t=!1,n=!1){t&&oa(t);let{props:r,children:i}=e.vnode,a=la(e);ii(e,r,a,t),_i(e,i,n||t);let o=a?fa(e,t):void 0;return t&&oa(!1),o}function fa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cr);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?va(e):null,i=sa(e),a=rn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Jn(e)&&Un(e),o){if(a.then(ca,ca),t)return a.then(n=>{oa(!0);try{pa(e,n,t)}finally{oa(!1)}}).catch(t=>{on(t,e,0)});e.asyncDep=a}else pa(e,a,t)}else ga(e,t)}function pa(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Jt(t)),ga(e,n)}var ma,ha;function ga(e,t,n){let i=e.type;if(!e.render){if(!t&&ma&&!i.render){let t=i.template||Ar(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=ma(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,ha&&ha(e)}{let t=sa(e);He();try{Er(e)}finally{Ue(),t()}}}var _a={get(e,t){return N(e,`get`,``),e[t]}};function va(e){return{attrs:new Proxy(e.attrs,_a),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ya(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Bt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xr)return xr[n](e)},has(e,t){return t in e||t in xr}}):e.proxy}function ba(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function xa(e){return h(e)&&`__vccOpts`in e}var Y=(e,t)=>Xt(e,t,ua),Sa=`3.5.41`,Ca=void 0,wa=typeof window<`u`&&window.trustedTypes;if(wa)try{Ca=wa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ta=Ca?e=>Ca.createHTML(e):e=>e,Ea=`http://www.w3.org/2000/svg`,Da=`http://www.w3.org/1998/Math/MathML`,Oa=typeof document<`u`?document:null,ka=Oa&&Oa.createElement(`template`),Aa={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`?Oa.createElementNS(Ea,e):t===`mathml`?Oa.createElementNS(Da,e):n?Oa.createElement(e,{is:n}):Oa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Oa.createTextNode(e),createComment:e=>Oa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oa.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{ka.innerHTML=Ta(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ka.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]}},ja=Symbol(`_vtc`);function Ma(e,t,n){let r=e[ja];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Na=Symbol(`_vod`),Pa=Symbol(`_vsh`),Fa={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Na]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Ia(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),Ia(e,!0),r.enter(e)):r.leave(e,()=>{Ia(e,!1)}):Ia(e,t))},beforeUnmount(e,{value:t}){Ia(e,t)}};function Ia(e,t){e.style.display=t?e[Na]:`none`,e[Pa]=!t}var La=Symbol(``),Ra=/(?:^|;)\s*display\s*:/;function za(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]??Va(r,t,``)}else for(let e in t)n[e]??Va(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Va(r,i,``):Ga(e,i,!g(t)&&t?t[i]:void 0,o)||Va(r,i,o)}}else if(i){if(t!==n){let e=r[La];e&&(n+=`;`+e),r.cssText=n,a=Ra.test(n)}}else t&&e.removeAttribute(`style`);Na in e&&(e[Na]=a?r.display:``,e[Pa]&&(r.display=`none`))}var Ba=/\s*!important$/;function Va(e,t,n){if(d(n))n.forEach(n=>Va(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Wa(e,t);Ba.test(n)?e.setProperty(E(r),n.replace(Ba,``),`important`):e[r]=n}}var Ha=[`Webkit`,`Moz`,`ms`],Ua={};function Wa(e,t){let n=Ua[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Ua[t]=r;r=ie(r);for(let n=0;n<Ha.length;n++){let i=Ha[n]+r;if(i in e)return Ua[t]=i}return t}function Ga(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Ka=`http://www.w3.org/1999/xlink`;function qa(e,t,n,r,i,a=ge(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ka,t.slice(6,t.length)):e.setAttributeNS(Ka,t,n):n==null||a&&!_e(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function Ja(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Ta(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=_e(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 Ya(e,t,n,r){e.addEventListener(t,n,r)}function Xa(e,t,n,r){e.removeEventListener(t,n,r)}var Za=Symbol(`_vei`);function Qa(e,t,n,r,i=null){let a=e[Za]||(e[Za]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=to(t);r?Ya(e,n,a[t]=ao(r,i),s):o&&(Xa(e,n,o,s),a[t]=void 0)}}var $a=/(Once|Passive|Capture)$/,eo=/^on:?(?:Once|Passive|Capture)$/;function to(e){let t,n;for(;(n=e.match($a))&&!eo.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 no=0,ro=Promise.resolve(),io=()=>no||=(ro.then(()=>no=0),Date.now());function ao(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&&an(e,t,5,a)}}else an(r,t,5,[e])};return n.value=e,n.attached=io(),n}var oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,so=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Ma(e,r,c):t===`style`?za(e,n,r):a(t)?o(t)||Qa(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):co(e,t,r,c))?(Ja(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&qa(e,t,r,c,s,t!==`value`)):e._isVueCE&&(lo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Ja(e,T(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),qa(e,t,r,c))};function co(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&oo(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 oo(t)&&g(n)?!1:t in e}function lo(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 uo=s({patchProp:so},Aa),fo;function po(){return fo||=yi(uo)}var mo=((...e)=>{let t=po().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=go(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,ho(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function ho(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function go(e){return g(e)?document.querySelector(e):e}var _o=Hn({__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)=>(W(),G(`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))}}),vo=Hn({__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 px-2.5! py-1!`:`btn-primary`:t.variant===`text`?`inline-flex items-center gap-1.5 op75 hover:op100 transition${a.value?` text-sm`:``}`:a.value?`btn-action-sm`:`btn-action`),s=Y(()=>t.disabled||t.loading);return(t,a)=>(W(),zi(mr(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:Tn(()=>[e.loading?(W(),zi(_o,{key:0,size:`1em`})):e.icon?(W(),G(`span`,{key:1,class:k(e.icon),"aria-hidden":`true`},null,2)):Yi(``,!0),vr(t.$slots,`default`)]),_:3},8,[`class`,`href`,`to`,`disabled`,`aria-disabled`,`aria-busy`]))}}),yo={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`},bo={class:`flex flex-col gap-1`},xo={class:`text-lg font-medium`},So={class:`text-sm color-muted max-w-sm`},Co={key:0,class:`mt-1 max-w-sm break-words font-mono text-xs color-faint`},wo=Hn({__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?(W(),G(`div`,yo,[K(`div`,{class:k([r.value.icon,`text-4xl color-active`])},null,2),K(`div`,bo,[K(`p`,xo,A(r.value.title),1),K(`p`,So,A(r.value.body),1),e.error&&e.status===`error`?(W(),G(`code`,Co,A(e.error),1)):Yi(``,!0)]),e.status===`connecting`?Yi(``,!0):(W(),zi(vo,{key:0,variant:`primary`,size:`sm`,onClick:n[0]||=()=>t.location.reload()},{default:Tn(()=>[...n[1]||=[qi(` Reload `,-1)]]),_:1}))])):Yi(``,!0)}}),To=Hn({__name:`EditorFrame`,props:{connect:{},port:{}},setup(e){let t=e,n=Ut(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 rr(a),Mn(()=>[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))}}),Eo={class:`absolute inset-0 flex items-center justify-center p-6 bg-base color-base font-sans`},Do={class:`w-full max-w-[560px]`},Oo={class:`flex items-center gap-1.5 mb-2.5 text-xs tracking-wider uppercase color-muted`},ko={key:0,class:`flex items-center gap-2.5`},Ao={class:`flex items-center gap-2.5`},jo={class:`text-sm color-muted`},Mo={key:0,class:`mt-4 px-3.5 py-3 rounded-md border border-base bg-secondary text-sm`},No={class:`flex flex-wrap items-center gap-x-2 gap-y-1`},Po=[`href`],Fo={class:`font-mono color-base px-1.5 py-0.5 rounded bg-base border border-base tracking-wider`},Io={class:`flex flex-col gap-3 mb-5`},Lo={class:`block mb-1 text-xs color-muted`},Ro={class:`flex items-center gap-2 px-2.5 py-2 rounded-md border border-base bg-secondary`},zo={class:`flex-1 of-x-auto whitespace-nowrap font-mono text-xs color-base`},Bo={class:`flex flex-wrap items-center gap-2.5`},Vo={class:`mb-5 text-sm leading-relaxed color-muted`},Ho={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`},Uo={class:`flex flex-wrap gap-x-4 gap-y-1.5 mb-5 text-xs color-muted`},Wo={class:`font-mono color-base`},Go={key:0},Ko={class:`font-mono color-base`},qo={key:1},Jo={class:`font-mono color-base`},Yo={class:`font-mono color-base`},Xo=`https://coder.com/docs/code-server/latest/install`,Zo=`https://github.com/coder/code-server`,Qo=Hn({__name:`LauncherView`,props:{phase:{},detection:{},server:{},busy:{type:Boolean}},emits:[`launch`,`recheck`],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=Ut(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)=>(W(),G(`div`,Eo,[K(`div`,Do,[K(`p`,Oo,[n[2]||=K(`span`,{class:`i-ph-code-duotone text-sm`},null,-1),K(`span`,null,A(s.value),1)]),e.phase===`connecting`?(W(),G(`div`,ko,[q(_o,{size:`1rem`,class:`color-muted`}),n[3]||=K(`span`,{class:`text-sm color-muted`},`Connecting to devframe…`,-1)])):e.phase===`starting`?(W(),G(H,{key:1},[K(`div`,Ao,[q(_o,{size:`1rem`,class:`color-muted`}),K(`span`,jo,A(e.detection.mode===`tunnel`?`Opening the tunnel…`:`Starting the editor…`),1)]),e.server.login?(W(),G(`div`,Mo,[n[7]||=K(`p`,{class:`mb-2 color-muted`},` Authorize the tunnel to continue: `,-1),K(`p`,No,[n[5]||=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`},[qi(A(e.server.login.url)+` `,1),n[4]||=K(`span`,{class:`i-ph-arrow-square-out size-3.5`},null,-1)],8,Po),n[6]||=K(`span`,{class:`color-muted`},`and enter code`,-1),K(`code`,Fo,A(e.server.login.code),1)])])):Yi(``,!0)],64)):e.phase===`not-installed`?(W(),G(H,{key:2},[n[10]||=Ji(`<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`,Io,[(W(),G(H,null,_r(i,({label:e,command:t})=>K(`div`,{key:e},[K(`label`,Lo,A(e),1),K(`div`,Ro,[K(`code`,zo,A(t),1),q(vo,{variant:`action`,size:`sm`,class:`shrink-0 text-[11px]`,onClick:e=>o(t)},{default:Tn(()=>[qi(A(a.value===t?`Copied`:`Copy`),1)]),_:2},1032,[`onClick`])])])),64))]),K(`div`,Bo,[q(vo,{variant:`primary`,icon:e.busy?void 0:`i-ph-arrows-clockwise`,loading:e.busy,disabled:e.busy,onClick:n[0]||=e=>r(`recheck`)},{default:Tn(()=>[qi(A(e.busy?`Checking…`:`Re-check`),1)]),_:1},8,[`icon`,`loading`,`disabled`]),q(vo,{variant:`text`,size:`sm`,href:Xo,icon:`i-ph-arrow-square-out`},{default:Tn(()=>[...n[8]||=[qi(` Installation docs `,-1)]]),_:1}),q(vo,{variant:`text`,size:`sm`,href:Zo,icon:`i-ph-github-logo`},{default:Tn(()=>[...n[9]||=[qi(` GitHub `,-1)]]),_:1})])],64)):(W(),G(H,{key:3},[n[15]||=K(`h1`,{class:`mb-2 text-[1.35rem] font-semibold`},` Launch the editor `,-1),K(`p`,Vo,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?(W(),G(`div`,Ho,A(c.value),1)):Yi(``,!0),K(`div`,Uo,[K(`span`,null,[n[11]||=qi(`mode `,-1),K(`code`,Wo,A(e.detection.mode),1)]),e.detection.mode===`local`?(W(),G(`span`,Go,[n[12]||=qi(`backend `,-1),K(`code`,Ko,A(e.detection.backend),1)])):Yi(``,!0),e.detection.version?(W(),G(`span`,qo,[n[13]||=qi(`version `,-1),K(`code`,Jo,A(e.detection.version),1)])):Yi(``,!0),K(`span`,null,[n[14]||=qi(`binary `,-1),K(`code`,Yo,A(e.detection.bin),1)])]),q(vo,{variant:`primary`,icon:e.busy?void 0:`i-ph-rocket-launch-duotone`,loading:e.busy,disabled:e.busy,onClick:n[1]||=e=>r(`launch`)},{default:Tn(()=>[qi(A(e.busy?`Starting…`:e.detection.mode===`tunnel`?`Open tunnel`:`Launch editor`),1)]),_:1},8,[`icon`,`loading`,`disabled`])],64))])]))}}),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`,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`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`}},$o=`__connection.json`,es=`__DEVFRAME_CONNECTION__`,ts=`x-birpc-session`,ns=`__rpc-dump/index.json`,rs=`devframe:services`,is=`devframe_otp`,as=`devframe_auth_token`;X.postMessage.remoteAssetsError;function os(e){return typeof e==`string`?`'${e}'`:new us().serialize(e)}var ss=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,cs=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[ss.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function ls(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&&cs[n]?cs[n]:n+128,s=a<128&&cs[a]?cs[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 us=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?ls(e,t):n===`number`&&r===`number`?e-t:ls(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(ls),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})(),ds=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],fs=[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],ps=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,ms=[],hs=class{_data=new gs;_hash=new gs([...ds]);_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)ms[n]=e[t+n]|0;else{let e=ms[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=ms[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;ms[n]=t+ms[n-7]+i+ms[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+fs[n]+ms[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=gs.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 gs(t,i)}},gs=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(ps.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 _s(e){return new hs().finalize(e).toBase64()}function vs(e){return _s(os(e))}function ys(e){return vs(e)}var bs=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>ys(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 xs(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 Ss={blue:xs(34,39),cyan:xs(36,39),gray:xs(90,39),green:xs(32,39),red:xs(31,39),yellow:xs(33,39),bold:xs(1,22),dim:xs(2,22),reset:xs(0,0),underline:xs(4,24)};function Cs(e,...t){return typeof e==`function`?e(...t):e}var ws=Error.captureStackTrace,Ts=class e extends Error{name;code;docs;fix;sources;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,ws?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function Es(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function Ds(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||Es(r,i),s=(e={},n={})=>{let r=new Ts({code:i,why:Cs(a.why,e),fix:Cs(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function Os(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 ks=Os(Ss);function As(e,{method:t=`warn`}={}){console[t](ks(e))}function js(e){return Ds({...e,reporters:[As,...e.reporters??[]]})}var Ms=js({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,fix:"Set `jsonSerializable: true` if the payload is JSON-safe, 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."}}});async function Ns(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Ps(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 Fs(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 Ns(i,n[r]);if(a.issues)throw Ms.DF0043({name:e,index:r,issues:Ps(a.issues)})}return r}async function Is(e,t,n){if(!t)return n;let r=await Ns(t,n);if(r.issues)throw Ms.DF0044({name:e,issues:Ps(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 Rs(e,t){let n=e.handler;if(!n){let r=await Ls(e,t);if(!r.handler)throw Ms.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 Fs(e.name,r,t),o=await a(...n);return await Is(e.name,i,o)}}var zs=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 Rs(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 Ms.DF0021({name:e.name});Bs(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 Ms.DF0022({name:e.name});Bs(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 Rs(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Ms.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 Bs(e){if(e.agent&&e.jsonSerializable!==!0)throw Ms.DF0019({name:e.name})}function Vs(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 Hs(t,`undefined`,r,e);return n}if(i===null)return n;if(typeof i==`bigint`)throw Hs(t,`BigInt`,r,e);if(typeof i==`object`){if(i instanceof Map)throw Hs(t,`Map`,r,e);if(i instanceof Set)throw Hs(t,`Set`,r,e);if(i instanceof Date)throw Hs(t,`Date`,r,e);if(Array.isArray(i))return n;let a=Object.getPrototypeOf(i);if(a!==null&&a!==Object.prototype)throw Hs(t,i.constructor?.name??`class instance`,r,e)}return n})}function Hs(e,t,n,r){let i=Us(n,r);return Ms.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Us(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function Ws(){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}}String.fromCharCode;var Gs=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Ks=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,qs=/^([/\\]\s*){2,}[^/\\]/,Js=/\/$|\/\?|\/#/,Ys=/^\.?\//;function Xs(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?Gs.test(e):Ks.test(e)||(t.acceptRelative?qs.test(e):!1)}function Zs(e=``,t){return t?Js.test(e):e.endsWith(`/`)}function Qs(e=``,t){if(!t)return(Zs(e)?e.slice(0,-1):e)||`/`;if(!Zs(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function $s(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(Zs(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function ec(e,t){if(tc(t)||Xs(e))return e;let n=Qs(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return rc(n,e)}function tc(e){return!e||e===`/`}function nc(e){return e&&e!==`/`}function rc(e,...t){let n=e||``;for(let e of t.filter(e=>nc(e)))if(n){let t=e.replace(Ys,``);n=$s(n)+t}else n=e;return n}function ic(e,t){let n=e.match(Ks);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}var ac=`__DEVFRAME_CONNECTION_META__`,oc=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function sc(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 cc(){return sc(es)}function lc(){return sc(ac)}function uc(e){if(e)return e;try{let e=localStorage.getItem(oc);if(e)return e}catch{}return sc(oc)}function dc(e){globalThis[es]=e,globalThis[ac]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&fc(e.authToken)}function fc(e){try{localStorage.setItem(oc,e)}catch{}globalThis[oc]=e;let t=cc();t&&(globalThis[es]={...t,authToken:e})}function pc(e){let t=ec($o,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function mc(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function hc(){let e=cc();if(e)return mc(e,uc()??e.authToken??e.connectionMeta.authToken);let t=lc();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??pc(`./`),authToken:uc(t.authToken)}}async function gc(e={}){if(e.connection){let t=mc(e.connection,uc(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return dc(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:pc(t[0]??`./`),authToken:uc(e.authToken??e.connectionMeta.authToken)};return dc(n),n}let n=hc();if(n){let t=mc(n,uc(e.authToken??n.authToken??n.connectionMeta.authToken));return dc(t),t}let r=[];for(let n of t){let t=ec($o,n),i=pc(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={connectionMeta:r,metaBaseUrl:n.url||i,authToken:uc(e.authToken??r.authToken)};return dc(a),a}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var _c=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function vc(e=is){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function yc(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 bc(e=is){let t=vc(e);return t&&yc(e),t}async function xc(e,t={}){let n=bc(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Sc(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(rs,{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 Cc=Symbol.for(`immer-nothing`),wc=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,Tc=$.getPrototypeOf,Ec=`constructor`,Dc=`prototype`,Oc=`configurable`,kc=`enumerable`,Ac=`writable`,jc=`value`,Mc=e=>!!e&&!!e[Z];function Nc(e){return e?Ic(e)||Uc(e)||!!e[wc]||!!e[Ec]?.[wc]||Wc(e)||Gc(e):!1}var Pc=$[Dc][Ec].toString(),Fc=new WeakMap;function Ic(e){if(!e||!Kc(e))return!1;let t=Tc(e);if(t===null||t===$[Dc])return!0;let n=$.hasOwnProperty.call(t,Ec)&&t[Ec];if(n===Object)return!0;if(!qc(n))return!1;let r=Fc.get(n);return r===void 0&&(r=Function.toString.call(n),Fc.set(n,r)),r===Pc}function Lc(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_:Uc(e)?1:Wc(e)?2:Gc(e)?3:0}var zc=(e,t,n=Rc(e))=>n===2?e.has(t):$[Dc].hasOwnProperty.call(e,t),Bc=(e,t,n=Rc(e))=>n===2?e.get(t):e[t],Vc=(e,t,n,r=Rc(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Hc(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Uc=Array.isArray,Wc=e=>e instanceof Map,Gc=e=>e instanceof Set,Kc=e=>typeof e==`object`,qc=e=>typeof e==`function`,Jc=e=>typeof e==`boolean`;function Yc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Xc=e=>Kc(e)?e?.[Z]:null,Zc=e=>e.copy_||e.base_,Qc=e=>e.modified_?e.copy_:e.base_;function $c(e,t){if(Wc(e))return new Map(e);if(Gc(e))return new Set(e);if(Uc(e))return Array[Dc].slice.call(e);let n=Ic(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[Ac]===!1&&(a[Ac]=!0,a[Oc]=!0),(a.get||a.set)&&(t[i]={[Oc]:!0,[Ac]:!0,[kc]:a[kc],[jc]:e[i]})}return $.create(Tc(e),t)}{let t=Tc(e);if(t!==null&&n)return{...e};let r=$.create(t);return $.assign(r,e)}}function el(e,t=!1){return rl(e)||Mc(e)||!Nc(e)?e:(Rc(e)>1&&$.defineProperties(e,{set:nl,add:nl,clear:nl,delete:nl}),$.freeze(e),t&&Lc(e,(e,t)=>{el(t,!0)},!1),e)}function tl(){Q(2)}var nl={[jc]:tl};function rl(e){return e===null||!Kc(e)||$.isFrozen(e)}var il=`MapSet`,al=`Patches`,ol=`ArrayMethods`,sl={};function cl(e){let t=sl[e];return t||Q(0,e),t}var ll=e=>!!sl[e];function ul(e,t){sl[e]||(sl[e]=t)}var dl,fl=()=>dl,pl=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ll(il)?cl(il):void 0,arrayMethodsPlugin_:ll(ol)?cl(ol):void 0});function ml(e,t){t&&(e.patchPlugin_=cl(al),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hl(e){gl(e),e.drafts_.forEach(vl),e.drafts_=null}function gl(e){e===dl&&(dl=e.parent_)}var _l=e=>dl=pl(dl,e);function vl(e){let t=e[Z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yl(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Z].modified_&&(hl(t),Q(4)),Nc(e)&&(e=bl(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Z].base_,e,t)}else e=bl(t,n);return xl(t,e,!0),hl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Cc?void 0:e}function bl(e,t){if(rl(t))return t;let n=t[Z];if(!n)return kl(t,e.handledSet_,e);if(!Cl(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);Dl(n,e)}return n.copy_}function xl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&el(t,n)}function Sl(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Cl=(e,t)=>e.scope_===t,wl=[];function Tl(e,t,n,r){let i=Zc(e),a=e.type_;if(r!==void 0&&Bc(i,r,a)===t){Vc(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Lc(i,(e,n)=>{if(Mc(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??wl;for(let e of o)Vc(i,e,n,a)}function El(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Cl(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Qc(i);Tl(e,i.draft_??i,a,n),Dl(i,r)})}function Dl(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)}Sl(e)}}function Ol(e,t,n){let{scope_:r}=e;if(Mc(n)){let i=n[Z];Cl(i,r)&&i.callbacks_.push(function(){Rl(e),Tl(e,n,Qc(i),t)})}else Nc(n)&&e.callbacks_.push(function(){let i=Zc(e);e.type_===3?i.has(n)&&kl(n,r.handledSet_,r):Bc(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&kl(Bc(e.copy_,t,e.type_),r.handledSet_,r)})}function kl(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Mc(e)||t.has(e)||!Nc(e)||rl(e)?e:(t.add(e),Lc(e,(r,i)=>{if(Mc(i)){let t=i[Z];Cl(t,n)&&(Vc(e,r,Qc(t),e.type_),Sl(t))}else Nc(i)&&kl(i,t,n)}),e)}function Al(e,t){let n=Uc(e),r={type_:+!!n,scope_:t?t.scope_:fl(),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=jl;n&&(i=[r],a=Ml);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var jl={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=Zc(e);if(!zc(i,t,e.type_))return Fl(e,i,t);let a=i[t];if(e.finalized_||!Nc(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Yc(t))return a;if(a===Nl(e.base_,t)||Pl(e,t,a)){Rl(e);let n=e.type_===1?+t:t,r=Bl(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Zc(e)},ownKeys(e){return Reflect.ownKeys(Zc(e))},set(e,t,n){let r=Il(Zc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Nl(Zc(e),t),i=r?.[Z];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Hc(n,r)&&(n!==void 0||zc(e.base_,t,e.type_)))return!0;Rl(e),Ll(e)}return e.copy_[t]===n&&(n!==void 0||zc(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Ol(e,t,n),!0)},deleteProperty(e,t){return Rl(e),Nl(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ll(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Zc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ac]:!0,[Oc]:e.type_!==1||t!==`length`,[kc]:r[kc],[jc]:n[t]}},defineProperty(){Q(11)},getPrototypeOf(e){return Tc(e.base_)},setPrototypeOf(){Q(12)}},Ml={};for(let e in jl){let t=jl[e];Ml[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Ml.deleteProperty=function(e,t){return Ml.set.call(this,e,t,void 0)},Ml.set=function(e,t,n){return jl.set.call(this,e[0],t,n,e[0])};function Nl(e,t){let n=e[Z];return(n?Zc(n):e)[t]}function Pl(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Nc(n)||n[Z]?!1:e.baseRefs_.has(n)}function Fl(e,t,n){let r=Il(t,n);return r?jc in r?r[jc]:r.get?.call(e.draft_):void 0}function Il(e,t){if(!(t in e))return;let n=Tc(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Tc(n)}}function Ll(e){e.modified_||(e.modified_=!0,e.parent_&&Ll(e.parent_))}function Rl(e){e.copy_||=(e.assigned_=new Map,$c(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(qc(e)&&!qc(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}qc(t)||Q(6),n!==void 0&&!qc(n)&&Q(7);let r;if(Nc(e)){let i=_l(this),a=Bl(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?hl(i):gl(i)}return ml(i,n),yl(r,i)}if(!e||!Kc(e)){if(r=t(e),r===void 0&&(r=e),r===Cc&&(r=void 0),this.autoFreeze_&&el(r,!0),n){let t=[],i=[];cl(al).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Q(1,e)},this.produceWithPatches=(e,t)=>{if(qc(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]},Jc(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Jc(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Jc(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Nc(e)||Q(8),Mc(e)&&(e=Vl(e));let t=_l(this),n=Bl(t,e,void 0);return n[Z].isManual_=!0,gl(t),n}finishDraft(e,t){let n=e&&e[Z];(!n||!n.isManual_)&&Q(9);let{scope_:r}=n;return ml(r,t),yl(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=cl(al).applyPatches_;return Mc(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Bl(e,t,n,r){let[i,a]=Wc(t)?cl(il).proxyMap_(t,n):Gc(t)?cl(il).proxySet_(t,n):Al(t,n);return(n?.scope_??fl()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?El(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 Vl(e){return Mc(e)||Q(10,e),Hl(e)}function Hl(e){if(!Nc(e)||rl(e))return e;let t=e[Z],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=$c(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=$c(e,!0);return Lc(n,(e,t)=>{Vc(n,e,Hl(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=Xc(Bc(e,n.key_)),i=Bc(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&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||zc(e,o)))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=Bc(n,r),!Kc(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;Lc(e.assigned_,(e,l)=>{let u=Bc(o,e,c),f=Bc(s,e,c),p=l?zc(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===Cc?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===Ec)&&Q(19),qc(o)&&n===Dc&&Q(19),o=Bc(o,n),(o===null||!Kc(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(!Nc(e))return e;if(Uc(e))return e.map(u);if(Wc(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Gc(e))return new Set(Array.from(e).map(u));let t=Object.create(Tc(e));for(let n in e)t[n]=u(e[n]);return zc(e,wc)&&(t[wc]=e[wc]),t}function d(e){return Mc(e)?u(e):e}ul(al,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}var Wl=new zl,Gl=Wl.produce,Kl=Wl.produceWithPatches.bind(Wl),ql=Wl.applyPatches.bind(Wl),Jl=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Yl(e=21){let t=``,n=e;for(;n--;)t+=Jl[Math.random()*64|0];return t}var Xl=1e3;function Zl(e,t){if(e.add(t),e.size>Xl){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Ql(e){let{enablePatches:t=!1}=e;t&&Ul();let n=Ws(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Yl())=>{i.has(t)||(Ul(),r=ql(r,e),Zl(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Yl())=>{if(!i.has(a)){if(Zl(i,a),t){let[t,i]=Kl(r,e);r=t,n.emit(`updated`,r,i,a)}else r=Gl(r,e),n.emit(`updated`,r,void 0,a)}},syncIds:i}}function $l(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){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)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=Ql({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);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),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=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(X.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var eu=typeof self==`object`?self:globalThis,tu=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),nu=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function ru(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=tu.has(e)?eu[e]:void 0;return n(new(r??eu.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`&&nu.has(a))return n(new eu[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function iu(e){return ru(new Map,e)(0)}var au=``,{toString:ou}={},{keys:su}=Object;function cu(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ou.call(e).slice(8,-1);switch(n){case`Array`:return[1,au];case`Object`:return[2,au];case`Date`:return[3,au];case`RegExp`:return[4,au];case`Map`:return[5,au];case`Set`:return[6,au];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function lu([e,t]){return e===0&&(t===`function`||t===`symbol`)}function uu(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]=cu(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 su(r))(e||!lu(cu(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||!(lu(cu(n))||lu(cu(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!lu(cu(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function du(e,t={}){let n=[];return uu(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:fu,stringify:pu}=JSON,mu={json:!0,lossy:!0};function hu(e){return iu(fu(e))}function gu(e){return pu(du(e,mu))}function _u(e){return iu(e)}function vu(e){return gu(e)}function yu(e){return hu(e)}var bu=new Map;function xu(e=bu){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?Vs(n,r??``):`s:${vu(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?yu(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Su(){}function Cu(e){let{onConnected:t=Su,onError:n=Su,onDisconnected:r=Su,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${as}=${encodeURIComponent(e.authToken)}`);let s=xu(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){if(e===`session`){f(n),t();return}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=r.search(/\n\n|\r\n\r\n/);if(e<0)break;let t=r.slice(0,e);r=r.slice(e+(r[e]===`\r`?4:2));let n=`message`,i=[];for(let e of t.split(/\r?\n/))e.startsWith(`:`)||(e.startsWith(`event:`)?n=e.slice(6).trimStart():e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``)));i.length>0&&_(n,i.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`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[ts]: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 wu(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Tu=Math.random.bind(Math),Eu=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Du(e=21){let t=``,n=e;for(;n--;)t+=Eu[Tu()*64|0];return t}var Ou=6e4,ku=e=>e,Au=ku,{clearTimeout:ju,setTimeout:Mu}=globalThis;function Nu(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=ku,deserialize:s=Au,resolver:c,bind:l=`rpc`,timeout:u=Ou,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}=wu(),_=Du();s.i=_;let v;async function y(n=s){return u>=0&&(v=Mu(()=>{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{ju(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&&(ju(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Pu(e,t){let{channel:n,rpcOptions:r={}}=t;return Nu(e,{...n,timeout:-1,...r,proxify:!1})}function Fu(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Iu(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=Fu();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 _c(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new _c(`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 _c(`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 _c(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new _c(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Pu(a.functions,{channel:v,rpcOptions:o});a.register({name:X.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new _c(`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 _c(`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 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(X.client.isTrustedUpdated,!0)),t}async function C(){return c?!0:x(b??``)}async function w(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t=()=>{};return await Promise.race([d.promise.then(t),new Promise((n,r)=>{let i=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e);t=()=>clearTimeout(i)})]),c}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:C,requestTrustWithToken:x,requestTrustWithCode:S,ensureTrusted:w,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]));return}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 Lu(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 Ru(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Lu(n.sse,r??`./`,location);return Iu({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Cu({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 zu(e){let t=e.cause instanceof Error?e.cause:Bu(e.cause)?zu(e.cause):e.cause,n=t===void 0?Error(e.message):Error(e.message,{cause:t});n.name=e.name;for(let t of Object.keys(e))t!==`name`&&t!==`message`&&t!==`cause`&&(n[t]=e[t]);return n}function Bu(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Vu(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Hu(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Uu(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Wu(e){if(e.error)throw zu(e.error);return e.output}function Gu(e){return e.some(e=>e!=null)}function Ku(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function qu(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?_u(e):e}function a(e,t){return i(Ku(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 Uu(r)?Wu(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(Vu(r)){if(Gu(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Hu(r)){let e=ys(n),i=r.records[e];if(i)return Wu(await s(i,r.serialization));if(r.fallback)return Wu(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Gu(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 Ju(e){let t=qu(await e.fetchJsonFromBases(ns),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,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 Yu=256,Xu=class extends Error{name=`StreamClosedError`};function Zu(e={}){let t=e.id??Yl(),n=Math.max(0,e.replayWindow??0),r=Ws(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Xu(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&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 Qu(e={}){let t=e.id??Yl(),n=Math.max(1,e.highWaterMark??Yu),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});return}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 ed=``;function td(e,t){return`${e}${ed}${t}`}function nd(e){let t=new Map,n=new Map;e.client.register({name:X.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(td(e,n))?._push(r,i)}}),e.client.register({name:X.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=td(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=td(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(ed);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=td(n,r),o=t.get(a);if(o)return o;let s=Qu({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=td(t,r),a=n.get(i);if(a)return a;let o=Zu({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 rd(){}var id=new Map;function ad(e){let t=e.url;e.authToken&&(t=`${t}?${as}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=rd,onError:i=rd,onDisconnected:a=rd,definitions:o=id}=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=xu(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}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);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function od(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 ic(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function sd(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=od(n.websocket,r??`./`,location);return Iu({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>ad({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 cd(e){return e.includes(`:`)}function ld(e,t){return cd(t)?t:`${e}:${t}`}function ud(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return{async get(e){return(await a()).value()[e]},async set(e,t){(await a()).mutate(n=>{n[e]=t})},async delete(e){(await a()).mutate(t=>{delete t[e]})},async all(){return(await a()).value()},async onChange(e){return(await a()).on(`updated`,t=>e(t))}}}function dd(e,t){return{global:ud(e,t,`global`),project:ud(e,t,`project`)}}function fd(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(cd(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(ld(t,n),...r)),callEvent:((n,...r)=>e.callEvent(ld(t,n),...r)),callOptional:((n,...r)=>e.callOptional(ld(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(ld(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(ld(t,n),r,i),upload:(n,r)=>e.streaming.upload(ld(t,n),r)}},settings:dd(e,t),scope:e.scope}}function pd(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") — nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function md(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Ws(),a=Array.isArray(t)?t:[t],o=await gc(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new bs({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new zs(f);async function m(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(ec(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 h={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},g=pd(e.transport??`auto`,s),_=g===`static`?await Ju({fetchJsonFromBases:m}):g===`sse`?Ru({...h,sseOptions:e.sseOptions}):sd({...h,wsOptions:e.wsOptions}),v;try{v=new BroadcastChannel(`devframe-auth`)}catch{}let y,b=!1;function x(e){return((...t)=>b||!y?e(...t):y.then(()=>e(...t)))}let S={events:i,get isTrusted(){return _.isTrusted},get status(){return _.status},get connectionError(){return _.connectionError},get transport(){return _.transport??g},get connection(){return o},connectionMeta:s,ensureTrusted:_.ensureTrusted,requestTrust:_.requestTrust,requestTrustWithToken:async e=>(fc(e),o={...o,authToken:e},_.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await _.requestTrustWithCode(e);if(!t)return!1;fc(t),o={...o,authToken:t};try{v?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},call:x(_.call),callEvent:x(_.callEvent),callOptional:x(_.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:()=>_.close?.()};S.sharedState=$l(S),S.streaming=nd(S),S.services=Sc(S);let C=new Map;S.scope=(e=>{if(!e)return S;let t=C.get(e);return t||(t=fd(S,e),C.set(e,t)),t}),f.rpc=S;function w(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ee(){if(!(e.simpleAuth===!1||!w())&&typeof globalThis.prompt==`function`)for(;!S.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 S.requestTrustWithCode(t))return}}async function te(){let t=await _.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await xc(S,{param:n}):!1;t||r||S.isTrusted||await ee()}return y=te().then(()=>{b=!0},()=>{b=!0}),v&&(v.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&S.requestTrustWithToken(e.data.authToken)}),S}var hd=md,gd=`devframes:plugin:code-server:state`;function _d(e){return hd(e)}var vd=Nt({connected:!1,status:`connecting`,error:null,backend:null}),yd=Wt(null);function bd(e){vd.status=e.status,vd.connected=e.status===`connected`,vd.error=e.connectionError?.message??null}async function xd(){try{let e=await _d();yd.value=e,vd.backend=e.connectionMeta.backend,bd(e),e.events.on(`connection:status`,()=>bd(e)),e.connectionMeta.backend===`websocket`&&e.ensureTrusted(5e3).catch(()=>{})}catch(e){vd.status=`error`,vd.error=e?.message??String(e)}}function Sd(){return yd}var Cd=`devframes:plugin:code-server:detect`,wd=`devframes:plugin:code-server:status`,Td=`devframes:plugin:code-server:start`,Ed=`devframes:plugin:code-server:stop`;function Dd(){let e=Sd(),t=Nt({checked:!1,installed:!1,bin:`code-server`,backend:`code-server`,mode:`local`}),n=Nt({status:`stopped`}),r=Wt(void 0),i=Ut(!1),a=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 o(e){e&&(Object.assign(t,e.detection),Object.assign(n,e.server),e.connect&&(r.value=e.connect))}async function s(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 c(){if(!i.value){i.value=!0;try{o(await s(Td,{}))}finally{i.value=!1}}}async function l(){if(!i.value){i.value=!0;try{o(await s(Ed)),r.value=void 0}finally{i.value=!1}}}async function u(){if(!i.value){i.value=!0;try{await s(Cd)}finally{i.value=!1}}}async function d(){o(await s(wd));let i=e.value;if(!i)return;let a=await i.sharedState.get(gd,{initialValue:{detection:t,server:n}}),c=a.value();Object.assign(t,c.detection),Object.assign(n,c.server);let l=a.on(`updated`,e=>{Object.assign(t,e.detection),Object.assign(n,e.server),n.status===`running`&&!r.value&&s(wd).then(e=>{e?.connect&&(r.value=e.connect)}),n.status!==`running`&&(r.value=void 0)});Te(()=>l?.())}return{detection:t,server:n,connect:r,busy:i,phase:a,launch:c,stop:l,recheck:u,bootstrap:d}}var Od={class:`relative h-full w-full of-hidden bg-base color-base`},kd=Hn({__name:`App`,setup(e,{expose:t}){let{detection:n,server:r,connect:i,busy:a,phase:o,launch:s,stop:c,recheck:l,bootstrap:u}=Dd(),d=Y(()=>!!i.value);return rr(async()=>{await xd(),await u()}),t({stop:c}),(e,t)=>(W(),G(`div`,Od,[d.value?En((W(),zi(To,{key:0,connect:L(i),port:L(r).port},null,8,[`connect`,`port`])),[[Fa,L(o)===`running`]]):Yi(``,!0),L(o)===`running`?Yi(``,!0):(W(),zi(Qo,{key:1,phase:L(o),detection:L(n),server:L(r),busy:L(a),onLaunch:L(s),onRecheck:L(l)},null,8,[`phase`,`detection`,`server`,`busy`,`onLaunch`,`onRecheck`])),q(wo,{status:L(vd).status,error:L(vd).error},null,8,[`status`,`error`])]))}}),Ad=window.matchMedia(`(prefers-color-scheme: dark)`);function jd(e){document.documentElement.classList.toggle(`dark`,e),document.documentElement.classList.toggle(`light`,!e)}jd(Ad.matches),Ad.addEventListener(`change`,e=>jd(e.matches)),mo(kd).mount(`#app`);
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-BKmjD-U7.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-KTakR0Fo.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-DqpHsHO1.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": "0.9.1",
4
+ "version": "0.9.2",
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",