mulmoterminal 0.1.1 → 0.1.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,4 +1,4 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function f(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var p={},m=[],h=()=>{},g=()=>!1,_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),v=e=>e.startsWith(`onUpdate:`),y=Object.assign,b=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,S=(e,t)=>x.call(e,t),C=Array.isArray,ee=e=>k(e)===`[object Map]`,te=e=>k(e)===`[object Set]`,ne=e=>k(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,re=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),O=Object.prototype.toString,k=e=>O.call(e),A=e=>k(e).slice(8,-1),j=e=>k(e)===`[object Object]`,ie=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ae=f(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),oe=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},se=/-\w/g,ce=oe(e=>e.replace(se,e=>e.slice(1).toUpperCase())),le=/\B([A-Z])/g,ue=oe(e=>e.replace(le,`-$1`).toLowerCase()),de=oe(e=>e.charAt(0).toUpperCase()+e.slice(1)),fe=oe(e=>e?`on${de(e)}`:``),pe=(e,t)=>!Object.is(e,t),me=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},M=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},he=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ge,_e=()=>ge||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ve(e){if(C(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=T(r)?Se(r):ve(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(T(e)||D(e))return e}var ye=/;(?![^(]*\))/g,be=/:([^]+)/,xe=/\/\*[^]*?\*\//g;function Se(e){let t={};return e.replace(xe,``).split(ye).forEach(e=>{if(e){let n=e.split(be);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ce(e){let t=``;if(T(e))t=e;else if(C(e))for(let n=0;n<e.length;n++){let r=Ce(e[n]);r&&(t+=r+` `)}else if(D(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var we=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Te=f(we);we+``;function Ee(e){return!!e||e===``}function De(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Oe(e[r],t[r]);return n}function Oe(e,t){if(e===t)return!0;let n=ne(e),r=ne(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=E(e),r=E(t),n||r)return e===t;if(n=C(e),r=C(t),n||r)return n&&r?De(e,t):!1;if(n=D(e),r=D(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||!Oe(e[n],t[n]))return!1}}return String(e)===String(t)}function ke(e,t){return e.findIndex(e=>Oe(e,t))}var Ae=e=>!!(e&&e.__v_isRef===!0),N=e=>T(e)?e:e==null?``:C(e)||D(e)&&(e.toString===O||!w(e.toString))?Ae(e)?N(e.value):JSON.stringify(e,je,2):String(e),je=(e,t)=>Ae(t)?je(e,t.value):ee(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Me(t,r)+` =>`]=n,e),{})}:te(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Me(e))}:E(t)?Me(t):D(t)&&!C(t)&&!j(t)?String(t):t,Me=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,Ne,Pe=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&&Ne&&(Ne.active?(this.parent=Ne,this.index=(Ne.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)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=Ne;try{return Ne=this,e()}finally{Ne=t}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){if(this._on>0&&--this._on===0){if(Ne===this)Ne=this.prevScope;else{let e=Ne;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){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Fe(){return Ne}var P,Ie=new WeakSet,Le=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,Ne&&(Ne.active?Ne.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ie.has(this)&&(Ie.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ve(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,et(this),We(this);let e=P,t=Xe;P=this,Xe=!0;try{return this.fn()}finally{Ge(this),P=e,Xe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Je(e);this.deps=this.depsTail=void 0,et(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ie.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ke(this)&&this.run()}get dirty(){return Ke(this)}},Re=0,ze,Be;function Ve(e,t=!1){if(e.flags|=8,t){e.next=Be,Be=e;return}e.next=ze,ze=e}function He(){Re++}function Ue(){if(--Re>0)return;if(Be){let e=Be;for(Be=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ze;){let t=ze;for(ze=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 We(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ge(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Je(r),Ye(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ke(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===tt)||(e.globalVersion=tt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ke(e))))return;e.flags|=2;let t=e.dep,n=P,r=Xe;P=e,Xe=!0;try{We(e);let n=e.fn(e._value);(t.version===0||pe(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{P=n,Xe=r,Ge(e),e.flags&=-3}}function Je(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)Je(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ye(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Xe=!0,Ze=[];function Qe(){Ze.push(Xe),Xe=!1}function $e(){let e=Ze.pop();Xe=e===void 0?!0:e}function et(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=P;P=void 0;try{t()}finally{P=e}}}var tt=0,nt=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}},rt=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(!P||!Xe||P===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==P)t=this.activeLink=new nt(P,this),P.deps?(t.prevDep=P.depsTail,P.depsTail.nextDep=t,P.depsTail=t):P.deps=P.depsTail=t,it(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=P.depsTail,t.nextDep=void 0,P.depsTail.nextDep=t,P.depsTail=t,P.deps===t&&(P.deps=e)}return t}trigger(e){this.version++,tt++,this.notify(e)}notify(e){He();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ue()}}};function it(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)it(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var at=new WeakMap,ot=Symbol(``),st=Symbol(``),ct=Symbol(``);function lt(e,t,n){if(Xe&&P){let t=at.get(e);t||at.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new rt),r.map=t,r.key=n),r.track()}}function ut(e,t,n,r,i,a){let o=at.get(e);if(!o){tt++;return}let s=e=>{e&&e.trigger()};if(He(),t===`clear`)o.forEach(s);else{let i=C(e),a=i&&ie(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ct||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ct)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ot)),ee(e)&&s(o.get(st)));break;case`delete`:i||(s(o.get(ot)),ee(e)&&s(o.get(st)));break;case`set`:ee(e)&&s(o.get(ot));break}}Ue()}function dt(e){let t=F(e);return t===e?t:(lt(t,`iterate`,ct),Xt(e)?t:t.map($t))}function ft(e){return lt(e=F(e),`iterate`,ct),e}function pt(e,t){return Yt(e)?en(Jt(e)?$t(t):t):$t(t)}var mt={__proto__:null,[Symbol.iterator](){return ht(this,Symbol.iterator,e=>pt(this,e))},concat(...e){return dt(this).concat(...e.map(e=>C(e)?dt(e):e))},entries(){return ht(this,`entries`,e=>(e[1]=pt(this,e[1]),e))},every(e,t){return _t(this,`every`,e,t,void 0,arguments)},filter(e,t){return _t(this,`filter`,e,t,e=>e.map(e=>pt(this,e)),arguments)},find(e,t){return _t(this,`find`,e,t,e=>pt(this,e),arguments)},findIndex(e,t){return _t(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return _t(this,`findLast`,e,t,e=>pt(this,e),arguments)},findLastIndex(e,t){return _t(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return _t(this,`forEach`,e,t,void 0,arguments)},includes(...e){return yt(this,`includes`,e)},indexOf(...e){return yt(this,`indexOf`,e)},join(e){return dt(this).join(e)},lastIndexOf(...e){return yt(this,`lastIndexOf`,e)},map(e,t){return _t(this,`map`,e,t,void 0,arguments)},pop(){return bt(this,`pop`)},push(...e){return bt(this,`push`,e)},reduce(e,...t){return vt(this,`reduce`,e,t)},reduceRight(e,...t){return vt(this,`reduceRight`,e,t)},shift(){return bt(this,`shift`)},some(e,t){return _t(this,`some`,e,t,void 0,arguments)},splice(...e){return bt(this,`splice`,e)},toReversed(){return dt(this).toReversed()},toSorted(e){return dt(this).toSorted(e)},toSpliced(...e){return dt(this).toSpliced(...e)},unshift(...e){return bt(this,`unshift`,e)},values(){return ht(this,`values`,e=>pt(this,e))}};function ht(e,t,n){let r=ft(e),i=r[t]();return r!==e&&!Xt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var gt=Array.prototype;function _t(e,t,n,r,i,a){let o=ft(e),s=o!==e&&!Xt(e),c=o[t];if(c!==gt[t]){let t=c.apply(e,a);return s?$t(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,pt(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 vt(e,t,n,r){let i=ft(e),a=i!==e&&!Xt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=pt(e,t)),n.call(this,t,pt(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?pt(e,c):c}function yt(e,t,n){let r=F(e);lt(r,`iterate`,ct);let i=r[t](...n);return(i===-1||i===!1)&&Zt(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function bt(e,t,n=[]){Qe(),He();let r=F(e)[t].apply(e,n);return Ue(),$e(),r}var xt=f(`__proto__,__v_isRef,__isVue`),St=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function Ct(e){E(e)||(e=String(e));let t=F(this);return lt(t,`has`,e),t.hasOwnProperty(e)}var wt=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?Ht:Vt:i?Bt:zt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=C(e);if(!r){let e;if(a&&(e=mt[t]))return e;if(t===`hasOwnProperty`)return Ct}let o=Reflect.get(e,t,tn(e)?e:n);if((E(t)?St.has(t):xt(t))||(r||lt(e,`get`,t),i))return o;if(tn(o)){let e=a&&ie(t)?o:o.value;return r&&D(e)?Kt(e):e}return D(o)?r?Kt(o):Wt(o):o}},Tt=class extends wt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=C(e)&&ie(t);if(!this._isShallow){let e=Yt(i);if(!Xt(n)&&!Yt(n)&&(i=F(i),n=F(n)),!a&&tn(i)&&!tn(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:S(e,t),s=Reflect.set(e,t,n,tn(e)?e:r);return e===F(r)&&(o?pe(n,i)&&ut(e,`set`,t,n,i):ut(e,`add`,t,n)),s}deleteProperty(e,t){let n=S(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ut(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!E(t)||!St.has(t))&&lt(e,`has`,t),n}ownKeys(e){return lt(e,`iterate`,C(e)?`length`:ot),Reflect.ownKeys(e)}},Et=class extends wt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Dt=new Tt,Ot=new Et,kt=new Tt(!0),At=e=>e,jt=e=>Reflect.getPrototypeOf(e);function Mt(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=ee(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?At:t?en:$t;return!t&&lt(a,`iterate`,c?st:ot),y(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Nt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Pt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(pe(n,a)&&lt(i,`get`,n),lt(i,`get`,a));let{has:o}=jt(i),s=t?At:e?en:$t;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&&lt(F(t),`iterate`,ot),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(pe(t,i)&&lt(r,`has`,t),lt(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?At:e?en:$t;return!e&&lt(o,`iterate`,ot),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return y(n,e?{add:Nt(`add`),set:Nt(`set`),delete:Nt(`delete`),clear:Nt(`clear`)}:{add(e){let n=F(this),r=jt(n),i=F(e),a=!t&&!Xt(e)&&!Yt(e)?i:e;return r.has.call(n,a)||pe(e,a)&&r.has.call(n,e)||pe(i,a)&&r.has.call(n,i)||(n.add(a),ut(n,`add`,a,a)),this},set(e,n){!t&&!Xt(n)&&!Yt(n)&&(n=F(n));let r=F(this),{has:i,get:a}=jt(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?pe(n,s)&&ut(r,`set`,e,n,s):ut(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=jt(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&&ut(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&ut(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Mt(r,e,t)}),n}function Ft(e,t){let n=Pt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(S(n,r)&&r in t?n:t,r,i)}var It={get:Ft(!1,!1)},Lt={get:Ft(!1,!0)},Rt={get:Ft(!0,!1)},zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap;function Ut(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Wt(e){return Yt(e)?e:qt(e,!1,Dt,It,zt)}function Gt(e){return qt(e,!1,kt,Lt,Bt)}function Kt(e){return qt(e,!0,Ot,Rt,Vt)}function qt(e,t,n,r,i){if(!D(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=Ut(A(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Jt(e){return Yt(e)?Jt(e.__v_raw):!!(e&&e.__v_isReactive)}function Yt(e){return!!(e&&e.__v_isReadonly)}function Xt(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 Qt(e){return!S(e,`__v_skip`)&&Object.isExtensible(e)&&M(e,`__v_skip`,!0),e}var $t=e=>D(e)?Wt(e):e,en=e=>D(e)?Kt(e):e;function tn(e){return e?e.__v_isRef===!0:!1}function I(e){return nn(e,!1)}function nn(e,t){return tn(e)?e:new rn(e,t)}var rn=class{constructor(e,t){this.dep=new rt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:$t(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Xt(e)||Yt(e);e=n?e:F(e),pe(e,t)&&(this._rawValue=e,this._value=n?e:$t(e),this.dep.trigger())}};function L(e){return tn(e)?e.value:e}var an={get:(e,t,n)=>t===`__v_raw`?e:L(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tn(i)&&!tn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function on(e){return Jt(e)?e:new Proxy(e,an)}var sn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new rt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=tt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&P!==this)return Ve(this,!0),!0}get value(){let e=this.dep.track();return qe(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function cn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new sn(r,i,n)}var ln={},un=new WeakMap,dn=void 0;function fn(e,t=!1,n=dn){if(n){let t=un.get(n);t||un.set(n,t=[]),t.push(e)}}function pn(e,t,n=p){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:Xt(e)||i===!1||i===0?mn(e,1):mn(e),u,d,f,m,g=!1,_=!1;if(tn(e)?(d=()=>e.value,g=Xt(e)):Jt(e)?(d=()=>l(e),g=!0):C(e)?(_=!0,g=e.some(e=>Jt(e)||Xt(e)),d=()=>e.map(e=>{if(tn(e))return e.value;if(Jt(e))return l(e);if(w(e))return c?c(e,2):e()})):d=w(e)?t?c?()=>c(e,2):e:()=>{if(f){Qe();try{f()}finally{$e()}}let t=dn;dn=u;try{return c?c(e,3,[m]):e(m)}finally{dn=t}}:h,t&&i){let e=d,t=i===!0?1/0:i;d=()=>mn(e(),t)}let v=Fe(),y=()=>{u.stop(),v&&v.active&&b(v.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return y(),n}}let x=_?Array(e.length).fill(ln):ln,S=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let n=u.run();if(e||i||g||(_?n.some((e,t)=>pe(e,x[t])):pe(n,x))){f&&f();let e=dn;dn=u;try{let e=[n,x===ln?void 0:_&&x[0]===ln?[]:x,m];x=n,c?c(t,3,e):t(...e)}finally{dn=e}}}else u.run()};return s&&s(S),u=new Le(d),u.scheduler=o?()=>o(S,!1):S,m=e=>fn(e,!1,u),f=u.onStop=()=>{let e=un.get(u);if(e){if(c)c(e,4);else for(let t of e)t();un.delete(u)}},t?r?S(!0):x=u.run():o?o(S.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function mn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,tn(e))mn(e.value,t,n);else if(C(e))for(let r=0;r<e.length;r++)mn(e[r],t,n);else if(te(e)||ee(e))e.forEach(e=>{mn(e,t,n)});else if(j(e)){for(let r in e)mn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&mn(e[r],t,n)}return e}function hn(e,t,n,r){try{return r?e(...r):e()}catch(e){_n(e,t,n)}}function gn(e,t,n,r){if(w(e)){let i=hn(e,t,n,r);return i&&re(i)&&i.catch(e=>{_n(e,t,n)}),i}if(C(e)){let i=[];for(let a=0;a<e.length;a++)i.push(gn(e[a],t,n,r));return i}}function _n(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||p;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){Qe(),hn(a,null,10,[e,i,o]),$e();return}}vn(e,n,i,r,o)}function vn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var yn=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=yn.length;for(;t<n;){let r=t+n>>>1,i=yn[r],a=Nn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Nn(e),n=yn[yn.length-1];!n||!(e.flags&2)&&t>=Nn(n)?yn.push(e):yn.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(Pn)}function An(e){C(e)?xn.push(...e):Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),kn()}function jn(e,t,n=bn+1){for(;n<yn.length;n++){let t=yn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;yn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Mn(e){if(xn.length){let e=[...new Set(xn)].sort((e,t)=>Nn(e)-Nn(t));if(xn.length=0,Sn){Sn.push(...e);return}for(Sn=e,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pn(e){try{for(bn=0;bn<yn.length;bn++){let e=yn[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),hn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<yn.length;bn++){let e=yn[bn];e&&(e.flags&=-2)}bn=-1,yn.length=0,Mn(e),Tn=null,(yn.length||xn.length)&&Pn(e)}}var Fn=null,In=null;function Ln(e){let t=Fn;return Fn=e,In=e&&e.type.__scopeId||null,t}function Rn(e,t=Fn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&la(-1);let i=Ln(t),a;try{a=e(...n)}finally{Ln(i),r._d&&la(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function zn(e,t){if(Fn===null)return e;let n=Ga(Fn),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=p]=t[e];i&&(w(i)&&(i={mounted:i,updated:i}),i.deep&&mn(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function Bn(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&&(Qe(),gn(c,n,8,[e.el,s,e,t]),$e())}}function Vn(e,t){if(ka){let n=ka.provides,r=ka.parent&&ka.parent.provides;r===n&&(n=ka.provides=Object.create(r)),n[e]=t}}function Hn(e,t,n=!1){let r=Aa();if(r||fi){let i=fi?fi._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&&w(t)?t.call(r&&r.proxy):t}}var Un=Symbol.for(`v-scx`),Wn=()=>Hn(Un);function Gn(e,t,n){return Kn(e,t,n)}function Kn(e,t,n=p){let{immediate:r,deep:i,flush:a,once:o}=n,s=y({},n),c=t&&r||!t&&a!==`post`,l;if(Ia){if(a===`sync`){let e=Wn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=h,e.resume=h,e.pause=h,e}}let u=ka;s.call=(e,t,n)=>gn(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Ui(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():On(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=pn(e,t,s);return Ia&&(l?l.push(f):c&&f()),f}function qn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?Jn(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Na(this),s=Kn(i,a.bind(r),n);return o(),s}function Jn(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 Yn=new WeakMap,Xn=Symbol(`_vte`),Zn=e=>e.__isTeleport,Qn=e=>e&&(e.disabled||e.disabled===``),$n=e=>e&&(e.defer||e.defer===``),er=e=>typeof SVGElement<`u`&&e instanceof SVGElement,tr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,nr=(e,t)=>{let n=e&&e.to;return T(n)?t?t(n):null:n},rr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Qn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Qn(e.props),r=e.target=nr(e.props,m),a=cr(r,e,h,p);r&&(o!==`svg`&&er(r)?o=`svg`:o!==`mathml`&&tr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),sr(e,!1)))},S=e=>{let t=()=>{Yn.get(e)===t&&(Yn.delete(e),Qn(e.props)&&(b(e,_(e.el)||n,e.anchor),sr(e,!0)),x(e))};Yn.set(e,t),Ui(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),$n(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),sr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Yn.get(e);if(u){u.flags|=8,Yn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Qn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||er(p)?o=`svg`:(o===`mathml`||tr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Yi(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ir(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nr(t.props,m);e&&ir(t,e,null,l,0)}else g&&ir(t,p,h,l,1);sr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Qn(f),m=Yn.get(e);if(m&&(m.flags|=8,Yn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,p,!!i.dynamicChildren)}},move:ir,hydrate:ar};function ir(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Yn.has(e)&&(!d||Qn(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function ar(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=nr(t.props,c),h=Qn(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||cr(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||cr(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),sr(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var or=rr;function sr(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function cr(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Xn]=o,e&&(r(a,e,i),r(o,e,i)),o}var lr=Symbol(`_leaveCb`);function ur(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ur(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function dr(e,t){return w(e)?y({name:e.name},t,{setup:e}):e}function fr(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function pr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var mr=new WeakMap;function hr(e,t,n,r,i=!1){if(C(e)){e.forEach((e,a)=>hr(e,t&&(C(t)?t[a]:t),n,r,i));return}if(_r(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&hr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Ga(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===p?s.refs={}:s.refs,d=s.setupState,f=F(d),m=d===p?g:e=>pr(u,e)?!1:S(f,e),h=(e,t)=>!(t&&pr(u,t));if(l!=null&&l!==c){if(gr(t),T(l))u[l]=null,m(l)&&(d[l]=null);else if(tn(l)){let e=t;h(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(w(c))hn(c,s,12,[o,u]);else{let t=T(c),r=tn(c);if(t||r){let s=()=>{if(e.f){let n=t?m(c)?d[c]:u[c]:h(c)||!e.k?c.value:u[e.k];if(i)C(n)&&b(n,a);else if(C(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],m(c)&&(d[c]=u[c]);else{let t=[a];h(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,m(c)&&(d[c]=o)):r&&(h(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),mr.delete(e)};t.id=-1,mr.set(e,t),Ui(t,n)}else gr(e),s()}}}function gr(e){let t=mr.get(e);t&&(t.flags|=8,mr.delete(e))}_e().requestIdleCallback,_e().cancelIdleCallback;var _r=e=>!!e.type.__asyncLoader,vr=e=>e.type.__isKeepAlive;function yr(e,t){xr(e,`a`,t)}function br(e,t){xr(e,`da`,t)}function xr(e,t,n=ka){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Cr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)vr(e.parent.vnode)&&Sr(r,t,n,e),e=e.parent}}function Sr(e,t,n,r){let i=Cr(t,e,r,!0);Ar(()=>{b(r[t],i)},n)}function Cr(e,t,n=ka,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Qe();let i=Na(n),a=gn(t,n,e,r);return i(),$e(),a};return r?i.unshift(a):i.push(a),a}}var wr=e=>(t,n=ka)=>{(!Ia||e===`sp`)&&Cr(e,(...e)=>t(...e),n)},Tr=wr(`bm`),Er=wr(`m`),Dr=wr(`bu`),Or=wr(`u`),kr=wr(`bum`),Ar=wr(`um`),jr=wr(`sp`),Mr=wr(`rtg`),Nr=wr(`rtc`);function Pr(e,t=ka){Cr(`ec`,e,t)}var Fr=`components`,Ir=Symbol.for(`v-ndc`);function Lr(e){return T(e)?Rr(Fr,e,!1)||e:e||Ir}function Rr(e,t,n=!0,r=!1){let i=Fn||ka;if(i){let n=i.type;if(e===Fr){let e=Ka(n,!1);if(e&&(e===t||e===ce(t)||e===de(ce(t))))return n}let a=zr(i[e]||n[e],t)||zr(i.appContext[e],t);return!a&&r?n:a}}function zr(e,t){return e&&(e[t]||e[ce(t)]||e[de(ce(t))])}function Br(e,t,n,r){let i,a=n&&n[r],o=C(e);if(o||T(e)){let n=o&&Jt(e),r=!1,s=!1;n&&(r=!Xt(e),s=Yt(e),e=ft(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?en($t(e[n])):$t(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(D(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){if(Fn.ce||Fn.parent&&_r(Fn.parent)&&Fn.parent.ce){let e=Object.keys(n).length>0;return t!=="default"&&(n.name=t),z(),da(R,null,[ga(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),z();let o=a&&Hr(a(n)),s=n.key||o&&o.key,c=da(R,{key:(s&&!E(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Hr(e){return e.some(e=>fa(e)?!(e.type===ra||e.type===R&&!Hr(e.children)):!0)?e:null}var Ur=e=>e?Fa(e)?Ga(e):Ur(e.parent):null,Wr=y(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=>Ur(e.parent),$root:e=>Ur(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$r(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>qn.bind(e)}),Gr=(e,t)=>e!==p&&!e.__isScriptSetup&&S(e,t),Kr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Gr(r,t))return o[t]=1,r[t];else if(i!==p&&S(i,t))return o[t]=2,i[t];else if(S(a,t))return o[t]=3,a[t];else if(n!==p&&S(n,t))return o[t]=4,n[t];else Jr&&(o[t]=0)}let l=Wr[t],u,d;if(l)return t===`$attrs`&&lt(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==p&&S(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,S(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Gr(i,t)?(i[t]=n,!0):r!==p&&S(r,t)?(r[t]=n,!0):S(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==p&&s[0]!==`$`&&S(e,s)||Gr(t,s)||S(a,s)||S(r,s)||S(Wr,s)||S(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?S(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function qr(e){return C(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Jr=!0;function Yr(e){let t=$r(e),n=e.proxy,r=e.ctx;Jr=!1,t.beforeCreate&&Zr(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:x,render:S,renderTracked:ee,renderTriggered:te,errorCaptured:ne,serverPrefetch:T,expose:E,inheritAttrs:re,components:O,directives:k,filters:A}=t;if(l&&Xr(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=Wt(t))}if(Jr=!0,a)for(let e in a){let t=a[e],i=U({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):h,set:!w(t)&&w(t.set)?t.set.bind(n):h});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Qr(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Vn(t,e[t])})}u&&Zr(u,e,`c`);function j(e,t){C(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(Tr,d),j(Er,f),j(Dr,p),j(Or,m),j(yr,g),j(br,_),j(Pr,ne),j(Nr,ee),j(Mr,te),j(kr,y),j(Ar,x),j(jr,T),C(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||={};S&&e.render===h&&(e.render=S),re!=null&&(e.inheritAttrs=re),O&&(e.components=O),k&&(e.directives=k),T&&fr(e)}function Xr(e,t,n=h){C(e)&&(e=ii(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Hn(r.from||n,r.default,!0):Hn(r.from||n):Hn(r),tn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Zr(e,t,n){gn(C(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qr(e,t,n,r){let i=r.includes(`.`)?Jn(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Gn(i,n)}else if(w(e))Gn(i,e.bind(n));else if(D(e))if(C(e))e.forEach(e=>Qr(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Gn(i,r,e)}}function $r(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=>ei(c,e,o,!0)),ei(c,t,o)),D(t)&&a.set(t,c),c}function ei(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ei(e,a,n,!0),i&&i.forEach(t=>ei(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=ti[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var ti={data:ni,props:si,emits:si,methods:oi,computed:oi,beforeCreate:ai,created:ai,beforeMount:ai,mounted:ai,beforeUpdate:ai,updated:ai,beforeDestroy:ai,beforeUnmount:ai,destroyed:ai,unmounted:ai,activated:ai,deactivated:ai,errorCaptured:ai,serverPrefetch:ai,components:oi,directives:oi,watch:ci,provide:ni,inject:ri};function ni(e,t){return t?e?function(){return y(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function ri(e,t){return oi(ii(e),ii(t))}function ii(e){if(C(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ai(e,t){return e?[...new Set([].concat(e,t))]:t}function oi(e,t){return e?y(Object.create(null),e,t):t}function si(e,t){return e?C(e)&&C(t)?[...new Set([...e,...t])]:y(Object.create(null),qr(e),qr(t??{})):t}function ci(e,t){if(!e)return t;if(!t)return e;let n=y(Object.create(null),e);for(let r in t)n[r]=ai(e[r],t[r]);return n}function li(){return{app:null,config:{isNativeTag:g,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 ui=0;function di(e,t){return function(n,r=null){w(n)||(n=y({},n)),r!=null&&!D(r)&&(r=null);let i=li(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:ui++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Ya,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&w(e.install)?(a.add(e),e.install(c,...t)):w(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||ga(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Ga(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(gn(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=fi;fi=c;try{return e()}finally{fi=t}}};return c}}var fi=null,pi=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ce(t)}Modifiers`]||e[`${ue(t)}Modifiers`];function mi(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||p,i=n,a=t.startsWith(`update:`),o=a&&pi(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(he)));let s,c=r[s=fe(t)]||r[s=fe(ce(t))];!c&&a&&(c=r[s=fe(ue(t))]),c&&gn(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,gn(l,e,6,i)}}var hi=new WeakMap;function gi(e,t,n=!1){let r=n?hi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=gi(e,t,!0);n&&(s=!0,y(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(C(a)?a.forEach(e=>o[e]=null):y(o,a),D(e)&&r.set(e,o),o)}function _i(e,t){return!e||!_(t)?!1:(t=t.slice(2).replace(/Once$/,``),S(e,t[0].toLowerCase()+t.slice(1))||S(e,ue(t))||S(e,t))}function vi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Ln(e),_,y;try{if(n.shapeFlag&4){let e=i||r,t=e;_=xa(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;_=xa(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:yi(s)}}catch(t){aa.length=0,_n(t,e,1),_=ga(ra)}let b=_;if(y&&h!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(v)&&(y=bi(y,a)),b=ya(b,y,!1,!0))}return n.dirs&&(b=ya(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ur(b,n.transition),_=b,Ln(g),_}var yi=e=>{let t;for(let n in e)(n===`class`||n===`style`||_(n))&&((t||={})[n]=e[n]);return t},bi=(e,t)=>{let n={};for(let r in e)(!v(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function xi(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?Si(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ci(o,r,n)&&!_i(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?Si(r,o,l):!0:!!o;return!1}function Si(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(Ci(t,e,a)&&!_i(n,a))return!0}return!1}function Ci(e,t,n){let r=e[n],i=t[n];return n===`style`&&D(r)&&D(i)?!Oe(r,i):r!==i}function wi({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={},Ei=()=>Object.create(Ti),Di=e=>Object.getPrototypeOf(e)===Ti;function Oi(e,t,n,r=!1){let i={},a=Ei();e.propsDefaults=Object.create(null),Ai(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Gt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ki(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(_i(e.emitsOptions,o))continue;let u=t[o];if(c)if(S(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=ce(o);i[t]=ji(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Ai(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!S(t,a)&&((r=ue(a))===a||!S(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=ji(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!S(t,e))&&(delete a[e],l=!0)}l&&ut(e.attrs,`set`,``)}function Ai(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(ae(c))continue;let l=t[c],u;i&&S(i,u=ce(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:_i(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=F(n),r=s||p;for(let o=0;o<a.length;o++){let s=a[o];n[s]=ji(i,t,s,r[s],e,!S(r,s))}}return o}function ji(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=S(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&w(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Na(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===ue(n))&&(r=!0))}return r}var Mi=new WeakMap;function Ni(e,t,n=!1){let r=n?Mi:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!w(e)){let r=e=>{c=!0;let[n,r]=Ni(e,t,!0);y(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,m),m;if(C(a))for(let e=0;e<a.length;e++){let t=ce(a[e]);Pi(t)&&(o[t]=p)}else if(a)for(let e in a){let t=ce(e);if(Pi(t)){let n=a[e],r=o[t]=C(n)||w(n)?{type:n}:y({},n),i=r.type,c=!1,l=!0;if(C(i))for(let e=0;e<i.length;++e){let t=i[e],n=w(t)&&t.name;if(n===`Boolean`){c=!0;break}else n===`String`&&(l=!1)}else c=w(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||S(r,`default`))&&s.push(t)}}let l=[o,s];return D(e)&&r.set(e,l),l}function Pi(e){return e[0]!==`$`&&!ae(e)}var Fi=e=>e===`_`||e===`_ctx`||e===`$stable`,Ii=e=>C(e)?e.map(xa):[xa(e)],Li=(e,t,n)=>{if(t._n)return t;let r=Rn((...e)=>Ii(t(...e)),n);return r._c=!1,r},Ri=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Fi(n))continue;let i=e[n];if(w(i))t[n]=Li(n,i,r);else if(i!=null){let e=Ii(i);t[n]=()=>e}}},zi=(e,t)=>{let n=Ii(t);e.slots.default=()=>n},Bi=(e,t,n)=>{for(let r in t)(n||!Fi(r))&&(e[r]=t[r])},Vi=(e,t,n)=>{let r=e.slots=Ei();if(e.vnode.shapeFlag&32){let e=t._;e?(Bi(r,t,n),n&&M(r,`_`,e,!0)):Ri(t,r)}else t&&zi(e,t)},Hi=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=p;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Bi(i,t,n):(a=!t.$stable,Ri(t,i)),o=t}else t&&(zi(e,t),o={default:1});if(a)for(let e in i)!Fi(e)&&o[e]==null&&delete i[e]},Ui=ta;function Wi(e){return Gi(e)}function Gi(e,t){let n=_e();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:g=h,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&&!pa(e,t)&&(r=he(e),ue(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 na:y(e,t,n,r);break;case ra:b(e,t,n,r);break;case ia:e??x(t,n,r,o);break;case R:re(e,t,n,r,i,a,o,s,c);break;default:d&1?ee(e,t,n,r,i,a,o,s,c):d&6?O(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ye)}u!=null&&i?hr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&hr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):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,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},ee=(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(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,Ki(e,c),l,d),_&&Bn(e,null,i,`created`),ne(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Ta(p,i,e)}_&&Bn(e,null,i,`beforeMount`);let v=Ji(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Ui(()=>{try{p&&Ta(p,i,e),v&&g.enter(f),_&&Bn(e,null,i,`mounted`)}finally{}},s)},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||ea(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)v(null,e[l]=s?Sa(e[l]):xa(e[l]),t,n,r,i,a,o,s)},T=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let m=e.props||p,h=t.props||p,g;if(n&&qi(n,!1),(g=h.onVnodeBeforeUpdate)&&Ta(g,n,t,e),f&&Bn(t,e,n,`beforeUpdate`),n&&qi(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,Ki(t,i),o):s||oe(e,t,c,null,n,r,Ki(t,i),o,!1),l>0){if(l&16)D(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=m[r],s=h[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else !s&&d==null&&D(c,m,h,n,i);((g=h.onVnodeUpdated)||f)&&Ui(()=>{g&&Ta(g,n,t,e),f&&Bn(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];v(c,l,c.el&&(c.type===R||!pa(c,l)||c.shapeFlag&198)?d(c.el):n,null,r,i,a,o,!0)}},D=(e,t,n,r,i)=>{if(t!==n){if(t!==p)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},re=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&Yi(e,t,!0)):oe(e,t,n,f,a,o,c,l,u)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):A(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=Oa(e,r,i);if(vr(e)&&(s.ctx.renderer=ye),La(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,j,o),!e.el){let r=s.subTree=ga(ra);b(null,r,t,n),e.placeholder=r.el}}else j(s,e,t,n,i,a,o)},A=(e,t,n)=>{let r=t.component=e.component;if(xi(e,t,n))if(r.asyncDep&&!r.asyncResolved){ie(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},j=(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=Zi(e);if(n){t&&(t.el=c.el,ie(e,t,o)),n.asyncDep.then(()=>{Ui(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;qi(e,!1),t?(t.el=c.el,ie(e,t,o)):t=c,n&&me(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&Ta(f,s,t,c),qi(e,!0);let p=vi(e),m=e.subTree;e.subTree=p,v(m,p,d(m.el),he(m),e,i,a),t.el=p.el,u===null&&wi(e,p.el),r&&Ui(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Ui(()=>Ta(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=_r(t);if(qi(e,!1),l&&me(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Ta(o,d,t),qi(e,!0),s&&xe){let t=()=>{e.subTree=vi(e),xe(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=vi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Ui(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Ui(()=>Ta(o,d,e),i)}(t.shapeFlag&256||d&&_r(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Ui(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Le(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=()=>On(u),qi(e,!0),l()},ie=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ki(e,t.props,r,n),Hi(e,t.children,n),Qe(),jn(e),$e()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ce(l,f,n,r,i,a,o,s,c);return}else if(p&256){se(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&M(l,i,a),f!==l&&u(n,f)):d&16?m&16?ce(l,f,n,r,i,a,o,s,c):M(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},se=(e,t,n,r,i,a,o,s,c)=>{e||=m,t||=m;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;f<d;f++){let r=t[f]=c?Sa(t[f]):xa(t[f]);v(e[f],r,n,null,i,a,o,s,c)}l>u?M(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ce=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?Sa(t[l]):xa(t[l]);if(pa(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?Sa(t[f]):xa(t[f]);if(pa(r,l))v(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)v(null,t[l]=c?Sa(t[l]):xa(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)ue(e[l],i,a,!0),l++;else{let p=l,h=l,g=new Map;for(l=h;l<=f;l++){let e=t[l]=c?Sa(t[l]):xa(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=f-h+1,x=!1,S=0,C=Array(b);for(l=0;l<b;l++)C[l]=0;for(l=p;l<=d;l++){let r=e[l];if(y>=b){ue(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=f;_++)if(C[_-h]===0&&pa(r,t[_])){u=_;break}u===void 0?ue(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let ee=x?Xi(C):m;for(_=ee.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1<u?f.el||$i(f):r;C[l]===0?v(null,d,n,p,i,a,o,s,c):x&&(_<0||l!==ee[_]?le(d,n,p,2):_--)}}},le=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,ye);return}if(c===R){r(s,t,n);for(let e=0;e<u.length;e++)le(u[e],t,n,a);r(e.anchor,t,n);return}if(c===ia){S(e,t,n);return}if(a!==2&&d&1&&l)if(a===0)l.persisted&&!s[lr]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),Ui(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[lr];s._isLeaving&&s[lr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},ue=(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&&(Qe(),hr(s,null,n,e,!0),$e()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!_r(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Ta(_,t,e),u&6)pe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Bn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ye,r):l&&!l.hasOnce&&(a!==R||d>0&&d&64)?M(l,t,n,!1,!0):(a===R&&d&384||!i&&u&16)&&M(c,t,n),r&&de(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Ui(()=>{_&&Ta(_,t,e),h&&Bn(e,null,t,`unmounted`),v&&(e.el=null)},n)},de=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===R){fe(n,r);return}if(t===ia){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},fe=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},pe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Qi(c),Qi(l),r&&me(r),i.stop(),a&&(a.flags|=8,ue(o,e,t,n)),s&&Ui(s,t),Ui(()=>{e.isUnmounted=!0},t)},M=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ue(e[o],t,n,r,i)},he=e=>{if(e.shapeFlag&6)return he(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[Xn];return n?f(n):t},ge=!1,ve=(e,t,n)=>{let r;e==null?t._vnode&&(ue(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ge||=(ge=!0,jn(r),Mn(),!1)},ye={p:v,um:ue,m:le,r:de,mt:k,mc:w,pc:oe,pbc:E,n:he,o:e},be,xe;return t&&([be,xe]=t(ye)),{render:ve,hydrate:be,createApp:di(ve,be)}}function Ki({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function qi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ji(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yi(e,t,n=!1){let r=e.children,i=t.children;if(C(r)&&C(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]=Sa(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Yi(t,a)),a.type===na&&(a.patchFlag===-1&&(a=i[e]=Sa(a)),a.el=t.el),a.type===ra&&!a.el&&(a.el=t.el)}}function Xi(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 Zi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zi(t)}function Qi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function $i(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?$i(t.subTree):null}var ea=e=>e.__isSuspense;function ta(e,t){t&&t.pendingBranch?C(e)?t.effects.push(...e):t.effects.push(e):An(e)}var R=Symbol.for(`v-fgt`),na=Symbol.for(`v-txt`),ra=Symbol.for(`v-cmt`),ia=Symbol.for(`v-stc`),aa=[],oa=null;function z(e=!1){aa.push(oa=e?null:[])}function sa(){aa.pop(),oa=aa[aa.length-1]||null}var ca=1;function la(e,t=!1){ca+=e,e<0&&oa&&t&&(oa.hasOnce=!0)}function ua(e){return e.dynamicChildren=ca>0?oa||m:null,sa(),ca>0&&oa&&oa.push(e),e}function B(e,t,n,r,i,a){return ua(V(e,t,n,r,i,a,!0))}function da(e,t,n,r,i){return ua(ga(e,t,n,r,i,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function pa(e,t){return e.type===t.type&&e.key===t.key}var ma=({key:e})=>e??null,ha=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||tn(e)||w(e)?{i:Fn,r:e,k:t,f:!!n}:e);function V(e,t=null,n=null,r=0,i=null,a=e===R?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ma(t),ref:t&&ha(t),scopeId:In,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:Fn};return s?(Ca(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),ca>0&&!o&&oa&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&oa.push(c),c}var ga=_a;function _a(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Ir)&&(e=ra),fa(e)){let r=ya(e,t,!0);return n&&Ca(r,n),ca>0&&!a&&oa&&(r.shapeFlag&6?oa[oa.indexOf(e)]=r:oa.push(r)),r.patchFlag=-2,r}if(qa(e)&&(e=e.__vccOpts),t){t=va(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=Ce(e)),D(n)&&(Zt(n)&&!C(n)&&(n=y({},n)),t.style=ve(n))}let o=T(e)?1:ea(e)?128:Zn(e)?64:D(e)?4:w(e)?2:0;return V(e,t,n,r,i,o,a,!0)}function va(e){return e?Zt(e)||Di(e)?y({},e):e:null}function ya(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?wa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ma(l),ref:t&&t.ref?n&&a?C(a)?a.concat(ha(t)):[a,ha(t)]:ha(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!==R?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&&ya(e.ssContent),ssFallback:e.ssFallback&&ya(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ur(u,c.clone(u)),u}function ba(e=` `,t=0){return ga(na,null,e,t)}function H(e=``,t=!1){return t?(z(),da(ra,null,e)):ga(ra,null,e)}function xa(e){return e==null||typeof e==`boolean`?ga(ra):C(e)?ga(R,null,e.slice()):fa(e)?Sa(e):ga(na,null,String(e))}function Sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ya(e)}function Ca(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(C(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ca(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Di(t)?t._ctx=Fn:r===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else w(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),r&64?(n=16,t=[ba(t)]):n=8);e.children=t,e.shapeFlag|=n}function wa(...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=Ce([t.class,r.class]));else if(e===`style`)t.style=ve([t.style,r.style]);else if(_(e)){let n=t[e],i=r[e];i&&n!==i&&!(C(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!v(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Ta(e,t,n,r=null){gn(e,t,7,[n,r])}var Ea=li(),Da=0;function Oa(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||Ea,a={uid:Da++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Pe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ni(r,i),emitsOptions:gi(r,i),emit:null,emitted:null,propsDefaults:p,inheritAttrs:r.inheritAttrs,ctx:p,data:p,props:p,attrs:p,slots:p,refs:p,setupState:p,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=mi.bind(null,a),e.ce&&e.ce(a),a}var ka=null,Aa=()=>ka||Fn,ja,Ma;{let e=_e(),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)}};ja=t(`__VUE_INSTANCE_SETTERS__`,e=>ka=e),Ma=t(`__VUE_SSR_SETTERS__`,e=>Ia=e)}var Na=e=>{let t=ka;return ja(e),e.scope.on(),()=>{e.scope.off(),ja(t)}},Pa=()=>{ka&&ka.scope.off(),ja(null)};function Fa(e){return e.vnode.shapeFlag&4}var Ia=!1;function La(e,t=!1,n=!1){t&&Ma(t);let{props:r,children:i}=e.vnode,a=Fa(e);Oi(e,r,a,t),Vi(e,i,n||t);let o=a?Ra(e,t):void 0;return t&&Ma(!1),o}function Ra(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kr);let{setup:r}=n;if(r){Qe();let n=e.setupContext=r.length>1?Wa(e):null,i=Na(e),a=hn(r,e,0,[e.props,n]),o=re(a);if($e(),i(),(o||e.sp)&&!_r(e)&&fr(e),o){if(a.then(Pa,Pa),t)return a.then(n=>{za(e,n,t)}).catch(t=>{_n(t,e,0)});e.asyncDep=a}else za(e,a,t)}else Ha(e,t)}function za(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=on(t)),Ha(e,n)}var Ba,Va;function Ha(e,t,n){let r=e.type;if(!e.render){if(!t&&Ba&&!r.render){let t=r.template||$r(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Ba(t,y(y({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||h,Va&&Va(e)}{let t=Na(e);Qe();try{Yr(e)}finally{$e(),t()}}}var Ua={get(e,t){return lt(e,`get`,``),e[t]}};function Wa(e){return{attrs:new Proxy(e.attrs,Ua),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ga(e){return e.exposed?e.exposeProxy||=new Proxy(on(Qt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wr)return Wr[n](e)},has(e,t){return t in e||t in Wr}}):e.proxy}function Ka(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function qa(e){return w(e)&&`__vccOpts`in e}var U=(e,t)=>cn(e,t,Ia);function Ja(e,t,n){try{la(-1);let r=arguments.length;return r===2?D(t)&&!C(t)?fa(t)?ga(e,null,[t]):ga(e,t):ga(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fa(n)&&(n=[n]),ga(e,t,n))}finally{la(1)}}var Ya=`3.5.38`,Xa=void 0,Za=typeof window<`u`&&window.trustedTypes;if(Za)try{Xa=Za.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Qa=Xa?e=>Xa.createHTML(e):e=>e,$a=`http://www.w3.org/2000/svg`,eo=`http://www.w3.org/1998/Math/MathML`,to=typeof document<`u`?document:null,no=to&&to.createElement(`template`),ro={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`?to.createElementNS($a,e):t===`mathml`?to.createElementNS(eo,e):n?to.createElement(e,{is:n}):to.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>to.createTextNode(e),createComment:e=>to.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>to.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{no.innerHTML=Qa(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=no.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]}},io=Symbol(`_vtc`);function ao(e,t,n){let r=e[io];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var oo=Symbol(`_vod`),so=Symbol(`_vsh`),co={name:`show`,beforeMount(e,{value:t},{transition:n}){e[oo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):lo(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),lo(e,!0),r.enter(e)):r.leave(e,()=>{lo(e,!1)}):lo(e,t))},beforeUnmount(e,{value:t}){lo(e,t)}};function lo(e,t){e.style.display=t?e[oo]:`none`,e[so]=!t}var uo=Symbol(``),fo=/(?:^|;)\s*display\s*:/;function po(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ho(r,t,``)}else for(let e in t)n[e]??ho(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ho(r,i,``):yo(e,i,!T(t)&&t?t[i]:void 0,o)||ho(r,i,o)}}else if(i){if(t!==n){let e=r[uo];e&&(n+=`;`+e),r.cssText=n,a=fo.test(n)}}else t&&e.removeAttribute(`style`);oo in e&&(e[oo]=a?r.display:``,e[so]&&(r.display=`none`))}var mo=/\s*!important$/;function ho(e,t,n){if(C(n))n.forEach(n=>ho(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=vo(e,t);mo.test(n)?e.setProperty(ue(r),n.replace(mo,``),`important`):e[r]=n}}var go=[`Webkit`,`Moz`,`ms`],_o={};function vo(e,t){let n=_o[t];if(n)return n;let r=ce(t);if(r!==`filter`&&r in e)return _o[t]=r;r=de(r);for(let n=0;n<go.length;n++){let i=go[n]+r;if(i in e)return _o[t]=i}return t}function yo(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&T(r)&&n===r}var bo=`http://www.w3.org/1999/xlink`;function xo(e,t,n,r,i,a=Te(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(bo,t.slice(6,t.length)):e.setAttributeNS(bo,t,n):n==null||a&&!Ee(n)?e.removeAttribute(t):e.setAttribute(t,a?``:E(n)?String(n):n)}function So(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Qa(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=Ee(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 Co(e,t,n,r){e.addEventListener(t,n,r)}function wo(e,t,n,r){e.removeEventListener(t,n,r)}var To=Symbol(`_vei`);function Eo(e,t,n,r,i=null){let a=e[To]||(e[To]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Oo(t);r?Co(e,n,a[t]=Mo(r,i),s):o&&(wo(e,n,o,s),a[t]=void 0)}}var Do=/(?:Once|Passive|Capture)$/;function Oo(e){let t;if(Do.test(e)){t={};let n;for(;n=e.match(Do);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):ue(e.slice(2)),t]}var ko=0,Ao=Promise.resolve(),jo=()=>ko||=(Ao.then(()=>ko=0),Date.now());function Mo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(C(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&&gn(e,t,5,a)}}else gn(r,t,5,[e])};return n.value=e,n.attached=jo(),n}var No=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Po=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?ao(e,r,o):t===`style`?po(e,n,r):_(t)?v(t)||Eo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Fo(e,t,r,o))?(So(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&xo(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Io(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?So(e,ce(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),xo(e,t,r,o))};function Fo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&No(t)&&w(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 No(t)&&T(n)?!1:t in e}function Io(e,t){let n=e._def.props;if(!n)return!1;let r=ce(t);return Array.isArray(n)?n.some(e=>ce(e)===r):Object.keys(n).some(e=>ce(e)===r)}var Lo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return C(t)?e=>me(t,e):t};function Ro(e){e.target.composing=!0}function zo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Bo=Symbol(`_assign`);function Vo(e,t,n){return t&&(e=e.trim()),n&&(e=he(e)),e}var Ho={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Bo]=Lo(i);let a=r||i.props&&i.props.type===`number`;Co(e,t?`change`:`input`,t=>{t.target.composing||e[Bo](Vo(e.value,n,a))}),(n||a)&&Co(e,`change`,()=>{e.value=Vo(e.value,n,a)}),t||(Co(e,`compositionstart`,Ro),Co(e,`compositionend`,zo),Co(e,`change`,zo))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Bo]=Lo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?he(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Uo={deep:!0,created(e,t,n){e[Bo]=Lo(n),Co(e,`change`,()=>{let t=e._modelValue,n=Jo(e),r=e.checked,i=e[Bo];if(C(t)){let e=ke(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(te(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Yo(e,r))})},mounted:Wo,beforeUpdate(e,t,n){e[Bo]=Lo(n),Wo(e,t,n)}};function Wo(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(C(t))i=ke(t,r.props.value)>-1;else if(te(t))i=t.has(r.props.value);else{if(t===n)return;i=Oe(t,Yo(e,!0))}e.checked!==i&&(e.checked=i)}var Go={created(e,{value:t},n){e.checked=Oe(t,n.props.value),e[Bo]=Lo(n),Co(e,`change`,()=>{e[Bo](Jo(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Bo]=Lo(r),t!==n&&(e.checked=Oe(t,r.props.value))}},Ko={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=te(t);Co(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?he(Jo(e)):Jo(e));e[Bo](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,En(()=>{e._assigning=!1})}),e[Bo]=Lo(r)},mounted(e,{value:t}){qo(e,t)},beforeUpdate(e,t,n){e[Bo]=Lo(n)},updated(e,{value:t}){e._assigning||qo(e,t)}};function qo(e,t){let n=e.multiple,r=C(t);if(!(n&&!r&&!te(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Jo(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=ke(t,o)>-1}else a.selected=t.has(o);else if(Oe(Jo(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return`_value`in e?e._value:e.value}function Yo(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Xo=[`ctrl`,`shift`,`alt`,`meta`],Zo={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Xo.some(n=>e[`${n}Key`]&&!t.includes(n))},Qo=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Zo[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},$o=y({patchProp:Po},ro),es;function ts(){return es||=Wi($o)}var ns=((...e)=>{let t=ts().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=is(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,rs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function rs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function is(e){return T(e)?document.querySelector(e):e}var as=[`aria-pressed`],os=dr({__name:`FilterChip`,props:{active:{type:Boolean},label:{},count:{}},emits:[`click`],setup(e){return(t,n)=>(z(),B(`button`,{type:`button`,"aria-pressed":e.active,class:Ce([`chip`,{active:e.active}]),onClick:n[0]||=e=>t.$emit(`click`)},[ba(N(e.label),1),e.count===void 0?H(``,!0):(z(),B(R,{key:0},[ba(` (`+N(e.count)+`) `,1)],64))],10,as))}}),ss=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},cs=ss(os,[[`__scopeId`,`data-v-0d423d77`]]),ls={class:`sidebar`},us={class:`sidebar-header`},ds={class:`filters`},fs={key:0,class:`state`},ps={key:1,class:`state error`},ms={key:2,class:`state`},hs={key:3,class:`state`},gs={key:4,class:`list`},_s=[`title`,`onClick`],vs={class:`item-title`},ys={key:0,class:`spinner`,title:`Claude is working`,"aria-label":`Claude is working`},bs={class:`item-time`},xs=ss(dr({__name:`Sidebar`,props:{sessions:{},loading:{type:Boolean},error:{},activeId:{},filter:{}},emits:[`select`,`new`,`toggle-layout`,`refresh`,`update:filter`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.sessions.filter(e=>e.waiting).length),a=U(()=>n.filter===`unread`?n.sessions.filter(e=>e.waiting):n.sessions);function o(e){let t=Date.now()-e,n=Math.round(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.round(n/60);return r<24?`${r}h ago`:`${Math.round(r/24)}d ago`}return(t,s)=>(z(),B(`aside`,ls,[V(`div`,us,[s[5]||=V(`span`,{class:`heading`},`Sessions`,-1),V(`button`,{class:`icon-btn`,title:`Switch to horizontal tabs`,"aria-label":`Switch to horizontal tabs`,onClick:s[0]||=e=>r(`toggle-layout`)},`⇥`)]),V(`button`,{class:`new-btn`,onClick:s[1]||=e=>r(`new`)},`+ New session`),V(`div`,ds,[ga(cs,{label:`All`,active:e.filter===`all`,onClick:s[2]||=e=>r(`update:filter`,`all`)},null,8,[`active`]),ga(cs,{label:`Unread`,count:i.value,active:e.filter===`unread`,onClick:s[3]||=e=>r(`update:filter`,`unread`)},null,8,[`count`,`active`]),V(`button`,{class:`icon-btn sort-btn`,title:`Sort by most recent`,"aria-label":`Sort by most recent`,onClick:s[4]||=e=>r(`refresh`)},`⟳`)]),e.loading?(z(),B(`div`,fs,`Loading…`)):e.error?(z(),B(`div`,ps,N(e.error),1)):e.sessions.length===0?(z(),B(`div`,ms,`No sessions yet`)):a.value.length===0?(z(),B(`div`,hs,`No unread sessions`)):(z(),B(`ul`,gs,[(z(!0),B(R,null,Br(a.value,e=>(z(),B(`li`,{key:e.id,class:Ce([`item`,{active:e.id===n.activeId,waiting:e.waiting}]),title:e.title,onClick:t=>r(`select`,e.id)},[V(`span`,vs,[e.working&&!e.waiting&&e.id!==n.activeId?(z(),B(`span`,ys)):H(``,!0),ba(` `+N(e.title),1)]),V(`span`,bs,N(o(e.mtime)),1)],10,_s))),128))]))]))}}),[[`__scopeId`,`data-v-65add4c2`]]),Ss={class:`tabbar`},Cs={class:`filters`},ws={class:`tabs`},Ts=[`title`,`aria-current`,`onClick`],Es={key:0,class:`spinner`,title:`Claude is working`,"aria-label":`Claude is working`},Ds={class:`tab-title`},Os={key:1,class:`unread-dot`,"aria-label":`Unread`},ks={class:`actions`},As=8,js=ss(dr({__name:`SessionTabBar`,props:{sessions:{},activeId:{},filter:{}},emits:[`select`,`new`,`toggle-layout`,`refresh`,`update:filter`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.sessions.filter(e=>e.waiting).length),a=U(()=>(n.filter===`unread`?n.sessions.filter(e=>e.waiting):n.sessions).slice(0,As));return(t,o)=>(z(),B(`div`,Ss,[V(`button`,{class:`new-btn`,title:`New session`,"aria-label":`New session`,onClick:o[0]||=e=>r(`new`)},`+`),V(`div`,Cs,[ga(cs,{label:`All`,active:e.filter===`all`,onClick:o[1]||=e=>r(`update:filter`,`all`)},null,8,[`active`]),ga(cs,{label:`Unread`,count:i.value,active:e.filter===`unread`,onClick:o[2]||=e=>r(`update:filter`,`unread`)},null,8,[`count`,`active`]),V(`button`,{class:`icon-btn sort-btn`,title:`Sort by most recent`,"aria-label":`Sort by most recent`,onClick:o[3]||=e=>r(`refresh`)},`⟳`)]),V(`div`,ws,[(z(!0),B(R,null,Br(a.value,e=>(z(),B(`button`,{key:e.id,class:Ce([`tab`,{active:e.id===n.activeId,waiting:e.waiting}]),title:e.title,"aria-current":e.id===n.activeId?`page`:void 0,onClick:t=>r(`select`,e.id)},[e.working&&!e.waiting&&e.id!==n.activeId?(z(),B(`span`,Es)):H(``,!0),V(`span`,Ds,N(e.title),1),e.waiting&&e.id!==n.activeId?(z(),B(`span`,Os)):H(``,!0)],10,Ts))),128))]),V(`div`,ks,[V(`button`,{class:`icon-btn`,title:`Switch to vertical sidebar`,"aria-label":`Switch to vertical sidebar`,onClick:o[4]||=e=>r(`toggle-layout`)},`⇤`)])]))}}),[[`__scopeId`,`data-v-09487b28`]]),Ms=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,Ps=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},Fs=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ns(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ms(t,n,i),i},W=(e,t)=>(n,r)=>t(n,r,e),Is=`Terminal input`,Ls={get:()=>Is,set:e=>Is=e},Rs=`Too much output to announce, navigate to rows manually to read`,zs={get:()=>Rs,set:e=>Rs=e};function Bs(e){return e.replace(/\r?\n/g,`\r`)}function Vs(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function Hs(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Us(e,t,n,r){e.stopPropagation(),e.clipboardData&&Ws(e.clipboardData.getData(`text/plain`),t,n,r)}function Ws(e,t,n,r){e=Bs(e),e=Vs(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function Gs(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function Ks(e,t,n,r,i){Gs(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function qs(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Js(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Ys=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Xs=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Zs=``,Qs=` `,$s=class e{constructor(){this.fg=0,this.bg=0,this.extended=new ec}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ec=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},tc=class e extends $s{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ec,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?qs(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},nc=`di$target`,rc=`di$dependencies`,ic=new Map;function ac(e){return e[rc]||[]}function oc(e){if(ic.has(e))return ic.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);sc(t,e,r)};return t._id=e,ic.set(e,t),t}function sc(e,t,n){t[nc]===t?t[rc].push({id:e,index:n}):(t[rc]=[{id:e,index:n}],t[nc]=t)}var cc=oc(`BufferService`),lc=oc(`CoreMouseService`),uc=oc(`CoreService`),dc=oc(`CharsetService`),fc=oc(`InstantiationService`),pc=oc(`LogService`),mc=oc(`OptionsService`),hc=oc(`OscLinkService`),gc=oc(`UnicodeService`),_c=oc(`DecorationService`),vc=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new tc,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):yc(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};vc=Fs([W(0,cc),W(1,mc),W(2,hc)],vc);function yc(e,t){if(confirm(`Do you want to navigate to ${t}?
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function f(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var p={},m=[],h=()=>{},g=()=>!1,_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),v=e=>e.startsWith(`onUpdate:`),y=Object.assign,b=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,S=(e,t)=>x.call(e,t),C=Array.isArray,ee=e=>k(e)===`[object Map]`,te=e=>k(e)===`[object Set]`,ne=e=>k(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,E=e=>typeof e==`symbol`,D=e=>typeof e==`object`&&!!e,re=e=>(D(e)||w(e))&&w(e.then)&&w(e.catch),O=Object.prototype.toString,k=e=>O.call(e),A=e=>k(e).slice(8,-1),j=e=>k(e)===`[object Object]`,ie=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ae=f(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),oe=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},se=/-\w/g,ce=oe(e=>e.replace(se,e=>e.slice(1).toUpperCase())),le=/\B([A-Z])/g,ue=oe(e=>e.replace(le,`-$1`).toLowerCase()),de=oe(e=>e.charAt(0).toUpperCase()+e.slice(1)),fe=oe(e=>e?`on${de(e)}`:``),pe=(e,t)=>!Object.is(e,t),me=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},M=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},he=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ge,_e=()=>ge||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ve(e){if(C(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=T(r)?Se(r):ve(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(T(e)||D(e))return e}var ye=/;(?![^(]*\))/g,be=/:([^]+)/,xe=/\/\*[^]*?\*\//g;function Se(e){let t={};return e.replace(xe,``).split(ye).forEach(e=>{if(e){let n=e.split(be);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ce(e){let t=``;if(T(e))t=e;else if(C(e))for(let n=0;n<e.length;n++){let r=Ce(e[n]);r&&(t+=r+` `)}else if(D(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var we=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Te=f(we);we+``;function Ee(e){return!!e||e===``}function De(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Oe(e[r],t[r]);return n}function Oe(e,t){if(e===t)return!0;let n=ne(e),r=ne(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=E(e),r=E(t),n||r)return e===t;if(n=C(e),r=C(t),n||r)return n&&r?De(e,t):!1;if(n=D(e),r=D(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||!Oe(e[n],t[n]))return!1}}return String(e)===String(t)}function ke(e,t){return e.findIndex(e=>Oe(e,t))}var Ae=e=>!!(e&&e.__v_isRef===!0),N=e=>T(e)?e:e==null?``:C(e)||D(e)&&(e.toString===O||!w(e.toString))?Ae(e)?N(e.value):JSON.stringify(e,je,2):String(e),je=(e,t)=>Ae(t)?je(e,t.value):ee(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Me(t,r)+` =>`]=n,e),{})}:te(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Me(e))}:E(t)?Me(t):D(t)&&!C(t)&&!j(t)?String(t):t,Me=(e,t=``)=>E(e)?`Symbol(${e.description??t})`:e,Ne,Pe=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&&Ne&&(Ne.active?(this.parent=Ne,this.index=(Ne.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)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=Ne;try{return Ne=this,e()}finally{Ne=t}}}on(){++this._on===1&&(this.prevScope=Ne,Ne=this)}off(){if(this._on>0&&--this._on===0){if(Ne===this)Ne=this.prevScope;else{let e=Ne;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){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Fe(){return Ne}var P,Ie=new WeakSet,Le=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,Ne&&(Ne.active?Ne.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ie.has(this)&&(Ie.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ve(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,et(this),We(this);let e=P,t=Xe;P=this,Xe=!0;try{return this.fn()}finally{Ge(this),P=e,Xe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Je(e);this.deps=this.depsTail=void 0,et(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ie.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ke(this)&&this.run()}get dirty(){return Ke(this)}},Re=0,ze,Be;function Ve(e,t=!1){if(e.flags|=8,t){e.next=Be,Be=e;return}e.next=ze,ze=e}function He(){Re++}function Ue(){if(--Re>0)return;if(Be){let e=Be;for(Be=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ze;){let t=ze;for(ze=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 We(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ge(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Je(r),Ye(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ke(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===tt)||(e.globalVersion=tt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ke(e))))return;e.flags|=2;let t=e.dep,n=P,r=Xe;P=e,Xe=!0;try{We(e);let n=e.fn(e._value);(t.version===0||pe(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{P=n,Xe=r,Ge(e),e.flags&=-3}}function Je(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)Je(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ye(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Xe=!0,Ze=[];function Qe(){Ze.push(Xe),Xe=!1}function $e(){let e=Ze.pop();Xe=e===void 0?!0:e}function et(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=P;P=void 0;try{t()}finally{P=e}}}var tt=0,nt=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}},rt=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(!P||!Xe||P===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==P)t=this.activeLink=new nt(P,this),P.deps?(t.prevDep=P.depsTail,P.depsTail.nextDep=t,P.depsTail=t):P.deps=P.depsTail=t,it(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=P.depsTail,t.nextDep=void 0,P.depsTail.nextDep=t,P.depsTail=t,P.deps===t&&(P.deps=e)}return t}trigger(e){this.version++,tt++,this.notify(e)}notify(e){He();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ue()}}};function it(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)it(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var at=new WeakMap,ot=Symbol(``),st=Symbol(``),ct=Symbol(``);function lt(e,t,n){if(Xe&&P){let t=at.get(e);t||at.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new rt),r.map=t,r.key=n),r.track()}}function ut(e,t,n,r,i,a){let o=at.get(e);if(!o){tt++;return}let s=e=>{e&&e.trigger()};if(He(),t===`clear`)o.forEach(s);else{let i=C(e),a=i&&ie(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ct||!E(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ct)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ot)),ee(e)&&s(o.get(st)));break;case`delete`:i||(s(o.get(ot)),ee(e)&&s(o.get(st)));break;case`set`:ee(e)&&s(o.get(ot));break}}Ue()}function dt(e){let t=F(e);return t===e?t:(lt(t,`iterate`,ct),Xt(e)?t:t.map($t))}function ft(e){return lt(e=F(e),`iterate`,ct),e}function pt(e,t){return Yt(e)?en(Jt(e)?$t(t):t):$t(t)}var mt={__proto__:null,[Symbol.iterator](){return ht(this,Symbol.iterator,e=>pt(this,e))},concat(...e){return dt(this).concat(...e.map(e=>C(e)?dt(e):e))},entries(){return ht(this,`entries`,e=>(e[1]=pt(this,e[1]),e))},every(e,t){return _t(this,`every`,e,t,void 0,arguments)},filter(e,t){return _t(this,`filter`,e,t,e=>e.map(e=>pt(this,e)),arguments)},find(e,t){return _t(this,`find`,e,t,e=>pt(this,e),arguments)},findIndex(e,t){return _t(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return _t(this,`findLast`,e,t,e=>pt(this,e),arguments)},findLastIndex(e,t){return _t(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return _t(this,`forEach`,e,t,void 0,arguments)},includes(...e){return yt(this,`includes`,e)},indexOf(...e){return yt(this,`indexOf`,e)},join(e){return dt(this).join(e)},lastIndexOf(...e){return yt(this,`lastIndexOf`,e)},map(e,t){return _t(this,`map`,e,t,void 0,arguments)},pop(){return bt(this,`pop`)},push(...e){return bt(this,`push`,e)},reduce(e,...t){return vt(this,`reduce`,e,t)},reduceRight(e,...t){return vt(this,`reduceRight`,e,t)},shift(){return bt(this,`shift`)},some(e,t){return _t(this,`some`,e,t,void 0,arguments)},splice(...e){return bt(this,`splice`,e)},toReversed(){return dt(this).toReversed()},toSorted(e){return dt(this).toSorted(e)},toSpliced(...e){return dt(this).toSpliced(...e)},unshift(...e){return bt(this,`unshift`,e)},values(){return ht(this,`values`,e=>pt(this,e))}};function ht(e,t,n){let r=ft(e),i=r[t]();return r!==e&&!Xt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var gt=Array.prototype;function _t(e,t,n,r,i,a){let o=ft(e),s=o!==e&&!Xt(e),c=o[t];if(c!==gt[t]){let t=c.apply(e,a);return s?$t(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,pt(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 vt(e,t,n,r){let i=ft(e),a=i!==e&&!Xt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=pt(e,t)),n.call(this,t,pt(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?pt(e,c):c}function yt(e,t,n){let r=F(e);lt(r,`iterate`,ct);let i=r[t](...n);return(i===-1||i===!1)&&Zt(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function bt(e,t,n=[]){Qe(),He();let r=F(e)[t].apply(e,n);return Ue(),$e(),r}var xt=f(`__proto__,__v_isRef,__isVue`),St=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(E));function Ct(e){E(e)||(e=String(e));let t=F(this);return lt(t,`has`,e),t.hasOwnProperty(e)}var wt=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?Ht:Vt:i?Bt:zt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=C(e);if(!r){let e;if(a&&(e=mt[t]))return e;if(t===`hasOwnProperty`)return Ct}let o=Reflect.get(e,t,tn(e)?e:n);if((E(t)?St.has(t):xt(t))||(r||lt(e,`get`,t),i))return o;if(tn(o)){let e=a&&ie(t)?o:o.value;return r&&D(e)?Kt(e):e}return D(o)?r?Kt(o):Wt(o):o}},Tt=class extends wt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=C(e)&&ie(t);if(!this._isShallow){let e=Yt(i);if(!Xt(n)&&!Yt(n)&&(i=F(i),n=F(n)),!a&&tn(i)&&!tn(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:S(e,t),s=Reflect.set(e,t,n,tn(e)?e:r);return e===F(r)&&(o?pe(n,i)&&ut(e,`set`,t,n,i):ut(e,`add`,t,n)),s}deleteProperty(e,t){let n=S(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ut(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!E(t)||!St.has(t))&&lt(e,`has`,t),n}ownKeys(e){return lt(e,`iterate`,C(e)?`length`:ot),Reflect.ownKeys(e)}},Et=class extends wt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Dt=new Tt,Ot=new Et,kt=new Tt(!0),At=e=>e,jt=e=>Reflect.getPrototypeOf(e);function Mt(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=ee(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?At:t?en:$t;return!t&&lt(a,`iterate`,c?st:ot),y(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Nt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Pt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(pe(n,a)&&lt(i,`get`,n),lt(i,`get`,a));let{has:o}=jt(i),s=t?At:e?en:$t;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&&lt(F(t),`iterate`,ot),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(pe(t,i)&&lt(r,`has`,t),lt(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?At:e?en:$t;return!e&&lt(o,`iterate`,ot),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return y(n,e?{add:Nt(`add`),set:Nt(`set`),delete:Nt(`delete`),clear:Nt(`clear`)}:{add(e){let n=F(this),r=jt(n),i=F(e),a=!t&&!Xt(e)&&!Yt(e)?i:e;return r.has.call(n,a)||pe(e,a)&&r.has.call(n,e)||pe(i,a)&&r.has.call(n,i)||(n.add(a),ut(n,`add`,a,a)),this},set(e,n){!t&&!Xt(n)&&!Yt(n)&&(n=F(n));let r=F(this),{has:i,get:a}=jt(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?pe(n,s)&&ut(r,`set`,e,n,s):ut(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=jt(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&&ut(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&ut(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Mt(r,e,t)}),n}function Ft(e,t){let n=Pt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(S(n,r)&&r in t?n:t,r,i)}var It={get:Ft(!1,!1)},Lt={get:Ft(!1,!0)},Rt={get:Ft(!0,!1)},zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap;function Ut(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Wt(e){return Yt(e)?e:qt(e,!1,Dt,It,zt)}function Gt(e){return qt(e,!1,kt,Lt,Bt)}function Kt(e){return qt(e,!0,Ot,Rt,Vt)}function qt(e,t,n,r,i){if(!D(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=Ut(A(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Jt(e){return Yt(e)?Jt(e.__v_raw):!!(e&&e.__v_isReactive)}function Yt(e){return!!(e&&e.__v_isReadonly)}function Xt(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 Qt(e){return!S(e,`__v_skip`)&&Object.isExtensible(e)&&M(e,`__v_skip`,!0),e}var $t=e=>D(e)?Wt(e):e,en=e=>D(e)?Kt(e):e;function tn(e){return e?e.__v_isRef===!0:!1}function I(e){return nn(e,!1)}function nn(e,t){return tn(e)?e:new rn(e,t)}var rn=class{constructor(e,t){this.dep=new rt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:$t(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Xt(e)||Yt(e);e=n?e:F(e),pe(e,t)&&(this._rawValue=e,this._value=n?e:$t(e),this.dep.trigger())}};function L(e){return tn(e)?e.value:e}var an={get:(e,t,n)=>t===`__v_raw`?e:L(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tn(i)&&!tn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function on(e){return Jt(e)?e:new Proxy(e,an)}var sn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new rt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=tt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&P!==this)return Ve(this,!0),!0}get value(){let e=this.dep.track();return qe(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function cn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new sn(r,i,n)}var ln={},un=new WeakMap,dn=void 0;function fn(e,t=!1,n=dn){if(n){let t=un.get(n);t||un.set(n,t=[]),t.push(e)}}function pn(e,t,n=p){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:Xt(e)||i===!1||i===0?mn(e,1):mn(e),u,d,f,m,g=!1,_=!1;if(tn(e)?(d=()=>e.value,g=Xt(e)):Jt(e)?(d=()=>l(e),g=!0):C(e)?(_=!0,g=e.some(e=>Jt(e)||Xt(e)),d=()=>e.map(e=>{if(tn(e))return e.value;if(Jt(e))return l(e);if(w(e))return c?c(e,2):e()})):d=w(e)?t?c?()=>c(e,2):e:()=>{if(f){Qe();try{f()}finally{$e()}}let t=dn;dn=u;try{return c?c(e,3,[m]):e(m)}finally{dn=t}}:h,t&&i){let e=d,t=i===!0?1/0:i;d=()=>mn(e(),t)}let v=Fe(),y=()=>{u.stop(),v&&v.active&&b(v.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return y(),n}}let x=_?Array(e.length).fill(ln):ln,S=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let n=u.run();if(e||i||g||(_?n.some((e,t)=>pe(e,x[t])):pe(n,x))){f&&f();let e=dn;dn=u;try{let e=[n,x===ln?void 0:_&&x[0]===ln?[]:x,m];x=n,c?c(t,3,e):t(...e)}finally{dn=e}}}else u.run()};return s&&s(S),u=new Le(d),u.scheduler=o?()=>o(S,!1):S,m=e=>fn(e,!1,u),f=u.onStop=()=>{let e=un.get(u);if(e){if(c)c(e,4);else for(let t of e)t();un.delete(u)}},t?r?S(!0):x=u.run():o?o(S.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function mn(e,t=1/0,n){if(t<=0||!D(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,tn(e))mn(e.value,t,n);else if(C(e))for(let r=0;r<e.length;r++)mn(e[r],t,n);else if(te(e)||ee(e))e.forEach(e=>{mn(e,t,n)});else if(j(e)){for(let r in e)mn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&mn(e[r],t,n)}return e}function hn(e,t,n,r){try{return r?e(...r):e()}catch(e){_n(e,t,n)}}function gn(e,t,n,r){if(w(e)){let i=hn(e,t,n,r);return i&&re(i)&&i.catch(e=>{_n(e,t,n)}),i}if(C(e)){let i=[];for(let a=0;a<e.length;a++)i.push(gn(e[a],t,n,r));return i}}function _n(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||p;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){Qe(),hn(a,null,10,[e,i,o]),$e();return}}vn(e,n,i,r,o)}function vn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var yn=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=yn.length;for(;t<n;){let r=t+n>>>1,i=yn[r],a=Nn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Nn(e),n=yn[yn.length-1];!n||!(e.flags&2)&&t>=Nn(n)?yn.push(e):yn.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(Pn)}function An(e){C(e)?xn.push(...e):Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),kn()}function jn(e,t,n=bn+1){for(;n<yn.length;n++){let t=yn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;yn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Mn(e){if(xn.length){let e=[...new Set(xn)].sort((e,t)=>Nn(e)-Nn(t));if(xn.length=0,Sn){Sn.push(...e);return}for(Sn=e,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pn(e){try{for(bn=0;bn<yn.length;bn++){let e=yn[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),hn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<yn.length;bn++){let e=yn[bn];e&&(e.flags&=-2)}bn=-1,yn.length=0,Mn(e),Tn=null,(yn.length||xn.length)&&Pn(e)}}var Fn=null,In=null;function Ln(e){let t=Fn;return Fn=e,In=e&&e.type.__scopeId||null,t}function Rn(e,t=Fn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&la(-1);let i=Ln(t),a;try{a=e(...n)}finally{Ln(i),r._d&&la(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function zn(e,t){if(Fn===null)return e;let n=Ga(Fn),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=p]=t[e];i&&(w(i)&&(i={mounted:i,updated:i}),i.deep&&mn(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function Bn(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&&(Qe(),gn(c,n,8,[e.el,s,e,t]),$e())}}function Vn(e,t){if(ka){let n=ka.provides,r=ka.parent&&ka.parent.provides;r===n&&(n=ka.provides=Object.create(r)),n[e]=t}}function Hn(e,t,n=!1){let r=Aa();if(r||fi){let i=fi?fi._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&&w(t)?t.call(r&&r.proxy):t}}var Un=Symbol.for(`v-scx`),Wn=()=>Hn(Un);function Gn(e,t,n){return Kn(e,t,n)}function Kn(e,t,n=p){let{immediate:r,deep:i,flush:a,once:o}=n,s=y({},n),c=t&&r||!t&&a!==`post`,l;if(Ia){if(a===`sync`){let e=Wn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=h,e.resume=h,e.pause=h,e}}let u=ka;s.call=(e,t,n)=>gn(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Ui(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():On(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=pn(e,t,s);return Ia&&(l?l.push(f):c&&f()),f}function qn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?Jn(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Na(this),s=Kn(i,a.bind(r),n);return o(),s}function Jn(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 Yn=new WeakMap,Xn=Symbol(`_vte`),Zn=e=>e.__isTeleport,Qn=e=>e&&(e.disabled||e.disabled===``),$n=e=>e&&(e.defer||e.defer===``),er=e=>typeof SVGElement<`u`&&e instanceof SVGElement,tr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,nr=(e,t)=>{let n=e&&e.to;return T(n)?t?t(n):null:n},rr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Qn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Qn(e.props),r=e.target=nr(e.props,m),a=cr(r,e,h,p);r&&(o!==`svg`&&er(r)?o=`svg`:o!==`mathml`&&tr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),sr(e,!1)))},S=e=>{let t=()=>{Yn.get(e)===t&&(Yn.delete(e),Qn(e.props)&&(b(e,_(e.el)||n,e.anchor),sr(e,!0)),x(e))};Yn.set(e,t),Ui(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),$n(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),sr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Yn.get(e);if(u){u.flags|=8,Yn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Qn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||er(p)?o=`svg`:(o===`mathml`||tr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Yi(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ir(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nr(t.props,m);e&&ir(t,e,null,l,0)}else g&&ir(t,p,h,l,1);sr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Qn(f),m=Yn.get(e);if(m&&(m.flags|=8,Yn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,p,!!i.dynamicChildren)}},move:ir,hydrate:ar};function ir(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Yn.has(e)&&(!d||Qn(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function ar(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=nr(t.props,c),h=Qn(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||cr(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||cr(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),sr(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var or=rr;function sr(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function cr(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Xn]=o,e&&(r(a,e,i),r(o,e,i)),o}var lr=Symbol(`_leaveCb`);function ur(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ur(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function dr(e,t){return w(e)?y({name:e.name},t,{setup:e}):e}function fr(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function pr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var mr=new WeakMap;function hr(e,t,n,r,i=!1){if(C(e)){e.forEach((e,a)=>hr(e,t&&(C(t)?t[a]:t),n,r,i));return}if(_r(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&hr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Ga(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===p?s.refs={}:s.refs,d=s.setupState,f=F(d),m=d===p?g:e=>pr(u,e)?!1:S(f,e),h=(e,t)=>!(t&&pr(u,t));if(l!=null&&l!==c){if(gr(t),T(l))u[l]=null,m(l)&&(d[l]=null);else if(tn(l)){let e=t;h(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(w(c))hn(c,s,12,[o,u]);else{let t=T(c),r=tn(c);if(t||r){let s=()=>{if(e.f){let n=t?m(c)?d[c]:u[c]:h(c)||!e.k?c.value:u[e.k];if(i)C(n)&&b(n,a);else if(C(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],m(c)&&(d[c]=u[c]);else{let t=[a];h(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,m(c)&&(d[c]=o)):r&&(h(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),mr.delete(e)};t.id=-1,mr.set(e,t),Ui(t,n)}else gr(e),s()}}}function gr(e){let t=mr.get(e);t&&(t.flags|=8,mr.delete(e))}_e().requestIdleCallback,_e().cancelIdleCallback;var _r=e=>!!e.type.__asyncLoader,vr=e=>e.type.__isKeepAlive;function yr(e,t){xr(e,`a`,t)}function br(e,t){xr(e,`da`,t)}function xr(e,t,n=ka){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Cr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)vr(e.parent.vnode)&&Sr(r,t,n,e),e=e.parent}}function Sr(e,t,n,r){let i=Cr(t,e,r,!0);Ar(()=>{b(r[t],i)},n)}function Cr(e,t,n=ka,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Qe();let i=Na(n),a=gn(t,n,e,r);return i(),$e(),a};return r?i.unshift(a):i.push(a),a}}var wr=e=>(t,n=ka)=>{(!Ia||e===`sp`)&&Cr(e,(...e)=>t(...e),n)},Tr=wr(`bm`),Er=wr(`m`),Dr=wr(`bu`),Or=wr(`u`),kr=wr(`bum`),Ar=wr(`um`),jr=wr(`sp`),Mr=wr(`rtg`),Nr=wr(`rtc`);function Pr(e,t=ka){Cr(`ec`,e,t)}var Fr=`components`,Ir=Symbol.for(`v-ndc`);function Lr(e){return T(e)?Rr(Fr,e,!1)||e:e||Ir}function Rr(e,t,n=!0,r=!1){let i=Fn||ka;if(i){let n=i.type;if(e===Fr){let e=Ka(n,!1);if(e&&(e===t||e===ce(t)||e===de(ce(t))))return n}let a=zr(i[e]||n[e],t)||zr(i.appContext[e],t);return!a&&r?n:a}}function zr(e,t){return e&&(e[t]||e[ce(t)]||e[de(ce(t))])}function Br(e,t,n,r){let i,a=n&&n[r],o=C(e);if(o||T(e)){let n=o&&Jt(e),r=!1,s=!1;n&&(r=!Xt(e),s=Yt(e),e=ft(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?en($t(e[n])):$t(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(D(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){if(Fn.ce||Fn.parent&&_r(Fn.parent)&&Fn.parent.ce){let e=Object.keys(n).length>0;return t!=="default"&&(n.name=t),z(),da(R,null,[ga(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),z();let o=a&&Hr(a(n)),s=n.key||o&&o.key,c=da(R,{key:(s&&!E(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Hr(e){return e.some(e=>fa(e)?!(e.type===ra||e.type===R&&!Hr(e.children)):!0)?e:null}var Ur=e=>e?Fa(e)?Ga(e):Ur(e.parent):null,Wr=y(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=>Ur(e.parent),$root:e=>Ur(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$r(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>qn.bind(e)}),Gr=(e,t)=>e!==p&&!e.__isScriptSetup&&S(e,t),Kr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Gr(r,t))return o[t]=1,r[t];else if(i!==p&&S(i,t))return o[t]=2,i[t];else if(S(a,t))return o[t]=3,a[t];else if(n!==p&&S(n,t))return o[t]=4,n[t];else Jr&&(o[t]=0)}let l=Wr[t],u,d;if(l)return t===`$attrs`&&lt(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==p&&S(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,S(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Gr(i,t)?(i[t]=n,!0):r!==p&&S(r,t)?(r[t]=n,!0):S(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==p&&s[0]!==`$`&&S(e,s)||Gr(t,s)||S(a,s)||S(r,s)||S(Wr,s)||S(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?S(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function qr(e){return C(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Jr=!0;function Yr(e){let t=$r(e),n=e.proxy,r=e.ctx;Jr=!1,t.beforeCreate&&Zr(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:x,render:S,renderTracked:ee,renderTriggered:te,errorCaptured:ne,serverPrefetch:T,expose:E,inheritAttrs:re,components:O,directives:k,filters:A}=t;if(l&&Xr(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);D(t)&&(e.data=Wt(t))}if(Jr=!0,a)for(let e in a){let t=a[e],i=U({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):h,set:!w(t)&&w(t.set)?t.set.bind(n):h});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)Qr(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Vn(t,e[t])})}u&&Zr(u,e,`c`);function j(e,t){C(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(Tr,d),j(Er,f),j(Dr,p),j(Or,m),j(yr,g),j(br,_),j(Pr,ne),j(Nr,ee),j(Mr,te),j(kr,y),j(Ar,x),j(jr,T),C(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||={};S&&e.render===h&&(e.render=S),re!=null&&(e.inheritAttrs=re),O&&(e.components=O),k&&(e.directives=k),T&&fr(e)}function Xr(e,t,n=h){C(e)&&(e=ii(e));for(let n in e){let r=e[n],i;i=D(r)?`default`in r?Hn(r.from||n,r.default,!0):Hn(r.from||n):Hn(r),tn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Zr(e,t,n){gn(C(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qr(e,t,n,r){let i=r.includes(`.`)?Jn(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Gn(i,n)}else if(w(e))Gn(i,e.bind(n));else if(D(e))if(C(e))e.forEach(e=>Qr(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Gn(i,r,e)}}function $r(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=>ei(c,e,o,!0)),ei(c,t,o)),D(t)&&a.set(t,c),c}function ei(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ei(e,a,n,!0),i&&i.forEach(t=>ei(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=ti[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var ti={data:ni,props:si,emits:si,methods:oi,computed:oi,beforeCreate:ai,created:ai,beforeMount:ai,mounted:ai,beforeUpdate:ai,updated:ai,beforeDestroy:ai,beforeUnmount:ai,destroyed:ai,unmounted:ai,activated:ai,deactivated:ai,errorCaptured:ai,serverPrefetch:ai,components:oi,directives:oi,watch:ci,provide:ni,inject:ri};function ni(e,t){return t?e?function(){return y(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function ri(e,t){return oi(ii(e),ii(t))}function ii(e){if(C(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ai(e,t){return e?[...new Set([].concat(e,t))]:t}function oi(e,t){return e?y(Object.create(null),e,t):t}function si(e,t){return e?C(e)&&C(t)?[...new Set([...e,...t])]:y(Object.create(null),qr(e),qr(t??{})):t}function ci(e,t){if(!e)return t;if(!t)return e;let n=y(Object.create(null),e);for(let r in t)n[r]=ai(e[r],t[r]);return n}function li(){return{app:null,config:{isNativeTag:g,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 ui=0;function di(e,t){return function(n,r=null){w(n)||(n=y({},n)),r!=null&&!D(r)&&(r=null);let i=li(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:ui++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Ya,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&w(e.install)?(a.add(e),e.install(c,...t)):w(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||ga(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Ga(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(gn(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=fi;fi=c;try{return e()}finally{fi=t}}};return c}}var fi=null,pi=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${ce(t)}Modifiers`]||e[`${ue(t)}Modifiers`];function mi(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||p,i=n,a=t.startsWith(`update:`),o=a&&pi(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(he)));let s,c=r[s=fe(t)]||r[s=fe(ce(t))];!c&&a&&(c=r[s=fe(ue(t))]),c&&gn(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,gn(l,e,6,i)}}var hi=new WeakMap;function gi(e,t,n=!1){let r=n?hi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=gi(e,t,!0);n&&(s=!0,y(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(D(e)&&r.set(e,null),null):(C(a)?a.forEach(e=>o[e]=null):y(o,a),D(e)&&r.set(e,o),o)}function _i(e,t){return!e||!_(t)?!1:(t=t.slice(2).replace(/Once$/,``),S(e,t[0].toLowerCase()+t.slice(1))||S(e,ue(t))||S(e,t))}function vi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Ln(e),_,y;try{if(n.shapeFlag&4){let e=i||r,t=e;_=xa(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;_=xa(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:yi(s)}}catch(t){aa.length=0,_n(t,e,1),_=ga(ra)}let b=_;if(y&&h!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(v)&&(y=bi(y,a)),b=ya(b,y,!1,!0))}return n.dirs&&(b=ya(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ur(b,n.transition),_=b,Ln(g),_}var yi=e=>{let t;for(let n in e)(n===`class`||n===`style`||_(n))&&((t||={})[n]=e[n]);return t},bi=(e,t)=>{let n={};for(let r in e)(!v(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function xi(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?Si(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ci(o,r,n)&&!_i(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?Si(r,o,l):!0:!!o;return!1}function Si(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(Ci(t,e,a)&&!_i(n,a))return!0}return!1}function Ci(e,t,n){let r=e[n],i=t[n];return n===`style`&&D(r)&&D(i)?!Oe(r,i):r!==i}function wi({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={},Ei=()=>Object.create(Ti),Di=e=>Object.getPrototypeOf(e)===Ti;function Oi(e,t,n,r=!1){let i={},a=Ei();e.propsDefaults=Object.create(null),Ai(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Gt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ki(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(_i(e.emitsOptions,o))continue;let u=t[o];if(c)if(S(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=ce(o);i[t]=ji(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Ai(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!S(t,a)&&((r=ue(a))===a||!S(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=ji(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!S(t,e))&&(delete a[e],l=!0)}l&&ut(e.attrs,`set`,``)}function Ai(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(ae(c))continue;let l=t[c],u;i&&S(i,u=ce(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:_i(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=F(n),r=s||p;for(let o=0;o<a.length;o++){let s=a[o];n[s]=ji(i,t,s,r[s],e,!S(r,s))}}return o}function ji(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=S(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&w(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Na(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===ue(n))&&(r=!0))}return r}var Mi=new WeakMap;function Ni(e,t,n=!1){let r=n?Mi:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!w(e)){let r=e=>{c=!0;let[n,r]=Ni(e,t,!0);y(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return D(e)&&r.set(e,m),m;if(C(a))for(let e=0;e<a.length;e++){let t=ce(a[e]);Pi(t)&&(o[t]=p)}else if(a)for(let e in a){let t=ce(e);if(Pi(t)){let n=a[e],r=o[t]=C(n)||w(n)?{type:n}:y({},n),i=r.type,c=!1,l=!0;if(C(i))for(let e=0;e<i.length;++e){let t=i[e],n=w(t)&&t.name;if(n===`Boolean`){c=!0;break}else n===`String`&&(l=!1)}else c=w(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||S(r,`default`))&&s.push(t)}}let l=[o,s];return D(e)&&r.set(e,l),l}function Pi(e){return e[0]!==`$`&&!ae(e)}var Fi=e=>e===`_`||e===`_ctx`||e===`$stable`,Ii=e=>C(e)?e.map(xa):[xa(e)],Li=(e,t,n)=>{if(t._n)return t;let r=Rn((...e)=>Ii(t(...e)),n);return r._c=!1,r},Ri=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Fi(n))continue;let i=e[n];if(w(i))t[n]=Li(n,i,r);else if(i!=null){let e=Ii(i);t[n]=()=>e}}},zi=(e,t)=>{let n=Ii(t);e.slots.default=()=>n},Bi=(e,t,n)=>{for(let r in t)(n||!Fi(r))&&(e[r]=t[r])},Vi=(e,t,n)=>{let r=e.slots=Ei();if(e.vnode.shapeFlag&32){let e=t._;e?(Bi(r,t,n),n&&M(r,`_`,e,!0)):Ri(t,r)}else t&&zi(e,t)},Hi=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=p;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Bi(i,t,n):(a=!t.$stable,Ri(t,i)),o=t}else t&&(zi(e,t),o={default:1});if(a)for(let e in i)!Fi(e)&&o[e]==null&&delete i[e]},Ui=ta;function Wi(e){return Gi(e)}function Gi(e,t){let n=_e();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:g=h,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&&!pa(e,t)&&(r=he(e),ue(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 na:y(e,t,n,r);break;case ra:b(e,t,n,r);break;case ia:e??x(t,n,r,o);break;case R:re(e,t,n,r,i,a,o,s,c);break;default:d&1?ee(e,t,n,r,i,a,o,s,c):d&6?O(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ye)}u!=null&&i?hr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&hr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):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,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},ee=(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(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,Ki(e,c),l,d),_&&Bn(e,null,i,`created`),ne(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ae(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Ta(p,i,e)}_&&Bn(e,null,i,`beforeMount`);let v=Ji(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Ui(()=>{try{p&&Ta(p,i,e),v&&g.enter(f),_&&Bn(e,null,i,`mounted`)}finally{}},s)},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||ea(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ne(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)v(null,e[l]=s?Sa(e[l]):xa(e[l]),t,n,r,i,a,o,s)},T=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let m=e.props||p,h=t.props||p,g;if(n&&qi(n,!1),(g=h.onVnodeBeforeUpdate)&&Ta(g,n,t,e),f&&Bn(t,e,n,`beforeUpdate`),n&&qi(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,Ki(t,i),o):s||oe(e,t,c,null,n,r,Ki(t,i),o,!1),l>0){if(l&16)D(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=m[r],s=h[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else !s&&d==null&&D(c,m,h,n,i);((g=h.onVnodeUpdated)||f)&&Ui(()=>{g&&Ta(g,n,t,e),f&&Bn(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];v(c,l,c.el&&(c.type===R||!pa(c,l)||c.shapeFlag&198)?d(c.el):n,null,r,i,a,o,!0)}},D=(e,t,n,r,i)=>{if(t!==n){if(t!==p)for(let o in t)!ae(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ae(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},re=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&Yi(e,t,!0)):oe(e,t,n,f,a,o,c,l,u)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):A(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=Oa(e,r,i);if(vr(e)&&(s.ctx.renderer=ye),La(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,j,o),!e.el){let r=s.subTree=ga(ra);b(null,r,t,n),e.placeholder=r.el}}else j(s,e,t,n,i,a,o)},A=(e,t,n)=>{let r=t.component=e.component;if(xi(e,t,n))if(r.asyncDep&&!r.asyncResolved){ie(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},j=(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=Zi(e);if(n){t&&(t.el=c.el,ie(e,t,o)),n.asyncDep.then(()=>{Ui(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;qi(e,!1),t?(t.el=c.el,ie(e,t,o)):t=c,n&&me(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&Ta(f,s,t,c),qi(e,!0);let p=vi(e),m=e.subTree;e.subTree=p,v(m,p,d(m.el),he(m),e,i,a),t.el=p.el,u===null&&wi(e,p.el),r&&Ui(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Ui(()=>Ta(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=_r(t);if(qi(e,!1),l&&me(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Ta(o,d,t),qi(e,!0),s&&xe){let t=()=>{e.subTree=vi(e),xe(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=vi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Ui(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Ui(()=>Ta(o,d,e),i)}(t.shapeFlag&256||d&&_r(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Ui(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Le(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=()=>On(u),qi(e,!0),l()},ie=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ki(e,t.props,r,n),Hi(e,t.children,n),Qe(),jn(e),$e()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ce(l,f,n,r,i,a,o,s,c);return}else if(p&256){se(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&M(l,i,a),f!==l&&u(n,f)):d&16?m&16?ce(l,f,n,r,i,a,o,s,c):M(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},se=(e,t,n,r,i,a,o,s,c)=>{e||=m,t||=m;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;f<d;f++){let r=t[f]=c?Sa(t[f]):xa(t[f]);v(e[f],r,n,null,i,a,o,s,c)}l>u?M(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ce=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?Sa(t[l]):xa(t[l]);if(pa(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?Sa(t[f]):xa(t[f]);if(pa(r,l))v(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)v(null,t[l]=c?Sa(t[l]):xa(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)ue(e[l],i,a,!0),l++;else{let p=l,h=l,g=new Map;for(l=h;l<=f;l++){let e=t[l]=c?Sa(t[l]):xa(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=f-h+1,x=!1,S=0,C=Array(b);for(l=0;l<b;l++)C[l]=0;for(l=p;l<=d;l++){let r=e[l];if(y>=b){ue(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=f;_++)if(C[_-h]===0&&pa(r,t[_])){u=_;break}u===void 0?ue(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let ee=x?Xi(C):m;for(_=ee.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1<u?f.el||$i(f):r;C[l]===0?v(null,d,n,p,i,a,o,s,c):x&&(_<0||l!==ee[_]?le(d,n,p,2):_--)}}},le=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,ye);return}if(c===R){r(s,t,n);for(let e=0;e<u.length;e++)le(u[e],t,n,a);r(e.anchor,t,n);return}if(c===ia){S(e,t,n);return}if(a!==2&&d&1&&l)if(a===0)l.persisted&&!s[lr]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),Ui(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[lr];s._isLeaving&&s[lr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},ue=(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&&(Qe(),hr(s,null,n,e,!0),$e()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!_r(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Ta(_,t,e),u&6)pe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Bn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ye,r):l&&!l.hasOnce&&(a!==R||d>0&&d&64)?M(l,t,n,!1,!0):(a===R&&d&384||!i&&u&16)&&M(c,t,n),r&&de(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Ui(()=>{_&&Ta(_,t,e),h&&Bn(e,null,t,`unmounted`),v&&(e.el=null)},n)},de=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===R){fe(n,r);return}if(t===ia){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},fe=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},pe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Qi(c),Qi(l),r&&me(r),i.stop(),a&&(a.flags|=8,ue(o,e,t,n)),s&&Ui(s,t),Ui(()=>{e.isUnmounted=!0},t)},M=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ue(e[o],t,n,r,i)},he=e=>{if(e.shapeFlag&6)return he(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[Xn];return n?f(n):t},ge=!1,ve=(e,t,n)=>{let r;e==null?t._vnode&&(ue(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ge||=(ge=!0,jn(r),Mn(),!1)},ye={p:v,um:ue,m:le,r:de,mt:k,mc:w,pc:oe,pbc:E,n:he,o:e},be,xe;return t&&([be,xe]=t(ye)),{render:ve,hydrate:be,createApp:di(ve,be)}}function Ki({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function qi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ji(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yi(e,t,n=!1){let r=e.children,i=t.children;if(C(r)&&C(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]=Sa(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Yi(t,a)),a.type===na&&(a.patchFlag===-1&&(a=i[e]=Sa(a)),a.el=t.el),a.type===ra&&!a.el&&(a.el=t.el)}}function Xi(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 Zi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zi(t)}function Qi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function $i(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?$i(t.subTree):null}var ea=e=>e.__isSuspense;function ta(e,t){t&&t.pendingBranch?C(e)?t.effects.push(...e):t.effects.push(e):An(e)}var R=Symbol.for(`v-fgt`),na=Symbol.for(`v-txt`),ra=Symbol.for(`v-cmt`),ia=Symbol.for(`v-stc`),aa=[],oa=null;function z(e=!1){aa.push(oa=e?null:[])}function sa(){aa.pop(),oa=aa[aa.length-1]||null}var ca=1;function la(e,t=!1){ca+=e,e<0&&oa&&t&&(oa.hasOnce=!0)}function ua(e){return e.dynamicChildren=ca>0?oa||m:null,sa(),ca>0&&oa&&oa.push(e),e}function B(e,t,n,r,i,a){return ua(V(e,t,n,r,i,a,!0))}function da(e,t,n,r,i){return ua(ga(e,t,n,r,i,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function pa(e,t){return e.type===t.type&&e.key===t.key}var ma=({key:e})=>e??null,ha=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||tn(e)||w(e)?{i:Fn,r:e,k:t,f:!!n}:e);function V(e,t=null,n=null,r=0,i=null,a=e===R?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ma(t),ref:t&&ha(t),scopeId:In,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:Fn};return s?(Ca(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),ca>0&&!o&&oa&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&oa.push(c),c}var ga=_a;function _a(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Ir)&&(e=ra),fa(e)){let r=ya(e,t,!0);return n&&Ca(r,n),ca>0&&!a&&oa&&(r.shapeFlag&6?oa[oa.indexOf(e)]=r:oa.push(r)),r.patchFlag=-2,r}if(qa(e)&&(e=e.__vccOpts),t){t=va(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=Ce(e)),D(n)&&(Zt(n)&&!C(n)&&(n=y({},n)),t.style=ve(n))}let o=T(e)?1:ea(e)?128:Zn(e)?64:D(e)?4:w(e)?2:0;return V(e,t,n,r,i,o,a,!0)}function va(e){return e?Zt(e)||Di(e)?y({},e):e:null}function ya(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?wa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ma(l),ref:t&&t.ref?n&&a?C(a)?a.concat(ha(t)):[a,ha(t)]:ha(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!==R?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&&ya(e.ssContent),ssFallback:e.ssFallback&&ya(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ur(u,c.clone(u)),u}function ba(e=` `,t=0){return ga(na,null,e,t)}function H(e=``,t=!1){return t?(z(),da(ra,null,e)):ga(ra,null,e)}function xa(e){return e==null||typeof e==`boolean`?ga(ra):C(e)?ga(R,null,e.slice()):fa(e)?Sa(e):ga(na,null,String(e))}function Sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ya(e)}function Ca(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(C(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ca(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Di(t)?t._ctx=Fn:r===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else w(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),r&64?(n=16,t=[ba(t)]):n=8);e.children=t,e.shapeFlag|=n}function wa(...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=Ce([t.class,r.class]));else if(e===`style`)t.style=ve([t.style,r.style]);else if(_(e)){let n=t[e],i=r[e];i&&n!==i&&!(C(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!v(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Ta(e,t,n,r=null){gn(e,t,7,[n,r])}var Ea=li(),Da=0;function Oa(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||Ea,a={uid:Da++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Pe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ni(r,i),emitsOptions:gi(r,i),emit:null,emitted:null,propsDefaults:p,inheritAttrs:r.inheritAttrs,ctx:p,data:p,props:p,attrs:p,slots:p,refs:p,setupState:p,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=mi.bind(null,a),e.ce&&e.ce(a),a}var ka=null,Aa=()=>ka||Fn,ja,Ma;{let e=_e(),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)}};ja=t(`__VUE_INSTANCE_SETTERS__`,e=>ka=e),Ma=t(`__VUE_SSR_SETTERS__`,e=>Ia=e)}var Na=e=>{let t=ka;return ja(e),e.scope.on(),()=>{e.scope.off(),ja(t)}},Pa=()=>{ka&&ka.scope.off(),ja(null)};function Fa(e){return e.vnode.shapeFlag&4}var Ia=!1;function La(e,t=!1,n=!1){t&&Ma(t);let{props:r,children:i}=e.vnode,a=Fa(e);Oi(e,r,a,t),Vi(e,i,n||t);let o=a?Ra(e,t):void 0;return t&&Ma(!1),o}function Ra(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Kr);let{setup:r}=n;if(r){Qe();let n=e.setupContext=r.length>1?Wa(e):null,i=Na(e),a=hn(r,e,0,[e.props,n]),o=re(a);if($e(),i(),(o||e.sp)&&!_r(e)&&fr(e),o){if(a.then(Pa,Pa),t)return a.then(n=>{za(e,n,t)}).catch(t=>{_n(t,e,0)});e.asyncDep=a}else za(e,a,t)}else Ha(e,t)}function za(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:D(t)&&(e.setupState=on(t)),Ha(e,n)}var Ba,Va;function Ha(e,t,n){let r=e.type;if(!e.render){if(!t&&Ba&&!r.render){let t=r.template||$r(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Ba(t,y(y({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||h,Va&&Va(e)}{let t=Na(e);Qe();try{Yr(e)}finally{$e(),t()}}}var Ua={get(e,t){return lt(e,`get`,``),e[t]}};function Wa(e){return{attrs:new Proxy(e.attrs,Ua),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ga(e){return e.exposed?e.exposeProxy||=new Proxy(on(Qt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wr)return Wr[n](e)},has(e,t){return t in e||t in Wr}}):e.proxy}function Ka(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function qa(e){return w(e)&&`__vccOpts`in e}var U=(e,t)=>cn(e,t,Ia);function Ja(e,t,n){try{la(-1);let r=arguments.length;return r===2?D(t)&&!C(t)?fa(t)?ga(e,null,[t]):ga(e,t):ga(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fa(n)&&(n=[n]),ga(e,t,n))}finally{la(1)}}var Ya=`3.5.38`,Xa=void 0,Za=typeof window<`u`&&window.trustedTypes;if(Za)try{Xa=Za.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Qa=Xa?e=>Xa.createHTML(e):e=>e,$a=`http://www.w3.org/2000/svg`,eo=`http://www.w3.org/1998/Math/MathML`,to=typeof document<`u`?document:null,no=to&&to.createElement(`template`),ro={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`?to.createElementNS($a,e):t===`mathml`?to.createElementNS(eo,e):n?to.createElement(e,{is:n}):to.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>to.createTextNode(e),createComment:e=>to.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>to.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{no.innerHTML=Qa(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=no.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]}},io=Symbol(`_vtc`);function ao(e,t,n){let r=e[io];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var oo=Symbol(`_vod`),so=Symbol(`_vsh`),co={name:`show`,beforeMount(e,{value:t},{transition:n}){e[oo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):lo(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),lo(e,!0),r.enter(e)):r.leave(e,()=>{lo(e,!1)}):lo(e,t))},beforeUnmount(e,{value:t}){lo(e,t)}};function lo(e,t){e.style.display=t?e[oo]:`none`,e[so]=!t}var uo=Symbol(``),fo=/(?:^|;)\s*display\s*:/;function po(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ho(r,t,``)}else for(let e in t)n[e]??ho(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ho(r,i,``):yo(e,i,!T(t)&&t?t[i]:void 0,o)||ho(r,i,o)}}else if(i){if(t!==n){let e=r[uo];e&&(n+=`;`+e),r.cssText=n,a=fo.test(n)}}else t&&e.removeAttribute(`style`);oo in e&&(e[oo]=a?r.display:``,e[so]&&(r.display=`none`))}var mo=/\s*!important$/;function ho(e,t,n){if(C(n))n.forEach(n=>ho(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=vo(e,t);mo.test(n)?e.setProperty(ue(r),n.replace(mo,``),`important`):e[r]=n}}var go=[`Webkit`,`Moz`,`ms`],_o={};function vo(e,t){let n=_o[t];if(n)return n;let r=ce(t);if(r!==`filter`&&r in e)return _o[t]=r;r=de(r);for(let n=0;n<go.length;n++){let i=go[n]+r;if(i in e)return _o[t]=i}return t}function yo(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&T(r)&&n===r}var bo=`http://www.w3.org/1999/xlink`;function xo(e,t,n,r,i,a=Te(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(bo,t.slice(6,t.length)):e.setAttributeNS(bo,t,n):n==null||a&&!Ee(n)?e.removeAttribute(t):e.setAttribute(t,a?``:E(n)?String(n):n)}function So(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Qa(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=Ee(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 Co(e,t,n,r){e.addEventListener(t,n,r)}function wo(e,t,n,r){e.removeEventListener(t,n,r)}var To=Symbol(`_vei`);function Eo(e,t,n,r,i=null){let a=e[To]||(e[To]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Oo(t);r?Co(e,n,a[t]=Mo(r,i),s):o&&(wo(e,n,o,s),a[t]=void 0)}}var Do=/(?:Once|Passive|Capture)$/;function Oo(e){let t;if(Do.test(e)){t={};let n;for(;n=e.match(Do);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):ue(e.slice(2)),t]}var ko=0,Ao=Promise.resolve(),jo=()=>ko||=(Ao.then(()=>ko=0),Date.now());function Mo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(C(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&&gn(e,t,5,a)}}else gn(r,t,5,[e])};return n.value=e,n.attached=jo(),n}var No=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Po=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?ao(e,r,o):t===`style`?po(e,n,r):_(t)?v(t)||Eo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Fo(e,t,r,o))?(So(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&xo(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Io(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?So(e,ce(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),xo(e,t,r,o))};function Fo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&No(t)&&w(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 No(t)&&T(n)?!1:t in e}function Io(e,t){let n=e._def.props;if(!n)return!1;let r=ce(t);return Array.isArray(n)?n.some(e=>ce(e)===r):Object.keys(n).some(e=>ce(e)===r)}var Lo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return C(t)?e=>me(t,e):t};function Ro(e){e.target.composing=!0}function zo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Bo=Symbol(`_assign`);function Vo(e,t,n){return t&&(e=e.trim()),n&&(e=he(e)),e}var Ho={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Bo]=Lo(i);let a=r||i.props&&i.props.type===`number`;Co(e,t?`change`:`input`,t=>{t.target.composing||e[Bo](Vo(e.value,n,a))}),(n||a)&&Co(e,`change`,()=>{e.value=Vo(e.value,n,a)}),t||(Co(e,`compositionstart`,Ro),Co(e,`compositionend`,zo),Co(e,`change`,zo))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Bo]=Lo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?he(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Uo={deep:!0,created(e,t,n){e[Bo]=Lo(n),Co(e,`change`,()=>{let t=e._modelValue,n=Jo(e),r=e.checked,i=e[Bo];if(C(t)){let e=ke(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(te(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Yo(e,r))})},mounted:Wo,beforeUpdate(e,t,n){e[Bo]=Lo(n),Wo(e,t,n)}};function Wo(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(C(t))i=ke(t,r.props.value)>-1;else if(te(t))i=t.has(r.props.value);else{if(t===n)return;i=Oe(t,Yo(e,!0))}e.checked!==i&&(e.checked=i)}var Go={created(e,{value:t},n){e.checked=Oe(t,n.props.value),e[Bo]=Lo(n),Co(e,`change`,()=>{e[Bo](Jo(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Bo]=Lo(r),t!==n&&(e.checked=Oe(t,r.props.value))}},Ko={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=te(t);Co(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?he(Jo(e)):Jo(e));e[Bo](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,En(()=>{e._assigning=!1})}),e[Bo]=Lo(r)},mounted(e,{value:t}){qo(e,t)},beforeUpdate(e,t,n){e[Bo]=Lo(n)},updated(e,{value:t}){e._assigning||qo(e,t)}};function qo(e,t){let n=e.multiple,r=C(t);if(!(n&&!r&&!te(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Jo(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=ke(t,o)>-1}else a.selected=t.has(o);else if(Oe(Jo(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return`_value`in e?e._value:e.value}function Yo(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Xo=[`ctrl`,`shift`,`alt`,`meta`],Zo={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Xo.some(n=>e[`${n}Key`]&&!t.includes(n))},Qo=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Zo[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},$o=y({patchProp:Po},ro),es;function ts(){return es||=Wi($o)}var ns=((...e)=>{let t=ts().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=is(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,rs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function rs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function is(e){return T(e)?document.querySelector(e):e}var as=[`aria-pressed`],os=dr({__name:`FilterChip`,props:{active:{type:Boolean},label:{},count:{}},emits:[`click`],setup(e){return(t,n)=>(z(),B(`button`,{type:`button`,"aria-pressed":e.active,class:Ce([`chip`,{active:e.active}]),onClick:n[0]||=e=>t.$emit(`click`)},[ba(N(e.label),1),e.count===void 0?H(``,!0):(z(),B(R,{key:0},[ba(` (`+N(e.count)+`) `,1)],64))],10,as))}}),ss=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},cs=ss(os,[[`__scopeId`,`data-v-0d423d77`]]),ls={class:`sidebar`},us={class:`sidebar-header`},ds={class:`filters`},fs={key:0,class:`state`},ps={key:1,class:`state error`},ms={key:2,class:`state`},hs={key:3,class:`state`},gs={key:4,class:`list`},_s=[`title`,`onClick`],vs={class:`item-title`},ys={key:0,class:`spinner`,title:`Claude is working`,"aria-label":`Claude is working`},bs={class:`item-time`},xs=ss(dr({__name:`Sidebar`,props:{sessions:{},loading:{type:Boolean},error:{},activeId:{},filter:{}},emits:[`select`,`new`,`toggle-layout`,`refresh`,`update:filter`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.sessions.filter(e=>e.waiting).length),a=U(()=>n.filter===`unread`?n.sessions.filter(e=>e.waiting):n.sessions);function o(e){let t=Date.now()-e,n=Math.round(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.round(n/60);return r<24?`${r}h ago`:`${Math.round(r/24)}d ago`}return(t,s)=>(z(),B(`aside`,ls,[V(`div`,us,[s[6]||=V(`span`,{class:`heading`},`Sessions`,-1),V(`button`,{class:`icon-btn`,title:`Switch to horizontal tabs`,"aria-label":`Switch to horizontal tabs`,onClick:s[0]||=e=>r(`toggle-layout`)},[...s[5]||=[V(`span`,{class:`material-symbols-outlined`},`toolbar`,-1)]])]),V(`button`,{class:`new-btn`,onClick:s[1]||=e=>r(`new`)},[...s[7]||=[V(`span`,{class:`material-symbols-outlined`},`add`,-1),ba(` New session`,-1)]]),V(`div`,ds,[ga(cs,{label:`All`,active:e.filter===`all`,onClick:s[2]||=e=>r(`update:filter`,`all`)},null,8,[`active`]),ga(cs,{label:`Unread`,count:i.value,active:e.filter===`unread`,onClick:s[3]||=e=>r(`update:filter`,`unread`)},null,8,[`count`,`active`]),V(`button`,{class:`icon-btn sort-btn`,title:`Sort by most recent`,"aria-label":`Sort by most recent`,onClick:s[4]||=e=>r(`refresh`)},[...s[8]||=[V(`span`,{class:`material-symbols-outlined`},`refresh`,-1)]])]),e.loading?(z(),B(`div`,fs,`Loading…`)):e.error?(z(),B(`div`,ps,N(e.error),1)):e.sessions.length===0?(z(),B(`div`,ms,`No sessions yet`)):a.value.length===0?(z(),B(`div`,hs,`No unread sessions`)):(z(),B(`ul`,gs,[(z(!0),B(R,null,Br(a.value,e=>(z(),B(`li`,{key:e.id,class:Ce([`item`,{active:e.id===n.activeId,waiting:e.waiting}]),title:e.title,onClick:t=>r(`select`,e.id)},[V(`span`,vs,[e.working&&!e.waiting&&e.id!==n.activeId?(z(),B(`span`,ys)):H(``,!0),ba(` `+N(e.title),1)]),V(`span`,bs,N(o(e.mtime)),1)],10,_s))),128))]))]))}}),[[`__scopeId`,`data-v-2cfc50b4`]]),Ss={class:`tabbar`},Cs={class:`filters`},ws={class:`tabs`},Ts=[`title`,`aria-current`,`onClick`],Es={key:0,class:`spinner`,title:`Claude is working`,"aria-label":`Claude is working`},Ds={class:`tab-title`},Os={key:1,class:`unread-dot`,"aria-label":`Unread`},ks={class:`actions`},As=8,js=ss(dr({__name:`SessionTabBar`,props:{sessions:{},activeId:{},filter:{}},emits:[`select`,`new`,`toggle-layout`,`refresh`,`update:filter`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.sessions.filter(e=>e.waiting).length),a=U(()=>(n.filter===`unread`?n.sessions.filter(e=>e.waiting):n.sessions).slice(0,As));return(t,o)=>(z(),B(`div`,Ss,[V(`button`,{class:`new-btn`,title:`New session`,"aria-label":`New session`,onClick:o[0]||=e=>r(`new`)},[...o[5]||=[V(`span`,{class:`material-symbols-outlined`},`add`,-1)]]),V(`div`,Cs,[ga(cs,{label:`All`,active:e.filter===`all`,onClick:o[1]||=e=>r(`update:filter`,`all`)},null,8,[`active`]),ga(cs,{label:`Unread`,count:i.value,active:e.filter===`unread`,onClick:o[2]||=e=>r(`update:filter`,`unread`)},null,8,[`count`,`active`]),V(`button`,{class:`icon-btn sort-btn`,title:`Sort by most recent`,"aria-label":`Sort by most recent`,onClick:o[3]||=e=>r(`refresh`)},[...o[6]||=[V(`span`,{class:`material-symbols-outlined`},`refresh`,-1)]])]),V(`div`,ws,[(z(!0),B(R,null,Br(a.value,e=>(z(),B(`button`,{key:e.id,class:Ce([`tab`,{active:e.id===n.activeId,waiting:e.waiting}]),title:e.title,"aria-current":e.id===n.activeId?`page`:void 0,onClick:t=>r(`select`,e.id)},[e.working&&!e.waiting&&e.id!==n.activeId?(z(),B(`span`,Es)):H(``,!0),V(`span`,Ds,N(e.title),1),e.waiting&&e.id!==n.activeId?(z(),B(`span`,Os)):H(``,!0)],10,Ts))),128))]),V(`div`,ks,[V(`button`,{class:`icon-btn`,title:`Switch to vertical sidebar`,"aria-label":`Switch to vertical sidebar`,onClick:o[4]||=e=>r(`toggle-layout`)},[...o[7]||=[V(`span`,{class:`material-symbols-outlined`},`dock_to_right`,-1)]])])]))}}),[[`__scopeId`,`data-v-0640df70`]]),Ms=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,Ps=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},Fs=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ns(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ms(t,n,i),i},W=(e,t)=>(n,r)=>t(n,r,e),Is=`Terminal input`,Ls={get:()=>Is,set:e=>Is=e},Rs=`Too much output to announce, navigate to rows manually to read`,zs={get:()=>Rs,set:e=>Rs=e};function Bs(e){return e.replace(/\r?\n/g,`\r`)}function Vs(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function Hs(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function Us(e,t,n,r){e.stopPropagation(),e.clipboardData&&Ws(e.clipboardData.getData(`text/plain`),t,n,r)}function Ws(e,t,n,r){e=Bs(e),e=Vs(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function Gs(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function Ks(e,t,n,r,i){Gs(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function qs(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Js(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var Ys=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},Xs=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},Zs=``,Qs=` `,$s=class e{constructor(){this.fg=0,this.bg=0,this.extended=new ec}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ec=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},tc=class e extends $s{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ec,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?qs(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},nc=`di$target`,rc=`di$dependencies`,ic=new Map;function ac(e){return e[rc]||[]}function oc(e){if(ic.has(e))return ic.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);sc(t,e,r)};return t._id=e,ic.set(e,t),t}function sc(e,t,n){t[nc]===t?t[rc].push({id:e,index:n}):(t[rc]=[{id:e,index:n}],t[nc]=t)}var cc=oc(`BufferService`),lc=oc(`CoreMouseService`),uc=oc(`CoreService`),dc=oc(`CharsetService`),fc=oc(`InstantiationService`),pc=oc(`LogService`),mc=oc(`OptionsService`),hc=oc(`OscLinkService`),gc=oc(`UnicodeService`),_c=oc(`DecorationService`),vc=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new tc,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):yc(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};vc=Fs([W(0,cc),W(1,mc),W(2,hc)],vc);function yc(e,t){if(confirm(`Do you want to navigate to ${t}?
2
2
 
3
3
  WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var bc=oc(`CharSizeService`),xc=oc(`CoreBrowserService`),Sc=oc(`MouseService`),Cc=oc(`RenderService`),wc=oc(`SelectionService`),Tc=oc(`CharacterJoinerService`),Ec=oc(`ThemeService`),Dc=oc(`LinkProviderService`),Oc=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Pc.isErrorNoTelemetry(e)?new Pc(e.message+`
4
4
 
@@ -35,7 +35,7 @@ ${s.join(`
35
35
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===Lh+1&&(this._liveRegion.textContent+=zs.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(!(!a||!o)){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform=``;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};zh=Fs([W(1,fc),W(2,xc),W(3,Cc)],zh);var Bh=class extends G{constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new K),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new K),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(il(()=>{nl(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(q(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(q(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(q(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(q(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e<n.length;e++){let t=n[e];if(t.classList.contains(`xterm`))break;if(t.classList.contains(`xterm-hover`))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(e=>{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let t=0;t<i.length;t++){let r=i[t],a=r.link.range.start.y<e?0:r.link.range.start.x,o=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;t<e;t++)(!this._activeProviderReplies.has(t)||this._activeProviderReplies.get(t))&&(i=!0);if(!i&&r){let e=r.find(e=>this._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find(e=>this._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&Vh(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,nl(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};Bh=Fs([W(1,Sc),W(2,Cc),W(3,cc),W(4,Dc)],Bh);function Vh(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var Hh=class extends Eh{constructor(e={}){super(e),this._linkifier=this._register(new sl),this.browser=tp,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new sl),this._onCursorMove=this._register(new K),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new K),this.onKey=this._onKey.event,this._onRender=this._register(new K),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new K),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new K),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new K),this.onBell=this._onBell.event,this._onFocus=this._register(new K),this._onBlur=this._register(new K),this._onA11yCharEmitter=this._register(new K),this._onA11yTabEmitter=this._register(new K),this._onWillOpen=this._register(new K),this._setup(),this._decorationService=this._instantiationService.createInstance(Nh),this._instantiationService.setService(_c,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Xf),this._instantiationService.setService(Dc,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(vc)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(_l.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(_l.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(_l.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(_l.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(il(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=vf.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${J.ESC}]${n};${uh(r)}${uf.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=_f.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=_f.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(zh,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(q(this.element,`copy`,e=>{this.hasSelection()&&Hs(e,this._selectionService)}));let e=e=>Us(e,this.textarea,this.coreService,this.optionsService);this._register(q(this.textarea,`paste`,e)),this._register(q(this.element,`paste`,e)),ap?this._register(q(this.element,`mousedown`,e=>{e.button===2&&Ks(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(q(this.element,`contextmenu`,e=>{Ks(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),pp&&this._register(q(this.element,`auxclick`,e=>{e.button===1&&Gs(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(q(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(q(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(q(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(q(this.textarea,`compositionstart`,()=>this._compositionHelper.compositionstart())),this._register(q(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(q(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(q(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(q(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,Ls.get()),mp||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(Jf,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(xc,this._coreBrowserService),this._register(q(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(q(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Wf,this._document,this._helperContainer),this._instantiationService.setService(bc,this._charSizeService),this._themeService=this._instantiationService.createInstance(Qp),this._instantiationService.setService(Ec,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Tf),this._instantiationService.setService(Tc,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(bp,this.rows,this.screenElement)),this._instantiationService.setService(Cc,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(df,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance($f),this._instantiationService.setService(Sc,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(Bh,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(tf,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Hp,this.element,this.screenElement,r)),this._instantiationService.setService(wc,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(_l.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(nf,this.screenElement)),this._register(q(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(zh,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(cf,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRuler`,e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(cf,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Uf,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&e._customWheelEventHandler(t)===!1)return!1;let n=t.deltaY;if(n===0||e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;i=n<0?0:1,r=4;break;default:return!1}return i===void 0||r===void 0||r>4?!1:e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this._register(this.coreMouseService.onProtocolChange(e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),e&8?r.mousemove||=(t.addEventListener(`mousemove`,i.mousemove),i.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),e&16?r.wheel||=(t.addEventListener(`wheel`,i.wheel,{passive:!1}),i.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),e&2?r.mouseup||=i.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),e&4?r.mousedrag||=i.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(q(t,`mousedown`,e=>{if(e.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(e)))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)})),this._register(q(t,`wheel`,t=>{if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(t)===!1)return!1;if(!this.buffer.hasScrollback){if(t.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(t,!0);let n=J.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this.coreService.triggerDataEvent(n,!0),this.cancel(t,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Ws(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key===`Dead`||e.key===`AltGraph`)&&(this._unprocessedDeadKey=!0);let n=Oh(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===J.ETX||n.key===J.CR)&&(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(Uh(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(om));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains(`focus`)?this.coreService.triggerDataEvent(J.ESC+`[I`):this.coreService.triggerDataEvent(J.ESC+`[O`)}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.ESC}[4;${t};${e}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.ESC}[6;${r};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function Uh(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var Wh=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw Error(`Could not dispose an addon that has not been loaded`);e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},Gh=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new tc)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},Kh=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new Gh(t)}getNullCell(){return new tc}},qh=class extends G{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new K),this.onBufferChange=this._onBufferChange.event,this._normal=new Kh(this._core.buffers.normal,`normal`),this._alternate=new Kh(this._core.buffers.alt,`alternate`),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error(`Active buffer is neither normal nor alternate`)}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Jh=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},Yh=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},Xh=[`cols`,`rows`],Zh=0,Qh=class extends G{constructor(e){super(),this._core=this._register(new Hh(e)),this._addonManager=this._register(new Wh),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(Xh.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error(`You must set the allowProposedApi option to true to use proposed API`)}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||=new Jh(this._core),this._parser}get unicode(){return this._checkProposedApi(),new Yh(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||=this._register(new qh(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.coreMouseService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`;break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
36
36
  `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Ls.get()},set promptLabel(e){Ls.set(e)},get tooMuchOutput(){return zs.get()},set tooMuchOutput(e){zs.set(e)}}}_verifyIntegers(...e){for(Zh of e)if(Zh===1/0||isNaN(Zh)||Zh%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(Zh of e)if(Zh&&(Zh===1/0||isNaN(Zh)||Zh%1!=0||Zh<0))throw Error(`This API only accepts positive integers`)}},$h=2,eg=1,tg=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max($h,Math.floor(u/e.css.cell.width)),rows:Math.max(eg,Math.floor(l/e.css.cell.height))}}},ng=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=ig.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function rg(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var ig=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!rg(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},ag=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function og(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var sg=class{constructor(e=og,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||ag;this._linkProvider=this._terminal.registerLinkProvider(new ng(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}},cg={class:`terminal-wrapper`},lg={class:`header`},ug=ss(dr({__name:`Terminal`,props:{sessionId:{},connectKey:{}},emits:[`session`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=I(),o=I(`connecting`),s,c,l=null,u;function d(){l&&l.close(),s.reset(),o.value=`connecting`;let e=location.protocol===`https:`?`wss:`:`ws:`,t=r.sessionId?`?session=${encodeURIComponent(r.sessionId)}`:``,n=new WebSocket(`${e}//${location.host}/ws${t}`);l=n,n.onopen=()=>{n===l&&(o.value=`connected`,n.send(JSON.stringify({type:`resize`,cols:s.cols,rows:s.rows})))},n.onmessage=e=>{if(n!==l)return;let t=JSON.parse(e.data);t.type===`output`?s.write(t.data):t.type===`session`?i(`session`,t.id):t.type===`exit`&&(s.write(`\r
37
37
  \x1B[33m[session ended]\x1B[0m\r
38
- `),o.value=`disconnected`)},n.onclose=()=>{n===l&&(o.value=`disconnected`)}}Er(()=>{s=new Qh({cursorBlink:!0,fontSize:14,fontFamily:`'JetBrains Mono', 'Fira Code', 'Menlo', monospace`,theme:{background:`#1a1a2e`,foreground:`#e0e0e0`,cursor:`#e0e0e0`,selectionBackground:`#3a3a5e`}}),c=new tg,s.loadAddon(c),s.loadAddon(new sg);let e=a.value;e&&(s.open(e),c.fit(),s.onData(e=>{l&&l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:`input`,data:e}))}),u=new ResizeObserver(()=>{c.fit(),l&&l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:`resize`,cols:s.cols,rows:s.rows}))}),u.observe(e),d(),s.focus())}),Gn(()=>r.connectKey,()=>{d(),s.focus()});function f(e){let t=l;return!t||t.readyState!==WebSocket.OPEN?!1:(t.send(JSON.stringify({type:`input`,data:e})),setTimeout(()=>{t===l&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:`input`,data:`\r`}))},60),!0)}return t({submitText:f}),Ar(()=>{u?.disconnect(),l?.close(),s?.dispose()}),(e,t)=>(z(),B(`div`,cg,[V(`div`,lg,[t[0]||=V(`span`,{class:`title`},`mulmoterminal`,-1),V(`span`,{class:Ce([`status`,o.value])},N(o.value),3)]),V(`div`,{ref_key:`terminalRef`,ref:a,class:`terminal-container`},null,512)]))}}),[[`__scopeId`,`data-v-0a7d9e9b`]]),dg=Object.create(null);dg.open=`0`,dg.close=`1`,dg.ping=`2`,dg.pong=`3`,dg.message=`4`,dg.upgrade=`5`,dg.noop=`6`;var fg=Object.create(null);Object.keys(dg).forEach(e=>{fg[dg[e]]=e});var pg={type:`error`,data:`parser error`},mg=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,hg=typeof ArrayBuffer==`function`,gg=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_g=({type:e,data:t},n,r)=>mg&&t instanceof Blob?n?r(t):vg(t,r):hg&&(t instanceof ArrayBuffer||gg(t))?n?r(t):vg(new Blob([t]),r):r(dg[e]+(t||``)),vg=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function yg(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var bg;function xg(e,t){if(mg&&e.data instanceof Blob)return e.data.arrayBuffer().then(yg).then(t);if(hg&&(e.data instanceof ArrayBuffer||gg(e.data)))return t(yg(e.data));_g(e,!1,e=>{bg||=new TextEncoder,t(bg.encode(e))})}var Sg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Cg=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)Cg[Sg.charCodeAt(e)]=e;var wg=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=Cg[e.charCodeAt(r)],o=Cg[e.charCodeAt(r+1)],s=Cg[e.charCodeAt(r+2)],c=Cg[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Tg=typeof ArrayBuffer==`function`,Eg=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:Og(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:Dg(e.substring(1),t)}:fg[n]?e.length>1?{type:fg[n],data:e.substring(1)}:{type:fg[n]}:pg},Dg=(e,t)=>Tg?Og(wg(e),t):{base64:!0,data:e},Og=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},kg=``,Ag=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{_g(e,!1,e=>{r[a]=e,++i===n&&t(r.join(kg))})})},jg=(e,t)=>{let n=e.split(kg),r=[];for(let e=0;e<n.length;e++){let i=Eg(n[e],t);if(r.push(i),i.type===`error`)break}return r};function Mg(){return new TransformStream({transform(e,t){xg(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var Ng;function Pg(e){return e.reduce((e,t)=>e+t.length,0)}function Fg(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Ig(e,t){Ng||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(Pg(n)<1)break;let e=Fg(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(Pg(n)<2)break;let e=Fg(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(Pg(n)<8)break;let e=Fg(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(pg);break}i=a*2**32+t.getUint32(4),r=3}else{if(Pg(n)<i)break;let e=Fg(n,i);s.enqueue(Eg(a?e:Ng.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(pg);break}}}})}function Lg(e){if(e)return Rg(e)}function Rg(e){for(var t in Lg.prototype)e[t]=Lg.prototype[t];return e}Lg.prototype.on=Lg.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Lg.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Lg.prototype.off=Lg.prototype.removeListener=Lg.prototype.removeAllListeners=Lg.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Lg.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Lg.prototype.emitReserved=Lg.prototype.emit,Lg.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Lg.prototype.hasListeners=function(e){return!!this.listeners(e).length};var zg=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Bg=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),Vg=`arraybuffer`;function Hg(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var Ug=Bg.setTimeout,Wg=Bg.clearTimeout;function Gg(e,t){t.useNativeTimers?(e.setTimeoutFn=Ug.bind(Bg),e.clearTimeoutFn=Wg.bind(Bg)):(e.setTimeoutFn=Bg.setTimeout.bind(Bg),e.clearTimeoutFn=Bg.clearTimeout.bind(Bg))}var Kg=1.33;function qg(e){return typeof e==`string`?Jg(e):Math.ceil((e.byteLength||e.size)*Kg)}function Jg(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Yg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Xg(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Zg(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Qg=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},$g=class extends Lg{constructor(e){super(),this.writable=!1,Gg(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Qg(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=Eg(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Xg(e);return t.length?`?`+t:``}},e_=class extends $g{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){jg(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,Ag(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Yg()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},t_=!1;try{t_=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var n_=t_;function r_(){}var i_=class extends e_{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},a_=class e extends Lg{constructor(e,t,n){super(),this.createRequest=e,Gg(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Hg(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=r_,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(a_.requestsCount=0,a_.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,o_);else if(typeof addEventListener==`function`){let e=`onpagehide`in Bg?`pagehide`:`unload`;addEventListener(e,o_,!1)}}function o_(){for(let e in a_.requests)a_.requests.hasOwnProperty(e)&&a_.requests[e].abort()}var s_=(function(){let e=l_({xdomain:!1});return e&&e.responseType!==null})(),c_=class extends i_{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=s_&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new a_(l_,this.uri(),e)}};function l_(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||n_))return new XMLHttpRequest}catch{}if(!t)try{return new Bg[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var u_=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,d_=class extends $g{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=u_?{}:Hg(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;_g(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&zg(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Yg()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},f_=Bg.WebSocket||Bg.MozWebSocket,p_={websocket:class extends d_{createSocket(e,t,n){return u_?new f_(e,t,n):t?new f_(e,t):new f_(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends $g{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Ig(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Mg();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&zg(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:c_},m_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,h_=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function g_(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=m_.exec(e||``),a={},o=14;for(;o--;)a[h_[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=__(a,a.path),a.queryKey=v_(a,a.query),a}function __(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function v_(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var y_=typeof addEventListener==`function`&&typeof removeEventListener==`function`,b_=[];y_&&addEventListener(`offline`,()=>{b_.forEach(e=>e())},!1);var x_=class e extends Lg{constructor(e,t){if(super(),this.binaryType=Vg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=g_(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=g_(t.host).host);Gg(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Zg(this.opts.query)),y_&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},b_.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=qg(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zg(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),y_&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=b_.indexOf(this._offlineEventListener);e!==-1&&b_.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};x_.protocol=4;var S_=class extends x_{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;x_.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;x_.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},C_=class extends S_{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>p_[e]).filter(e=>!!e)),super(e,n)}};C_.protocol;function w_(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=g_(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var T_=typeof ArrayBuffer==`function`,E_=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D_=Object.prototype.toString,O_=typeof Blob==`function`||typeof Blob<`u`&&D_.call(Blob)===`[object BlobConstructor]`,k_=typeof File==`function`||typeof File<`u`&&D_.call(File)===`[object FileConstructor]`;function A_(e){return T_&&(e instanceof ArrayBuffer||E_(e))||O_&&e instanceof Blob||k_&&e instanceof File}function j_(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(j_(e[t]))return!0;return!1}if(A_(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return j_(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&j_(e[t]))return!0;return!1}function M_(e){let t=[],n=e.data,r=e;return r.data=N_(n,t),r.attachments=t.length,{packet:r,buffers:t}}function N_(e,t){if(!e)return e;if(A_(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=N_(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=N_(e[r],t));return n}return e}function P_(e,t){return e.data=F_(e.data,t),delete e.attachments,e}function F_(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=F_(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=F_(e[n],t));return e}var I_=c({Decoder:()=>z_,Encoder:()=>R_,PacketType:()=>Z,isPacketValid:()=>K_,protocol:()=>5}),L_=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Z;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Z||={});var R_=class{constructor(e){this.replacer=e}encode(e){return(e.type===Z.EVENT||e.type===Z.ACK)&&j_(e)?this.encodeAsBinary({type:e.type===Z.EVENT?Z.BINARY_EVENT:Z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Z.BINARY_EVENT||e.type===Z.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=M_(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},z_=class e extends Lg{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Z.BINARY_EVENT;n||t.type===Z.BINARY_ACK?(t.type=n?Z.EVENT:Z.ACK,this.reconstructor=new B_(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(A_(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Z[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Z.BINARY_EVENT||r.type===Z.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!H_(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Z.CONNECT:return W_(t);case Z.DISCONNECT:return t===void 0;case Z.CONNECT_ERROR:return typeof t==`string`||W_(t);case Z.EVENT:case Z.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&L_.indexOf(t[0])===-1);case Z.ACK:case Z.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},B_=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=P_(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function V_(e){return typeof e==`string`}var H_=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function U_(e){return e===void 0||H_(e)}function W_(e){return Object.prototype.toString.call(e)===`[object Object]`}function G_(e,t){switch(e){case Z.CONNECT:return t===void 0||W_(t);case Z.DISCONNECT:return t===void 0;case Z.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&L_.indexOf(t[0])===-1);case Z.ACK:return Array.isArray(t);case Z.CONNECT_ERROR:return typeof t==`string`||W_(t);default:return!1}}function K_(e){return V_(e.nsp)&&U_(e.id)&&G_(e.type,e.data)}function q_(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var J_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Y_=class extends Lg{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[q_(e,`open`,this.onopen.bind(this)),q_(e,`packet`,this.onpacket.bind(this)),q_(e,`error`,this.onerror.bind(this)),q_(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(J_.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Z.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Z.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Z.EVENT:case Z.BINARY_EVENT:this.onevent(e);break;case Z.ACK:case Z.BINARY_ACK:this.onack(e);break;case Z.DISCONNECT:this.ondisconnect();break;case Z.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Z.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Z.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function X_(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}X_.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},X_.prototype.reset=function(){this.attempts=0},X_.prototype.setMin=function(e){this.ms=e},X_.prototype.setMax=function(e){this.max=e},X_.prototype.setJitter=function(e){this.jitter=e};var Z_=class extends Lg{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,Gg(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new X_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||I_;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new C_(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=q_(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=q_(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(q_(e,`ping`,this.onping.bind(this)),q_(e,`data`,this.ondata.bind(this)),q_(e,`error`,this.onerror.bind(this)),q_(e,`close`,this.onclose.bind(this)),q_(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){zg(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Y_(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Q_={};function $_(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=w_(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Q_[i]&&a in Q_[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Z_(r,t):(Q_[i]||(Q_[i]=new Z_(r,t)),c=Q_[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign($_,{Manager:Z_,Socket:Y_,io:$_,connect:$_});var ev=null,tv=new Map;function nv(){if(ev)return ev;let e=$_({path:`/ws/pubsub`,transports:[`websocket`]});return e.on(`connect`,()=>{for(let t of tv.keys())e.emit(`subscribe`,t)}),e.on(`data`,e=>{let t=tv.get(e.channel);if(t)for(let n of t)n(e.data)}),ev=e,e}function rv(){function e(e,t){let n=tv.get(e);n||(n=new Set,tv.set(e,n)),n.add(t);let r=nv();return r.connected&&r.emit(`subscribe`,e),()=>{let n=tv.get(e);n&&(n.delete(t),n.size===0&&(tv.delete(e),ev?.connected&&ev.emit(`unsubscribe`,e)))}}return{subscribe:e}}var iv={packages:[`@mulmoclaude/markdown-plugin`,`@mulmoclaude/form-plugin`,`@mulmochat-plugin/generate-image`],local:[]},av=Object.create,ov=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,cv=Object.getOwnPropertyNames,lv=Object.getPrototypeOf,uv=Object.prototype.hasOwnProperty,dv=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),fv=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=cv(t),a=0,o=i.length,s;a<o;a++)s=i[a],!uv.call(e,s)&&s!==n&&ov(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=sv(t,s))||r.enumerable});return e},pv=(e,t,n)=>(n=e==null?{}:av(lv(e)),fv(t||!e||!e.__esModule?ov(n,`default`,{value:e,enumerable:!0}):n,e)),mv=dv(((e,t)=>{function n(e){return e==null}function r(e){return typeof e==`object`&&!!e}function i(e){return Array.isArray(e)?e:n(e)?[]:[e]}function a(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function o(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function s(e){return e===0&&1/e==-1/0}t.exports.isNothing=n,t.exports.isObject=r,t.exports.toArray=i,t.exports.repeat=o,t.exports.isNegativeZero=s,t.exports.extend=a})),hv=dv(((e,t)=>{function n(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
38
+ `),o.value=`disconnected`)},n.onclose=()=>{n===l&&(o.value=`disconnected`)}}Er(()=>{s=new Qh({cursorBlink:!0,fontSize:14,fontFamily:`'JetBrains Mono', 'Fira Code', 'Menlo', monospace`,theme:{background:`#1a1a2e`,foreground:`#e0e0e0`,cursor:`#e0e0e0`,selectionBackground:`#3a3a5e`}}),c=new tg,s.loadAddon(c),s.loadAddon(new sg);let e=a.value;e&&(s.open(e),c.fit(),s.onData(e=>{l&&l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:`input`,data:e}))}),u=new ResizeObserver(()=>{c.fit(),l&&l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:`resize`,cols:s.cols,rows:s.rows}))}),u.observe(e),d(),s.focus())}),Gn(()=>r.connectKey,()=>{d(),s.focus()});function f(e){let t=l;return!t||t.readyState!==WebSocket.OPEN?!1:(t.send(JSON.stringify({type:`input`,data:e})),setTimeout(()=>{t===l&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:`input`,data:`\r`}))},60),!0)}return t({submitText:f}),Ar(()=>{u?.disconnect(),l?.close(),s?.dispose()}),(e,t)=>(z(),B(`div`,cg,[V(`div`,lg,[t[0]||=V(`span`,{class:`title`},`Terminal`,-1),V(`span`,{class:Ce([`status`,o.value])},N(o.value),3)]),V(`div`,{ref_key:`terminalRef`,ref:a,class:`terminal-container`},null,512)]))}}),[[`__scopeId`,`data-v-c8e02a05`]]),dg=Object.create(null);dg.open=`0`,dg.close=`1`,dg.ping=`2`,dg.pong=`3`,dg.message=`4`,dg.upgrade=`5`,dg.noop=`6`;var fg=Object.create(null);Object.keys(dg).forEach(e=>{fg[dg[e]]=e});var pg={type:`error`,data:`parser error`},mg=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,hg=typeof ArrayBuffer==`function`,gg=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_g=({type:e,data:t},n,r)=>mg&&t instanceof Blob?n?r(t):vg(t,r):hg&&(t instanceof ArrayBuffer||gg(t))?n?r(t):vg(new Blob([t]),r):r(dg[e]+(t||``)),vg=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function yg(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var bg;function xg(e,t){if(mg&&e.data instanceof Blob)return e.data.arrayBuffer().then(yg).then(t);if(hg&&(e.data instanceof ArrayBuffer||gg(e.data)))return t(yg(e.data));_g(e,!1,e=>{bg||=new TextEncoder,t(bg.encode(e))})}var Sg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Cg=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)Cg[Sg.charCodeAt(e)]=e;var wg=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=Cg[e.charCodeAt(r)],o=Cg[e.charCodeAt(r+1)],s=Cg[e.charCodeAt(r+2)],c=Cg[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Tg=typeof ArrayBuffer==`function`,Eg=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:Og(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:Dg(e.substring(1),t)}:fg[n]?e.length>1?{type:fg[n],data:e.substring(1)}:{type:fg[n]}:pg},Dg=(e,t)=>Tg?Og(wg(e),t):{base64:!0,data:e},Og=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},kg=``,Ag=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{_g(e,!1,e=>{r[a]=e,++i===n&&t(r.join(kg))})})},jg=(e,t)=>{let n=e.split(kg),r=[];for(let e=0;e<n.length;e++){let i=Eg(n[e],t);if(r.push(i),i.type===`error`)break}return r};function Mg(){return new TransformStream({transform(e,t){xg(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var Ng;function Pg(e){return e.reduce((e,t)=>e+t.length,0)}function Fg(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Ig(e,t){Ng||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(Pg(n)<1)break;let e=Fg(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(Pg(n)<2)break;let e=Fg(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(Pg(n)<8)break;let e=Fg(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(pg);break}i=a*2**32+t.getUint32(4),r=3}else{if(Pg(n)<i)break;let e=Fg(n,i);s.enqueue(Eg(a?e:Ng.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(pg);break}}}})}function Lg(e){if(e)return Rg(e)}function Rg(e){for(var t in Lg.prototype)e[t]=Lg.prototype[t];return e}Lg.prototype.on=Lg.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Lg.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Lg.prototype.off=Lg.prototype.removeListener=Lg.prototype.removeAllListeners=Lg.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Lg.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Lg.prototype.emitReserved=Lg.prototype.emit,Lg.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Lg.prototype.hasListeners=function(e){return!!this.listeners(e).length};var zg=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Bg=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),Vg=`arraybuffer`;function Hg(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var Ug=Bg.setTimeout,Wg=Bg.clearTimeout;function Gg(e,t){t.useNativeTimers?(e.setTimeoutFn=Ug.bind(Bg),e.clearTimeoutFn=Wg.bind(Bg)):(e.setTimeoutFn=Bg.setTimeout.bind(Bg),e.clearTimeoutFn=Bg.clearTimeout.bind(Bg))}var Kg=1.33;function qg(e){return typeof e==`string`?Jg(e):Math.ceil((e.byteLength||e.size)*Kg)}function Jg(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Yg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Xg(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Zg(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var Qg=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},$g=class extends Lg{constructor(e){super(),this.writable=!1,Gg(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new Qg(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=Eg(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Xg(e);return t.length?`?`+t:``}},e_=class extends $g{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){jg(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,Ag(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Yg()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},t_=!1;try{t_=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var n_=t_;function r_(){}var i_=class extends e_{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},a_=class e extends Lg{constructor(e,t,n){super(),this.createRequest=e,Gg(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Hg(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=r_,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(a_.requestsCount=0,a_.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,o_);else if(typeof addEventListener==`function`){let e=`onpagehide`in Bg?`pagehide`:`unload`;addEventListener(e,o_,!1)}}function o_(){for(let e in a_.requests)a_.requests.hasOwnProperty(e)&&a_.requests[e].abort()}var s_=(function(){let e=l_({xdomain:!1});return e&&e.responseType!==null})(),c_=class extends i_{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=s_&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new a_(l_,this.uri(),e)}};function l_(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||n_))return new XMLHttpRequest}catch{}if(!t)try{return new Bg[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var u_=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,d_=class extends $g{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=u_?{}:Hg(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;_g(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&zg(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Yg()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},f_=Bg.WebSocket||Bg.MozWebSocket,p_={websocket:class extends d_{createSocket(e,t,n){return u_?new f_(e,t,n):t?new f_(e,t):new f_(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends $g{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Ig(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Mg();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&zg(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:c_},m_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,h_=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function g_(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=m_.exec(e||``),a={},o=14;for(;o--;)a[h_[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=__(a,a.path),a.queryKey=v_(a,a.query),a}function __(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function v_(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var y_=typeof addEventListener==`function`&&typeof removeEventListener==`function`,b_=[];y_&&addEventListener(`offline`,()=>{b_.forEach(e=>e())},!1);var x_=class e extends Lg{constructor(e,t){if(super(),this.binaryType=Vg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=g_(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=g_(t.host).host);Gg(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Zg(this.opts.query)),y_&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},b_.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=qg(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zg(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),y_&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=b_.indexOf(this._offlineEventListener);e!==-1&&b_.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};x_.protocol=4;var S_=class extends x_{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;x_.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;x_.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},C_=class extends S_{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>p_[e]).filter(e=>!!e)),super(e,n)}};C_.protocol;function w_(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=g_(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var T_=typeof ArrayBuffer==`function`,E_=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D_=Object.prototype.toString,O_=typeof Blob==`function`||typeof Blob<`u`&&D_.call(Blob)===`[object BlobConstructor]`,k_=typeof File==`function`||typeof File<`u`&&D_.call(File)===`[object FileConstructor]`;function A_(e){return T_&&(e instanceof ArrayBuffer||E_(e))||O_&&e instanceof Blob||k_&&e instanceof File}function j_(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(j_(e[t]))return!0;return!1}if(A_(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return j_(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&j_(e[t]))return!0;return!1}function M_(e){let t=[],n=e.data,r=e;return r.data=N_(n,t),r.attachments=t.length,{packet:r,buffers:t}}function N_(e,t){if(!e)return e;if(A_(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=N_(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=N_(e[r],t));return n}return e}function P_(e,t){return e.data=F_(e.data,t),delete e.attachments,e}function F_(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=F_(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=F_(e[n],t));return e}var I_=c({Decoder:()=>z_,Encoder:()=>R_,PacketType:()=>Z,isPacketValid:()=>K_,protocol:()=>5}),L_=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Z;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Z||={});var R_=class{constructor(e){this.replacer=e}encode(e){return(e.type===Z.EVENT||e.type===Z.ACK)&&j_(e)?this.encodeAsBinary({type:e.type===Z.EVENT?Z.BINARY_EVENT:Z.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Z.BINARY_EVENT||e.type===Z.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=M_(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},z_=class e extends Lg{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Z.BINARY_EVENT;n||t.type===Z.BINARY_ACK?(t.type=n?Z.EVENT:Z.ACK,this.reconstructor=new B_(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(A_(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Z[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Z.BINARY_EVENT||r.type===Z.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!H_(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Z.CONNECT:return W_(t);case Z.DISCONNECT:return t===void 0;case Z.CONNECT_ERROR:return typeof t==`string`||W_(t);case Z.EVENT:case Z.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&L_.indexOf(t[0])===-1);case Z.ACK:case Z.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},B_=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=P_(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function V_(e){return typeof e==`string`}var H_=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function U_(e){return e===void 0||H_(e)}function W_(e){return Object.prototype.toString.call(e)===`[object Object]`}function G_(e,t){switch(e){case Z.CONNECT:return t===void 0||W_(t);case Z.DISCONNECT:return t===void 0;case Z.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&L_.indexOf(t[0])===-1);case Z.ACK:return Array.isArray(t);case Z.CONNECT_ERROR:return typeof t==`string`||W_(t);default:return!1}}function K_(e){return V_(e.nsp)&&U_(e.id)&&G_(e.type,e.data)}function q_(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var J_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Y_=class extends Lg{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[q_(e,`open`,this.onopen.bind(this)),q_(e,`packet`,this.onpacket.bind(this)),q_(e,`error`,this.onerror.bind(this)),q_(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(J_.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Z.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Z.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Z.EVENT:case Z.BINARY_EVENT:this.onevent(e);break;case Z.ACK:case Z.BINARY_ACK:this.onack(e);break;case Z.DISCONNECT:this.ondisconnect();break;case Z.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Z.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Z.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function X_(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}X_.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},X_.prototype.reset=function(){this.attempts=0},X_.prototype.setMin=function(e){this.ms=e},X_.prototype.setMax=function(e){this.max=e},X_.prototype.setJitter=function(e){this.jitter=e};var Z_=class extends Lg{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,Gg(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new X_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||I_;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new C_(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=q_(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=q_(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(q_(e,`ping`,this.onping.bind(this)),q_(e,`data`,this.ondata.bind(this)),q_(e,`error`,this.onerror.bind(this)),q_(e,`close`,this.onclose.bind(this)),q_(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){zg(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Y_(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Q_={};function $_(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=w_(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Q_[i]&&a in Q_[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new Z_(r,t):(Q_[i]||(Q_[i]=new Z_(r,t)),c=Q_[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign($_,{Manager:Z_,Socket:Y_,io:$_,connect:$_});var ev=null,tv=new Map;function nv(){if(ev)return ev;let e=$_({path:`/ws/pubsub`,transports:[`websocket`]});return e.on(`connect`,()=>{for(let t of tv.keys())e.emit(`subscribe`,t)}),e.on(`data`,e=>{let t=tv.get(e.channel);if(t)for(let n of t)n(e.data)}),ev=e,e}function rv(){function e(e,t){let n=tv.get(e);n||(n=new Set,tv.set(e,n)),n.add(t);let r=nv();return r.connected&&r.emit(`subscribe`,e),()=>{let n=tv.get(e);n&&(n.delete(t),n.size===0&&(tv.delete(e),ev?.connected&&ev.emit(`unsubscribe`,e)))}}return{subscribe:e}}var iv={packages:[`@mulmoclaude/markdown-plugin`,`@mulmoclaude/form-plugin`,`@mulmochat-plugin/generate-image`],local:[]},av=Object.create,ov=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,cv=Object.getOwnPropertyNames,lv=Object.getPrototypeOf,uv=Object.prototype.hasOwnProperty,dv=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),fv=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=cv(t),a=0,o=i.length,s;a<o;a++)s=i[a],!uv.call(e,s)&&s!==n&&ov(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=sv(t,s))||r.enumerable});return e},pv=(e,t,n)=>(n=e==null?{}:av(lv(e)),fv(t||!e||!e.__esModule?ov(n,`default`,{value:e,enumerable:!0}):n,e)),mv=dv(((e,t)=>{function n(e){return e==null}function r(e){return typeof e==`object`&&!!e}function i(e){return Array.isArray(e)?e:n(e)?[]:[e]}function a(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function o(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function s(e){return e===0&&1/e==-1/0}t.exports.isNothing=n,t.exports.isObject=r,t.exports.toArray=i,t.exports.repeat=o,t.exports.isNegativeZero=s,t.exports.extend=a})),hv=dv(((e,t)=>{function n(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
39
39
 
40
40
  `+e.mark.snippet),r+` `+n):r}function r(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=n(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){return this.name+`: `+n(this,e)},t.exports=r})),gv=dv(((e,t)=>{var n=mv();function r(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function i(e,t){return n.repeat(` `,t-e.length)+e}function a(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(e.buffer);)s.push(c.index),o.push(c.index+c[0].length),e.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(e.line+t.linesAfter,s.length).toString().length,f=t.maxLength-(t.indent+d+3);for(let a=1;a<=t.linesBefore&&!(l-a<0);a++){let c=r(e.buffer,o[l-a],s[l-a],e.position-(o[l]-o[l-a]),f);u=n.repeat(` `,t.indent)+i((e.line-a+1).toString(),d)+` | `+c.str+`
41
41
  `+u}let p=r(e.buffer,o[l],s[l],e.position,f);u+=n.repeat(` `,t.indent)+i((e.line+1).toString(),d)+` | `+p.str+`
@@ -91,7 +91,7 @@ Aspect: \`size: 16:9\` (default 1280×720) or \`size: 4:3\` (960×720) — handl
91
91
  - \`size: 16:10\` → 1280×800
92
92
  - \`size: 1:1\` → 1080×1080 square
93
93
  - \`size: WxH\` → any custom pixel canvas (e.g. \`size: 1920x1080\`)
94
- Themes: \`theme: default\` | \`gaia\` | \`uncover\`. Custom sizes compose on top of whichever theme is chosen.`,parameters:{type:`object`,properties:{title:{type:`string`,description:`Title for the document`},markdown:{type:`string`,description:`The markdown content to display. Describe embedded images in the following format: ![Detailed image prompt](__too_be_replaced_image_path__). IMPORTANT: For embedded images, you MUST use the EXACT placeholder path '__too_be_replaced_image_path__'.`},filenamePrefix:{type:`string`,description:`Short English filename prefix (without extension). Use lowercase with hyphens, e.g. 'project-summary'. The server sanitizes the value and appends a random id to prevent collisions.`}},required:[`title`,`markdown`,`filenamePrefix`]}};async function sy(e,t){let{app:n}=e;if(!n)throw Error(`markdown plugin: context.app (MarkdownHostApp) was not provided by the host`);switch(t.kind){case`loadDoc`:return n.loadDoc(t.path);case`saveDoc`:return n.saveDoc(t.path,t.markdown);case`marpThemes`:return n.marpThemes();case`exportPdf`:return n.exportPdf({markdown:t.markdown,filename:t.filename,marp:t.marp,baseDir:t.baseDir,format:t.format,stripFrontmatter:t.stripFrontmatter});case`fillImages`:return n.fillImages(t.markdown);default:throw Error(`markdown plugin: unknown dispatch kind ${JSON.stringify(t)}`)}}async function cy(e,t){let{app:n}=e;if(!n)throw Error(`markdown plugin: context.app (MarkdownHostApp) was not provided by the host`);let{title:r,markdown:i,filenamePrefix:a}=t,o=(await n.fillImages(i)).markdown,{path:s}=await n.saveNewDoc(a??`document`,o);return{message:`Document created${r?`: ${r}`:``}`,data:{markdown:s,filenamePrefix:a},instructions:`The document has been presented to the user in a rendered markdown view.`}}var ly=new Set([`loadDoc`,`saveDoc`,`marpThemes`,`exportPdf`,`fillImages`]);function uy(e){if(typeof e!=`object`||!e)return!1;let t=e.kind;return typeof t==`string`&&ly.has(t)}var dy={toolDefinition:oy,execute:async(e,t)=>{let n=e;return uy(t)?sy(n,t):cy(n,t)},generatingMessage:`Creating document...`,isEnabled:()=>!0},fy=`/api/files/raw`,py=`artifacts/images/`;function my(e){return e.startsWith(`data:`)?e:e.startsWith(py)?`/${e}`:`${fy}?path=${encodeURIComponent(e)}`}var hy=[`id`,`class`,`style`],gy={div:[...hy],span:[...hy],img:[`src`,`alt`,`width`,`height`,...hy],br:[],sub:[...hy],sup:[...hy],small:[...hy]},_y=/^---\r?\n/,vy=/(?:^|\r?\n)---\s*(?:\r?\n|$)/;function yy(e){if(!_y.test(e))return{meta:{},body:e,hasHeader:!1};let t=e.replace(_y,``),n=vy.exec(t);if(!n||n.index===void 0)return{meta:{},body:e,hasHeader:!1};let r=t.slice(0,n.index),i=t.slice(n.index+n[0].length),a=by(r);return a===null?{meta:{},body:e,hasHeader:!1}:{meta:a,body:i,hasHeader:!0}}function by(e){try{let t=$v.load(e,{schema:$v.FAILSAFE_SCHEMA});return t==null?{}:typeof t!=`object`||Array.isArray(t)?null:t}catch{return null}}var xy={"9:16":[1080,1920],"16:10":[1280,800],"1:1":[1080,1080]},Sy=/^(\d{3,5})[xX](\d{3,5})$/,Cy=200,wy=3840,Ty=/^[A-Za-z0-9_-]+$/;function Ey(e){return Number.isFinite(e)&&e>=Cy&&e<=wy}function Dy(e){let t=xy[e];if(t)return{width:t[0],height:t[1]};let n=Sy.exec(e);if(!n)return null;let r=Number(n[1]),i=Number(n[2]);return!Ey(r)||!Ey(i)?null:{width:r,height:i}}function Oy(e,t){return`---\n${$v.dump(e,{lineWidth:-1,sortKeys:!1}).trimEnd()}\n---\n${t}`}function ky(e,t){let{meta:n,body:r,hasHeader:i}=yy(t);if(!i)return t;let a=typeof n.size==`string`?n.size.trim():``;if(a===``||a===`16:9`||a===`4:3`)return t;let o=Dy(a);if(!o)return t;let s=typeof n.theme==`string`?n.theme.trim():`default`,c=Ty.test(s)?s:`default`;if(c.startsWith(`mc_size_`))return t;let l=`mc_size_${c}_${o.width}x${o.height}`;e.themeSet.add(`/* @theme ${l} */\n@import "${c}";\nsection { width: ${o.width}px; height: ${o.height}px; }`);let u={...n,theme:l};return delete u.size,Oy(u,r)}var Ay=1280,jy=200,My=3840;function Ny(e,t){return!Number.isFinite(e)||e<jy?t:Math.min(e,My)}var Py=/div\.marpit\s*>\s*section\s*\{[^}]*?width:\s*(\d+)px[^}]*?height:\s*(\d+)px/;function Fy(e){let t=e.match(Py);return t?{width:Ny(Number(t[1]),Ay),height:Ny(Number(t[2]),720)}:{width:Ay,height:720}}var Iy=/viewBox="0 0 (\d+) (\d+)"/;function Ly(e){let t=e.match(Iy);return t?{width:Ny(Number(t[1]),Ay),height:Ny(Number(t[2]),720)}:{width:Ay,height:720}}async function Ry(e,t={}){let n=t.inlineSVG??!1,{Marp:r}=await ry(async()=>{let{Marp:e}=await import(`./marp-DqK0_Srt.js`).then(e=>u(e.default,1));return{Marp:e}},[]),i=new r({inlineSVG:n,html:gy,emoji:{unicode:!1,shortcode:!1}});for(let e of t.themes??[])i.themeSet.add(e.css);let a=ky(i,e),{html:o,css:s}=i.render(a),{width:c,height:l}=n?Ly(o):Fy(s);return{html:o,css:s,slideWidth:c,slideHeight:l}}var zy=Symbol(`guiChatPluginRuntime`);function By(){let e=Hn(zy);if(!e)throw Error(`useRuntime() called outside of <PluginScopedRoot> — the host must provide PLUGIN_RUNTIME_KEY`);return e}function Vy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hy=Vy();function Uy(e){Hy=e}var Wy={exec:()=>null};function Gy(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(qy.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ky=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),qy={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Gy(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Gy(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Gy(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Gy(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Gy(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Gy(e=>RegExp(`^ {0,${e}}>`))},Jy=/^(?:[ \t]*(?:\n|$))+/,Yy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zy=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Qy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$y=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,eb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tb=Q(eb).replace(/bull/g,$y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),nb=Q(eb).replace(/bull/g,$y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ib=/^[^\n]+/,ab=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ob=Q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ab).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sb=Q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,$y).getRegex(),cb=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,lb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ub=Q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,lb).replace(`tag`,cb).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),db=Q(rb).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex(),fb={blockquote:Q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,db).getRegex(),code:Yy,def:ob,fences:Xy,heading:Qy,hr:Zy,html:ub,lheading:tb,list:sb,newline:Jy,paragraph:db,table:Wy,text:ib},pb=Q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex(),mb={...fb,lheading:nb,table:pb,paragraph:Q(rb).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,pb).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex()},hb={...fb,html:Q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,lb).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wy,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Q(rb).replace(`hr`,Zy).replace(`heading`,` *#{1,6} *[^
94
+ Themes: \`theme: default\` | \`gaia\` | \`uncover\`. Custom sizes compose on top of whichever theme is chosen.`,parameters:{type:`object`,properties:{title:{type:`string`,description:`Title for the document`},markdown:{type:`string`,description:`The markdown content to display. Describe embedded images in the following format: ![Detailed image prompt](__too_be_replaced_image_path__). IMPORTANT: For embedded images, you MUST use the EXACT placeholder path '__too_be_replaced_image_path__'.`},filenamePrefix:{type:`string`,description:`Short English filename prefix (without extension). Use lowercase with hyphens, e.g. 'project-summary'. The server sanitizes the value and appends a random id to prevent collisions.`}},required:[`title`,`markdown`,`filenamePrefix`]}};async function sy(e,t){let{app:n}=e;if(!n)throw Error(`markdown plugin: context.app (MarkdownHostApp) was not provided by the host`);switch(t.kind){case`loadDoc`:return n.loadDoc(t.path);case`saveDoc`:return n.saveDoc(t.path,t.markdown);case`marpThemes`:return n.marpThemes();case`exportPdf`:return n.exportPdf({markdown:t.markdown,filename:t.filename,marp:t.marp,baseDir:t.baseDir,format:t.format,stripFrontmatter:t.stripFrontmatter});case`fillImages`:return n.fillImages(t.markdown);default:throw Error(`markdown plugin: unknown dispatch kind ${JSON.stringify(t)}`)}}async function cy(e,t){let{app:n}=e;if(!n)throw Error(`markdown plugin: context.app (MarkdownHostApp) was not provided by the host`);let{title:r,markdown:i,filenamePrefix:a}=t,o=(await n.fillImages(i)).markdown,{path:s}=await n.saveNewDoc(a??`document`,o);return{message:`Document created${r?`: ${r}`:``}`,data:{markdown:s,filenamePrefix:a},instructions:`The document has been presented to the user in a rendered markdown view.`}}var ly=new Set([`loadDoc`,`saveDoc`,`marpThemes`,`exportPdf`,`fillImages`]);function uy(e){if(typeof e!=`object`||!e)return!1;let t=e.kind;return typeof t==`string`&&ly.has(t)}var dy={toolDefinition:oy,execute:async(e,t)=>{let n=e;return uy(t)?sy(n,t):cy(n,t)},generatingMessage:`Creating document...`,isEnabled:()=>!0},fy=`/api/files/raw`,py=`artifacts/images/`;function my(e){return e.startsWith(`data:`)?e:e.startsWith(py)?`/${e}`:`${fy}?path=${encodeURIComponent(e)}`}var hy=[`id`,`class`,`style`],gy={div:[...hy],span:[...hy],img:[`src`,`alt`,`width`,`height`,...hy],br:[],sub:[...hy],sup:[...hy],small:[...hy]},_y=/^---\r?\n/,vy=/(?:^|\r?\n)---\s*(?:\r?\n|$)/;function yy(e){if(!_y.test(e))return{meta:{},body:e,hasHeader:!1};let t=e.replace(_y,``),n=vy.exec(t);if(!n||n.index===void 0)return{meta:{},body:e,hasHeader:!1};let r=t.slice(0,n.index),i=t.slice(n.index+n[0].length),a=by(r);return a===null?{meta:{},body:e,hasHeader:!1}:{meta:a,body:i,hasHeader:!0}}function by(e){try{let t=$v.load(e,{schema:$v.FAILSAFE_SCHEMA});return t==null?{}:typeof t!=`object`||Array.isArray(t)?null:t}catch{return null}}var xy={"9:16":[1080,1920],"16:10":[1280,800],"1:1":[1080,1080]},Sy=/^(\d{3,5})[xX](\d{3,5})$/,Cy=200,wy=3840,Ty=/^[A-Za-z0-9_-]+$/;function Ey(e){return Number.isFinite(e)&&e>=Cy&&e<=wy}function Dy(e){let t=xy[e];if(t)return{width:t[0],height:t[1]};let n=Sy.exec(e);if(!n)return null;let r=Number(n[1]),i=Number(n[2]);return!Ey(r)||!Ey(i)?null:{width:r,height:i}}function Oy(e,t){return`---\n${$v.dump(e,{lineWidth:-1,sortKeys:!1}).trimEnd()}\n---\n${t}`}function ky(e,t){let{meta:n,body:r,hasHeader:i}=yy(t);if(!i)return t;let a=typeof n.size==`string`?n.size.trim():``;if(a===``||a===`16:9`||a===`4:3`)return t;let o=Dy(a);if(!o)return t;let s=typeof n.theme==`string`?n.theme.trim():`default`,c=Ty.test(s)?s:`default`;if(c.startsWith(`mc_size_`))return t;let l=`mc_size_${c}_${o.width}x${o.height}`;e.themeSet.add(`/* @theme ${l} */\n@import "${c}";\nsection { width: ${o.width}px; height: ${o.height}px; }`);let u={...n,theme:l};return delete u.size,Oy(u,r)}var Ay=1280,jy=200,My=3840;function Ny(e,t){return!Number.isFinite(e)||e<jy?t:Math.min(e,My)}var Py=/div\.marpit\s*>\s*section\s*\{[^}]*?width:\s*(\d+)px[^}]*?height:\s*(\d+)px/;function Fy(e){let t=e.match(Py);return t?{width:Ny(Number(t[1]),Ay),height:Ny(Number(t[2]),720)}:{width:Ay,height:720}}var Iy=/viewBox="0 0 (\d+) (\d+)"/;function Ly(e){let t=e.match(Iy);return t?{width:Ny(Number(t[1]),Ay),height:Ny(Number(t[2]),720)}:{width:Ay,height:720}}async function Ry(e,t={}){let n=t.inlineSVG??!1,{Marp:r}=await ry(async()=>{let{Marp:e}=await import(`./marp-ByJn8N3A.js`).then(e=>u(e.default,1));return{Marp:e}},[]),i=new r({inlineSVG:n,html:gy,emoji:{unicode:!1,shortcode:!1}});for(let e of t.themes??[])i.themeSet.add(e.css);let a=ky(i,e),{html:o,css:s}=i.render(a),{width:c,height:l}=n?Ly(o):Fy(s);return{html:o,css:s,slideWidth:c,slideHeight:l}}var zy=Symbol(`guiChatPluginRuntime`);function By(){let e=Hn(zy);if(!e)throw Error(`useRuntime() called outside of <PluginScopedRoot> — the host must provide PLUGIN_RUNTIME_KEY`);return e}function Vy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hy=Vy();function Uy(e){Hy=e}var Wy={exec:()=>null};function Gy(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(qy.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ky=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),qy={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Gy(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Gy(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Gy(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Gy(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Gy(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Gy(e=>RegExp(`^ {0,${e}}>`))},Jy=/^(?:[ \t]*(?:\n|$))+/,Yy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zy=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Qy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$y=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,eb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tb=Q(eb).replace(/bull/g,$y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),nb=Q(eb).replace(/bull/g,$y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ib=/^[^\n]+/,ab=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ob=Q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ab).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sb=Q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,$y).getRegex(),cb=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,lb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ub=Q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,lb).replace(`tag`,cb).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),db=Q(rb).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex(),fb={blockquote:Q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,db).getRegex(),code:Yy,def:ob,fences:Xy,heading:Qy,hr:Zy,html:ub,lheading:tb,list:sb,newline:Jy,paragraph:db,table:Wy,text:ib},pb=Q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex(),mb={...fb,lheading:nb,table:pb,paragraph:Q(rb).replace(`hr`,Zy).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,pb).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,cb).getRegex()},hb={...fb,html:Q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,lb).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wy,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Q(rb).replace(`hr`,Zy).replace(`heading`,` *#{1,6} *[^
95
95
  ]`).replace(`lheading`,tb).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},gb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_b=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vb=/^( {2,}|\\)\n(?!\s*$)/,yb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bb=/[\p{P}\p{S}]/u,xb=/[\s\p{P}\p{S}]/u,Sb=/[^\s\p{P}\p{S}]/u,Cb=Q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,xb).getRegex(),wb=/(?!~)[\p{P}\p{S}]/u,Tb=/(?!~)[\s\p{P}\p{S}]/u,Eb=/(?:[^\s\p{P}\p{S}]|~)/u,Db=Q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ky?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Ob=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kb=Q(Ob,`u`).replace(/punct/g,bb).getRegex(),Ab=Q(Ob,`u`).replace(/punct/g,wb).getRegex(),jb=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Mb=Q(jb,`gu`).replace(/notPunctSpace/g,Sb).replace(/punctSpace/g,xb).replace(/punct/g,bb).getRegex(),Nb=Q(jb,`gu`).replace(/notPunctSpace/g,Eb).replace(/punctSpace/g,Tb).replace(/punct/g,wb).getRegex(),Pb=Q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Sb).replace(/punctSpace/g,xb).replace(/punct/g,bb).getRegex(),Fb=Q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,bb).getRegex(),Ib=Q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Sb).replace(/punctSpace/g,xb).replace(/punct/g,bb).getRegex(),Lb=Q(/\\(punct)/,`gu`).replace(/punct/g,bb).getRegex(),Rb=Q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),zb=Q(lb).replace(`(?:-->|$)`,`-->`).getRegex(),Bb=Q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,zb).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vb=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Hb=Q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Vb).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ub=Q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Vb).replace(`ref`,ab).getRegex(),Wb=Q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ab).getRegex(),Gb=Q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Ub).replace(`nolink`,Wb).getRegex(),Kb=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qb={_backpedal:Wy,anyPunctuation:Lb,autolink:Rb,blockSkip:Db,br:vb,code:_b,del:Wy,delLDelim:Wy,delRDelim:Wy,emStrongLDelim:kb,emStrongRDelimAst:Mb,emStrongRDelimUnd:Pb,escape:gb,link:Hb,nolink:Wb,punctuation:Cb,reflink:Ub,reflinkSearch:Gb,tag:Bb,text:yb,url:Wy},Jb={...qb,link:Q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Vb).getRegex(),reflink:Q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Vb).getRegex()},Yb={...qb,emStrongRDelimAst:Nb,emStrongLDelim:Ab,delLDelim:Fb,delRDelim:Ib,url:Q(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Kb).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Q(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Kb).getRegex()},Xb={...Yb,br:Q(vb).replace(`{2,}`,`*`).getRegex(),text:Q(Yb.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Zb={normal:fb,gfm:mb,pedantic:hb},Qb={normal:qb,gfm:Yb,breaks:Xb,pedantic:Jb},$b={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},ex=e=>$b[e];function tx(e,t){if(t){if(qy.escapeTest.test(e))return e.replace(qy.escapeReplace,ex)}else if(qy.escapeTestNoEncode.test(e))return e.replace(qy.escapeReplaceNoEncode,ex);return e}function nx(e){try{e=encodeURI(e).replace(qy.percentDecode,`%`)}catch{return null}return e}function rx(e,t){let n=e.replace(qy.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(qy.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(qy.slashPipe,`|`);return n}function ix(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ax(e){let t=e.split(`
96
96
  `),n=t.length-1;for(;n>=0&&qy.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
97
97
  `)}function ox(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function sx(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function cx(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function lx(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
@@ -182,5 +182,5 @@ div.marpit > section img:not([data-marp-twemoji]) {
182
182
  - `)}`}if(typeof t==`string`){let e=t.trim();return e===``?n:le(e)}return t==null?n:String(t)}return(e,t)=>(z(),B(`div`,UC,[a.value?(z(),B(`div`,WC,[a.value.title?(z(),B(`h2`,GC,N(a.value.title),1)):H(``,!0),a.value.description?(z(),B(`p`,KC,N(a.value.description),1)):H(``,!0),u.value&&c.value.size>0?(z(),B(`div`,qC,[V(`h3`,JC,[t[0]||=V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 20 20`,"aria-hidden":`true`},[V(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,"clip-rule":`evenodd`})],-1),ba(` `+N(L(n).errorSummary),1)]),V(`ul`,YC,[(z(!0),B(R,null,Br(c.value,([e,t])=>(z(),B(`li`,{key:e},[V(`a`,{href:`#${e}`,class:`hover:underline cursor-pointer`,onClick:Qo(t=>j(e),[`prevent`])},N(t.message),9,XC)]))),128))])])):H(``,!0),V(`form`,{class:`space-y-6`,onSubmit:Qo(ce,[`prevent`])},[(z(!0),B(R,null,Br(a.value.fields,e=>(z(),B(`div`,{id:e.id,key:e.id,class:Ce([`form-field`,{"has-error":A(e.id)&&s.value.has(e.id)}])},[V(`label`,{for:`input-${e.id}`,class:Ce([`block text-gray-800 font-semibold mb-2`,{"text-red-600":A(e.id)&&s.value.has(e.id)}])},[ba(N(e.label)+` `,1),e.required?(z(),B(`span`,$C,N(L(n).requiredMarker),1)):H(``,!0)],10,QC),e.description?(z(),B(`p`,ew,N(e.description),1)):H(``,!0),e.type===`text`?zn((z(),B(`input`,{key:1,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,type:`text`,placeholder:e.placeholder,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onInput:t=>k(e.id)},null,42,tw)),[[Ho,o.value[e.id]]]):e.type===`textarea`?zn((z(),B(`textarea`,{key:2,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,placeholder:e.placeholder,rows:e.rows||4,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors resize-y`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onInput:t=>k(e.id)},null,42,nw)),[[Ho,o.value[e.id]]]):e.type===`number`?zn((z(),B(`input`,{key:3,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,type:`number`,min:e.min,max:e.max,step:e.step,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onInput:t=>k(e.id)},null,42,rw)),[[Ho,o.value[e.id],void 0,{number:!0}]]):e.type===`date`?zn((z(),B(`input`,{key:4,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,type:`date`,min:e.minDate,max:e.maxDate,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onChange:t=>k(e.id)},null,42,iw)),[[Ho,o.value[e.id]]]):e.type===`time`?zn((z(),B(`input`,{key:5,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,type:`time`,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onChange:t=>k(e.id)},null,42,aw)),[[Ho,o.value[e.id]]]):e.type===`radio`?(z(),B(`div`,{key:6,class:`space-y-2`,role:`radiogroup`,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0},[(z(!0),B(R,null,Br(e.choices,(t,n)=>(z(),B(`label`,{key:n,class:Ce([`flex items-center p-3 border-2 border-gray-300 rounded-lg cursor-pointer transition-all hover:bg-gray-50`,{"border-blue-500 bg-blue-50":o.value[e.id]===n,"border-gray-300":o.value[e.id]!==n}])},[zn(V(`input`,{"onUpdate:modelValue":t=>o.value[e.id]=t,type:`radio`,name:e.id,value:n,class:`mr-3 h-4 w-4 flex-shrink-0`,onChange:t=>k(e.id),onBlur:t=>O(e.id)},null,40,sw),[[Go,o.value[e.id]]]),V(`span`,cw,N(h(t)),1)],2))),128))],8,ow)):e.type===`dropdown`?zn((z(),B(`select`,{key:7,id:`input-${e.id}`,"onUpdate:modelValue":t=>o.value[e.id]=t,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0,class:Ce([`w-full px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors bg-white`,{"border-red-500 focus:ring-red-500":A(e.id)&&s.value.has(e.id),"border-gray-300":!A(e.id)||!s.value.has(e.id)}]),onBlur:t=>O(e.id),onChange:t=>k(e.id)},[V(`option`,uw,N(L(n).selectOption),1),(z(!0),B(R,null,Br(e.choices,(e,t)=>(z(),B(`option`,{key:t,value:t},N(h(e)),9,dw))),128))],42,lw)),[[Ko,o.value[e.id]]]):e.type===`checkbox`?(z(),B(`div`,{key:8,class:`space-y-2`,role:`group`,"aria-invalid":A(e.id)&&s.value.has(e.id),"aria-describedby":A(e.id)&&s.value.has(e.id)?`${e.id}-error`:void 0},[(z(!0),B(R,null,Br(e.choices,(t,n)=>(z(),B(`label`,{key:n,class:Ce([`flex items-center p-3 border-2 border-gray-300 rounded-lg cursor-pointer transition-all hover:bg-gray-50`,{"border-blue-500 bg-blue-50":(o.value[e.id]||[]).includes(n),"border-gray-300":!(o.value[e.id]||[]).includes(n)}])},[zn(V(`input`,{"onUpdate:modelValue":t=>o.value[e.id]=t,type:`checkbox`,value:n,class:`mr-3 h-4 w-4 flex-shrink-0`,onChange:t=>k(e.id),onBlur:t=>O(e.id)},null,40,pw),[[Uo,o.value[e.id]]]),V(`span`,mw,N(h(t)),1)],2))),128))],8,fw)):H(``,!0),A(e.id)&&s.value.has(e.id)?(z(),B(`div`,{key:9,id:`${e.id}-error`,class:`flex items-center gap-2 mt-2 text-red-600 text-sm`,role:`alert`},[t[1]||=V(`svg`,{class:`w-4 h-4 flex-shrink-0`,fill:`currentColor`,viewBox:`0 0 20 20`,"aria-hidden":`true`},[V(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,"clip-rule":`evenodd`})],-1),ba(` `+N(c.value.get(e.id)?.message),1)],8,hw)):H(``,!0),ie(e)?(z(),B(`div`,{key:10,class:Ce([`text-sm mt-2`,{"text-amber-600 font-semibold":ae(e),"text-gray-500":!ae(e)}])},[e.maxLength?(z(),B(R,{key:0},[ba(N(L(n).charactersCount((o.value[e.id]||``).length,e.maxLength)),1)],64)):(z(),B(R,{key:1},[ba(N(L(n).charactersCountNoMax((o.value[e.id]||``).length)),1)],64))],2)):H(``,!0)],10,ZC))),128)),V(`div`,gw,[V(`button`,{type:`submit`,disabled:l.value,class:Ce([l.value?`bg-green-600 cursor-default`:`bg-blue-600 hover:bg-blue-700`,`px-8 py-3 rounded-lg text-white font-semibold text-lg transition-colors`])},N(l.value?L(n).submitted:L(n).submit),11,_w)]),V(`div`,vw,N(L(n).progress(se.value,oe.value)),1)],32)])):H(``,!0)]))}}),[[`__scopeId`,`data-v-2b6705b6`]]),xw={class:`w-full h-full flex flex-col items-center justify-center p-4 bg-gradient-to-br from-blue-50 to-indigo-50 rounded-lg border-2 border-gray-200`},Sw={class:`text-center`},Cw={class:`text-gray-900 font-bold text-lg mb-1 line-clamp-2`},ww={class:`text-gray-600 text-sm mb-2`},Tw={key:0,class:`flex items-center justify-center gap-2`},Ew={class:`w-32 h-2 bg-gray-200 rounded-full overflow-hidden`},Dw={class:`text-xs text-gray-500`},Ow={key:1,class:`inline-flex items-center gap-1 px-3 py-1 bg-green-100 text-green-700 rounded-full text-xs font-semibold`},kw=dr({__name:`Preview`,props:{result:{}},setup(e){let t=HC(),n=e,r=U(()=>n.result?.toolName===`presentForm`?n.result.data??n.result.jsonData:null),i=U(()=>n.result?.viewState||null),a=U(()=>r.value?.fields.length||0),o=U(()=>i.value?.submitted||!1),s=U(()=>{if(!r.value||o.value)return 100;let e=r.value.fields.filter(e=>e.required);if(e.length===0)return 0;let t=i.value?.userResponses||{},n=e.filter(e=>{let n=t[e.id];return n==null?!1:typeof n==`string`?n.trim()!==``:Array.isArray(n)?n.length>0:!0}).length;return Math.round(n/e.length*100)});return(e,n)=>(z(),B(`div`,xw,[V(`div`,Sw,[n[1]||=V(`svg`,{class:`w-12 h-12 mx-auto mb-3 text-blue-600`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})],-1),V(`h3`,Cw,N(r.value?.title||L(t).fallbackTitle),1),V(`p`,ww,N(L(t).fieldCount(a.value)),1),o.value?(z(),B(`div`,Ow,[n[0]||=V(`svg`,{class:`w-3 h-3`,fill:`currentColor`,viewBox:`0 0 20 20`},[V(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,"clip-rule":`evenodd`})],-1),ba(` `+N(L(t).submitted),1)])):(z(),B(`div`,Tw,[V(`div`,Ew,[V(`div`,{class:`h-full bg-blue-600 transition-all duration-300`,style:ve({width:`${s.value}%`})},null,4)]),V(`span`,Dw,N(`${s.value}%`),1)]))])]))}}),Aw=`Use the presentForm tool to collect structured input from the user with a form, instead of asking for everything as free text. Supports text, textarea, number, radio, dropdown, checkbox, date, and time fields, each with optional validation. When the user submits, their answers arrive as your next message — wait for it before continuing.`,jw={...RC,viewComponent:bw,previewComponent:kw,samples:zC,systemPrompt:Aw},Mw=`generateImage`,Nw={type:`function`,name:Mw,description:`Generate an image based on the prompt and display it on the screen. Be descriptive and specify the concrete details of the images in the prompt. Each call generates one image.`,parameters:{type:`object`,properties:{prompt:{type:`string`,description:`A detailed prompt describing the image to generate`}},required:[`prompt`]}},Pw=[{name:`Sunset Beach`,args:{imageData:`https://picsum.photos/id/28/800/600`,prompt:`A beautiful sunset over a calm ocean beach with palm trees`}},{name:`Mountain Lake`,args:{imageData:`https://picsum.photos/id/29/800/600`,prompt:`A serene mountain lake surrounded by pine trees and snow-capped peaks`}},{name:`City Skyline`,args:{imageData:`https://picsum.photos/id/43/800/600`,prompt:`A modern city skyline at night with glowing skyscrapers`}},{name:`Forest Path`,args:{imageData:`https://picsum.photos/id/15/800/600`,prompt:`A winding path through an enchanted forest with sunlight filtering through the leaves`}}];function Fw(e,t,n){return{toolName:Mw,data:{imageData:e,prompt:n},message:``,title:t}}var Iw={toolDefinition:Nw,execute:async(e,t)=>{let{prompt:n}=t;return e.app?.generateImage?e.app.generateImage(n):{message:`generateImage function not available`}},generatingMessage:`Generating image...`,isEnabled:()=>!0,inputHandlers:[{type:`file`,acceptedTypes:[`image/png`,`image/jpeg`],handleInput:(e,t)=>Fw(e,t,``)},{type:`clipboard-image`,handleInput:e=>Fw(e,`clipboard-image.png`,``)}],systemPrompt:`When you are talking about places, objects, people, movies, books and other things, you MUST use the ${Mw} API to draw pictures to make the conversation more engaging.`,backends:[`imageGen`],samples:Pw},Lw={class:`w-full h-full overflow-y-auto`},Rw={class:`min-h-full flex flex-col items-center justify-center p-4`},zw={class:`flex-1 flex items-center justify-center min-h-0`},Bw=[`src`],Vw={key:0,class:`mt-4 p-3 bg-gray-100 dark:bg-gray-800 rounded-lg max-w-full flex-shrink-0`},Hw={class:`text-sm text-gray-700 dark:text-gray-300`},Uw=dr({__name:`ImageView`,props:{selectedResult:{}},setup(e){return(t,n)=>(z(),B(`div`,Lw,[V(`div`,Rw,[V(`div`,zw,[V(`img`,{src:e.selectedResult.data?.imageData,class:`max-w-full max-h-full object-contain rounded`,alt:`Current generated image`},null,8,Bw)]),e.selectedResult.data?.prompt?(z(),B(`div`,Vw,[V(`p`,Hw,[n[0]||=V(`span`,{class:`font-medium`},`Prompt:`,-1),ba(` `+N(e.selectedResult.data.prompt),1)])])):H(``,!0)])]))}}),Ww={class:`min-h-24 flex items-center justify-center`},Gw=[`src`],Kw={key:1,class:`text-gray-400 text-sm`},qw=dr({__name:`ImagePreview`,props:{result:{}},setup(e){return(t,n)=>(z(),B(`div`,Ww,[e.result.data?.imageData?(z(),B(`img`,{key:0,src:e.result.data.imageData,class:`max-w-full h-auto rounded`,alt:`Generated image`},null,8,Gw)):(z(),B(`div`,Kw,`No image yet`))]))}}),Jw=dr({__name:`View`,props:{selectedResult:{},sendTextMessage:{type:Function}},emits:[`updateResult`],setup(e){let t=e,n=I(null);return Gn(()=>t.selectedResult,e=>{e?.toolName===`generateImage`&&e.data&&(n.value=e)},{immediate:!0,deep:!0}),(e,t)=>n.value?(z(),da(L(Uw),{key:0,selectedResult:n.value},null,8,[`selectedResult`])):H(``,!0)}}),Yw=dr({__name:`Preview`,props:{result:{}},setup(e){return(t,n)=>(z(),da(L(qw),{result:e.result},null,8,[`result`]))}}),Xw={plugin:{...Iw,viewComponent:Jw,previewComponent:Yw}};function Zw(e,t){return`plugin:${e}:${t}`}var Qw=new Set([`http:`,`https:`]);function $w(e){return t=>{let n;try{n=new URL(t)}catch{console.warn(`[plugin/${e}] openUrl rejected unparseable URL`,{url:t});return}if(!Qw.has(n.protocol)){console.warn(`[plugin/${e}] openUrl rejected non-http(s) scheme`,{scheme:n.protocol});return}window.open(t,`_blank`,`noopener,noreferrer`)}}function eT(e){let t=`/api/plugin/${encodeURIComponent(e)}`;return async n=>{let r=await fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n??{})});if(!r.ok){let t=await r.text().catch(()=>``);throw Error(`plugin/${e} dispatch failed (${r.status}): ${t||r.statusText}`)}return await r.json()}}var tT=I(`en`);function nT(e){let{scope:t,toolName:n}=e,{subscribe:r}=rv(),i=`[plugin/${t}]`;return{pubsub:{subscribe(e,n){return r(Zw(t,e),n)}},locale:U(()=>tT.value),log:{debug:(e,t)=>console.debug(i,e,t),info:(e,t)=>console.info(i,e,t),warn:(e,t)=>console.warn(i,e,t),error:(e,t)=>console.error(i,e,t)},openUrl:$w(t),dispatch:eT(n),endpoints:void 0}}function rT(e,t,n){return Qt(dr({name:`PluginRuntimeScope:${e}`,inheritAttrs:!1,setup(r,{attrs:i,slots:a}){return Vn(zy,nT({scope:e,toolName:t})),()=>Ja(n,i,a)}}))}var iT={"@mulmoclaude/markdown-plugin":{toolName:MC.toolDefinition.name,viewComponent:rT(`markdown`,MC.toolDefinition.name,MC.viewComponent),css:`/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
183
183
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.static{position:static}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-auto{margin:auto}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mr-auto{margin-right:auto}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-full{min-height:100%}.w-full{width:100%}.max-w-none{max-width:none}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-words{overflow-wrap:break-word}.whitespace-pre-line{white-space:pre-line}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-purple-700{color:var(--color-purple-700)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.italic{font-style:italic}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.marp-container[data-v-1ec606a9]{background:#f8fafc;border-radius:6px;flex-direction:column;width:100%;display:flex}.marp-frame-wrapper[data-v-1ec606a9]{flex:1;min-height:0;overflow-y:auto}.marp-frame[data-v-1ec606a9]{background:0 0;border:none;display:block}.load-error-banner[data-v-1ec606a9]{color:#b71c1c;background:#fdecea;border:1px solid #f5c2c7;border-radius:4px;margin:.75rem 1rem;padding:.5rem .75rem;font-size:.875rem}.marp-split-textarea[data-v-dfff3148]{color:#333;resize:none;background:#fff;border:none;border-radius:0;width:100%;padding:1rem;font-family:Courier New,monospace;font-size:.9rem;line-height:1.5}.marp-split-textarea[data-v-dfff3148]:focus{outline:none}.markdown-container[data-v-0b1ec4b2]{background:#fff;flex-direction:column;width:100%;height:100%;display:flex}.markdown-content-wrapper[data-v-0b1ec4b2]{flex:1;min-height:0;overflow-y:auto}.markdown-content[data-v-0b1ec4b2] h1{margin-top:1em;margin-bottom:.5em;font-size:2rem;font-weight:700}.markdown-content[data-v-0b1ec4b2] h2{margin-top:1em;margin-bottom:.5em;font-size:1.75rem;font-weight:700}.markdown-content[data-v-0b1ec4b2] h3{margin-top:1em;margin-bottom:.5em;font-size:1.5rem;font-weight:700}.markdown-content[data-v-0b1ec4b2] h4{margin-top:1em;margin-bottom:.5em;font-size:1.25rem;font-weight:700}.markdown-content[data-v-0b1ec4b2] h5{margin-top:1em;margin-bottom:.5em;font-size:1.125rem;font-weight:700}.markdown-content[data-v-0b1ec4b2] h6{margin-top:1em;margin-bottom:.5em;font-size:1rem;font-weight:700}.bottom-bar-wrapper[data-v-0b1ec4b2]{flex-shrink:0;position:relative}.copy-btn[data-v-0b1ec4b2]{color:#333;cursor:pointer;z-index:1;background:0 0;border:none;padding:.4rem;position:absolute;bottom:.3rem;right:.65rem}.copy-btn[data-v-0b1ec4b2]:hover{color:#000}.copy-btn .material-icons[data-v-0b1ec4b2]{font-size:1.15rem}.markdown-source[data-v-0b1ec4b2]{background:#f5f5f5;border-top:1px solid #e0e0e0;flex-shrink:0;padding:.5rem;font-family:monospace;font-size:.85rem}.markdown-source summary[data-v-0b1ec4b2]{cursor:pointer;-webkit-user-select:none;user-select:none;color:#333;background:#e8e8e8;border-radius:4px;padding:.5rem;font-weight:500}.markdown-source[open] summary[data-v-0b1ec4b2]{margin-bottom:.5rem}.markdown-source summary[data-v-0b1ec4b2]:hover{background:#d8d8d8}.markdown-editor[data-v-0b1ec4b2]{color:#333;resize:vertical;background:#fff;border:1px solid #ccc;border-radius:4px;width:100%;height:40vh;margin-bottom:.5rem;padding:1rem;font-family:Courier New,monospace;font-size:.9rem;line-height:1.5}.markdown-editor[data-v-0b1ec4b2]:focus{border-color:#4caf50;outline:none;box-shadow:0 0 0 2px #4caf501a}.apply-btn[data-v-0b1ec4b2]{color:#fff;cursor:pointer;background:#4caf50;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.9rem;font-weight:500;transition:background .2s}.apply-btn[data-v-0b1ec4b2]:hover{background:#45a049}.apply-btn[data-v-0b1ec4b2]:active{background:#3d8b40}.apply-btn[data-v-0b1ec4b2]:disabled{color:#666;cursor:not-allowed;opacity:.6;background:#ccc}.apply-btn[data-v-0b1ec4b2]:disabled:hover{background:#ccc}.editor-actions[data-v-0b1ec4b2]{justify-content:space-between;display:flex}.save-error[data-v-0b1ec4b2]{color:#b71c1c;background:#fdecea;border:1px solid #f5c2c7;border-radius:4px;margin:.5rem 0 0;padding:.4rem .6rem;font-size:.85rem}.load-error-banner[data-v-0b1ec4b2]{color:#b71c1c;background:#fdecea;border:1px solid #f5c2c7;border-radius:4px;margin:.75rem 1rem;padding:.5rem .75rem;font-size:.875rem}.cancel-btn[data-v-0b1ec4b2]{color:#333;cursor:pointer;background:#e0e0e0;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.9rem;font-weight:500;transition:background .2s}.cancel-btn[data-v-0b1ec4b2]:hover{background:#d0d0d0}`},"@mulmoclaude/form-plugin":{toolName:jw.toolDefinition.name,viewComponent:jw.viewComponent,css:`/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
184
184
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-amber-600:oklch(66.6% .179 58.318);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-50:oklch(96.2% .018 272.314);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-semibold:600;--font-weight-bold:700;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-1{margin-left:var(--spacing)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-12{height:calc(var(--spacing) * 12)}.h-full{height:100%}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-500{border-color:var(--color-red-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-white{background-color:var(--color-white)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-8{padding:calc(var(--spacing) * 8)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.text-center{text-align:center}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}@media (hover:hover){.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:underline:hover{text-decoration-line:underline}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}.form-field[data-v-2b6705b6]{transition:all .2s}.form-field.has-error[data-v-2b6705b6]{animation:.3s shake-2b6705b6}@keyframes shake-2b6705b6{0%,to{transform:translate(0)}25%{transform:translate(-5px)}75%{transform:translate(5px)}}`},"@mulmochat-plugin/generate-image":{toolName:Xw.plugin.toolDefinition.name,viewComponent:Xw.plugin.viewComponent,css:`/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
185
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-4{margin-top:calc(var(--spacing) * 4)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.h-auto{height:auto}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-full{min-height:100%}.w-full{width:100%}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.bg-gray-100{background-color:var(--color-gray-100)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-400{color:var(--color-gray-400)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.italic{font-style:italic}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (prefers-color-scheme:dark){.dark\\:bg-gray-800{background-color:var(--color-gray-800)}.dark\\:text-gray-300{color:var(--color-gray-300)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`}},aT=Object.assign({}),oT=iv,sT={};for(let e of oT.packages??[]){let t=iT[e];t&&(sT[t.toolName]=t)}var cT=new Set(oT.local??[]);for(let[e,t]of Object.entries(aT)){let n=e.split(`/`).slice(-2)[0];cT.has(n)&&(sT[t.REGISTRATION.toolName]=t.REGISTRATION)}function lT(e){return sT[e]}var uT=new Set;function dT(e){if(!e)return;let t=e.match(/@property\s+--[^{]+\{[^}]*\}/g);if(!t)return;let n=t.join(`
186
- `);if(uT.has(n))return;uT.add(n);let r=document.createElement(`style`);r.setAttribute(`data-gui-plugin-tw-properties`,``),r.textContent=n,document.head.appendChild(r)}var fT=ss(dr({__name:`PluginFrame`,props:{css:{}},setup(e){let t=e,n=I(),r=I(null);return Er(()=>{dT(t.css);let e=n.value;if(!e)return;let i=e.attachShadow({mode:`open`});if(t.css){let e=document.createElement(`style`);e.textContent=t.css,i.appendChild(e)}let a=document.createElement(`div`);a.style.background=`#ffffff`,a.style.color=`#111827`,a.style.borderRadius=`8px`,a.style.overflow=`hidden`,i.appendChild(a),r.value=a}),(e,t)=>(z(),B(`div`,{ref_key:`hostEl`,ref:n,class:`plugin-frame-host`},[r.value?(z(),da(or,{key:0,to:r.value},[Vr(e.$slots,`default`,{},void 0,!0)],8,[`to`])):H(``,!0)],512))}}),[[`__scopeId`,`data-v-5e7324b3`]]),pT={class:`gui-panel`},mT={class:`header`},hT=[`aria-pressed`],gT={class:`content`},_T={key:0,class:`empty`},vT=ss(dr({__name:`GuiPanel`,props:{sessionId:{},sendTextMessage:{type:Function},toolsOpen:{type:Boolean}},emits:[`toggleTools`],setup(e,{emit:t}){let n=e,r=t,i=I([]),a=e=>`session:${e}`;function o(e){let t=i.value.findIndex(t=>t.uuid===e.uuid);t>=0?i.value[t]=e:i.value=[...i.value,e]}async function s(e){try{let t=await fetch(`/api/agent/toolResults/${encodeURIComponent(e)}`);if(e!==n.sessionId)return;if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(e!==n.sessionId)return;i.value=r.toolResults??[]}catch{e===n.sessionId&&(i.value=[])}}let{subscribe:c}=rv(),l;function u(e){l?.(),l=void 0,e&&(l=c(a(e),e=>o(e)))}Gn(()=>n.sessionId,e=>{e?s(e):i.value=[],u(e)},{immediate:!0}),Ar(()=>l?.());async function d(e,t){let r={...e,...t};if(o(r),n.sessionId)try{await fetch(`/api/agent/toolResult`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({...r,sessionId:n.sessionId,persistOnly:!0})})}catch{}}let f=U(()=>i.value.length>0);return(t,n)=>(z(),B(`section`,pT,[V(`div`,mT,[n[1]||=V(`span`,{class:`title`},`GUI`,-1),V(`button`,{type:`button`,class:Ce([`gear`,{active:e.toolsOpen}]),title:`Tools & tool-call history`,"aria-label":`Toggle tools pane`,"aria-pressed":e.toolsOpen?`true`:`false`,onClick:n[0]||=e=>r(`toggleTools`)},` ⚙ `,10,hT)]),V(`div`,gT,[f.value?H(``,!0):(z(),B(`div`,_T,[...n[2]||=[ba(` Ask Claude to use `,-1),V(`code`,null,`presentDocument`,-1),ba(` or `,-1),V(`code`,null,`presentForm`,-1),ba(` to render content here. `,-1)]])),(z(!0),B(R,null,Br(i.value,t=>(z(),B(R,{key:t.uuid},[L(lT)(t.toolName)?(z(),da(fT,{key:0,class:`frame`,css:L(lT)(t.toolName).css},{default:Rn(()=>[(z(),da(Lr(L(lT)(t.toolName).viewComponent),{"selected-result":t,"send-text-message":e.sendTextMessage,onUpdateResult:e=>d(t,e)},null,40,[`selected-result`,`send-text-message`,`onUpdateResult`]))]),_:2},1032,[`css`])):H(``,!0)],64))),128))])]))}}),[[`__scopeId`,`data-v-51ab822d`]]),yT={class:`tools-pane`},bT={class:`content`},xT={class:`section`},ST={key:0,class:`muted`},CT=[`onClick`],wT={class:`tool-name`},TT={key:0,class:`caret`},ET={key:0,class:`tool-desc`},DT={class:`section`},OT={class:`section-title section-title--with-action`},kT=[`disabled`,`title`,`aria-label`],AT={key:0,class:`muted`},jT=[`onClick`],MT={class:`call-name`},NT={class:`call-meta`},PT={key:0,class:`badge running`},FT={key:1,class:`badge failed`},IT={key:2,class:`badge done`},LT={class:`time`},RT={key:0,class:`call-body`},zT={class:`block`},BT={class:`label`},VT={key:1,class:`muted italic`},HT=ss(dr({__name:`ToolsPane`,props:{sessionId:{}},setup(e){let t=e,n=I([]),r=I([]),i=I(new Set),a=I(new Set);async function o(){try{let e=await fetch(`/api/tools`);if(!e.ok)throw Error(`HTTP ${e.status}`);n.value=(await e.json()).tools??[]}catch{n.value=[]}}o();function s(e,t){return e.toolUseId??`${e.toolName}-${t}`}function c(e){let t=r.value,n=e.toolUseId?t.findIndex(t=>t.toolUseId===e.toolUseId):-1;n>=0?t[n]=e:r.value=[...t,e]}async function l(e){try{let n=await fetch(`/api/tool-calls/${encodeURIComponent(e)}`);if(e!==t.sessionId)return;if(!n.ok)throw Error(`HTTP ${n.status}`);let i=await n.json();if(e!==t.sessionId)return;r.value=i.toolCalls??[]}catch{e===t.sessionId&&(r.value=[])}}let{subscribe:u}=rv(),d;function f(e){d?.(),d=void 0,e&&(d=u(`toolcalls:${e}`,e=>c(e)))}Gn(()=>t.sessionId,e=>{a.value=new Set,e?l(e):r.value=[],f(e)},{immediate:!0}),Ar(()=>d?.());function p(e){let t=new Set(i.value);t.has(e)?t.delete(e):t.add(e),i.value=t}function m(e){let t=new Set(a.value);t.has(e)?t.delete(e):t.add(e),a.value=t}function h(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function g(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}let _=I(!1),v;async function y(){if(r.value.length!==0)try{await window.navigator.clipboard.writeText(JSON.stringify(r.value,null,2)),_.value=!0,window.clearTimeout(v),v=window.setTimeout(()=>{_.value=!1},2e3)}catch{}}return Ar(()=>window.clearTimeout(v)),(e,t)=>(z(),B(`section`,yT,[t[3]||=V(`div`,{class:`header`},[V(`span`,{class:`title`},`Tools`)],-1),V(`div`,bT,[V(`div`,xT,[t[0]||=V(`div`,{class:`section-title`},`Available Tools`,-1),n.value.length===0?(z(),B(`div`,ST,`No GUI plugin tools enabled.`)):H(``,!0),(z(!0),B(R,null,Br(n.value,e=>(z(),B(`div`,{key:e.toolName,class:`tool`},[V(`button`,{class:`tool-head`,type:`button`,onClick:t=>p(e.toolName)},[V(`code`,wT,N(e.toolName),1),e.description?(z(),B(`span`,TT,N(i.value.has(e.toolName)?`▲`:`▼`),1)):H(``,!0)],8,CT),i.value.has(e.toolName)?(z(),B(`div`,ET,N(e.description),1)):H(``,!0)]))),128))]),V(`div`,DT,[V(`div`,OT,[t[1]||=V(`span`,null,`Tool Call History`,-1),V(`button`,{class:`copy-history`,type:`button`,disabled:r.value.length===0,title:_.value?`Copied!`:`Copy all call history`,"aria-label":_.value?`Copied!`:`Copy all call history`,onClick:y},N(_.value?`✓ Copied`:`Copy all`),9,kT)]),r.value.length===0?(z(),B(`div`,AT,`No tool calls yet.`)):H(``,!0),(z(!0),B(R,null,Br(r.value,(e,n)=>(z(),B(`div`,{key:s(e,n),class:`call`},[V(`button`,{class:`call-head`,type:`button`,onClick:t=>m(s(e,n))},[V(`code`,MT,N(e.toolName),1),V(`span`,NT,[e.status===`running`?(z(),B(`span`,PT,`running…`)):e.status===`failed`?(z(),B(`span`,FT,`failed`)):(z(),B(`span`,IT,N(e.durationMs==null?`done`:`${e.durationMs} ms`),1)),V(`span`,LT,N(h(e.at)),1)])],8,jT),a.value.has(s(e,n))?(z(),B(`div`,RT,[t[2]||=V(`div`,{class:`label`},`arguments`,-1),V(`pre`,zT,N(g(e.toolInput)),1),e.status===`completed`||e.status===`failed`?(z(),B(R,{key:0},[V(`div`,BT,N(e.status===`failed`?`error`:`result`),1),V(`pre`,{class:Ce([`block`,e.status===`failed`?`error`:`result`])},N(g(e.toolOutput)||`(no output)`),3)],64)):(z(),B(`div`,VT,`Waiting for result…`))])):H(``,!0)]))),128))])])]))}}),[[`__scopeId`,`data-v-167cc06d`]]);function UT(e,t,n){if(n||e.length===0)return t;let r=new Map(t.map(e=>[e.id,e])),i=new Set(e.map(e=>e.id)),a=e.filter(e=>r.has(e.id)).map(e=>r.get(e.id));return[...t.filter(e=>!i.has(e.id)),...a]}function WT(){let e=I([]),t=I(!0),n=I(null);async function r(r=!1){try{let t=await fetch(`/api/sessions`);if(!t.ok)throw Error(`HTTP ${t.status}`);let i=await t.json();e.value=UT(e.value,i.sessions??[],r),n.value=null}catch(t){e.value.length===0&&(n.value=t instanceof Error?t.message:String(t))}finally{t.value=!1}}function i(){return r(!0)}let{subscribe:a}=rv(),o;return Er(()=>{r(),o=a(`sessions`,()=>r())}),Ar(()=>o?.()),{sessions:e,loading:t,error:n,load:r,refresh:i}}var GT={class:`main`},KT=[`aria-valuenow`,`aria-valuemax`],qT=320,JT=360;ns(ss(dr({__name:`App`,setup(e){let t=I(null),n=I(0),r=I(null),{sessions:i,loading:a,error:o,refresh:s}=WT(),c=I(`all`),l=I(Number(localStorage.getItem(`terminal_width`))||560),u=I(window.innerWidth),d=U(()=>Math.max(qT,u.value-JT));function f(e){return Math.max(qT,Math.min(e,d.value))}function p(){localStorage.setItem(`terminal_width`,String(l.value))}let m=null;function h(e){e.preventDefault();let t=e.clientX,n=l.value,r=e=>{l.value=f(n+(e.clientX-t))},i=()=>{p(),m?.()};m=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),document.body.style.cursor=``,document.body.style.userSelect=``,m=null},document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i)}function g(e){if(e.key===`ArrowLeft`)l.value=f(l.value-16);else if(e.key===`ArrowRight`)l.value=f(l.value+16);else if(e.key===`Home`)l.value=qT;else if(e.key===`End`)l.value=d.value;else return;e.preventDefault(),p()}function _(){u.value=window.innerWidth,l.value=f(l.value)}Er(()=>window.addEventListener(`resize`,_)),Ar(()=>{m?.(),window.removeEventListener(`resize`,_)});let v=I(localStorage.getItem(`session_layout`)===`horizontal`?`horizontal`:`vertical`);Gn(v,e=>localStorage.setItem(`session_layout`,e));function y(){v.value=v.value===`vertical`?`horizontal`:`vertical`}let b=I(localStorage.getItem(`tools_pane_visible`)===`true`);Gn(b,e=>localStorage.setItem(`tools_pane_visible`,String(e)));function x(){b.value=!b.value}function S(e){return r.value?.submitText(e)??!1}function C(e){t.value=e,n.value++}function ee(){t.value=null,n.value++}function te(e){t.value=e}return(e,u)=>(z(),B(`div`,{class:Ce([`app`,v.value===`horizontal`?`app-horizontal`:`app-vertical`])},[v.value===`vertical`?(z(),da(xs,{key:0,filter:c.value,"onUpdate:filter":u[0]||=e=>c.value=e,sessions:L(i),loading:L(a),error:L(o),"active-id":t.value,onSelect:C,onNew:ee,onToggleLayout:y,onRefresh:L(s)},null,8,[`filter`,`sessions`,`loading`,`error`,`active-id`,`onRefresh`])):(z(),da(js,{key:1,filter:c.value,"onUpdate:filter":u[1]||=e=>c.value=e,sessions:L(i),"active-id":t.value,onSelect:C,onNew:ee,onToggleLayout:y,onRefresh:L(s)},null,8,[`filter`,`sessions`,`active-id`,`onRefresh`])),V(`div`,GT,[ga(ug,{ref_key:`terminalRef`,ref:r,class:`terminal-pane`,style:ve({flex:`0 0 ${l.value}px`}),"session-id":t.value,"connect-key":n.value,onSession:te},null,8,[`style`,`session-id`,`connect-key`]),V(`div`,{class:`splitter`,role:`separator`,tabindex:`0`,"aria-orientation":`vertical`,"aria-label":`Resize terminal`,"aria-valuenow":l.value,"aria-valuemin":qT,"aria-valuemax":d.value,title:`Drag (or use arrow keys) to resize the terminal`,onMousedown:h,onKeydown:g},null,40,KT),ga(vT,{"session-id":t.value,"send-text-message":S,"tools-open":b.value,onToggleTools:x},null,8,[`session-id`,`tools-open`]),b.value?(z(),da(HT,{key:0,"session-id":t.value},null,8,[`session-id`])):H(``,!0)])],2))}}),[[`__scopeId`,`data-v-be189b61`]])).mount(`#app`);export{d as i,o as n,c as r,s as t};
185
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-4{margin-top:calc(var(--spacing) * 4)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.table{display:table}.h-auto{height:auto}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-full{min-height:100%}.w-full{width:100%}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.bg-gray-100{background-color:var(--color-gray-100)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-400{color:var(--color-gray-400)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.italic{font-style:italic}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (prefers-color-scheme:dark){.dark\\:bg-gray-800{background-color:var(--color-gray-800)}.dark\\:text-gray-300{color:var(--color-gray-300)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}`}},aT=Object.assign({}),oT=iv,sT={};for(let e of oT.packages??[]){let t=iT[e];t&&(sT[t.toolName]=t)}var cT=new Set(oT.local??[]);for(let[e,t]of Object.entries(aT)){let n=e.split(`/`).slice(-2)[0];cT.has(n)&&(sT[t.REGISTRATION.toolName]=t.REGISTRATION)}function lT(e){return sT[e]}var uT=new Set;function dT(e){if(!e)return;let t=e.match(/@property\s+--[^{]+\{[^}]*\}/g);if(!t)return;let n=t.join(`
186
+ `);if(uT.has(n))return;uT.add(n);let r=document.createElement(`style`);r.setAttribute(`data-gui-plugin-tw-properties`,``),r.textContent=n,document.head.appendChild(r)}var fT=ss(dr({__name:`PluginFrame`,props:{css:{}},setup(e){let t=e,n=I(),r=I(null);return Er(()=>{dT(t.css);let e=n.value;if(!e)return;let i=e.attachShadow({mode:`open`});if(t.css){let e=document.createElement(`style`);e.textContent=t.css,i.appendChild(e)}let a=document.createElement(`div`);a.style.background=`#ffffff`,a.style.color=`#111827`,a.style.borderRadius=`8px`,a.style.overflow=`hidden`,i.appendChild(a),r.value=a}),(e,t)=>(z(),B(`div`,{ref_key:`hostEl`,ref:n,class:`plugin-frame-host`},[r.value?(z(),da(or,{key:0,to:r.value},[Vr(e.$slots,`default`,{},void 0,!0)],8,[`to`])):H(``,!0)],512))}}),[[`__scopeId`,`data-v-5e7324b3`]]),pT={class:`gui-panel`},mT={class:`header`},hT={class:`content`},gT={key:0,class:`empty`},_T=ss(dr({__name:`GuiPanel`,props:{sessionId:{},sendTextMessage:{type:Function},toolsOpen:{type:Boolean}},emits:[`toggleTools`],setup(e,{emit:t}){let n=e,r=t,i=I([]),a=e=>`session:${e}`;function o(e){let t=i.value.findIndex(t=>t.uuid===e.uuid);t>=0?i.value[t]=e:i.value=[...i.value,e]}async function s(e){try{let t=await fetch(`/api/agent/toolResults/${encodeURIComponent(e)}`);if(e!==n.sessionId)return;if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(e!==n.sessionId)return;i.value=r.toolResults??[]}catch{e===n.sessionId&&(i.value=[])}}let{subscribe:c}=rv(),l;function u(e){l?.(),l=void 0,e&&(l=c(a(e),e=>o(e)))}Gn(()=>n.sessionId,e=>{e?s(e):i.value=[],u(e)},{immediate:!0}),Ar(()=>l?.());async function d(e,t){let r={...e,...t};if(o(r),n.sessionId)try{await fetch(`/api/agent/toolResult`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({...r,sessionId:n.sessionId,persistOnly:!0})})}catch{}}let f=U(()=>i.value.length>0);return(t,n)=>(z(),B(`section`,pT,[V(`div`,mT,[n[2]||=V(`span`,{class:`title`},`Canvas`,-1),e.toolsOpen?H(``,!0):(z(),B(`button`,{key:0,type:`button`,class:`gear`,title:`Tools & tool-call history`,"aria-label":`Open tools pane`,onClick:n[0]||=e=>r(`toggleTools`)},[...n[1]||=[V(`span`,{class:`material-symbols-outlined`},`build`,-1)]]))]),V(`div`,hT,[f.value?H(``,!0):(z(),B(`div`,gT,[...n[3]||=[ba(` Ask Claude to use `,-1),V(`code`,null,`presentDocument`,-1),ba(` or `,-1),V(`code`,null,`presentForm`,-1),ba(` to render content here. `,-1)]])),(z(!0),B(R,null,Br(i.value,t=>(z(),B(R,{key:t.uuid},[L(lT)(t.toolName)?(z(),da(fT,{key:0,class:`frame`,css:L(lT)(t.toolName).css},{default:Rn(()=>[(z(),da(Lr(L(lT)(t.toolName).viewComponent),{"selected-result":t,"send-text-message":e.sendTextMessage,onUpdateResult:e=>d(t,e)},null,40,[`selected-result`,`send-text-message`,`onUpdateResult`]))]),_:2},1032,[`css`])):H(``,!0)],64))),128))])]))}}),[[`__scopeId`,`data-v-521a4a6f`]]),vT={class:`tools-pane`},yT={class:`header`},bT={class:`content`},xT={class:`section`},ST={key:0,class:`muted`},CT=[`onClick`],wT={class:`tool-name`},TT={key:0,class:`caret material-symbols-outlined`},ET={key:0,class:`tool-desc`},DT={class:`section`},OT={class:`section-title section-title--with-action`},kT=[`disabled`,`title`,`aria-label`],AT={class:`material-symbols-outlined`},jT={key:0,class:`muted`},MT=[`onClick`],NT={class:`call-name`},PT={class:`call-meta`},FT={key:0,class:`badge running`},IT={key:1,class:`badge failed`},LT={key:2,class:`badge done`},RT={class:`time`},zT={key:0,class:`call-body`},BT={class:`block`},VT={class:`label`},HT={key:1,class:`muted italic`},UT=ss(dr({__name:`ToolsPane`,props:{sessionId:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=I([]),a=I([]),o=I(new Set),s=I(new Set);async function c(){try{let e=await fetch(`/api/tools`);if(!e.ok)throw Error(`HTTP ${e.status}`);i.value=(await e.json()).tools??[]}catch{i.value=[]}}c();function l(e,t){return e.toolUseId??`${e.toolName}-${t}`}function u(e){let t=a.value,n=e.toolUseId?t.findIndex(t=>t.toolUseId===e.toolUseId):-1;n>=0?t[n]=e:a.value=[...t,e]}async function d(e){try{let t=await fetch(`/api/tool-calls/${encodeURIComponent(e)}`);if(e!==n.sessionId)return;if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(e!==n.sessionId)return;a.value=r.toolCalls??[]}catch{e===n.sessionId&&(a.value=[])}}let{subscribe:f}=rv(),p;function m(e){p?.(),p=void 0,e&&(p=f(`toolcalls:${e}`,e=>u(e)))}Gn(()=>n.sessionId,e=>{s.value=new Set,e?d(e):a.value=[],m(e)},{immediate:!0}),Ar(()=>p?.());function h(e){let t=new Set(o.value);t.has(e)?t.delete(e):t.add(e),o.value=t}function g(e){let t=new Set(s.value);t.has(e)?t.delete(e):t.add(e),s.value=t}function _(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function v(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}let y=I(!1),b;async function x(){if(a.value.length!==0)try{await window.navigator.clipboard.writeText(JSON.stringify(a.value,null,2)),y.value=!0,window.clearTimeout(b),b=window.setTimeout(()=>{y.value=!1},2e3)}catch{}}return Ar(()=>window.clearTimeout(b)),(e,t)=>(z(),B(`section`,vT,[V(`div`,yT,[t[2]||=V(`span`,{class:`title`},`Tools`,-1),V(`button`,{type:`button`,class:`close-btn`,title:`Close tools pane`,"aria-label":`Close tools pane`,onClick:t[0]||=e=>r(`close`)},[...t[1]||=[V(`span`,{class:`material-symbols-outlined`},`close`,-1)]])]),V(`div`,bT,[V(`div`,xT,[t[3]||=V(`div`,{class:`section-title`},`Available Tools`,-1),i.value.length===0?(z(),B(`div`,ST,`No GUI plugin tools enabled.`)):H(``,!0),(z(!0),B(R,null,Br(i.value,e=>(z(),B(`div`,{key:e.toolName,class:`tool`},[V(`button`,{class:`tool-head`,type:`button`,onClick:t=>h(e.toolName)},[V(`code`,wT,N(e.toolName),1),e.description?(z(),B(`span`,TT,N(o.value.has(e.toolName)?`expand_less`:`expand_more`),1)):H(``,!0)],8,CT),o.value.has(e.toolName)?(z(),B(`div`,ET,N(e.description),1)):H(``,!0)]))),128))]),V(`div`,DT,[V(`div`,OT,[t[4]||=V(`span`,null,`Tool Call History`,-1),V(`button`,{class:`copy-history`,type:`button`,disabled:a.value.length===0,title:y.value?`Copied!`:`Copy all call history`,"aria-label":y.value?`Copied!`:`Copy all call history`,onClick:x},[V(`span`,AT,N(y.value?`check`:`content_copy`),1),ba(` `+N(y.value?`Copied`:`Copy all`),1)],8,kT)]),a.value.length===0?(z(),B(`div`,jT,`No tool calls yet.`)):H(``,!0),(z(!0),B(R,null,Br(a.value,(e,n)=>(z(),B(`div`,{key:l(e,n),class:`call`},[V(`button`,{class:`call-head`,type:`button`,onClick:t=>g(l(e,n))},[V(`code`,NT,N(e.toolName),1),V(`span`,PT,[e.status===`running`?(z(),B(`span`,FT,`running…`)):e.status===`failed`?(z(),B(`span`,IT,`failed`)):(z(),B(`span`,LT,N(e.durationMs==null?`done`:`${e.durationMs} ms`),1)),V(`span`,RT,N(_(e.at)),1)])],8,MT),s.value.has(l(e,n))?(z(),B(`div`,zT,[t[5]||=V(`div`,{class:`label`},`arguments`,-1),V(`pre`,BT,N(v(e.toolInput)),1),e.status===`completed`||e.status===`failed`?(z(),B(R,{key:0},[V(`div`,VT,N(e.status===`failed`?`error`:`result`),1),V(`pre`,{class:Ce([`block`,e.status===`failed`?`error`:`result`])},N(v(e.toolOutput)||`(no output)`),3)],64)):(z(),B(`div`,HT,`Waiting for result…`))])):H(``,!0)]))),128))])])]))}}),[[`__scopeId`,`data-v-f764a9b2`]]);function WT(e,t,n){if(n||e.length===0)return t;let r=new Map(t.map(e=>[e.id,e])),i=new Set(e.map(e=>e.id)),a=e.filter(e=>r.has(e.id)).map(e=>r.get(e.id));return[...t.filter(e=>!i.has(e.id)),...a]}function GT(){let e=I([]),t=I(!0),n=I(null);async function r(r=!1){try{let t=await fetch(`/api/sessions`);if(!t.ok)throw Error(`HTTP ${t.status}`);let i=await t.json();e.value=WT(e.value,i.sessions??[],r),n.value=null}catch(t){e.value.length===0&&(n.value=t instanceof Error?t.message:String(t))}finally{t.value=!1}}function i(){return r(!0)}let{subscribe:a}=rv(),o;return Er(()=>{r(),o=a(`sessions`,()=>r())}),Ar(()=>o?.()),{sessions:e,loading:t,error:n,load:r,refresh:i}}var KT={class:`shell`},qT={class:`main`},JT=[`aria-valuenow`,`aria-valuemax`],YT=320,XT=360;ns(ss(dr({__name:`App`,setup(e){let t=I(null),n=I(0),r=I(null),{sessions:i,loading:a,error:o,refresh:s}=GT(),c=I(`all`),l=I(Number(localStorage.getItem(`terminal_width`))||560),u=I(window.innerWidth),d=U(()=>Math.max(YT,u.value-XT));function f(e){return Math.max(YT,Math.min(e,d.value))}function p(){localStorage.setItem(`terminal_width`,String(l.value))}let m=null;function h(e){e.preventDefault();let t=e.clientX,n=l.value,r=e=>{l.value=f(n+(e.clientX-t))},i=()=>{p(),m?.()};m=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i),document.body.style.cursor=``,document.body.style.userSelect=``,m=null},document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i)}function g(e){if(e.key===`ArrowLeft`)l.value=f(l.value-16);else if(e.key===`ArrowRight`)l.value=f(l.value+16);else if(e.key===`Home`)l.value=YT;else if(e.key===`End`)l.value=d.value;else return;e.preventDefault(),p()}function _(){u.value=window.innerWidth,l.value=f(l.value)}Er(()=>window.addEventListener(`resize`,_)),Ar(()=>{m?.(),window.removeEventListener(`resize`,_)});let v=I(localStorage.getItem(`session_layout`)===`horizontal`?`horizontal`:`vertical`);Gn(v,e=>localStorage.setItem(`session_layout`,e));function y(){v.value=v.value===`vertical`?`horizontal`:`vertical`}let b=I(localStorage.getItem(`tools_pane_visible`)===`true`);Gn(b,e=>localStorage.setItem(`tools_pane_visible`,String(e)));function x(){b.value=!b.value}function S(e){return r.value?.submitText(e)??!1}function C(e){t.value=e,n.value++}function ee(){t.value=null,n.value++}function te(e){t.value=e}return(e,u)=>(z(),B(`div`,KT,[u[2]||=V(`header`,{class:`toolbar`},[V(`span`,{class:`toolbar-title`},`MulmoTerminal`)],-1),V(`div`,{class:Ce([`app`,v.value===`horizontal`?`app-horizontal`:`app-vertical`])},[v.value===`vertical`?(z(),da(xs,{key:0,filter:c.value,"onUpdate:filter":u[0]||=e=>c.value=e,sessions:L(i),loading:L(a),error:L(o),"active-id":t.value,onSelect:C,onNew:ee,onToggleLayout:y,onRefresh:L(s)},null,8,[`filter`,`sessions`,`loading`,`error`,`active-id`,`onRefresh`])):(z(),da(js,{key:1,filter:c.value,"onUpdate:filter":u[1]||=e=>c.value=e,sessions:L(i),"active-id":t.value,onSelect:C,onNew:ee,onToggleLayout:y,onRefresh:L(s)},null,8,[`filter`,`sessions`,`active-id`,`onRefresh`])),V(`div`,qT,[ga(ug,{ref_key:`terminalRef`,ref:r,class:`terminal-pane`,style:ve({flex:`0 0 ${l.value}px`}),"session-id":t.value,"connect-key":n.value,onSession:te},null,8,[`style`,`session-id`,`connect-key`]),V(`div`,{class:`splitter`,role:`separator`,tabindex:`0`,"aria-orientation":`vertical`,"aria-label":`Resize terminal`,"aria-valuenow":l.value,"aria-valuemin":YT,"aria-valuemax":d.value,title:`Drag (or use arrow keys) to resize the terminal`,onMousedown:h,onKeydown:g},null,40,JT),ga(_T,{"session-id":t.value,"send-text-message":S,"tools-open":b.value,onToggleTools:x},null,8,[`session-id`,`tools-open`]),b.value?(z(),da(UT,{key:0,"session-id":t.value,onClose:x},null,8,[`session-id`])):H(``,!0)])],2)]))}}),[[`__scopeId`,`data-v-65bcd8e9`]])).mount(`#app`);export{d as i,o as n,c as r,s as t};