uEdition-Editor 2.0.0b5__py3-none-any.whl → 2.0.0b7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of uEdition-Editor might be problematic. Click here for more details.

@@ -1,17 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-B8N4a0_6.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-DaKNV6gH.js"])))=>i.map(i=>d[i]);
2
- var _f=Object.defineProperty;var Po=t=>{throw TypeError(t)};var gf=(t,e,n)=>e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var gs=(t,e,n)=>gf(t,typeof e!="symbol"?e+"":e,n),bs=(t,e,n)=>e.has(t)||Po("Cannot "+n);var T=(t,e,n)=>(bs(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?Po("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),re=(t,e,n,r)=>(bs(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),$e=(t,e,n)=>(bs(t,e,"access private method"),n);var Oi=(t,e,n,r)=>({set _(i){re(t,e,i,n)},get _(){return T(t,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function ce(){}const ts=t=>t;function ne(t,e){for(const n in e)t[n]=e[n];return t}function ra(t){return t()}function Lo(){return Object.create(null)}function Te(t){t.forEach(ra)}function Zn(t){return typeof t=="function"}function fe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ai;function q0(t,e){return t===e?!0:(Ai||(Ai=document.createElement("a")),Ai.href=e,t===Ai.href)}function bf(t){return Object.keys(t).length===0}function so(t,...e){if(t==null){for(const r of e)r(void 0);return ce}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function $r(t){let e;return so(t,n=>e=n)(),e}function x(t,e,n){t.$$.on_destroy.push(so(e,n))}function de(t,e,n,r){if(t){const i=ia(t,e,n,r);return t[0](i)}}function ia(t,e,n,r){return t[1]&&r?ne(n.ctx.slice(),t[1](r(e))):n.ctx}function me(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],o=Math.max(e.dirty.length,i.length);for(let u=0;u<o;u+=1)s[u]=e.dirty[u]|i[u];return s}return e.dirty|i}return e.dirty}function pe(t,e,n,r,i,s){if(i){const o=ia(e,n,r,s);t.p(o,i)}}function he(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let r=0;r<n;r++)e[r]=-1;return e}return-1}function yt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function je(t,e){const n={};e=new Set(e);for(const r in t)!e.has(r)&&r[0]!=="$"&&(n[r]=t[r]);return n}function Be(t){return t&&Zn(t.destroy)?t.destroy:ce}const sa=typeof window<"u";let oo=sa?()=>window.performance.now():()=>Date.now(),lo=sa?t=>requestAnimationFrame(t):ce;const or=new Set;function oa(t){or.forEach(e=>{e.c(t)||(or.delete(e),e.f())}),or.size!==0&&lo(oa)}function uo(t){let e;return or.size===0&&lo(oa),{promise:new Promise(n=>{or.add(e={c:t,f:n})}),abort(){or.delete(e)}}}function P(t,e){t.appendChild(e)}function la(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function yf(t){const e=S("style");return e.textContent="/* empty */",vf(la(t),e),e.sheet}function vf(t,e){return P(t.head||t,e),e.sheet}function w(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function fi(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function S(t){return document.createElement(t)}function Ds(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function U(){return Z(" ")}function Fe(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function M(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const kf=["width","height"];function ie(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)e[r]==null?t.removeAttribute(r):r==="style"?t.style.cssText=e[r]:r==="__value"?t.value=t[r]=e[r]:n[r]&&n[r].set&&kf.indexOf(r)===-1?t[r]=e[r]:M(t,r,e[r])}function Cf(t,e){Object.keys(e).forEach(n=>{Ef(t,n,e[n])})}function Ef(t,e,n){const r=e.toLowerCase();r in t?t[r]=typeof t[r]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:M(t,e,n)}function Vi(t){return/-/.test(t)?Cf:ie}function wf(t){return Array.from(t.childNodes)}function qe(t,e){e=""+e,t.data!==e&&(t.data=e)}function it(t,e){t.value=e??""}function Io(t,e,n){for(let r=0;r<t.options.length;r+=1){const i=t.options[r];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Of(t){const e=t.querySelector(":checked");return e&&e.__value}function ua(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Mo(t,e){return new t(e)}const Bi=new Map;let Ui=0;function Af(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Tf(t,e){const n={stylesheet:yf(e),rules:{}};return Bi.set(t,n),n}function Ki(t,e,n,r,i,s,o,u=0){const l=16.666/r;let a=`{
3
- `;for(let y=0;y<=1;y+=l){const _=e+(n-e)*s(y);a+=y*100+`%{${o(_,1-_)}}
4
- `}const f=a+`100% {${o(n,1-n)}}
5
- }`,c=`__svelte_${Af(f)}_${u}`,d=la(t),{stylesheet:m,rules:p}=Bi.get(d)||Tf(d,t);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Ui+=1,c}function ji(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(t.style.animation=r.join(", "),Ui-=i,Ui||$f())}function $f(){lo(()=>{Ui||(Bi.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),Bi.clear())})}let Zr;function zr(t){Zr=t}function ci(){if(!Zr)throw new Error("Function called outside component initialization");return Zr}function ns(t){ci().$$.on_mount.push(t)}function rs(t){ci().$$.on_destroy.push(t)}function Sf(){const t=ci();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=ua(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function Ct(t,e){return ci().$$.context.set(t,e),e}function pt(t){return ci().$$.context.get(t)}function Oe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const sr=[],Ce=[];let lr=[];const Ps=[],aa=Promise.resolve();let Ls=!1;function fa(){Ls||(Ls=!0,aa.then(ca))}function Wt(){return fa(),aa}function at(t){lr.push(t)}function Vt(t){Ps.push(t)}const ys=new Set;let er=0;function ca(){if(er!==0)return;const t=Zr;do{try{for(;er<sr.length;){const e=sr[er];er++,zr(e),Rf(e.$$)}}catch(e){throw sr.length=0,er=0,e}for(zr(null),sr.length=0,er=0;Ce.length;)Ce.pop()();for(let e=0;e<lr.length;e+=1){const n=lr[e];ys.has(n)||(ys.add(n),n())}lr.length=0}while(sr.length);for(;Ps.length;)Ps.pop()();Ls=!1,ys.clear(),zr(t)}function Rf(t){if(t.fragment!==null){t.update(),Te(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(at)}}function Ff(t){const e=[],n=[];lr.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),lr=e}let Br;function ao(){return Br||(Br=Promise.resolve(),Br.then(()=>{Br=null})),Br}function qn(t,e,n){t.dispatchEvent(ua(`${e?"intro":"outro"}${n}`))}const Mi=new Set;let xt;function _e(){xt={r:0,c:[],p:xt}}function ge(){xt.r||Te(xt.c),xt=xt.p}function b(t,e){t&&t.i&&(Mi.delete(t),t.i(e))}function v(t,e,n,r){if(t&&t.o){if(Mi.has(t))return;Mi.add(t),xt.c.push(()=>{Mi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const fo={duration:0};function Fn(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,u,l=0;function a(){o&&ji(t,o)}function f(){const{delay:d=0,duration:m=300,easing:p=ts,tick:g=ce,css:y}=i||fo;y&&(o=Ki(t,0,1,m,d,p,y,l++)),g(0,1);const _=oo()+d,h=_+m;u&&u.abort(),s=!0,at(()=>qn(t,!0,"start")),u=uo(k=>{if(s){if(k>=h)return g(1,0),qn(t,!0,"end"),a(),s=!1;if(k>=_){const O=p((k-_)/m);g(O,1-O)}}return s})}let c=!1;return{start(){c||(c=!0,ji(t),Zn(i)?(i=i(r),ao().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Dn(t,e,n){const r={direction:"out"};let i=e(t,n,r),s=!0,o;const u=xt;u.r+=1;let l;function a(){const{delay:f=0,duration:c=300,easing:d=ts,tick:m=ce,css:p}=i||fo;p&&(o=Ki(t,1,0,c,f,d,p));const g=oo()+f,y=g+c;at(()=>qn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),uo(_=>{if(s){if(_>=y)return m(0,1),qn(t,!1,"end"),--u.r||Te(u.c),!1;if(_>=g){const h=d((_-g)/c);m(1-h,h)}}return s})}return Zn(i)?ao().then(()=>{i=i(r),a()}):a(),{end(f){f&&"inert"in t&&(t.inert=l),f&&i.tick&&i.tick(1,0),s&&(o&&ji(t,o),s=!1)}}}function Tn(t,e,n,r){let s=e(t,n,{direction:"both"}),o=r?0:1,u=null,l=null,a=null,f;function c(){a&&ji(t,a)}function d(p,g){const y=p.b-o;return g*=Math.abs(y),{a:o,b:p.b,d:y,duration:g,start:p.start,end:p.start+g,group:p.group}}function m(p){const{delay:g=0,duration:y=300,easing:_=ts,tick:h=ce,css:k}=s||fo,O={start:oo()+g,b:p};p||(O.group=xt,xt.r+=1),"inert"in t&&(p?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=O:(k&&(c(),a=Ki(t,o,p,y,g,_,k)),p&&h(0,1),u=d(O,y),at(()=>qn(t,p,"start")),uo($=>{if(l&&$>l.start&&(u=d(l,y),l=null,qn(t,u.b,"start"),k&&(c(),a=Ki(t,o,u.b,u.duration,0,_,s.css))),u){if($>=u.end)h(o=u.b,1-o),qn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if($>=u.start){const C=$-u.start;o=u.a+u.d*_(C/u.duration),h(o,1-o)}}return!!(u||l)}))}return{run(p){Zn(s)?ao().then(()=>{s=s({direction:p?"in":"out"}),m(p)}):m(p)},end(){c(),u=l=null}}}function nn(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Me(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const o=t[s],u=e[s];if(u){for(const l in o)l in u||(r[l]=1);for(const l in u)i[l]||(n[l]=u[l],i[l]=1);t[s]=u}else for(const l in o)i[l]=1}for(const o in r)o in n||(n[o]=void 0);return n}function Bt(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function B(t){t&&t.c()}function H(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),at(()=>{const s=t.$$.on_mount.map(ra).filter(Zn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(at)}function V(t,e){const n=t.$$;n.fragment!==null&&(Ff(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Df(t,e){t.$$.dirty[0]===-1&&(sr.push(t),fa(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ye(t,e,n,r,i,s,o=null,u=[-1]){const l=Zr;zr(t);const a=t.$$={fragment:null,ctx:[],props:s,update:ce,not_equal:i,bound:Lo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Lo(),dirty:u,skip_bound:!1,root:e.target||l.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(c,d,...m)=>{const p=m.length?m[0]:d;return a.ctx&&i(a.ctx[c],a.ctx[c]=p)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](p),f&&Df(t,c)),d}):[],a.update(),f=!0,Te(a.before_update),a.fragment=r?r(a.ctx):!1,e.target){if(e.hydrate){const c=wf(e.target);a.fragment&&a.fragment.l(c),c.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),H(t,e.target,e.anchor),ca()}zr(l)}class ve{constructor(){gs(this,"$$");gs(this,"$$set")}$destroy(){V(this,1),this.$destroy=ce}$on(e,n){if(!Zn(n))return ce;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!bf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Pf="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Pf);var Sr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Or=typeof window>"u"||"Deno"in globalThis;function Nt(){}function Lf(t,e){return typeof t=="function"?t(e):t}function Is(t){return typeof t=="number"&&t>=0&&t!==1/0}function da(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ur(t,e){return typeof t=="function"?t(e):t}function qt(t,e){return typeof t=="function"?t(e):t}function No(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==co(o,e.options))return!1}else if(!Xr(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||s&&!s(e))}function Ho(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Wn(e.options.mutationKey)!==Wn(s))return!1}else if(!Xr(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function co(t,e){return((e==null?void 0:e.queryKeyHashFn)||Wn)(t)}function Wn(t){return JSON.stringify(t,(e,n)=>Ms(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xr(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Xr(t[n],e[n])):!1}function ma(t,e){if(t===e)return t;const n=Vo(t)&&Vo(e);if(n||Ms(t)&&Ms(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,u=n?[]:{};let l=0;for(let a=0;a<o;a++){const f=n?a:s[a];(!n&&r.includes(f)||n)&&t[f]===void 0&&e[f]===void 0?(u[f]=void 0,l++):(u[f]=ma(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function qi(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Vo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ms(t){if(!Bo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Bo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Bo(t){return Object.prototype.toString.call(t)==="[object Object]"}function If(t){return new Promise(e=>{setTimeout(e,t)})}function Ns(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?ma(t,e):e}function Mf(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Nf(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var mo=Symbol();function pa(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===mo?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Nn,bn,dr,zu,Hf=(zu=class extends Sr{constructor(){super();be(this,Nn);be(this,bn);be(this,dr);re(this,dr,e=>{if(!Or&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,bn)||this.setEventListener(T(this,dr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,bn))==null||e.call(this),re(this,bn,void 0))}setEventListener(e){var n;re(this,dr,e),(n=T(this,bn))==null||n.call(this),re(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){T(this,Nn)!==e&&(re(this,Nn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof T(this,Nn)=="boolean"?T(this,Nn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Nn=new WeakMap,bn=new WeakMap,dr=new WeakMap,zu),po=new Hf,mr,yn,pr,Gu,Vf=(Gu=class extends Sr{constructor(){super();be(this,mr,!0);be(this,yn);be(this,pr);re(this,pr,e=>{if(!Or&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,yn)||this.setEventListener(T(this,pr))}onUnsubscribe(){var e;this.hasListeners()||((e=T(this,yn))==null||e.call(this),re(this,yn,void 0))}setEventListener(e){var n;re(this,pr,e),(n=T(this,yn))==null||n.call(this),re(this,yn,e(this.setOnline.bind(this)))}setOnline(e){T(this,mr)!==e&&(re(this,mr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return T(this,mr)}},mr=new WeakMap,yn=new WeakMap,pr=new WeakMap,Gu),Wi=new Vf;function Hs(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function Bf(t){return Math.min(1e3*2**t,3e4)}function ha(t){return(t??"online")==="online"?Wi.isOnline():!0}var _a=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function vs(t){return t instanceof _a}function ga(t){let e=!1,n=0,r=!1,i;const s=Hs(),o=g=>{var y;r||(d(new _a(g)),(y=t.abort)==null||y.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>po.isFocused()&&(t.networkMode==="always"||Wi.isOnline())&&t.canRun(),f=()=>ha(t.networkMode)&&t.canRun(),c=g=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,g),i==null||i(),s.resolve(g))},d=g=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,g),i==null||i(),s.reject(g))},m=()=>new Promise(g=>{var y;i=_=>{(r||a())&&g(_)},(y=t.onPause)==null||y.call(t)}).then(()=>{var g;i=void 0,r||(g=t.onContinue)==null||g.call(t)}),p=()=>{if(r)return;let g;const y=n===0?t.initialPromise:void 0;try{g=y??t.fn()}catch(_){g=Promise.reject(_)}Promise.resolve(g).then(c).catch(_=>{var C;if(r)return;const h=t.retry??(Or?0:3),k=t.retryDelay??Bf,O=typeof k=="function"?k(n,_):k,$=h===!0||typeof h=="number"&&n<h||typeof h=="function"&&h(n,_);if(e||!$){d(_);return}n++,(C=t.onFail)==null||C.call(t,n,_),If(O).then(()=>a()?void 0:m()).then(()=>{e?d(_):p()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?p():m().then(p),s)}}function Uf(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const s=u=>{e?t.push(u):i(()=>{n(u)})},o=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;e++;try{l=u()}finally{e--,e||o()}return l},batchCalls:u=>(...l)=>{s(()=>{u(...l)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var ut=Uf(),Hn,Yu,ba=(Yu=class{constructor(){be(this,Hn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Is(this.gcTime)&&re(this,Hn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Or?1/0:5*60*1e3))}clearGcTimeout(){T(this,Hn)&&(clearTimeout(T(this,Hn)),re(this,Hn,void 0))}},Hn=new WeakMap,Yu),hr,_r,Mt,kt,oi,Vn,Kt,on,Zu,Kf=(Zu=class extends ba{constructor(e){super();be(this,Kt);be(this,hr);be(this,_r);be(this,Mt);be(this,kt);be(this,oi);be(this,Vn);re(this,Vn,!1),re(this,oi,e.defaultOptions),this.setOptions(e.options),this.observers=[],re(this,Mt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,re(this,hr,jf(this.options)),this.state=e.state??T(this,hr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=T(this,kt))==null?void 0:e.promise}setOptions(e){this.options={...T(this,oi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Mt).remove(this)}setData(e,n){const r=Ns(this.state.data,e,this.options);return $e(this,Kt,on).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){$e(this,Kt,on).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=T(this,kt))==null?void 0:r.promise;return(i=T(this,kt))==null||i.cancel(e),n?n.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,hr))}isActive(){return this.observers.some(e=>qt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!da(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=T(this,kt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=T(this,kt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),T(this,Mt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(T(this,kt)&&(T(this,Vn)?T(this,kt).cancel({revert:!0}):T(this,kt).cancelRetry()),this.scheduleGc()),T(this,Mt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Kt,on).call(this,{type:"invalidate"})}fetch(e,n){var l,a,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,kt))return T(this,kt).continueRetry(),T(this,kt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(re(this,Vn,!0),r.signal)})},s=()=>{const c=pa(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),re(this,Vn,!1),this.options.persister?this.options.persister(c,d,this):c(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),re(this,_r,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&$e(this,Kt,on).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,m,p,g;vs(c)&&c.silent||$e(this,Kt,on).call(this,{type:"error",error:c}),vs(c)||((m=(d=T(this,Mt).config).onError)==null||m.call(d,c,this),(g=(p=T(this,Mt).config).onSettled)==null||g.call(p,this.state.data,c,this)),this.scheduleGc()};return re(this,kt,ga({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,m,p,g;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(y){u(y);return}(m=(d=T(this,Mt).config).onSuccess)==null||m.call(d,c,this),(g=(p=T(this,Mt).config).onSettled)==null||g.call(p,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{$e(this,Kt,on).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{$e(this,Kt,on).call(this,{type:"pause"})},onContinue:()=>{$e(this,Kt,on).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,kt).start()}},hr=new WeakMap,_r=new WeakMap,Mt=new WeakMap,kt=new WeakMap,oi=new WeakMap,Vn=new WeakMap,Kt=new WeakSet,on=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ya(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return vs(i)&&i.revert&&T(this,_r)?{...T(this,_r),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Mt).notify({query:this,type:"updated",action:e})})},Zu);function ya(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ha(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function jf(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Yt,Xu,qf=(Xu=class extends Sr{constructor(e={}){super();be(this,Yt);this.config=e,re(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??co(i,n);let o=this.get(s);return o||(o=new Kf({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){T(this,Yt).has(e.queryHash)||(T(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=T(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&T(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return T(this,Yt).get(e)}getAll(){return[...T(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>No(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>No(e,r)):n}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,Xu),Zt,Ot,Bn,Xt,_n,Ju,Wf=(Ju=class extends ba{constructor(e){super();be(this,Xt);be(this,Zt);be(this,Ot);be(this,Bn);this.mutationId=e.mutationId,re(this,Ot,e.mutationCache),re(this,Zt,[]),this.state=e.state||va(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){T(this,Zt).includes(e)||(T(this,Zt).push(e),this.clearGcTimeout(),T(this,Ot).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){re(this,Zt,T(this,Zt).filter(n=>n!==e)),this.scheduleGc(),T(this,Ot).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){T(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():T(this,Ot).remove(this))}continue(){var e;return((e=T(this,Bn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,u,l,a,f,c,d,m,p,g,y,_,h,k,O,$,C,D;re(this,Bn,ga({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,K)=>{$e(this,Xt,_n).call(this,{type:"failed",failureCount:R,error:K})},onPause:()=>{$e(this,Xt,_n).call(this,{type:"pause"})},onContinue:()=>{$e(this,Xt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Ot).canRun(this)}));const n=this.state.status==="pending",r=!T(this,Bn).canStart();try{if(!n){$e(this,Xt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=T(this,Ot).config).onMutate)==null?void 0:s.call(i,e,this));const K=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));K!==this.state.context&&$e(this,Xt,_n).call(this,{type:"pending",context:K,variables:e,isPaused:r})}const R=await T(this,Bn).start();return await((a=(l=T(this,Ot).config).onSuccess)==null?void 0:a.call(l,R,e,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,R,e,this.state.context)),await((m=(d=T(this,Ot).config).onSettled)==null?void 0:m.call(d,R,null,this.state.variables,this.state.context,this)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,R,null,e,this.state.context)),$e(this,Xt,_n).call(this,{type:"success",data:R}),R}catch(R){try{throw await((_=(y=T(this,Ot).config).onError)==null?void 0:_.call(y,R,e,this.state.context,this)),await((k=(h=this.options).onError)==null?void 0:k.call(h,R,e,this.state.context)),await(($=(O=T(this,Ot).config).onSettled)==null?void 0:$.call(O,void 0,R,this.state.variables,this.state.context,this)),await((D=(C=this.options).onSettled)==null?void 0:D.call(C,void 0,R,e,this.state.context)),R}finally{$e(this,Xt,_n).call(this,{type:"error",error:R})}}finally{T(this,Ot).runNext(this)}}},Zt=new WeakMap,Ot=new WeakMap,Bn=new WeakMap,Xt=new WeakSet,_n=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ut.batch(()=>{T(this,Zt).forEach(r=>{r.onMutationUpdate(e)}),T(this,Ot).notify({mutation:this,type:"updated",action:e})})},Ju);function va(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var an,jt,li,xu,Qf=(xu=class extends Sr{constructor(e={}){super();be(this,an);be(this,jt);be(this,li);this.config=e,re(this,an,new Set),re(this,jt,new Map),re(this,li,0)}build(e,n,r){const i=new Wf({mutationCache:this,mutationId:++Oi(this,li)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){T(this,an).add(e);const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).get(n);r?r.push(e):T(this,jt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(T(this,an).delete(e)){const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&T(this,jt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ti(e);if(typeof n=="string"){const r=T(this,jt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Ti(e);if(typeof n=="string"){const i=(r=T(this,jt).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{T(this,an).forEach(e=>{this.notify({type:"removed",mutation:e})}),T(this,an).clear(),T(this,jt).clear()})}getAll(){return Array.from(T(this,an))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ho(n,r))}findAll(e={}){return this.getAll().filter(n=>Ho(e,n))}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ut.batch(()=>Promise.all(e.map(n=>n.continue().catch(Nt))))}},an=new WeakMap,jt=new WeakMap,li=new WeakMap,xu);function Ti(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Uo(t){return{onFetch:(e,n)=>{var f,c,d,m,p;const r=e.options,i=(d=(c=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,s=((m=e.state.data)==null?void 0:m.pages)||[],o=((p=e.state.data)==null?void 0:p.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let g=!1;const y=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},_=pa(e.options,e.fetchOptions),h=async(k,O,$)=>{if(g)return Promise.reject();if(O==null&&k.pages.length)return Promise.resolve(k);const C={queryKey:e.queryKey,pageParam:O,direction:$?"backward":"forward",meta:e.options.meta};y(C);const D=await _(C),{maxPages:R}=e.options,K=$?Nf:Mf;return{pages:K(k.pages,D,R),pageParams:K(k.pageParams,O,R)}};if(i&&s.length){const k=i==="backward",O=k?zf:Ko,$={pages:s,pageParams:o},C=O(r,$);u=await h($,C,k)}else{const k=t??s.length;do{const O=l===0?o[0]??r.initialPageParam:Ko(r,u);if(l>0&&O==null)break;u=await h(u,O),l++}while(l<k)}return u};e.options.persister?e.fetchFn=()=>{var g,y;return(y=(g=e.options).persister)==null?void 0:y.call(g,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Ko(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function zf(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var nt,vn,kn,gr,br,Cn,yr,vr,ea,ka=(ea=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,gr);be(this,br);be(this,Cn);be(this,yr);be(this,vr);re(this,nt,t.queryCache||new qf),re(this,vn,t.mutationCache||new Qf),re(this,kn,t.defaultOptions||{}),re(this,gr,new Map),re(this,br,new Map),re(this,Cn,0)}mount(){Oi(this,Cn)._++,T(this,Cn)===1&&(re(this,yr,po.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),re(this,vr,Wi.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,nt).onOnline())})))}unmount(){var t,e;Oi(this,Cn)._--,T(this,Cn)===0&&((t=T(this,yr))==null||t.call(this),re(this,yr,void 0),(e=T(this,vr))==null||e.call(this),re(this,vr,void 0))}isFetching(t){return T(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return T(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=T(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=T(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(ur(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return T(this,nt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=T(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Lf(e,s);if(o!==void 0)return T(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return ut.batch(()=>T(this,nt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=T(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=T(this,nt);ut.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=T(this,nt),r={type:"active",...t};return ut.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ut.batch(()=>T(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Nt).catch(Nt)}invalidateQueries(t,e={}){return ut.batch(()=>{if(T(this,nt).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const n={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(n,e)})}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=ut.batch(()=>T(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Nt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Nt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=T(this,nt).build(this,e);return n.isStaleByTime(ur(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Nt).catch(Nt)}fetchInfiniteQuery(t){return t.behavior=Uo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Nt).catch(Nt)}ensureInfiniteQueryData(t){return t.behavior=Uo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wi.isOnline()?T(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,nt)}getMutationCache(){return T(this,vn)}getDefaultOptions(){return T(this,kn)}setDefaultOptions(t){re(this,kn,t)}setQueryDefaults(t,e){T(this,gr).set(Wn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...T(this,gr).values()],n={};return e.forEach(r=>{Xr(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){T(this,br).set(Wn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...T(this,br).values()];let n={};return e.forEach(r=>{Xr(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...T(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=co(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===mo&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...T(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){T(this,nt).clear(),T(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,gr=new WeakMap,br=new WeakMap,Cn=new WeakMap,yr=new WeakMap,vr=new WeakMap,ea),St,Ve,ui,At,Un,kr,En,Jt,ai,Cr,Er,Kn,jn,wn,wr,Ye,Wr,Vs,Bs,Us,Ks,js,qs,Ws,Ca,ta,Gf=(ta=class extends Sr{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,ui);be(this,At);be(this,Un);be(this,kr);be(this,En);be(this,Jt);be(this,ai);be(this,Cr);be(this,Er);be(this,Kn);be(this,jn);be(this,wn);be(this,wr,new Set);this.options=n,re(this,St,e),re(this,Jt,null),re(this,En,Hs()),this.options.experimental_prefetchInRender||T(this,En).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Ve).addObserver(this),jo(T(this,Ve),this.options)?$e(this,Ye,Wr).call(this):this.updateResult(),$e(this,Ye,Ks).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qs(T(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qs(T(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ye,js).call(this),$e(this,Ye,qs).call(this),T(this,Ve).removeObserver(this)}setOptions(e,n){const r=this.options,i=T(this,Ve);if(this.options=T(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,T(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Ye,Ws).call(this),T(this,Ve).setOptions(this.options),r._defaulted&&!qi(this.options,r)&&T(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Ve),observer:this});const s=this.hasListeners();s&&qo(T(this,Ve),i,this.options,r)&&$e(this,Ye,Wr).call(this),this.updateResult(n),s&&(T(this,Ve)!==i||qt(this.options.enabled,T(this,Ve))!==qt(r.enabled,T(this,Ve))||ur(this.options.staleTime,T(this,Ve))!==ur(r.staleTime,T(this,Ve)))&&$e(this,Ye,Vs).call(this);const o=$e(this,Ye,Bs).call(this);s&&(T(this,Ve)!==i||qt(this.options.enabled,T(this,Ve))!==qt(r.enabled,T(this,Ve))||o!==T(this,wn))&&$e(this,Ye,Us).call(this,o)}getOptimisticResult(e){const n=T(this,St).getQueryCache().build(T(this,St),e),r=this.createResult(n,e);return Zf(this,r)&&(re(this,At,r),re(this,kr,this.options),re(this,Un,T(this,Ve).state)),r}getCurrentResult(){return T(this,At)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){T(this,wr).add(e)}getCurrentQuery(){return T(this,Ve)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=T(this,St).defaultQueryOptions(e),r=T(this,St).getQueryCache().build(T(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return $e(this,Ye,Wr).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,At)))}createResult(e,n){var R;const r=T(this,Ve),i=this.options,s=T(this,At),o=T(this,Un),u=T(this,kr),a=e!==r?e.state:T(this,ui),{state:f}=e;let c={...f},d=!1,m;if(n._optimisticResults){const K=this.hasListeners(),N=!K&&jo(e,n),F=K&&qo(e,r,n,i);(N||F)&&(c={...c,...ya(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:y}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===T(this,ai))m=T(this,Cr);else try{re(this,ai,n.select),m=n.select(c.data),m=Ns(s==null?void 0:s.data,m,n),re(this,Cr,m),re(this,Jt,null)}catch(K){re(this,Jt,K)}else m=c.data;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let K;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))K=s.data;else if(K=typeof n.placeholderData=="function"?n.placeholderData((R=T(this,Er))==null?void 0:R.state.data,T(this,Er)):n.placeholderData,n.select&&K!==void 0)try{K=n.select(K),re(this,Jt,null)}catch(N){re(this,Jt,N)}K!==void 0&&(y="success",m=Ns(s==null?void 0:s.data,K,n),d=!0)}T(this,Jt)&&(p=T(this,Jt),m=T(this,Cr),g=Date.now(),y="error");const _=c.fetchStatus==="fetching",h=y==="pending",k=y==="error",O=h&&_,$=m!==void 0,D={status:y,fetchStatus:c.fetchStatus,isPending:h,isSuccess:y==="success",isError:k,isInitialLoading:O,isLoading:O,data:m,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:_,isRefetching:_&&!h,isLoadingError:k&&!$,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&$,isStale:ho(e,n),refetch:this.refetch,promise:T(this,En)};if(this.options.experimental_prefetchInRender){const K=I=>{D.status==="error"?I.reject(D.error):D.data!==void 0&&I.resolve(D.data)},N=()=>{const I=re(this,En,D.promise=Hs());K(I)},F=T(this,En);switch(F.status){case"pending":e.queryHash===r.queryHash&&K(F);break;case"fulfilled":(D.status==="error"||D.data!==F.value)&&N();break;case"rejected":(D.status!=="error"||D.error!==F.reason)&&N();break}}return D}updateResult(e){const n=T(this,At),r=this.createResult(T(this,Ve),this.options);if(re(this,Un,T(this,Ve).state),re(this,kr,this.options),T(this,Un).data!==void 0&&re(this,Er,T(this,Ve)),qi(r,n))return;re(this,At,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!T(this,wr).size)return!0;const l=new Set(u??T(this,wr));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,At)).some(a=>{const f=a;return T(this,At)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),$e(this,Ye,Ca).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ye,Ks).call(this)}},St=new WeakMap,Ve=new WeakMap,ui=new WeakMap,At=new WeakMap,Un=new WeakMap,kr=new WeakMap,En=new WeakMap,Jt=new WeakMap,ai=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Kn=new WeakMap,jn=new WeakMap,wn=new WeakMap,wr=new WeakMap,Ye=new WeakSet,Wr=function(e){$e(this,Ye,Ws).call(this);let n=T(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Nt)),n},Vs=function(){$e(this,Ye,js).call(this);const e=ur(this.options.staleTime,T(this,Ve));if(Or||T(this,At).isStale||!Is(e))return;const r=da(T(this,At).dataUpdatedAt,e)+1;re(this,Kn,setTimeout(()=>{T(this,At).isStale||this.updateResult()},r))},Bs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Ve)):this.options.refetchInterval)??!1},Us=function(e){$e(this,Ye,qs).call(this),re(this,wn,e),!(Or||qt(this.options.enabled,T(this,Ve))===!1||!Is(T(this,wn))||T(this,wn)===0)&&re(this,jn,setInterval(()=>{(this.options.refetchIntervalInBackground||po.isFocused())&&$e(this,Ye,Wr).call(this)},T(this,wn)))},Ks=function(){$e(this,Ye,Vs).call(this),$e(this,Ye,Us).call(this,$e(this,Ye,Bs).call(this))},js=function(){T(this,Kn)&&(clearTimeout(T(this,Kn)),re(this,Kn,void 0))},qs=function(){T(this,jn)&&(clearInterval(T(this,jn)),re(this,jn,void 0))},Ws=function(){const e=T(this,St).getQueryCache().build(T(this,St),this.options);if(e===T(this,Ve))return;const n=T(this,Ve);re(this,Ve,e),re(this,ui,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ca=function(e){ut.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(T(this,At))}),T(this,St).getQueryCache().notify({query:T(this,Ve),type:"observerResultsUpdated"})})},ta);function Yf(t,e){return qt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function jo(t,e){return Yf(t,e)||t.state.data!==void 0&&Qs(t,e,e.refetchOnMount)}function Qs(t,e,n){if(qt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&ho(t,e)}return!1}function qo(t,e,n,r){return(t!==e||qt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&ho(t,n)}function ho(t,e){return qt(e.enabled,t)!==!1&&t.isStaleByTime(ur(e.staleTime,t))}function Zf(t,e){return!qi(t.getCurrentResult(),e)}var On,An,Rt,fn,dn,Ni,zs,na,Xf=(na=class extends Sr{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Rt);be(this,fn);re(this,On,n),this.setOptions(r),this.bindMethods(),$e(this,dn,Ni).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=T(this,On).defaultMutationOptions(n),qi(this.options,r)||T(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Wn(r.mutationKey)!==Wn(this.options.mutationKey)?this.reset():((i=T(this,Rt))==null?void 0:i.state.status)==="pending"&&T(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=T(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){$e(this,dn,Ni).call(this),$e(this,dn,zs).call(this,n)}getCurrentResult(){return T(this,An)}reset(){var n;(n=T(this,Rt))==null||n.removeObserver(this),re(this,Rt,void 0),$e(this,dn,Ni).call(this),$e(this,dn,zs).call(this)}mutate(n,r){var i;return re(this,fn,r),(i=T(this,Rt))==null||i.removeObserver(this),re(this,Rt,T(this,On).getMutationCache().build(T(this,On),this.options)),T(this,Rt).addObserver(this),T(this,Rt).execute(n)}},On=new WeakMap,An=new WeakMap,Rt=new WeakMap,fn=new WeakMap,dn=new WeakSet,Ni=function(){var r;const n=((r=T(this,Rt))==null?void 0:r.state)??va();re(this,An,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},zs=function(n){ut.batch(()=>{var r,i,s,o,u,l,a,f;if(T(this,fn)&&this.hasListeners()){const c=T(this,An).variables,d=T(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=T(this,fn)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=T(this,fn)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=T(this,fn)).onError)==null||l.call(u,n.error,c,d),(f=(a=T(this,fn)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(T(this,An))})})},na);const tr=[];function bt(t,e){return{subscribe:De(t,e).subscribe}}function De(t,e=ce){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!tr.length;for(const a of r)a[1](),tr.push(a,t);if(l){for(let a=0;a<tr.length;a+=2)tr[a][0](tr[a+1]);tr.length=0}}}function s(u){i(u(t))}function o(u,l=ce){const a=[u,l];return r.add(a),r.size===1&&(n=e(i,s)||ce),u(t),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}function Ke(t,e,n){const r=!Array.isArray(t),i=r?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return bt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=ce;const d=()=>{if(f)return;c();const p=e(r?a[0]:a,o,u);s?o(p):c=Zn(p)?p:ce},m=i.map((p,g)=>so(p,y=>{a[g]=y,f&=~(1<<g),l&&d()},()=>{f|=1<<g}));return l=!0,d(),function(){Te(m),c(),l=!1}})}function Wo(t){return{subscribe:t.subscribe.bind(t)}}const Ea="$$_queryClient",Jf=()=>{const t=pt(Ea);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},xf=t=>{Ct(Ea,t)},ec="$$_isRestoring",tc=()=>{try{const t=pt(ec);return t||bt(!1)}catch{return bt(!1)}};function nc(){return tc()}function Et(t){return Jf()}function wa(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Oa(){}function rc(t,e,n){const r=Et(),i=nc(),s=wa(t)?t:bt(t),o=Ke([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,$r(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=Ke(i,(f,c)=>{const d=f?Oa:u.subscribe(ut.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=Ke([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Qn(t,e){return rc(t,Gf)}function di(t,e){const n=Et(),r=wa(t)?t:bt(t),i=new Xf(n,$r(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Oa)},i.setOptions(l)});const o=bt(i.getCurrentResult(),l=>i.subscribe(ut.batchCalls(a=>l(a)))),{subscribe:u}=Ke(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function ic(t){let e;const n=t[2].default,r=de(n,t,t[1],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2)&&pe(r,n,i,i[1],e?me(n,i[1],s,null):he(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function sc(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new ka}=e;return ns(()=>{s.mount()}),xf(s),rs(()=>{s.unmount()}),t.$$set=o=>{"client"in o&&n(0,s=o.client),"$$scope"in o&&n(1,i=o.$$scope)},[s,i,r]}class oc extends ve{constructor(e){super(),ye(this,e,sc,ic,fe,{client:0})}}var Qo=Object.prototype.hasOwnProperty;function zo(t,e,n){for(n of t.keys())if(ar(n,e))return n}function ar(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&ar(t[r],e[r]););return r===-1}if(n===Set){if(t.size!==e.size)return!1;for(r of t)if(i=r,i&&typeof i=="object"&&(i=zo(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t)if(i=r[0],i&&typeof i=="object"&&(i=zo(e,i),!i)||!ar(r[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(Qo.call(t,n)&&++r&&!Qo.call(e,n)||!(n in e)||!ar(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function Q0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function z0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function G0(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function Y0(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function lc(t){return t[t.length-1]}function uc(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function Z0(t,e,n=ar){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Dt(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function Gr(t){return t?!0:void 0}Dt({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function is(t){if(t!==null)return""}function Go(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function X0(t){if(!mt)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return J(e)?e:null}const $i=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Yo=t=>typeof t=="function";Pe("empty");function Pe(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Ke(n,u=>{const l=i(u);if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,a}return $i({...l,[`data-melt-${t}`]:"",action:r??ze})});{const u=i,l=u==null?void 0:u();if(Yo(l)){const a=(...f)=>$i({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,Go(a)}return Go($i({...l,[`data-melt-${t}`]:"",action:r??ze}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Xn(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const mt=typeof document<"u",Aa=t=>typeof t=="function";function mi(t){return t instanceof Element}function J(t){return t instanceof HTMLElement}function J0(t){return t instanceof HTMLInputElement}function x0(t){return t instanceof HTMLLabelElement}function ey(t){return t instanceof HTMLButtonElement}function ln(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function ty(t){return J(t)?t.isContentEditable:!1}function ac(t){return t!==null&&typeof t=="object"}function Ta(t){return ac(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ze(){}function gt(t,e,n,r){const i=Array.isArray(e)?e:[e];return i.forEach(s=>t.addEventListener(s,n,r)),()=>{i.forEach(s=>t.removeEventListener(s,n,r))}}function ke(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=cc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function fc(t){const e=t.currentTarget;if(!J(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function cc(t){return e=>{const n=fc(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Gs(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const Jr=t=>{try{ns(t)}catch{return t}},$a=t=>{try{rs(t)}catch{return t}};function Rr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function ny(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!ar(i,e)))}function dc(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Xe(t){return{...t,get:()=>$r(t)}}Xe.writable=function(t){const e=De(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Xe.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const fr=(t,e)=>{const n=Xe(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function cn(t){return new Promise(e=>setTimeout(e,t))}let mc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Sa=(t=21)=>{let e="",n=t|0;for(;n--;)e+=mc[Math.random()*64|0];return e};function pc(){return Sa(10)}function xr(t){return t.reduce((e,n)=>(e[n]=pc(),e),{})}const ae={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"},hc=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],_c=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],Ys=[...hc,..._c],ei=[ae.ENTER,ae.SPACE],gc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],bc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],ry=(t="ltr",e="horizontal")=>({nextKey:gc(t,e),prevKey:bc(t,e)});function yc(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const Ra=()=>typeof window<"u";function vc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Fa=t=>Ra()&&t.test(vc().toLowerCase()),kc=()=>Ra()&&!!navigator.maxTouchPoints,Cc=()=>Fa(/^mac/)&&!kc(),Ec=()=>Fa(/mac|iphone|ipad|ipod/i),wc=()=>Ec()&&!Cc(),ks="data-melt-scroll-lock";function Zo(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Oc(t,e,n){if(!t)return;const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{r?t.style.setProperty(e,r):t.style.removeProperty(e)}}function Ac(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function _o(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(ks))return ze;i.setAttribute(ks,"");const o=n.innerWidth-r.clientWidth,u=()=>Oc(r,"--scrollbar-width",`${o}px`),l=Ac(r),a=n.getComputedStyle(i)[l],f=()=>Zo(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:m,scrollY:p,visualViewport:g}=n,y=(g==null?void 0:g.offsetLeft)??0,_=(g==null?void 0:g.offsetTop)??0,h=Zo(i,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(_))}px`,left:`${-(m-Math.floor(y))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{h==null||h(),n.scrollTo(m,p)}},d=[u(),wc()?c():f()];return()=>{d.forEach(m=>m==null?void 0:m()),i.removeAttribute(ks)}}function Qi(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return Ke([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=Ke(t,s=>{n==null||n(),n=e(s)}).subscribe(ze),i=()=>{r(),n==null||n()};return $a(i),i}function Pt(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(De(i))}),e}function et(t){mt&&cn(1).then(()=>{const e=document.activeElement;!J(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Da(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Pa(t){const e=Da(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&J(i)?i:null}function La(t){const e=Da(),r=e.indexOf(t)-1,i=e[r];return r>=0&&J(i)?i:null}const Tc=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),$c={onMatch:et,getCurrentItem:()=>document.activeElement};function Sc(t={}){const e={...$c,...t},n=Xe(De([])),r=yc(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if(Tc.has(s))return;const u=e.getCurrentItem(),l=$r(n);if(!Array.isArray(l))return;l.push(s.toLowerCase()),n.set(l);const a=o.filter(y=>!(y.getAttribute("disabled")==="true"||y.getAttribute("aria-disabled")==="true"||y.hasAttribute("data-disabled"))),c=l.length>1&&l.every(y=>y===l[0])?l[0]:l.join(""),d=J(u)?a.indexOf(u):-1;let m=uc(a,Math.max(d,0));c.length===1&&(m=m.filter(y=>y!==u));const g=m.find(y=>(y==null?void 0:y.innerText)&&y.innerText.toLowerCase().startsWith(c.toLowerCase()));J(g)&&g!==u&&e.onMatch(g),r()}}}function Rc(t){let e=t.parentElement;for(;J(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Ar(t,e){return e!==void 0?e:Rc(t)==="body"?document.body:null}async function ti(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([cn(1),Wt]),e===void 0){n==null||n.focus();return}const r=Aa(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!J(i))return;i.focus()}else J(r)&&r.focus()}bt(void 0,t=>{function e(r){t(r),t(void 0)}return gt(document,"pointerup",e,{passive:!1,capture:!0})});const Fc=bt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return gt(document,"keydown",e,{passive:!1})}),ni=(t,e={})=>{let n=ze;function r(i={}){n();const s={enabled:!0,...i},o=Ta(s.enabled)?s.enabled:bt(s.enabled);n=rt(Fc.subscribe(u=>{var a;if(!u||!$r(o))return;const l=u.target;if(!(!J(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(Aa(s.ignore)){if(s.ignore(u))return}else if(Array.isArray(s.ignore)&&s.ignore.length>0&&s.ignore.some(f=>f&&l===f))return}(a=s.handler)==null||a.call(s,u)}}),xe(o,u=>{u?t.dataset.escapee="":delete t.dataset.escapee}))}return r(e),{update:r,destroy(){t.removeAttribute("data-escapee"),n()}}},$n=Math.min,Ft=Math.max,zi=Math.round,Si=Math.floor,tn=t=>({x:t,y:t}),Dc={left:"right",right:"left",bottom:"top",top:"bottom"},Pc={start:"end",end:"start"};function Zs(t,e,n){return Ft(t,$n(e,n))}function Fr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Dr(t){return t.split("-")[1]}function Ia(t){return t==="x"?"y":"x"}function go(t){return t==="y"?"height":"width"}function zn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function bo(t){return Ia(zn(t))}function Lc(t,e,n){n===void 0&&(n=!1);const r=Dr(t),i=bo(t),s=go(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gi(o)),[o,Gi(o)]}function Ic(t){const e=Gi(t);return[Xs(t),e,Xs(e)]}function Xs(t){return t.replace(/start|end/g,e=>Pc[e])}function Mc(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Nc(t,e,n,r){const i=Dr(t);let s=Mc(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Xs)))),s}function Gi(t){return t.replace(/left|right|bottom|top/g,e=>Dc[e])}function Hc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ma(t){return typeof t!="number"?Hc(t):{top:t,right:t,bottom:t,left:t}}function Yi(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Xo(t,e,n){let{reference:r,floating:i}=t;const s=zn(e),o=bo(e),u=go(o),l=Sn(e),a=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[u]/2-i[u]/2;let m;switch(l){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:c};break;case"left":m={x:r.x-i.width,y:c};break;default:m={x:r.x,y:r.y}}switch(Dr(e)){case"start":m[o]-=d*(n&&a?-1:1);break;case"end":m[o]+=d*(n&&a?-1:1);break}return m}const Vc=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,u=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:c}=Xo(a,r,l),d=r,m={},p=0;for(let g=0;g<u.length;g++){const{name:y,fn:_}=u[g],{x:h,y:k,data:O,reset:$}=await _({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:m,rects:a,platform:o,elements:{reference:t,floating:e}});f=h??f,c=k??c,m={...m,[y]:{...m[y],...O}},$&&p<=50&&(p++,typeof $=="object"&&($.placement&&(d=$.placement),$.rects&&(a=$.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):$.rects),{x:f,y:c}=Xo(a,d,l)),g=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:m}};async function yo(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:u,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:d=!1,padding:m=0}=Fr(e,t),p=Ma(m),y=u[d?c==="floating"?"reference":"floating":c],_=Yi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:a,rootBoundary:f,strategy:l})),h=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),O=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},$=Yi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:k,strategy:l}):h);return{top:(_.top-$.top+p.top)/O.y,bottom:($.bottom-_.bottom+p.bottom)/O.y,left:(_.left-$.left+p.left)/O.x,right:($.right-_.right+p.right)/O.x}}const Bc=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:u,middlewareData:l}=e,{element:a,padding:f=0}=Fr(t,e)||{};if(a==null)return{};const c=Ma(f),d={x:n,y:r},m=bo(i),p=go(m),g=await o.getDimensions(a),y=m==="y",_=y?"top":"left",h=y?"bottom":"right",k=y?"clientHeight":"clientWidth",O=s.reference[p]+s.reference[m]-d[m]-s.floating[p],$=d[m]-s.reference[m],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let D=C?C[k]:0;(!D||!await(o.isElement==null?void 0:o.isElement(C)))&&(D=u.floating[k]||s.floating[p]);const R=O/2-$/2,K=D/2-g[p]/2-1,N=$n(c[_],K),F=$n(c[h],K),I=N,A=D-g[p]-F,L=D/2-g[p]/2+R,q=Zs(I,L,A),W=!l.arrow&&Dr(i)!=null&&L!==q&&s.reference[p]/2-(L<I?N:F)-g[p]/2<0,oe=W?L<I?L-I:L-A:0;return{[m]:d[m]+oe,data:{[m]:q,centerOffset:L-q-oe,...W&&{alignmentOffset:oe}},reset:W}}}),Uc=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:u,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=Fr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const _=Sn(i),h=zn(u),k=Sn(u)===u,O=await(l.isRTL==null?void 0:l.isRTL(a.floating)),$=d||(k||!g?[Gi(u)]:Ic(u)),C=p!=="none";!d&&C&&$.push(...Nc(u,g,p,O));const D=[u,...$],R=await yo(e,y),K=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&K.push(R[_]),c){const L=Lc(i,o,O);K.push(R[L[0]],R[L[1]])}if(N=[...N,{placement:i,overflows:K}],!K.every(L=>L<=0)){var F,I;const L=(((F=s.flip)==null?void 0:F.index)||0)+1,q=D[L];if(q)return{data:{index:L,overflows:N},reset:{placement:q}};let W=(I=N.filter(oe=>oe.overflows[0]<=0).sort((oe,se)=>oe.overflows[1]-se.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(m){case"bestFit":{var A;const oe=(A=N.filter(se=>{if(C){const z=zn(se.placement);return z===h||z==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(z=>z>0).reduce((z,le)=>z+le,0)]).sort((se,z)=>se[1]-z[1])[0])==null?void 0:A[0];oe&&(W=oe);break}case"initialPlacement":W=u;break}if(i!==W)return{reset:{placement:W}}}return{}}}};async function Kc(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sn(n),u=Dr(n),l=zn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Fr(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:p}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof p=="number"&&(m=u==="end"?p*-1:p),l?{x:m*f,y:d*a}:{x:d*a,y:m*f}}const jc=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:u}=e,l=await Kc(e,t);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},qc=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:u={fn:y=>{let{x:_,y:h}=y;return{x:_,y:h}}},...l}=Fr(t,e),a={x:n,y:r},f=await yo(e,l),c=zn(Sn(i)),d=Ia(c);let m=a[d],p=a[c];if(s){const y=d==="y"?"top":"left",_=d==="y"?"bottom":"right",h=m+f[y],k=m-f[_];m=Zs(h,m,k)}if(o){const y=c==="y"?"top":"left",_=c==="y"?"bottom":"right",h=p+f[y],k=p-f[_];p=Zs(h,p,k)}const g=u.fn({...e,[d]:m,[c]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[d]:s,[c]:o}}}}}},Wc=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:u}=e,{apply:l=()=>{},...a}=Fr(t,e),f=await yo(e,a),c=Sn(i),d=Dr(i),m=zn(i)==="y",{width:p,height:g}=s.floating;let y,_;c==="top"||c==="bottom"?(y=c,_=d===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(_=c,y=d==="end"?"top":"bottom");const h=g-f.top-f.bottom,k=p-f.left-f.right,O=$n(g-f[y],h),$=$n(p-f[_],k),C=!e.middlewareData.shift;let D=O,R=$;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(D=h),C&&!d){const N=Ft(f.left,0),F=Ft(f.right,0),I=Ft(f.top,0),A=Ft(f.bottom,0);m?R=p-2*(N!==0||F!==0?N+F:Ft(f.left,f.right)):D=g-2*(I!==0||A!==0?I+A:Ft(f.top,f.bottom))}await l({...e,availableWidth:R,availableHeight:D});const K=await o.getDimensions(u.floating);return p!==K.width||g!==K.height?{reset:{rects:!0}}:{}}}};function ss(){return typeof window<"u"}function Pr(t){return Na(t)?(t.nodeName||"").toLowerCase():"#document"}function Lt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function sn(t){var e;return(e=(Na(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Na(t){return ss()?t instanceof Node||t instanceof Lt(t).Node:!1}function Qt(t){return ss()?t instanceof Element||t instanceof Lt(t).Element:!1}function rn(t){return ss()?t instanceof HTMLElement||t instanceof Lt(t).HTMLElement:!1}function Jo(t){return!ss()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Lt(t).ShadowRoot}function pi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=zt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Qc(t){return["table","td","th"].includes(Pr(t))}function os(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function vo(t){const e=ko(),n=Qt(t)?zt(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zc(t){let e=Rn(t);for(;rn(e)&&!Tr(e);){if(vo(e))return e;if(os(e))return null;e=Rn(e)}return null}function ko(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Tr(t){return["html","body","#document"].includes(Pr(t))}function zt(t){return Lt(t).getComputedStyle(t)}function ls(t){return Qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Rn(t){if(Pr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Jo(t)&&t.host||sn(t);return Jo(e)?e.host:e}function Ha(t){const e=Rn(t);return Tr(e)?t.ownerDocument?t.ownerDocument.body:t.body:rn(e)&&pi(e)?e:Ha(e)}function ri(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ha(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Lt(i);if(s){const u=Js(o);return e.concat(o,o.visualViewport||[],pi(i)?i:[],u&&n?ri(u):[])}return e.concat(i,ri(i,[],n))}function Js(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Va(t){const e=zt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=rn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=zi(n)!==s||zi(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Co(t){return Qt(t)?t:t.contextElement}function cr(t){const e=Co(t);if(!rn(e))return tn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=Va(e);let o=(s?zi(n.width):n.width)/r,u=(s?zi(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const Gc=tn(0);function Ba(t){const e=Lt(t);return!ko()||!e.visualViewport?Gc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Yc(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Lt(t)?!1:e}function Gn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Co(t);let o=tn(1);e&&(r?Qt(r)&&(o=cr(r)):o=cr(t));const u=Yc(s,n,r)?Ba(s):tn(0);let l=(i.left+u.x)/o.x,a=(i.top+u.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const d=Lt(s),m=r&&Qt(r)?Lt(r):r;let p=d,g=Js(p);for(;g&&r&&m!==p;){const y=cr(g),_=g.getBoundingClientRect(),h=zt(g),k=_.left+(g.clientLeft+parseFloat(h.paddingLeft))*y.x,O=_.top+(g.clientTop+parseFloat(h.paddingTop))*y.y;l*=y.x,a*=y.y,f*=y.x,c*=y.y,l+=k,a+=O,p=Lt(g),g=Js(p)}}return Yi({width:f,height:c,x:l,y:a})}function Eo(t,e){const n=ls(t).scrollLeft;return e?e.left+n:Gn(sn(t)).left+n}function Ua(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Eo(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function Zc(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=sn(r),u=e?os(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=tn(1);const f=tn(0),c=rn(r);if((c||!c&&!s)&&((Pr(r)!=="body"||pi(o))&&(l=ls(r)),rn(r))){const m=Gn(r);a=cr(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const d=o&&!c&&!s?Ua(o,l,!0):tn(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+d.x,y:n.y*a.y-l.scrollTop*a.y+f.y+d.y}}function Xc(t){return Array.from(t.getClientRects())}function Jc(t){const e=sn(t),n=ls(t),r=t.ownerDocument.body,i=Ft(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Ft(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Eo(t);const u=-n.scrollTop;return zt(r).direction==="rtl"&&(o+=Ft(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function xc(t,e){const n=Lt(t),r=sn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,u=0,l=0;if(i){s=i.width,o=i.height;const a=ko();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function ed(t,e){const n=Gn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=rn(t)?cr(t):tn(1),o=t.clientWidth*s.x,u=t.clientHeight*s.y,l=i*s.x,a=r*s.y;return{width:o,height:u,x:l,y:a}}function xo(t,e,n){let r;if(e==="viewport")r=xc(t,n);else if(e==="document")r=Jc(sn(t));else if(Qt(e))r=ed(e,n);else{const i=Ba(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Yi(r)}function Ka(t,e){const n=Rn(t);return n===e||!Qt(n)||Tr(n)?!1:zt(n).position==="fixed"||Ka(n,e)}function td(t,e){const n=e.get(t);if(n)return n;let r=ri(t,[],!1).filter(u=>Qt(u)&&Pr(u)!=="body"),i=null;const s=zt(t).position==="fixed";let o=s?Rn(t):t;for(;Qt(o)&&!Tr(o);){const u=zt(o),l=vo(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pi(o)&&!l&&Ka(t,o))?r=r.filter(f=>f!==o):i=u,o=Rn(o)}return e.set(t,r),r}function nd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?os(e)?[]:td(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=xo(e,f,i);return a.top=Ft(c.top,a.top),a.right=$n(c.right,a.right),a.bottom=$n(c.bottom,a.bottom),a.left=Ft(c.left,a.left),a},xo(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rd(t){const{width:e,height:n}=Va(t);return{width:e,height:n}}function id(t,e,n){const r=rn(e),i=sn(e),s=n==="fixed",o=Gn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=tn(0);if(r||!r&&!s)if((Pr(e)!=="body"||pi(i))&&(u=ls(e)),r){const d=Gn(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=Eo(i));const a=i&&!r&&!s?Ua(i,u):tn(0),f=o.left+u.scrollLeft-l.x-a.x,c=o.top+u.scrollTop-l.y-a.y;return{x:f,y:c,width:o.width,height:o.height}}function Cs(t){return zt(t).position==="static"}function el(t,e){if(!rn(t)||zt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return sn(t)===n&&(n=n.ownerDocument.body),n}function ja(t,e){const n=Lt(t);if(os(t))return n;if(!rn(t)){let i=Rn(t);for(;i&&!Tr(i);){if(Qt(i)&&!Cs(i))return i;i=Rn(i)}return n}let r=el(t,e);for(;r&&Qc(r)&&Cs(r);)r=el(r,e);return r&&Tr(r)&&Cs(r)&&!vo(r)?n:r||zc(t)||n}const sd=async function(t){const e=this.getOffsetParent||ja,n=this.getDimensions,r=await n(t.floating);return{reference:id(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function od(t){return zt(t).direction==="rtl"}const ld={convertOffsetParentRelativeRectToViewportRelativeRect:Zc,getDocumentElement:sn,getClippingRect:nd,getOffsetParent:ja,getElementRects:sd,getClientRects:Xc,getDimensions:rd,getScale:cr,isElement:Qt,isRTL:od};function ud(t,e){let n=null,r;const i=sn(t);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:c,height:d}=t.getBoundingClientRect();if(u||e(),!c||!d)return;const m=Si(f),p=Si(i.clientWidth-(a+c)),g=Si(i.clientHeight-(f+d)),y=Si(a),h={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:Ft(0,$n(1,l))||1};let k=!0;function O($){const C=$[0].intersectionRatio;if(C!==l){if(!k)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(O,{...h,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,h)}n.observe(t)}return o(!0),s}function ad(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,a=Co(t),f=i||s?[...a?ri(a):[],...ri(e)]:[];f.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),s&&_.addEventListener("resize",n)});const c=a&&u?ud(a,n):null;let d=-1,m=null;o&&(m=new ResizeObserver(_=>{let[h]=_;h&&h.target===a&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(e)})),n()}),a&&!l&&m.observe(a),m.observe(e));let p,g=l?Gn(t):null;l&&y();function y(){const _=Gn(t);g&&(_.x!==g.x||_.y!==g.y||_.width!==g.width||_.height!==g.height)&&n(),g=_,p=requestAnimationFrame(y)}return n(),()=>{var _;f.forEach(h=>{i&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),c==null||c(),(_=m)==null||_.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const fd=jc,cd=qc,dd=Uc,md=Wc,pd=Bc,hd=(t,e,n)=>{const r=new Map,i={platform:ld,...n},s={...i.platform,_c:r};return Vc(t,e,{...i,platform:s})},_d={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},gd={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function bd(t,e,n={}){if(!e||!t||n===null)return{destroy:ze};const r={..._d,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(dd({boundary:r.boundary,padding:r.overflowPadding}));const o=J(i)?i.offsetHeight/2:0;if(r.gutter||r.offset){const l=r.gutter?{mainAxis:r.gutter}:r.offset;(l==null?void 0:l.mainAxis)!=null&&(l.mainAxis+=o),s.push(fd(l))}s.push(cd({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(pd({element:i,padding:8})),s.push(md({padding:r.overflowPadding,apply({rects:l,availableHeight:a,availableWidth:f}){r.sameWidth&&Object.assign(e.style,{width:`${Math.round(l.reference.width)}px`,minWidth:"unset"}),r.fitViewport&&Object.assign(e.style,{maxWidth:`${f}px`,maxHeight:`${a}px`})}}));function u(){if(!t||!e||J(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=r;hd(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),d=Math.round(f.y),[m,p]=yd(f.placement);if(e.setAttribute("data-side",m),e.setAttribute("data-align",p),Object.assign(e.style,{position:r.strategy,top:`${d}px`,left:`${c}px`}),J(i)&&f.middlewareData.arrow){const{x:g,y}=f.middlewareData.arrow,_=f.placement.split("-")[0];i.setAttribute("data-side",_),Object.assign(i.style,{position:"absolute",left:g!=null?`${g}px`:"",top:y!=null?`${y}px`:"",[_]:`calc(100% - ${o}px)`,transform:gd[_],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:r.strategy}),{destroy:ad(t,e,u)}}function yd(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
6
- * tabbable 6.2.0
7
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
8
- */var qa=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Zi=qa.join(","),Wa=typeof Element>"u",Yn=Wa?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Xi=!Wa&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ji=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",o=s||n&&e&&t(e.parentNode);return o},vd=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},Qa=function(e,n,r){if(Ji(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Zi));return n&&Yn.call(e,Zi)&&i.unshift(e),i=i.filter(r),i},za=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ji(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),l=u.length?u:o.children,a=t(l,!0,r);r.flatten?i.push.apply(i,a):i.push({scopeParent:o,candidates:a})}else{var f=Yn.call(o,Zi);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!Ji(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&d){var m=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:o,candidates:m})}else s.unshift.apply(s,o.children)}}return i},Ga=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Mn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||vd(e))&&!Ga(e)?0:e.tabIndex},kd=function(e,n){var r=Mn(e);return r<0&&n&&!Ga(e)?0:r},Cd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ya=function(e){return e.tagName==="INPUT"},Ed=function(e){return Ya(e)&&e.type==="hidden"},wd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Od=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Ad=function(e){if(!e.name)return!0;var n=e.form||Xi(e),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=Od(i,e.form);return!s||s===e},Td=function(e){return Ya(e)&&e.type==="radio"},$d=function(e){return Td(e)&&!Ad(e)},Sd=function(e){var n,r=e&&Xi(e),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var o,u,l;for(s=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var a,f,c;r=Xi(i),i=(a=r)===null||a===void 0?void 0:a.host,s=!!((f=i)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return s},tl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Rd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Yn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Yn.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var u=e;e;){var l=e.parentElement,a=Xi(e);if(l&&!l.shadowRoot&&i(l)===!0)return tl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(Sd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tl(e);return!1},Fd=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Yn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},xi=function(e,n){return!(n.disabled||Ji(n)||Ed(n)||Rd(n,e)||wd(n)||Fd(n))},xs=function(e,n){return!($d(n)||Mn(n)<0||!xi(e,n))},Dd=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Pd=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=kd(u,o),a=o?t(i.candidates):u;l===0?o?n.push.apply(n,a):n.push(u):r.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:a})}),r.sort(Cd).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Ld=function(e,n){n=n||{};var r;return n.getShadowRoot?r=za([e],n.includeContainer,{filter:xs.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Dd}):r=Qa(e,n.includeContainer,xs.bind(null,n)),Pd(r)},Id=function(e,n){n=n||{};var r;return n.getShadowRoot?r=za([e],n.includeContainer,{filter:xi.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Qa(e,n.includeContainer,xi.bind(null,n)),r},nr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Zi)===!1?!1:xs(n,e)},Md=qa.concat("iframe").join(","),Es=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Md)===!1?!1:xi(n,e)};/*!
9
- * focus-trap 7.6.2
10
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
11
- */function eo(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Nd(t){if(Array.isArray(t))return eo(t)}function Hd(t,e,n){return(e=jd(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vd(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
12
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){Hd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ud(t){return Nd(t)||Vd(t)||qd(t)||Bd()}function Kd(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jd(t){var e=Kd(t,"string");return typeof e=="symbol"?e:e+""}function qd(t,e){if(t){if(typeof t=="string")return eo(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eo(t,e):void 0}}var il={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r.pause()}var i=e.indexOf(n);i===-1||e.splice(i,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Wd=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Qd=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Yr=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},zd=function(e){return Yr(e)&&!e.shiftKey},Gd=function(e){return Yr(e)&&e.shiftKey},sl=function(e){return setTimeout(e,0)},Ur=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Ri=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Yd=[],Zd=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||Yd,s=rl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:zd,isKeyBackward:Gd},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function(A,L,q){return A&&A[L]!==void 0?A[L]:s[q||L]},a=function(A,L){var q=typeof(L==null?void 0:L.composedPath)=="function"?L.composedPath():void 0;return o.containerGroups.findIndex(function(W){var oe=W.container,se=W.tabbableNodes;return oe.contains(A)||(q==null?void 0:q.includes(oe))||se.find(function(z){return z===A})})},f=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=L.hasFallback,W=q===void 0?!1:q,oe=L.params,se=oe===void 0?[]:oe,z=s[A];if(typeof z=="function"&&(z=z.apply(void 0,Ud(se))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat(A,"` was specified but was not a node, or did not return a node"))}var le=z;if(typeof z=="string"){try{le=r.querySelector(z)}catch(Se){throw new Error("`".concat(A,'` appears to be an invalid selector; error="').concat(Se.message,'"'))}if(!le&&!W)throw new Error("`".concat(A,"` as selector refers to no known node"))}return le},c=function(){var A=f("initialFocus",{hasFallback:!0});if(A===!1)return!1;if(A===void 0||A&&!Es(A,s.tabbableOptions))if(a(r.activeElement)>=0)A=r.activeElement;else{var L=o.tabbableGroups[0],q=L&&L.firstTabbableNode;A=q||f("fallbackFocus")}else A===null&&(A=f("fallbackFocus"));if(!A)throw new Error("Your focus-trap needs to have at least one focusable element");return A},d=function(){if(o.containerGroups=o.containers.map(function(A){var L=Ld(A,s.tabbableOptions),q=Id(A,s.tabbableOptions),W=L.length>0?L[0]:void 0,oe=L.length>0?L[L.length-1]:void 0,se=q.find(function(Se){return nr(Se)}),z=q.slice().reverse().find(function(Se){return nr(Se)}),le=!!L.find(function(Se){return Mn(Se)>0});return{container:A,tabbableNodes:L,focusableNodes:q,posTabIndexesFound:le,firstTabbableNode:W,lastTabbableNode:oe,firstDomTabbableNode:se,lastDomTabbableNode:z,nextTabbableNode:function(st){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=L.indexOf(st);return Y<0?He?q.slice(q.indexOf(st)+1).find(function(X){return nr(X)}):q.slice(0,q.indexOf(st)).reverse().find(function(X){return nr(X)}):L[Y+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(A){return A.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(A){return A.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(A){var L=A.activeElement;if(L)return L.shadowRoot&&L.shadowRoot.activeElement!==null?m(L.shadowRoot):L},p=function(A){if(A!==!1&&A!==m(document)){if(!A||!A.focus){p(c());return}A.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=A,Wd(A)&&A.select()}},g=function(A){var L=f("setReturnFocus",{params:[A]});return L||(L===!1?!1:A)},y=function(A){var L=A.target,q=A.event,W=A.isBackward,oe=W===void 0?!1:W;L=L||Ri(q),d();var se=null;if(o.tabbableGroups.length>0){var z=a(L,q),le=z>=0?o.containerGroups[z]:void 0;if(z<0)oe?se=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:se=o.tabbableGroups[0].firstTabbableNode;else if(oe){var Se=o.tabbableGroups.findIndex(function(_t){var ct=_t.firstTabbableNode;return L===ct});if(Se<0&&(le.container===L||Es(L,s.tabbableOptions)&&!nr(L,s.tabbableOptions)&&!le.nextTabbableNode(L,!1))&&(Se=z),Se>=0){var st=Se===0?o.tabbableGroups.length-1:Se-1,He=o.tabbableGroups[st];se=Mn(L)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else Yr(q)||(se=le.nextTabbableNode(L,!1))}else{var Y=o.tabbableGroups.findIndex(function(_t){var ct=_t.lastTabbableNode;return L===ct});if(Y<0&&(le.container===L||Es(L,s.tabbableOptions)&&!nr(L,s.tabbableOptions)&&!le.nextTabbableNode(L))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,ht=o.tabbableGroups[X];se=Mn(L)>=0?ht.firstTabbableNode:ht.firstDomTabbableNode}else Yr(q)||(se=le.nextTabbableNode(L))}}else se=f("fallbackFocus");return se},_=function(A){var L=Ri(A);if(!(a(L,A)>=0)){if(Ur(s.clickOutsideDeactivates,A)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Ur(s.allowOutsideClick,A)||A.preventDefault()}},h=function(A){var L=Ri(A),q=a(L,A)>=0;if(q||L instanceof Document)q&&(o.mostRecentlyFocusedNode=L);else{A.stopImmediatePropagation();var W,oe=!0;if(o.mostRecentlyFocusedNode)if(Mn(o.mostRecentlyFocusedNode)>0){var se=a(o.mostRecentlyFocusedNode),z=o.containerGroups[se].tabbableNodes;if(z.length>0){var le=z.findIndex(function(Se){return Se===o.mostRecentlyFocusedNode});le>=0&&(s.isKeyForward(o.recentNavEvent)?le+1<z.length&&(W=z[le+1],oe=!1):le-1>=0&&(W=z[le-1],oe=!1))}}else o.containerGroups.some(function(Se){return Se.tabbableNodes.some(function(st){return Mn(st)>0})})||(oe=!1);else oe=!1;oe&&(W=y({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),p(W||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},k=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=A;var q=y({event:A,isBackward:L});q&&(Yr(A)&&A.preventDefault(),p(q))},O=function(A){(s.isKeyForward(A)||s.isKeyBackward(A))&&k(A,s.isKeyBackward(A))},$=function(A){Qd(A)&&Ur(s.escapeDeactivates,A)!==!1&&(A.preventDefault(),u.deactivate())},C=function(A){var L=Ri(A);a(L,A)>=0||Ur(s.clickOutsideDeactivates,A)||Ur(s.allowOutsideClick,A)||(A.preventDefault(),A.stopImmediatePropagation())},D=function(){if(o.active)return il.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?sl(function(){p(c())}):p(c()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",_,{capture:!0,passive:!1}),r.addEventListener("touchstart",_,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",O,{capture:!0,passive:!1}),r.addEventListener("keydown",$),u},R=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",_,!0),r.removeEventListener("touchstart",_,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",O,!0),r.removeEventListener("keydown",$),u},K=function(A){var L=A.some(function(q){var W=Array.from(q.removedNodes);return W.some(function(oe){return oe===o.mostRecentlyFocusedNode})});L&&p(c())},N=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(K):void 0,F=function(){N&&(N.disconnect(),o.active&&!o.paused&&o.containers.map(function(A){N.observe(A,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(A){if(o.active)return this;var L=l(A,"onActivate"),q=l(A,"onPostActivate"),W=l(A,"checkCanFocusTrap");W||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,L==null||L();var oe=function(){W&&d(),D(),F(),q==null||q()};return W?(W(o.containers.concat()).then(oe,oe),this):(oe(),this)},deactivate:function(A){if(!o.active)return this;var L=rl({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},A);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,R(),o.active=!1,o.paused=!1,F(),il.deactivateTrap(i,u);var q=l(L,"onDeactivate"),W=l(L,"onPostDeactivate"),oe=l(L,"checkCanReturnFocus"),se=l(L,"returnFocus","returnFocusOnDeactivate");q==null||q();var z=function(){sl(function(){se&&p(g(o.nodeFocusedBeforeActivation)),W==null||W()})};return se&&oe?(oe(g(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(A){if(o.paused||!o.active)return this;var L=l(A,"onPause"),q=l(A,"onPostPause");return o.paused=!0,L==null||L(),R(),F(),q==null||q(),this},unpause:function(A){if(!o.paused||!o.active)return this;var L=l(A,"onUnpause"),q=l(A,"onPostUnpause");return o.paused=!1,L==null||L(),d(),D(),F(),q==null||q(),this},updateContainerElements:function(A){var L=[].concat(A).filter(Boolean);return o.containers=L.map(function(q){return typeof q=="string"?r.querySelector(q):q}),o.active&&d(),F(),this}},u.updateContainerElements(e),u};function Za(t={}){let e;const{immediate:n,...r}=t,i=De(!1),s=De(!1),o=c=>e==null?void 0:e.activate(c),u=c=>{e==null||e.deactivate(c)},l=()=>{e&&(e.pause(),s.set(!0))},a=()=>{e&&(e.unpause(),s.set(!1))};return{useFocusTrap:c=>(e=Zd(c,{...r,onActivate(){var d;i.set(!0),(d=t.onActivate)==null||d.call(t)},onDeactivate(){var d;i.set(!1),(d=t.onDeactivate)==null||d.call(t)}}),n&&o(),{destroy(){u(),e=void 0}}),hasFocus:Wo(i),isPaused:Wo(s),activate:o,deactivate:u,pause:l,unpause:a}}const Fi=[],Xa=(t,e)=>{let n=ze;function r(){const s=Fi.indexOf(t);s>=0&&Fi.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;cn(100).then(()=>{o?Fi.push(t):r()});function f(){return lc(Fi)===t}function c(){f()&&u&&(u(),r())}function d(p){const g=p.target;mi(g)&&g&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation())}function m(p){l!=null&&l(p)&&f()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation(),c())}n=Jd(t,{onInteractOutsideStart:d,onInteractOutside:a?m:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},Xd={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},es=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:ze};const s={...Xd,...i},o=[];if(s.portal!==null&&o.push(us(t,s.portal).destroy),o.push(bd(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=Za({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(Xa(t,{onClose:()=>{J(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||J(n)&&n.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&o.push(ni(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},us=(t,e="body")=>{let n;if(!J(e)&&typeof e!="string")return{destroy:ze};async function r(s){if(e=s,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await Wt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function i(){t.remove()}return r(e),{update:r,destroy:i}},Jd=(t,e)=>{let n=ze,r=ze,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:d,enabled:m}=f;if(!m)return;function p(_){c&&ol(_,t)&&(d==null||d(_));const h=_.target;mi(h)&&Ja(t,h)&&(s=!0),i=!0}function g(_){c==null||c(_)}const y=xd(t);if(typeof PointerEvent<"u"){const _=h=>{r();const k=O=>{l(O)&&g(O),a()};if(h.pointerType==="touch"){r=gt(y,"click",k,{capture:!0,once:!0});return}k(h)};n=rt(gt(y,"pointerdown",p,!0),gt(y,"pointerup",_,!0))}else{const _=k=>{o?o=!1:l(k)&&g(k),a()},h=k=>{o=!0,l(k)&&g(k),a()};n=rt(gt(y,"mousedown",p,!0),gt(y,"mouseup",_,!0),gt(y,"touchstart",p,!0),gt(y,"touchend",h,!0))}}function l(f){return!!(i&&!s&&ol(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function ol(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!mi(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!Ja(e,n)}function Ja(t,e){return t===e||t.contains(e)}function xd(t){return(t==null?void 0:t.ownerDocument)??document}function em(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Ta(i)?e[r]=Xe(i):e[r]=Xe(bt(i))}),e}const tm={prefix:"",disabled:bt(!1),required:bt(!1),name:bt(void 0)};function iy(t){const e={...tm,...dc(t)},{name:n}=Xn(e.prefix),{value:r,name:i,disabled:s,required:o}=em(Rr(e,"prefix")),u=i;return Pe(n("hidden-input"),{stores:[r,u,s,o],returned:([a,f,c,d])=>({name:f,value:a==null?void 0:a.toString(),"aria-hidden":"true",hidden:!0,disabled:c,required:d,tabIndex:-1,style:Dt({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"})}),action:a=>({destroy:r.subscribe(c=>{a.value=c,a.dispatchEvent(new Event("change",{bubbles:!0}))})})})}const nm={ltr:[...ei,ae.ARROW_RIGHT],rtl:[...ei,ae.ARROW_LEFT]},rm={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},ll=["menu","trigger"],im={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,typeahead:!0,closeOnItemClick:!0,onOutsideClick:void 0};function sm(t){const{name:e,selector:n}=Xn(t.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:u,portal:l,forceVisible:a,typeahead:f,loop:c,closeFocus:d,disableFocusFirstItem:m,closeOnItemClick:p,onOutsideClick:g}=t.rootOptions,y=t.rootOpen,_=t.rootActiveTrigger,h=t.nextFocusable,k=t.prevFocusable,O=Xe.writable(!1),$=Xe(De(0)),C=Xe(De(null)),D=Xe(De("right")),R=Xe(De(null)),K=Xe(Ke([D,C],([Q,ee])=>te=>Q===(ee==null?void 0:ee.side)&&om(te,ee==null?void 0:ee.area))),{typed:N,handleTypeaheadSearch:F}=Sc(),I=Pt({...xr(ll),...t.ids}),A=Qi({open:y,forceVisible:a,activeTrigger:_}),L=Pe(e(),{stores:[A,l,I.menu,I.trigger],returned:([Q,ee,te,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Dt({display:Q?void 0:"none"}),id:te,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":is(ee),tabindex:-1}),action:Q=>{let ee=ze;const te=xe([A,_,s,u,l,o],([we,Je,vt,j,Le,We])=>{ee(),!(!we||!Je)&&Wt().then(()=>{ee(),jr(Q,n),ee=es(Q,{anchorElement:Je,open:y,options:{floating:vt,modal:{closeOnInteractOutside:j,shouldCloseOnInteractOutside:Re=>{var Ie;return(Ie=g.get())==null||Ie(Re),!(Re.defaultPrevented||J(Je)&&Je.contains(Re.target))},onClose:()=>{y.set(!1),Je.focus()},open:we},portal:Ar(Q,Le),escapeKeydown:We?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,vt=we.currentTarget;if(!J(Je)||!J(vt)||!(Je.closest('[role="menu"]')===vt))return;if(Ys.includes(we.key)&&no(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),y.set(!1),to(we,h,k);return}const Le=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Le&&f.get()===!0&&F(we.key,un(vt))}));return{destroy(){te(),ue(),ee()}}}}),q=Pe(e("trigger"),{stores:[y,I.menu,I.trigger],returned:([Q,ee,te])=>({"aria-controls":ee,"aria-expanded":Q,"data-state":Q?"open":"closed",id:te,tabindex:0}),action:Q=>(Qr(Q),_.update(te=>te||Q),{destroy:rt(ke(Q,"click",te=>{const ue=y.get(),we=te.currentTarget;J(we)&&(_t(we),ue||te.preventDefault())}),ke(Q,"keydown",te=>{const ue=te.currentTarget;if(!J(ue)||!(ei.includes(te.key)||te.key===ae.ARROW_DOWN))return;te.preventDefault(),_t(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const vt=un(Je);vt.length&&et(vt[0])}))})}),W=Pe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),oe=Pe(e("overlay"),{stores:[A],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Dt({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":am(Q)}),action:Q=>{let ee=ze;o.get()&&(ee=ni(Q,{handler:()=>{y.set(!1);const we=_.get();we&&we.focus()}}).destroy);const te=xe([l],([ue])=>{if(ue===null)return ze;const we=Ar(Q,ue);return we===null?ze:us(Q,we).destroy});return{destroy(){ee(),te()}}}}),se=Pe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(jr(Q,n),Qr(Q),{destroy:rt(ke(Q,"pointerdown",te=>{const ue=te.currentTarget;if(J(ue)&&ln(ue)){te.preventDefault();return}}),ke(Q,"click",te=>{const ue=te.currentTarget;if(J(ue)){if(ln(ue)){te.preventDefault();return}if(te.defaultPrevented){et(ue);return}p.get()&&cn(1).then(()=>{y.set(!1)})}}),ke(Q,"keydown",te=>{Nr(te)}),ke(Q,"pointermove",te=>{Ir(te)}),ke(Q,"pointerleave",te=>{Mr(te)}),ke(Q,"focusin",te=>{ct(te)}),ke(Q,"focusout",te=>{mn(te)}))})}),z=Pe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),le=Pe(e("group-label"),{returned:()=>Q=>({id:Q})}),Se={defaultChecked:!1,disabled:!1},st=Q=>{const ee={...Se,...Q},te=ee.checked??De(ee.defaultChecked??null),ue=fr(te,ee.onCheckedChange),we=De(ee.disabled),Je=Pe(e("checkbox-item"),{stores:[ue,we],returned:([Le,We])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Hr(Le)?"mixed":Le?"true":"false","data-disabled":Gr(We),"data-state":_s(Le)}),action:Le=>(jr(Le,n),Qr(Le),{destroy:rt(ke(Le,"pointerdown",Re=>{const Ie=Re.currentTarget;if(J(Ie)&&ln(Ie)){Re.preventDefault();return}}),ke(Le,"click",Re=>{const Ie=Re.currentTarget;if(J(Ie)){if(ln(Ie)){Re.preventDefault();return}if(Re.defaultPrevented){et(Ie);return}ue.update(hn=>Hr(hn)?!0:!hn),p.get()&&Wt().then(()=>{y.set(!1)})}}),ke(Le,"keydown",Re=>{Nr(Re)}),ke(Le,"pointermove",Re=>{const Ie=Re.currentTarget;if(J(Ie)){if(ln(Ie)){pn(Re);return}Ir(Re,Ie)}}),ke(Le,"pointerleave",Re=>{Mr(Re)}),ke(Le,"focusin",Re=>{ct(Re)}),ke(Le,"focusout",Re=>{mn(Re)}))})}),vt=Ke(ue,Le=>Le===!0),j=Ke(ue,Le=>Le==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:vt,isIndeterminate:j},options:{disabled:we}}},He=(Q={})=>{const ee=Q.value??De(Q.defaultValue??null),te=fr(ee,Q.onValueChange),ue=Pe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Pe(e("radio-item"),{stores:[te],returned:([j])=>Le=>{const{value:We,disabled:Re}={...we,...Le},Ie=j===We;return{disabled:Re,role:"menuitemradio","data-state":Ie?"checked":"unchecked","aria-checked":Ie,"data-disabled":Gr(Re),"data-value":We,"data-orientation":"vertical",tabindex:-1}},action:j=>(jr(j,n),{destroy:rt(ke(j,"pointerdown",We=>{const Re=We.currentTarget;if(!J(Re))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){We.preventDefault();return}}),ke(j,"click",We=>{const Re=We.currentTarget;if(!J(Re))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){We.preventDefault();return}if(We.defaultPrevented){if(!J(Re))return;et(Re);return}te.set(Ie),p.get()&&Wt().then(()=>{y.set(!1)})}),ke(j,"keydown",We=>{Nr(We)}),ke(j,"pointermove",We=>{const Re=We.currentTarget;if(!J(Re))return;const Ie=j.dataset.value;if(j.dataset.disabled||Ie===void 0){pn(We);return}Ir(We,Re)}),ke(j,"pointerleave",We=>{Mr(We)}),ke(j,"focusin",We=>{ct(We)}),ke(j,"focusout",We=>{mn(We)}))})}),vt=Ke(te,j=>Le=>j===Le);return{elements:{radioGroup:ue,radioItem:Je},states:{value:te},helpers:{isChecked:vt}}},{elements:{root:Y}}=km({orientation:"horizontal"}),X={...im,disabled:!1,positioning:{placement:"right-start",gutter:8}},ht=Q=>{const ee={...X,...Q},te=ee.open??De(!1),ue=fr(te,ee==null?void 0:ee.onOpenChange),we=Pt(Rr(ee,"ids")),{positioning:Je,arrowSize:vt,disabled:j}=we,Le=Xe(De(null)),We=Xe(De(null)),Re=Xe(De(0)),Ie=Pt({...xr(ll),...ee.ids});Jr(()=>{const Ue=document.getElementById(Ie.trigger.get());Ue&&Le.set(Ue)});const hn=Qi({open:ue,forceVisible:a,activeTrigger:Le}),mf=Pe(e("submenu"),{stores:[hn,Ie.menu,Ie.trigger],returned:([Ue,dt,$t])=>({role:"menu",hidden:Ue?void 0:!0,style:Dt({display:Ue?void 0:"none"}),id:dt,"aria-labelledby":$t,"data-state":Ue?"open":"closed","data-id":dt,tabindex:-1}),action:Ue=>{let dt=ze;const $t=xe([hn,Je],([Ee,Ze])=>{if(dt(),!Ee)return;const tt=Le.get();tt&&Wt().then(()=>{dt();const ot=Ei(tt);dt=es(Ue,{anchorElement:tt,open:ue,options:{floating:Ze,portal:J(ot)?ot:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Qe=rt(ke(Ue,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!J(Ze)||!J(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(Ys.includes(Ee.key)){Ee.stopImmediatePropagation(),no(Ee,c.get()??!1);return}const Jn=rm.ltr.includes(Ee.key),xn=Ee.ctrlKey||Ee.altKey||Ee.metaKey,wi=Ee.key.length===1;if(Jn){const Do=Le.get();Ee.preventDefault(),ue.update(()=>(Do&&et(Do),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),y.set(!1),to(Ee,h,k);return}!xn&&wi&&f.get()===!0&&F(Ee.key,un(tt))}),ke(Ue,"pointermove",Ee=>{hs(Ee)}),ke(Ue,"focusout",Ee=>{const Ze=Le.get();if(O.get()){const tt=Ee.target,ot=document.getElementById(Ie.menu.get());if(!J(ot)||!J(tt))return;!ot.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,ot=Ee.relatedTarget;if(!J(ot)||!J(tt))return;!tt.contains(ot)&&ot!==Ze&&ue.set(!1)}}));return{destroy(){$t(),dt(),Qe()}}}}),pf=Pe(e("subtrigger"),{stores:[ue,j,Ie.menu,Ie.trigger],returned:([Ue,dt,$t,Qe])=>({role:"menuitem",id:Qe,tabindex:-1,"aria-controls":$t,"aria-expanded":Ue,"data-state":Ue?"open":"closed","data-disabled":Gr(dt),"aria-haspopop":"menu"}),action:Ue=>{jr(Ue,n),Qr(Ue),Le.update(Qe=>Qe||Ue);const dt=()=>{ws(We),window.clearTimeout(Re.get()),C.set(null)},$t=rt(ke(Ue,"click",Qe=>{if(Qe.defaultPrevented)return;const Ee=Qe.currentTarget;!J(Ee)||ln(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Le.set(Ee),!Ze)))}),ke(Ue,"keydown",Qe=>{const Ee=N.get(),Ze=Qe.currentTarget;if(!(!J(Ze)||ln(Ze)||Ee.length>0&&Qe.key===ae.SPACE)&&nm.ltr.includes(Qe.key)){if(!ue.get()){Ze.click(),Qe.preventDefault();return}const ot=Ze.getAttribute("aria-controls");if(!ot)return;const Jn=document.getElementById(ot);if(!J(Jn))return;const xn=un(Jn)[0];et(xn)}}),ke(Ue,"pointermove",Qe=>{if(!Kr(Qe)||(Ln(Qe),Qe.defaultPrevented))return;const Ee=Qe.currentTarget;if(!J(Ee))return;um(Ie.menu.get())||et(Ee);const Ze=We.get();!ue.get()&&!Ze&&!ln(Ee)&&We.set(window.setTimeout(()=>{ue.update(()=>(Le.set(Ee),!0)),ws(We)},100))}),ke(Ue,"pointerleave",Qe=>{if(!Kr(Qe))return;ws(We);const Ee=document.getElementById(Ie.menu.get()),Ze=Ee==null?void 0:Ee.getBoundingClientRect();if(Ze){const tt=Ee==null?void 0:Ee.dataset.side,ot=tt==="right",Jn=ot?-5:5,xn=Ze[ot?"left":"right"],wi=Ze[ot?"right":"left"];C.set({area:[{x:Qe.clientX+Jn,y:Qe.clientY},{x:xn,y:Ze.top},{x:wi,y:Ze.top},{x:wi,y:Ze.bottom},{x:xn,y:Ze.bottom}],side:tt}),window.clearTimeout(Re.get()),Re.set(window.setTimeout(()=>{C.set(null)},300))}else{if(ps(Qe),Qe.defaultPrevented)return;C.set(null)}}),ke(Ue,"focusout",Qe=>{const Ee=Qe.currentTarget;if(!J(Ee))return;gn(Ee);const Ze=Qe.relatedTarget;if(!J(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const ot=document.getElementById(tt);ot&&!ot.contains(Ze)&&ue.set(!1)}),ke(Ue,"focusin",Qe=>{ct(Qe)}));return{destroy(){dt(),$t()}}}}),hf=Pe(e("subarrow"),{stores:vt,returned:Ue=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${Ue}px)`,height:`var(--arrow-size, ${Ue}px)`})})});return xe([y],([Ue])=>{Ue||(Le.set(null),ue.set(!1))}),xe([C],([Ue])=>{!mt||Ue||window.clearTimeout(Re.get())}),xe([ue],([Ue])=>{if(mt&&(Ue&&O.get()&&cn(1).then(()=>{const dt=document.getElementById(Ie.menu.get());if(!dt)return;const $t=un(dt);$t.length&&et($t[0])}),!Ue)){const dt=R.get(),$t=document.getElementById(Ie.trigger.get());if(dt&&cn(1).then(()=>{const Qe=document.getElementById(Ie.menu.get());Qe&&Qe.contains(dt)&&gn(dt)}),!$t||document.activeElement===$t)return;gn($t)}}),{ids:Ie,elements:{subTrigger:pf,subMenu:mf,subArrow:hf},states:{subOpen:ue},options:we}};Jr(()=>{const Q=document.getElementById(I.trigger.get());J(Q)&&y.get()&&_.set(Q);const ee=[],te=()=>O.set(!1),ue=()=>{O.set(!0),ee.push(rt(gt(document,"pointerdown",te,{capture:!0,once:!0}),gt(document,"pointermove",te,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){y.set(!1);return}};return ee.push(gt(document,"keydown",ue,{capture:!0})),ee.push(gt(document,"keydown",we)),()=>{ee.forEach(Je=>Je())}}),xe([y,R],([Q,ee])=>{!Q&&ee&&gn(ee)}),xe([y],([Q])=>{if(mt&&!Q){const ee=_.get();if(!ee)return;const te=d.get();!Q&&ee&&ti({prop:te,defaultEl:ee})}}),xe([y,r],([Q,ee])=>{if(!mt)return;const te=[];return cn(1).then(()=>{const ue=document.getElementById(I.menu.get());if(ue&&Q&&O.get()){if(m.get()){et(ue);return}const we=un(ue);if(!we.length)return;et(we[0])}}),()=>{te.forEach(ue=>ue())}}),xe(y,Q=>{if(!mt)return;const ee=()=>O.set(!1),te=ue=>{if(O.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){y.set(!1);return}};return rt(gt(document,"pointerdown",ee,{capture:!0,once:!0}),gt(document,"pointermove",ee,{capture:!0,once:!0}),gt(document,"keydown",te,{capture:!0}))});function _t(Q){y.update(ee=>{const te=!ee;return te&&(h.set(Pa(Q)),k.set(La(Q)),_.set(Q)),te})}function ct(Q){const ee=Q.currentTarget;if(!J(ee))return;const te=R.get();te&&gn(te),Gs(ee),R.set(ee)}function mn(Q){const ee=Q.currentTarget;J(ee)&&gn(ee)}function Ln(Q){Vr(Q)&&Q.preventDefault()}function pn(Q){if(Vr(Q))return;const ee=Q.target;if(!J(ee))return;const te=Ei(ee);te&&et(te)}function ps(Q){Vr(Q)&&Q.preventDefault()}function hs(Q){if(!Kr(Q))return;const ee=Q.target,te=Q.currentTarget;if(!J(te)||!J(ee))return;const ue=$.get(),we=ue!==Q.clientX;if(te.contains(ee)&&we){const Je=Q.clientX>ue?"right":"left";D.set(Je),$.set(Q.clientX)}}function Ir(Q,ee=null){if(!Kr(Q)||(Ln(Q),Q.defaultPrevented))return;if(ee){et(ee);return}const te=Q.currentTarget;J(te)&&et(te)}function Mr(Q){Kr(Q)&&pn(Q)}function Nr(Q){if(N.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(ei.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!J(ue))return;ue.click()}}function Hr(Q){return Q==="indeterminate"}function _s(Q){return Hr(Q)?"indeterminate":Q?"checked":"unchecked"}function Vr(Q){return K.get()(Q)}function Ei(Q){const ee=Q.closest('[role="menu"]');return J(ee)?ee:null}return{elements:{trigger:q,menu:L,overlay:oe,item:se,group:z,groupLabel:le,arrow:W,separator:Y},builders:{createCheckboxItem:st,createSubmenu:ht,createMenuRadioGroup:He},states:{open:y},helpers:{handleTypeaheadSearch:F},ids:I,options:t.rootOptions}}function to(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),cn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),cn(1).then(()=>r.focus()),e.set(null))}}function un(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>J(e))}function Qr(t){!t||!ln(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function ws(t){if(!mt)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function Kr(t){return t.pointerType==="mouse"}function jr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);J(n)&&t.setAttribute("data-melt-menu-id",n.id)}function no(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!J(n)||!J(r))return;const i=un(r);if(!i.length)return;const s=i.filter(l=>!(l.hasAttribute("data-disabled")||l.getAttribute("disabled")==="true")),o=s.indexOf(n);let u;switch(t.key){case ae.ARROW_DOWN:e?u=o<s.length-1?o+1:0:u=o<s.length-1?o+1:o;break;case ae.ARROW_UP:e?u=o>0?o-1:s.length-1:u=o<0?s.length-1:o>0?o-1:0;break;case ae.HOME:u=0;break;case ae.END:u=s.length-1;break;default:return}et(s[u])}function om(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return lm(n,e)}function lm(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const u=e[s].x,l=e[s].y,a=e[o].x,f=e[o].y;l>r!=f>r&&n<(a-u)*(r-l)/(f-l)+u&&(i=!i)}return i}function um(t){const e=document.activeElement;if(!J(e))return!1;const n=e.closest(`[data-id="${t}"]`);return J(n)}function am(t){return t?"open":"closed"}const fm={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...Rr(fm,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:In}=Xn("dialog"),cm={preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,role:"dialog",defaultOpen:!1,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},dm=["content","title","description"];function mm(t){const e={...cm,...t},n=Pt(Rr(e,"ids")),{preventScroll:r,closeOnEscape:i,closeOnOutsideClick:s,role:o,portal:u,forceVisible:l,openFocus:a,closeFocus:f,onOutsideClick:c}=n,d=Xe.writable(null),m=Pt({...xr(dm),...e.ids}),p=e.open??De(e.defaultOpen),g=fr(p,e==null?void 0:e.onOpenChange),y=Ke([g,l],([F,I])=>F||I);let _=ze;function h(F){const I=F.currentTarget,A=F.currentTarget;!J(I)||!J(A)||(g.set(!0),d.set(A))}function k(){g.set(!1),ti({prop:f.get(),defaultEl:d.get()})}const O=Pe(In("trigger"),{stores:[g],returned:([F])=>({"aria-haspopup":"dialog","aria-expanded":F,type:"button"}),action:F=>({destroy:rt(ke(F,"click",A=>{h(A)}),ke(F,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),h(A))}))})}),$=Pe(In("overlay"),{stores:[y,g],returned:([F,I])=>({hidden:F?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),"aria-hidden":!0,"data-state":I?"open":"closed"}),action:F=>{let I=ze;return i.get()&&(I=ni(F,{handler:()=>{k()}}).destroy),{destroy(){I()}}}}),C=Pe(In("content"),{stores:[y,m.content,m.description,m.title,g],returned:([F,I,A,L,q])=>({id:I,role:o.get(),"aria-describedby":A,"aria-labelledby":L,"aria-modal":F?"true":void 0,"data-state":q?"open":"closed",tabindex:-1,hidden:F?void 0:!0,style:Dt({display:F?void 0:"none"})}),action:F=>{let I=ze,A=ze;const L=rt(xe([g,s,i],([q,W,oe])=>{if(!q)return;const se=Za({immediate:!1,escapeDeactivates:oe,clickOutsideDeactivates:W,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:F});I=se.activate,A=se.deactivate;const z=se.useFocusTrap(F);return z&&z.destroy?z.destroy:se.deactivate}),xe([s,g],([q,W])=>Xa(F,{open:W,closeOnInteractOutside:q,onClose(){k()},shouldCloseOnInteractOutside(oe){var se;return(se=c.get())==null||se(oe),!oe.defaultPrevented}}).destroy),xe([i],([q])=>q?ni(F,{handler:k}).destroy:ze),xe([y],([q])=>{Wt().then(()=>{q?I():A()})}));return{destroy:()=>{_(),L()}}}}),D=Pe(In("portalled"),{stores:u,returned:F=>({"data-portal":is(F)}),action:F=>{const I=xe([u],([A])=>{if(A===null)return ze;const L=Ar(F,A);return L===null?ze:us(F,L).destroy});return{destroy(){I()}}}}),R=Pe(In("title"),{stores:[m.title],returned:([F])=>({id:F})}),K=Pe(In("description"),{stores:[m.description],returned:([F])=>({id:F})}),N=Pe(In("close"),{returned:()=>({type:"button"}),action:F=>({destroy:rt(ke(F,"click",()=>{k()}),ke(F,"keydown",A=>{A.key!==ae.SPACE&&A.key!==ae.ENTER||(A.preventDefault(),k())}))})});return xe([g,r],([F,I])=>{if(mt){if(I&&F&&(_=_o()),F){const A=document.getElementById(m.content.get());ti({prop:a.get(),defaultEl:A})}return()=>{l.get()||_()}}}),{ids:m,elements:{content:C,trigger:O,title:R,description:K,overlay:$,close:N,portalled:D},states:{open:g},options:n}}const ul=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:Os}=Xn("menubar"),pm={loop:!0,closeOnEscape:!0,preventScroll:!1},hm=["menubar"];function _m(t){const e={...pm,...t},n=Pt(Rr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(De("")),u=Xe(De(null)),l=Xe(De(null)),a=Xe(De(null)),f=Xe(De(0));let c=!1;const d=Pt({...xr(hm),...e.ids}),m=Pe(Os(),{stores:[d.menubar],returned([O]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:O}},action:O=>{const $=Array.from(O.querySelectorAll("[data-melt-menubar-trigger]"));return J($[0])?($[0].tabIndex=0,{destroy:ze}):{}}}),p={positioning:{placement:"bottom-start"},arrowSize:8,dir:"ltr",loop:!1,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,defaultOpen:!1,typeahead:!0,closeFocus:void 0,disableFocusFirstItem:!1,closeOnItemClick:!0,onOutsideClick:void 0},g=O=>{const $={...p,...O},C=Xe(De(!1)),D=Xe(De(null)),R=Pt($),{positioning:K,portal:N,forceVisible:F,closeOnOutsideClick:I,onOutsideClick:A}=R,L=sm({rootOptions:{...R,preventScroll:s},rootOpen:Xe(C),rootActiveTrigger:Xe(D),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),q=Qi({open:C,forceVisible:F,activeTrigger:D}),W=Pe(Os("menu"),{stores:[q,N,L.ids.menu,L.ids.trigger,d.menubar],returned:([z,le,Se,st,He])=>({role:"menu",hidden:z?void 0:!0,style:Dt({display:z?void 0:"none"}),id:Se,"aria-labelledby":st,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":is(le),tabindex:-1}),action:z=>{let le=ze;const Se=xe([C,D,K,N,I],([He,Y,X,ht,_t])=>{le(),He&&Y&&Wt().then(()=>{le(),le=es(z,{anchorElement:Y,open:C,options:{floating:X,portal:Ar(z,ht),modal:{closeOnInteractOutside:_t,shouldCloseOnInteractOutside:ct=>{var pn;if((pn=A.get())==null||pn(ct),ct.defaultPrevented)return!1;const mn=ct.target,Ln=document.getElementById(d.menubar.get());return!Ln||!mi(mn)?!0:!Ln.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),st=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!J(X)||!J(Y)||(ul.includes(He.key)&&y(He),!(Y.closest('[role="menu"]')===X)))return;Ys.includes(He.key)&&no(He),He.key===ae.TAB&&(He.preventDefault(),D.set(null),C.set(!1),to(He,u,l));const _t=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&_t&&L.helpers.handleTypeaheadSearch(He.key,un(X))}));return{destroy(){Se(),st(),le()}}}}),oe=Pe(Os("trigger"),{stores:[C,L.ids.menu,L.ids.trigger],returned:([z,le,Se])=>({"aria-controls":le,"aria-expanded":z,"data-state":z?"open":"closed",id:Se,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{Qr(z);const le=document.getElementById(d.menubar.get());if(!le)return{};const Se=Array.from(le.querySelectorAll("[data-melt-menubar-trigger]"));if(!Se.length)return{};const st=xe([a],([Y])=>{!Y&&Se[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});Se[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=C.get(),ht=Y.currentTarget;J(ht)&&(se(ht),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(J(X)&&(ei.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),se(X);const ht=X.getAttribute("aria-controls");if(!ht)return;const _t=document.getElementById(ht);if(!_t)return;const ct=un(_t);if(!ct.length)return;et(ct[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!J(X))return;const ht=o.get(),_t=C.get();ht&&!_t&&(C.set(!0),o.set(L.ids.menu.get()),D.set(X))}));return{destroy(){He(),st()}}}});function se(z){C.update(le=>{const Se=!le;return Se?(u.set(Pa(z)),l.set(La(z)),D.set(z),o.set(L.ids.menu.get())):D.set(null),Se})}return xe([o],([z])=>{if(mt){if(z===L.ids.menu.get()){if(C.get())return;const le=document.getElementById(L.ids.trigger.get());if(!le)return;D.set(le),Gs(le),C.set(!0);return}if(z!==L.ids.menu.get()){if(!mt)return;if(C.get()){const le=document.getElementById(L.ids.trigger.get());if(!le)return;D.set(null),C.set(!1),gn(le)}return}}}),xe([C],([z])=>{if(!mt)return;const le=document.getElementById(L.ids.trigger.get());if(le){if(!z&&o.get()===L.ids.menu.get()){D.set(null),o.set(""),gn(le);return}z&&(a.set(le),Gs(le))}}),Jr(()=>{if(!mt)return;const z=document.getElementById(L.ids.trigger.get());J(z)&&C.get()&&D.set(z)}),{ids:L.ids,elements:{...L.elements,menu:W,trigger:oe},builders:L.builders,states:L.states,options:R}};function y(O){if(!mt)return;O.preventDefault();const $=O.currentTarget,C=O.target;if(!J(C)||!J($))return;const D=C.hasAttribute("data-melt-menubar-menu-subtrigger"),R=C.closest('[role="menu"]')!==$,K=ae.ARROW_LEFT,N=O.key===K;if(!N&&D||N&&R)return;const I=document.getElementById(d.menubar.get());if(!J(I))return;const A=_(I),L=$.getAttribute("aria-labelledby"),q=A.findIndex(z=>z.id===L);let W;switch(O.key){case ae.ARROW_RIGHT:W=q<A.length-1?q+1:0;break;case ae.ARROW_LEFT:W=q>0?q-1:A.length-1;break;case ae.HOME:W=0;break;case ae.END:W=A.length-1;break;default:return}const se=A[W].getAttribute("aria-controls");se&&o.set(se)}function _(O){const $=O.closest('[role="menubar"]');return J($)?Array.from($.querySelectorAll("[data-melt-menubar-trigger]")).filter(C=>J(C)):[]}function h(O){O.preventDefault();const $=document.activeElement,C=O.currentTarget;if(!J(C)||!J($))return;const D=_(C);if(!D.length)return;const R=D.filter(I=>!(I.hasAttribute("data-disabled")||I.getAttribute("disabled")==="true")),K=R.indexOf($);let N;const F=r.get();switch(O.key){case ae.ARROW_RIGHT:N=K<R.length-1?K+1:F?0:K;break;case ae.ARROW_LEFT:N=K>0?K-1:F?R.length-1:0;break;case ae.HOME:N=0;break;case ae.END:N=R.length-1;break;default:return}et(R[N])}Jr(()=>{if(!mt)return;const O=document.getElementById(d.menubar.get());if(!O)return;const $=rt(ke(O,"keydown",C=>{const D=C.target,R=C.currentTarget;!J(R)||!J(D)||!D.hasAttribute("data-melt-menubar-trigger")||ul.includes(C.key)&&h(C)}),gt(document,"keydown",C=>{i.get()&&C.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{$()}});const k=[];return xe([o,s],([O,$])=>{!mt||!$||(O?c||(k.push(_o()),c=!0):(k.forEach(C=>C()),c=!1))}),$a(()=>{k.forEach(O=>O())}),{ids:d,elements:{menubar:m},builders:{createMenu:g},options:n}}const gm={positioning:{placement:"bottom"},arrowSize:8,defaultOpen:!1,disableFocusTrap:!1,closeOnEscape:!0,preventScroll:!1,onOpenChange:void 0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},{name:qr}=Xn("popover"),bm=["trigger","content"];function ym(t){const e={...gm,...t},n=Pt(Rr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:d,onOutsideClick:m}=n,p=e.open??De(e.defaultOpen),g=fr(p,e==null?void 0:e.onOpenChange),y=Xe.writable(null),_=Pt({...xr(bm),...e.ids});Jr(()=>{y.set(document.getElementById(_.trigger.get()))});function h(){g.set(!1);const F=document.getElementById(_.trigger.get());ti({prop:d.get(),defaultEl:F})}const k=Qi({open:g,activeTrigger:y,forceVisible:f}),O=Pe(qr("content"),{stores:[k,a,_.content],returned:([F,I,A])=>({hidden:F&&mt?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),id:A,"data-state":F?"open":"closed","data-portal":is(I)}),action:F=>{let I=ze;const A=xe([k,y,r,s,u,l,a],([L,q,W,oe,se,z,le])=>{I(),!(!L||!q)&&Wt().then(()=>{I(),I=es(F,{anchorElement:q,open:g,options:{floating:W,focusTrap:oe?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:se},modal:{shouldCloseOnInteractOutside:C,onClose:h,open:L,closeOnInteractOutside:z},escapeKeydown:se?{handler:()=>{h()}}:null,portal:Ar(F,le)}}).destroy})});return{destroy(){A(),I()}}}});function $(F){g.update(I=>!I),F&&F!==y.get()&&y.set(F)}function C(F){var L;if((L=m.get())==null||L(F),F.defaultPrevented)return!1;const I=F.target,A=document.getElementById(_.trigger.get());return!(A&&mi(I)&&(I===A||A.contains(I)))}const D=Pe(qr("trigger"),{stores:[k,_.content,_.trigger],returned:([F,I,A])=>({role:"button","aria-haspopup":"dialog","aria-expanded":F?"true":"false","data-state":al(F),"aria-controls":I,id:A}),action:F=>({destroy:rt(ke(F,"click",()=>{$(F)}),ke(F,"keydown",A=>{A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),$(F))}))})}),R=Pe(qr("overlay"),{stores:[k],returned:([F])=>({hidden:F?void 0:!0,tabindex:-1,style:Dt({display:F?void 0:"none"}),"aria-hidden":"true","data-state":al(F)}),action:F=>{let I=ze,A=ze,L=ze;return u.get()&&(I=ni(F,{handler:()=>{h()}}).destroy),A=xe([a],([q])=>{if(L(),q===null)return;const W=Ar(F,q);W!==null&&(L=us(F,W).destroy)}),{destroy(){I(),A(),L()}}}}),K=Pe(qr("arrow"),{stores:i,returned:F=>({"data-arrow":!0,style:Dt({position:"absolute",width:`var(--arrow-size, ${F}px)`,height:`var(--arrow-size, ${F}px)`})})}),N=Pe(qr("close"),{returned:()=>({type:"button"}),action:F=>({destroy:rt(ke(F,"click",A=>{A.defaultPrevented||h()}),ke(F,"keydown",A=>{A.defaultPrevented||A.key!==ae.ENTER&&A.key!==ae.SPACE||(A.preventDefault(),$())}))})});return xe([g,y,o],([F,I,A])=>{if(!mt)return;const L=[];if(F){I||Wt().then(()=>{const W=document.getElementById(_.trigger.get());J(W)&&y.set(W)}),A&&L.push(_o());const q=I??document.getElementById(_.trigger.get());ti({prop:c.get(),defaultEl:q})}return()=>{L.forEach(q=>q())}}),{ids:_,elements:{trigger:D,content:O,arrow:K,close:N,overlay:R},states:{open:g},options:n}}function al(t){return t?"open":"closed"}const vm={orientation:"horizontal",decorative:!1},km=t=>{const e={...vm,...t},n=Pt(e),{orientation:r,decorative:i}=n;return{elements:{root:Pe("separator",{stores:[r,i],returned:([o,u])=>({role:u?"none":"separator","aria-orientation":o==="vertical"?o:void 0,"aria-hidden":u,"data-orientation":o})})},options:n}},Cm={loop:!0,orientation:"horizontal"},{name:Di,selector:As}=Xn("toolbar"),Em=t=>{const e={...Cm,...t},n=Pt(e),{loop:r,orientation:i}=n,s=Pe(Di(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Pe(Di("button"),{returned:()=>({role:"button",type:"button"}),action:d=>(Ts(d),{destroy:ke(d,"keydown",c)})}),u=Pe(Di("link"),{returned:()=>({role:"link"}),action:d=>(Ts(d),{destroy:ke(d,"keydown",c)})}),l=Pe(Di("separator"),{stores:i,returned:d=>({role:"separator","data-orientation":d==="horizontal"?"vertical":"horizontal","aria-orientation":d==="horizontal"?"vertical":"horizontal"})}),a={type:"single",disabled:!1},f=d=>{const m={...a,...d},p=Pt(m),{type:g,disabled:y}=p,_=m.defaultValue?m.defaultValue:m.type==="single"?void 0:[],h=m.value??De(_),k=fr(h,m==null?void 0:m.onValueChange),{name:O}=Xn("toolbar-group"),$=Pe(O(),{stores:i,returned:R=>({role:"group","data-orientation":R})}),C=Pe(O("item"),{stores:[y,g,k,i],returned:([R,K,N,F])=>I=>{const A=typeof I=="string"?I:I.value,L=typeof I=="string"?!1:!!I.disabled,q=R||L,W=Array.isArray(N)?N.includes(A):N===A,oe=K==="single",se=K==="multiple";return{disabled:Gr(q),pressed:W,"data-orientation":F,"data-disabled":Gr(q),"data-value":A,"data-state":W?"on":"off","aria-checked":oe?W:void 0,"aria-pressed":se?W:void 0,type:"button",role:oe?"radio":void 0,"data-melt-toolbar-item":""}},action:R=>{Ts(R);function K(){const I=R.dataset.value,A=R.dataset.disabled==="true";return{value:I,disabled:A}}function N(){const{value:I,disabled:A}=K();I===void 0||A||k.update(L=>Array.isArray(L)?L.includes(I)?L.filter(q=>q!==I):(L.push(I),L):L===I?void 0:I)}return{destroy:rt(ke(R,"click",()=>{N()}),ke(R,"keydown",I=>{if(I.key===ae.ENTER||I.key===ae.SPACE){I.preventDefault(),N();return}c(I)}))}}}),D=Ke(k,R=>K=>Array.isArray(R)?R.includes(K):R===K);return{elements:{group:$,item:C},states:{value:k},helpers:{isPressed:D},options:p}};function c(d){const m=i.get(),p=r.get(),g={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[m??"horizontal"],y={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[m??"horizontal"],_=d.currentTarget;if(!J(_))return;const h=_.closest("[data-melt-toolbar]");if(!J(h))return;const k=xa(h),O=k.indexOf(_);if(d.key===g){d.preventDefault();const $=O+1;$>=k.length&&p?et(k[0]):et(k[$])}else if(d.key===y){d.preventDefault();const $=O-1;$<0&&p?et(k[k.length-1]):et(k[$])}else d.key===ae.HOME?(d.preventDefault(),et(k[0])):d.key===ae.END&&(d.preventDefault(),et(k[k.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function Ts(t){const e=t.closest("[data-melt-toolbar]");if(!J(e))return;xa(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function xa(t){return Array.from(t.querySelectorAll(`${As("item")}, ${As("button")}, ${As("link")}`)).filter(e=>J(e))}function ii(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function wm(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Pn(){const t=Sf();return e=>{const{originalEvent:n}=e.detail,{cancelable:r}=e,i=n.type;t(i,{originalEvent:n,currentTarget:n.currentTarget},{cancelable:r})||e.preventDefault()}}function hi(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function _i(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function ef(t){return(e={})=>Om(t,e)}function Om(t,e){const r={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(i=>({...i,placement:Am(r.side,r.align),offset:{...i.offset,mainAxis:r.sideOffset,crossAxis:r.alignOffset},gutter:0,sameWidth:r.sameWidth,flip:r.avoidCollisions,overflowPadding:r.collisionPadding,boundary:r.collisionBoundary,fitViewport:r.fitViewport,strategy:r.strategy,overlap:r.overlap}))}function Am(t,e){return e==="center"?t:`${t}-${e}`}function wo(){return{NAME:"menu",SUB_NAME:"menu-submenu",RADIO_GROUP_NAME:"menu-radiogroup",CHECKBOX_ITEM_NAME:"menu-checkboxitem",RADIO_ITEM_NAME:"menu-radioitem",GROUP_NAME:"menu-group",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","radio-indicator","separator","sub-content","sub-trigger","trigger"]}}function gi(){const{NAME:t}=wo();return pt(t)}function Tm(t){const{RADIO_GROUP_NAME:e}=wo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=gi(),i=n(t);return Ct(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function $m(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=wo(),r=pt(n);return Ct(e,{...r,value:t}),{...r,value:t}}function Sm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=gi();ef(r)(n)}const Rm=t=>({builder:t&8}),fl=t=>({builder:t[3]}),Fm=t=>({builder:t&8}),cl=t=>({builder:t[3]});function Dm(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&$s(t);return{c(){i&&i.c(),n=Fe()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1],e?fe(e,s[1]?"a":"div")?(i.d(1),i=$s(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=$s(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n))},i(s){r||(b(i,s),r=!0)},o(s){v(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function Pm(t){let e;const n=t[11].default,r=de(n,t,t[10],cl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&1032)&&pe(r,n,i,i[10],e?me(n,i[10],s,Fm):he(i[10]),cl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function $s(t){let e,n,r,i;const s=t[11].default,o=de(s,t,t[10],fl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S(t[1]?"a":"div"),o&&o.c(),Vi(t[1]?"a":"div")(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[13](e),n=!0,r||(i=[Be(t[3].action(e)),G(e,"m-click",t[5]),G(e,"m-focusin",t[5]),G(e,"m-focusout",t[5]),G(e,"m-keydown",t[5]),G(e,"m-pointerdown",t[5]),G(e,"m-pointerleave",t[5]),G(e,"m-pointermove",t[5]),G(e,"pointerenter",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f&1032)&&pe(o,s,a,a[10],n?me(s,a[10],f,Rm):he(a[10]),fl),Vi(a[1]?"a":"div")(e,l=Me(u,[(!n||f&2)&&{href:a[1]},f&8&&a[3],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function Lm(t){let e,n,r,i;const s=[Pm,Dm],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Im(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=je(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:d=!1}=e,{el:m=void 0}=e;const{elements:{item:p},getAttrs:g}=gi();x(t,p,k=>n(9,u=k));const y=Pn();function _(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{m=k,n(0,m)})}return t.$$set=k=>{e=ne(ne({},e),yt(k)),n(6,o=je(e,s)),"href"in k&&n(1,f=k.href),"asChild"in k&&n(2,c=k.asChild),"disabled"in k&&n(7,d=k.disabled),"el"in k&&n(0,m=k.el),"$$scope"in k&&n(10,a=k.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={...g("item"),...wm(d)}),t.$$.dirty&264&&Object.assign(r,i)},[m,f,c,r,p,y,o,d,i,u,a,l,_,h]}class Ht extends ve{constructor(e){super(),ye(this,e,Im,Lm,fe,{href:1,asChild:2,disabled:7,el:0})}}const Mm=t=>({builder:t&4}),dl=t=>({builder:t[2]}),Nm=t=>({builder:t&4}),ml=t=>({builder:t[2]});function Hm(t){let e,n,r,i;const s=t[10].default,o=de(s,t,t[9],dl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-focusin",t[4]),G(e,"m-focusout",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerdown",t[4]),G(e,"m-pointerleave",t[4]),G(e,"m-pointermove",t[4]),G(e,"pointerenter",t[11])],r=!0)},p(a,f){o&&o.p&&(!n||f&516)&&pe(o,s,a,a[9],n?me(s,a[9],f,Mm):he(a[9]),dl),ie(e,l=Me(u,[f&4&&a[2],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function Vm(t){let e;const n=t[10].default,r=de(n,t,t[9],ml);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&516)&&pe(r,n,i,i[9],e?me(n,i[9],s,Nm):he(i[9]),ml)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Bm(t){let e,n,r,i;const s=[Vm,Hm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Um(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a}=e,{disabled:f=!1}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioItem:m},getAttrs:p}=$m(a);x(t,m,k=>n(8,o=k));const g=p("radio-item"),y=Pn();function _(k){Oe.call(this,t,k)}function h(k){Ce[k?"unshift":"push"](()=>{d=k,n(0,d)})}return t.$$set=k=>{e=ne(ne({},e),yt(k)),n(5,s=je(e,i)),"value"in k&&n(6,a=k.value),"disabled"in k&&n(7,f=k.disabled),"asChild"in k&&n(1,c=k.asChild),"el"in k&&n(0,d=k.el),"$$scope"in k&&n(9,l=k.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,g)},[d,c,r,m,y,s,a,f,o,l,u,_,h]}class Km extends ve{constructor(e){super(),ye(this,e,Um,Bm,fe,{value:6,disabled:7,asChild:1,el:0})}}const jm=t=>({builder:t&4}),pl=t=>({builder:t[2]});function qm(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ne(s,i[o]);return{c(){e=S("div"),ie(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Be(t[3].action(e)),n=!0)},p(o,u){ie(e,s=Me(i,[u&8&&o[3],u&32&&o[5]]))},i:ce,o:ce,d(o){o&&E(e),t[8](null),n=!1,r()}}}function Wm(t){let e;const n=t[7].default,r=de(n,t,t[6],pl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&pe(r,n,i,i[6],e?me(n,i[6],s,jm):he(i[6]),pl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Qm(t){let e,n,r,i;const s=[Wm,qm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function zm(t,e,n){let r;const i=["asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=gi();x(t,c,g=>n(3,o=g));const m=d("separator");function p(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ne(ne({},e),yt(g)),n(5,s=je(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(6,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,o,c,s,l,u,p]}class as extends ve{constructor(e){super(),ye(this,e,zm,Qm,fe,{asChild:1,el:0})}}const Gm=t=>({builder:t&4}),hl=t=>({builder:t[2]}),Ym=t=>({builder:t&4}),_l=t=>({builder:t[2]});function Zm(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],hl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Be(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,Gm):he(a[8]),hl),ie(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function Xm(t){let e;const n=t[9].default,r=de(n,t,t[8],_l);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,Ym):he(i[8]),_l)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Jm(t){let e,n,r,i;const s=[Xm,Zm],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function xm(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{value:a=void 0}=e,{onValueChange:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{radioGroup:m},states:{value:p},getAttrs:g}=Tm({defaultValue:a,onValueChange:({next:h})=>(h!=null&&h!==a&&(f==null||f(h),n(5,a=h)),h)});x(t,m,h=>n(7,o=h));const y=g("radio-group");function _(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),yt(h)),n(4,s=je(e,i)),"value"in h&&n(5,a=h.value),"onValueChange"in h&&n(6,f=h.onValueChange),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&p.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,y)},[d,c,r,m,s,a,f,o,l,u,_]}class ep extends ve{constructor(e){super(),ye(this,e,xm,Jm,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function tf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function tp(t){const{NAME:e,PARTS:n}=tf(),r=ii(e,n),i={...ym({positioning:{placement:"bottom",gutter:0},...hi(t),forceVisible:!0}),getAttrs:r};return Ct(e,i),{...i,updateOption:_i(i.options)}}function Oo(){const{NAME:t}=tf();return pt(t)}function np(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Oo();ef(r)(n)}function nf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function rp(t){const{NAME:e,PARTS:n}=nf(),r=ii(e,n),i={...mm({...hi(t),role:"dialog",forceVisible:!0}),getAttrs:r};return Ct(e,i),{...i,updateOption:_i(i.options)}}function Lr(){const{NAME:t}=nf();return pt(t)}const ip=t=>({ids:t&1}),gl=t=>({ids:t[0]});function sp(t){let e;const n=t[12].default,r=de(n,t,t[11],gl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2049)&&pe(r,n,i,i[11],e?me(n,i[11],s,ip):he(i[11]),gl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function op(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{preventScroll:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{portal:a=void 0}=e,{open:f=void 0}=e,{onOpenChange:c=void 0}=e,{openFocus:d=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:p=void 0}=e;const{states:{open:g},updateOption:y,ids:_}=rp({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:m,onOutsideClick:p,onOpenChange:({next:k})=>(f!==k&&(c==null||c(k),n(2,f=k)),k)}),h=Ke([_.content,_.description,_.title],([k,O,$])=>({content:k,description:O,title:$}));return x(t,h,k=>n(0,r=k)),t.$$set=k=>{"preventScroll"in k&&n(3,o=k.preventScroll),"closeOnEscape"in k&&n(4,u=k.closeOnEscape),"closeOnOutsideClick"in k&&n(5,l=k.closeOnOutsideClick),"portal"in k&&n(6,a=k.portal),"open"in k&&n(2,f=k.open),"onOpenChange"in k&&n(7,c=k.onOpenChange),"openFocus"in k&&n(8,d=k.openFocus),"closeFocus"in k&&n(9,m=k.closeFocus),"onOutsideClick"in k&&n(10,p=k.onOutsideClick),"$$scope"in k&&n(11,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&g.set(f),t.$$.dirty&8&&y("preventScroll",o),t.$$.dirty&16&&y("closeOnEscape",u),t.$$.dirty&32&&y("closeOnOutsideClick",l),t.$$.dirty&64&&y("portal",a),t.$$.dirty&256&&y("openFocus",d),t.$$.dirty&512&&y("closeFocus",m),t.$$.dirty&1024&&y("onOutsideClick",p)},[r,h,f,o,u,l,a,c,d,m,p,s,i]}class si extends ve{constructor(e){super(),ye(this,e,op,sp,fe,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const lp=t=>({builder:t&8}),bl=t=>({builder:t[3]}),up=t=>({builder:t&8}),yl=t=>({builder:t[3]});function ap(t){let e=t[1],n,r,i=t[1]&&Ss(t);return{c(){i&&i.c(),n=Fe()},m(s,o){i&&i.m(s,o),w(s,n,o),r=!0},p(s,o){s[1]?e?fe(e,s[1])?(i.d(1),i=Ss(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Ss(s),e=s[1],i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=s[1])},i(s){r||(b(i,s),r=!0)},o(s){v(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function fp(t){let e;const n=t[9].default,r=de(n,t,t[8],yl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&264)&&pe(r,n,i,i[8],e?me(n,i[8],s,up):he(i[8]),yl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Ss(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],bl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S(t[1]),o&&o.c(),Vi(t[1])(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Be(t[3].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&264)&&pe(o,s,a,a[8],n?me(s,a[8],f,lp):he(a[8]),bl),Vi(a[1])(e,l=Me(u,[f&8&&a[3],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function cp(t){let e,n,r,i;const s=[fp,ap],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function dp(t,e,n){let r;const i=["level","asChild","id","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{level:a="h2"}=e,{asChild:f=!1}=e,{id:c=void 0}=e,{el:d=void 0}=e;const{elements:{title:m},ids:p,getAttrs:g}=Lr();x(t,m,h=>n(7,o=h));const y=g("title");function _(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),yt(h)),n(5,s=je(e,i)),"level"in h&&n(1,a=h.level),"asChild"in h&&n(2,f=h.asChild),"id"in h&&n(6,c=h.id),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&p.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,y)},[d,a,f,r,m,s,c,o,l,u,_]}class Tt extends ve{constructor(e){super(),ye(this,e,dp,cp,fe,{level:1,asChild:2,id:6,el:0})}}const mp=t=>({builder:t&4}),vl=t=>({builder:t[2]}),pp=t=>({builder:t&4}),kl=t=>({builder:t[2]});function hp(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],vl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,mp):he(a[7]),vl),ie(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function _p(t){let e;const n=t[8].default,r=de(n,t,t[7],kl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,pp):he(i[7]),kl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function gp(t){let e,n,r,i;const s=[_p,hp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function bp(t,e,n){let r;const i=["asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Lr();x(t,c,y=>n(6,o=y));const m=Pn(),p=d("close");function g(y){Ce[y?"unshift":"push"](()=>{f=y,n(0,f)})}return t.$$set=y=>{e=ne(ne({},e),yt(y)),n(5,s=je(e,i)),"asChild"in y&&n(1,a=y.asChild),"el"in y&&n(0,f=y.el),"$$scope"in y&&n(7,l=y.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,m,s,o,l,u,g]}class It extends ve{constructor(e){super(),ye(this,e,bp,gp,fe,{asChild:1,el:0})}}const yp=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),vp=t=>({builder:t&4}),El=t=>({builder:t[2]});function kp(t){let e,n,r,i;const s=t[7].default,o=de(s,t,t[6],Cl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=Be(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&68)&&pe(o,s,a,a[6],n?me(s,a[6],f,yp):he(a[6]),Cl),ie(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Cp(t){let e;const n=t[7].default,r=de(n,t,t[6],El);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&pe(r,n,i,i[6],e?me(n,i[6],s,vp):he(i[6]),El)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Ep(t){let e,n,r,i;const s=[Cp,kp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function wp(t,e,n){let r;const i=["asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Lr();x(t,c,g=>n(5,o=g));const m=d("portal");function p(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ne(ne({},e),yt(g)),n(4,s=je(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(6,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,s,o,l,u,p]}class bi extends ve{constructor(e){super(),ye(this,e,wp,Ep,fe,{asChild:1,el:0})}}const Op=t=>({builder:t[0]&256}),wl=t=>({builder:t[8]}),Ap=t=>({builder:t[0]&256}),Ol=t=>({builder:t[8]}),Tp=t=>({builder:t[0]&256}),Al=t=>({builder:t[8]}),$p=t=>({builder:t[0]&256}),Tl=t=>({builder:t[8]}),Sp=t=>({builder:t[0]&256}),$l=t=>({builder:t[8]}),Rp=t=>({builder:t[0]&256}),Sl=t=>({builder:t[8]});function Fp(t){let e,n,r,i;const s=t[16].default,o=de(s,t,t[15],wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[Be(t[8].action(e)),G(e,"pointerdown",t[45]),G(e,"pointermove",t[46]),G(e,"pointerup",t[47]),G(e,"touchcancel",t[48]),G(e,"touchend",t[49]),G(e,"touchmove",t[50],{passive:!1}),G(e,"touchstart",t[51],{passive:!1})],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&33024)&&pe(o,s,a,a[15],n?me(s,a[15],f,Op):he(a[15]),wl),ie(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function Dp(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],Ol);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"pointerdown",t[38]),G(e,"pointermove",t[39]),G(e,"pointerup",t[40]),G(e,"touchcancel",t[41]),G(e,"touchend",t[42]),G(e,"touchmove",t[43],{passive:!1}),G(e,"touchstart",t[44],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,Ap):he(t[15]),Ol),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){v(u,f),f&&(n=Dn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[55](null),f&&n&&n.end(),i=!1,Te(s)}}}function Pp(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],Al);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"pointerdown",t[31]),G(e,"pointermove",t[32]),G(e,"pointerup",t[33]),G(e,"touchcancel",t[34]),G(e,"touchend",t[35]),G(e,"touchmove",t[36],{passive:!1}),G(e,"touchstart",t[37],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,Tp):he(t[15]),Al),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Fn(e,t[3],t[4]),n.start()})),r=!0)},o(f){v(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function Lp(t){let e,n,r,i,s,o;const u=t[16].default,l=de(u,t,t[15],Tl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[53](e),i=!0,s||(o=[Be(t[8].action(e)),G(e,"pointerdown",t[24]),G(e,"pointermove",t[25]),G(e,"pointerup",t[26]),G(e,"touchcancel",t[27]),G(e,"touchend",t[28]),G(e,"touchmove",t[29],{passive:!1}),G(e,"touchstart",t[30],{passive:!1})],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&33024)&&pe(l,u,t,t[15],i?me(u,t[15],d,$p):he(t[15]),Tl),ie(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Fn(e,t[3],t[4]),n.start())}),i=!0)},o(c){v(l,c),n&&n.invalidate(),c&&(r=Dn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[53](null),c&&r&&r.end(),s=!1,Te(o)}}}function Ip(t){let e,n,r,i,s;const o=t[16].default,u=de(o,t,t[15],$l);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"pointerdown",t[17]),G(e,"pointermove",t[18]),G(e,"pointerup",t[19]),G(e,"touchcancel",t[20]),G(e,"touchend",t[21]),G(e,"touchmove",t[22],{passive:!1}),G(e,"touchstart",t[23],{passive:!1})],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&33024)&&pe(u,o,t,t[15],r?me(o,t[15],c,Sp):he(t[15]),$l),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){v(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[52](null),f&&n&&n.end(),i=!1,Te(s)}}}function Mp(t){let e;const n=t[16].default,r=de(n,t,t[15],Sl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&33024)&&pe(r,n,i,i[15],e?me(n,i[15],s,Rp):he(i[15]),Sl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Np(t){let e,n,r,i;const s=[Mp,Ip,Lp,Pp,Dp,Fp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Hp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:y=!1}=e,{id:_=void 0}=e,{el:h=void 0}=e;const{elements:{content:k},states:{open:O},ids:$,getAttrs:C}=Lr();x(t,k,j=>n(14,o=j)),x(t,O,j=>n(9,u=j));const D=C("content");function R(j){Oe.call(this,t,j)}function K(j){Oe.call(this,t,j)}function N(j){Oe.call(this,t,j)}function F(j){Oe.call(this,t,j)}function I(j){Oe.call(this,t,j)}function A(j){Oe.call(this,t,j)}function L(j){Oe.call(this,t,j)}function q(j){Oe.call(this,t,j)}function W(j){Oe.call(this,t,j)}function oe(j){Oe.call(this,t,j)}function se(j){Oe.call(this,t,j)}function z(j){Oe.call(this,t,j)}function le(j){Oe.call(this,t,j)}function Se(j){Oe.call(this,t,j)}function st(j){Oe.call(this,t,j)}function He(j){Oe.call(this,t,j)}function Y(j){Oe.call(this,t,j)}function X(j){Oe.call(this,t,j)}function ht(j){Oe.call(this,t,j)}function _t(j){Oe.call(this,t,j)}function ct(j){Oe.call(this,t,j)}function mn(j){Oe.call(this,t,j)}function Ln(j){Oe.call(this,t,j)}function pn(j){Oe.call(this,t,j)}function ps(j){Oe.call(this,t,j)}function hs(j){Oe.call(this,t,j)}function Ir(j){Oe.call(this,t,j)}function Mr(j){Oe.call(this,t,j)}function Nr(j){Oe.call(this,t,j)}function Hr(j){Oe.call(this,t,j)}function _s(j){Oe.call(this,t,j)}function Vr(j){Oe.call(this,t,j)}function Ei(j){Oe.call(this,t,j)}function Q(j){Oe.call(this,t,j)}function ee(j){Oe.call(this,t,j)}function te(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function ue(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function we(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function Je(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}function vt(j){Ce[j?"unshift":"push"](()=>{h=j,n(0,h)})}return t.$$set=j=>{e=ne(ne({},e),yt(j)),n(12,s=je(e,i)),"transition"in j&&n(1,f=j.transition),"transitionConfig"in j&&n(2,c=j.transitionConfig),"inTransition"in j&&n(3,d=j.inTransition),"inTransitionConfig"in j&&n(4,m=j.inTransitionConfig),"outTransition"in j&&n(5,p=j.outTransition),"outTransitionConfig"in j&&n(6,g=j.outTransitionConfig),"asChild"in j&&n(7,y=j.asChild),"id"in j&&n(13,_=j.id),"el"in j&&n(0,h=j.el),"$$scope"in j&&n(15,a=j.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&_&&$.content.set(_),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,D)},[h,f,c,d,m,p,g,y,r,u,k,O,s,_,o,a,l,R,K,N,F,I,A,L,q,W,oe,se,z,le,Se,st,He,Y,X,ht,_t,ct,mn,Ln,pn,ps,hs,Ir,Mr,Nr,Hr,_s,Vr,Ei,Q,ee,te,ue,we,Je,vt]}class yi extends ve{constructor(e){super(),ye(this,e,Hp,Np,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const Vp=t=>({builder:t&256}),Rl=t=>({builder:t[8]});function Bp(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ne(s,i[o]);return{c(){e=S("div"),ie(e,s)},m(o,u){w(o,e,u),t[25](e),n||(r=[Be(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){ie(e,s=Me(i,[u&256&&o[8],u&4096&&o[12]]))},i:ce,o:ce,d(o){o&&E(e),t[25](null),n=!1,Te(r)}}}function Up(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ne(u,o[l]);return{c(){e=S("div"),ie(e,u)},m(l,a){w(l,e,a),t[24](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,ie(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(n&&n.end(1),r=!0)},o(l){l&&(n=Dn(e,t[5],t[6])),r=!1},d(l){l&&E(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function Kp(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ne(o,s[u]);return{c(){e=S("div"),ie(e,o)},m(u,l){w(u,e,l),t[23](e),r||(i=[Be(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,ie(e,o=Me(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||at(()=>{n=Fn(e,t[3],t[4]),n.start()}))},o:ce,d(u){u&&E(e),t[23](null),r=!1,Te(i)}}}function jp(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),ie(e,l)},m(a,f){w(a,e,f),t[22](e),i=!0,s||(o=[Be(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,ie(e,l=Me(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&at(()=>{i&&(r&&r.end(1),n=Fn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Dn(e,t[5],t[6])),i=!1},d(a){a&&E(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function qp(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ne(u,o[l]);return{c(){e=S("div"),ie(e,u)},m(l,a){w(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),Be(t[8].action(e))],i=!0)},p(l,a){t=l,ie(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(l){l&&E(e),t[21](null),l&&n&&n.end(),i=!1,Te(s)}}}function Wp(t){let e;const n=t[15].default,r=de(n,t,t[14],Rl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&pe(r,n,i,i[14],e?me(n,i[14],s,Vp):he(i[14]),Rl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Qp(t){let e,n,r,i;const s=[Wp,qp,jp,Kp,Up,Bp],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function zp(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:y=!1}=e,{el:_=void 0}=e;const{elements:{overlay:h},states:{open:k},getAttrs:O}=Lr();x(t,h,W=>n(13,o=W)),x(t,k,W=>n(9,u=W));const $=O("overlay");function C(W){Oe.call(this,t,W)}function D(W){Oe.call(this,t,W)}function R(W){Oe.call(this,t,W)}function K(W){Oe.call(this,t,W)}function N(W){Oe.call(this,t,W)}function F(W){Ce[W?"unshift":"push"](()=>{_=W,n(0,_)})}function I(W){Ce[W?"unshift":"push"](()=>{_=W,n(0,_)})}function A(W){Ce[W?"unshift":"push"](()=>{_=W,n(0,_)})}function L(W){Ce[W?"unshift":"push"](()=>{_=W,n(0,_)})}function q(W){Ce[W?"unshift":"push"](()=>{_=W,n(0,_)})}return t.$$set=W=>{e=ne(ne({},e),yt(W)),n(12,s=je(e,i)),"transition"in W&&n(1,f=W.transition),"transitionConfig"in W&&n(2,c=W.transitionConfig),"inTransition"in W&&n(3,d=W.inTransition),"inTransitionConfig"in W&&n(4,m=W.inTransitionConfig),"outTransition"in W&&n(5,p=W.outTransition),"outTransitionConfig"in W&&n(6,g=W.outTransitionConfig),"asChild"in W&&n(7,y=W.asChild),"el"in W&&n(0,_=W.el),"$$scope"in W&&n(14,a=W.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,$)},[_,f,c,d,m,p,g,y,r,u,h,k,s,o,a,l,C,D,R,K,N,F,I,A,L,q]}class vi extends ve{constructor(e){super(),ye(this,e,zp,Qp,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const Gp=t=>({builder:t&4}),Fl=t=>({builder:t[2]}),Yp=t=>({builder:t&4}),Dl=t=>({builder:t[2]});function Zp(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],Fl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[9](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,Gp):he(a[7]),Fl),ie(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function Xp(t){let e;const n=t[8].default,r=de(n,t,t[7],Dl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,Yp):he(i[7]),Dl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Jp(t){let e,n,r,i;const s=[Xp,Zp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function xp(t,e,n){let r;const i=["asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Lr();x(t,c,y=>n(6,o=y));const m=Pn(),p=d("trigger");function g(y){Ce[y?"unshift":"push"](()=>{f=y,n(0,f)})}return t.$$set=y=>{e=ne(ne({},e),yt(y)),n(5,s=je(e,i)),"asChild"in y&&n(1,a=y.asChild),"el"in y&&n(0,f=y.el),"$$scope"in y&&n(7,l=y.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,m,s,o,l,u,g]}class ki extends ve{constructor(e){super(),ye(this,e,xp,Jp,fe,{asChild:1,el:0})}}const eh=t=>({builder:t[0]&256}),Pl=t=>({builder:t[8]}),th=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),nh=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),rh=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),ih=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),sh=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]});function oh(t){let e,n,r,i;const s=t[28].default,o=de(s,t,t[27],Pl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[Be(t[8].action(e)),G(e,"m-keydown",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&134217984)&&pe(o,s,a,a[27],n?me(s,a[27],f,eh):he(a[27]),Pl),ie(e,l=Me(u,[f[0]&256&&a[8],f[0]&8192&&a[13]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function lh(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Ll);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,th):he(t[27]),Ll),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){v(u,f),f&&(n=Dn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[32](null),f&&n&&n.end(),i=!1,Te(s)}}}function uh(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Il);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,nh):he(t[27]),Il),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Fn(e,t[3],t[4]),n.start()})),r=!0)},o(f){v(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function ah(t){let e,n,r,i,s,o;const u=t[28].default,l=de(u,t,t[27],Ml);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[30](e),i=!0,s||(o=[Be(t[8].action(e)),G(e,"m-keydown",t[12])],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&134217984)&&pe(l,u,t,t[27],i?me(u,t[27],d,rh):he(t[27]),Ml),ie(e,f=Me(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Fn(e,t[3],t[4]),n.start())}),i=!0)},o(c){v(l,c),n&&n.invalidate(),c&&(r=Dn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[30](null),c&&r&&r.end(),s=!1,Te(o)}}}function fh(t){let e,n,r,i,s;const o=t[28].default,u=de(o,t,t[27],Nl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[Be(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&pe(u,o,t,t[27],r?me(o,t[27],c,ih):he(t[27]),Nl),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){v(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[29](null),f&&n&&n.end(),i=!1,Te(s)}}}function ch(t){let e;const n=t[28].default,r=de(n,t,t[27],Hl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&134217984)&&pe(r,n,i,i[27],e?me(n,i[27],s,sh):he(i[27]),Hl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function dh(t){let e,n,r,i;const s=[ch,fh,ah,uh,lh,oh],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function mh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:y=!1}=e,{id:_=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:$=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:D=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:K=!1}=e,{fitViewport:N=!1}=e,{strategy:F="absolute"}=e,{overlap:I=!1}=e,{el:A=void 0}=e;const{elements:{menu:L},states:{open:q},ids:W,getAttrs:oe}=gi();x(t,L,X=>n(26,u=X)),x(t,q,X=>n(9,o=X));const se=Pn(),z=oe("content");function le(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function Se(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function st(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function He(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}function Y(X){Ce[X?"unshift":"push"](()=>{A=X,n(0,A)})}return t.$$set=X=>{e=ne(ne({},e),yt(X)),n(13,s=je(e,i)),"transition"in X&&n(1,f=X.transition),"transitionConfig"in X&&n(2,c=X.transitionConfig),"inTransition"in X&&n(3,d=X.inTransition),"inTransitionConfig"in X&&n(4,m=X.inTransitionConfig),"outTransition"in X&&n(5,p=X.outTransition),"outTransitionConfig"in X&&n(6,g=X.outTransitionConfig),"asChild"in X&&n(7,y=X.asChild),"id"in X&&n(14,_=X.id),"side"in X&&n(15,h=X.side),"align"in X&&n(16,k=X.align),"sideOffset"in X&&n(17,O=X.sideOffset),"alignOffset"in X&&n(18,$=X.alignOffset),"collisionPadding"in X&&n(19,C=X.collisionPadding),"avoidCollisions"in X&&n(20,D=X.avoidCollisions),"collisionBoundary"in X&&n(21,R=X.collisionBoundary),"sameWidth"in X&&n(22,K=X.sameWidth),"fitViewport"in X&&n(23,N=X.fitViewport),"strategy"in X&&n(24,F=X.strategy),"overlap"in X&&n(25,I=X.overlap),"el"in X&&n(0,A=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&_&&W.menu.set(_),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&Sm({side:h,align:k,sideOffset:O,alignOffset:$,collisionPadding:C,avoidCollisions:D,collisionBoundary:R,sameWidth:K,fitViewport:N,strategy:F,overlap:I})},[A,f,c,d,m,p,g,y,r,o,L,q,se,s,_,h,k,O,$,C,D,R,K,N,F,I,u,a,l,le,Se,st,He,Y]}class fs extends ve{constructor(e){super(),ye(this,e,mh,dh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}}function cs(){return{NAME:"menubar",MENU_NAME:"menu",SUB_NAME:"menu-submenu",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"]}}function ph(t){const{NAME:e,PARTS:n,MENU_NAME:r}=cs(),i=ii(e,["root"]),s=ii(r,n),o={..._m(hi(t)),getAttrs:s,getMenubarAttrs:i};return Ct(e,o),{...o,updateOption:_i(o.options)}}function hh(){const{NAME:t}=cs();return pt(t)}function _h(t){const{MENU_NAME:e}=cs(),{builders:{createMenu:n},getAttrs:r}=hh(),i={...n({...hi(t),forceVisible:!1}),getAttrs:r};return Ct(e,i),{...i,updateOption:_i(i.options)}}function gh(){const{MENU_NAME:t}=cs();return pt(t)}const bh=t=>({builder:t&4,ids:t&8}),Vl=t=>({builder:t[2],ids:t[3]}),yh=t=>({builder:t&4,ids:t&8}),Bl=t=>({builder:t[2],ids:t[3]});function vh(t){let e,n,r,i;const s=t[13].default,o=de(s,t,t[12],Vl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=Be(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&4108)&&pe(o,s,a,a[12],n?me(s,a[12],f,bh):he(a[12]),Vl),ie(e,l=Me(u,[f&4&&a[2],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[14](null),r=!1,i()}}}function kh(t){let e;const n=t[13].default,r=de(n,t,t[12],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&pe(r,n,i,i[12],e?me(n,i[12],s,yh):he(i[12]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Ch(t){let e,n,r,i;const s=[kh,vh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Eh(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:d=!1}=e,{id:m=void 0}=e,{preventScroll:p=void 0}=e,{el:g=void 0}=e;const{elements:{menubar:y},updateOption:_,ids:h,getMenubarAttrs:k}=ph({loop:f,closeOnEscape:c,preventScroll:p});x(t,y,D=>n(11,o=D));const O=Ke([h.menubar],([D])=>({menubar:D}));x(t,O,D=>n(3,u=D));const $=k("root");function C(D){Ce[D?"unshift":"push"](()=>{g=D,n(0,g)})}return t.$$set=D=>{e=ne(ne({},e),yt(D)),n(6,s=je(e,i)),"loop"in D&&n(7,f=D.loop),"closeOnEscape"in D&&n(8,c=D.closeOnEscape),"asChild"in D&&n(1,d=D.asChild),"id"in D&&n(9,m=D.id),"preventScroll"in D&&n(10,p=D.preventScroll),"el"in D&&n(0,g=D.el),"$$scope"in D&&n(12,a=D.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&m&&h.menubar.set(m),t.$$.dirty&128&&_("loop",f),t.$$.dirty&256&&_("closeOnEscape",c),t.$$.dirty&1024&&_("preventScroll",p),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,$)},[g,d,r,u,y,O,s,f,c,m,p,o,a,l,C]}class wh extends ve{constructor(e){super(),ye(this,e,Eh,Ch,fe,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const Oh=t=>({menuIds:t&1}),Ul=t=>({menuIds:t[0]});function Ah(t){let e;const n=t[15].default,r=de(n,t,t[14],Ul);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&pe(r,n,i,i[14],e?me(n,i[14],s,Oh):he(i[14]),Ul)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Th(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{closeOnOutsideClick:o=void 0}=e,{closeOnEscape:u=void 0}=e,{portal:l=void 0}=e,{open:a=void 0}=e,{onOpenChange:f=void 0}=e,{loop:c=void 0}=e,{dir:d=void 0}=e,{typeahead:m=void 0}=e,{closeFocus:p=void 0}=e,{disableFocusFirstItem:g=void 0}=e,{closeOnItemClick:y=void 0}=e,{onOutsideClick:_=void 0}=e;const{states:{open:h},updateOption:k,ids:O}=_h({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:m,closeFocus:p,disableFocusFirstItem:g,closeOnItemClick:y,onOutsideClick:_,onOpenChange:({next:C})=>(a!==C&&(f==null||f(C),n(2,a=C)),C)}),$=Ke([O.menu,O.trigger],([C,D])=>({menu:C,trigger:D}));return x(t,$,C=>n(0,r=C)),t.$$set=C=>{"closeOnOutsideClick"in C&&n(3,o=C.closeOnOutsideClick),"closeOnEscape"in C&&n(4,u=C.closeOnEscape),"portal"in C&&n(5,l=C.portal),"open"in C&&n(2,a=C.open),"onOpenChange"in C&&n(6,f=C.onOpenChange),"loop"in C&&n(7,c=C.loop),"dir"in C&&n(8,d=C.dir),"typeahead"in C&&n(9,m=C.typeahead),"closeFocus"in C&&n(10,p=C.closeFocus),"disableFocusFirstItem"in C&&n(11,g=C.disableFocusFirstItem),"closeOnItemClick"in C&&n(12,y=C.closeOnItemClick),"onOutsideClick"in C&&n(13,_=C.onOutsideClick),"$$scope"in C&&n(14,s=C.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&h.set(a),t.$$.dirty&8&&k("closeOnOutsideClick",o),t.$$.dirty&16&&k("closeOnEscape",u),t.$$.dirty&32&&k("portal",l),t.$$.dirty&128&&k("loop",c),t.$$.dirty&256&&k("dir",d),t.$$.dirty&1024&&k("closeFocus",p),t.$$.dirty&2048&&k("disableFocusFirstItem",g),t.$$.dirty&512&&k("typeahead",m),t.$$.dirty&4096&&k("closeOnItemClick",y),t.$$.dirty&8192&&k("onOutsideClick",_)},[r,$,a,o,u,l,f,c,d,m,p,g,y,_,s,i]}class ds extends ve{constructor(e){super(),ye(this,e,Th,Ah,fe,{closeOnOutsideClick:3,closeOnEscape:4,portal:5,open:2,onOpenChange:6,loop:7,dir:8,typeahead:9,closeFocus:10,disableFocusFirstItem:11,closeOnItemClick:12,onOutsideClick:13})}}const $h=t=>({builder:t&4}),Kl=t=>({builder:t[2]}),Sh=t=>({builder:t&4}),jl=t=>({builder:t[2]});function Rh(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],Kl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"m-click",t[4]),G(e,"m-keydown",t[4]),G(e,"m-pointerenter",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,$h):he(a[8]),Kl),ie(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function Fh(t){let e;const n=t[9].default,r=de(n,t,t[8],jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,Sh):he(i[8]),jl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Dh(t){let e,n,r,i;const s=[Fh,Rh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Ph(t,e,n){let r;const i=["asChild","id","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{id:f=void 0}=e,{el:c=void 0}=e;const{elements:{trigger:d},ids:m,getAttrs:p}=gh();x(t,d,h=>n(7,o=h));const g=Pn(),y=p("trigger");function _(h){Ce[h?"unshift":"push"](()=>{c=h,n(0,c)})}return t.$$set=h=>{e=ne(ne({},e),yt(h)),n(5,s=je(e,i)),"asChild"in h&&n(1,a=h.asChild),"id"in h&&n(6,f=h.id),"el"in h&&n(0,c=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f&&m.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,y)},[c,a,r,d,g,s,f,o,l,u,_]}class ms extends ve{constructor(e){super(),ye(this,e,Ph,Dh,fe,{asChild:1,id:6,el:0})}}const Lh=t=>({ids:t&1}),ql=t=>({ids:t[0]});function Ih(t){let e;const n=t[13].default,r=de(n,t,t[12],ql);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&4097)&&pe(r,n,i,i[12],e?me(n,i[12],s,Lh):he(i[12]),ql)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Mh(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{disableFocusTrap:o=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:l=void 0}=e,{preventScroll:a=void 0}=e,{portal:f=void 0}=e,{open:c=void 0}=e,{onOpenChange:d=void 0}=e,{openFocus:m=void 0}=e,{closeFocus:p=void 0}=e,{onOutsideClick:g=void 0}=e;const{updateOption:y,states:{open:_},ids:h}=tp({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:m,closeFocus:p,onOutsideClick:g,onOpenChange:({next:O})=>(c!==O&&(d==null||d(O),n(2,c=O)),O),positioning:{gutter:0,offset:{mainAxis:1}}}),k=Ke([h.content,h.trigger],([O,$])=>({content:O,trigger:$}));return x(t,k,O=>n(0,r=O)),t.$$set=O=>{"disableFocusTrap"in O&&n(3,o=O.disableFocusTrap),"closeOnEscape"in O&&n(4,u=O.closeOnEscape),"closeOnOutsideClick"in O&&n(5,l=O.closeOnOutsideClick),"preventScroll"in O&&n(6,a=O.preventScroll),"portal"in O&&n(7,f=O.portal),"open"in O&&n(2,c=O.open),"onOpenChange"in O&&n(8,d=O.onOpenChange),"openFocus"in O&&n(9,m=O.openFocus),"closeFocus"in O&&n(10,p=O.closeFocus),"onOutsideClick"in O&&n(11,g=O.onOutsideClick),"$$scope"in O&&n(12,s=O.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&_.set(c),t.$$.dirty&8&&y("disableFocusTrap",o),t.$$.dirty&16&&y("closeOnEscape",u),t.$$.dirty&32&&y("closeOnOutsideClick",l),t.$$.dirty&64&&y("preventScroll",a),t.$$.dirty&128&&y("portal",f),t.$$.dirty&512&&y("openFocus",m),t.$$.dirty&1024&&y("closeFocus",p),t.$$.dirty&2048&&y("onOutsideClick",g)},[r,k,c,o,u,l,a,f,d,m,p,g,s,i]}class Nh extends ve{constructor(e){super(),ye(this,e,Mh,Ih,fe,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const Hh=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),Vh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),Bh=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),Uh=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]}),Kh=t=>({builder:t[0]&256}),Yl=t=>({builder:t[8]}),jh=t=>({builder:t[0]&256}),Zl=t=>({builder:t[8]});function qh(t){let e,n,r,i;const s=t[27].default,o=de(s,t,t[26],Wl);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=Be(t[8].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f[0]&67109120)&&pe(o,s,a,a[26],n?me(s,a[26],f,Hh):he(a[26]),Wl),ie(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[32](null),r=!1,i()}}}function Wh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],Ql);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=Be(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,Vh):he(t[26]),Ql),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),n&&n.end(1),r=!0)},o(f){v(u,f),f&&(n=Dn(e,t[5],t[6])),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),f&&n&&n.end(),i=!1,s()}}}function Qh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],zl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=Be(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,Bh):he(t[26]),zl),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||at(()=>{n=Fn(e,t[3],t[4]),n.start()})),r=!0)},o(f){v(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[30](null),i=!1,s()}}}function zh(t){let e,n,r,i,s,o;const u=t[27].default,l=de(u,t,t[26],Gl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ne(f,a[c]);return{c(){e=S("div"),l&&l.c(),ie(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=Be(t[8].action(e)),s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&67109120)&&pe(l,u,t,t[26],i?me(u,t[26],d,Uh):he(t[26]),Gl),ie(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&at(()=>{i&&(r&&r.end(1),n=Fn(e,t[3],t[4]),n.start())}),i=!0)},o(c){v(l,c),n&&n.invalidate(),c&&(r=Dn(e,t[5],t[6])),i=!1},d(c){c&&E(e),l&&l.d(c),t[29](null),c&&r&&r.end(),s=!1,o()}}}function Gh(t){let e,n,r,i,s;const o=t[27].default,u=de(o,t,t[26],Yl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ne(a,l[f]);return{c(){e=S("div"),u&&u.c(),ie(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=Be(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&pe(u,o,t,t[26],r?me(o,t[26],c,Kh):he(t[26]),Yl),ie(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&at(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){v(u,f),f&&(n||(n=Tn(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&E(e),u&&u.d(f),t[28](null),f&&n&&n.end(),i=!1,s()}}}function Yh(t){let e;const n=t[27].default,r=de(n,t,t[26],Zl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&67109120)&&pe(r,n,i,i[26],e?me(n,i[26],s,jh):he(i[26]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Zh(t){let e,n,r,i;const s=[Yh,Gh,zh,Qh,Wh,qh],o=[];function u(l,a){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?~e&&o[e].p(l,a):(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Xh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=je(e,i),o,u,{$$slots:l={},$$scope:a}=e,{transition:f=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:m=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:y=!1}=e,{id:_=void 0}=e,{side:h="bottom"}=e,{align:k="center"}=e,{sideOffset:O=0}=e,{alignOffset:$=0}=e,{collisionPadding:C=8}=e,{avoidCollisions:D=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:K=!1}=e,{fitViewport:N=!1}=e,{strategy:F="absolute"}=e,{overlap:I=!1}=e,{el:A=void 0}=e;const{elements:{content:L},states:{open:q},ids:W,getAttrs:oe}=Oo();x(t,L,Y=>n(25,u=Y)),x(t,q,Y=>n(9,o=Y));const se=oe("content");function z(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function le(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function Se(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function st(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}function He(Y){Ce[Y?"unshift":"push"](()=>{A=Y,n(0,A)})}return t.$$set=Y=>{e=ne(ne({},e),yt(Y)),n(12,s=je(e,i)),"transition"in Y&&n(1,f=Y.transition),"transitionConfig"in Y&&n(2,c=Y.transitionConfig),"inTransition"in Y&&n(3,d=Y.inTransition),"inTransitionConfig"in Y&&n(4,m=Y.inTransitionConfig),"outTransition"in Y&&n(5,p=Y.outTransition),"outTransitionConfig"in Y&&n(6,g=Y.outTransitionConfig),"asChild"in Y&&n(7,y=Y.asChild),"id"in Y&&n(13,_=Y.id),"side"in Y&&n(14,h=Y.side),"align"in Y&&n(15,k=Y.align),"sideOffset"in Y&&n(16,O=Y.sideOffset),"alignOffset"in Y&&n(17,$=Y.alignOffset),"collisionPadding"in Y&&n(18,C=Y.collisionPadding),"avoidCollisions"in Y&&n(19,D=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,R=Y.collisionBoundary),"sameWidth"in Y&&n(21,K=Y.sameWidth),"fitViewport"in Y&&n(22,N=Y.fitViewport),"strategy"in Y&&n(23,F=Y.strategy),"overlap"in Y&&n(24,I=Y.overlap),"el"in Y&&n(0,A=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&_&&W.content.set(_),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,se),t.$$.dirty[0]&33538560&&o&&np({side:h,align:k,sideOffset:O,alignOffset:$,collisionPadding:C,avoidCollisions:D,collisionBoundary:R,sameWidth:K,fitViewport:N,strategy:F,overlap:I})},[A,f,c,d,m,p,g,y,r,o,L,q,s,_,h,k,O,$,C,D,R,K,N,F,I,u,a,l,z,le,Se,st,He]}class Jh extends ve{constructor(e){super(),ye(this,e,Xh,Zh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,side:14,align:15,sideOffset:16,alignOffset:17,collisionPadding:18,avoidCollisions:19,collisionBoundary:20,sameWidth:21,fitViewport:22,strategy:23,overlap:24,el:0},null,[-1,-1])}}const xh=t=>({builder:t&4}),Xl=t=>({builder:t[2]}),e1=t=>({builder:t&4}),Jl=t=>({builder:t[2]});function t1(t){let e,n,r,i;const s=t[12].default,o=de(s,t,t[11],Xl);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[13](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"m-click",t[5]),G(e,"m-keydown",t[5])],r=!0)},p(a,f){o&&o.p&&(!n||f&2052)&&pe(o,s,a,a[11],n?me(s,a[11],f,xh):he(a[11]),Xl),ie(e,l=Me(u,[f&4&&a[2],{type:"button"},f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function n1(t){let e;const n=t[12].default,r=de(n,t,t[11],Jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&2052)&&pe(r,n,i,i[11],e?me(n,i[11],s,e1):he(i[11]),Jl)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function r1(t){let e,n,r,i;const s=[n1,t1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function i1(t,e,n){let r,i;const s=["asChild","id","el"];let o=je(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:m=void 0}=e;const{elements:{trigger:p},states:{open:g},ids:y,getAttrs:_}=Oo();x(t,p,$=>n(9,u=$)),x(t,g,$=>n(10,l=$));const h=Pn(),k=_("trigger");function O($){Ce[$?"unshift":"push"](()=>{m=$,n(0,m)})}return t.$$set=$=>{e=ne(ne({},e),yt($)),n(6,o=je(e,s)),"asChild"in $&&n(1,c=$.asChild),"id"in $&&n(7,d=$.id),"el"in $&&n(0,m=$.el),"$$scope"in $&&n(11,f=$.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&y.trigger.set(d),t.$$.dirty&1024&&n(8,r={...k,"aria-controls":l?y.content:void 0}),t.$$.dirty&512&&n(2,i=u),t.$$.dirty&260&&Object.assign(i,r)},[m,c,i,p,g,h,o,d,r,u,l,f,a,O]}class s1 extends ve{constructor(e){super(),ye(this,e,i1,r1,fe,{asChild:1,id:7,el:0})}}function rf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function o1(t){const{NAME:e,PARTS:n}=rf(),r=ii(e,n),i={...Em(hi(t)),getAttrs:r};return Ct(e,i),{...i,updateOption:_i(i.options)}}function l1(){const{NAME:t}=rf();return pt(t)}const u1=t=>({builder:t&4}),xl=t=>({builder:t[2]}),a1=t=>({builder:t&4}),eu=t=>({builder:t[2]});function f1(t){let e,n,r,i;const s=t[9].default,o=de(s,t,t[8],xl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("div"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Be(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&pe(o,s,a,a[8],n?me(s,a[8],f,u1):he(a[8]),xl),ie(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function c1(t){let e;const n=t[9].default,r=de(n,t,t[8],eu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&pe(r,n,i,i[8],e?me(n,i[8],s,a1):he(i[8]),eu)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function d1(t){let e,n,r,i;const s=[c1,f1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function m1(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{loop:a=!0}=e,{orientation:f=void 0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{root:m},updateOption:p,getAttrs:g}=o1({loop:a,orientation:f});x(t,m,h=>n(7,o=h));const y=g("root");function _(h){Ce[h?"unshift":"push"](()=>{d=h,n(0,d)})}return t.$$set=h=>{e=ne(ne({},e),yt(h)),n(4,s=je(e,i)),"loop"in h&&n(5,a=h.loop),"orientation"in h&&n(6,f=h.orientation),"asChild"in h&&n(1,c=h.asChild),"el"in h&&n(0,d=h.el),"$$scope"in h&&n(8,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&p("loop",a),t.$$.dirty&64&&p("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,y)},[d,c,r,m,s,a,f,o,l,u,_]}class p1 extends ve{constructor(e){super(),ye(this,e,m1,d1,fe,{loop:5,orientation:6,asChild:1,el:0})}}const h1=t=>({builder:t&4}),tu=t=>({builder:t[2]}),_1=t=>({builder:t&4}),nu=t=>({builder:t[2]});function g1(t){let e,n,r,i;const s=t[8].default,o=de(s,t,t[7],tu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ne(l,u[a]);return{c(){e=S("button"),o&&o.c(),ie(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),e.autofocus&&e.focus(),t[10](e),n=!0,r||(i=[Be(t[2].action(e)),G(e,"click",t[9]),G(e,"m-keydown",t[4])],r=!0)},p(a,f){o&&o.p&&(!n||f&132)&&pe(o,s,a,a[7],n?me(s,a[7],f,h1):he(a[7]),tu),ie(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){v(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function b1(t){let e;const n=t[8].default,r=de(n,t,t[7],nu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&pe(r,n,i,i[7],e?me(n,i[7],s,_1):he(i[7]),nu)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function y1(t){let e,n,r,i;const s=[b1,g1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function v1(t,e,n){let r;const i=["asChild","el"];let s=je(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=l1();x(t,c,_=>n(6,o=_));const m=Pn(),p=d("button");function g(_){Oe.call(this,t,_)}function y(_){Ce[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=ne(ne({},e),yt(_)),n(5,s=je(e,i)),"asChild"in _&&n(1,a=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(7,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,m,s,o,l,u,g,y]}class k1 extends ve{constructor(e){super(),ye(this,e,v1,y1,fe,{asChild:1,el:0})}}var sy="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",C1="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",E1="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",oy="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",ly="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",uy="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",w1="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z",O1="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",A1="M19,3H5C3.89,3 3,3.89 3,5V9H5V5H19V19H5V15H3V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10.08,15.58L11.5,17L16.5,12L11.5,7L10.08,8.41L12.67,11H3V13H12.67L10.08,15.58Z",T1="M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H12V20H6V4H13V9H18V12H20V8L14 2M18 14C17.87 14 17.76 14.09 17.74 14.21L17.55 15.53C17.25 15.66 16.96 15.82 16.7 16L15.46 15.5C15.35 15.5 15.22 15.5 15.15 15.63L14.15 17.36C14.09 17.47 14.11 17.6 14.21 17.68L15.27 18.5C15.25 18.67 15.24 18.83 15.24 19C15.24 19.17 15.25 19.33 15.27 19.5L14.21 20.32C14.12 20.4 14.09 20.53 14.15 20.64L15.15 22.37C15.21 22.5 15.34 22.5 15.46 22.5L16.7 22C16.96 22.18 17.24 22.35 17.55 22.47L17.74 23.79C17.76 23.91 17.86 24 18 24H20C20.11 24 20.22 23.91 20.24 23.79L20.43 22.47C20.73 22.34 21 22.18 21.27 22L22.5 22.5C22.63 22.5 22.76 22.5 22.83 22.37L23.83 20.64C23.89 20.53 23.86 20.4 23.77 20.32L22.7 19.5C22.72 19.33 22.74 19.17 22.74 19C22.74 18.83 22.73 18.67 22.7 18.5L23.76 17.68C23.85 17.6 23.88 17.47 23.82 17.36L22.82 15.63C22.76 15.5 22.63 15.5 22.5 15.5L21.27 16C21 15.82 20.73 15.65 20.42 15.53L20.23 14.21C20.22 14.09 20.11 14 20 14M19 17.5C19.83 17.5 20.5 18.17 20.5 19C20.5 19.83 19.83 20.5 19 20.5C18.16 20.5 17.5 19.83 17.5 19C17.5 18.17 18.17 17.5 19 17.5Z",$1="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",S1="M23 18H20V15H18V18H15V20H18V23H20V20H23M6 2C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H13.81C13.45 21.38 13.2 20.7 13.08 20H6V4H13V9H18V13.08C18.33 13.03 18.67 13 19 13C19.34 13 19.67 13.03 20 13.08V8L14 2M8 12V14H16V12M8 16V18H13V16Z",R1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M17,13V19H7L12,14L14,16M10,10.5A1.5,1.5 0 0,1 8.5,12A1.5,1.5 0 0,1 7,10.5A1.5,1.5 0 0,1 8.5,9A1.5,1.5 0 0,1 10,10.5Z",F1="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",D1="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z",P1="M4 18H12.13L11 19.13V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V10.15C21.74 10.06 21.46 10 21.17 10C20.75 10 20.36 10.11 20 10.3V8H4V18M22.85 13.47L21.53 12.15C21.33 11.95 21 11.95 20.81 12.15L19.83 13.13L21.87 15.17L22.85 14.19C23.05 14 23.05 13.67 22.85 13.47M13 19.96V22H15.04L21.17 15.88L19.13 13.83L13 19.96Z",L1="M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z",I1="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z",M1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z",N1="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M22.54 16.88L21.12 15.47L19 17.59L16.88 15.47L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88Z",H1="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",ay="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",V1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M17 14V17H14V19H17V22H19V19H22V17H19V14H17Z",B1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M20.12 14.46L18 16.59L15.88 14.47L14.47 15.88L16.59 18L14.47 20.12L15.88 21.54L18 19.41L20.12 21.54L21.54 20.12L19.41 18L21.54 15.88L20.12 14.46Z",U1="M13 14C9.64 14 8.54 15.35 8.18 16.24C9.25 16.7 10 17.76 10 19C10 20.66 8.66 22 7 22S4 20.66 4 19C4 17.69 4.83 16.58 6 16.17V7.83C4.83 7.42 4 6.31 4 5C4 3.34 5.34 2 7 2S10 3.34 10 5C10 6.31 9.17 7.42 8 7.83V13.12C8.88 12.47 10.16 12 12 12C14.67 12 15.56 10.66 15.85 9.77C14.77 9.32 14 8.25 14 7C14 5.34 15.34 4 17 4S20 5.34 20 7C20 8.34 19.12 9.5 17.91 9.86C17.65 11.29 16.68 14 13 14M7 18C6.45 18 6 18.45 6 19S6.45 20 7 20 8 19.55 8 19 7.55 18 7 18M7 4C6.45 4 6 4.45 6 5S6.45 6 7 6 8 5.55 8 5 7.55 4 7 4M17 6C16.45 6 16 6.45 16 7S16.45 8 17 8 18 7.55 18 7 17.55 6 17 6M18 13V14.5C20.21 14.5 22 16.29 22 18.5C22 19.32 21.75 20.08 21.33 20.71L20.24 19.62C20.41 19.28 20.5 18.9 20.5 18.5C20.5 17.12 19.38 16 18 16V17.5L15.75 15.25L15.72 15.22C15.78 15.17 15.85 15.13 18 13M18 24V22.5C15.79 22.5 14 20.71 14 18.5C14 17.68 14.25 16.92 14.67 16.29L15.76 17.38C15.59 17.72 15.5 18.1 15.5 18.5C15.5 19.88 16.62 21 18 21V19.5L20.25 21.75L20.28 21.78C20.22 21.83 20.15 21.87 18 24",Ut="M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z",K1="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",fy="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",j1="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function q1(t){let e,n,r,i,s=t[0]!==null&&ru(t);return{c(){e=Ds("svg"),s&&s.c(),n=Ds("path"),M(n,"d",t[1]),M(e,"class",r="fill-current "+t[2]),M(e,"viewBox","0 0 24 24"),M(e,"aria-hidden",i=t[0]===null?"true":"false")},m(o,u){w(o,e,u),s&&s.m(e,null),P(e,n)},p(o,u){o[0]!==null?s?s.p(o,u):(s=ru(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&M(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&M(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&M(e,"aria-hidden",i)},d(o){o&&E(e),s&&s.d()}}}function W1(t){let e,n;return{c(){e=S("span"),M(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&M(e,"class",n)},d(r){r&&E(e)}}}function ru(t){let e,n;return{c(){e=Ds("title"),n=Z(t[0])},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&1&&qe(n,r[0])},d(r){r&&E(e)}}}function Q1(t){let e;function n(s,o){return s[1]===null?W1:q1}let r=n(t),i=r(t);return{c(){i.c(),e=Fe()},m(s,o){i.m(s,o),w(s,e,o)},p(s,[o]){r===(r=n(s))&&i?i.p(s,o):(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},i:ce,o:ce,d(s){s&&E(e),i.d(s)}}}function z1(t,e,n){let{label:r=null}=e,{path:i=null}=e,{class:s="w-6 h-6"}=e;return t.$$set=o=>{"label"in o&&n(0,r=o.label),"path"in o&&n(1,i=o.path),"class"in o&&n(2,s=o.class)},[r,i,s]}class Ne extends ve{constructor(e){super(),ye(this,e,z1,Q1,fe,{label:0,path:1,class:2})}}async function en({queryKey:t}){if(t){const e=["/api"];for(const r of t)r!==""&&(r[0]==="?"||r[0]==="&"||e.push("/"),e.push(r));let n=await window.fetch(e.join(""));if(n.ok)return await n.json()}throw new Error("Could not fetch data")}function sf(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(sf(n));return e.join("")}}function cy(t){return t.content&&t.content.length>0?sf(t.content[0]):"<Empty Document>"}function of(t,e){let n=window.location.hash;n.startsWith("#")&&(n=n.substring(1));let r=new URLSearchParams(n);r.set(t,e),window.location.hash=r.toString()}function lf(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);return n.has(t)?n.get(t):null}function G1(t){let e=window.location.hash;e.startsWith("#")&&(e=e.substring(1));let n=new URLSearchParams(e);n.has(t)&&(n.delete(t),window.location.hash=n.toString())}const ft=De(null),Y1=De(null),iu=De(!1);ft.subscribe(t=>{t!==null&&of("path",t.fullpath)});function Ci(){return pt("apiStatus")}function Ao(){return pt("currentUser")}function wt(){return pt("currentBranch")}function To(){return pt("branches")}function $o(){return pt("remoteBranches")}function su(t,e,n){const r=t.slice();return r[9]=e[n],r}function Z1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),s=Z(i),o=Z(" actions running"),M(r,"class","pl-2")},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),P(r,s),P(r,o),u=!0},p(l,a){(!u||a&3)&&i!==(i=l[0].length+l[1]+"")&&qe(s,i)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){v(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),V(e,l)}}}function X1(t){let e,n,r,i;return e=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="1 action running",M(r,"class","pl-2")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function J1(t){let e;return{c(){e=S("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function x1(t){let e,n,r,i;const s=[J1,X1,Z1],o=[];function u(l,a){return l[0].length+l[1]===0?0:l[0].length+l[1]===1?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function e_(t){let e,n,r,i;return e=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Saving file",M(r,"class","flex-1")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function t_(t){let e,n,r,i;return e=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Loading file",M(r,"class","flex-1")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function ou(t){let e,n,r,i;const s=[t_,e_],o=[];function u(l,a){return l[9].action==="LoadTextFile"?0:l[9].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=S("li"),r&&r.c(),M(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,a){let f=n;n=u(l),n!==f&&(r&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~n?(r=o[n],r||(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){v(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function lu(t){let e,n,r,i,s;return n=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=S("li"),B(n.$$.fragment),r=U(),i=S("span"),i.textContent="Fetching branches",M(i,"class","flex-1"),M(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(o,u){w(o,e,u),H(n,e,null),P(e,r),P(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){v(n.$$.fragment,o),s=!1},d(o){o&&E(e),V(n)}}}function uu(t){let e,n,r,i,s;return n=new Ne({props:{path:Ut,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=S("li"),B(n.$$.fragment),r=U(),i=S("span"),i.textContent="Fetching remote branches",M(i,"class","flex-1"),M(e,"class","flex flex-row items-center space-x-2 px-3 py-1 border-l border-r last:border-b first-border-t border-slate-300")},m(o,u){w(o,e,u),H(n,e,null),P(e,r),P(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){v(n.$$.fragment,o),s=!1},d(o){o&&E(e),V(n)}}}function n_(t){let e,n,r,i,s=nn(t[0]),o=[];for(let f=0;f<s.length;f+=1)o[f]=ou(su(t,s,f));const u=f=>v(o[f],1,1,()=>{o[f]=null});let l=t[2].isFetching&&lu(),a=t[3].isFetching&&uu();return{c(){e=S("ul");for(let f=0;f<o.length;f+=1)o[f].c();n=U(),l&&l.c(),r=U(),a&&a.c()},m(f,c){w(f,e,c);for(let d=0;d<o.length;d+=1)o[d]&&o[d].m(e,null);P(e,n),l&&l.m(e,null),P(e,r),a&&a.m(e,null),i=!0},p(f,c){if(c&1){s=nn(f[0]);let d;for(d=0;d<s.length;d+=1){const m=su(f,s,d);o[d]?(o[d].p(m,c),b(o[d],1)):(o[d]=ou(m),o[d].c(),b(o[d],1),o[d].m(e,n))}for(_e(),d=s.length;d<o.length;d+=1)u(d);ge()}f[2].isFetching?l?c&4&&b(l,1):(l=lu(),l.c(),b(l,1),l.m(e,r)):l&&(_e(),v(l,1,1,()=>{l=null}),ge()),f[3].isFetching?a?c&8&&b(a,1):(a=uu(),a.c(),b(a,1),a.m(e,null)):a&&(_e(),v(a,1,1,()=>{a=null}),ge())},i(f){if(!i){for(let c=0;c<s.length;c+=1)b(o[c]);b(l),b(a),i=!0}},o(f){o=o.filter(Boolean);for(let c=0;c<o.length;c+=1)v(o[c]);v(l),v(a),i=!1},d(f){f&&E(e),fi(o,f),l&&l.d(),a&&a.d()}}}function r_(t){let e,n,r,i;return e=new s1({props:{class:"inline-flex items-center",$$slots:{default:[x1]},$$scope:{ctx:t}}}),r=new Jh({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[n_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4099&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4109&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function au(t){let e,n;return e=new si({props:{open:!0,onOpenChange:t[8],$$slots:{default:[u_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&4096&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function i_(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function s_(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function o_(t){let e,n,r,i,s,o,u,l;return e=new Tt({props:{$$slots:{default:[i_]},$$scope:{ctx:t}}}),u=new It({props:{"data-button":!0,$$slots:{default:[s_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("div"),i=S("p"),i.textContent="Unfortunately saving the file failed.",s=U(),o=S("div"),B(u.$$.fragment),M(o,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(a,f){H(e,a,f),w(a,n,f),w(a,r,f),P(r,i),P(r,s),P(r,o),H(u,o,null),l=!0},p(a,f){const c={};f&4096&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&4096&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){v(e.$$.fragment,a),v(u.$$.fragment,a),l=!1},d(a){a&&(E(n),E(r)),V(e,a),V(u)}}}function l_(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[o_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function u_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[l_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function a_(t){let e,n,r,i;e=new Nh({props:{$$slots:{default:[r_]},$$scope:{ctx:t}}});let s=t[4]&&au(t);return{c(){B(e.$$.fragment),n=U(),s&&s.c(),r=Fe()},m(o,u){H(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&4111&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[4]?s?(s.p(o,u),u&16&&b(s,1)):(s=au(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(_e(),v(s,1,1,()=>{s=null}),ge())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){v(e.$$.fragment,o),v(s),i=!1},d(o){o&&(E(n),E(r)),V(e,o),s&&s.d(o)}}}const ro=De([]);let io=De(!1);function f_(t){t.status="active",ro.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=c_(t):t.action==="SaveCurrentFile"&&(e=d_(t)),e!==null&&e.then(()=>{ro.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function c_(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function d_(t){const e=new FormData;e.append("content",new Blob([t.data])),(await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename,{method:"PUT",body:e})).ok?t.callback():io.set(!0)}function m_(t,e,n){let r,i,s,o,u;x(t,ro,d=>n(0,r=d)),x(t,io,d=>n(4,u=d));const l=To();x(t,l,d=>n(2,s=d));const a=$o();x(t,a,d=>n(3,o=d));const f=Ke([l,a],d=>{let m=0;for(const p of d)p!==null&&p.isFetching&&(m=m+1);return m});return x(t,f,d=>n(1,i=d)),[r,i,s,o,u,l,a,f,d=>{d||io.set(!1)}]}let p_=class extends ve{constructor(e){super(),ye(this,e,m_,a_,fe,{})}};function h_(t){let e;const n=t[3].default,r=de(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&pe(r,n,i,i[5],e?me(n,i[5],s,null):he(i[5]),null)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function __(t){let e,n,r,i;return e=new vi({}),r=new yi({props:{$$slots:{default:[h_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function g_(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[__]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&32&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function b_(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[g_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new si({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&32&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function y_(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=null;let{open:o=!1}=e;function u(a){a||Ge.set(Ae.NONE)}ns(()=>{n(0,o=!0)});function l(a){o=a,n(0,o)}return t.$$set=a=>{"open"in a&&n(0,o=a.open),"$$scope"in a&&n(5,i=a.$$scope)},[o,u,s,r,l,i]}class Gt extends ve{constructor(e){super(),ye(this,e,y_,b_,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function v_(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function fu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function k_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[E_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Create",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function C_(t){let e,n,r,i;return n=new Ne({props:{path:Ut,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Creating...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){v(n.$$.fragment,s),i=!1},d(s){s&&E(e),V(n)}}}function E_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function w_(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g;e=new Tt({props:{$$slots:{default:[v_]},$$scope:{ctx:t}}});let y=t[2]&&fu(t);const _=[C_,k_],h=[];function k(O,$){return O[3].isPending?0:1}return c=k(t),d=h[c]=_[c](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New branch title",o=U(),u=S("input"),l=U(),y&&y.c(),a=U(),f=S("div"),d.c(),M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(O,$){H(e,O,$),w(O,n,$),w(O,r,$),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),y&&y.m(i,null),P(r,a),P(r,f),h[c].m(f,null),m=!0,p||(g=[G(u,"input",t[7]),G(r,"submit",t[6])],p=!0)},p(O,$){const C={};$&2048&&(C.$$scope={dirty:$,ctx:O}),e.$set(C),$&2&&u.value!==O[1]&&it(u,O[1]),O[2]?y?y.p(O,$):(y=fu(O),y.c(),y.m(i,null)):y&&(y.d(1),y=null);let D=c;c=k(O),c!==D&&(_e(),v(h[D],1,1,()=>{h[D]=null}),ge(),d=h[c],d||(d=h[c]=_[c](O),d.c()),b(d,1),d.m(f,null))},i(O){m||(b(e.$$.fragment,O),b(d),m=!0)},o(O){v(e.$$.fragment,O),v(d),m=!1},d(O){O&&(E(n),E(r)),V(e,O),y&&y.d(),h[c].d(),p=!1,Te(g)}}}function O_(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[w_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function A_(t,e,n){let r;const i=Et(),s=wt();let o=!1,u="",l="";function a(p){p&&n(1,u="")}const f=di({mutationFn:async p=>{const g=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:p.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(g.ok){i.invalidateQueries({queryKey:["branches"]});const y=await g.json();s.set(y),Ge.set(Ae.NONE)}else n(2,l=(await g.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});x(t,f,p=>n(3,r=p));async function c(p){p.preventDefault(),r.mutate({title:u})}function d(){u=this.value,n(1,u)}function m(p){o=p,n(0,o)}return[o,u,l,r,a,f,c,d,m]}class T_ extends ve{constructor(e){super(),ye(this,e,A_,O_,fe,{})}}function $_(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function cu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function S_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[F_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Delete",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function R_(t){let e,n,r,i;return n=new Ne({props:{path:Ut,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Deleting...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){v(n.$$.fragment,s),i=!1},d(s){s&&E(e),V(n)}}}function F_(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function D_(t){var F;let e,n,r,i,s,o,u=((F=t[4])==null?void 0:F.title)+"",l,a,f,c,d,m,p,g,y,_,h,k,O,$,C;e=new Tt({props:{$$slots:{default:[$_]},$$scope:{ctx:t}}});let D=t[2]&&cu(t);const R=[R_,S_],K=[];function N(I,A){return I[3].isPending?0:1}return h=N(t),k=K[h]=R[h](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the branch "),o=S("span"),l=Z(u),a=Z(`. This cannot be undone. To confirm the action, please enter the name of
13
- the branch to delete.`),f=U(),c=S("label"),d=S("span"),d.textContent="Confirm branch name",m=U(),p=S("input"),g=U(),D&&D.c(),y=U(),_=S("div"),k.c(),M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(_,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(I,A){H(e,I,A),w(I,n,A),w(I,r,A),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[1]),P(c,g),D&&D.m(c,null),P(r,y),P(r,_),K[h].m(_,null),O=!0,$||(C=[G(p,"input",t[9]),G(r,"submit",t[8])],$=!0)},p(I,A){var W;const L={};A&4096&&(L.$$scope={dirty:A,ctx:I}),e.$set(L),(!O||A&16)&&u!==(u=((W=I[4])==null?void 0:W.title)+"")&&qe(l,u),A&2&&p.value!==I[1]&&it(p,I[1]),I[2]?D?D.p(I,A):(D=cu(I),D.c(),D.m(c,null)):D&&(D.d(1),D=null);let q=h;h=N(I),h!==q&&(_e(),v(K[q],1,1,()=>{K[q]=null}),ge(),k=K[h],k||(k=K[h]=R[h](I),k.c()),b(k,1),k.m(_,null))},i(I){O||(b(e.$$.fragment,I),b(k),O=!0)},o(I){v(e.$$.fragment,I),v(k),O=!1},d(I){I&&(E(n),E(r)),V(e,I),D&&D.d(),K[h].d(),$=!1,Te(C)}}}function P_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[6],$$slots:{default:[D_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&4126&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function L_(t,e,n){let r,i;const s=Et(),o=wt();x(t,o,g=>n(4,i=g));let u=!1,l="",a="";function f(g){g&&n(1,l="")}const c=di({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json"}});g.ok?(s.invalidateQueries({queryKey:["branches"]}),o.set(null),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}});x(t,c,g=>n(3,r=g));function d(g){g.preventDefault(),(i==null?void 0:i.title)===l?(n(2,a=""),r.mutate()):n(2,a="Please enter the exact name of the branch to delete.")}function m(){l=this.value,n(1,l)}function p(g){u=g,n(0,u)}return[u,l,a,r,i,o,f,c,d,m,p]}class I_ extends ve{constructor(e){super(),ye(this,e,L_,P_,fe,{})}}function du(t,e,n){const r=t.slice();return r[15]=e[n],r}function M_(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function mu(t){let e,n=t[15].title+"",r,i;return{c(){e=S("option"),r=Z(n),e.__value=i=t[15].id,it(e,e.__value)},m(s,o){w(s,e,o),P(e,r)},p(s,o){o&16&&n!==(n=s[15].title+"")&&qe(r,n),o&16&&i!==(i=s[15].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&E(e)}}}function pu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function N_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[V_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Import",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function H_(t){let e,n,r,i;return n=new Ne({props:{path:Ut,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Importing...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){v(n.$$.fragment,s),i=!1},d(s){s&&E(e),V(n)}}}function V_(t){let e;return{c(){e=Z("Don't import")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function B_(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g;e=new Tt({props:{$$slots:{default:[M_]},$$scope:{ctx:t}}});let y=nn(t[4]),_=[];for(let C=0;C<y.length;C+=1)_[C]=mu(du(t,y,C));let h=t[2]&&pu(t);const k=[H_,N_],O=[];function $(C,D){return C[3].isPending?0:1}return c=$(t),d=O[c]=k[c](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New branch title",o=U(),u=S("select");for(let C=0;C<_.length;C+=1)_[C].c();l=U(),h&&h.c(),a=U(),f=S("div"),d.c(),M(s,"data-form-field-label",""),M(u,"data-form-field-text",""),t[1]===void 0&&at(()=>t[9].call(u)),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(C,D){H(e,C,D),w(C,n,D),w(C,r,D),P(r,i),P(i,s),P(i,o),P(i,u);for(let R=0;R<_.length;R+=1)_[R]&&_[R].m(u,null);Io(u,t[1],!0),P(i,l),h&&h.m(i,null),P(r,a),P(r,f),O[c].m(f,null),m=!0,p||(g=[G(u,"change",t[9]),G(r,"submit",t[8])],p=!0)},p(C,D){const R={};if(D&262144&&(R.$$scope={dirty:D,ctx:C}),e.$set(R),D&16){y=nn(C[4]);let N;for(N=0;N<y.length;N+=1){const F=du(C,y,N);_[N]?_[N].p(F,D):(_[N]=mu(F),_[N].c(),_[N].m(u,null))}for(;N<_.length;N+=1)_[N].d(1);_.length=y.length}D&18&&Io(u,C[1]),C[2]?h?h.p(C,D):(h=pu(C),h.c(),h.m(i,null)):h&&(h.d(1),h=null);let K=c;c=$(C),c!==K&&(_e(),v(O[K],1,1,()=>{O[K]=null}),ge(),d=O[c],d||(d=O[c]=k[c](C),d.c()),b(d,1),d.m(f,null))},i(C){m||(b(e.$$.fragment,C),b(d),m=!0)},o(C){v(e.$$.fragment,C),v(d),m=!1},d(C){C&&(E(n),E(r)),V(e,C),fi(_,C),h&&h.d(),O[c].d(),p=!1,Te(g)}}}function U_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[B_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&262174&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function K_(t,e,n){let r,i;const s=Et(),o=wt(),u=To(),l=$o();let a=!1,f="",c="";function d(h){h&&n(1,f="")}const m=Ke([u,l],([h,k])=>h.isSuccess&&k.isSuccess?k.data.filter(O=>{let $=!1;for(const C of h.data)if(O.id.endsWith("/"+C.id)){$=!0;break}return!$}).map(O=>({id:O.id.substring(O.id.indexOf("/")+1),title:O.title,nogit:!1})):[]);x(t,m,h=>n(4,i=h));const p=di({mutationFn:async h=>{const k=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:h.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(k.ok){s.invalidateQueries({queryKey:["branches"]});const O=await k.json();o.set(O),Ge.set(Ae.NONE)}else n(2,c=(await k.json()).detail[0].msg),n(2,c=c[0].toUpperCase()+c.substring(1))}});x(t,p,h=>n(3,r=h));async function g(h){h.preventDefault(),r.mutate({title:f})}function y(){f=Of(this),n(1,f)}function _(h){a=h,n(0,a)}return[a,f,c,r,i,d,m,p,g,y,_]}class j_ extends ve{constructor(e){super(),ye(this,e,K_,U_,fe,{})}}function q_(t){let e;return{c(){e=Z("Merge changes from the default branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function hu(t){let e,n;return{c(){e=S("p"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function W_(t){let e,n,r,i;return e=new It({props:{"data-button":!0,$$slots:{default:[z_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("button"),r.textContent="Merge",M(r,"type","submit"),M(r,"data-button","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function Q_(t){let e,n,r,i;return n=new Ne({props:{path:Ut,class:"block w-6 h-6 animate-spin"}}),{c(){e=S("span"),B(n.$$.fragment),r=S("span"),r.textContent="Merging...",M(e,"data-button",""),M(e,"class","inline-flex")},m(s,o){w(s,e,o),H(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){v(n.$$.fragment,s),i=!1},d(s){s&&E(e),V(n)}}}function z_(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function G_(t){var N;let e,n,r,i,s,o,u=t[4].data.git.default_branch+"",l,a,f,c=((N=t[3])==null?void 0:N.title)+"",d,m,p,g,y,_,h,k,O,$;e=new Tt({props:{$$slots:{default:[q_]},$$scope:{ctx:t}}});let C=t[1]&&hu(t);const D=[Q_,W_],R=[];function K(F,I){return F[2].isPending?0:1}return _=K(t),h=R[_]=D[_](t),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=S("span"),l=Z(u),a=Z(`
14
- into the current branch`),f=S("span"),d=Z(c),m=Z(". This cannot be undone."),p=U(),C&&C.c(),g=U(),y=S("div"),h.c(),M(o,"class","inline-block mx-1 px-2 border boder-fuchsia-700 rounded font-bold"),M(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(y,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(F,I){H(e,F,I),w(F,n,I),w(F,r,I),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(i,f),P(f,d),P(i,m),P(r,p),C&&C.m(r,null),P(r,g),P(r,y),R[_].m(y,null),k=!0,O||($=G(r,"submit",t[9]),O=!0)},p(F,I){var q;const A={};I&8192&&(A.$$scope={dirty:I,ctx:F}),e.$set(A),(!k||I&16)&&u!==(u=F[4].data.git.default_branch+"")&&qe(l,u),(!k||I&8)&&c!==(c=((q=F[3])==null?void 0:q.title)+"")&&qe(d,c),F[1]?C?C.p(F,I):(C=hu(F),C.c(),C.m(r,g)):C&&(C.d(1),C=null);let L=_;_=K(F),_!==L&&(_e(),v(R[L],1,1,()=>{R[L]=null}),ge(),h=R[_],h||(h=R[_]=D[_](F),h.c()),b(h,1),h.m(y,null))},i(F){k||(b(e.$$.fragment,F),b(h),k=!0)},o(F){v(e.$$.fragment,F),v(h),k=!1},d(F){F&&(E(n),E(r)),V(e,F),C&&C.d(),R[_].d(),O=!1,$()}}}function Y_(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[G_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&8222&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Z_(t,e,n){let r,i,s;const o=Et(),u=Ci();x(t,u,g=>n(4,s=g));const l=wt();x(t,l,g=>n(3,i=g));let a=!1,f="";function c(g){}const d=di({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});g.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(Ae.NONE)):(n(1,f=(await g.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});x(t,d,g=>n(2,r=g));function m(g){g.preventDefault(),r.mutate()}function p(g){a=g,n(0,a)}return[a,f,r,i,s,u,l,c,d,m,p]}class X_ extends ve{constructor(e){super(),ye(this,e,Z_,Y_,fe,{})}}function J_(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new Folder in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function _u(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function x_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function eg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y;e=new Tt({props:{$$slots:{default:[J_]},$$scope:{ctx:t}}});let _=t[2]&&_u(t);return c=new It({props:{"data-button":!0,$$slots:{default:[x_]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Folder Name",o=U(),u=S("input"),l=U(),_&&_.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Create",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),H(c,f,null),P(f,d),P(f,m),p=!0,g||(y=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=_u(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){v(e.$$.fragment,h),v(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),_&&_.d(),V(c),g=!1,Te(y)}}}function tg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[eg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function ng(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const g=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder"}});g.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let rg=class extends ve{constructor(e){super(),ye(this,e,ng,tg,fe,{})}};function ig(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=S("span"),i=Z(r),M(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),P(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&qe(i,r)},d(o){o&&(E(e),E(n))}}}function gu(t){let e,n;return{c(){e=S("span"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function sg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function og(t){var K;let e,n,r,i,s,o,u=((K=t[3])==null?void 0:K.fullpath)+"",l,a,f,c,d,m,p,g,y,_,h,k,O,$,C,D;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[ig]},$$scope:{ctx:t}}});let R=t[1]&&gu(t);return h=new It({props:{"data-button":!0,$$slots:{default:[sg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the folder "),o=S("span"),l=Z(u),a=Z(`
15
- and all the files and folders within that. To confirm the action, please enter
16
- the name of the folder to delete.`),f=U(),c=S("label"),d=S("span"),d.textContent="Confirmation Folder Name",m=U(),p=S("input"),g=U(),R&&R.c(),y=U(),_=S("div"),B(h.$$.fragment),k=U(),O=S("button"),O.textContent="Delete",M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(c,"class","block"),M(O,"type","submit"),M(O,"data-button",""),M(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),M(_,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(N,F){H(e,N,F),w(N,n,F),w(N,r,F),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[2]),P(c,g),R&&R.m(c,null),P(r,y),P(r,_),H(h,_,null),P(_,k),P(_,O),$=!0,C||(D=[G(p,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(N,F){var L;const I={};F&2056&&(I.$$scope={dirty:F,ctx:N}),e.$set(I),(!$||F&8)&&u!==(u=((L=N[3])==null?void 0:L.fullpath)+"")&&qe(l,u),F&4&&p.value!==N[2]&&it(p,N[2]),N[1]?R?R.p(N,F):(R=gu(N),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const A={};F&2048&&(A.$$scope={dirty:F,ctx:N}),h.$set(A)},i(N){$||(b(e.$$.fragment,N),b(h.$$.fragment,N),$=!0)},o(N){v(e.$$.fragment,N),v(h.$$.fragment,N),$=!1},d(N){N&&(E(n),E(r)),V(e,N),R&&R.d(),V(h),C=!1,Te(D)}}}function lg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[og]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function ug(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){p.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(p){p?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let uf=class extends ve{constructor(e){super(),ye(this,e,ug,lg,fe,{})}};function ag(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function bu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function fg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function cg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y;e=new Tt({props:{$$slots:{default:[ag]},$$scope:{ctx:t}}});let _=t[2]&&bu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[fg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Folder Name",o=U(),u=S("input"),l=U(),_&&_.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Rename",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),H(c,f,null),P(f,d),P(f,m),p=!0,g||(y=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=bu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){v(e.$$.fragment,h),v(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),_&&_.d(),V(c),g=!1,Te(y)}}}function dg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[cg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function mg(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const g=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),y=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+g+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});y.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await y.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}let pg=class extends ve{constructor(e){super(),ye(this,e,mg,dg,fe,{})}};function hg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Create a new File in "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function yu(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function _g(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function gg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y;e=new Tt({props:{$$slots:{default:[hg]},$$scope:{ctx:t}}});let _=t[2]&&yu(t);return c=new It({props:{"data-button":!0,$$slots:{default:[_g]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Filename",o=U(),u=S("input"),l=U(),_&&_.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Create",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),H(c,f,null),P(f,d),P(f,m),p=!0,g||(y=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=yu(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){v(e.$$.fragment,h),v(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),_&&_.d(),V(c),g=!1,Te(y)}}}function bg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[gg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function yg(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const g=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+l,{method:"POST",headers:{"X-uEditor-New-Type":"file"}});g.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class vg extends ve{constructor(e){super(),ye(this,e,yg,bg,fe,{})}}function kg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=S("span"),i=Z(r),M(n,"class","font-bold")},m(o,u){w(o,e,u),w(o,n,u),P(n,i)},p(o,u){var l;u&8&&r!==(r=((l=o[3])==null?void 0:l.fullpath)+"")&&qe(i,r)},d(o){o&&(E(e),E(n))}}}function vu(t){let e,n;return{c(){e=S("span"),n=Z(t[1]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&2&&qe(n,r[1])},d(r){r&&E(e)}}}function Cg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Eg(t){var K;let e,n,r,i,s,o,u=((K=t[3])==null?void 0:K.fullpath)+"",l,a,f,c,d,m,p,g,y,_,h,k,O,$,C,D;e=new Tt({props:{class:"bg-rose-700",$$slots:{default:[kg]},$$scope:{ctx:t}}});let R=t[1]&&vu(t);return h=new It({props:{"data-button":!0,$$slots:{default:[Cg]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("p"),s=Z("Please confirm you wish to delete the file "),o=S("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=U(),c=S("label"),d=S("span"),d.textContent="Confirm filename",m=U(),p=S("input"),g=U(),R&&R.c(),y=U(),_=S("div"),B(h.$$.fragment),k=U(),O=S("button"),O.textContent="Delete",M(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),M(i,"class","mb-4"),M(d,"data-form-field-label",""),M(p,"type","text"),M(p,"data-form-field-text",""),M(c,"class","block"),M(O,"type","submit"),M(O,"data-button",""),M(O,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),M(_,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(N,F){H(e,N,F),w(N,n,F),w(N,r,F),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(r,f),P(r,c),P(c,d),P(c,m),P(c,p),it(p,t[2]),P(c,g),R&&R.m(c,null),P(r,y),P(r,_),H(h,_,null),P(_,k),P(_,O),$=!0,C||(D=[G(p,"input",t[7]),G(r,"submit",t[5])],C=!0)},p(N,F){var L;const I={};F&2056&&(I.$$scope={dirty:F,ctx:N}),e.$set(I),(!$||F&8)&&u!==(u=((L=N[3])==null?void 0:L.fullpath)+"")&&qe(l,u),F&4&&p.value!==N[2]&&it(p,N[2]),N[1]?R?R.p(N,F):(R=vu(N),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const A={};F&2048&&(A.$$scope={dirty:F,ctx:N}),h.$set(A)},i(N){$||(b(e.$$.fragment,N),b(h.$$.fragment,N),$=!0)},o(N){v(e.$$.fragment,N),v(h.$$.fragment,N),$=!1},d(N){N&&(E(n),E(r)),V(e,N),R&&R.d(),V(h),C=!1,Te(D)}}}function wg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Eg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Og(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){p.preventDefault(),n(1,l=""),a===(i==null?void 0:i.fullpath)||a==(i==null?void 0:i.name)?(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+i.fullpath,{method:"DELETE"})).ok&&(s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),n(0,u=!1),Ge.set(Ae.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(p){p?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class Ag extends ve{constructor(e){super(),ye(this,e,Og,wg,fe,{})}}function Tg(t){var s,o;let e,n=((s=t[3])!=null&&s.fullpath?(o=t[3])==null?void 0:o.fullpath:"/")+"",r,i;return{c(){e=Z('Rename "'),r=Z(n),i=Z('"')},m(u,l){w(u,e,l),w(u,r,l),w(u,i,l)},p(u,l){var a,f;l&8&&n!==(n=((a=u[3])!=null&&a.fullpath?(f=u[3])==null?void 0:f.fullpath:"/")+"")&&qe(r,n)},d(u){u&&(E(e),E(r),E(i))}}}function ku(t){let e,n;return{c(){e=S("span"),n=Z(t[2]),M(e,"data-form-field-error","")},m(r,i){w(r,e,i),P(e,n)},p(r,i){i&4&&qe(n,r[2])},d(r){r&&E(e)}}}function $g(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Sg(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y;e=new Tt({props:{$$slots:{default:[Tg]},$$scope:{ctx:t}}});let _=t[2]&&ku(t);return c=new It({props:{"data-button":!0,$$slots:{default:[$g]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("form"),i=S("label"),s=S("span"),s.textContent="New Filename",o=U(),u=S("input"),l=U(),_&&_.c(),a=U(),f=S("div"),B(c.$$.fragment),d=U(),m=S("button"),m.textContent="Rename",M(s,"data-form-field-label",""),M(u,"type","text"),M(u,"data-form-field-text",""),M(m,"type","submit"),M(m,"data-button",""),M(f,"data-dialog-buttons",""),M(r,"data-dialog-content-area","")},m(h,k){H(e,h,k),w(h,n,k),w(h,r,k),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),H(c,f,null),P(f,d),P(f,m),p=!0,g||(y=[G(u,"input",t[7]),G(r,"submit",t[5])],g=!0)},p(h,k){const O={};k&2056&&(O.$$scope={dirty:k,ctx:h}),e.$set(O),k&2&&u.value!==h[1]&&it(u,h[1]),h[2]?_?_.p(h,k):(_=ku(h),_.c(),_.m(i,null)):_&&(_.d(1),_=null);const $={};k&2048&&($.$$scope={dirty:k,ctx:h}),c.$set($)},i(h){p||(b(e.$$.fragment,h),b(c.$$.fragment,h),p=!0)},o(h){v(e.$$.fragment,h),v(c.$$.fragment,h),p=!1},d(h){h&&(E(n),E(r)),V(e,h),_&&_.d(),V(c),g=!1,Te(y)}}}function Rg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Sg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&2062&&(l.$$scope={dirty:u,ctx:o}),!n&&u&1&&(n=!0,l.open=o[0],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Fg(t,e,n){let r,i;x(t,ft,p=>n(3,i=p));const s=Et(),o=wt();x(t,o,p=>n(9,r=p));let u=!1,l="",a="";async function f(p){if(p.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const g=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),y=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+g+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"file","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});y.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),ft.set(null),Ge.set(Ae.NONE)):(n(2,a=(await y.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(p){p?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function m(p){u=p,n(0,u)}return[u,l,a,i,o,f,c,d,m]}class Dg extends ve{constructor(e){super(),ye(this,e,Fg,Rg,fe,{})}}function Cu(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function Pg(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Lg(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ig(t){var l,a;let e,n=((l=t[6])!=null&&l.fullpath?(a=t[6])==null?void 0:a.fullpath:"/")+"",r,i;function s(f,c){return f[4].length>0?Lg:Pg}let o=s(t),u=o(t);return{c(){u.c(),e=Z(' Files to "'),r=Z(n),i=Z('"')},m(f,c){u.m(f,c),w(f,e,c),w(f,r,c),w(f,i,c)},p(f,c){var d,m;o!==(o=s(f))&&(u.d(1),u=o(f),u&&(u.c(),u.m(e.parentNode,e))),c&64&&n!==(n=((d=f[6])!=null&&d.fullpath?(m=f[6])==null?void 0:m.fullpath:"/")+"")&&qe(r,n)},d(f){f&&(E(e),E(r),E(i)),u.d(f)}}}function Mg(t){let e,n,r,i,s,o,u=nn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Eu(Cu(t,u,f));const a=f=>v(l[f],1,1,()=>{l[f]=null});return s=new It({props:{"data-button":!0,$$slots:{default:[qg]},$$scope:{ctx:t}}}),{c(){e=S("div"),n=S("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=U(),i=S("div"),B(s.$$.fragment),M(i,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(f,c){w(f,e,c),P(e,n);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(n,null);P(e,r),P(e,i),H(s,i,null),o=!0},p(f,c){if(c&144){u=nn(f[4]);let m;for(m=0;m<u.length;m+=1){const p=Cu(f,u,m);l[m]?(l[m].p(p,c),b(l[m],1)):(l[m]=Eu(p),l[m].c(),b(l[m],1),l[m].m(n,null))}for(_e(),m=u.length;m<l.length;m+=1)a(m);ge()}const d={};c&33554464&&(d.$$scope={dirty:c,ctx:f}),s.$set(d)},i(f){if(!o){for(let c=0;c<u.length;c+=1)b(l[c]);b(s.$$.fragment,f),o=!0}},o(f){l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)v(l[c]);v(s.$$.fragment,f),o=!1},d(f){f&&E(e),fi(l,f),V(s)}}}function Ng(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p;return a=new It({props:{"data-button":!0,$$slots:{default:[Wg]},$$scope:{ctx:t}}}),{c(){e=S("form"),n=S("label"),r=S("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=U(),s=S("input"),u=U(),l=S("div"),B(a.$$.fragment),f=U(),c=S("button"),c.textContent="Upload",M(s,"type","file"),M(s,"class","sr-only"),M(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),M(c,"type","submit"),M(c,"data-button",""),M(c,"class","sr-only"),M(l,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(g,y){w(g,e,y),P(e,n),P(n,r),P(n,i),P(n,s),t[12](s),P(e,u),P(e,l),H(a,l,null),P(l,f),P(l,c),t[16](c),d=!0,m||(p=[G(s,"change",t[13]),G(n,"drop",t[11]),G(n,"dragover",t[14]),G(n,"dragleave",t[15]),G(e,"submit",t[10])],m=!0)},p(g,y){(!d||y&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(g[2]?"border-solid":"border-dashed")+" rounded"))&&M(n,"class",o);const _={};y&33554432&&(_.$$scope={dirty:y,ctx:g}),a.$set(_)},i(g){d||(b(a.$$.fragment,g),d=!0)},o(g){v(a.$$.fragment,g),d=!1},d(g){g&&E(e),t[12](null),V(a),t[16](null),m=!1,Te(p)}}}function Hg(t){let e,n,r,i;return r=new Ne({props:{path:w1,class:"w-6 h-6 text-rose-700"}}),{c(){e=S("span"),e.textContent="failed to upload",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){v(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),V(r,s)}}}function Vg(t){let e,n,r,i;return r=new Ne({props:{path:C1,class:"w-6 h-6 text-lime-500"}}),{c(){e=S("span"),e.textContent="successfully uploaded",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){v(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),V(r,s)}}}function Bg(t){let e,n,r,i;return r=new Ne({props:{path:Ut,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=S("span"),e.textContent="uploading",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){v(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),V(r,s)}}}function Ug(t){let e,n,r,i;return r=new Ne({props:{path:K1}}),{c(){e=S("span"),e.textContent="waiting to upload",n=U(),B(r.$$.fragment),M(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),H(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){v(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),V(r,s)}}}function Eu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[Ug,Bg,Vg,Hg],c=[];function d(m,p){return m[22]===m[7].READY?0:m[22]==m[7].ACTIVE?1:m[22]===m[7].SUCCESS?2:m[22]===m[7].FAILED?3:-1}return~(o=d(t))&&(u=c[o]=f[o](t)),{c(){e=S("li"),n=S("span"),i=Z(r),s=U(),u&&u.c(),l=U(),M(n,"class","flex-1"),M(e,"class","flex flex-row space-x-4")},m(m,p){w(m,e,p),P(e,n),P(n,i),P(e,s),~o&&c[o].m(e,null),P(e,l),a=!0},p(m,p){(!a||p&16)&&r!==(r=m[21].name+"")&&qe(i,r);let g=o;o=d(m),o!==g&&(u&&(_e(),v(c[g],1,1,()=>{c[g]=null}),ge()),~o?(u=c[o],u||(u=c[o]=f[o](m),u.c()),b(u,1),u.m(e,l)):u=null)},i(m){a||(b(u),a=!0)},o(m){v(u),a=!1},d(m){m&&E(e),~o&&c[o].d()}}}function Kg(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function jg(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function qg(t){let e;function n(s,o){return s[5]?jg:Kg}let r=n(t),i=r(t);return{c(){i.c(),e=Fe()},m(s,o){i.m(s,o),w(s,e,o)},p(s,o){r!==(r=n(s))&&(i.d(1),i=r(s),i&&(i.c(),i.m(e.parentNode,e)))},d(s){s&&E(e),i.d(s)}}}function Wg(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qg(t){let e,n,r,i,s,o;e=new Tt({props:{$$slots:{default:[Ig]},$$scope:{ctx:t}}});const u=[Ng,Mg],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){B(e.$$.fragment),n=U(),i.c(),s=Fe()},m(f,c){H(e,f,c),w(f,n,c),l[r].m(f,c),w(f,s,c),o=!0},p(f,c){const d={};c&33554512&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);let m=r;r=a(f),r===m?l[r].p(f,c):(_e(),v(l[m],1,1,()=>{l[m]=null}),ge(),i=l[r],i?i.p(f,c):(i=l[r]=u[r](f),i.c()),b(i,1),i.m(s.parentNode,s))},i(f){o||(b(e.$$.fragment,f),b(i),o=!0)},o(f){v(e.$$.fragment,f),v(i),o=!1},d(f){f&&(E(n),E(s)),V(e,f),l[r].d(f)}}}function zg(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[Qg]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){B(e.$$.fragment)},m(o,u){H(e,o,u),r=!0},p(o,[u]){const l={};u&33554551&&(l.$$scope={dirty:u,ctx:o}),!n&&u&8&&(n=!0,l.open=o[3],Vt(()=>n=!1)),e.$set(l)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){V(e,o)}}}function Gg(t,e,n){let r,i;x(t,ft,R=>n(6,i=R));var s=(R=>(R[R.READY=0]="READY",R[R.ACTIVE=1]="ACTIVE",R[R.SUCCESS=2]="SUCCESS",R[R.FAILED=3]="FAILED",R))(s||{});const o=Et(),u=wt();x(t,u,R=>n(18,r=R));let l=null,a=null,f=!1,c=!1,d=[],m=!1;function p(R){R||Ge.set(Ae.NONE)}async function g(R){if(R.preventDefault(),l&&l.files){n(4,d=[]);for(let K of l.files)d.push([K,0]);d.length>0&&_()}}async function y(R){if(R.preventDefault(),n(4,d=[]),R.dataTransfer&&R.dataTransfer.items){for(let K of R.dataTransfer.items)if(K.kind==="file"){const N=K.getAsFile();N!==null&&d.push([N,0])}d.length>0&&_()}}async function _(){n(5,m=!1);for(let R of d){if(!c)break;if(R[1]=1,n(4,d),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"POST",headers:{"X-uEditor-New-Type":"file"}})).ok){const N=new FormData;N.append("content",R[0]),(await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+(i==null?void 0:i.fullpath)+"/"+R[0].name,{method:"PUT",body:N})).ok?R[1]=2:R[1]=3,n(4,d)}else R[1]=3,n(4,d)}o.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),n(5,m=!0)}function h(R){Ce[R?"unshift":"push"](()=>{l=R,n(0,l)})}const k=()=>{a&&a.click()},O=R=>{R.preventDefault(),n(2,f=!0)},$=()=>{n(2,f=!1)};function C(R){Ce[R?"unshift":"push"](()=>{a=R,n(1,a)})}function D(R){c=R,n(3,c)}return[l,a,f,c,d,m,i,s,u,p,g,y,h,k,O,$,C,D]}class Yg extends ve{constructor(e){super(),ye(this,e,Gg,zg,fe,{})}}function Zg(t){let e,n;return e=new Yg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Xg(t){let e,n;return e=new Dg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Jg(t){let e,n;return e=new Ag({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function xg(t){let e,n;return e=new vg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function eb(t){let e,n;return e=new pg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function tb(t){let e,n;return e=new uf({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function nb(t){let e,n;return e=new rg({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function rb(t){let e,n;return e=new X_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ib(t){let e,n;return e=new I_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function sb(t){let e,n;return e=new j_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function ob(t){let e,n;return e=new T_({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function lb(t){let e,n,r,i;const s=[ob,sb,ib,rb,nb,tb,eb,xg,Jg,Xg,Zg],o=[];function u(l,a){return l[0]===Ae.UEDITOR_NEW_BRANCH?0:l[0]===Ae.UEDITOR_IMPORT_REMOTE_BRANCH?1:l[0]===Ae.UEDITOR_DELETE_BRANCH?2:l[0]===Ae.UEDITOR_MERGE_FROM_DEFAULT?3:l[0]===Ae.FOLDER_CREATE?4:l[0]===Ae.FOLDER_DELETE?5:l[0]===Ae.FOLDER_RENAME?6:l[0]===Ae.FILE_CREATE?7:l[0]===Ae.FILE_DELETE?8:l[0]===Ae.FILE_RENAME?9:l[0]===Ae.FILE_UPLOAD?10:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e!==f&&(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}var Ae=(t=>(t[t.NONE=1]="NONE",t[t.UEDITOR_NEW_BRANCH=2]="UEDITOR_NEW_BRANCH",t[t.UEDITOR_IMPORT_REMOTE_BRANCH=3]="UEDITOR_IMPORT_REMOTE_BRANCH",t[t.UEDITOR_DELETE_BRANCH=4]="UEDITOR_DELETE_BRANCH",t[t.UEDITOR_MERGE_FROM_DEFAULT=5]="UEDITOR_MERGE_FROM_DEFAULT",t[t.FOLDER_CREATE=6]="FOLDER_CREATE",t[t.FOLDER_DELETE=7]="FOLDER_DELETE",t[t.FOLDER_RENAME=8]="FOLDER_RENAME",t[t.FILE_CREATE=9]="FILE_CREATE",t[t.FILE_DELETE=10]="FILE_DELETE",t[t.FILE_RENAME=11]="FILE_RENAME",t[t.FILE_UPLOAD=12]="FILE_UPLOAD",t))(Ae||{});const Ge=De(1);function ub(t,e,n){let r,i=ce;return x(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let ab=class extends ve{constructor(e){super(),ye(this,e,ub,lb,fe,{})}};const fb="modulepreload",cb=function(t){return"/app/"+t},wu={},Pi=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=cb(l),l in wu)return;wu[l]=!0;const a=l.endsWith(".css"),f=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":fb,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((d,m)=>{c.addEventListener("load",d),c.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return i.then(o=>{for(const u of o||[])u.status==="rejected"&&s(u.reason);return e().catch(s)})};function db(t){let e;return{c(){e=S("div"),e.textContent="Please select a file or folder from the file-browser on the left",M(e,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function mb(t){let e,n,r,i;const s=[_b,hb,pb],o=[];function u(l,a){return l[2]!==null?0:l[0]?1:2}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function pb(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=S("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),M(e,"class","flex-1 px-2 py-1 text-rose-700")},m(o,u){w(o,e,u),P(e,n),P(e,i),P(e,s)},p(o,u){u&2&&r!==(r=o[1].mimetype+"")&&qe(i,r)},i:ce,o:ce,d(o){o&&E(e)}}}function hb(t){let e;return{c(){e=S("div"),e.textContent="Loading the editor. Please wait...",M(e,"class","flex-1 px-2 py-1")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function _b(t){let e=t[3].id,n,r,i=Ou(t);return{c(){i.c(),n=Fe()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(_e(),v(i,1,1,ce),ge(),i=Ou(s),i.c(),b(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){r||(b(i),r=!0)},o(s){v(i),r=!1},d(s){s&&E(n),i.d(s)}}}function Ou(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Mo(i,s())),{c(){e&&B(e.$$.fragment),n=Fe()},m(o,u){e&&H(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){_e();const l=e;v(l.$$.fragment,1,0,()=>{V(l,1)}),ge()}i?(e=Mo(i,s()),B(e.$$.fragment),b(e.$$.fragment,1),H(e,n.parentNode,n)):e=null}},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&v(e.$$.fragment,o),r=!1},d(o){o&&E(n),e&&V(e,o)}}}function gb(t){let e,n,r,i;const s=[mb,db],o=[];function u(l,a){return l[1]!==null?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Fe()},m(l,a){o[e].m(l,a),w(l,r,a),i=!0},p(l,[a]){let f=e;e=u(l),e===f?o[e].p(l,a):(_e(),v(o[f],1,1,()=>{o[f]=null}),ge(),n=o[e],n?n.p(l,a):(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r))},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function bb(t,e,n){let r,i,s;x(t,ft,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=wt();x(t,a,d=>n(3,s=d));const f=Ke(ft,d=>{if(d){if(d.type==="folder")return"Folder";if(u.indexOf(d.mimetype)>=0||d.mimetype.startsWith("text/"))return"CodeMirror";if(l.indexOf(d.mimetype)>=0)return"Tei";if(d.mimetype.startsWith("image/"))return"Image"}return null}),c=Ke(f,(d,m)=>{let p=null;d==="Folder"?p=Pi(()=>import("./FolderEditor-zEVI7VnV.js"),[]):d==="CodeMirror"?p=Pi(()=>import("./CodeMirrorEditor-B8N4a0_6.js"),__vite__mapDeps([0,1,2])):d==="Tei"?p=Pi(()=>import("./TeiEditor-DaKNV6gH.js"),__vite__mapDeps([3,1])):d==="Image"&&(p=Pi(()=>import("./ImageEditor-D2waaDFD.js"),[])),p?(n(0,o=!0),p.then(g=>{m(g.default),n(0,o=!1)},()=>{n(0,o=!1)})):m(null)},null);return x(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let yb=class extends ve{constructor(e){super(),ye(this,e,bb,gb,fe,{})}};function vb(t){return t[t.length-1]}function af(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}af({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function kb(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function Li(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Au(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Tu(t,e){if(!Eb)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return So(n)?n:null}const Ii=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),$u=t=>typeof t=="function";Hi("empty");function Hi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Ke(n,u=>{const l=i(u);if($u(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,a}return Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr}))});{const u=i,l=u==null?void 0:u();if($u(l)){const a=(...f)=>Ii(Li({...l(...f),[`data-melt-${t}`]:"",action:r??rr}));return a.action=r??rr,Au(a)}return Au(Ii(Li({...l,[`data-melt-${t}`]:"",action:r??rr})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Cb(t){const e=s=>s?`${t}-${s}`:t,n=s=>`data-melt-${t}${s?`-${s}`:""}`,r=s=>`[data-melt-${t}${s?`-${s}`:""}]`;return{name:e,attribute:n,selector:r,getEl:s=>document.querySelector(r(s))}}const Eb=typeof document<"u",wb=t=>/^[a-z]$/i.test(t);function So(t){return t instanceof HTMLElement}function Ob(t){return t.offsetParent===null}function Ab(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function rr(){}function Rs(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=$b(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Tb(t){const e=t.currentTarget;if(!So(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function $b(t){return e=>{const n=Tb(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Ro(t){return{...t,get:()=>$r(t)}}Ro.writable=function(t){const e=De(t);let n=t;return{subscribe:e.subscribe,set(r){e.set(r),n=r},update(r){const i=r(n);e.set(i),n=i},get(){return n}}};Ro.derived=function(t,e){const n=new Map,r=()=>{const s=Array.isArray(t)?t.map(o=>o.get()):t.get();return e(s)};return{get:r,subscribe:s=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(l=>{o.push(l.subscribe(()=>{s(r())}))}),s(r()),n.set(s,o),()=>{const l=n.get(s);if(l)for(const a of l)a();n.delete(s)}}}};const Sb=(t,e)=>{const n=Ro(t),r=(s,o)=>{n.update(u=>{const l=s(u);let a=l;return e&&(a=e({curr:u,next:l})),o==null||o(a),a})};return{...n,update:r,set:s=>{r(()=>s)}}};function Rb(){return Sa(10)}function Fb(t){return t.reduce((e,n)=>(e[n]=Rb(),e),{})}const lt={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"};bt(!1),bt(!1),bt(void 0),bt(void 0);const Db={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...kb(Db,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const Pb={forceVisible:!1,defaultExpanded:[]},ir={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Fs}=Cb("tree-view");function Lb(t){const e={...Pb,...t},{forceVisible:n}=e,r=De(null),i=De(null),s=e.expanded??De(e.defaultExpanded),o=Sb(s,e==null?void 0:e.onExpandedChange),u=Ke([i],([C])=>C==null?void 0:C.getAttribute("data-id")),l=Ke([i],([C])=>D=>(C==null?void 0:C.getAttribute("data-id"))===D),a=Ke([o],([C])=>D=>C.includes(D)),f=Fb(["tree"]),c=Hi(Fs(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const m=Hi(Fs("item"),{stores:[o,u,r],returned:([C,D,R])=>K=>{const{id:N,hasChildren:F}=K;let I=0;return R!==null&&(I=R===N?0:-1),{role:"treeitem","aria-selected":D===N,"data-id":N,tabindex:I,"aria-expanded":F?C.includes(N):void 0}},action:C=>{const D=Ab(Rs(C,"keydown",R=>{const{key:K}=R,N=wb(K);if(![lt.ARROW_DOWN,lt.ARROW_UP,lt.ARROW_LEFT,lt.ARROW_RIGHT,lt.ENTER,lt.SPACE,lt.END,lt.HOME,lt.ASTERISK].includes(K)&&!N||!Tu(f.tree)||!So(C)||C.getAttribute("role")!=="treeitem")return;const A=_(),L=A.findIndex(q=>q===C);if(K!==lt.ENTER&&K!==lt.SPACE&&R.preventDefault(),K===lt.ENTER||K===lt.SPACE)y(C),d=!0;else if(K===lt.ARROW_DOWN&&L!==A.length-1){const q=A[L+1];if(!q)return;g(q)}else if(K===lt.ARROW_UP&&L!==0){const q=A[L-1];if(!q)return;g(q)}else if(K===lt.HOME&&L!==0){const q=A[0];if(!q)return;g(q)}else if(K===lt.END&&L!=A.length-1){const q=vb(A);if(!q)return;g(q)}else if(K===lt.ARROW_LEFT)if($(C))k(C);else{const q=C==null?void 0:C.closest('[role="group"]'),W=q==null?void 0:q.getAttribute("data-group-id"),oe=A.find(se=>se.getAttribute("data-id")===W);if(!oe)return;g(oe)}else if(K===lt.ARROW_RIGHT)if($(C)){const q=A[L+1];if(!q)return;g(q)}else O(C)&&k(C);else if(N){const q=A.map(se=>{var z;return{value:(z=se.textContent)==null?void 0:z.toLowerCase().trim(),id:se.getAttribute("data-id")}});let W=-1,oe=q.slice(L+1).some((se,z)=>{var le;return((le=se.value)==null?void 0:le.toLowerCase()[0])===K?(W=L+1+z,!0):!1});if(oe||(oe=q.slice(0,L).some((se,z)=>{var le;return((le=se.value)==null?void 0:le.toLowerCase().at(0))===K?(W=z,!0):!1})),oe&&q[W].id){const se=A[W];if(!se)return;g(se)}}}),Rs(C,"click",async()=>{y(C),g(C),d||k(C),d=!1}),Rs(C,"focus",()=>{r.update(R=>C.getAttribute("data-id")??R)}));return{destroy(){D()}}}}),p=Hi(Fs("group"),{stores:[o],returned:([C])=>D=>({role:"group","data-group-id":D.id,hidden:!n&&!C.includes(D.id)?!0:void 0,style:af({display:!n&&!C.includes(D.id)?"none":void 0})})});function g(C){r.update(D=>C.getAttribute("data-id")??D),C.focus()}function y(C){C.getAttribute(ir.DATAID)&&i.set(C)}function _(){let C=[];const D=Tu(f.tree);return D&&(C=Array.from(D.querySelectorAll('[role="treeitem"]')).filter(R=>!Ob(R))),C}function h(C){const D=C.hasAttribute(ir.EXPANDED),R=C.getAttribute(ir.EXPANDED),K=C.getAttribute(ir.DATAID);return{hasChildren:D,expanded:R,dataId:K}}function k(C){const{hasChildren:D,expanded:R,dataId:K}=h(C);!D||R===null||K===null||(R==="false"?o.update(N=>[...N,K]):o.update(N=>N.filter(F=>F!==K)))}function O(C){return C.hasAttribute(ir.EXPANDED)}function $(C){return C.getAttribute(ir.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:m,group:p},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var Ib=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ff={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",Ib,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var u=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,a=o.trim===void 0?!0:o.trim,f=s.normalize().split("").reduce(function(c,d){var m=u[d];return m===void 0&&(m=n[d]),m===void 0&&(m=d),m===l&&(m=" "),c+m.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),a&&(f=f.trim()),f=f.replace(/\s+/g,l),o.lower&&(f=f.toLowerCase()),f}return i.extend=function(s){Object.assign(n,s)},i})})(ff);var Nb=ff.exports;const Hb=Mb(Nb);function Su(t,e,n){var l;const r=t.slice();r[9]=e[n].name,r[10]=e[n].type,r[11]=e[n].fullpath,r[12]=e[n].content,r[13]=e[n].mimetype,r[19]=n;const i=`file-tree-${Hb(r[9],{strict:!0})}-${r[1]}-${r[19]}`;r[14]=i;const s=!!((l=r[12])!=null&&l.length);r[15]=s;const o=r[2]({id:r[14]});r[16]=o;const u=r[3]({id:r[14],hasChildren:r[15]});return r[17]=u,r}function Vb(t){let e,n,r,i,s;const o=[Wb,qb,jb,Kb],u=[];function l(a,f){return f&1&&(e=null),a[13]==="text/markdown"||a[13]==="application/tei+xml"?0:(e==null&&(e=!!a[13].startsWith("image/")),e?1:a[13]==="application/yaml"||a[13]==="application/toml"||a[13]==="application/gitignore"?2:3)}return n=l(t,-1),r=u[n]=o[n](t),{c(){r.c(),i=Fe()},m(a,f){u[n].m(a,f),w(a,i,f),s=!0},p(a,f){let c=n;n=l(a,f),n!==c&&(_e(),v(u[c],1,1,()=>{u[c]=null}),ge(),r=u[n],r||(r=u[n]=o[n](a),r.c()),b(r,1),r.m(i.parentNode,i))},i(a){s||(b(r),s=!0)},o(a){v(r),s=!1},d(a){a&&E(i),u[n].d(a)}}}function Bb(t){let e,n;return e=new Ne({props:{path:I1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Ub(t){let e,n;return e=new Ne({props:{path:L1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Kb(t){let e,n;return e=new Ne({props:{path:F1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function jb(t){let e,n;return e=new Ne({props:{path:T1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function qb(t){let e,n;return e=new Ne({props:{path:R1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Wb(t){let e,n;return e=new Ne({props:{path:$1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Ru(t){let e,n,r,i,s;n=new cf({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ne(u,o[l]);return{c(){e=S("ol"),B(n.$$.fragment),ie(e,u)},m(l,a){w(l,e,a),H(n,e,null),r=!0,i||(s=Be(t[16].action(e)),i=!0)},p(l,a){const f={};a&1&&(f.treeItems=l[12]),a&2&&(f.level=l[1]+1),n.$set(f),ie(e,u=Me(o,[a&7&&l[16]]))},i(l){r||(b(n.$$.fragment,l),r=!0)},o(l){v(n.$$.fragment,l),r=!1},d(l){l&&E(e),V(n),i=!1,s()}}}function Fu(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,m,p,g;const y=[Ub,Bb,Vb],_=[];function h(C,D){return D&19&&(r=null),r==null&&(r=!!(C[10]==="folder"&&C[15]&&C[4](C[14]))),r?0:C[10]==="folder"?1:C[10]==="file"?2:-1}~(i=h(t,-1))&&(s=_[i]=y[i](t));let k=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],O={};for(let C=0;C<k.length;C+=1)O=ne(O,k[C]);let $=t[12]&&Ru(t);return{c(){e=S("li"),n=S("button"),s&&s.c(),o=U(),u=S("span"),a=Z(l),c=U(),$&&$.c(),d=U(),M(u,"class","select-none"),ie(n,O),M(e,"role","none")},m(C,D){w(C,e,D),P(e,n),~i&&_[i].m(n,null),P(n,o),P(n,u),P(u,a),n.autofocus&&n.focus(),P(e,c),$&&$.m(e,null),P(e,d),m=!0,p||(g=Be(t[17].action(n)),p=!0)},p(C,D){let R=i;i=h(C,D),i===R?~i&&_[i].p(C,D):(s&&(_e(),v(_[R],1,1,()=>{_[R]=null}),ge()),~i?(s=_[i],s?s.p(C,D):(s=_[i]=y[i](C),s.c()),b(s,1),s.m(n,o)):s=null),(!m||D&1)&&l!==(l=C[9]+"")&&qe(a,l),ie(n,O=Me(k,[{class:"flex items-center gap-1 p-1"},D&11&&C[17],(!m||D&1&&f!==(f=C[11]))&&{"data-file-path":f}])),C[12]?$?($.p(C,D),D&1&&b($,1)):($=Ru(C),$.c(),b($,1),$.m(e,d)):$&&(_e(),v($,1,1,()=>{$=null}),ge())},i(C){m||(b(s),b($),m=!0)},o(C){v(s),v($),m=!1},d(C){C&&E(e),~i&&_[i].d(),$&&$.d(),p=!1,g()}}}function Qb(t){let e,n,r=nn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Fu(Su(t,r,o));const s=o=>v(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Fe()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,[u]){if(u&31){r=nn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=Su(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Fu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(_e(),l=r.length;l<i.length;l+=1)s(l);ge()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)v(i[u]);n=!1},d(o){o&&E(e),fi(i,o)}}}function zb(t,e,n){let r,i,s,{treeItems:o}=e,{level:u=1}=e;const{elements:{item:l,group:a},helpers:{isExpanded:f,isSelected:c}}=pt("tree");return x(t,l,d=>n(3,i=d)),x(t,a,d=>n(2,r=d)),x(t,f,d=>n(4,s=d)),t.$$set=d=>{"treeItems"in d&&n(0,o=d.treeItems),"level"in d&&n(1,u=d.level)},[o,u,r,i,s,l,a,f]}class cf extends ve{constructor(e){super(),ye(this,e,zb,Qb,fe,{treeItems:0,level:1})}}function Gb(t){let e,n,r,i,s;const o=t[1].default,u=de(o,t,t[0],null);return i=new Ne({props:{path:Ut,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=S("div"),n=S("p"),u&&u.c(),r=U(),B(i.$$.fragment),M(n,"class","sr-only"),M(e,"class","absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2")},m(l,a){w(l,e,a),P(e,n),u&&u.m(n,null),P(e,r),H(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&pe(u,o,l,l[0],s?me(o,l[0],a,null):he(l[0]),null)},i(l){s||(b(u,l),b(i.$$.fragment,l),s=!0)},o(l){v(u,l),v(i.$$.fragment,l),s=!1},d(l){l&&E(e),u&&u.d(l),V(i)}}}function Yb(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Zb extends ve{constructor(e){super(),ye(this,e,Yb,Gb,fe,{})}}function Xb(t){let e,n;return e=new Zb({props:{$$slots:{default:[xb]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&2048&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Jb(t){let e,n,r;n=new cf({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ne(s,i[o]);return{c(){e=S("ol"),B(n.$$.fragment),ie(e,s)},m(o,u){w(o,e,u),H(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),ie(e,s=Me(i,[u&2&&o[1]]))},i(o){r||(b(n.$$.fragment,o),r=!0)},o(o){v(n.$$.fragment,o),r=!1},d(o){o&&E(e),V(n)}}}function xb(t){let e;return{c(){e=Z("Loading the file list. Please wait...")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function e2(t){let e,n,r,i;const s=[Jb,Xb],o=[];function u(l,a){return l[0].isSuccess?0:l[0].isLoading?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=S("nav"),r&&r.c(),M(e,"aria-label","Files"),M(e,"class","relative px-2 py-1 w-3/12 overflow-auto border-r border-gray-300")},m(l,a){w(l,e,a),~n&&o[n].m(e,null),i=!0},p(l,[a]){let f=n;n=u(l),n===f?~n&&o[n].p(l,a):(r&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~n?(r=o[n],r?r.p(l,a):(r=o[n]=s[n](l),r.c()),b(r,1),r.m(e,null)):r=null)},i(l){i||(b(r),i=!0)},o(l){v(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function df(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=df(n.content,e);if(r!==null)return r}}return null}function t2(t){var n,r,i;const e=[];for(;t&&t.getAttribute("role")==="treeitem";)e.splice(0,0,t.getAttribute("data-id")),t=(i=(r=(n=t.parentElement)==null?void 0:n.parentElement)==null?void 0:r.parentElement)==null?void 0:i.querySelector(":scope > [role=treeitem]");return e}function n2(t,e,n){let r,i;const s=wt(),o=Ao(),u=Ke([s,o],([p,g])=>p?{queryKey:["branches",p.id,"files/"],queryFn:en,enabled:g.isSuccess}:{queryKey:["branches","-","files/"],queryFn:en,enabled:!1}),l=Qn(u);x(t,l,p=>n(0,r=p));const a=Lb({defaultExpanded:["file-tree--1-0"]});Ct("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;x(t,f,p=>n(1,i=p));const m=c.subscribe(p=>{if(c!==null&&(p==null?void 0:p.getAttribute("data-file-path"))!==null&&r.isSuccess){const g=df(r.data,p==null?void 0:p.getAttribute("data-file-path"));ft.set(g)}else ft.set(null)});return rs(m),ns(()=>{let p;p=l.subscribe(g=>{if(g.isSuccess){const y=lf("path");y&&Wt().then(()=>{const _=document.querySelector('[data-file-path="'+y+'"]');_&&(d.set(t2(_)),c.set(_))}),p&&p()}})}),[r,i,l,f]}class r2 extends ve{constructor(e){super(),ye(this,e,n2,e2,fe,{})}}function Du(t,e,n){const r=t.slice();return r[15]=e[n],r}function Pu(t){let e,n=t[0].title+"",r,i;return{c(){e=Z(" ("),r=Z(n),i=Z(")")},m(s,o){w(s,e,o),w(s,r,o),w(s,i,o)},p(s,o){o&1&&n!==(n=s[0].title+"")&&qe(r,n)},d(s){s&&(E(e),E(r),E(i))}}}function i2(t){let e,n,r=t[0]!==null&&Pu(t);return{c(){e=Z("μEditor"),r&&r.c(),n=Fe()},m(i,s){w(i,e,s),r&&r.m(i,s),w(i,n,s)},p(i,s){i[0]!==null?r?r.p(i,s):(r=Pu(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&(E(e),E(n)),r&&r.d(i)}}}function s2(t){let e,n,r,i;return e=new Ne({props:{path:V1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New Branch"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function Lu(t){let e,n;return e=new Ht({props:{$$slots:{default:[o2]},$$scope:{ctx:t}}}),e.$on("click",t[11]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function o2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Import Branch"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function Iu(t){let e,n,r,i=t[2].update_from_default&&Mu(t),s=t[3].data.git.default_branch!==t[2].id&&Nu(t);return{c(){i&&i.c(),e=U(),s&&s.c(),n=Fe()},m(o,u){i&&i.m(o,u),w(o,e,u),s&&s.m(o,u),w(o,n,u),r=!0},p(o,u){o[2].update_from_default?i?(i.p(o,u),u&4&&b(i,1)):(i=Mu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(_e(),v(i,1,1,()=>{i=null}),ge()),o[3].data.git.default_branch!==o[2].id?s?(s.p(o,u),u&12&&b(s,1)):(s=Nu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(_e(),v(s,1,1,()=>{s=null}),ge())},i(o){r||(b(i),b(s),r=!0)},o(o){v(i),v(s),r=!1},d(o){o&&(E(e),E(n)),i&&i.d(o),s&&s.d(o)}}}function Mu(t){let e,n,r,i;return e=new Ht({props:{$$slots:{default:[l2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new as({}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&262152&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function l2(t){let e,n,r,i,s=t[3].data.git.default_branch+"",o,u;return e=new Ne({props:{path:U1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),i=Z("Merge from "),o=Z(s)},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&8)&&s!==(s=l[3].data.git.default_branch+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){v(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),V(e,l)}}}function Nu(t){let e,n,r,i;return e=new Ht({props:{$$slots:{default:[u2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new as({}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&262148&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function u2(t){let e,n,r,i,s=t[2].title+"",o,u;return e=new Ne({props:{path:B1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){H(e,l,a),w(l,n,a),w(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&4)&&s!==(s=l[2].title+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){v(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),V(e,l)}}}function Hu(t){let e,n;return e=new ep({props:{onValueChange:t[14],$$slots:{default:[d2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.onValueChange=r[14]),i&262161&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function a2(t){let e,n;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function f2(t){let e,n;return e=new Ne({props:{path:E1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function c2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[f2,a2],f=[];function c(d,m){return d[0]!==null&&d[0].id===d[15].id?0:1}return e=c(t),n=f[e]=a[e](t),{c(){n.c(),r=U(),i=S("span"),o=Z(s),u=U()},m(d,m){f[e].m(d,m),w(d,r,m),w(d,i,m),P(i,o),w(d,u,m),l=!0},p(d,m){let p=e;e=c(d),e!==p&&(_e(),v(f[p],1,1,()=>{f[p]=null}),ge(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||m&16)&&s!==(s=d[15].title+"")&&qe(o,s)},i(d){l||(b(n),l=!0)},o(d){v(n),l=!1},d(d){d&&(E(r),E(i),E(u)),f[e].d(d)}}}function Vu(t){let e,n;return e=new Km({props:{value:t[15].id,$$slots:{default:[c2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.value=r[15].id),i&262161&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function d2(t){let e,n,r=nn(t[4].data),i=[];for(let o=0;o<r.length;o+=1)i[o]=Vu(Du(t,r,o));const s=o=>v(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Fe()},m(o,u){for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(o,u);w(o,e,u),n=!0},p(o,u){if(u&17){r=nn(o[4].data);let l;for(l=0;l<r.length;l+=1){const a=Du(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Vu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(_e(),l=r.length;l<i.length;l+=1)s(l);ge()}},i(o){if(!n){for(let u=0;u<r.length;u+=1)b(i[u]);n=!0}},o(o){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)v(i[u]);n=!1},d(o){o&&E(e),fi(i,o)}}}function m2(t){let e,n,r,i,s,o,u,l;e=new Ht({props:{$$slots:{default:[s2]},$$scope:{ctx:t}}}),e.$on("click",t[10]);let a=t[1].isSuccess&&t[1].data.length>0&&Lu(t);i=new as({});let f=t[2]!==null&&t[3].isSuccess&&t[3].data.git.enabled&&Iu(t),c=t[4].isSuccess&&t[4].data.length>0&&Hu(t);return{c(){B(e.$$.fragment),n=U(),a&&a.c(),r=U(),B(i.$$.fragment),s=U(),f&&f.c(),o=U(),c&&c.c(),u=Fe()},m(d,m){H(e,d,m),w(d,n,m),a&&a.m(d,m),w(d,r,m),H(i,d,m),w(d,s,m),f&&f.m(d,m),w(d,o,m),c&&c.m(d,m),w(d,u,m),l=!0},p(d,m){const p={};m&262144&&(p.$$scope={dirty:m,ctx:d}),e.$set(p),d[1].isSuccess&&d[1].data.length>0?a?m&2&&b(a,1):(a=Lu(d),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(_e(),v(a,1,1,()=>{a=null}),ge()),d[2]!==null&&d[3].isSuccess&&d[3].data.git.enabled?f?(f.p(d,m),m&12&&b(f,1)):(f=Iu(d),f.c(),b(f,1),f.m(o.parentNode,o)):f&&(_e(),v(f,1,1,()=>{f=null}),ge()),d[4].isSuccess&&d[4].data.length>0?c?(c.p(d,m),m&16&&b(c,1)):(c=Hu(d),c.c(),b(c,1),c.m(u.parentNode,u)):c&&(_e(),v(c,1,1,()=>{c=null}),ge())},i(d){l||(b(e.$$.fragment,d),b(a),b(i.$$.fragment,d),b(f),b(c),l=!0)},o(d){v(e.$$.fragment,d),v(a),v(i.$$.fragment,d),v(f),v(c),l=!1},d(d){d&&(E(n),E(r),E(s),E(o),E(u)),V(e,d),a&&a.d(d),V(i,d),f&&f.d(d),c&&c.d(d)}}}function p2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[i2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[m2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262175&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function h2(t){let e,n;return e=new ds({props:{$$slots:{default:[p2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&262175&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function _2(t,e,n){let r,i,s,o,u;const l=Ci();x(t,l,h=>n(3,o=h));const a=To();x(t,a,h=>n(4,u=h));const f=$o();x(t,f,h=>n(1,i=h));const c=wt();x(t,c,h=>n(0,r=h));const d=Ke([a,c],([h,k])=>{if(h.isSuccess&&k!==null){for(const O of h.data)if(O.id===k.id)return O}return null});return x(t,d,h=>n(2,s=h)),[r,i,s,o,u,l,a,f,c,d,()=>{Ge.set(Ae.UEDITOR_NEW_BRANCH)},()=>{Ge.set(Ae.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{Ge.set(Ae.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(Ae.UEDITOR_DELETE_BRANCH)},h=>{if(u.isSuccess)for(let k of u.data)k.id===h&&c.set(k)}]}class g2 extends ve{constructor(e){super(),ye(this,e,_2,h2,fe,{})}}function b2(t){let e;return{c(){e=Z("File")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function y2(t){let e,n,r,i;return e=new Ne({props:{path:H1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Rename"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function v2(t){let e,n,r,i;return e=new Ne({props:{path:j1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Delete"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function k2(t){let e,n,r,i;return e=new Ht({props:{$$slots:{default:[y2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Ht({props:{$$slots:{default:[v2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function C2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[b2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[k2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&4&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function E2(t){let e,n;return e=new ds({props:{$$slots:{default:[C2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&4&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function w2(t){return[()=>{Ge.set(Ae.FILE_RENAME)},()=>{Ge.set(Ae.FILE_DELETE)}]}class O2 extends ve{constructor(e){super(),ye(this,e,w2,E2,fe,{})}}function A2(t){let e;return{c(){e=Z("Folder")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function T2(t){let e,n,r,i;return e=new Ne({props:{path:M1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New Folder"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function $2(t){let e,n,r,i;return e=new Ne({props:{path:S1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="New File"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function S2(t){let e,n,r,i;return e=new Ne({props:{path:D1,class:"w4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Upload Files"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function R2(t){let e,n,r,i;return e=new Ne({props:{path:P1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Rename"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function F2(t){let e,n,r,i;return e=new Ne({props:{path:N1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Delete"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function D2(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Ht({props:{$$slots:{default:[T2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Ht({props:{$$slots:{default:[$2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Ht({props:{$$slots:{default:[S2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new as({}),a=new Ht({props:{$$slots:{default:[R2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Ht({props:{$$slots:{default:[F2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment),i=U(),B(s.$$.fragment),o=U(),B(u.$$.fragment),l=U(),B(a.$$.fragment),f=U(),B(c.$$.fragment)},m(m,p){H(e,m,p),w(m,n,p),H(r,m,p),w(m,i,p),H(s,m,p),w(m,o,p),H(u,m,p),w(m,l,p),H(a,m,p),w(m,f,p),H(c,m,p),d=!0},p(m,p){const g={};p&256&&(g.$$scope={dirty:p,ctx:m}),e.$set(g);const y={};p&256&&(y.$$scope={dirty:p,ctx:m}),r.$set(y);const _={};p&256&&(_.$$scope={dirty:p,ctx:m}),s.$set(_);const h={};p&256&&(h.$$scope={dirty:p,ctx:m}),a.$set(h);const k={};p&256&&(k.$$scope={dirty:p,ctx:m}),c.$set(k)},i(m){d||(b(e.$$.fragment,m),b(r.$$.fragment,m),b(s.$$.fragment,m),b(u.$$.fragment,m),b(a.$$.fragment,m),b(c.$$.fragment,m),d=!0)},o(m){v(e.$$.fragment,m),v(r.$$.fragment,m),v(s.$$.fragment,m),v(u.$$.fragment,m),v(a.$$.fragment,m),v(c.$$.fragment,m),d=!1},d(m){m&&(E(n),E(i),E(o),E(l),E(f)),V(e,m),V(r,m),V(s,m),V(u,m),V(a,m),V(c,m)}}}function P2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[A2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[D2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&256&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&256&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function Bu(t){let e,n;return e=new uf({}),e.$on("close",t[7]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function L2(t){let e,n,r,i;e=new ds({props:{$$slots:{default:[P2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Bu(t);return{c(){B(e.$$.fragment),n=U(),s&&s.c(),r=Fe()},m(o,u){H(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&256&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[0]===o[1].Delete?s?(s.p(o,u),u&1&&b(s,1)):(s=Bu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(_e(),v(s,1,1,()=>{s=null}),ge())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){v(e.$$.fragment,o),v(s),i=!1},d(o){o&&(E(n),E(r)),V(e,o),s&&s.d(o)}}}function I2(t,e,n){var r=(c=>(c[c.Nothing=1]="Nothing",c[c.Rename=2]="Rename",c[c.Move=3]="Move",c[c.Copy=4]="Copy",c[c.Delete=5]="Delete",c))(r||{});let i=1;return[i,r,()=>{Ge.set(Ae.FOLDER_CREATE)},()=>{Ge.set(Ae.FILE_CREATE)},()=>{Ge.set(Ae.FILE_UPLOAD)},()=>{Ge.set(Ae.FOLDER_RENAME)},()=>{Ge.set(Ae.FOLDER_DELETE)},()=>{console.log("Resetting action"),n(0,i=r.Nothing)}]}class M2 extends ve{constructor(e){super(),ye(this,e,I2,L2,fe,{})}}function Uu(t){let e,n;return e=new ds({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&66&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function N2(t){var r;let e=((r=t[1].data)==null?void 0:r.name)+"",n;return{c(){n=Z(e)},m(i,s){w(i,n,s)},p(i,s){var o;s&2&&e!==(e=((o=i[1].data)==null?void 0:o.name)+"")&&qe(n,e)},d(i){i&&E(n)}}}function H2(t){let e,n,r,i;return e=new Ne({props:{path:A1,class:"w-4 h-4"}}),{c(){B(e.$$.fragment),n=U(),r=S("span"),r.textContent="Logout"},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p:ce,i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function V2(t){let e,n;return e=new Ht({props:{$$slots:{default:[H2]},$$scope:{ctx:t}}}),e.$on("click",t[4]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function B2(t){let e,n,r,i;return e=new ms({props:{$$slots:{default:[N2]},$$scope:{ctx:t}}}),r=new fs({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&66&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&64&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function U2(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&Uu(t);return{c(){r&&r.c(),e=Fe()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,[s]){i[0].isSuccess&&i[0].data.auth.provider!=="no-auth"?r?(r.p(i,s),s&1&&b(r,1)):(r=Uu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(_e(),v(r,1,1,()=>{r=null}),ge())},i(i){n||(b(r),n=!0)},o(i){v(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function K2(t,e,n){let r,i;const s=Ao();x(t,s,a=>n(1,i=a));const o=Ci();x(t,o,a=>n(0,r=a));const u=Et();async function l(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(u.cancelQueries(),u.invalidateQueries({queryKey:["auth"]}))}return[r,i,s,o,l]}class j2 extends ve{constructor(e){super(),ye(this,e,K2,U2,fe,{})}}function Ku(t){let e,n,r,i;const s=[W2,q2],o=[];function u(l,a){return l[0].type==="file"?0:l[0].type==="folder"?1:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Fe()},m(l,a){~e&&o[e].m(l,a),w(l,r,a),i=!0},p(l,a){let f=e;e=u(l),e!==f&&(n&&(_e(),v(o[f],1,1,()=>{o[f]=null}),ge()),~e?(n=o[e],n||(n=o[e]=s[e](l),n.c()),b(n,1),n.m(r.parentNode,r)):n=null)},i(l){i||(b(n),i=!0)},o(l){v(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function q2(t){let e,n;return e=new M2({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function W2(t){let e,n;return e=new O2({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function Q2(t){let e,n,r,i,s,o,u;e=new g2({});let l=t[0]&&Ku(t);return o=new j2({}),{c(){B(e.$$.fragment),n=U(),l&&l.c(),r=U(),i=S("span"),s=U(),B(o.$$.fragment),M(i,"class","flex-1")},m(a,f){H(e,a,f),w(a,n,f),l&&l.m(a,f),w(a,r,f),w(a,i,f),w(a,s,f),H(o,a,f),u=!0},p(a,f){a[0]?l?(l.p(a,f),f&1&&b(l,1)):(l=Ku(a),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(_e(),v(l,1,1,()=>{l=null}),ge())},i(a){u||(b(e.$$.fragment,a),b(l),b(o.$$.fragment,a),u=!0)},o(a){v(e.$$.fragment,a),v(l),v(o.$$.fragment,a),u=!1},d(a){a&&(E(n),E(r),E(i),E(s)),V(e,a),l&&l.d(a),V(o,a)}}}function z2(t){let e,n;return e=new wh({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[Q2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&3&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function G2(t,e,n){let r;return x(t,ft,i=>n(0,r=i)),[r]}class Y2 extends ve{constructor(e){super(),ye(this,e,G2,z2,fe,{})}}function Z2(t){let e,n;return e=new Ne({props:{path:O1}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function X2(t){let e,n;return e=new k1({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[1]?null:"true",$$slots:{default:[Z2]},$$scope:{ctx:t}}}),e.$on("click",t[3]),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&3&&(s["aria-disabled"]=r[0]!==null&&r[1]?null:"true"),i&128&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function J2(t){let e,n;return e=new p1({props:{class:"border-b border-gray-300",$$slots:{default:[X2]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&131&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function x2(t,e,n){let r,i,s,o;x(t,ft,f=>n(4,r=f)),x(t,Y1,f=>n(0,i=f)),x(t,iu,f=>n(1,o=f));const u=Et(),l=wt();x(t,l,f=>n(5,s=f));function a(){r!==null&&i!==null&&f_({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){iu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&u.invalidateQueries({queryKey:["configs"]})}})}return[i,o,l,a]}class e0 extends ve{constructor(e){super(),ye(this,e,x2,J2,fe,{})}}function t0(t){let e;return{c(){e=S("div"),M(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function n0(t){let e;return{c(){e=S("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',M(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function r0(t){let e,n,r,i,s;return n=new r2({}),i=new yb({}),{c(){e=S("div"),B(n.$$.fragment),r=U(),B(i.$$.fragment),M(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),H(n,e,null),P(e,r),H(i,e,null),s=!0},i(o){s||(b(n.$$.fragment,o),b(i.$$.fragment,o),s=!0)},o(o){v(n.$$.fragment,o),v(i.$$.fragment,o),s=!1},d(o){o&&E(e),V(n),V(i)}}}function ju(t){let e=t[4].fullpath+"",n;return{c(){n=Z(e)},m(r,i){w(r,n,i)},p(r,i){i&16&&e!==(e=r[4].fullpath+"")&&qe(n,e)},d(r){r&&E(n)}}}function i0(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y,_,h,k,O,$;document.title=e=t[0],o=new Y2({}),l=new e0({});const C=[r0,n0,t0],D=[];function R(N,F){return N[1]!==null&&N[3].isSuccess?0:N[1]===null?1:2}f=R(t),c=D[f]=C[f](t);let K=t[4]&&ju(t);return h=new p_({}),O=new ab({}),{c(){n=S("link"),i=U(),s=S("main"),B(o.$$.fragment),u=U(),B(l.$$.fragment),a=U(),c.c(),d=U(),m=S("footer"),p=S("div"),K&&K.c(),g=U(),y=S("div"),_=U(),B(h.$$.fragment),k=U(),B(O.$$.fragment),M(n,"rel","stylesheet"),M(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),M(p,"class","font-mono font-bold"),M(y,"class","flex-1"),M(m,"class","flex flex-row px-2 py-1 border-t border-slate-300 text-sm"),M(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(N,F){P(document.head,n),w(N,i,F),w(N,s,F),H(o,s,null),P(s,u),H(l,s,null),P(s,a),D[f].m(s,null),P(s,d),P(s,m),P(m,p),K&&K.m(p,null),P(m,g),P(m,y),P(m,_),H(h,m,null),w(N,k,F),H(O,N,F),$=!0},p(N,[F]){(!$||F&1)&&e!==(e=N[0])&&(document.title=e),(!$||F&6&&r!==(r="/api/branches/"+(N[1]!==null?N[1].id:"-")+"/configs/ui-stylesheet?timestamp="+N[2]))&&M(n,"href",r);let I=f;f=R(N),f!==I&&(_e(),v(D[I],1,1,()=>{D[I]=null}),ge(),c=D[f],c||(c=D[f]=C[f](N),c.c()),b(c,1),c.m(s,d)),N[4]?K?K.p(N,F):(K=ju(N),K.c(),K.m(p,null)):K&&(K.d(1),K=null)},i(N){$||(b(o.$$.fragment,N),b(l.$$.fragment,N),b(c),b(h.$$.fragment,N),b(O.$$.fragment,N),$=!0)},o(N){v(o.$$.fragment,N),v(l.$$.fragment,N),v(c),v(h.$$.fragment,N),v(O.$$.fragment,N),$=!1},d(N){N&&(E(i),E(s),E(k)),E(n),V(o),V(l),D[f].d(),K&&K.d(),V(h),V(O,N)}}}function s0(t,e,n){let r,i,s,o,u;x(t,ft,m=>n(4,u=m));const l=pt("uEditionConfig"),a=pt("uEditorConfig");x(t,a,m=>n(3,o=m));const f=pt("currentBranch");x(t,f,m=>n(1,i=m));const c=Ke(l,m=>m.isSuccess&&m.data.languages&&m.data.languages.length>0&&m.data.languages[0].code&&m.data.title&&m.data.title[m.data.languages[0].code]?"μEditor - "+m.data.title[m.data.languages[0].code]:"μEditor");x(t,c,m=>n(0,r=m));const d=Ke(l,m=>new Date().getTime());return x(t,d,m=>n(2,s=m)),[r,i,s,o,u,a,f,c,d]}class o0 extends ve{constructor(e){super(),ye(this,e,s0,i0,fe,{})}}function Fo(t,{delay:e=0,duration:n=400,easing:r=ts}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}function qu(t){let e;const n=t[2].default,r=de(n,t,t[3],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8)&&pe(r,n,i,i[3],e?me(n,i[3],s,null):he(i[3]),null)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function l0(t){let e;return{c(){e=Z("μEditor not ready")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function u0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[l0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
17
- logs to determine what the issue is.</p>`,M(r,"data-dialog-content-area","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function a0(t){let e,n,r,i;return e=new vi({props:{transition:Fo}}),r=new yi({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden",$$slots:{default:[u0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function f0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[a0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&8&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function c0(t){let e,n,r,i=t[0].isSuccess&&qu(t);return n=new si({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[f0]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=U(),B(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),H(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=qu(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(_e(),v(i,1,1,()=>{i=null}),ge());const u={};o&1&&(u.open=s[0].isSuccess&&!s[0].data.ready),o&8&&(u.$$scope={dirty:o,ctx:s}),n.$set(u)},i(s){r||(b(i),b(n.$$.fragment,s),r=!0)},o(s){v(i),v(n.$$.fragment,s),r=!1},d(s){s&&E(e),i&&i.d(s),V(n,s)}}}function d0(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Qn({queryKey:[""],queryFn:en,refetchInterval:6e4});return x(t,o,u=>n(0,r=u)),Ct("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class m0 extends ve{constructor(e){super(),ye(this,e,d0,c0,fe,{})}}function p0(t){let e;return{c(){e=Z("Authenticating")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function h0(t){let e,n,r,i;return e=new Tt({props:{$$slots:{default:[p0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),r=S("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",M(r,"data-dialog-content-area","")},m(s,o){H(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),V(e,s)}}}function _0(t){let e,n,r,i;return e=new vi({props:{transition:Fo,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[h0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function g0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[_0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4096&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function b0(t){let e;return{c(){e=Z("Login")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function y0(t){let e;return{c(){e=S("div"),e.innerHTML='<p>Click on the link below to log in via GitHub.</p> <div class="my-8 text-center"><a href="/api/auth/oidc/login" data-button="">Log in via GitHub</a></div>',M(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:ce,d(n){n&&E(e)}}}function v0(t){let e,n,r,i,s,o,u,l,a,f,c,d,m,p,g,y,_=t[4].isError&&Wu(),h=t[4].isError&&Qu();function k(C,D){return C[4].isPending?C0:k0}let O=k(t),$=O(t);return{c(){e=S("form"),n=S("label"),r=S("span"),r.textContent="E-Mail",i=U(),s=S("input"),o=U(),_&&_.c(),u=U(),l=S("label"),a=S("span"),a.textContent="Password",f=U(),c=S("input"),d=U(),h&&h.c(),m=U(),p=S("div"),$.c(),M(r,"data-form-field-label",""),M(s,"type","text"),M(s,"data-form-field-text",""),M(a,"data-form-field-label",""),M(c,"type","password"),M(c,"data-form-field-text",""),M(p,"data-dialog-buttons",""),M(e,"data-dialog-content-area","")},m(C,D){w(C,e,D),P(e,n),P(n,r),P(n,i),P(n,s),it(s,t[0]),P(n,o),_&&_.m(n,null),P(e,u),P(e,l),P(l,a),P(l,f),P(l,c),it(c,t[1]),P(l,d),h&&h.m(l,null),P(e,m),P(e,p),$.m(p,null),g||(y=[G(s,"input",t[9]),G(c,"input",t[10]),G(e,"submit",t[11])],g=!0)},p(C,D){D&1&&s.value!==C[0]&&it(s,C[0]),C[4].isError?_||(_=Wu(),_.c(),_.m(n,null)):_&&(_.d(1),_=null),D&2&&c.value!==C[1]&&it(c,C[1]),C[4].isError?h||(h=Qu(),h.c(),h.m(l,null)):h&&(h.d(1),h=null),O!==(O=k(C))&&($.d(1),$=O(C),$&&($.c(),$.m(p,null)))},d(C){C&&E(e),_&&_.d(),h&&h.d(),$.d(),g=!1,Te(y)}}}function Wu(t){let e;return{c(){e=S("span"),e.textContent="Incorred e-mail address or password",M(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qu(t){let e;return{c(){e=S("span"),e.textContent="Incorred e-mail address or password",M(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function k0(t){let e;return{c(){e=S("button"),e.textContent="Login",M(e,"type","submit"),M(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function C0(t){let e;return{c(){e=S("span"),e.textContent="Logging in...",M(e,"data-button",""),M(e,"class","inline-flex")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function E0(t){let e,n,r,i;e=new Tt({props:{$$slots:{default:[b0]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[3].data)==null?void 0:f.auth.provider)==="email-password")return v0;if(((c=l[3].data)==null?void 0:c.auth.provider)==="github")return y0}let o=s(t),u=o&&o(t);return{c(){B(e.$$.fragment),n=U(),u&&u.c(),r=Fe()},m(l,a){H(e,l,a),w(l,n,a),u&&u.m(l,a),w(l,r,a),i=!0},p(l,a){const f={};a&4096&&(f.$$scope={dirty:a,ctx:l}),e.$set(f),o===(o=s(l))&&u?u.p(l,a):(u&&u.d(1),u=o&&o(l),u&&(u.c(),u.m(r.parentNode,r)))},i(l){i||(b(e.$$.fragment,l),i=!0)},o(l){v(e.$$.fragment,l),i=!1},d(l){l&&(E(n),E(r)),V(e,l),u&&u.d(l)}}}function w0(t){let e,n,r,i;return e=new vi({props:{transition:Fo,class:"z-40"}}),r=new yi({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[E0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function O0(t){let e,n,r,i;return e=new ki({props:{class:"hidden"}}),r=new bi({props:{$$slots:{default:[w0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),n=U(),B(r.$$.fragment)},m(s,o){H(e,s,o),w(s,n,o),H(r,s,o),i=!0},p(s,o){const u={};o&4123&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){v(e.$$.fragment,s),v(r.$$.fragment,s),i=!1},d(s){s&&E(n),V(e,s),V(r,s)}}}function A0(t){let e,n,r,i,s;const o=t[8].default,u=de(o,t,t[12],null);return n=new si({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[g0]},$$scope:{ctx:t}}}),i=new si({props:{open:t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[O0]},$$scope:{ctx:t}}}),{c(){u&&u.c(),e=U(),B(n.$$.fragment),r=U(),B(i.$$.fragment)},m(l,a){u&&u.m(l,a),w(l,e,a),H(n,l,a),w(l,r,a),H(i,l,a),s=!0},p(l,[a]){u&&u.p&&(!s||a&4096)&&pe(u,o,l,l[12],s?me(o,l[12],a,null):he(l[12]),null);const f={};a&4&&(f.open=l[2]==="pending"),a&4096&&(f.$$scope={dirty:a,ctx:l}),n.$set(f);const c={};a&4&&(c.open=l[2]==="error"),a&4123&&(c.$$scope={dirty:a,ctx:l}),i.$set(c)},i(l){s||(b(u,l),b(n.$$.fragment,l),b(i.$$.fragment,l),s=!0)},o(l){v(u,l),v(n.$$.fragment,l),v(i.$$.fragment,l),s=!1},d(l){l&&(E(e),E(r)),u&&u.d(l),V(n,l),V(i,l)}}}function T0(t,e,n){let r,i,s,{$$slots:o={},$$scope:u}=e;const l=Et(),a=Ci();x(t,a,h=>n(3,i=h));const f=Qn({queryKey:["auth","user"],queryFn:en,retry:!1,refetchInterval:2e4});Ct("currentUser",f);const c=Ke([a,f],([h,k])=>h.isSuccess?k.isSuccess?"authenticated":k.isError?h.data.auth.provider==="no-auth"||h.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(O=>{O.ok&&l.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":k.status:h.status);x(t,c,h=>n(2,r=h));let d="",m="";const p=di({mutationFn:async([h,k])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:h,password:k})})).ok)l.invalidateQueries({queryKey:["auth"]}),l.invalidateQueries({queryKey:["branches"]}),n(0,d=""),n(1,m="");else throw"Authentication failed"}});x(t,p,h=>n(4,s=h));function g(){d=this.value,n(0,d)}function y(){m=this.value,n(1,m)}const _=h=>{h.preventDefault(),s.isPending||s.mutate([d,m])};return t.$$set=h=>{"$$scope"in h&&n(12,u=h.$$scope)},[d,m,r,i,s,a,c,p,o,g,y,_,u]}class $0 extends ve{constructor(e){super(),ye(this,e,T0,A0,fe,{})}}function S0(t){let e;const n=t[1].default,r=de(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&pe(r,n,i,i[0],e?me(n,i[0],s,null):he(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function R0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=lf("branch"),o=Ci(),u=Ao(),l=Ke([o,u],([y,_])=>({queryKey:["branches"],queryFn:en,refetchInterval:6e4,enabled:y.isSuccess&&y.data.ready&&_.isSuccess})),a=Qn(l);Ct("branches",a);const f=Ke([o,u],([y,_])=>({queryKey:["branches","?category=remote"],queryFn:en,refetchInterval:6e4,enabled:y.isSuccess&&y.data.ready&&y.data.git.enabled&&_.isSuccess})),c=Qn(f);Ct("remoteBranches",c);const d=De(null);Ct("currentBranch",d);const m=o.subscribe(y=>{y.isSuccess&&y.data.ready&&!y.data.git.enabled&&d.set({id:"-",nogit:!0,title:"All files"})}),p=d.subscribe(y=>{y!==null?of("branch",y.id):G1("branch")}),g=a.subscribe(y=>{if(y.isSuccess){for(let _ of y.data)_.id===s&&d.set(_);g()}});return rs(()=>{p(),m()}),t.$$set=y=>{"$$scope"in y&&n(0,i=y.$$scope)},[i,r]}class F0 extends ve{constructor(e){super(),ye(this,e,R0,S0,fe,{})}}function D0(t){let e;const n=t[1].default,r=de(n,t,t[0],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&1)&&pe(r,n,i,i[0],e?me(n,i[0],s,null):he(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function P0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=wt(),o=Ke(s,f=>f!==null?{queryKey:["branches",f.id,"configs","uedition"],queryFn:en}:{queryKey:["branches","-","configs","uedition"],queryFn:en,enabled:f!==null}),u=Qn(o);Ct("uEditionConfig",u);const l=Ke(s,f=>f!==null?{queryKey:["branches",f.id,"configs","ueditor"],queryFn:en}:{queryKey:["branches","-","configs","ueditor"],queryFn:en,enabled:!1}),a=Qn(l);return Ct("uEditorConfig",a),t.$$set=f=>{"$$scope"in f&&n(0,i=f.$$scope)},[i,r]}class L0 extends ve{constructor(e){super(),ye(this,e,P0,D0,fe,{})}}function I0(t){let e,n;return e=new o0({}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function M0(t){let e,n;return e=new L0({props:{$$slots:{default:[I0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function N0(t){let e,n;return e=new F0({props:{$$slots:{default:[M0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function H0(t){let e,n;return e=new $0({props:{$$slots:{default:[N0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function V0(t){let e,n;return e=new m0({props:{$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function B0(t){let e,n;return e=new oc({props:{client:t[0],$$slots:{default:[V0]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(r,i){H(e,r,i),n=!0},p(r,[i]){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){v(e.$$.fragment,r),n=!1},d(r){V(e,r)}}}function U0(t){return[new ka]}class K0 extends ve{constructor(e){super(),ye(this,e,U0,B0,fe,{})}}new K0({target:document.getElementById("app")});export{Ke as $,P1 as A,N1 as B,Ge as C,Ae as D,Ce as E,Fe as F,ce as G,Sf as H,Ne as I,Y1 as J,Et as K,wt as L,f_ as M,iu as N,Bt as O,Vt as P,Zb as Q,J as R,ve as S,X0 as T,mi as U,x0 as V,Pe as W,ke as X,Xe as Y,De as Z,fr as _,S1 as a,km as a$,Pt as a0,Rr as a1,Xn as a2,xr as a3,Sc as a4,Qi as a5,ar as a6,ac as a7,ny as a8,Gr as a9,ze as aA,Z0 as aB,gt as aC,ty as aD,ry as aE,ii as aF,hi as aG,Ct as aH,_i as aI,pt as aJ,ef as aK,de as aL,pe as aM,he as aN,me as aO,je as aP,Pn as aQ,ne as aR,yt as aS,Oe as aT,ie as aU,Be as aV,Me as aW,Dn as aX,at as aY,Fn as aZ,Tn as a_,rt as aa,ae as ab,ey as ac,Wt as ad,lc as ae,Ys as af,ln as ag,Q0 as ah,z0 as ai,Y0 as aj,G0 as ak,ni as al,Dt as am,xe as an,es as ao,Ar as ap,$r as aq,pc as ar,iy as as,Wo as at,Jr as au,mt as av,Gs as aw,gn as ax,_o as ay,J0 as az,D1 as b,nn as b0,fi as b1,ly as b2,oy as b3,Lb as b4,p1 as b5,k1 as b6,ay as b7,uy as b8,fy as b9,sy as ba,Ib as bb,cy as bc,Io as bd,it as be,H1 as bf,si as bg,ki as bh,bi,vi as bj,yi as bk,Tt as bl,It as bm,q0 as bn,U as c,B as d,S as e,M as f,w as g,P as h,ye as i,H as j,qe as k,G as l,M1 as m,b as n,_e as o,v as p,ge as q,E as r,fe as s,Z as t,V as u,Te as v,x as w,ft as x,ns as y,rs as z};