uEdition-Editor 2.0.0b10__py3-none-any.whl → 2.0.0b11__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,18 +1,20 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-DaVvZ_iF.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-Cl1q8UQU.js"])))=>i.map(i=>d[i]);
2
- var Pf=Object.defineProperty;var Ko=t=>{throw TypeError(t)};var Ff=(t,e,n)=>e in t?Pf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ts=(t,e,n)=>Ff(t,typeof e!="symbol"?e+"":e,n),$s=(t,e,n)=>e.has(t)||Ko("Cannot "+n);var S=(t,e,n)=>($s(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?Ko("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),se=(t,e,n,r)=>($s(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Se=(t,e,n)=>($s(t,e,"access private method"),n);var Fi=(t,e,n,r)=>({set _(i){se(t,e,i,n)},get _(){return S(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 fs=t=>t;function ie(t,e){for(const n in e)t[n]=e[n];return t}function ga(t){return t()}function qo(){return Object.create(null)}function Te(t){t.forEach(ga)}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 Li;function k0(t,e){return t===e?!0:(Li||(Li=document.createElement("a")),Li.href=e,t===Li.href)}function Lf(t){return Object.keys(t).length===0}function bo(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 Rr(t){let e;return bo(t,n=>e=n)(),e}function J(t,e,n){t.$$.on_destroy.push(bo(e,n))}function pe(t,e,n,r){if(t){const i=ba(t,e,n,r);return t[0](i)}}function ba(t,e,n,r){return t[1]&&r?ie(n.ctx.slice(),t[1](r(e))):n.ctx}function he(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 _e(t,e,n,r,i,s){if(i){const o=ba(e,n,r,s);t.p(o,i)}}function ge(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 vt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Ke(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 Ue(t){return t&&Zn(t.destroy)?t.destroy:ce}const ya=typeof window<"u";let yo=ya?()=>window.performance.now():()=>Date.now(),vo=ya?t=>requestAnimationFrame(t):ce;const lr=new Set;function va(t){lr.forEach(e=>{e.c(t)||(lr.delete(e),e.f())}),lr.size!==0&&vo(va)}function ko(t){let e;return lr.size===0&&vo(va),{promise:new Promise(n=>{lr.add(e={c:t,f:n})}),abort(){lr.delete(e)}}}function P(t,e){t.appendChild(e)}function ka(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function If(t){const e=D("style");return e.textContent="/* empty */",Mf(ka(t),e),e.sheet}function Mf(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 yi(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function Ks(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function K(){return Z(" ")}function $e(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function I(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Nf=["width","height"];function le(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&&Nf.indexOf(r)===-1?t[r]=e[r]:I(t,r,e[r])}function Hf(t,e){Object.keys(e).forEach(n=>{Vf(t,n,e[n])})}function Vf(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:I(t,e,n)}function zi(t){return/-/.test(t)?Hf:le}function Bf(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 Wo(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 Uf(t){const e=t.querySelector(":checked");return e&&e.__value}function Ca(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Qo(t,e){return new t(e)}const Gi=new Map;let Yi=0;function jf(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Kf(t,e){const n={stylesheet:If(e),rules:{}};return Gi.set(t,n),n}function Zi(t,e,n,r,i,s,o,u=0){const l=16.666/r;let a=`{
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-843IlM1G.js","assets/index-Vcq4gwWv.js","assets/CodeMirrorEditor-ddcHt3UE.css","assets/TeiEditor-79-RF-kq.js"])))=>i.map(i=>d[i]);
2
+ var Lf=Object.defineProperty;var Ko=t=>{throw TypeError(t)};var If=(t,e,n)=>e in t?Lf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $s=(t,e,n)=>If(t,typeof e!="symbol"?e+"":e,n),Ts=(t,e,n)=>e.has(t)||Ko("Cannot "+n);var S=(t,e,n)=>(Ts(t,e,"read from private field"),n?n.call(t):e.get(t)),be=(t,e,n)=>e.has(t)?Ko("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),se=(t,e,n,r)=>(Ts(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Se=(t,e,n)=>(Ts(t,e,"access private method"),n);var Fi=(t,e,n,r)=>({set _(i){se(t,e,i,n)},get _(){return S(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 fs=t=>t;function ie(t,e){for(const n in e)t[n]=e[n];return t}function ya(t){return t()}function qo(){return Object.create(null)}function Te(t){t.forEach(ya)}function Xn(t){return typeof t=="function"}function fe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Li;function $0(t,e){return t===e?!0:(Li||(Li=document.createElement("a")),Li.href=e,t===Li.href)}function Mf(t){return Object.keys(t).length===0}function bo(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 Lr(t){let e;return bo(t,n=>e=n)(),e}function J(t,e,n){t.$$.on_destroy.push(bo(e,n))}function pe(t,e,n,r){if(t){const i=va(t,e,n,r);return t[0](i)}}function va(t,e,n,r){return t[1]&&r?ie(n.ctx.slice(),t[1](r(e))):n.ctx}function he(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 _e(t,e,n,r,i,s){if(i){const o=va(e,n,r,s);t.p(o,i)}}function ge(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 vt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Ke(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 Ue(t){return t&&Xn(t.destroy)?t.destroy:ce}const ka=typeof window<"u";let yo=ka?()=>window.performance.now():()=>Date.now(),vo=ka?t=>requestAnimationFrame(t):ce;const cr=new Set;function Ca(t){cr.forEach(e=>{e.c(t)||(cr.delete(e),e.f())}),cr.size!==0&&vo(Ca)}function ko(t){let e;return cr.size===0&&vo(Ca),{promise:new Promise(n=>{cr.add(e={c:t,f:n})}),abort(){cr.delete(e)}}}function P(t,e){t.appendChild(e)}function Ea(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Nf(t){const e=D("style");return e.textContent="/* empty */",Hf(Ea(t),e),e.sheet}function Hf(t,e){return P(t.head||t,e),e.sheet}function w(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function yi(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function Ks(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function K(){return Z(" ")}function Ae(){return Z("")}function G(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function H(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Vf=["width","height"];function le(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&&Vf.indexOf(r)===-1?t[r]=e[r]:H(t,r,e[r])}function Bf(t,e){Object.keys(e).forEach(n=>{Uf(t,n,e[n])})}function Uf(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:H(t,e,n)}function zi(t){return/-/.test(t)?Bf:le}function jf(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 Wo(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 Kf(t){const e=t.querySelector(":checked");return e&&e.__value}function wa(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}function Qo(t,e){return new t(e)}const Gi=new Map;let Yi=0;function qf(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Wf(t,e){const n={stylesheet:Nf(e),rules:{}};return Gi.set(t,n),n}function Zi(t,e,n,r,i,s,o,u=0){const l=16.666/r;let a=`{
3
3
  `;for(let v=0;v<=1;v+=l){const g=e+(n-e)*s(v);a+=v*100+`%{${o(g,1-g)}}
4
4
  `}const f=a+`100% {${o(n,1-n)}}
5
- }`,c=`__svelte_${jf(f)}_${u}`,d=ka(t),{stylesheet:p,rules:m}=Gi.get(d)||Kf(d,t);m[c]||(m[c]=!0,p.insertRule(`@keyframes ${c} ${f}`,p.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Yi+=1,c}function Xi(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(", "),Yi-=i,Yi||qf())}function qf(){vo(()=>{Yi||(Gi.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&E(e)}),Gi.clear())})}let oi;function ri(t){oi=t}function vi(){if(!oi)throw new Error("Function called outside component initialization");return oi}function cs(t){vi().$$.on_mount.push(t)}function ds(t){vi().$$.on_destroy.push(t)}function Wf(){const t=vi();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=Ca(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function ft(t,e){return vi().$$.context.set(t,e),e}function st(t){return vi().$$.context.get(t)}function Oe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const or=[],Ce=[];let ur=[];const qs=[],Ea=Promise.resolve();let Ws=!1;function wa(){Ws||(Ws=!0,Ea.then(Oa))}function qt(){return wa(),Ea}function ct(t){ur.push(t)}function Vt(t){qs.push(t)}const Ss=new Set;let tr=0;function Oa(){if(tr!==0)return;const t=oi;do{try{for(;tr<or.length;){const e=or[tr];tr++,ri(e),Qf(e.$$)}}catch(e){throw or.length=0,tr=0,e}for(ri(null),or.length=0,tr=0;Ce.length;)Ce.pop()();for(let e=0;e<ur.length;e+=1){const n=ur[e];Ss.has(n)||(Ss.add(n),n())}ur.length=0}while(or.length);for(;qs.length;)qs.pop()();Ws=!1,Ss.clear(),ri(t)}function Qf(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(ct)}}function zf(t){const e=[],n=[];ur.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),ur=e}let zr;function Co(){return zr||(zr=Promise.resolve(),zr.then(()=>{zr=null})),zr}function Wn(t,e,n){t.dispatchEvent(Ca(`${e?"intro":"outro"}${n}`))}const qi=new Set;let xt;function de(){xt={r:0,c:[],p:xt}}function me(){xt.r||Te(xt.c),xt=xt.p}function b(t,e){t&&t.i&&(qi.delete(t),t.i(e))}function y(t,e,n,r){if(t&&t.o){if(qi.has(t))return;qi.add(t),xt.c.push(()=>{qi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const Eo={duration:0};function Rn(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,u,l=0;function a(){o&&Xi(t,o)}function f(){const{delay:d=0,duration:p=300,easing:m=fs,tick:h=ce,css:v}=i||Eo;v&&(o=Zi(t,0,1,p,d,m,v,l++)),h(0,1);const g=yo()+d,_=g+p;u&&u.abort(),s=!0,ct(()=>Wn(t,!0,"start")),u=ko(C=>{if(s){if(C>=_)return h(1,0),Wn(t,!0,"end"),a(),s=!1;if(C>=g){const A=m((C-g)/p);h(A,1-A)}}return s})}let c=!1;return{start(){c||(c=!0,Xi(t),Zn(i)?(i=i(r),Co().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Pn(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=fs,tick:p=ce,css:m}=i||Eo;m&&(o=Zi(t,1,0,c,f,d,m));const h=yo()+f,v=h+c;ct(()=>Wn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ko(g=>{if(s){if(g>=v)return p(0,1),Wn(t,!1,"end"),--u.r||Te(u.c),!1;if(g>=h){const _=d((g-h)/c);p(1-_,_)}}return s})}return Zn(i)?Co().then(()=>{i=i(r),a()}):a(),{end(f){f&&"inert"in t&&(t.inert=l),f&&i.tick&&i.tick(1,0),s&&(o&&Xi(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&&Xi(t,a)}function d(m,h){const v=m.b-o;return h*=Math.abs(v),{a:o,b:m.b,d:v,duration:h,start:m.start,end:m.start+h,group:m.group}}function p(m){const{delay:h=0,duration:v=300,easing:g=fs,tick:_=ce,css:C}=s||Eo,A={start:yo()+h,b:m};m||(A.group=xt,xt.r+=1),"inert"in t&&(m?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=A:(C&&(c(),a=Zi(t,o,m,v,h,g,C)),m&&_(0,1),u=d(A,v),ct(()=>Wn(t,m,"start")),ko(T=>{if(l&&T>l.start&&(u=d(l,v),l=null,Wn(t,u.b,"start"),C&&(c(),a=Zi(t,o,u.b,u.duration,0,g,s.css))),u){if(T>=u.end)_(o=u.b,1-o),Wn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if(T>=u.start){const k=T-u.start;o=u.a+u.d*g(k/u.duration),_(o,1-o)}}return!!(u||l)}))}return{run(m){Zn(s)?Co().then(()=>{s=s({direction:m?"in":"out"}),p(m)}):p(m)},end(){c(),u=l=null}}}function tn(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 H(t){t&&t.c()}function M(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),ct(()=>{const s=t.$$.on_mount.map(ga).filter(Zn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(ct)}function N(t,e){const n=t.$$;n.fragment!==null&&(zf(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Gf(t,e){t.$$.dirty[0]===-1&&(or.push(t),wa(),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=oi;ri(t);const a=t.$$={fragment:null,ctx:[],props:s,update:ce,not_equal:i,bound:qo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:qo(),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,...p)=>{const m=p.length?p[0]:d;return a.ctx&&i(a.ctx[c],a.ctx[c]=m)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](m),f&&Gf(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=Bf(e.target);a.fragment&&a.fragment.l(c),c.forEach(E)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),M(t,e.target,e.anchor),Oa()}ri(l)}class ve{constructor(){Ts(this,"$$");Ts(this,"$$set")}$destroy(){N(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&&!Lf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Yf="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Yf);var Pr=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(){}},Tr=typeof window>"u"||"Deno"in globalThis;function Ht(){}function Zf(t,e){return typeof t=="function"?t(e):t}function Qs(t){return typeof t=="number"&&t>=0&&t!==1/0}function Aa(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ar(t,e){return typeof t=="function"?t(e):t}function Kt(t,e){return typeof t=="function"?t(e):t}function zo(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==wo(o,e.options))return!1}else if(!li(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 Go(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Qn(e.options.mutationKey)!==Qn(s))return!1}else if(!li(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function wo(t,e){return((e==null?void 0:e.queryKeyHashFn)||Qn)(t)}function Qn(t){return JSON.stringify(t,(e,n)=>zs(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function li(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!li(t[n],e[n])):!1}function Ta(t,e){if(t===e)return t;const n=Yo(t)&&Yo(e);if(n||zs(t)&&zs(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]=Ta(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function Ji(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 Yo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zs(t){if(!Zo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Zo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Zo(t){return Object.prototype.toString.call(t)==="[object Object]"}function Xf(t){return new Promise(e=>{setTimeout(e,t)})}function Gs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Ta(t,e):e}function Jf(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function xf(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Oo=Symbol();function $a(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Oo?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hn,bn,pr,la,ec=(la=class extends Pr{constructor(){super();be(this,Hn);be(this,bn);be(this,pr);se(this,pr,e=>{if(!Tr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,bn)||this.setEventListener(S(this,pr))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,bn))==null||e.call(this),se(this,bn,void 0))}setEventListener(e){var n;se(this,pr,e),(n=S(this,bn))==null||n.call(this),se(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){S(this,Hn)!==e&&(se(this,Hn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof S(this,Hn)=="boolean"?S(this,Hn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hn=new WeakMap,bn=new WeakMap,pr=new WeakMap,la),Ao=new ec,hr,yn,_r,ua,tc=(ua=class extends Pr{constructor(){super();be(this,hr,!0);be(this,yn);be(this,_r);se(this,_r,e=>{if(!Tr&&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(){S(this,yn)||this.setEventListener(S(this,_r))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,yn))==null||e.call(this),se(this,yn,void 0))}setEventListener(e){var n;se(this,_r,e),(n=S(this,yn))==null||n.call(this),se(this,yn,e(this.setOnline.bind(this)))}setOnline(e){S(this,hr)!==e&&(se(this,hr,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return S(this,hr)}},hr=new WeakMap,yn=new WeakMap,_r=new WeakMap,ua),xi=new tc;function Ys(){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 nc(t){return Math.min(1e3*2**t,3e4)}function Sa(t){return(t??"online")==="online"?xi.isOnline():!0}var Da=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ds(t){return t instanceof Da}function Ra(t){let e=!1,n=0,r=!1,i;const s=Ys(),o=h=>{var v;r||(d(new Da(h)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>Ao.isFocused()&&(t.networkMode==="always"||xi.isOnline())&&t.canRun(),f=()=>Sa(t.networkMode)&&t.canRun(),c=h=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,h),i==null||i(),s.resolve(h))},d=h=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,h),i==null||i(),s.reject(h))},p=()=>new Promise(h=>{var v;i=g=>{(r||a())&&h(g)},(v=t.onPause)==null||v.call(t)}).then(()=>{var h;i=void 0,r||(h=t.onContinue)==null||h.call(t)}),m=()=>{if(r)return;let h;const v=n===0?t.initialPromise:void 0;try{h=v??t.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(c).catch(g=>{var k;if(r)return;const _=t.retry??(Tr?0:3),C=t.retryDelay??nc,A=typeof C=="function"?C(n,g):C,T=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,g);if(e||!T){d(g);return}n++,(k=t.onFail)==null||k.call(t,n,g),Xf(A).then(()=>a()?void 0:p()).then(()=>{e?d(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),s)}}function rc(){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 at=rc(),Vn,aa,Pa=(aa=class{constructor(){be(this,Vn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qs(this.gcTime)&&se(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Tr?1/0:5*60*1e3))}clearGcTimeout(){S(this,Vn)&&(clearTimeout(S(this,Vn)),se(this,Vn,void 0))}},Vn=new WeakMap,aa),gr,br,Nt,wt,hi,Bn,Ut,sn,fa,ic=(fa=class extends Pa{constructor(e){super();be(this,Ut);be(this,gr);be(this,br);be(this,Nt);be(this,wt);be(this,hi);be(this,Bn);se(this,Bn,!1),se(this,hi,e.defaultOptions),this.setOptions(e.options),this.observers=[],se(this,Nt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,se(this,gr,sc(this.options)),this.state=e.state??S(this,gr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=S(this,wt))==null?void 0:e.promise}setOptions(e){this.options={...S(this,hi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Nt).remove(this)}setData(e,n){const r=Gs(this.state.data,e,this.options);return Se(this,Ut,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Se(this,Ut,sn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=S(this,wt))==null?void 0:r.promise;return(i=S(this,wt))==null||i.cancel(e),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,gr))}isActive(){return this.observers.some(e=>Kt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oo||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||!Aa(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,wt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,wt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),S(this,Nt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(S(this,wt)&&(S(this,Bn)?S(this,wt).cancel({revert:!0}):S(this,wt).cancelRetry()),this.scheduleGc()),S(this,Nt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Ut,sn).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(S(this,wt))return S(this,wt).continueRetry(),S(this,wt).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:()=>(se(this,Bn,!0),r.signal)})},s=()=>{const c=$a(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),se(this,Bn,!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),se(this,br,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&Se(this,Ut,sn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,p,m,h;Ds(c)&&c.silent||Se(this,Ut,sn).call(this,{type:"error",error:c}),Ds(c)||((p=(d=S(this,Nt).config).onError)==null||p.call(d,c,this),(h=(m=S(this,Nt).config).onSettled)==null||h.call(m,this.state.data,c,this)),this.scheduleGc()};return se(this,wt,Ra({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,p,m,h;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(p=(d=S(this,Nt).config).onSuccess)==null||p.call(d,c,this),(h=(m=S(this,Nt).config).onSettled)==null||h.call(m,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{Se(this,Ut,sn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{Se(this,Ut,sn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Ut,sn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,wt).start()}},gr=new WeakMap,br=new WeakMap,Nt=new WeakMap,wt=new WeakMap,hi=new WeakMap,Bn=new WeakMap,Ut=new WeakSet,sn=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,...Fa(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 Ds(i)&&i.revert&&S(this,br)?{...S(this,br),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),at.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Nt).notify({query:this,type:"updated",action:e})})},fa);function Fa(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sa(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function sc(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,ca,oc=(ca=class extends Pr{constructor(e={}){super();be(this,Yt);this.config=e,se(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??wo(i,n);let o=this.get(s);return o||(o=new ic({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){S(this,Yt).has(e.queryHash)||(S(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=S(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&S(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return S(this,Yt).get(e)}getAll(){return[...S(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>zo(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>zo(e,r)):n}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,ca),Zt,At,Un,Xt,_n,da,lc=(da=class extends Pa{constructor(e){super();be(this,Xt);be(this,Zt);be(this,At);be(this,Un);this.mutationId=e.mutationId,se(this,At,e.mutationCache),se(this,Zt,[]),this.state=e.state||La(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){S(this,Zt).includes(e)||(S(this,Zt).push(e),this.clearGcTimeout(),S(this,At).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){se(this,Zt,S(this,Zt).filter(n=>n!==e)),this.scheduleGc(),S(this,At).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){S(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():S(this,At).remove(this))}continue(){var e;return((e=S(this,Un))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,u,l,a,f,c,d,p,m,h,v,g,_,C,A,T,k,L;se(this,Un,Ra({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,W)=>{Se(this,Xt,_n).call(this,{type:"failed",failureCount:R,error:W})},onPause:()=>{Se(this,Xt,_n).call(this,{type:"pause"})},onContinue:()=>{Se(this,Xt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,At).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Un).canStart();try{if(!n){Se(this,Xt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=S(this,At).config).onMutate)==null?void 0:s.call(i,e,this));const W=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));W!==this.state.context&&Se(this,Xt,_n).call(this,{type:"pending",context:W,variables:e,isPaused:r})}const R=await S(this,Un).start();return await((a=(l=S(this,At).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((p=(d=S(this,At).config).onSettled)==null?void 0:p.call(d,R,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,R,null,e,this.state.context)),Se(this,Xt,_n).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(v=S(this,At).config).onError)==null?void 0:g.call(v,R,e,this.state.context,this)),await((C=(_=this.options).onError)==null?void 0:C.call(_,R,e,this.state.context)),await((T=(A=S(this,At).config).onSettled)==null?void 0:T.call(A,void 0,R,this.state.variables,this.state.context,this)),await((L=(k=this.options).onSettled)==null?void 0:L.call(k,void 0,R,e,this.state.context)),R}finally{Se(this,Xt,_n).call(this,{type:"error",error:R})}}finally{S(this,At).runNext(this)}}},Zt=new WeakMap,At=new WeakMap,Un=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),at.batch(()=>{S(this,Zt).forEach(r=>{r.onMutationUpdate(e)}),S(this,At).notify({mutation:this,type:"updated",action:e})})},da);function La(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,jt,_i,ma,uc=(ma=class extends Pr{constructor(e={}){super();be(this,un);be(this,jt);be(this,_i);this.config=e,se(this,un,new Set),se(this,jt,new Map),se(this,_i,0)}build(e,n,r){const i=new lc({mutationCache:this,mutationId:++Fi(this,_i)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){S(this,un).add(e);const n=Ii(e);if(typeof n=="string"){const r=S(this,jt).get(n);r?r.push(e):S(this,jt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(S(this,un).delete(e)){const n=Ii(e);if(typeof n=="string"){const r=S(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&&S(this,jt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ii(e);if(typeof n=="string"){const r=S(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=Ii(e);if(typeof n=="string"){const i=(r=S(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(){at.batch(()=>{S(this,un).forEach(e=>{this.notify({type:"removed",mutation:e})}),S(this,un).clear(),S(this,jt).clear()})}getAll(){return Array.from(S(this,un))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Go(n,r))}findAll(e={}){return this.getAll().filter(n=>Go(e,n))}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return at.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ht))))}},un=new WeakMap,jt=new WeakMap,_i=new WeakMap,ma);function Ii(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Xo(t){return{onFetch:(e,n)=>{var f,c,d,p,m;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=((p=e.state.data)==null?void 0:p.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let h=!1;const v=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},g=$a(e.options,e.fetchOptions),_=async(C,A,T)=>{if(h)return Promise.reject();if(A==null&&C.pages.length)return Promise.resolve(C);const k={queryKey:e.queryKey,pageParam:A,direction:T?"backward":"forward",meta:e.options.meta};v(k);const L=await g(k),{maxPages:R}=e.options,W=T?xf:Jf;return{pages:W(C.pages,L,R),pageParams:W(C.pageParams,A,R)}};if(i&&s.length){const C=i==="backward",A=C?ac:Jo,T={pages:s,pageParams:o},k=A(r,T);u=await _(T,k,C)}else{const C=t??s.length;do{const A=l===0?o[0]??r.initialPageParam:Jo(r,u);if(l>0&&A==null)break;u=await _(u,A),l++}while(l<C)}return u};e.options.persister?e.fetchFn=()=>{var h,v;return(v=(h=e.options).persister)==null?void 0:v.call(h,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Jo(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 ac(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,yr,vr,Cn,kr,Cr,pa,Ia=(pa=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,yr);be(this,vr);be(this,Cn);be(this,kr);be(this,Cr);se(this,nt,t.queryCache||new oc),se(this,vn,t.mutationCache||new uc),se(this,kn,t.defaultOptions||{}),se(this,yr,new Map),se(this,vr,new Map),se(this,Cn,0)}mount(){Fi(this,Cn)._++,S(this,Cn)===1&&(se(this,kr,Ao.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,nt).onFocus())})),se(this,Cr,xi.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,nt).onOnline())})))}unmount(){var t,e;Fi(this,Cn)._--,S(this,Cn)===0&&((t=S(this,kr))==null||t.call(this),se(this,kr,void 0),(e=S(this,Cr))==null||e.call(this),se(this,Cr,void 0))}isFetching(t){return S(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return S(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=S(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=S(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(ar(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return S(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=S(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Zf(e,s);if(o!==void 0)return S(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return at.batch(()=>S(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=S(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=S(this,nt);at.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=S(this,nt),r={type:"active",...t};return at.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=at.batch(()=>S(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(t,e={}){return at.batch(()=>{if(S(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=at.batch(()=>S(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=S(this,nt).build(this,e);return n.isStaleByTime(ar(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ht).catch(Ht)}fetchInfiniteQuery(t){return t.behavior=Xo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ht).catch(Ht)}ensureInfiniteQueryData(t){return t.behavior=Xo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return xi.isOnline()?S(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,nt)}getMutationCache(){return S(this,vn)}getDefaultOptions(){return S(this,kn)}setDefaultOptions(t){se(this,kn,t)}setQueryDefaults(t,e){S(this,yr).set(Qn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...S(this,yr).values()],n={};return e.forEach(r=>{li(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){S(this,vr).set(Qn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...S(this,vr).values()];let n={};return e.forEach(r=>{li(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...S(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=wo(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===Oo&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...S(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){S(this,nt).clear(),S(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,yr=new WeakMap,vr=new WeakMap,Cn=new WeakMap,kr=new WeakMap,Cr=new WeakMap,pa),St,Ve,gi,Tt,jn,Er,En,Jt,bi,wr,Or,Kn,qn,wn,Ar,Ye,ei,Zs,Xs,Js,xs,eo,to,no,Ma,ha,fc=(ha=class extends Pr{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,gi);be(this,Tt);be(this,jn);be(this,Er);be(this,En);be(this,Jt);be(this,bi);be(this,wr);be(this,Or);be(this,Kn);be(this,qn);be(this,wn);be(this,Ar,new Set);this.options=n,se(this,St,e),se(this,Jt,null),se(this,En,Ys()),this.options.experimental_prefetchInRender||S(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&&(S(this,Ve).addObserver(this),xo(S(this,Ve),this.options)?Se(this,Ye,ei).call(this):this.updateResult(),Se(this,Ye,xs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ro(S(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ro(S(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ye,eo).call(this),Se(this,Ye,to).call(this),S(this,Ve).removeObserver(this)}setOptions(e,n){const r=this.options,i=S(this,Ve);if(this.options=S(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,S(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ye,no).call(this),S(this,Ve).setOptions(this.options),r._defaulted&&!Ji(this.options,r)&&S(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Ve),observer:this});const s=this.hasListeners();s&&el(S(this,Ve),i,this.options,r)&&Se(this,Ye,ei).call(this),this.updateResult(n),s&&(S(this,Ve)!==i||Kt(this.options.enabled,S(this,Ve))!==Kt(r.enabled,S(this,Ve))||ar(this.options.staleTime,S(this,Ve))!==ar(r.staleTime,S(this,Ve)))&&Se(this,Ye,Zs).call(this);const o=Se(this,Ye,Xs).call(this);s&&(S(this,Ve)!==i||Kt(this.options.enabled,S(this,Ve))!==Kt(r.enabled,S(this,Ve))||o!==S(this,wn))&&Se(this,Ye,Js).call(this,o)}getOptimisticResult(e){const n=S(this,St).getQueryCache().build(S(this,St),e),r=this.createResult(n,e);return dc(this,r)&&(se(this,Tt,r),se(this,Er,this.options),se(this,jn,S(this,Ve).state)),r}getCurrentResult(){return S(this,Tt)}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){S(this,Ar).add(e)}getCurrentQuery(){return S(this,Ve)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=S(this,St).defaultQueryOptions(e),r=S(this,St).getQueryCache().build(S(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Se(this,Ye,ei).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,Tt)))}createResult(e,n){var R;const r=S(this,Ve),i=this.options,s=S(this,Tt),o=S(this,jn),u=S(this,Er),a=e!==r?e.state:S(this,gi),{state:f}=e;let c={...f},d=!1,p;if(n._optimisticResults){const W=this.hasListeners(),j=!W&&xo(e,n),$=W&&el(e,r,n,i);(j||$)&&(c={...c,...Fa(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:v}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,bi))p=S(this,wr);else try{se(this,bi,n.select),p=n.select(c.data),p=Gs(s==null?void 0:s.data,p,n),se(this,wr,p),se(this,Jt,null)}catch(W){se(this,Jt,W)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let W;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))W=s.data;else if(W=typeof n.placeholderData=="function"?n.placeholderData((R=S(this,Or))==null?void 0:R.state.data,S(this,Or)):n.placeholderData,n.select&&W!==void 0)try{W=n.select(W),se(this,Jt,null)}catch(j){se(this,Jt,j)}W!==void 0&&(v="success",p=Gs(s==null?void 0:s.data,W,n),d=!0)}S(this,Jt)&&(m=S(this,Jt),p=S(this,wr),h=Date.now(),v="error");const g=c.fetchStatus==="fetching",_=v==="pending",C=v==="error",A=_&&g,T=p!==void 0,L={status:v,fetchStatus:c.fetchStatus,isPending:_,isSuccess:v==="success",isError:C,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:h,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:g,isRefetching:g&&!_,isLoadingError:C&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:C&&T,isStale:To(e,n),refetch:this.refetch,promise:S(this,En)};if(this.options.experimental_prefetchInRender){const W=U=>{L.status==="error"?U.reject(L.error):L.data!==void 0&&U.resolve(L.data)},j=()=>{const U=se(this,En,L.promise=Ys());W(U)},$=S(this,En);switch($.status){case"pending":e.queryHash===r.queryHash&&W($);break;case"fulfilled":(L.status==="error"||L.data!==$.value)&&j();break;case"rejected":(L.status!=="error"||L.error!==$.reason)&&j();break}}return L}updateResult(e){const n=S(this,Tt),r=this.createResult(S(this,Ve),this.options);if(se(this,jn,S(this,Ve).state),se(this,Er,this.options),S(this,jn).data!==void 0&&se(this,Or,S(this,Ve)),Ji(r,n))return;se(this,Tt,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!S(this,Ar).size)return!0;const l=new Set(u??S(this,Ar));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,Tt)).some(a=>{const f=a;return S(this,Tt)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Se(this,Ye,Ma).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ye,xs).call(this)}},St=new WeakMap,Ve=new WeakMap,gi=new WeakMap,Tt=new WeakMap,jn=new WeakMap,Er=new WeakMap,En=new WeakMap,Jt=new WeakMap,bi=new WeakMap,wr=new WeakMap,Or=new WeakMap,Kn=new WeakMap,qn=new WeakMap,wn=new WeakMap,Ar=new WeakMap,Ye=new WeakSet,ei=function(e){Se(this,Ye,no).call(this);let n=S(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ht)),n},Zs=function(){Se(this,Ye,eo).call(this);const e=ar(this.options.staleTime,S(this,Ve));if(Tr||S(this,Tt).isStale||!Qs(e))return;const r=Aa(S(this,Tt).dataUpdatedAt,e)+1;se(this,Kn,setTimeout(()=>{S(this,Tt).isStale||this.updateResult()},r))},Xs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Ve)):this.options.refetchInterval)??!1},Js=function(e){Se(this,Ye,to).call(this),se(this,wn,e),!(Tr||Kt(this.options.enabled,S(this,Ve))===!1||!Qs(S(this,wn))||S(this,wn)===0)&&se(this,qn,setInterval(()=>{(this.options.refetchIntervalInBackground||Ao.isFocused())&&Se(this,Ye,ei).call(this)},S(this,wn)))},xs=function(){Se(this,Ye,Zs).call(this),Se(this,Ye,Js).call(this,Se(this,Ye,Xs).call(this))},eo=function(){S(this,Kn)&&(clearTimeout(S(this,Kn)),se(this,Kn,void 0))},to=function(){S(this,qn)&&(clearInterval(S(this,qn)),se(this,qn,void 0))},no=function(){const e=S(this,St).getQueryCache().build(S(this,St),this.options);if(e===S(this,Ve))return;const n=S(this,Ve);se(this,Ve,e),se(this,gi,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ma=function(e){at.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(S(this,Tt))}),S(this,St).getQueryCache().notify({query:S(this,Ve),type:"observerResultsUpdated"})})},ha);function cc(t,e){return Kt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function xo(t,e){return cc(t,e)||t.state.data!==void 0&&ro(t,e,e.refetchOnMount)}function ro(t,e,n){if(Kt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&To(t,e)}return!1}function el(t,e,n,r){return(t!==e||Kt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&To(t,n)}function To(t,e){return Kt(e.enabled,t)!==!1&&t.isStaleByTime(ar(e.staleTime,t))}function dc(t,e){return!Ji(t.getCurrentResult(),e)}var On,An,Dt,an,dn,Wi,io,_a,mc=(_a=class extends Pr{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Dt);be(this,an);se(this,On,n),this.setOptions(r),this.bindMethods(),Se(this,dn,Wi).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=S(this,On).defaultMutationOptions(n),Ji(this.options,r)||S(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Dt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Qn(r.mutationKey)!==Qn(this.options.mutationKey)?this.reset():((i=S(this,Dt))==null?void 0:i.state.status)==="pending"&&S(this,Dt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=S(this,Dt))==null||n.removeObserver(this)}onMutationUpdate(n){Se(this,dn,Wi).call(this),Se(this,dn,io).call(this,n)}getCurrentResult(){return S(this,An)}reset(){var n;(n=S(this,Dt))==null||n.removeObserver(this),se(this,Dt,void 0),Se(this,dn,Wi).call(this),Se(this,dn,io).call(this)}mutate(n,r){var i;return se(this,an,r),(i=S(this,Dt))==null||i.removeObserver(this),se(this,Dt,S(this,On).getMutationCache().build(S(this,On),this.options)),S(this,Dt).addObserver(this),S(this,Dt).execute(n)}},On=new WeakMap,An=new WeakMap,Dt=new WeakMap,an=new WeakMap,dn=new WeakSet,Wi=function(){var r;const n=((r=S(this,Dt))==null?void 0:r.state)??La();se(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})},io=function(n){at.batch(()=>{var r,i,s,o,u,l,a,f;if(S(this,an)&&this.hasListeners()){const c=S(this,An).variables,d=S(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=S(this,an)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=S(this,an)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=S(this,an)).onError)==null||l.call(u,n.error,c,d),(f=(a=S(this,an)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(S(this,An))})})},_a);const nr=[];function yt(t,e){return{subscribe:Pe(t,e).subscribe}}function Pe(t,e=ce){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!nr.length;for(const a of r)a[1](),nr.push(a,t);if(l){for(let a=0;a<nr.length;a+=2)nr[a][0](nr[a+1]);nr.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 Be(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 yt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=ce;const d=()=>{if(f)return;c();const m=e(r?a[0]:a,o,u);s?o(m):c=Zn(m)?m:ce},p=i.map((m,h)=>bo(m,v=>{a[h]=v,f&=~(1<<h),l&&d()},()=>{f|=1<<h}));return l=!0,d(),function(){Te(p),c(),l=!1}})}function tl(t){return{subscribe:t.subscribe.bind(t)}}const Na="$$_queryClient",pc=()=>{const t=st(Na);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},hc=t=>{ft(Na,t)},_c="$$_isRestoring",gc=()=>{try{const t=st(_c);return t||yt(!1)}catch{return yt(!1)}};function bc(){return gc()}function kt(t){return pc()}function Ha(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Va(){}function yc(t,e,n){const r=kt(),i=bc(),s=Ha(t)?t:yt(t),o=Be([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,Rr(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=Be(i,(f,c)=>{const d=f?Va:u.subscribe(at.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=Be([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function $r(t,e){return yc(t,fc)}function ki(t,e){const n=kt(),r=Ha(t)?t:yt(t),i=new mc(n,Rr(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Va)},i.setOptions(l)});const o=yt(i.getCurrentResult(),l=>i.subscribe(at.batchCalls(a=>l(a)))),{subscribe:u}=Be(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function vc(t){let e;const n=t[2].default,r=pe(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)&&_e(r,n,i,i[1],e?he(n,i[1],s,null):ge(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function kc(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new Ia}=e;return cs(()=>{s.mount()}),hc(s),ds(()=>{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 Cc extends ve{constructor(e){super(),ye(this,e,kc,vc,fe,{client:0})}}var nl=Object.prototype.hasOwnProperty;function rl(t,e,n){for(n of t.keys())if(fr(n,e))return n}function fr(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--&&fr(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=rl(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=rl(e,i),!i)||!fr(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(nl.call(t,n)&&++r&&!nl.call(e,n)||!(n in e)||!fr(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function E0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function w0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function O0(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function A0(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function Ec(t){return t[t.length-1]}function wc(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function T0(t,e,n=fr){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Ft(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function ii(t){return t?!0:void 0}Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function ms(t){if(t!==null)return""}function il(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function $0(t){if(!ht)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return x(e)?e:null}const Mi=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),sl=t=>typeof t=="function";Fe("empty");function Fe(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Be(n,u=>{const l=i(u);if(sl(l)){const a=(...f)=>Mi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,a}return Mi({...l,[`data-melt-${t}`]:"",action:r??ze})});{const u=i,l=u==null?void 0:u();if(sl(l)){const a=(...f)=>Mi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,il(a)}return il(Mi({...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 ht=typeof document<"u",Ba=t=>typeof t=="function";function Ci(t){return t instanceof Element}function x(t){return t instanceof HTMLElement}function S0(t){return t instanceof HTMLInputElement}function D0(t){return t instanceof HTMLLabelElement}function R0(t){return t instanceof HTMLButtonElement}function on(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function P0(t){return x(t)?t.isContentEditable:!1}function Oc(t){return t!==null&&typeof t=="object"}function Ua(t){return Oc(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ze(){}function bt(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=Tc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Ac(t){const e=t.currentTarget;if(!x(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Tc(t){return e=>{const n=Ac(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function so(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const ui=t=>{try{cs(t)}catch{return t}},ja=t=>{try{ds(t)}catch{return t}};function Fr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function F0(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!fr(i,e)))}function $c(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:()=>Rr(t)}}Xe.writable=function(t){const e=Pe(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 cr=(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 fn(t){return new Promise(e=>setTimeout(e,t))}let Sc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ka=(t=21)=>{let e="",n=t|0;for(;n--;)e+=Sc[Math.random()*64|0];return e};function Dc(){return Ka(10)}function ai(t){return t.reduce((e,n)=>(e[n]=Dc(),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"},Rc=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],Pc=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],oo=[...Rc,...Pc],fi=[ae.ENTER,ae.SPACE],Fc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],Lc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],L0=(t="ltr",e="horizontal")=>({nextKey:Fc(t,e),prevKey:Lc(t,e)});function Ic(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const qa=()=>typeof window<"u";function Mc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Wa=t=>qa()&&t.test(Mc().toLowerCase()),Nc=()=>qa()&&!!navigator.maxTouchPoints,Hc=()=>Wa(/^mac/)&&!Nc(),Vc=()=>Wa(/mac|iphone|ipad|ipod/i),Bc=()=>Vc()&&!Hc(),Rs="data-melt-scroll-lock";function ol(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Uc(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 jc(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(Rs))return ze;i.setAttribute(Rs,"");const o=n.innerWidth-r.clientWidth,u=()=>Uc(r,"--scrollbar-width",`${o}px`),l=jc(r),a=n.getComputedStyle(i)[l],f=()=>ol(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:p,scrollY:m,visualViewport:h}=n,v=(h==null?void 0:h.offsetLeft)??0,g=(h==null?void 0:h.offsetTop)??0,_=ol(i,{position:"fixed",overflow:"hidden",top:`${-(m-Math.floor(g))}px`,left:`${-(p-Math.floor(v))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{_==null||_(),n.scrollTo(p,m)}},d=[u(),Bc()?c():f()];return()=>{d.forEach(p=>p==null?void 0:p()),i.removeAttribute(Rs)}}function es(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return Be([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=Be(t,s=>{n==null||n(),n=e(s)}).subscribe(ze),i=()=>{r(),n==null||n()};return ja(i),i}function It(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(Pe(i))}),e}function et(t){ht&&fn(1).then(()=>{const e=document.activeElement;!x(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Qa(){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 za(t){const e=Qa(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&x(i)?i:null}function Ga(t){const e=Qa(),r=e.indexOf(t)-1,i=e[r];return r>=0&&x(i)?i:null}const Kc=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),qc={onMatch:et,getCurrentItem:()=>document.activeElement};function Wc(t={}){const e={...qc,...t},n=Xe(Pe([])),r=Ic(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if(Kc.has(s))return;const u=e.getCurrentItem(),l=Rr(n);if(!Array.isArray(l))return;l.push(s.toLowerCase()),n.set(l);const a=o.filter(v=>!(v.getAttribute("disabled")==="true"||v.getAttribute("aria-disabled")==="true"||v.hasAttribute("data-disabled"))),c=l.length>1&&l.every(v=>v===l[0])?l[0]:l.join(""),d=x(u)?a.indexOf(u):-1;let p=wc(a,Math.max(d,0));c.length===1&&(p=p.filter(v=>v!==u));const h=p.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));x(h)&&h!==u&&e.onMatch(h),r()}}}function Qc(t){let e=t.parentElement;for(;x(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Sr(t,e){return e!==void 0?e:Qc(t)==="body"?document.body:null}async function ci(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([fn(1),qt]),e===void 0){n==null||n.focus();return}const r=Ba(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!x(i))return;i.focus()}else x(r)&&r.focus()}yt(void 0,t=>{function e(r){t(r),t(void 0)}return bt(document,"pointerup",e,{passive:!1,capture:!0})});const zc=yt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return bt(document,"keydown",e,{passive:!1})}),di=(t,e={})=>{let n=ze;function r(i={}){n();const s={enabled:!0,...i},o=Ua(s.enabled)?s.enabled:yt(s.enabled);n=rt(zc.subscribe(u=>{var a;if(!u||!Rr(o))return;const l=u.target;if(!(!x(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(Ba(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,Pt=Math.max,ts=Math.round,Ni=Math.floor,en=t=>({x:t,y:t}),Gc={left:"right",right:"left",bottom:"top",top:"bottom"},Yc={start:"end",end:"start"};function lo(t,e,n){return Pt(t,$n(e,n))}function Lr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Ir(t){return t.split("-")[1]}function Ya(t){return t==="x"?"y":"x"}function So(t){return t==="y"?"height":"width"}function zn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function Do(t){return Ya(zn(t))}function Zc(t,e,n){n===void 0&&(n=!1);const r=Ir(t),i=Do(t),s=So(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ns(o)),[o,ns(o)]}function Xc(t){const e=ns(t);return[uo(t),e,uo(e)]}function uo(t){return t.replace(/start|end/g,e=>Yc[e])}function Jc(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 xc(t,e,n,r){const i=Ir(t);let s=Jc(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(uo)))),s}function ns(t){return t.replace(/left|right|bottom|top/g,e=>Gc[e])}function ed(t){return{top:0,right:0,bottom:0,left:0,...t}}function Za(t){return typeof t!="number"?ed(t):{top:t,right:t,bottom:t,left:t}}function rs(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 ll(t,e,n){let{reference:r,floating:i}=t;const s=zn(e),o=Do(e),u=So(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 p;switch(l){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Ir(e)){case"start":p[o]-=d*(n&&a?-1:1);break;case"end":p[o]+=d*(n&&a?-1:1);break}return p}const td=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}=ll(a,r,l),d=r,p={},m=0;for(let h=0;h<u.length;h++){const{name:v,fn:g}=u[h],{x:_,y:C,data:A,reset:T}=await g({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:a,platform:o,elements:{reference:t,floating:e}});f=_??f,c=C??c,p={...p,[v]:{...p[v],...A}},T&&m<=50&&(m++,typeof T=="object"&&(T.placement&&(d=T.placement),T.rects&&(a=T.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):T.rects),{x:f,y:c}=ll(a,d,l)),h=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:p}};async function Ro(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:p=0}=Lr(e,t),m=Za(p),v=u[d?c==="floating"?"reference":"floating":c],g=rs(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:a,rootBoundary:f,strategy:l})),_=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),A=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},T=rs(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:C,strategy:l}):_);return{top:(g.top-T.top+m.top)/A.y,bottom:(T.bottom-g.bottom+m.bottom)/A.y,left:(g.left-T.left+m.left)/A.x,right:(T.right-g.right+m.right)/A.x}}const nd=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}=Lr(t,e)||{};if(a==null)return{};const c=Za(f),d={x:n,y:r},p=Do(i),m=So(p),h=await o.getDimensions(a),v=p==="y",g=v?"top":"left",_=v?"bottom":"right",C=v?"clientHeight":"clientWidth",A=s.reference[m]+s.reference[p]-d[p]-s.floating[m],T=d[p]-s.reference[p],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let L=k?k[C]:0;(!L||!await(o.isElement==null?void 0:o.isElement(k)))&&(L=u.floating[C]||s.floating[m]);const R=A/2-T/2,W=L/2-h[m]/2-1,j=$n(c[g],W),$=$n(c[_],W),U=j,O=L-h[m]-$,F=L/2-h[m]/2+R,V=lo(U,F,O),B=!l.arrow&&Ir(i)!=null&&F!==V&&s.reference[m]/2-(F<U?j:$)-h[m]/2<0,ee=B?F<U?F-U:F-O:0;return{[p]:d[p]+ee,data:{[p]:V,centerOffset:F-V-ee,...B&&{alignmentOffset:ee}},reset:B}}}),rd=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:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Lr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Sn(i),_=zn(u),C=Sn(u)===u,A=await(l.isRTL==null?void 0:l.isRTL(a.floating)),T=d||(C||!h?[ns(u)]:Xc(u)),k=m!=="none";!d&&k&&T.push(...xc(u,h,m,A));const L=[u,...T],R=await Ro(e,v),W=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&W.push(R[g]),c){const F=Zc(i,o,A);W.push(R[F[0]],R[F[1]])}if(j=[...j,{placement:i,overflows:W}],!W.every(F=>F<=0)){var $,U;const F=((($=s.flip)==null?void 0:$.index)||0)+1,V=L[F];if(V)return{data:{index:F,overflows:j},reset:{placement:V}};let B=(U=j.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:U.placement;if(!B)switch(p){case"bestFit":{var O;const ee=(O=j.filter(te=>{if(k){const z=zn(te.placement);return z===_||z==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(z=>z>0).reduce((z,oe)=>z+oe,0)]).sort((te,z)=>te[1]-z[1])[0])==null?void 0:O[0];ee&&(B=ee);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function id(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=Ir(n),l=zn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Lr(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof m=="number"&&(p=u==="end"?m*-1:m),l?{x:p*f,y:d*a}:{x:d*a,y:p*f}}const sd=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 id(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}}}}},od=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:v=>{let{x:g,y:_}=v;return{x:g,y:_}}},...l}=Lr(t,e),a={x:n,y:r},f=await Ro(e,l),c=zn(Sn(i)),d=Ya(c);let p=a[d],m=a[c];if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",_=p+f[v],C=p-f[g];p=lo(_,p,C)}if(o){const v=c==="y"?"top":"left",g=c==="y"?"bottom":"right",_=m+f[v],C=m-f[g];m=lo(_,m,C)}const h=u.fn({...e,[d]:p,[c]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:s,[c]:o}}}}}},ld=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}=Lr(t,e),f=await Ro(e,a),c=Sn(i),d=Ir(i),p=zn(i)==="y",{width:m,height:h}=s.floating;let v,g;c==="top"||c==="bottom"?(v=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(g=c,v=d==="end"?"top":"bottom");const _=h-f.top-f.bottom,C=m-f.left-f.right,A=$n(h-f[v],_),T=$n(m-f[g],C),k=!e.middlewareData.shift;let L=A,R=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=C),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(L=_),k&&!d){const j=Pt(f.left,0),$=Pt(f.right,0),U=Pt(f.top,0),O=Pt(f.bottom,0);p?R=m-2*(j!==0||$!==0?j+$:Pt(f.left,f.right)):L=h-2*(U!==0||O!==0?U+O:Pt(f.top,f.bottom))}await l({...e,availableWidth:R,availableHeight:L});const W=await o.getDimensions(u.floating);return m!==W.width||h!==W.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function Mr(t){return Xa(t)?(t.nodeName||"").toLowerCase():"#document"}function Mt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rn(t){var e;return(e=(Xa(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xa(t){return ps()?t instanceof Node||t instanceof Mt(t).Node:!1}function Wt(t){return ps()?t instanceof Element||t instanceof Mt(t).Element:!1}function nn(t){return ps()?t instanceof HTMLElement||t instanceof Mt(t).HTMLElement:!1}function ul(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Mt(t).ShadowRoot}function Ei(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Qt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function ud(t){return["table","td","th"].includes(Mr(t))}function hs(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Po(t){const e=Fo(),n=Wt(t)?Qt(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 ad(t){let e=Dn(t);for(;nn(e)&&!Dr(e);){if(Po(e))return e;if(hs(e))return null;e=Dn(e)}return null}function Fo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dr(t){return["html","body","#document"].includes(Mr(t))}function Qt(t){return Mt(t).getComputedStyle(t)}function _s(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dn(t){if(Mr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ul(t)&&t.host||rn(t);return ul(e)?e.host:e}function Ja(t){const e=Dn(t);return Dr(e)?t.ownerDocument?t.ownerDocument.body:t.body:nn(e)&&Ei(e)?e:Ja(e)}function mi(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ja(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Mt(i);if(s){const u=ao(o);return e.concat(o,o.visualViewport||[],Ei(i)?i:[],u&&n?mi(u):[])}return e.concat(i,mi(i,[],n))}function ao(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function xa(t){const e=Qt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=ts(n)!==s||ts(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Lo(t){return Wt(t)?t:t.contextElement}function dr(t){const e=Lo(t);if(!nn(e))return en(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=xa(e);let o=(s?ts(n.width):n.width)/r,u=(s?ts(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const fd=en(0);function ef(t){const e=Mt(t);return!Fo()||!e.visualViewport?fd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function cd(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Mt(t)?!1:e}function Gn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Lo(t);let o=en(1);e&&(r?Wt(r)&&(o=dr(r)):o=dr(t));const u=cd(s,n,r)?ef(s):en(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=Mt(s),p=r&&Wt(r)?Mt(r):r;let m=d,h=ao(m);for(;h&&r&&p!==m;){const v=dr(h),g=h.getBoundingClientRect(),_=Qt(h),C=g.left+(h.clientLeft+parseFloat(_.paddingLeft))*v.x,A=g.top+(h.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=C,a+=A,m=Mt(h),h=ao(m)}}return rs({width:f,height:c,x:l,y:a})}function Io(t,e){const n=_s(t).scrollLeft;return e?e.left+n:Gn(rn(t)).left+n}function tf(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Io(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function dd(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rn(r),u=e?hs(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=en(1);const f=en(0),c=nn(r);if((c||!c&&!s)&&((Mr(r)!=="body"||Ei(o))&&(l=_s(r)),nn(r))){const p=Gn(r);a=dr(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const d=o&&!c&&!s?tf(o,l,!0):en(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 md(t){return Array.from(t.getClientRects())}function pd(t){const e=rn(t),n=_s(t),r=t.ownerDocument.body,i=Pt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Pt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Io(t);const u=-n.scrollTop;return Qt(r).direction==="rtl"&&(o+=Pt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function hd(t,e){const n=Mt(t),r=rn(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=Fo();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function _d(t,e){const n=Gn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=nn(t)?dr(t):en(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 al(t,e,n){let r;if(e==="viewport")r=hd(t,n);else if(e==="document")r=pd(rn(t));else if(Wt(e))r=_d(e,n);else{const i=ef(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return rs(r)}function nf(t,e){const n=Dn(t);return n===e||!Wt(n)||Dr(n)?!1:Qt(n).position==="fixed"||nf(n,e)}function gd(t,e){const n=e.get(t);if(n)return n;let r=mi(t,[],!1).filter(u=>Wt(u)&&Mr(u)!=="body"),i=null;const s=Qt(t).position==="fixed";let o=s?Dn(t):t;for(;Wt(o)&&!Dr(o);){const u=Qt(o),l=Po(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ei(o)&&!l&&nf(t,o))?r=r.filter(f=>f!==o):i=u,o=Dn(o)}return e.set(t,r),r}function bd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?hs(e)?[]:gd(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=al(e,f,i);return a.top=Pt(c.top,a.top),a.right=$n(c.right,a.right),a.bottom=$n(c.bottom,a.bottom),a.left=Pt(c.left,a.left),a},al(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yd(t){const{width:e,height:n}=xa(t);return{width:e,height:n}}function vd(t,e,n){const r=nn(e),i=rn(e),s=n==="fixed",o=Gn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=en(0);if(r||!r&&!s)if((Mr(e)!=="body"||Ei(i))&&(u=_s(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=Io(i));const a=i&&!r&&!s?tf(i,u):en(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 Ps(t){return Qt(t).position==="static"}function fl(t,e){if(!nn(t)||Qt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rn(t)===n&&(n=n.ownerDocument.body),n}function rf(t,e){const n=Mt(t);if(hs(t))return n;if(!nn(t)){let i=Dn(t);for(;i&&!Dr(i);){if(Wt(i)&&!Ps(i))return i;i=Dn(i)}return n}let r=fl(t,e);for(;r&&ud(r)&&Ps(r);)r=fl(r,e);return r&&Dr(r)&&Ps(r)&&!Po(r)?n:r||ad(t)||n}const kd=async function(t){const e=this.getOffsetParent||rf,n=this.getDimensions,r=await n(t.floating);return{reference:vd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cd(t){return Qt(t).direction==="rtl"}const Ed={convertOffsetParentRelativeRectToViewportRelativeRect:dd,getDocumentElement:rn,getClippingRect:bd,getOffsetParent:rf,getElementRects:kd,getClientRects:md,getDimensions:yd,getScale:dr,isElement:Wt,isRTL:Cd};function wd(t,e){let n=null,r;const i=rn(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 p=Ni(f),m=Ni(i.clientWidth-(a+c)),h=Ni(i.clientHeight-(f+d)),v=Ni(a),_={rootMargin:-p+"px "+-m+"px "+-h+"px "+-v+"px",threshold:Pt(0,$n(1,l))||1};let C=!0;function A(T){const k=T[0].intersectionRatio;if(k!==l){if(!C)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(t)}return o(!0),s}function Od(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=Lo(t),f=i||s?[...a?mi(a):[],...mi(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const c=a&&u?wd(a,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(g=>{let[_]=g;_&&_.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(e)})),n()}),a&&!l&&p.observe(a),p.observe(e));let m,h=l?Gn(t):null;l&&v();function v(){const g=Gn(t);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,m=requestAnimationFrame(v)}return n(),()=>{var g;f.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),c==null||c(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Ad=sd,Td=od,$d=rd,Sd=ld,Dd=nd,Rd=(t,e,n)=>{const r=new Map,i={platform:Ed,...n},s={...i.platform,_c:r};return td(t,e,{...i,platform:s})},Pd={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Fd={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Ld(t,e,n={}){if(!e||!t||n===null)return{destroy:ze};const r={...Pd,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push($d({boundary:r.boundary,padding:r.overflowPadding}));const o=x(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(Ad(l))}s.push(Td({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(Dd({element:i,padding:8})),s.push(Sd({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||x(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=r;Rd(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),d=Math.round(f.y),[p,m]=Id(f.placement);if(e.setAttribute("data-side",p),e.setAttribute("data-align",m),Object.assign(e.style,{position:r.strategy,top:`${d}px`,left:`${c}px`}),x(i)&&f.middlewareData.arrow){const{x:h,y:v}=f.middlewareData.arrow,g=f.placement.split("-")[0];i.setAttribute("data-side",g),Object.assign(i.style,{position:"absolute",left:h!=null?`${h}px`:"",top:v!=null?`${v}px`:"",[g]:`calc(100% - ${o}px)`,transform:Fd[g],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:r.strategy}),{destroy:Od(t,e,u)}}function Id(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
5
+ }`,c=`__svelte_${qf(f)}_${u}`,d=Ea(t),{stylesheet:p,rules:m}=Gi.get(d)||Wf(d,t);m[c]||(m[c]=!0,p.insertRule(`@keyframes ${c} ${f}`,p.cssRules.length));const h=t.style.animation||"";return t.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,Yi+=1,c}function Xi(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(", "),Yi-=i,Yi||Qf())}function Qf(){vo(()=>{Yi||(Gi.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&C(e)}),Gi.clear())})}let oi;function ri(t){oi=t}function vi(){if(!oi)throw new Error("Function called outside component initialization");return oi}function cs(t){vi().$$.on_mount.push(t)}function ds(t){vi().$$.on_destroy.push(t)}function zf(){const t=vi();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=wa(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function ft(t,e){return vi().$$.context.set(t,e),e}function st(t){return vi().$$.context.get(t)}function Oe(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const fr=[],Ce=[];let dr=[];const qs=[],Oa=Promise.resolve();let Ws=!1;function Aa(){Ws||(Ws=!0,Oa.then($a))}function qt(){return Aa(),Oa}function ct(t){dr.push(t)}function Vt(t){qs.push(t)}const Ss=new Set;let sr=0;function $a(){if(sr!==0)return;const t=oi;do{try{for(;sr<fr.length;){const e=fr[sr];sr++,ri(e),Gf(e.$$)}}catch(e){throw fr.length=0,sr=0,e}for(ri(null),fr.length=0,sr=0;Ce.length;)Ce.pop()();for(let e=0;e<dr.length;e+=1){const n=dr[e];Ss.has(n)||(Ss.add(n),n())}dr.length=0}while(fr.length);for(;qs.length;)qs.pop()();Ws=!1,Ss.clear(),ri(t)}function Gf(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(ct)}}function Yf(t){const e=[],n=[];dr.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),dr=e}let zr;function Co(){return zr||(zr=Promise.resolve(),zr.then(()=>{zr=null})),zr}function Wn(t,e,n){t.dispatchEvent(wa(`${e?"intro":"outro"}${n}`))}const qi=new Set;let xt;function de(){xt={r:0,c:[],p:xt}}function me(){xt.r||Te(xt.c),xt=xt.p}function b(t,e){t&&t.i&&(qi.delete(t),t.i(e))}function y(t,e,n,r){if(t&&t.o){if(qi.has(t))return;qi.add(t),xt.c.push(()=>{qi.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const Eo={duration:0};function Rn(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,u,l=0;function a(){o&&Xi(t,o)}function f(){const{delay:d=0,duration:p=300,easing:m=fs,tick:h=ce,css:v}=i||Eo;v&&(o=Zi(t,0,1,p,d,m,v,l++)),h(0,1);const g=yo()+d,_=g+p;u&&u.abort(),s=!0,ct(()=>Wn(t,!0,"start")),u=ko(E=>{if(s){if(E>=_)return h(1,0),Wn(t,!0,"end"),a(),s=!1;if(E>=g){const A=m((E-g)/p);h(A,1-A)}}return s})}let c=!1;return{start(){c||(c=!0,Xi(t),Xn(i)?(i=i(r),Co().then(f)):f())},invalidate(){c=!1},end(){s&&(a(),s=!1)}}}function Pn(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=fs,tick:p=ce,css:m}=i||Eo;m&&(o=Zi(t,1,0,c,f,d,m));const h=yo()+f,v=h+c;ct(()=>Wn(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ko(g=>{if(s){if(g>=v)return p(0,1),Wn(t,!1,"end"),--u.r||Te(u.c),!1;if(g>=h){const _=d((g-h)/c);p(1-_,_)}}return s})}return Xn(i)?Co().then(()=>{i=i(r),a()}):a(),{end(f){f&&"inert"in t&&(t.inert=l),f&&i.tick&&i.tick(1,0),s&&(o&&Xi(t,o),s=!1)}}}function $n(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&&Xi(t,a)}function d(m,h){const v=m.b-o;return h*=Math.abs(v),{a:o,b:m.b,d:v,duration:h,start:m.start,end:m.start+h,group:m.group}}function p(m){const{delay:h=0,duration:v=300,easing:g=fs,tick:_=ce,css:E}=s||Eo,A={start:yo()+h,b:m};m||(A.group=xt,xt.r+=1),"inert"in t&&(m?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||l?l=A:(E&&(c(),a=Zi(t,o,m,v,h,g,E)),m&&_(0,1),u=d(A,v),ct(()=>Wn(t,m,"start")),ko($=>{if(l&&$>l.start&&(u=d(l,v),l=null,Wn(t,u.b,"start"),E&&(c(),a=Zi(t,o,u.b,u.duration,0,g,s.css))),u){if($>=u.end)_(o=u.b,1-o),Wn(t,u.b,"end"),l||(u.b?c():--u.group.r||Te(u.group.c)),u=null;else if($>=u.start){const k=$-u.start;o=u.a+u.d*g(k/u.duration),_(o,1-o)}}return!!(u||l)}))}return{run(m){Xn(s)?Co().then(()=>{s=s({direction:m?"in":"out"}),p(m)}):p(m)},end(){c(),u=l=null}}}function tn(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 N(t){t&&t.c()}function I(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),ct(()=>{const s=t.$$.on_mount.map(ya).filter(Xn);t.$$.on_destroy?t.$$.on_destroy.push(...s):Te(s),t.$$.on_mount=[]}),i.forEach(ct)}function M(t,e){const n=t.$$;n.fragment!==null&&(Yf(n.after_update),Te(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Zf(t,e){t.$$.dirty[0]===-1&&(fr.push(t),Aa(),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=oi;ri(t);const a=t.$$={fragment:null,ctx:[],props:s,update:ce,not_equal:i,bound:qo(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:qo(),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,...p)=>{const m=p.length?p[0]:d;return a.ctx&&i(a.ctx[c],a.ctx[c]=m)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](m),f&&Zf(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=jf(e.target);a.fragment&&a.fragment.l(c),c.forEach(C)}else a.fragment&&a.fragment.c();e.intro&&b(t.$$.fragment),I(t,e.target,e.anchor),$a()}ri(l)}class ve{constructor(){$s(this,"$$");$s(this,"$$set")}$destroy(){M(this,1),this.$destroy=ce}$on(e,n){if(!Xn(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&&!Mf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Xf="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xf);var Ir=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(){}},Dr=typeof window>"u"||"Deno"in globalThis;function Ht(){}function Jf(t,e){return typeof t=="function"?t(e):t}function Qs(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ta(t,e){return Math.max(t+(e||0)-Date.now(),0)}function mr(t,e){return typeof t=="function"?t(e):t}function Kt(t,e){return typeof t=="function"?t(e):t}function zo(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==wo(o,e.options))return!1}else if(!li(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 Go(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(zn(e.options.mutationKey)!==zn(s))return!1}else if(!li(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function wo(t,e){return((e==null?void 0:e.queryKeyHashFn)||zn)(t)}function zn(t){return JSON.stringify(t,(e,n)=>zs(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function li(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!li(t[n],e[n])):!1}function Sa(t,e){if(t===e)return t;const n=Yo(t)&&Yo(e);if(n||zs(t)&&zs(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]=Sa(t[f],e[f]),u[f]===t[f]&&t[f]!==void 0&&l++)}return i===o&&l===i?t:u}return e}function Ji(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 Yo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zs(t){if(!Zo(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Zo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Zo(t){return Object.prototype.toString.call(t)==="[object Object]"}function xf(t){return new Promise(e=>{setTimeout(e,t)})}function Gs(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Sa(t,e):e}function ec(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function tc(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Oo=Symbol();function Da(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Oo?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Hn,bn,gr,aa,nc=(aa=class extends Ir{constructor(){super();be(this,Hn);be(this,bn);be(this,gr);se(this,gr,e=>{if(!Dr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,bn)||this.setEventListener(S(this,gr))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,bn))==null||e.call(this),se(this,bn,void 0))}setEventListener(e){var n;se(this,gr,e),(n=S(this,bn))==null||n.call(this),se(this,bn,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){S(this,Hn)!==e&&(se(this,Hn,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof S(this,Hn)=="boolean"?S(this,Hn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hn=new WeakMap,bn=new WeakMap,gr=new WeakMap,aa),Ao=new nc,br,yn,yr,fa,rc=(fa=class extends Ir{constructor(){super();be(this,br,!0);be(this,yn);be(this,yr);se(this,yr,e=>{if(!Dr&&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(){S(this,yn)||this.setEventListener(S(this,yr))}onUnsubscribe(){var e;this.hasListeners()||((e=S(this,yn))==null||e.call(this),se(this,yn,void 0))}setEventListener(e){var n;se(this,yr,e),(n=S(this,yn))==null||n.call(this),se(this,yn,e(this.setOnline.bind(this)))}setOnline(e){S(this,br)!==e&&(se(this,br,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return S(this,br)}},br=new WeakMap,yn=new WeakMap,yr=new WeakMap,fa),xi=new rc;function Ys(){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 ic(t){return Math.min(1e3*2**t,3e4)}function Ra(t){return(t??"online")==="online"?xi.isOnline():!0}var Pa=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ds(t){return t instanceof Pa}function Fa(t){let e=!1,n=0,r=!1,i;const s=Ys(),o=h=>{var v;r||(d(new Pa(h)),(v=t.abort)==null||v.call(t))},u=()=>{e=!0},l=()=>{e=!1},a=()=>Ao.isFocused()&&(t.networkMode==="always"||xi.isOnline())&&t.canRun(),f=()=>Ra(t.networkMode)&&t.canRun(),c=h=>{var v;r||(r=!0,(v=t.onSuccess)==null||v.call(t,h),i==null||i(),s.resolve(h))},d=h=>{var v;r||(r=!0,(v=t.onError)==null||v.call(t,h),i==null||i(),s.reject(h))},p=()=>new Promise(h=>{var v;i=g=>{(r||a())&&h(g)},(v=t.onPause)==null||v.call(t)}).then(()=>{var h;i=void 0,r||(h=t.onContinue)==null||h.call(t)}),m=()=>{if(r)return;let h;const v=n===0?t.initialPromise:void 0;try{h=v??t.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(c).catch(g=>{var k;if(r)return;const _=t.retry??(Dr?0:3),E=t.retryDelay??ic,A=typeof E=="function"?E(n,g):E,$=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,g);if(e||!$){d(g);return}n++,(k=t.onFail)==null||k.call(t,n,g),xf(A).then(()=>a()?void 0:p()).then(()=>{e?d(g):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:u,continueRetry:l,canStart:f,start:()=>(f()?m():p().then(m),s)}}function sc(){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 at=sc(),Vn,ca,La=(ca=class{constructor(){be(this,Vn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qs(this.gcTime)&&se(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dr?1/0:5*60*1e3))}clearGcTimeout(){S(this,Vn)&&(clearTimeout(S(this,Vn)),se(this,Vn,void 0))}},Vn=new WeakMap,ca),vr,kr,Nt,Ot,hi,Bn,Ut,sn,da,oc=(da=class extends La{constructor(e){super();be(this,Ut);be(this,vr);be(this,kr);be(this,Nt);be(this,Ot);be(this,hi);be(this,Bn);se(this,Bn,!1),se(this,hi,e.defaultOptions),this.setOptions(e.options),this.observers=[],se(this,Nt,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,se(this,vr,lc(this.options)),this.state=e.state??S(this,vr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=S(this,Ot))==null?void 0:e.promise}setOptions(e){this.options={...S(this,hi),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Nt).remove(this)}setData(e,n){const r=Gs(this.state.data,e,this.options);return Se(this,Ut,sn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Se(this,Ut,sn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=S(this,Ot))==null?void 0:r.promise;return(i=S(this,Ot))==null||i.cancel(e),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,vr))}isActive(){return this.observers.some(e=>Kt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oo||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||!Ta(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,Ot))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=S(this,Ot))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),S(this,Nt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(S(this,Ot)&&(S(this,Bn)?S(this,Ot).cancel({revert:!0}):S(this,Ot).cancelRetry()),this.scheduleGc()),S(this,Nt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Ut,sn).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(S(this,Ot))return S(this,Ot).continueRetry(),S(this,Ot).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:()=>(se(this,Bn,!0),r.signal)})},s=()=>{const c=Da(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),se(this,Bn,!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),se(this,kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&Se(this,Ut,sn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const u=c=>{var d,p,m,h;Ds(c)&&c.silent||Se(this,Ut,sn).call(this,{type:"error",error:c}),Ds(c)||((p=(d=S(this,Nt).config).onError)==null||p.call(d,c,this),(h=(m=S(this,Nt).config).onSettled)==null||h.call(m,this.state.data,c,this)),this.scheduleGc()};return se(this,Ot,Fa({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var d,p,m,h;if(c===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){u(v);return}(p=(d=S(this,Nt).config).onSuccess)==null||p.call(d,c,this),(h=(m=S(this,Nt).config).onSettled)==null||h.call(m,c,this.state.error,this),this.scheduleGc()},onError:u,onFail:(c,d)=>{Se(this,Ut,sn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{Se(this,Ut,sn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Ut,sn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,Ot).start()}},vr=new WeakMap,kr=new WeakMap,Nt=new WeakMap,Ot=new WeakMap,hi=new WeakMap,Bn=new WeakMap,Ut=new WeakSet,sn=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,...Ia(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 Ds(i)&&i.revert&&S(this,kr)?{...S(this,kr),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),at.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Nt).notify({query:this,type:"updated",action:e})})},da);function Ia(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ra(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function lc(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,ma,uc=(ma=class extends Ir{constructor(e={}){super();be(this,Yt);this.config=e,se(this,Yt,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??wo(i,n);let o=this.get(s);return o||(o=new oc({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){S(this,Yt).has(e.queryHash)||(S(this,Yt).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=S(this,Yt).get(e.queryHash);n&&(e.destroy(),n===e&&S(this,Yt).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return S(this,Yt).get(e)}getAll(){return[...S(this,Yt).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>zo(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>zo(e,r)):n}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Yt=new WeakMap,ma),Zt,At,Un,Xt,_n,pa,ac=(pa=class extends La{constructor(e){super();be(this,Xt);be(this,Zt);be(this,At);be(this,Un);this.mutationId=e.mutationId,se(this,At,e.mutationCache),se(this,Zt,[]),this.state=e.state||Ma(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){S(this,Zt).includes(e)||(S(this,Zt).push(e),this.clearGcTimeout(),S(this,At).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){se(this,Zt,S(this,Zt).filter(n=>n!==e)),this.scheduleGc(),S(this,At).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){S(this,Zt).length||(this.state.status==="pending"?this.scheduleGc():S(this,At).remove(this))}continue(){var e;return((e=S(this,Un))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,u,l,a,f,c,d,p,m,h,v,g,_,E,A,$,k,L;se(this,Un,Fa({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,W)=>{Se(this,Xt,_n).call(this,{type:"failed",failureCount:R,error:W})},onPause:()=>{Se(this,Xt,_n).call(this,{type:"pause"})},onContinue:()=>{Se(this,Xt,_n).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,At).canRun(this)}));const n=this.state.status==="pending",r=!S(this,Un).canStart();try{if(!n){Se(this,Xt,_n).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=S(this,At).config).onMutate)==null?void 0:s.call(i,e,this));const W=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,e));W!==this.state.context&&Se(this,Xt,_n).call(this,{type:"pending",context:W,variables:e,isPaused:r})}const R=await S(this,Un).start();return await((a=(l=S(this,At).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((p=(d=S(this,At).config).onSettled)==null?void 0:p.call(d,R,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,R,null,e,this.state.context)),Se(this,Xt,_n).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(v=S(this,At).config).onError)==null?void 0:g.call(v,R,e,this.state.context,this)),await((E=(_=this.options).onError)==null?void 0:E.call(_,R,e,this.state.context)),await(($=(A=S(this,At).config).onSettled)==null?void 0:$.call(A,void 0,R,this.state.variables,this.state.context,this)),await((L=(k=this.options).onSettled)==null?void 0:L.call(k,void 0,R,e,this.state.context)),R}finally{Se(this,Xt,_n).call(this,{type:"error",error:R})}}finally{S(this,At).runNext(this)}}},Zt=new WeakMap,At=new WeakMap,Un=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),at.batch(()=>{S(this,Zt).forEach(r=>{r.onMutationUpdate(e)}),S(this,At).notify({mutation:this,type:"updated",action:e})})},pa);function Ma(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,jt,_i,ha,fc=(ha=class extends Ir{constructor(e={}){super();be(this,un);be(this,jt);be(this,_i);this.config=e,se(this,un,new Set),se(this,jt,new Map),se(this,_i,0)}build(e,n,r){const i=new ac({mutationCache:this,mutationId:++Fi(this,_i)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){S(this,un).add(e);const n=Ii(e);if(typeof n=="string"){const r=S(this,jt).get(n);r?r.push(e):S(this,jt).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(S(this,un).delete(e)){const n=Ii(e);if(typeof n=="string"){const r=S(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&&S(this,jt).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ii(e);if(typeof n=="string"){const r=S(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=Ii(e);if(typeof n=="string"){const i=(r=S(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(){at.batch(()=>{S(this,un).forEach(e=>{this.notify({type:"removed",mutation:e})}),S(this,un).clear(),S(this,jt).clear()})}getAll(){return Array.from(S(this,un))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Go(n,r))}findAll(e={}){return this.getAll().filter(n=>Go(e,n))}notify(e){at.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return at.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ht))))}},un=new WeakMap,jt=new WeakMap,_i=new WeakMap,ha);function Ii(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Xo(t){return{onFetch:(e,n)=>{var f,c,d,p,m;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=((p=e.state.data)==null?void 0:p.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let h=!1;const v=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},g=Da(e.options,e.fetchOptions),_=async(E,A,$)=>{if(h)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const k={queryKey:e.queryKey,pageParam:A,direction:$?"backward":"forward",meta:e.options.meta};v(k);const L=await g(k),{maxPages:R}=e.options,W=$?tc:ec;return{pages:W(E.pages,L,R),pageParams:W(E.pageParams,A,R)}};if(i&&s.length){const E=i==="backward",A=E?cc:Jo,$={pages:s,pageParams:o},k=A(r,$);u=await _($,k,E)}else{const E=t??s.length;do{const A=l===0?o[0]??r.initialPageParam:Jo(r,u);if(l>0&&A==null)break;u=await _(u,A),l++}while(l<E)}return u};e.options.persister?e.fetchFn=()=>{var h,v;return(v=(h=e.options).persister)==null?void 0:v.call(h,a,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=a}}}function Jo(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 cc(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,Cr,Er,Cn,wr,Or,_a,Na=(_a=class{constructor(t={}){be(this,nt);be(this,vn);be(this,kn);be(this,Cr);be(this,Er);be(this,Cn);be(this,wr);be(this,Or);se(this,nt,t.queryCache||new uc),se(this,vn,t.mutationCache||new fc),se(this,kn,t.defaultOptions||{}),se(this,Cr,new Map),se(this,Er,new Map),se(this,Cn,0)}mount(){Fi(this,Cn)._++,S(this,Cn)===1&&(se(this,wr,Ao.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,nt).onFocus())})),se(this,Or,xi.subscribe(async t=>{t&&(await this.resumePausedMutations(),S(this,nt).onOnline())})))}unmount(){var t,e;Fi(this,Cn)._--,S(this,Cn)===0&&((t=S(this,wr))==null||t.call(this),se(this,wr,void 0),(e=S(this,Or))==null||e.call(this),se(this,Or,void 0))}isFetching(t){return S(this,nt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return S(this,vn).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=S(this,nt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=S(this,nt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(mr(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return S(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=S(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Jf(e,s);if(o!==void 0)return S(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return at.batch(()=>S(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=S(this,nt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=S(this,nt);at.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=S(this,nt),r={type:"active",...t};return at.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=at.batch(()=>S(this,nt).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(t,e={}){return at.batch(()=>{if(S(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=at.batch(()=>S(this,nt).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=S(this,nt).build(this,e);return n.isStaleByTime(mr(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ht).catch(Ht)}fetchInfiniteQuery(t){return t.behavior=Xo(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ht).catch(Ht)}ensureInfiniteQueryData(t){return t.behavior=Xo(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return xi.isOnline()?S(this,vn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,nt)}getMutationCache(){return S(this,vn)}getDefaultOptions(){return S(this,kn)}setDefaultOptions(t){se(this,kn,t)}setQueryDefaults(t,e){S(this,Cr).set(zn(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...S(this,Cr).values()],n={};return e.forEach(r=>{li(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){S(this,Er).set(zn(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...S(this,Er).values()];let n={};return e.forEach(r=>{li(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...S(this,kn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=wo(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===Oo&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...S(this,kn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){S(this,nt).clear(),S(this,vn).clear()}},nt=new WeakMap,vn=new WeakMap,kn=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Cn=new WeakMap,wr=new WeakMap,Or=new WeakMap,_a),St,Ve,gi,$t,jn,Ar,En,Jt,bi,$r,Tr,Kn,qn,wn,Sr,Ye,ei,Zs,Xs,Js,xs,eo,to,no,Ha,ga,dc=(ga=class extends Ir{constructor(e,n){super();be(this,Ye);be(this,St);be(this,Ve);be(this,gi);be(this,$t);be(this,jn);be(this,Ar);be(this,En);be(this,Jt);be(this,bi);be(this,$r);be(this,Tr);be(this,Kn);be(this,qn);be(this,wn);be(this,Sr,new Set);this.options=n,se(this,St,e),se(this,Jt,null),se(this,En,Ys()),this.options.experimental_prefetchInRender||S(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&&(S(this,Ve).addObserver(this),xo(S(this,Ve),this.options)?Se(this,Ye,ei).call(this):this.updateResult(),Se(this,Ye,xs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ro(S(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ro(S(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ye,eo).call(this),Se(this,Ye,to).call(this),S(this,Ve).removeObserver(this)}setOptions(e,n){const r=this.options,i=S(this,Ve);if(this.options=S(this,St).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,S(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ye,no).call(this),S(this,Ve).setOptions(this.options),r._defaulted&&!Ji(this.options,r)&&S(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Ve),observer:this});const s=this.hasListeners();s&&el(S(this,Ve),i,this.options,r)&&Se(this,Ye,ei).call(this),this.updateResult(n),s&&(S(this,Ve)!==i||Kt(this.options.enabled,S(this,Ve))!==Kt(r.enabled,S(this,Ve))||mr(this.options.staleTime,S(this,Ve))!==mr(r.staleTime,S(this,Ve)))&&Se(this,Ye,Zs).call(this);const o=Se(this,Ye,Xs).call(this);s&&(S(this,Ve)!==i||Kt(this.options.enabled,S(this,Ve))!==Kt(r.enabled,S(this,Ve))||o!==S(this,wn))&&Se(this,Ye,Js).call(this,o)}getOptimisticResult(e){const n=S(this,St).getQueryCache().build(S(this,St),e),r=this.createResult(n,e);return pc(this,r)&&(se(this,$t,r),se(this,Ar,this.options),se(this,jn,S(this,Ve).state)),r}getCurrentResult(){return S(this,$t)}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){S(this,Sr).add(e)}getCurrentQuery(){return S(this,Ve)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=S(this,St).defaultQueryOptions(e),r=S(this,St).getQueryCache().build(S(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return Se(this,Ye,ei).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,$t)))}createResult(e,n){var R;const r=S(this,Ve),i=this.options,s=S(this,$t),o=S(this,jn),u=S(this,Ar),a=e!==r?e.state:S(this,gi),{state:f}=e;let c={...f},d=!1,p;if(n._optimisticResults){const W=this.hasListeners(),j=!W&&xo(e,n),T=W&&el(e,r,n,i);(j||T)&&(c={...c,...Ia(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:v}=c;if(n.select&&c.data!==void 0)if(s&&c.data===(o==null?void 0:o.data)&&n.select===S(this,bi))p=S(this,$r);else try{se(this,bi,n.select),p=n.select(c.data),p=Gs(s==null?void 0:s.data,p,n),se(this,$r,p),se(this,Jt,null)}catch(W){se(this,Jt,W)}else p=c.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let W;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))W=s.data;else if(W=typeof n.placeholderData=="function"?n.placeholderData((R=S(this,Tr))==null?void 0:R.state.data,S(this,Tr)):n.placeholderData,n.select&&W!==void 0)try{W=n.select(W),se(this,Jt,null)}catch(j){se(this,Jt,j)}W!==void 0&&(v="success",p=Gs(s==null?void 0:s.data,W,n),d=!0)}S(this,Jt)&&(m=S(this,Jt),p=S(this,$r),h=Date.now(),v="error");const g=c.fetchStatus==="fetching",_=v==="pending",E=v==="error",A=_&&g,$=p!==void 0,L={status:v,fetchStatus:c.fetchStatus,isPending:_,isSuccess:v==="success",isError:E,isInitialLoading:A,isLoading:A,data:p,dataUpdatedAt:c.dataUpdatedAt,error:m,errorUpdatedAt:h,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:g,isRefetching:g&&!_,isLoadingError:E&&!$,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:E&&$,isStale:$o(e,n),refetch:this.refetch,promise:S(this,En)};if(this.options.experimental_prefetchInRender){const W=U=>{L.status==="error"?U.reject(L.error):L.data!==void 0&&U.resolve(L.data)},j=()=>{const U=se(this,En,L.promise=Ys());W(U)},T=S(this,En);switch(T.status){case"pending":e.queryHash===r.queryHash&&W(T);break;case"fulfilled":(L.status==="error"||L.data!==T.value)&&j();break;case"rejected":(L.status!=="error"||L.error!==T.reason)&&j();break}}return L}updateResult(e){const n=S(this,$t),r=this.createResult(S(this,Ve),this.options);if(se(this,jn,S(this,Ve).state),se(this,Ar,this.options),S(this,jn).data!==void 0&&se(this,Tr,S(this,Ve)),Ji(r,n))return;se(this,$t,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!S(this,Sr).size)return!0;const l=new Set(u??S(this,Sr));return this.options.throwOnError&&l.add("error"),Object.keys(S(this,$t)).some(a=>{const f=a;return S(this,$t)[f]!==n[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Se(this,Ye,Ha).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ye,xs).call(this)}},St=new WeakMap,Ve=new WeakMap,gi=new WeakMap,$t=new WeakMap,jn=new WeakMap,Ar=new WeakMap,En=new WeakMap,Jt=new WeakMap,bi=new WeakMap,$r=new WeakMap,Tr=new WeakMap,Kn=new WeakMap,qn=new WeakMap,wn=new WeakMap,Sr=new WeakMap,Ye=new WeakSet,ei=function(e){Se(this,Ye,no).call(this);let n=S(this,Ve).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ht)),n},Zs=function(){Se(this,Ye,eo).call(this);const e=mr(this.options.staleTime,S(this,Ve));if(Dr||S(this,$t).isStale||!Qs(e))return;const r=Ta(S(this,$t).dataUpdatedAt,e)+1;se(this,Kn,setTimeout(()=>{S(this,$t).isStale||this.updateResult()},r))},Xs=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Ve)):this.options.refetchInterval)??!1},Js=function(e){Se(this,Ye,to).call(this),se(this,wn,e),!(Dr||Kt(this.options.enabled,S(this,Ve))===!1||!Qs(S(this,wn))||S(this,wn)===0)&&se(this,qn,setInterval(()=>{(this.options.refetchIntervalInBackground||Ao.isFocused())&&Se(this,Ye,ei).call(this)},S(this,wn)))},xs=function(){Se(this,Ye,Zs).call(this),Se(this,Ye,Js).call(this,Se(this,Ye,Xs).call(this))},eo=function(){S(this,Kn)&&(clearTimeout(S(this,Kn)),se(this,Kn,void 0))},to=function(){S(this,qn)&&(clearInterval(S(this,qn)),se(this,qn,void 0))},no=function(){const e=S(this,St).getQueryCache().build(S(this,St),this.options);if(e===S(this,Ve))return;const n=S(this,Ve);se(this,Ve,e),se(this,gi,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},Ha=function(e){at.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(S(this,$t))}),S(this,St).getQueryCache().notify({query:S(this,Ve),type:"observerResultsUpdated"})})},ga);function mc(t,e){return Kt(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function xo(t,e){return mc(t,e)||t.state.data!==void 0&&ro(t,e,e.refetchOnMount)}function ro(t,e,n){if(Kt(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&$o(t,e)}return!1}function el(t,e,n,r){return(t!==e||Kt(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&$o(t,n)}function $o(t,e){return Kt(e.enabled,t)!==!1&&t.isStaleByTime(mr(e.staleTime,t))}function pc(t,e){return!Ji(t.getCurrentResult(),e)}var On,An,Dt,an,dn,Wi,io,ba,hc=(ba=class extends Ir{constructor(n,r){super();be(this,dn);be(this,On);be(this,An);be(this,Dt);be(this,an);se(this,On,n),this.setOptions(r),this.bindMethods(),Se(this,dn,Wi).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=S(this,On).defaultMutationOptions(n),Ji(this.options,r)||S(this,On).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Dt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&zn(r.mutationKey)!==zn(this.options.mutationKey)?this.reset():((i=S(this,Dt))==null?void 0:i.state.status)==="pending"&&S(this,Dt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=S(this,Dt))==null||n.removeObserver(this)}onMutationUpdate(n){Se(this,dn,Wi).call(this),Se(this,dn,io).call(this,n)}getCurrentResult(){return S(this,An)}reset(){var n;(n=S(this,Dt))==null||n.removeObserver(this),se(this,Dt,void 0),Se(this,dn,Wi).call(this),Se(this,dn,io).call(this)}mutate(n,r){var i;return se(this,an,r),(i=S(this,Dt))==null||i.removeObserver(this),se(this,Dt,S(this,On).getMutationCache().build(S(this,On),this.options)),S(this,Dt).addObserver(this),S(this,Dt).execute(n)}},On=new WeakMap,An=new WeakMap,Dt=new WeakMap,an=new WeakMap,dn=new WeakSet,Wi=function(){var r;const n=((r=S(this,Dt))==null?void 0:r.state)??Ma();se(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})},io=function(n){at.batch(()=>{var r,i,s,o,u,l,a,f;if(S(this,an)&&this.hasListeners()){const c=S(this,An).variables,d=S(this,An).context;(n==null?void 0:n.type)==="success"?((i=(r=S(this,an)).onSuccess)==null||i.call(r,n.data,c,d),(o=(s=S(this,an)).onSettled)==null||o.call(s,n.data,null,c,d)):(n==null?void 0:n.type)==="error"&&((l=(u=S(this,an)).onError)==null||l.call(u,n.error,c,d),(f=(a=S(this,an)).onSettled)==null||f.call(a,void 0,n.error,c,d))}this.listeners.forEach(c=>{c(S(this,An))})})},ba);const or=[];function yt(t,e){return{subscribe:Pe(t,e).subscribe}}function Pe(t,e=ce){let n;const r=new Set;function i(u){if(fe(t,u)&&(t=u,n)){const l=!or.length;for(const a of r)a[1](),or.push(a,t);if(l){for(let a=0;a<or.length;a+=2)or[a][0](or[a+1]);or.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 Be(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 yt(n,(o,u)=>{let l=!1;const a=[];let f=0,c=ce;const d=()=>{if(f)return;c();const m=e(r?a[0]:a,o,u);s?o(m):c=Xn(m)?m:ce},p=i.map((m,h)=>bo(m,v=>{a[h]=v,f&=~(1<<h),l&&d()},()=>{f|=1<<h}));return l=!0,d(),function(){Te(p),c(),l=!1}})}function tl(t){return{subscribe:t.subscribe.bind(t)}}const Va="$$_queryClient",_c=()=>{const t=st(Va);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},gc=t=>{ft(Va,t)},bc="$$_isRestoring",yc=()=>{try{const t=st(bc);return t||yt(!1)}catch{return yt(!1)}};function vc(){return yc()}function kt(t){return _c()}function Ba(t){return"subscribe"in t&&typeof t.subscribe=="function"}function Ua(){}function kc(t,e,n){const r=kt(),i=vc(),s=Ba(t)?t:yt(t),o=Be([s,i],([f,c])=>{const d=r.defaultQueryOptions(f);return d._optimisticResults=c?"isRestoring":"optimistic",d}),u=new e(r,Lr(o));o.subscribe(f=>{u.setOptions(f,{listeners:!1})});const l=Be(i,(f,c)=>{const d=f?Ua:u.subscribe(at.batchCalls(c));return u.updateResult(),d}),{subscribe:a}=Be([l,o],([f,c])=>(f=u.getOptimisticResult(c),c.notifyOnChangeProps?f:u.trackResult(f)));return{subscribe:a}}function Rr(t,e){return kc(t,dc)}function ki(t,e){const n=kt(),r=Ba(t)?t:yt(t),i=new hc(n,Lr(r));let s;r.subscribe(l=>{s=(a,f)=>{i.mutate(a,f).catch(Ua)},i.setOptions(l)});const o=yt(i.getCurrentResult(),l=>i.subscribe(at.batchCalls(a=>l(a)))),{subscribe:u}=Be(o,l=>({...l,mutate:s,mutateAsync:l.mutate}));return{subscribe:u}}function Cc(t){let e;const n=t[2].default,r=pe(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)&&_e(r,n,i,i[1],e?he(n,i[1],s,null):ge(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ec(t,e,n){let{$$slots:r={},$$scope:i}=e,{client:s=new Na}=e;return cs(()=>{s.mount()}),gc(s),ds(()=>{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 wc extends ve{constructor(e){super(),ye(this,e,Ec,Cc,fe,{client:0})}}var nl=Object.prototype.hasOwnProperty;function rl(t,e,n){for(n of t.keys())if(pr(n,e))return n}function pr(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--&&pr(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=rl(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=rl(e,i),!i)||!pr(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(nl.call(t,n)&&++r&&!nl.call(e,n)||!(n in e)||!pr(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}function S0(t,e,n,r=!0){const i=e-n;return i<=0?r?t[t.length-1]:t[0]:t[i]}function D0(t,e,n,r=!0){const i=e+n;return i>t.length-1?r?t[0]:t[t.length-1]:t[i]}function R0(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function P0(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function Oc(t){return t[t.length-1]}function Ac(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function F0(t,e,n=pr){const r=e.findIndex(i=>n(i,t));return r!==-1?e.splice(r,1):e.push(t),e}function Ft(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}function ii(t){return t?!0:void 0}Ft({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function ms(t){if(t!==null)return""}function il(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function L0(t){if(!ht)return null;const e=document.querySelector(`[data-melt-id="${t}"]`);return x(e)?e:null}const Mi=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),sl=t=>typeof t=="function";Fe("empty");function Fe(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Be(n,u=>{const l=i(u);if(sl(l)){const a=(...f)=>Mi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,a}return Mi({...l,[`data-melt-${t}`]:"",action:r??ze})});{const u=i,l=u==null?void 0:u();if(sl(l)){const a=(...f)=>Mi({...l(...f),[`data-melt-${t}`]:"",action:r??ze});return a.action=r??ze,il(a)}return il(Mi({...l,[`data-melt-${t}`]:"",action:r??ze}))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Jn(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 ht=typeof document<"u",ja=t=>typeof t=="function";function Ci(t){return t instanceof Element}function x(t){return t instanceof HTMLElement}function I0(t){return t instanceof HTMLInputElement}function M0(t){return t instanceof HTMLLabelElement}function N0(t){return t instanceof HTMLButtonElement}function on(t){const e=t.getAttribute("aria-disabled"),n=t.getAttribute("disabled"),r=t.hasAttribute("data-disabled");return!!(e==="true"||n!==null||r)}function H0(t){return x(t)?t.isContentEditable:!1}function $c(t){return t!==null&&typeof t=="object"}function Ka(t){return $c(t)&&"subscribe"in t}function rt(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ze(){}function bt(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=Sc(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Tc(t){const e=t.currentTarget;if(!x(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Sc(t){return e=>{const n=Tc(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function so(t){t.setAttribute("data-highlighted","")}function gn(t){t.removeAttribute("data-highlighted")}const ui=t=>{try{cs(t)}catch{return t}},qa=t=>{try{ds(t)}catch{return t}};function Mr(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function V0(t,e,n){return Object.fromEntries(Object.entries(t).filter(([r,i])=>!pr(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:()=>Lr(t)}}Xe.writable=function(t){const e=Pe(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 hr=(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 fn(t){return new Promise(e=>setTimeout(e,t))}let Rc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Wa=(t=21)=>{let e="",n=t|0;for(;n--;)e+=Rc[Math.random()*64|0];return e};function Pc(){return Wa(10)}function ai(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"},Fc=[ae.ARROW_DOWN,ae.PAGE_UP,ae.HOME],Lc=[ae.ARROW_UP,ae.PAGE_DOWN,ae.END],oo=[...Fc,...Lc],fi=[ae.ENTER,ae.SPACE],Ic=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_LEFT:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN})[e],Mc=(t="ltr",e="horizontal")=>({horizontal:t==="rtl"?ae.ARROW_RIGHT:ae.ARROW_LEFT,vertical:ae.ARROW_UP})[e],B0=(t="ltr",e="horizontal")=>({nextKey:Ic(t,e),prevKey:Mc(t,e)});function Nc(t,e=500){let n=null;return function(...r){const i=()=>{n=null,t(...r)};n&&clearTimeout(n),n=setTimeout(i,e)}}const Qa=()=>typeof window<"u";function Hc(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const za=t=>Qa()&&t.test(Hc().toLowerCase()),Vc=()=>Qa()&&!!navigator.maxTouchPoints,Bc=()=>za(/^mac/)&&!Vc(),Uc=()=>za(/mac|iphone|ipad|ipod/i),jc=()=>Uc()&&!Bc(),Rs="data-melt-scroll-lock";function ol(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Kc(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 qc(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function To(t){const e=document,n=e.defaultView??window,{documentElement:r,body:i}=e;if(i.hasAttribute(Rs))return ze;i.setAttribute(Rs,"");const o=n.innerWidth-r.clientWidth,u=()=>Kc(r,"--scrollbar-width",`${o}px`),l=qc(r),a=n.getComputedStyle(i)[l],f=()=>ol(i,{overflow:"hidden",[l]:`calc(${a} + ${o}px)`}),c=()=>{const{scrollX:p,scrollY:m,visualViewport:h}=n,v=(h==null?void 0:h.offsetLeft)??0,g=(h==null?void 0:h.offsetTop)??0,_=ol(i,{position:"fixed",overflow:"hidden",top:`${-(m-Math.floor(g))}px`,left:`${-(p-Math.floor(v))}px`,right:"0",[l]:`calc(${a} + ${o}px)`});return()=>{_==null||_(),n.scrollTo(p,m)}},d=[u(),jc()?c():f()];return()=>{d.forEach(p=>p==null?void 0:p()),i.removeAttribute(Rs)}}function es(t){const{open:e,forceVisible:n,activeTrigger:r}=t;return Be([e,n,r],([i,s,o])=>(i||s)&&o!==null)}function xe(t,e){let n;const r=Be(t,s=>{n==null||n(),n=e(s)}).subscribe(ze),i=()=>{r(),n==null||n()};return qa(i),i}function It(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];e[r]=Xe(Pe(i))}),e}function et(t){ht&&fn(1).then(()=>{const e=document.activeElement;!x(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Ga(){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 Ya(t){const e=Ga(),r=e.indexOf(t)+1,i=e[r];return r<e.length&&x(i)?i:null}function Za(t){const e=Ga(),r=e.indexOf(t)-1,i=e[r];return r>=0&&x(i)?i:null}const Wc=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Qc={onMatch:et,getCurrentItem:()=>document.activeElement};function zc(t={}){const e={...Qc,...t},n=Xe(Pe([])),r=Nc(()=>{n.update(()=>[])});return{typed:n,resetTyped:r,handleTypeaheadSearch:(s,o)=>{if(Wc.has(s))return;const u=e.getCurrentItem(),l=Lr(n);if(!Array.isArray(l))return;l.push(s.toLowerCase()),n.set(l);const a=o.filter(v=>!(v.getAttribute("disabled")==="true"||v.getAttribute("aria-disabled")==="true"||v.hasAttribute("data-disabled"))),c=l.length>1&&l.every(v=>v===l[0])?l[0]:l.join(""),d=x(u)?a.indexOf(u):-1;let p=Ac(a,Math.max(d,0));c.length===1&&(p=p.filter(v=>v!==u));const h=p.find(v=>(v==null?void 0:v.innerText)&&v.innerText.toLowerCase().startsWith(c.toLowerCase()));x(h)&&h!==u&&e.onMatch(h),r()}}}function Gc(t){let e=t.parentElement;for(;x(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Pr(t,e){return e!==void 0?e:Gc(t)==="body"?document.body:null}async function ci(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([fn(1),qt]),e===void 0){n==null||n.focus();return}const r=ja(e)?e(n):e;if(typeof r=="string"){const i=document.querySelector(r);if(!x(i))return;i.focus()}else x(r)&&r.focus()}yt(void 0,t=>{function e(r){t(r),t(void 0)}return bt(document,"pointerup",e,{passive:!1,capture:!0})});const Yc=yt(void 0,t=>{function e(r){r&&r.key===ae.ESCAPE&&t(r),t(void 0)}return bt(document,"keydown",e,{passive:!1})}),di=(t,e={})=>{let n=ze;function r(i={}){n();const s={enabled:!0,...i},o=Ka(s.enabled)?s.enabled:yt(s.enabled);n=rt(Yc.subscribe(u=>{var a;if(!u||!Lr(o))return;const l=u.target;if(!(!x(l)||l.closest("[data-escapee]")!==t)){if(u.preventDefault(),s.ignore){if(ja(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()}}},Tn=Math.min,Pt=Math.max,ts=Math.round,Ni=Math.floor,en=t=>({x:t,y:t}),Zc={left:"right",right:"left",bottom:"top",top:"bottom"},Xc={start:"end",end:"start"};function lo(t,e,n){return Pt(t,Tn(e,n))}function Nr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Hr(t){return t.split("-")[1]}function Xa(t){return t==="x"?"y":"x"}function So(t){return t==="y"?"height":"width"}function Gn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function Do(t){return Xa(Gn(t))}function Jc(t,e,n){n===void 0&&(n=!1);const r=Hr(t),i=Do(t),s=So(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ns(o)),[o,ns(o)]}function xc(t){const e=ns(t);return[uo(t),e,uo(e)]}function uo(t){return t.replace(/start|end/g,e=>Xc[e])}function ed(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 td(t,e,n,r){const i=Hr(t);let s=ed(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(uo)))),s}function ns(t){return t.replace(/left|right|bottom|top/g,e=>Zc[e])}function nd(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ja(t){return typeof t!="number"?nd(t):{top:t,right:t,bottom:t,left:t}}function rs(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 ll(t,e,n){let{reference:r,floating:i}=t;const s=Gn(e),o=Do(e),u=So(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 p;switch(l){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-i.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Hr(e)){case"start":p[o]-=d*(n&&a?-1:1);break;case"end":p[o]+=d*(n&&a?-1:1);break}return p}const rd=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}=ll(a,r,l),d=r,p={},m=0;for(let h=0;h<u.length;h++){const{name:v,fn:g}=u[h],{x:_,y:E,data:A,reset:$}=await g({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:a,platform:o,elements:{reference:t,floating:e}});f=_??f,c=E??c,p={...p,[v]:{...p[v],...A}},$&&m<=50&&(m++,typeof $=="object"&&($.placement&&(d=$.placement),$.rects&&(a=$.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):$.rects),{x:f,y:c}=ll(a,d,l)),h=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:p}};async function Ro(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:p=0}=Nr(e,t),m=Ja(p),v=u[d?c==="floating"?"reference":"floating":c],g=rs(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:a,rootBoundary:f,strategy:l})),_=c==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),A=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},$=rs(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:E,strategy:l}):_);return{top:(g.top-$.top+m.top)/A.y,bottom:($.bottom-g.bottom+m.bottom)/A.y,left:(g.left-$.left+m.left)/A.x,right:($.right-g.right+m.right)/A.x}}const id=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}=Nr(t,e)||{};if(a==null)return{};const c=Ja(f),d={x:n,y:r},p=Do(i),m=So(p),h=await o.getDimensions(a),v=p==="y",g=v?"top":"left",_=v?"bottom":"right",E=v?"clientHeight":"clientWidth",A=s.reference[m]+s.reference[p]-d[p]-s.floating[m],$=d[p]-s.reference[p],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a));let L=k?k[E]:0;(!L||!await(o.isElement==null?void 0:o.isElement(k)))&&(L=u.floating[E]||s.floating[m]);const R=A/2-$/2,W=L/2-h[m]/2-1,j=Tn(c[g],W),T=Tn(c[_],W),U=j,O=L-h[m]-T,F=L/2-h[m]/2+R,V=lo(U,F,O),B=!l.arrow&&Hr(i)!=null&&F!==V&&s.reference[m]/2-(F<U?j:T)-h[m]/2<0,ee=B?F<U?F-U:F-O:0;return{[p]:d[p]+ee,data:{[p]:V,centerOffset:F-V-ee,...B&&{alignmentOffset:ee}},reset:B}}}),sd=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:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Nr(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Sn(i),_=Gn(u),E=Sn(u)===u,A=await(l.isRTL==null?void 0:l.isRTL(a.floating)),$=d||(E||!h?[ns(u)]:xc(u)),k=m!=="none";!d&&k&&$.push(...td(u,h,m,A));const L=[u,...$],R=await Ro(e,v),W=[];let j=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&W.push(R[g]),c){const F=Jc(i,o,A);W.push(R[F[0]],R[F[1]])}if(j=[...j,{placement:i,overflows:W}],!W.every(F=>F<=0)){var T,U;const F=(((T=s.flip)==null?void 0:T.index)||0)+1,V=L[F];if(V)return{data:{index:F,overflows:j},reset:{placement:V}};let B=(U=j.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:U.placement;if(!B)switch(p){case"bestFit":{var O;const ee=(O=j.filter(te=>{if(k){const z=Gn(te.placement);return z===_||z==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(z=>z>0).reduce((z,oe)=>z+oe,0)]).sort((te,z)=>te[1]-z[1])[0])==null?void 0:O[0];ee&&(B=ee);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};async function od(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=Hr(n),l=Gn(n)==="y",a=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=Nr(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return u&&typeof m=="number"&&(p=u==="end"?m*-1:m),l?{x:p*f,y:d*a}:{x:d*a,y:p*f}}const ld=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 od(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}}}}},ud=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:v=>{let{x:g,y:_}=v;return{x:g,y:_}}},...l}=Nr(t,e),a={x:n,y:r},f=await Ro(e,l),c=Gn(Sn(i)),d=Xa(c);let p=a[d],m=a[c];if(s){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",_=p+f[v],E=p-f[g];p=lo(_,p,E)}if(o){const v=c==="y"?"top":"left",g=c==="y"?"bottom":"right",_=m+f[v],E=m-f[g];m=lo(_,m,E)}const h=u.fn({...e,[d]:p,[c]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:s,[c]:o}}}}}},ad=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}=Nr(t,e),f=await Ro(e,a),c=Sn(i),d=Hr(i),p=Gn(i)==="y",{width:m,height:h}=s.floating;let v,g;c==="top"||c==="bottom"?(v=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(g=c,v=d==="end"?"top":"bottom");const _=h-f.top-f.bottom,E=m-f.left-f.right,A=Tn(h-f[v],_),$=Tn(m-f[g],E),k=!e.middlewareData.shift;let L=A,R=$;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(L=_),k&&!d){const j=Pt(f.left,0),T=Pt(f.right,0),U=Pt(f.top,0),O=Pt(f.bottom,0);p?R=m-2*(j!==0||T!==0?j+T:Pt(f.left,f.right)):L=h-2*(U!==0||O!==0?U+O:Pt(f.top,f.bottom))}await l({...e,availableWidth:R,availableHeight:L});const W=await o.getDimensions(u.floating);return m!==W.width||h!==W.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function Vr(t){return xa(t)?(t.nodeName||"").toLowerCase():"#document"}function Mt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rn(t){var e;return(e=(xa(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function xa(t){return ps()?t instanceof Node||t instanceof Mt(t).Node:!1}function Wt(t){return ps()?t instanceof Element||t instanceof Mt(t).Element:!1}function nn(t){return ps()?t instanceof HTMLElement||t instanceof Mt(t).HTMLElement:!1}function ul(t){return!ps()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Mt(t).ShadowRoot}function Ei(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Qt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function fd(t){return["table","td","th"].includes(Vr(t))}function hs(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Po(t){const e=Fo(),n=Wt(t)?Qt(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 cd(t){let e=Dn(t);for(;nn(e)&&!Fr(e);){if(Po(e))return e;if(hs(e))return null;e=Dn(e)}return null}function Fo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(t){return["html","body","#document"].includes(Vr(t))}function Qt(t){return Mt(t).getComputedStyle(t)}function _s(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dn(t){if(Vr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ul(t)&&t.host||rn(t);return ul(e)?e.host:e}function ef(t){const e=Dn(t);return Fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:nn(e)&&Ei(e)?e:ef(e)}function mi(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ef(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Mt(i);if(s){const u=ao(o);return e.concat(o,o.visualViewport||[],Ei(i)?i:[],u&&n?mi(u):[])}return e.concat(i,mi(i,[],n))}function ao(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function tf(t){const e=Qt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=nn(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,u=ts(n)!==s||ts(r)!==o;return u&&(n=s,r=o),{width:n,height:r,$:u}}function Lo(t){return Wt(t)?t:t.contextElement}function _r(t){const e=Lo(t);if(!nn(e))return en(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=tf(e);let o=(s?ts(n.width):n.width)/r,u=(s?ts(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const dd=en(0);function nf(t){const e=Mt(t);return!Fo()||!e.visualViewport?dd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function md(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Mt(t)?!1:e}function Yn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Lo(t);let o=en(1);e&&(r?Wt(r)&&(o=_r(r)):o=_r(t));const u=md(s,n,r)?nf(s):en(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=Mt(s),p=r&&Wt(r)?Mt(r):r;let m=d,h=ao(m);for(;h&&r&&p!==m;){const v=_r(h),g=h.getBoundingClientRect(),_=Qt(h),E=g.left+(h.clientLeft+parseFloat(_.paddingLeft))*v.x,A=g.top+(h.clientTop+parseFloat(_.paddingTop))*v.y;l*=v.x,a*=v.y,f*=v.x,c*=v.y,l+=E,a+=A,m=Mt(h),h=ao(m)}}return rs({width:f,height:c,x:l,y:a})}function Io(t,e){const n=_s(t).scrollLeft;return e?e.left+n:Yn(rn(t)).left+n}function rf(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Io(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function pd(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=rn(r),u=e?hs(e.floating):!1;if(r===o||u&&s)return n;let l={scrollLeft:0,scrollTop:0},a=en(1);const f=en(0),c=nn(r);if((c||!c&&!s)&&((Vr(r)!=="body"||Ei(o))&&(l=_s(r)),nn(r))){const p=Yn(r);a=_r(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const d=o&&!c&&!s?rf(o,l,!0):en(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 hd(t){return Array.from(t.getClientRects())}function _d(t){const e=rn(t),n=_s(t),r=t.ownerDocument.body,i=Pt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Pt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Io(t);const u=-n.scrollTop;return Qt(r).direction==="rtl"&&(o+=Pt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:u}}function gd(t,e){const n=Mt(t),r=rn(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=Fo();(!a||a&&e==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:u,y:l}}function bd(t,e){const n=Yn(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=nn(t)?_r(t):en(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 al(t,e,n){let r;if(e==="viewport")r=gd(t,n);else if(e==="document")r=_d(rn(t));else if(Wt(e))r=bd(e,n);else{const i=nf(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return rs(r)}function sf(t,e){const n=Dn(t);return n===e||!Wt(n)||Fr(n)?!1:Qt(n).position==="fixed"||sf(n,e)}function yd(t,e){const n=e.get(t);if(n)return n;let r=mi(t,[],!1).filter(u=>Wt(u)&&Vr(u)!=="body"),i=null;const s=Qt(t).position==="fixed";let o=s?Dn(t):t;for(;Wt(o)&&!Fr(o);){const u=Qt(o),l=Po(o);!l&&u.position==="fixed"&&(i=null),(s?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ei(o)&&!l&&sf(t,o))?r=r.filter(f=>f!==o):i=u,o=Dn(o)}return e.set(t,r),r}function vd(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?hs(e)?[]:yd(e,this._c):[].concat(n),r],u=o[0],l=o.reduce((a,f)=>{const c=al(e,f,i);return a.top=Pt(c.top,a.top),a.right=Tn(c.right,a.right),a.bottom=Tn(c.bottom,a.bottom),a.left=Pt(c.left,a.left),a},al(e,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kd(t){const{width:e,height:n}=tf(t);return{width:e,height:n}}function Cd(t,e,n){const r=nn(e),i=rn(e),s=n==="fixed",o=Yn(t,!0,s,e);let u={scrollLeft:0,scrollTop:0};const l=en(0);if(r||!r&&!s)if((Vr(e)!=="body"||Ei(i))&&(u=_s(e)),r){const d=Yn(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=Io(i));const a=i&&!r&&!s?rf(i,u):en(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 Ps(t){return Qt(t).position==="static"}function fl(t,e){if(!nn(t)||Qt(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return rn(t)===n&&(n=n.ownerDocument.body),n}function of(t,e){const n=Mt(t);if(hs(t))return n;if(!nn(t)){let i=Dn(t);for(;i&&!Fr(i);){if(Wt(i)&&!Ps(i))return i;i=Dn(i)}return n}let r=fl(t,e);for(;r&&fd(r)&&Ps(r);)r=fl(r,e);return r&&Fr(r)&&Ps(r)&&!Po(r)?n:r||cd(t)||n}const Ed=async function(t){const e=this.getOffsetParent||of,n=this.getDimensions,r=await n(t.floating);return{reference:Cd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wd(t){return Qt(t).direction==="rtl"}const Od={convertOffsetParentRelativeRectToViewportRelativeRect:pd,getDocumentElement:rn,getClippingRect:vd,getOffsetParent:of,getElementRects:Ed,getClientRects:hd,getDimensions:kd,getScale:_r,isElement:Wt,isRTL:wd};function Ad(t,e){let n=null,r;const i=rn(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 p=Ni(f),m=Ni(i.clientWidth-(a+c)),h=Ni(i.clientHeight-(f+d)),v=Ni(a),_={rootMargin:-p+"px "+-m+"px "+-h+"px "+-v+"px",threshold:Pt(0,Tn(1,l))||1};let E=!0;function A($){const k=$[0].intersectionRatio;if(k!==l){if(!E)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E=!1}try{n=new IntersectionObserver(A,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(t)}return o(!0),s}function $d(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=Lo(t),f=i||s?[...a?mi(a):[],...mi(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const c=a&&u?Ad(a,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(g=>{let[_]=g;_&&_.target===a&&p&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var E;(E=p)==null||E.observe(e)})),n()}),a&&!l&&p.observe(a),p.observe(e));let m,h=l?Yn(t):null;l&&v();function v(){const g=Yn(t);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,m=requestAnimationFrame(v)}return n(),()=>{var g;f.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),c==null||c(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Td=ld,Sd=ud,Dd=sd,Rd=ad,Pd=id,Fd=(t,e,n)=>{const r=new Map,i={platform:Od,...n},s={...i.platform,_c:r};return rd(t,e,{...i,platform:s})},Ld={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Id={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Md(t,e,n={}){if(!e||!t||n===null)return{destroy:ze};const r={...Ld,...n},i=e.querySelector("[data-arrow=true]"),s=[];r.flip&&s.push(Dd({boundary:r.boundary,padding:r.overflowPadding}));const o=x(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(Td(l))}s.push(Sd({boundary:r.boundary,crossAxis:r.overlap,padding:r.overflowPadding})),i&&s.push(Pd({element:i,padding:8})),s.push(Rd({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||x(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:l,strategy:a}=r;Fd(t,e,{placement:l,middleware:s,strategy:a}).then(f=>{const c=Math.round(f.x),d=Math.round(f.y),[p,m]=Nd(f.placement);if(e.setAttribute("data-side",p),e.setAttribute("data-align",m),Object.assign(e.style,{position:r.strategy,top:`${d}px`,left:`${c}px`}),x(i)&&f.middlewareData.arrow){const{x:h,y:v}=f.middlewareData.arrow,g=f.placement.split("-")[0];i.setAttribute("data-side",g),Object.assign(i.style,{position:"absolute",left:h!=null?`${h}px`:"",top:v!=null?`${v}px`:"",[g]:`calc(100% - ${o}px)`,transform:Id[g],backgroundColor:"inherit",zIndex:"inherit"})}return f})}return Object.assign(e.style,{position:r.strategy}),{destroy:$d(t,e,u)}}function Nd(t){const[e,n="center"]=t.split("-");return[e,n]}/*!
6
6
  * tabbable 6.2.0
7
7
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
8
- */var sf=["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])"],is=sf.join(","),of=typeof Element>"u",Yn=of?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ss=!of&&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},os=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},Md=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},lf=function(e,n,r){if(os(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(is));return n&&Yn.call(e,is)&&i.unshift(e),i=i.filter(r),i},uf=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!os(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,is);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!os(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&d){var p=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},af=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Nn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Md(e))&&!af(e)?0:e.tabIndex},Nd=function(e,n){var r=Nn(e);return r<0&&n&&!af(e)?0:r},Hd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},ff=function(e){return e.tagName==="INPUT"},Vd=function(e){return ff(e)&&e.type==="hidden"},Bd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ud=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},jd=function(e){if(!e.name)return!0;var n=e.form||ss(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=Ud(i,e.form);return!s||s===e},Kd=function(e){return ff(e)&&e.type==="radio"},qd=function(e){return Kd(e)&&!jd(e)},Wd=function(e){var n,r=e&&ss(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=ss(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},cl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Qd=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=ss(e);if(l&&!l.shadowRoot&&i(l)===!0)return cl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(Wd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return cl(e);return!1},zd=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},ls=function(e,n){return!(n.disabled||os(n)||Vd(n)||Qd(n,e)||Bd(n)||zd(n))},fo=function(e,n){return!(qd(n)||Nn(n)<0||!ls(e,n))},Gd=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Yd=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=Nd(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(Hd).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Zd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=uf([e],n.includeContainer,{filter:fo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Gd}):r=lf(e,n.includeContainer,fo.bind(null,n)),Yd(r)},Xd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=uf([e],n.includeContainer,{filter:ls.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=lf(e,n.includeContainer,ls.bind(null,n)),r},rr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,is)===!1?!1:fo(n,e)},Jd=sf.concat("iframe").join(","),Fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Yn.call(e,Jd)===!1?!1:ls(n,e)};/*!
8
+ */var lf=["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])"],is=lf.join(","),uf=typeof Element>"u",Zn=uf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ss=!uf&&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},os=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},Hd=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},af=function(e,n,r){if(os(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(is));return n&&Zn.call(e,is)&&i.unshift(e),i=i.filter(r),i},ff=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!os(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=Zn.call(o,is);f&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var c=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!os(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(c&&d){var p=t(c===!0?o.children:c.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else s.unshift.apply(s,o.children)}}return i},cf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Nn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Hd(e))&&!cf(e)?0:e.tabIndex},Vd=function(e,n){var r=Nn(e);return r<0&&n&&!cf(e)?0:r},Bd=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},df=function(e){return e.tagName==="INPUT"},Ud=function(e){return df(e)&&e.type==="hidden"},jd=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Kd=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},qd=function(e){if(!e.name)return!0;var n=e.form||ss(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=Kd(i,e.form);return!s||s===e},Wd=function(e){return df(e)&&e.type==="radio"},Qd=function(e){return Wd(e)&&!qd(e)},zd=function(e){var n,r=e&&ss(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=ss(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},cl=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Gd=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Zn.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(Zn.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=ss(e);if(l&&!l.shadowRoot&&i(l)===!0)return cl(e);e.assignedSlot?e=e.assignedSlot:!l&&a!==e.ownerDocument?e=a.host:e=l}e=u}if(zd(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return cl(e);return!1},Yd=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 Zn.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},ls=function(e,n){return!(n.disabled||os(n)||Ud(n)||Gd(n,e)||jd(n)||Yd(n))},fo=function(e,n){return!(Qd(n)||Nn(n)<0||!ls(e,n))},Zd=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Xd=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,u=o?i.scopeParent:i,l=Vd(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(Bd).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},Jd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ff([e],n.includeContainer,{filter:fo.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Zd}):r=af(e,n.includeContainer,fo.bind(null,n)),Xd(r)},xd=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ff([e],n.includeContainer,{filter:ls.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=af(e,n.includeContainer,ls.bind(null,n)),r},lr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Zn.call(e,is)===!1?!1:fo(n,e)},em=lf.concat("iframe").join(","),Fs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Zn.call(e,em)===!1?!1:ls(n,e)};/*!
9
9
  * focus-trap 7.6.2
10
10
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
11
- */function co(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 xd(t){if(Array.isArray(t))return co(t)}function em(t,e,n){return(e=sm(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tm(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nm(){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 dl(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 ml(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dl(Object(n),!0).forEach(function(r){em(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rm(t){return xd(t)||tm(t)||om(t)||nm()}function im(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 sm(t){var e=im(t,"string");return typeof e=="symbol"?e:e+""}function om(t,e){if(t){if(typeof t=="string")return co(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)?co(t,e):void 0}}var pl={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()}},lm=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},um=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},si=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},am=function(e){return si(e)&&!e.shiftKey},fm=function(e){return si(e)&&e.shiftKey},hl=function(e){return setTimeout(e,0)},Gr=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},Hi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},cm=[],dm=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||cm,s=ml({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:am,isKeyBackward:fm},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function(O,F,V){return O&&O[F]!==void 0?O[F]:s[V||F]},a=function(O,F){var V=typeof(F==null?void 0:F.composedPath)=="function"?F.composedPath():void 0;return o.containerGroups.findIndex(function(B){var ee=B.container,te=B.tabbableNodes;return ee.contains(O)||(V==null?void 0:V.includes(ee))||te.find(function(z){return z===O})})},f=function(O){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=F.hasFallback,B=V===void 0?!1:V,ee=F.params,te=ee===void 0?[]:ee,z=s[O];if(typeof z=="function"&&(z=z.apply(void 0,rm(te))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var oe=z;if(typeof z=="string"){try{oe=r.querySelector(z)}catch(De){throw new Error("`".concat(O,'` appears to be an invalid selector; error="').concat(De.message,'"'))}if(!oe&&!B)throw new Error("`".concat(O,"` as selector refers to no known node"))}return oe},c=function(){var O=f("initialFocus",{hasFallback:!0});if(O===!1)return!1;if(O===void 0||O&&!Fs(O,s.tabbableOptions))if(a(r.activeElement)>=0)O=r.activeElement;else{var F=o.tabbableGroups[0],V=F&&F.firstTabbableNode;O=V||f("fallbackFocus")}else O===null&&(O=f("fallbackFocus"));if(!O)throw new Error("Your focus-trap needs to have at least one focusable element");return O},d=function(){if(o.containerGroups=o.containers.map(function(O){var F=Zd(O,s.tabbableOptions),V=Xd(O,s.tabbableOptions),B=F.length>0?F[0]:void 0,ee=F.length>0?F[F.length-1]:void 0,te=V.find(function(De){return rr(De)}),z=V.slice().reverse().find(function(De){return rr(De)}),oe=!!F.find(function(De){return Nn(De)>0});return{container:O,tabbableNodes:F,focusableNodes:V,posTabIndexesFound:oe,firstTabbableNode:B,lastTabbableNode:ee,firstDomTabbableNode:te,lastDomTabbableNode:z,nextTabbableNode:function(ot){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=F.indexOf(ot);return Y<0?He?V.slice(V.indexOf(ot)+1).find(function(X){return rr(X)}):V.slice(0,V.indexOf(ot)).reverse().find(function(X){return rr(X)}):F[Y+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(O){return O.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(O){return O.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.")},p=function(O){var F=O.activeElement;if(F)return F.shadowRoot&&F.shadowRoot.activeElement!==null?p(F.shadowRoot):F},m=function(O){if(O!==!1&&O!==p(document)){if(!O||!O.focus){m(c());return}O.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=O,lm(O)&&O.select()}},h=function(O){var F=f("setReturnFocus",{params:[O]});return F||(F===!1?!1:O)},v=function(O){var F=O.target,V=O.event,B=O.isBackward,ee=B===void 0?!1:B;F=F||Hi(V),d();var te=null;if(o.tabbableGroups.length>0){var z=a(F,V),oe=z>=0?o.containerGroups[z]:void 0;if(z<0)ee?te=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:te=o.tabbableGroups[0].firstTabbableNode;else if(ee){var De=o.tabbableGroups.findIndex(function(gt){var mt=gt.firstTabbableNode;return F===mt});if(De<0&&(oe.container===F||Fs(F,s.tabbableOptions)&&!rr(F,s.tabbableOptions)&&!oe.nextTabbableNode(F,!1))&&(De=z),De>=0){var ot=De===0?o.tabbableGroups.length-1:De-1,He=o.tabbableGroups[ot];te=Nn(F)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else si(V)||(te=oe.nextTabbableNode(F,!1))}else{var Y=o.tabbableGroups.findIndex(function(gt){var mt=gt.lastTabbableNode;return F===mt});if(Y<0&&(oe.container===F||Fs(F,s.tabbableOptions)&&!rr(F,s.tabbableOptions)&&!oe.nextTabbableNode(F))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,_t=o.tabbableGroups[X];te=Nn(F)>=0?_t.firstTabbableNode:_t.firstDomTabbableNode}else si(V)||(te=oe.nextTabbableNode(F))}}else te=f("fallbackFocus");return te},g=function(O){var F=Hi(O);if(!(a(F,O)>=0)){if(Gr(s.clickOutsideDeactivates,O)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Gr(s.allowOutsideClick,O)||O.preventDefault()}},_=function(O){var F=Hi(O),V=a(F,O)>=0;if(V||F instanceof Document)V&&(o.mostRecentlyFocusedNode=F);else{O.stopImmediatePropagation();var B,ee=!0;if(o.mostRecentlyFocusedNode)if(Nn(o.mostRecentlyFocusedNode)>0){var te=a(o.mostRecentlyFocusedNode),z=o.containerGroups[te].tabbableNodes;if(z.length>0){var oe=z.findIndex(function(De){return De===o.mostRecentlyFocusedNode});oe>=0&&(s.isKeyForward(o.recentNavEvent)?oe+1<z.length&&(B=z[oe+1],ee=!1):oe-1>=0&&(B=z[oe-1],ee=!1))}}else o.containerGroups.some(function(De){return De.tabbableNodes.some(function(ot){return Nn(ot)>0})})||(ee=!1);else ee=!1;ee&&(B=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),m(B||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},C=function(O){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=O;var V=v({event:O,isBackward:F});V&&(si(O)&&O.preventDefault(),m(V))},A=function(O){(s.isKeyForward(O)||s.isKeyBackward(O))&&C(O,s.isKeyBackward(O))},T=function(O){um(O)&&Gr(s.escapeDeactivates,O)!==!1&&(O.preventDefault(),u.deactivate())},k=function(O){var F=Hi(O);a(F,O)>=0||Gr(s.clickOutsideDeactivates,O)||Gr(s.allowOutsideClick,O)||(O.preventDefault(),O.stopImmediatePropagation())},L=function(){if(o.active)return pl.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?hl(function(){m(c())}):m(c()),r.addEventListener("focusin",_,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",k,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",T),u},R=function(){if(o.active)return r.removeEventListener("focusin",_,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",k,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",T),u},W=function(O){var F=O.some(function(V){var B=Array.from(V.removedNodes);return B.some(function(ee){return ee===o.mostRecentlyFocusedNode})});F&&m(c())},j=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(W):void 0,$=function(){j&&(j.disconnect(),o.active&&!o.paused&&o.containers.map(function(O){j.observe(O,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(O){if(o.active)return this;var F=l(O,"onActivate"),V=l(O,"onPostActivate"),B=l(O,"checkCanFocusTrap");B||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,F==null||F();var ee=function(){B&&d(),L(),$(),V==null||V()};return B?(B(o.containers.concat()).then(ee,ee),this):(ee(),this)},deactivate:function(O){if(!o.active)return this;var F=ml({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},O);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,R(),o.active=!1,o.paused=!1,$(),pl.deactivateTrap(i,u);var V=l(F,"onDeactivate"),B=l(F,"onPostDeactivate"),ee=l(F,"checkCanReturnFocus"),te=l(F,"returnFocus","returnFocusOnDeactivate");V==null||V();var z=function(){hl(function(){te&&m(h(o.nodeFocusedBeforeActivation)),B==null||B()})};return te&&ee?(ee(h(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(O){if(o.paused||!o.active)return this;var F=l(O,"onPause"),V=l(O,"onPostPause");return o.paused=!0,F==null||F(),R(),$(),V==null||V(),this},unpause:function(O){if(!o.paused||!o.active)return this;var F=l(O,"onUnpause"),V=l(O,"onPostUnpause");return o.paused=!1,F==null||F(),d(),L(),$(),V==null||V(),this},updateContainerElements:function(O){var F=[].concat(O).filter(Boolean);return o.containers=F.map(function(V){return typeof V=="string"?r.querySelector(V):V}),o.active&&d(),$(),this}},u.updateContainerElements(e),u};function cf(t={}){let e;const{immediate:n,...r}=t,i=Pe(!1),s=Pe(!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=dm(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:tl(i),isPaused:tl(s),activate:o,deactivate:u,pause:l,unpause:a}}const Vi=[],df=(t,e)=>{let n=ze;function r(){const s=Vi.indexOf(t);s>=0&&Vi.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;fn(100).then(()=>{o?Vi.push(t):r()});function f(){return Ec(Vi)===t}function c(){f()&&u&&(u(),r())}function d(m){const h=m.target;Ci(h)&&h&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())}function p(m){l!=null&&l(m)&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation(),c())}n=pm(t,{onInteractOutsideStart:d,onInteractOutside:a?p:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},mm={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},us=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:ze};const s={...mm,...i},o=[];if(s.portal!==null&&o.push(gs(t,s.portal).destroy),o.push(Ld(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=cf({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(df(t,{onClose:()=>{x(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||x(n)&&n.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&o.push(di(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},gs=(t,e="body")=>{let n;if(!x(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 qt(),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}},pm=(t,e)=>{let n=ze,r=ze,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:d,enabled:p}=f;if(!p)return;function m(g){c&&_l(g,t)&&(d==null||d(g));const _=g.target;Ci(_)&&mf(t,_)&&(s=!0),i=!0}function h(g){c==null||c(g)}const v=hm(t);if(typeof PointerEvent<"u"){const g=_=>{r();const C=A=>{l(A)&&h(A),a()};if(_.pointerType==="touch"){r=bt(v,"click",C,{capture:!0,once:!0});return}C(_)};n=rt(bt(v,"pointerdown",m,!0),bt(v,"pointerup",g,!0))}else{const g=C=>{o?o=!1:l(C)&&h(C),a()},_=C=>{o=!0,l(C)&&h(C),a()};n=rt(bt(v,"mousedown",m,!0),bt(v,"mouseup",g,!0),bt(v,"touchstart",m,!0),bt(v,"touchend",_,!0))}}function l(f){return!!(i&&!s&&_l(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function _l(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!Ci(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!mf(e,n)}function mf(t,e){return t===e||t.contains(e)}function hm(t){return(t==null?void 0:t.ownerDocument)??document}function _m(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Ua(i)?e[r]=Xe(i):e[r]=Xe(yt(i))}),e}const gm={prefix:"",disabled:yt(!1),required:yt(!1),name:yt(void 0)};function I0(t){const e={...gm,...$c(t)},{name:n}=Xn(e.prefix),{value:r,name:i,disabled:s,required:o}=_m(Fr(e,"prefix")),u=i;return Fe(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:Ft({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 bm={ltr:[...fi,ae.ARROW_RIGHT],rtl:[...fi,ae.ARROW_LEFT]},ym={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},gl=["menu","trigger"],vm={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 km(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:p,closeOnItemClick:m,onOutsideClick:h}=t.rootOptions,v=t.rootOpen,g=t.rootActiveTrigger,_=t.nextFocusable,C=t.prevFocusable,A=Xe.writable(!1),T=Xe(Pe(0)),k=Xe(Pe(null)),L=Xe(Pe("right")),R=Xe(Pe(null)),W=Xe(Be([L,k],([Q,ne])=>re=>Q===(ne==null?void 0:ne.side)&&Cm(re,ne==null?void 0:ne.area))),{typed:j,handleTypeaheadSearch:$}=Wc(),U=It({...ai(gl),...t.ids}),O=es({open:v,forceVisible:a,activeTrigger:g}),F=Fe(e(),{stores:[O,l,U.menu,U.trigger],returned:([Q,ne,re,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Ft({display:Q?void 0:"none"}),id:re,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":ms(ne),tabindex:-1}),action:Q=>{let ne=ze;const re=xe([O,g,s,u,l,o],([we,Je,Et,q,Le,We])=>{ne(),!(!we||!Je)&&qt().then(()=>{ne(),Zr(Q,n),ne=us(Q,{anchorElement:Je,open:v,options:{floating:Et,modal:{closeOnInteractOutside:q,shouldCloseOnInteractOutside:Re=>{var Ie;return(Ie=h.get())==null||Ie(Re),!(Re.defaultPrevented||x(Je)&&Je.contains(Re.target))},onClose:()=>{v.set(!1),Je.focus()},open:we},portal:Sr(Q,Le),escapeKeydown:We?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,Et=we.currentTarget;if(!x(Je)||!x(Et)||!(Je.closest('[role="menu"]')===Et))return;if(oo.includes(we.key)&&po(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),v.set(!1),mo(we,_,C);return}const Le=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Le&&f.get()===!0&&$(we.key,ln(Et))}));return{destroy(){re(),ue(),ne()}}}}),V=Fe(e("trigger"),{stores:[v,U.menu,U.trigger],returned:([Q,ne,re])=>({"aria-controls":ne,"aria-expanded":Q,"data-state":Q?"open":"closed",id:re,tabindex:0}),action:Q=>(ti(Q),g.update(re=>re||Q),{destroy:rt(ke(Q,"click",re=>{const ue=v.get(),we=re.currentTarget;x(we)&&(gt(we),ue||re.preventDefault())}),ke(Q,"keydown",re=>{const ue=re.currentTarget;if(!x(ue)||!(fi.includes(re.key)||re.key===ae.ARROW_DOWN))return;re.preventDefault(),gt(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const Et=ln(Je);Et.length&&et(Et[0])}))})}),B=Fe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),ee=Fe(e("overlay"),{stores:[O],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Ft({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":Om(Q)}),action:Q=>{let ne=ze;o.get()&&(ne=di(Q,{handler:()=>{v.set(!1);const we=g.get();we&&we.focus()}}).destroy);const re=xe([l],([ue])=>{if(ue===null)return ze;const we=Sr(Q,ue);return we===null?ze:gs(Q,we).destroy});return{destroy(){ne(),re()}}}}),te=Fe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(Zr(Q,n),ti(Q),{destroy:rt(ke(Q,"pointerdown",re=>{const ue=re.currentTarget;if(x(ue)&&on(ue)){re.preventDefault();return}}),ke(Q,"click",re=>{const ue=re.currentTarget;if(x(ue)){if(on(ue)){re.preventDefault();return}if(re.defaultPrevented){et(ue);return}m.get()&&fn(1).then(()=>{v.set(!1)})}}),ke(Q,"keydown",re=>{qr(re)}),ke(Q,"pointermove",re=>{jr(re)}),ke(Q,"pointerleave",re=>{Kr(re)}),ke(Q,"focusin",re=>{mt(re)}),ke(Q,"focusout",re=>{mn(re)}))})}),z=Fe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),oe=Fe(e("group-label"),{returned:()=>Q=>({id:Q})}),De={defaultChecked:!1,disabled:!1},ot=Q=>{const ne={...De,...Q},re=ne.checked??Pe(ne.defaultChecked??null),ue=cr(re,ne.onCheckedChange),we=Pe(ne.disabled),Je=Fe(e("checkbox-item"),{stores:[ue,we],returned:([Le,We])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Wr(Le)?"mixed":Le?"true":"false","data-disabled":ii(We),"data-state":As(Le)}),action:Le=>(Zr(Le,n),ti(Le),{destroy:rt(ke(Le,"pointerdown",Re=>{const Ie=Re.currentTarget;if(x(Ie)&&on(Ie)){Re.preventDefault();return}}),ke(Le,"click",Re=>{const Ie=Re.currentTarget;if(x(Ie)){if(on(Ie)){Re.preventDefault();return}if(Re.defaultPrevented){et(Ie);return}ue.update(hn=>Wr(hn)?!0:!hn),m.get()&&qt().then(()=>{v.set(!1)})}}),ke(Le,"keydown",Re=>{qr(Re)}),ke(Le,"pointermove",Re=>{const Ie=Re.currentTarget;if(x(Ie)){if(on(Ie)){pn(Re);return}jr(Re,Ie)}}),ke(Le,"pointerleave",Re=>{Kr(Re)}),ke(Le,"focusin",Re=>{mt(Re)}),ke(Le,"focusout",Re=>{mn(Re)}))})}),Et=Be(ue,Le=>Le===!0),q=Be(ue,Le=>Le==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:Et,isIndeterminate:q},options:{disabled:we}}},He=(Q={})=>{const ne=Q.value??Pe(Q.defaultValue??null),re=cr(ne,Q.onValueChange),ue=Fe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Fe(e("radio-item"),{stores:[re],returned:([q])=>Le=>{const{value:We,disabled:Re}={...we,...Le},Ie=q===We;return{disabled:Re,role:"menuitemradio","data-state":Ie?"checked":"unchecked","aria-checked":Ie,"data-disabled":ii(Re),"data-value":We,"data-orientation":"vertical",tabindex:-1}},action:q=>(Zr(q,n),{destroy:rt(ke(q,"pointerdown",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){We.preventDefault();return}}),ke(q,"click",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){We.preventDefault();return}if(We.defaultPrevented){if(!x(Re))return;et(Re);return}re.set(Ie),m.get()&&qt().then(()=>{v.set(!1)})}),ke(q,"keydown",We=>{qr(We)}),ke(q,"pointermove",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){pn(We);return}jr(We,Re)}),ke(q,"pointerleave",We=>{Kr(We)}),ke(q,"focusin",We=>{mt(We)}),ke(q,"focusout",We=>{mn(We)}))})}),Et=Be(re,q=>Le=>q===Le);return{elements:{radioGroup:ue,radioItem:Je},states:{value:re},helpers:{isChecked:Et}}},{elements:{root:Y}}=Nm({orientation:"horizontal"}),X={...vm,disabled:!1,positioning:{placement:"right-start",gutter:8}},_t=Q=>{const ne={...X,...Q},re=ne.open??Pe(!1),ue=cr(re,ne==null?void 0:ne.onOpenChange),we=It(Fr(ne,"ids")),{positioning:Je,arrowSize:Et,disabled:q}=we,Le=Xe(Pe(null)),We=Xe(Pe(null)),Re=Xe(Pe(0)),Ie=It({...ai(gl),...ne.ids});ui(()=>{const je=document.getElementById(Ie.trigger.get());je&&Le.set(je)});const hn=es({open:ue,forceVisible:a,activeTrigger:Le}),Sf=Fe(e("submenu"),{stores:[hn,Ie.menu,Ie.trigger],returned:([je,pt,$t])=>({role:"menu",hidden:je?void 0:!0,style:Ft({display:je?void 0:"none"}),id:pt,"aria-labelledby":$t,"data-state":je?"open":"closed","data-id":pt,tabindex:-1}),action:je=>{let pt=ze;const $t=xe([hn,Je],([Ee,Ze])=>{if(pt(),!Ee)return;const tt=Le.get();tt&&qt().then(()=>{pt();const lt=Ri(tt);pt=us(je,{anchorElement:tt,open:ue,options:{floating:Ze,portal:x(lt)?lt:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Qe=rt(ke(je,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!x(Ze)||!x(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(oo.includes(Ee.key)){Ee.stopImmediatePropagation(),po(Ee,c.get()??!1);return}const xn=ym.ltr.includes(Ee.key),er=Ee.ctrlKey||Ee.altKey||Ee.metaKey,Pi=Ee.key.length===1;if(xn){const jo=Le.get();Ee.preventDefault(),ue.update(()=>(jo&&et(jo),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),mo(Ee,_,C);return}!er&&Pi&&f.get()===!0&&$(Ee.key,ln(tt))}),ke(je,"pointermove",Ee=>{Os(Ee)}),ke(je,"focusout",Ee=>{const Ze=Le.get();if(A.get()){const tt=Ee.target,lt=document.getElementById(Ie.menu.get());if(!x(lt)||!x(tt))return;!lt.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,lt=Ee.relatedTarget;if(!x(lt)||!x(tt))return;!tt.contains(lt)&&lt!==Ze&&ue.set(!1)}}));return{destroy(){$t(),pt(),Qe()}}}}),Df=Fe(e("subtrigger"),{stores:[ue,q,Ie.menu,Ie.trigger],returned:([je,pt,$t,Qe])=>({role:"menuitem",id:Qe,tabindex:-1,"aria-controls":$t,"aria-expanded":je,"data-state":je?"open":"closed","data-disabled":ii(pt),"aria-haspopop":"menu"}),action:je=>{Zr(je,n),ti(je),Le.update(Qe=>Qe||je);const pt=()=>{Ls(We),window.clearTimeout(Re.get()),k.set(null)},$t=rt(ke(je,"click",Qe=>{if(Qe.defaultPrevented)return;const Ee=Qe.currentTarget;!x(Ee)||on(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Le.set(Ee),!Ze)))}),ke(je,"keydown",Qe=>{const Ee=j.get(),Ze=Qe.currentTarget;if(!(!x(Ze)||on(Ze)||Ee.length>0&&Qe.key===ae.SPACE)&&bm.ltr.includes(Qe.key)){if(!ue.get()){Ze.click(),Qe.preventDefault();return}const lt=Ze.getAttribute("aria-controls");if(!lt)return;const xn=document.getElementById(lt);if(!x(xn))return;const er=ln(xn)[0];et(er)}}),ke(je,"pointermove",Qe=>{if(!Yr(Qe)||(In(Qe),Qe.defaultPrevented))return;const Ee=Qe.currentTarget;if(!x(Ee))return;wm(Ie.menu.get())||et(Ee);const Ze=We.get();!ue.get()&&!Ze&&!on(Ee)&&We.set(window.setTimeout(()=>{ue.update(()=>(Le.set(Ee),!0)),Ls(We)},100))}),ke(je,"pointerleave",Qe=>{if(!Yr(Qe))return;Ls(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,lt=tt==="right",xn=lt?-5:5,er=Ze[lt?"left":"right"],Pi=Ze[lt?"right":"left"];k.set({area:[{x:Qe.clientX+xn,y:Qe.clientY},{x:er,y:Ze.top},{x:Pi,y:Ze.top},{x:Pi,y:Ze.bottom},{x:er,y:Ze.bottom}],side:tt}),window.clearTimeout(Re.get()),Re.set(window.setTimeout(()=>{k.set(null)},300))}else{if(ws(Qe),Qe.defaultPrevented)return;k.set(null)}}),ke(je,"focusout",Qe=>{const Ee=Qe.currentTarget;if(!x(Ee))return;gn(Ee);const Ze=Qe.relatedTarget;if(!x(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const lt=document.getElementById(tt);lt&&!lt.contains(Ze)&&ue.set(!1)}),ke(je,"focusin",Qe=>{mt(Qe)}));return{destroy(){pt(),$t()}}}}),Rf=Fe(e("subarrow"),{stores:Et,returned:je=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${je}px)`,height:`var(--arrow-size, ${je}px)`})})});return xe([v],([je])=>{je||(Le.set(null),ue.set(!1))}),xe([k],([je])=>{!ht||je||window.clearTimeout(Re.get())}),xe([ue],([je])=>{if(ht&&(je&&A.get()&&fn(1).then(()=>{const pt=document.getElementById(Ie.menu.get());if(!pt)return;const $t=ln(pt);$t.length&&et($t[0])}),!je)){const pt=R.get(),$t=document.getElementById(Ie.trigger.get());if(pt&&fn(1).then(()=>{const Qe=document.getElementById(Ie.menu.get());Qe&&Qe.contains(pt)&&gn(pt)}),!$t||document.activeElement===$t)return;gn($t)}}),{ids:Ie,elements:{subTrigger:Df,subMenu:Sf,subArrow:Rf},states:{subOpen:ue},options:we}};ui(()=>{const Q=document.getElementById(U.trigger.get());x(Q)&&v.get()&&g.set(Q);const ne=[],re=()=>A.set(!1),ue=()=>{A.set(!0),ne.push(rt(bt(document,"pointerdown",re,{capture:!0,once:!0}),bt(document,"pointermove",re,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return ne.push(bt(document,"keydown",ue,{capture:!0})),ne.push(bt(document,"keydown",we)),()=>{ne.forEach(Je=>Je())}}),xe([v,R],([Q,ne])=>{!Q&&ne&&gn(ne)}),xe([v],([Q])=>{if(ht&&!Q){const ne=g.get();if(!ne)return;const re=d.get();!Q&&ne&&ci({prop:re,defaultEl:ne})}}),xe([v,r],([Q,ne])=>{if(!ht)return;const re=[];return fn(1).then(()=>{const ue=document.getElementById(U.menu.get());if(ue&&Q&&A.get()){if(p.get()){et(ue);return}const we=ln(ue);if(!we.length)return;et(we[0])}}),()=>{re.forEach(ue=>ue())}}),xe(v,Q=>{if(!ht)return;const ne=()=>A.set(!1),re=ue=>{if(A.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(bt(document,"pointerdown",ne,{capture:!0,once:!0}),bt(document,"pointermove",ne,{capture:!0,once:!0}),bt(document,"keydown",re,{capture:!0}))});function gt(Q){v.update(ne=>{const re=!ne;return re&&(_.set(za(Q)),C.set(Ga(Q)),g.set(Q)),re})}function mt(Q){const ne=Q.currentTarget;if(!x(ne))return;const re=R.get();re&&gn(re),so(ne),R.set(ne)}function mn(Q){const ne=Q.currentTarget;x(ne)&&gn(ne)}function In(Q){Qr(Q)&&Q.preventDefault()}function pn(Q){if(Qr(Q))return;const ne=Q.target;if(!x(ne))return;const re=Ri(ne);re&&et(re)}function ws(Q){Qr(Q)&&Q.preventDefault()}function Os(Q){if(!Yr(Q))return;const ne=Q.target,re=Q.currentTarget;if(!x(re)||!x(ne))return;const ue=T.get(),we=ue!==Q.clientX;if(re.contains(ne)&&we){const Je=Q.clientX>ue?"right":"left";L.set(Je),T.set(Q.clientX)}}function jr(Q,ne=null){if(!Yr(Q)||(In(Q),Q.defaultPrevented))return;if(ne){et(ne);return}const re=Q.currentTarget;x(re)&&et(re)}function Kr(Q){Yr(Q)&&pn(Q)}function qr(Q){if(j.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(fi.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!x(ue))return;ue.click()}}function Wr(Q){return Q==="indeterminate"}function As(Q){return Wr(Q)?"indeterminate":Q?"checked":"unchecked"}function Qr(Q){return W.get()(Q)}function Ri(Q){const ne=Q.closest('[role="menu"]');return x(ne)?ne:null}return{elements:{trigger:V,menu:F,overlay:ee,item:te,group:z,groupLabel:oe,arrow:B,separator:Y},builders:{createCheckboxItem:ot,createSubmenu:_t,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:$},ids:U,options:t.rootOptions}}function mo(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),e.set(null))}}function ln(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>x(e))}function ti(t){!t||!on(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Ls(t){if(!ht)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function Yr(t){return t.pointerType==="mouse"}function Zr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);x(n)&&t.setAttribute("data-melt-menu-id",n.id)}function po(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!x(n)||!x(r))return;const i=ln(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 Cm(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Em(n,e)}function Em(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 wm(t){const e=document.activeElement;if(!x(e))return!1;const n=e.closest(`[data-id="${t}"]`);return x(n)}function Om(t){return t?"open":"closed"}const Am={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"};({...Fr(Am,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:Mn}=Xn("dialog"),Tm={preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,role:"dialog",defaultOpen:!1,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},$m=["content","title","description"];function Sm(t){const e={...Tm,...t},n=It(Fr(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),p=It({...ai($m),...e.ids}),m=e.open??Pe(e.defaultOpen),h=cr(m,e==null?void 0:e.onOpenChange),v=Be([h,l],([$,U])=>$||U);let g=ze;function _($){const U=$.currentTarget,O=$.currentTarget;!x(U)||!x(O)||(h.set(!0),d.set(O))}function C(){h.set(!1),ci({prop:f.get(),defaultEl:d.get()})}const A=Fe(Mn("trigger"),{stores:[h],returned:([$])=>({"aria-haspopup":"dialog","aria-expanded":$,type:"button"}),action:$=>({destroy:rt(ke($,"click",O=>{_(O)}),ke($,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),_(O))}))})}),T=Fe(Mn("overlay"),{stores:[v,h],returned:([$,U])=>({hidden:$?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),"aria-hidden":!0,"data-state":U?"open":"closed"}),action:$=>{let U=ze;return i.get()&&(U=di($,{handler:()=>{C()}}).destroy),{destroy(){U()}}}}),k=Fe(Mn("content"),{stores:[v,p.content,p.description,p.title,h],returned:([$,U,O,F,V])=>({id:U,role:o.get(),"aria-describedby":O,"aria-labelledby":F,"aria-modal":$?"true":void 0,"data-state":V?"open":"closed",tabindex:-1,hidden:$?void 0:!0,style:Ft({display:$?void 0:"none"})}),action:$=>{let U=ze,O=ze;const F=rt(xe([h,s,i],([V,B,ee])=>{if(!V)return;const te=cf({immediate:!1,escapeDeactivates:ee,clickOutsideDeactivates:B,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:$});U=te.activate,O=te.deactivate;const z=te.useFocusTrap($);return z&&z.destroy?z.destroy:te.deactivate}),xe([s,h],([V,B])=>df($,{open:B,closeOnInteractOutside:V,onClose(){C()},shouldCloseOnInteractOutside(ee){var te;return(te=c.get())==null||te(ee),!ee.defaultPrevented}}).destroy),xe([i],([V])=>V?di($,{handler:C}).destroy:ze),xe([v],([V])=>{qt().then(()=>{V?U():O()})}));return{destroy:()=>{g(),F()}}}}),L=Fe(Mn("portalled"),{stores:u,returned:$=>({"data-portal":ms($)}),action:$=>{const U=xe([u],([O])=>{if(O===null)return ze;const F=Sr($,O);return F===null?ze:gs($,F).destroy});return{destroy(){U()}}}}),R=Fe(Mn("title"),{stores:[p.title],returned:([$])=>({id:$})}),W=Fe(Mn("description"),{stores:[p.description],returned:([$])=>({id:$})}),j=Fe(Mn("close"),{returned:()=>({type:"button"}),action:$=>({destroy:rt(ke($,"click",()=>{C()}),ke($,"keydown",O=>{O.key!==ae.SPACE&&O.key!==ae.ENTER||(O.preventDefault(),C())}))})});return xe([h,r],([$,U])=>{if(ht){if(U&&$&&(g=$o()),$){const O=document.getElementById(p.content.get());ci({prop:a.get(),defaultEl:O})}return()=>{l.get()||g()}}}),{ids:p,elements:{content:k,trigger:A,title:R,description:W,overlay:T,close:j,portalled:L},states:{open:h},options:n}}const bl=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:Is}=Xn("menubar"),Dm={loop:!0,closeOnEscape:!0,preventScroll:!1},Rm=["menubar"];function Pm(t){const e={...Dm,...t},n=It(Fr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(Pe("")),u=Xe(Pe(null)),l=Xe(Pe(null)),a=Xe(Pe(null)),f=Xe(Pe(0));let c=!1;const d=It({...ai(Rm),...e.ids}),p=Fe(Is(),{stores:[d.menubar],returned([A]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:A}},action:A=>{const T=Array.from(A.querySelectorAll("[data-melt-menubar-trigger]"));return x(T[0])?(T[0].tabIndex=0,{destroy:ze}):{}}}),m={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},h=A=>{const T={...m,...A},k=Xe(Pe(!1)),L=Xe(Pe(null)),R=It(T),{positioning:W,portal:j,forceVisible:$,closeOnOutsideClick:U,onOutsideClick:O}=R,F=km({rootOptions:{...R,preventScroll:s},rootOpen:Xe(k),rootActiveTrigger:Xe(L),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),V=es({open:k,forceVisible:$,activeTrigger:L}),B=Fe(Is("menu"),{stores:[V,j,F.ids.menu,F.ids.trigger,d.menubar],returned:([z,oe,De,ot,He])=>({role:"menu",hidden:z?void 0:!0,style:Ft({display:z?void 0:"none"}),id:De,"aria-labelledby":ot,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":ms(oe),tabindex:-1}),action:z=>{let oe=ze;const De=xe([k,L,W,j,U],([He,Y,X,_t,gt])=>{oe(),He&&Y&&qt().then(()=>{oe(),oe=us(z,{anchorElement:Y,open:k,options:{floating:X,portal:Sr(z,_t),modal:{closeOnInteractOutside:gt,shouldCloseOnInteractOutside:mt=>{var pn;if((pn=O.get())==null||pn(mt),mt.defaultPrevented)return!1;const mn=mt.target,In=document.getElementById(d.menubar.get());return!In||!Ci(mn)?!0:!In.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),ot=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!x(X)||!x(Y)||(bl.includes(He.key)&&v(He),!(Y.closest('[role="menu"]')===X)))return;oo.includes(He.key)&&po(He),He.key===ae.TAB&&(He.preventDefault(),L.set(null),k.set(!1),mo(He,u,l));const gt=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&gt&&F.helpers.handleTypeaheadSearch(He.key,ln(X))}));return{destroy(){De(),ot(),oe()}}}}),ee=Fe(Is("trigger"),{stores:[k,F.ids.menu,F.ids.trigger],returned:([z,oe,De])=>({"aria-controls":oe,"aria-expanded":z,"data-state":z?"open":"closed",id:De,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{ti(z);const oe=document.getElementById(d.menubar.get());if(!oe)return{};const De=Array.from(oe.querySelectorAll("[data-melt-menubar-trigger]"));if(!De.length)return{};const ot=xe([a],([Y])=>{!Y&&De[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});De[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=k.get(),_t=Y.currentTarget;x(_t)&&(te(_t),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(x(X)&&(fi.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),te(X);const _t=X.getAttribute("aria-controls");if(!_t)return;const gt=document.getElementById(_t);if(!gt)return;const mt=ln(gt);if(!mt.length)return;et(mt[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!x(X))return;const _t=o.get(),gt=k.get();_t&&!gt&&(k.set(!0),o.set(F.ids.menu.get()),L.set(X))}));return{destroy(){He(),ot()}}}});function te(z){k.update(oe=>{const De=!oe;return De?(u.set(za(z)),l.set(Ga(z)),L.set(z),o.set(F.ids.menu.get())):L.set(null),De})}return xe([o],([z])=>{if(ht){if(z===F.ids.menu.get()){if(k.get())return;const oe=document.getElementById(F.ids.trigger.get());if(!oe)return;L.set(oe),so(oe),k.set(!0);return}if(z!==F.ids.menu.get()){if(!ht)return;if(k.get()){const oe=document.getElementById(F.ids.trigger.get());if(!oe)return;L.set(null),k.set(!1),gn(oe)}return}}}),xe([k],([z])=>{if(!ht)return;const oe=document.getElementById(F.ids.trigger.get());if(oe){if(!z&&o.get()===F.ids.menu.get()){L.set(null),o.set(""),gn(oe);return}z&&(a.set(oe),so(oe))}}),ui(()=>{if(!ht)return;const z=document.getElementById(F.ids.trigger.get());x(z)&&k.get()&&L.set(z)}),{ids:F.ids,elements:{...F.elements,menu:B,trigger:ee},builders:F.builders,states:F.states,options:R}};function v(A){if(!ht)return;A.preventDefault();const T=A.currentTarget,k=A.target;if(!x(k)||!x(T))return;const L=k.hasAttribute("data-melt-menubar-menu-subtrigger"),R=k.closest('[role="menu"]')!==T,W=ae.ARROW_LEFT,j=A.key===W;if(!j&&L||j&&R)return;const U=document.getElementById(d.menubar.get());if(!x(U))return;const O=g(U),F=T.getAttribute("aria-labelledby"),V=O.findIndex(z=>z.id===F);let B;switch(A.key){case ae.ARROW_RIGHT:B=V<O.length-1?V+1:0;break;case ae.ARROW_LEFT:B=V>0?V-1:O.length-1;break;case ae.HOME:B=0;break;case ae.END:B=O.length-1;break;default:return}const te=O[B].getAttribute("aria-controls");te&&o.set(te)}function g(A){const T=A.closest('[role="menubar"]');return x(T)?Array.from(T.querySelectorAll("[data-melt-menubar-trigger]")).filter(k=>x(k)):[]}function _(A){A.preventDefault();const T=document.activeElement,k=A.currentTarget;if(!x(k)||!x(T))return;const L=g(k);if(!L.length)return;const R=L.filter(U=>!(U.hasAttribute("data-disabled")||U.getAttribute("disabled")==="true")),W=R.indexOf(T);let j;const $=r.get();switch(A.key){case ae.ARROW_RIGHT:j=W<R.length-1?W+1:$?0:W;break;case ae.ARROW_LEFT:j=W>0?W-1:$?R.length-1:0;break;case ae.HOME:j=0;break;case ae.END:j=R.length-1;break;default:return}et(R[j])}ui(()=>{if(!ht)return;const A=document.getElementById(d.menubar.get());if(!A)return;const T=rt(ke(A,"keydown",k=>{const L=k.target,R=k.currentTarget;!x(R)||!x(L)||!L.hasAttribute("data-melt-menubar-trigger")||bl.includes(k.key)&&_(k)}),bt(document,"keydown",k=>{i.get()&&k.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{T()}});const C=[];return xe([o,s],([A,T])=>{!ht||!T||(A?c||(C.push($o()),c=!0):(C.forEach(k=>k()),c=!1))}),ja(()=>{C.forEach(A=>A())}),{ids:d,elements:{menubar:p},builders:{createMenu:h},options:n}}const Fm={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:Xr}=Xn("popover"),Lm=["trigger","content"];function Im(t){const e={...Fm,...t},n=It(Fr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:d,onOutsideClick:p}=n,m=e.open??Pe(e.defaultOpen),h=cr(m,e==null?void 0:e.onOpenChange),v=Xe.writable(null),g=It({...ai(Lm),...e.ids});ui(()=>{v.set(document.getElementById(g.trigger.get()))});function _(){h.set(!1);const $=document.getElementById(g.trigger.get());ci({prop:d.get(),defaultEl:$})}const C=es({open:h,activeTrigger:v,forceVisible:f}),A=Fe(Xr("content"),{stores:[C,a,g.content],returned:([$,U,O])=>({hidden:$&&ht?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),id:O,"data-state":$?"open":"closed","data-portal":ms(U)}),action:$=>{let U=ze;const O=xe([C,v,r,s,u,l,a],([F,V,B,ee,te,z,oe])=>{U(),!(!F||!V)&&qt().then(()=>{U(),U=us($,{anchorElement:V,open:h,options:{floating:B,focusTrap:ee?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:te},modal:{shouldCloseOnInteractOutside:k,onClose:_,open:F,closeOnInteractOutside:z},escapeKeydown:te?{handler:()=>{_()}}:null,portal:Sr($,oe)}}).destroy})});return{destroy(){O(),U()}}}});function T($){h.update(U=>!U),$&&$!==v.get()&&v.set($)}function k($){var F;if((F=p.get())==null||F($),$.defaultPrevented)return!1;const U=$.target,O=document.getElementById(g.trigger.get());return!(O&&Ci(U)&&(U===O||O.contains(U)))}const L=Fe(Xr("trigger"),{stores:[C,g.content,g.trigger],returned:([$,U,O])=>({role:"button","aria-haspopup":"dialog","aria-expanded":$?"true":"false","data-state":yl($),"aria-controls":U,id:O}),action:$=>({destroy:rt(ke($,"click",()=>{T($)}),ke($,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),T($))}))})}),R=Fe(Xr("overlay"),{stores:[C],returned:([$])=>({hidden:$?void 0:!0,tabindex:-1,style:Ft({display:$?void 0:"none"}),"aria-hidden":"true","data-state":yl($)}),action:$=>{let U=ze,O=ze,F=ze;return u.get()&&(U=di($,{handler:()=>{_()}}).destroy),O=xe([a],([V])=>{if(F(),V===null)return;const B=Sr($,V);B!==null&&(F=gs($,B).destroy)}),{destroy(){U(),O(),F()}}}}),W=Fe(Xr("arrow"),{stores:i,returned:$=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${$}px)`,height:`var(--arrow-size, ${$}px)`})})}),j=Fe(Xr("close"),{returned:()=>({type:"button"}),action:$=>({destroy:rt(ke($,"click",O=>{O.defaultPrevented||_()}),ke($,"keydown",O=>{O.defaultPrevented||O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),T())}))})});return xe([h,v,o],([$,U,O])=>{if(!ht)return;const F=[];if($){U||qt().then(()=>{const B=document.getElementById(g.trigger.get());x(B)&&v.set(B)}),O&&F.push($o());const V=U??document.getElementById(g.trigger.get());ci({prop:c.get(),defaultEl:V})}return()=>{F.forEach(V=>V())}}),{ids:g,elements:{trigger:L,content:A,arrow:W,close:j,overlay:R},states:{open:h},options:n}}function yl(t){return t?"open":"closed"}const Mm={orientation:"horizontal",decorative:!1},Nm=t=>{const e={...Mm,...t},n=It(e),{orientation:r,decorative:i}=n;return{elements:{root:Fe("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}},Hm={loop:!0,orientation:"horizontal"},{name:Bi,selector:Ms}=Xn("toolbar"),Vm=t=>{const e={...Hm,...t},n=It(e),{loop:r,orientation:i}=n,s=Fe(Bi(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Fe(Bi("button"),{returned:()=>({role:"button",type:"button"}),action:d=>(Ns(d),{destroy:ke(d,"keydown",c)})}),u=Fe(Bi("link"),{returned:()=>({role:"link"}),action:d=>(Ns(d),{destroy:ke(d,"keydown",c)})}),l=Fe(Bi("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 p={...a,...d},m=It(p),{type:h,disabled:v}=m,g=p.defaultValue?p.defaultValue:p.type==="single"?void 0:[],_=p.value??Pe(g),C=cr(_,p==null?void 0:p.onValueChange),{name:A}=Xn("toolbar-group"),T=Fe(A(),{stores:i,returned:R=>({role:"group","data-orientation":R})}),k=Fe(A("item"),{stores:[v,h,C,i],returned:([R,W,j,$])=>U=>{const O=typeof U=="string"?U:U.value,F=typeof U=="string"?!1:!!U.disabled,V=R||F,B=Array.isArray(j)?j.includes(O):j===O,ee=W==="single",te=W==="multiple";return{disabled:ii(V),pressed:B,"data-orientation":$,"data-disabled":ii(V),"data-value":O,"data-state":B?"on":"off","aria-checked":ee?B:void 0,"aria-pressed":te?B:void 0,type:"button",role:ee?"radio":void 0,"data-melt-toolbar-item":""}},action:R=>{Ns(R);function W(){const U=R.dataset.value,O=R.dataset.disabled==="true";return{value:U,disabled:O}}function j(){const{value:U,disabled:O}=W();U===void 0||O||C.update(F=>Array.isArray(F)?F.includes(U)?F.filter(V=>V!==U):(F.push(U),F):F===U?void 0:U)}return{destroy:rt(ke(R,"click",()=>{j()}),ke(R,"keydown",U=>{if(U.key===ae.ENTER||U.key===ae.SPACE){U.preventDefault(),j();return}c(U)}))}}}),L=Be(C,R=>W=>Array.isArray(R)?R.includes(W):R===W);return{elements:{group:T,item:k},states:{value:C},helpers:{isPressed:L},options:m}};function c(d){const p=i.get(),m=r.get(),h={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[p??"horizontal"],v={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[p??"horizontal"],g=d.currentTarget;if(!x(g))return;const _=g.closest("[data-melt-toolbar]");if(!x(_))return;const C=pf(_),A=C.indexOf(g);if(d.key===h){d.preventDefault();const T=A+1;T>=C.length&&m?et(C[0]):et(C[T])}else if(d.key===v){d.preventDefault();const T=A-1;T<0&&m?et(C[C.length-1]):et(C[T])}else d.key===ae.HOME?(d.preventDefault(),et(C[0])):d.key===ae.END&&(d.preventDefault(),et(C[C.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function Ns(t){const e=t.closest("[data-melt-toolbar]");if(!x(e))return;pf(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function pf(t){return Array.from(t.querySelectorAll(`${Ms("item")}, ${Ms("button")}, ${Ms("link")}`)).filter(e=>x(e))}function pi(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function Bm(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Fn(){const t=Wf();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 wi(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Oi(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function hf(t){return(e={})=>Um(t,e)}function Um(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:jm(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 jm(t,e){return e==="center"?t:`${t}-${e}`}function Mo(){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 Ai(){const{NAME:t}=Mo();return st(t)}function Km(t){const{RADIO_GROUP_NAME:e}=Mo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=Ai(),i=n(t);return ft(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function qm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=Mo(),r=st(n);return ft(e,{...r,value:t}),{...r,value:t}}function Wm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Ai();hf(r)(n)}const Qm=t=>({builder:t&8}),vl=t=>({builder:t[3]}),zm=t=>({builder:t&8}),kl=t=>({builder:t[3]});function Gm(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&Hs(t);return{c(){i&&i.c(),n=$e()},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=Hs(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Hs(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n))},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function Ym(t){let e;const n=t[11].default,r=pe(n,t,t[10],kl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&1032)&&_e(r,n,i,i[10],e?he(n,i[10],s,zm):ge(i[10]),kl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Hs(t){let e,n,r,i;const s=t[11].default,o=pe(s,t,t[10],vl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]?"a":"div"),o&&o.c(),zi(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=[Ue(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)&&_e(o,s,a,a[10],n?he(s,a[10],f,Qm):ge(a[10]),vl),zi(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){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function Zm(t){let e,n,r,i;const s=[Ym,Gm],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Xm(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=Ke(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:d=!1}=e,{el:p=void 0}=e;const{elements:{item:m},getAttrs:h}=Ai();J(t,m,C=>n(9,u=C));const v=Fn();function g(C){Oe.call(this,t,C)}function _(C){Ce[C?"unshift":"push"](()=>{p=C,n(0,p)})}return t.$$set=C=>{e=ie(ie({},e),vt(C)),n(6,o=Ke(e,s)),"href"in C&&n(1,f=C.href),"asChild"in C&&n(2,c=C.asChild),"disabled"in C&&n(7,d=C.disabled),"el"in C&&n(0,p=C.el),"$$scope"in C&&n(10,a=C.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={...h("item"),...Bm(d)}),t.$$.dirty&264&&Object.assign(r,i)},[p,f,c,r,m,v,o,d,i,u,a,l,g,_]}class Lt extends ve{constructor(e){super(),ye(this,e,Xm,Zm,fe,{href:1,asChild:2,disabled:7,el:0})}}const Jm=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),xm=t=>({builder:t&4}),El=t=>({builder:t[2]});function ep(t){let e,n,r,i;const s=t[10].default,o=pe(s,t,t[9],Cl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[Ue(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)&&_e(o,s,a,a[9],n?he(s,a[9],f,Jm):ge(a[9]),Cl),le(e,l=Me(u,[f&4&&a[2],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function tp(t){let e;const n=t[10].default,r=pe(n,t,t[9],El);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&516)&&_e(r,n,i,i[9],e?he(n,i[9],s,xm):ge(i[9]),El)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function np(t){let e,n,r,i;const s=[tp,ep],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function rp(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=Ke(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:p},getAttrs:m}=qm(a);J(t,p,C=>n(8,o=C));const h=m("radio-item"),v=Fn();function g(C){Oe.call(this,t,C)}function _(C){Ce[C?"unshift":"push"](()=>{d=C,n(0,d)})}return t.$$set=C=>{e=ie(ie({},e),vt(C)),n(5,s=Ke(e,i)),"value"in C&&n(6,a=C.value),"disabled"in C&&n(7,f=C.disabled),"asChild"in C&&n(1,c=C.asChild),"el"in C&&n(0,d=C.el),"$$scope"in C&&n(9,l=C.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,h)},[d,c,r,p,v,s,a,f,o,l,u,g,_]}class ip extends ve{constructor(e){super(),ye(this,e,rp,np,fe,{value:6,disabled:7,asChild:1,el:0})}}const sp=t=>({builder:t&4}),wl=t=>({builder:t[2]});function op(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Ue(t[3].action(e)),n=!0)},p(o,u){le(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 lp(t){let e;const n=t[7].default,r=pe(n,t,t[6],wl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,sp):ge(i[6]),wl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function up(t){let e,n,r,i;const s=[lp,op],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function ap(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=Ai();J(t,c,h=>n(3,o=h));const p=d("separator");function m(h){Ce[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),vt(h)),n(5,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,o,c,s,l,u,m]}class bs extends ve{constructor(e){super(),ye(this,e,ap,up,fe,{asChild:1,el:0})}}const fp=t=>({builder:t&4}),Ol=t=>({builder:t[2]}),cp=t=>({builder:t&4}),Al=t=>({builder:t[2]});function dp(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Ol);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,fp):ge(a[8]),Ol),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function mp(t){let e;const n=t[9].default,r=pe(n,t,t[8],Al);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,cp):ge(i[8]),Al)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function pp(t){let e,n,r,i;const s=[mp,dp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function hp(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=Ke(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:p},states:{value:m},getAttrs:h}=Km({defaultValue:a,onValueChange:({next:_})=>(_!=null&&_!==a&&(f==null||f(_),n(5,a=_)),_)});J(t,p,_=>n(7,o=_));const v=h("radio-group");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(4,s=Ke(e,i)),"value"in _&&n(5,a=_.value),"onValueChange"in _&&n(6,f=_.onValueChange),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&m.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class _p extends ve{constructor(e){super(),ye(this,e,hp,pp,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function _f(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function gp(t){const{NAME:e,PARTS:n}=_f(),r=pi(e,n),i={...Im({positioning:{placement:"bottom",gutter:0},...wi(t),forceVisible:!0}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function No(){const{NAME:t}=_f();return st(t)}function bp(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=No();hf(r)(n)}function gf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function yp(t){const{NAME:e,PARTS:n}=gf(),r=pi(e,n),i={...Sm({...wi(t),role:"dialog",forceVisible:!0}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function Nr(){const{NAME:t}=gf();return st(t)}const vp=t=>({ids:t&1}),Tl=t=>({ids:t[0]});function kp(t){let e;const n=t[12].default,r=pe(n,t,t[11],Tl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2049)&&_e(r,n,i,i[11],e?he(n,i[11],s,vp):ge(i[11]),Tl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Cp(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:p=void 0}=e,{onOutsideClick:m=void 0}=e;const{states:{open:h},updateOption:v,ids:g}=yp({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:p,onOutsideClick:m,onOpenChange:({next:C})=>(f!==C&&(c==null||c(C),n(2,f=C)),C)}),_=Be([g.content,g.description,g.title],([C,A,T])=>({content:C,description:A,title:T}));return J(t,_,C=>n(0,r=C)),t.$$set=C=>{"preventScroll"in C&&n(3,o=C.preventScroll),"closeOnEscape"in C&&n(4,u=C.closeOnEscape),"closeOnOutsideClick"in C&&n(5,l=C.closeOnOutsideClick),"portal"in C&&n(6,a=C.portal),"open"in C&&n(2,f=C.open),"onOpenChange"in C&&n(7,c=C.onOpenChange),"openFocus"in C&&n(8,d=C.openFocus),"closeFocus"in C&&n(9,p=C.closeFocus),"onOutsideClick"in C&&n(10,m=C.onOutsideClick),"$$scope"in C&&n(11,s=C.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&h.set(f),t.$$.dirty&8&&v("preventScroll",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("portal",a),t.$$.dirty&256&&v("openFocus",d),t.$$.dirty&512&&v("closeFocus",p),t.$$.dirty&1024&&v("onOutsideClick",m)},[r,_,f,o,u,l,a,c,d,p,m,s,i]}class mr extends ve{constructor(e){super(),ye(this,e,Cp,kp,fe,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const Ep=t=>({builder:t&8}),$l=t=>({builder:t[3]}),wp=t=>({builder:t&8}),Sl=t=>({builder:t[3]});function Op(t){let e=t[1],n,r,i=t[1]&&Vs(t);return{c(){i&&i.c(),n=$e()},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=Vs(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Vs(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){y(i,s),r=!1},d(s){s&&E(n),i&&i.d(s)}}}function Ap(t){let e;const n=t[9].default,r=pe(n,t,t[8],Sl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&264)&&_e(r,n,i,i[8],e?he(n,i[8],s,wp):ge(i[8]),Sl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Vs(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],$l);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]),o&&o.c(),zi(t[1])(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[3].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&264)&&_e(o,s,a,a[8],n?he(s,a[8],f,Ep):ge(a[8]),$l),zi(a[1])(e,l=Me(u,[f&8&&a[3],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function Tp(t){let e,n,r,i;const s=[Ap,Op],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function $p(t,e,n){let r;const i=["level","asChild","id","el"];let s=Ke(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:p},ids:m,getAttrs:h}=Nr();J(t,p,_=>n(7,o=_));const v=h("title");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(5,s=Ke(e,i)),"level"in _&&n(1,a=_.level),"asChild"in _&&n(2,f=_.asChild),"id"in _&&n(6,c=_.id),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&m.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,v)},[d,a,f,r,p,s,c,o,l,u,g]}class Ot extends ve{constructor(e){super(),ye(this,e,$p,Tp,fe,{level:1,asChild:2,id:6,el:0})}}const Sp=t=>({builder:t&4}),Dl=t=>({builder:t[2]}),Dp=t=>({builder:t&4}),Rl=t=>({builder:t[2]});function Rp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Dl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,Sp):ge(a[7]),Dl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function Pp(t){let e;const n=t[8].default,r=pe(n,t,t[7],Rl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,Dp):ge(i[7]),Rl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Fp(t){let e,n,r,i;const s=[Pp,Rp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Lp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Nr();J(t,c,v=>n(6,o=v));const p=Fn(),m=d("close");function h(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),vt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h]}class Rt extends ve{constructor(e){super(),ye(this,e,Lp,Fp,fe,{asChild:1,el:0})}}const Ip=t=>({builder:t&4}),Pl=t=>({builder:t[2]}),Mp=t=>({builder:t&4}),Fl=t=>({builder:t[2]});function Np(t){let e,n,r,i;const s=t[7].default,o=pe(s,t,t[6],Pl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&68)&&_e(o,s,a,a[6],n?he(s,a[6],f,Ip):ge(a[6]),Pl),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Hp(t){let e;const n=t[7].default,r=pe(n,t,t[6],Fl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,Mp):ge(i[6]),Fl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Vp(t){let e,n,r,i;const s=[Hp,Np],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(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=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Nr();J(t,c,h=>n(5,o=h));const p=d("portal");function m(h){Ce[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),vt(h)),n(4,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,s,o,l,u,m]}class Hr extends ve{constructor(e){super(),ye(this,e,Bp,Vp,fe,{asChild:1,el:0})}}const Up=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),jp=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),Kp=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),qp=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),Wp=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]}),Qp=t=>({builder:t[0]&256}),Vl=t=>({builder:t[8]});function zp(t){let e,n,r,i;const s=t[16].default,o=pe(s,t,t[15],Ll);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[Ue(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)&&_e(o,s,a,a[15],n?he(s,a[15],f,Up):ge(a[15]),Ll),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function Gp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Il);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,jp):ge(t[15]),Il),le(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){y(u,f),f&&(n=Pn(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 Yp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Ml);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,Kp):ge(t[15]),Ml),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function Zp(t){let e,n,r,i,s,o;const u=t[16].default,l=pe(u,t,t[15],Nl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[53](e),i=!0,s||(o=[Ue(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)&&_e(l,u,t,t[15],i?he(u,t[15],d,qp):ge(t[15]),Nl),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(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 Xp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Hl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,Wp):ge(t[15]),Hl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(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 Jp(t){let e;const n=t[16].default,r=pe(n,t,t[15],Vl);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)&&_e(r,n,i,i[15],e?he(n,i[15],s,Qp):ge(i[15]),Vl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function xp(t){let e,n,r,i;const s=[Jp,Xp,Zp,Yp,Gp,zp],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function eh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{el:_=void 0}=e;const{elements:{content:C},states:{open:A},ids:T,getAttrs:k}=Nr();J(t,C,q=>n(14,o=q)),J(t,A,q=>n(9,u=q));const L=k("content");function R(q){Oe.call(this,t,q)}function W(q){Oe.call(this,t,q)}function j(q){Oe.call(this,t,q)}function $(q){Oe.call(this,t,q)}function U(q){Oe.call(this,t,q)}function O(q){Oe.call(this,t,q)}function F(q){Oe.call(this,t,q)}function V(q){Oe.call(this,t,q)}function B(q){Oe.call(this,t,q)}function ee(q){Oe.call(this,t,q)}function te(q){Oe.call(this,t,q)}function z(q){Oe.call(this,t,q)}function oe(q){Oe.call(this,t,q)}function De(q){Oe.call(this,t,q)}function ot(q){Oe.call(this,t,q)}function He(q){Oe.call(this,t,q)}function Y(q){Oe.call(this,t,q)}function X(q){Oe.call(this,t,q)}function _t(q){Oe.call(this,t,q)}function gt(q){Oe.call(this,t,q)}function mt(q){Oe.call(this,t,q)}function mn(q){Oe.call(this,t,q)}function In(q){Oe.call(this,t,q)}function pn(q){Oe.call(this,t,q)}function ws(q){Oe.call(this,t,q)}function Os(q){Oe.call(this,t,q)}function jr(q){Oe.call(this,t,q)}function Kr(q){Oe.call(this,t,q)}function qr(q){Oe.call(this,t,q)}function Wr(q){Oe.call(this,t,q)}function As(q){Oe.call(this,t,q)}function Qr(q){Oe.call(this,t,q)}function Ri(q){Oe.call(this,t,q)}function Q(q){Oe.call(this,t,q)}function ne(q){Oe.call(this,t,q)}function re(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function ue(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function we(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function Je(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function Et(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}return t.$$set=q=>{e=ie(ie({},e),vt(q)),n(12,s=Ke(e,i)),"transition"in q&&n(1,f=q.transition),"transitionConfig"in q&&n(2,c=q.transitionConfig),"inTransition"in q&&n(3,d=q.inTransition),"inTransitionConfig"in q&&n(4,p=q.inTransitionConfig),"outTransition"in q&&n(5,m=q.outTransition),"outTransitionConfig"in q&&n(6,h=q.outTransitionConfig),"asChild"in q&&n(7,v=q.asChild),"id"in q&&n(13,g=q.id),"el"in q&&n(0,_=q.el),"$$scope"in q&&n(15,a=q.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&T.content.set(g),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,L)},[_,f,c,d,p,m,h,v,r,u,C,A,s,g,o,a,l,R,W,j,$,U,O,F,V,B,ee,te,z,oe,De,ot,He,Y,X,_t,gt,mt,mn,In,pn,ws,Os,jr,Kr,qr,Wr,As,Qr,Ri,Q,ne,re,ue,we,Je,Et]}class Vr extends ve{constructor(e){super(),ye(this,e,eh,xp,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const th=t=>({builder:t&256}),Bl=t=>({builder:t[8]});function nh(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[25](e),n||(r=[Ue(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){le(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 rh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[24](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,le(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=Pn(e,t[5],t[6])),r=!1},d(l){l&&E(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function ih(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ie(o,s[u]);return{c(){e=D("div"),le(e,o)},m(u,l){w(u,e,l),t[23](e),r||(i=[Ue(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,le(e,o=Me(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()}))},o:ce,d(u){u&&E(e),t[23](null),r=!1,Te(i)}}}function sh(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),le(e,l)},m(a,f){w(a,e,f),t[22](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,le(e,l=Me(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Pn(e,t[5],t[6])),i=!1},d(a){a&&E(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function oh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),Ue(t[8].action(e))],i=!0)},p(l,a){t=l,le(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&ct(()=>{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 lh(t){let e;const n=t[15].default,r=pe(n,t,t[14],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&_e(r,n,i,i[14],e?he(n,i[14],s,th):ge(i[14]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function uh(t){let e,n,r,i;const s=[lh,oh,sh,ih,rh,nh],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function ah(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{el:g=void 0}=e;const{elements:{overlay:_},states:{open:C},getAttrs:A}=Nr();J(t,_,B=>n(13,o=B)),J(t,C,B=>n(9,u=B));const T=A("overlay");function k(B){Oe.call(this,t,B)}function L(B){Oe.call(this,t,B)}function R(B){Oe.call(this,t,B)}function W(B){Oe.call(this,t,B)}function j(B){Oe.call(this,t,B)}function $(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function U(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function O(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function F(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function V(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}return t.$$set=B=>{e=ie(ie({},e),vt(B)),n(12,s=Ke(e,i)),"transition"in B&&n(1,f=B.transition),"transitionConfig"in B&&n(2,c=B.transitionConfig),"inTransition"in B&&n(3,d=B.inTransition),"inTransitionConfig"in B&&n(4,p=B.inTransitionConfig),"outTransition"in B&&n(5,m=B.outTransition),"outTransitionConfig"in B&&n(6,h=B.outTransitionConfig),"asChild"in B&&n(7,v=B.asChild),"el"in B&&n(0,g=B.el),"$$scope"in B&&n(14,a=B.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,T)},[g,f,c,d,p,m,h,v,r,u,_,C,s,o,a,l,k,L,R,W,j,$,U,O,F,V]}class Br extends ve{constructor(e){super(),ye(this,e,ah,uh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const fh=t=>({builder:t&4}),Ul=t=>({builder:t[2]}),ch=t=>({builder:t&4}),jl=t=>({builder:t[2]});function dh(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Ul);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,fh):ge(a[7]),Ul),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function mh(t){let e;const n=t[8].default,r=pe(n,t,t[7],jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,ch):ge(i[7]),jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function ph(t){let e,n,r,i;const s=[mh,dh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function hh(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Nr();J(t,c,v=>n(6,o=v));const p=Fn(),m=d("trigger");function h(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),vt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h]}class Ur extends ve{constructor(e){super(),ye(this,e,hh,ph,fe,{asChild:1,el:0})}}const _h=t=>({builder:t[0]&256}),Kl=t=>({builder:t[8]}),gh=t=>({builder:t[0]&256}),ql=t=>({builder:t[8]}),bh=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),yh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),vh=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),kh=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]});function Ch(t){let e,n,r,i;const s=t[28].default,o=pe(s,t,t[27],Kl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&134217984)&&_e(o,s,a,a[27],n?he(s,a[27],f,_h):ge(a[27]),Kl),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&8192&&a[13]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function Eh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],ql);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,gh):ge(t[27]),ql),le(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){y(u,f),f&&(n=Pn(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 wh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Wl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,bh):ge(t[27]),Wl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function Oh(t){let e,n,r,i,s,o;const u=t[28].default,l=pe(u,t,t[27],Ql);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[30](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&134217984)&&_e(l,u,t,t[27],i?he(u,t[27],d,yh):ge(t[27]),Ql),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(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 Ah(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],zl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,vh):ge(t[27]),zl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(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 Th(t){let e;const n=t[28].default,r=pe(n,t,t[27],Gl);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)&&_e(r,n,i,i[27],e?he(n,i[27],s,kh):ge(i[27]),Gl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function $h(t){let e,n,r,i;const s=[Th,Ah,Oh,wh,Eh,Ch],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function Sh(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=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:C="center"}=e,{sideOffset:A=0}=e,{alignOffset:T=0}=e,{collisionPadding:k=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:j=!1}=e,{strategy:$="absolute"}=e,{overlap:U=!1}=e,{el:O=void 0}=e;const{elements:{menu:F},states:{open:V},ids:B,getAttrs:ee}=Ai();J(t,F,X=>n(26,u=X)),J(t,V,X=>n(9,o=X));const te=Fn(),z=ee("content");function oe(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function De(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function ot(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function He(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function Y(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}return t.$$set=X=>{e=ie(ie({},e),vt(X)),n(13,s=Ke(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,p=X.inTransitionConfig),"outTransition"in X&&n(5,m=X.outTransition),"outTransitionConfig"in X&&n(6,h=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,g=X.id),"side"in X&&n(15,_=X.side),"align"in X&&n(16,C=X.align),"sideOffset"in X&&n(17,A=X.sideOffset),"alignOffset"in X&&n(18,T=X.alignOffset),"collisionPadding"in X&&n(19,k=X.collisionPadding),"avoidCollisions"in X&&n(20,L=X.avoidCollisions),"collisionBoundary"in X&&n(21,R=X.collisionBoundary),"sameWidth"in X&&n(22,W=X.sameWidth),"fitViewport"in X&&n(23,j=X.fitViewport),"strategy"in X&&n(24,$=X.strategy),"overlap"in X&&n(25,U=X.overlap),"el"in X&&n(0,O=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&g&&B.menu.set(g),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&Wm({side:_,align:C,sideOffset:A,alignOffset:T,collisionPadding:k,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:j,strategy:$,overlap:U})},[O,f,c,d,p,m,h,v,r,o,F,V,te,s,g,_,C,A,T,k,L,R,W,j,$,U,u,a,l,oe,De,ot,He,Y]}class ys extends ve{constructor(e){super(),ye(this,e,Sh,$h,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 vs(){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 Dh(t){const{NAME:e,PARTS:n,MENU_NAME:r}=vs(),i=pi(e,["root"]),s=pi(r,n),o={...Pm(wi(t)),getAttrs:s,getMenubarAttrs:i};return ft(e,o),{...o,updateOption:Oi(o.options)}}function Rh(){const{NAME:t}=vs();return st(t)}function Ph(t){const{MENU_NAME:e}=vs(),{builders:{createMenu:n},getAttrs:r}=Rh(),i={...n({...wi(t),forceVisible:!1}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function Fh(){const{MENU_NAME:t}=vs();return st(t)}const Lh=t=>({builder:t&4,ids:t&8}),Yl=t=>({builder:t[2],ids:t[3]}),Ih=t=>({builder:t&4,ids:t&8}),Zl=t=>({builder:t[2],ids:t[3]});function Mh(t){let e,n,r,i;const s=t[13].default,o=pe(s,t,t[12],Yl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&4108)&&_e(o,s,a,a[12],n?he(s,a[12],f,Lh):ge(a[12]),Yl),le(e,l=Me(u,[f&4&&a[2],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[14](null),r=!1,i()}}}function Nh(t){let e;const n=t[13].default,r=pe(n,t,t[12],Zl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&_e(r,n,i,i[12],e?he(n,i[12],s,Ih):ge(i[12]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Hh(t){let e,n,r,i;const s=[Nh,Mh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Vh(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:d=!1}=e,{id:p=void 0}=e,{preventScroll:m=void 0}=e,{el:h=void 0}=e;const{elements:{menubar:v},updateOption:g,ids:_,getMenubarAttrs:C}=Dh({loop:f,closeOnEscape:c,preventScroll:m});J(t,v,L=>n(11,o=L));const A=Be([_.menubar],([L])=>({menubar:L}));J(t,A,L=>n(3,u=L));const T=C("root");function k(L){Ce[L?"unshift":"push"](()=>{h=L,n(0,h)})}return t.$$set=L=>{e=ie(ie({},e),vt(L)),n(6,s=Ke(e,i)),"loop"in L&&n(7,f=L.loop),"closeOnEscape"in L&&n(8,c=L.closeOnEscape),"asChild"in L&&n(1,d=L.asChild),"id"in L&&n(9,p=L.id),"preventScroll"in L&&n(10,m=L.preventScroll),"el"in L&&n(0,h=L.el),"$$scope"in L&&n(12,a=L.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&p&&_.menubar.set(p),t.$$.dirty&128&&g("loop",f),t.$$.dirty&256&&g("closeOnEscape",c),t.$$.dirty&1024&&g("preventScroll",m),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,T)},[h,d,r,u,v,A,s,f,c,p,m,o,a,l,k]}class Bh extends ve{constructor(e){super(),ye(this,e,Vh,Hh,fe,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const Uh=t=>({menuIds:t&1}),Xl=t=>({menuIds:t[0]});function jh(t){let e;const n=t[15].default,r=pe(n,t,t[14],Xl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&_e(r,n,i,i[14],e?he(n,i[14],s,Uh):ge(i[14]),Xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Kh(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:p=void 0}=e,{closeFocus:m=void 0}=e,{disableFocusFirstItem:h=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:g=void 0}=e;const{states:{open:_},updateOption:C,ids:A}=Ph({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:p,closeFocus:m,disableFocusFirstItem:h,closeOnItemClick:v,onOutsideClick:g,onOpenChange:({next:k})=>(a!==k&&(f==null||f(k),n(2,a=k)),k)}),T=Be([A.menu,A.trigger],([k,L])=>({menu:k,trigger:L}));return J(t,T,k=>n(0,r=k)),t.$$set=k=>{"closeOnOutsideClick"in k&&n(3,o=k.closeOnOutsideClick),"closeOnEscape"in k&&n(4,u=k.closeOnEscape),"portal"in k&&n(5,l=k.portal),"open"in k&&n(2,a=k.open),"onOpenChange"in k&&n(6,f=k.onOpenChange),"loop"in k&&n(7,c=k.loop),"dir"in k&&n(8,d=k.dir),"typeahead"in k&&n(9,p=k.typeahead),"closeFocus"in k&&n(10,m=k.closeFocus),"disableFocusFirstItem"in k&&n(11,h=k.disableFocusFirstItem),"closeOnItemClick"in k&&n(12,v=k.closeOnItemClick),"onOutsideClick"in k&&n(13,g=k.onOutsideClick),"$$scope"in k&&n(14,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&_.set(a),t.$$.dirty&8&&C("closeOnOutsideClick",o),t.$$.dirty&16&&C("closeOnEscape",u),t.$$.dirty&32&&C("portal",l),t.$$.dirty&128&&C("loop",c),t.$$.dirty&256&&C("dir",d),t.$$.dirty&1024&&C("closeFocus",m),t.$$.dirty&2048&&C("disableFocusFirstItem",h),t.$$.dirty&512&&C("typeahead",p),t.$$.dirty&4096&&C("closeOnItemClick",v),t.$$.dirty&8192&&C("onOutsideClick",g)},[r,T,a,o,u,l,f,c,d,p,m,h,v,g,s,i]}class ks extends ve{constructor(e){super(),ye(this,e,Kh,jh,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 qh=t=>({builder:t&4}),Jl=t=>({builder:t[2]}),Wh=t=>({builder:t&4}),xl=t=>({builder:t[2]});function Qh(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Jl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,qh):ge(a[8]),Jl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function zh(t){let e;const n=t[9].default,r=pe(n,t,t[8],xl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,Wh):ge(i[8]),xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Gh(t){let e,n,r,i;const s=[zh,Qh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Yh(t,e,n){let r;const i=["asChild","id","el"];let s=Ke(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:p,getAttrs:m}=Fh();J(t,d,_=>n(7,o=_));const h=Fn(),v=m("trigger");function g(_){Ce[_?"unshift":"push"](()=>{c=_,n(0,c)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(5,s=Ke(e,i)),"asChild"in _&&n(1,a=_.asChild),"id"in _&&n(6,f=_.id),"el"in _&&n(0,c=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f&&p.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[c,a,r,d,h,s,f,o,l,u,g]}class Cs extends ve{constructor(e){super(),ye(this,e,Yh,Gh,fe,{asChild:1,id:6,el:0})}}const Zh=t=>({ids:t&1}),eu=t=>({ids:t[0]});function Xh(t){let e;const n=t[13].default,r=pe(n,t,t[12],eu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&4097)&&_e(r,n,i,i[12],e?he(n,i[12],s,Zh):ge(i[12]),eu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Jh(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:p=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:h=void 0}=e;const{updateOption:v,states:{open:g},ids:_}=gp({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:p,closeFocus:m,onOutsideClick:h,onOpenChange:({next:A})=>(c!==A&&(d==null||d(A),n(2,c=A)),A),positioning:{gutter:0,offset:{mainAxis:1}}}),C=Be([_.content,_.trigger],([A,T])=>({content:A,trigger:T}));return J(t,C,A=>n(0,r=A)),t.$$set=A=>{"disableFocusTrap"in A&&n(3,o=A.disableFocusTrap),"closeOnEscape"in A&&n(4,u=A.closeOnEscape),"closeOnOutsideClick"in A&&n(5,l=A.closeOnOutsideClick),"preventScroll"in A&&n(6,a=A.preventScroll),"portal"in A&&n(7,f=A.portal),"open"in A&&n(2,c=A.open),"onOpenChange"in A&&n(8,d=A.onOpenChange),"openFocus"in A&&n(9,p=A.openFocus),"closeFocus"in A&&n(10,m=A.closeFocus),"onOutsideClick"in A&&n(11,h=A.onOutsideClick),"$$scope"in A&&n(12,s=A.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&g.set(c),t.$$.dirty&8&&v("disableFocusTrap",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("preventScroll",a),t.$$.dirty&128&&v("portal",f),t.$$.dirty&512&&v("openFocus",p),t.$$.dirty&1024&&v("closeFocus",m),t.$$.dirty&2048&&v("onOutsideClick",h)},[r,C,c,o,u,l,a,f,d,p,m,h,s,i]}class xh extends ve{constructor(e){super(),ye(this,e,Jh,Xh,fe,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const e1=t=>({builder:t[0]&256}),tu=t=>({builder:t[8]}),t1=t=>({builder:t[0]&256}),nu=t=>({builder:t[8]}),n1=t=>({builder:t[0]&256}),ru=t=>({builder:t[8]}),r1=t=>({builder:t[0]&256}),iu=t=>({builder:t[8]}),i1=t=>({builder:t[0]&256}),su=t=>({builder:t[8]}),s1=t=>({builder:t[0]&256}),ou=t=>({builder:t[8]});function o1(t){let e,n,r,i;const s=t[27].default,o=pe(s,t,t[26],tu);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=Ue(t[8].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f[0]&67109120)&&_e(o,s,a,a[26],n?he(s,a[26],f,e1):ge(a[26]),tu),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[32](null),r=!1,i()}}}function l1(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],nu);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,t1):ge(t[26]),nu),le(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){y(u,f),f&&(n=Pn(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 u1(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],ru);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,n1):ge(t[26]),ru),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&E(e),u&&u.d(f),t[30](null),i=!1,s()}}}function a1(t){let e,n,r,i,s,o;const u=t[27].default,l=pe(u,t,t[26],iu);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=Ue(t[8].action(e)),s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&67109120)&&_e(l,u,t,t[26],i?he(u,t[26],d,r1):ge(t[26]),iu),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(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 f1(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],su);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,i1):ge(t[26]),su),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=Tn(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(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 c1(t){let e;const n=t[27].default,r=pe(n,t,t[26],ou);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)&&_e(r,n,i,i[26],e?he(n,i[26],s,s1):ge(i[26]),ou)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function d1(t){let e,n,r,i;const s=[c1,f1,a1,u1,l1,o1],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function m1(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=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:C="center"}=e,{sideOffset:A=0}=e,{alignOffset:T=0}=e,{collisionPadding:k=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:j=!1}=e,{strategy:$="absolute"}=e,{overlap:U=!1}=e,{el:O=void 0}=e;const{elements:{content:F},states:{open:V},ids:B,getAttrs:ee}=No();J(t,F,Y=>n(25,u=Y)),J(t,V,Y=>n(9,o=Y));const te=ee("content");function z(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function oe(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function De(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function ot(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function He(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}return t.$$set=Y=>{e=ie(ie({},e),vt(Y)),n(12,s=Ke(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,p=Y.inTransitionConfig),"outTransition"in Y&&n(5,m=Y.outTransition),"outTransitionConfig"in Y&&n(6,h=Y.outTransitionConfig),"asChild"in Y&&n(7,v=Y.asChild),"id"in Y&&n(13,g=Y.id),"side"in Y&&n(14,_=Y.side),"align"in Y&&n(15,C=Y.align),"sideOffset"in Y&&n(16,A=Y.sideOffset),"alignOffset"in Y&&n(17,T=Y.alignOffset),"collisionPadding"in Y&&n(18,k=Y.collisionPadding),"avoidCollisions"in Y&&n(19,L=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,R=Y.collisionBoundary),"sameWidth"in Y&&n(21,W=Y.sameWidth),"fitViewport"in Y&&n(22,j=Y.fitViewport),"strategy"in Y&&n(23,$=Y.strategy),"overlap"in Y&&n(24,U=Y.overlap),"el"in Y&&n(0,O=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&B.content.set(g),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,te),t.$$.dirty[0]&33538560&&o&&bp({side:_,align:C,sideOffset:A,alignOffset:T,collisionPadding:k,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:j,strategy:$,overlap:U})},[O,f,c,d,p,m,h,v,r,o,F,V,s,g,_,C,A,T,k,L,R,W,j,$,U,u,a,l,z,oe,De,ot,He]}class p1 extends ve{constructor(e){super(),ye(this,e,m1,d1,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 h1=t=>({builder:t&4}),lu=t=>({builder:t[2]}),_1=t=>({builder:t&4}),uu=t=>({builder:t[2]});function g1(t){let e,n,r,i;const s=t[12].default,o=pe(s,t,t[11],lu);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[11],n?he(s,a[11],f,h1):ge(a[11]),lu),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function b1(t){let e;const n=t[12].default,r=pe(n,t,t[11],uu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&2052)&&_e(r,n,i,i[11],e?he(n,i[11],s,_1):ge(i[11]),uu)},i(i){e||(b(r,i),e=!0)},o(i){y(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=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function v1(t,e,n){let r,i;const s=["asChild","id","el"];let o=Ke(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:p=void 0}=e;const{elements:{trigger:m},states:{open:h},ids:v,getAttrs:g}=No();J(t,m,T=>n(9,u=T)),J(t,h,T=>n(10,l=T));const _=Fn(),C=g("trigger");function A(T){Ce[T?"unshift":"push"](()=>{p=T,n(0,p)})}return t.$$set=T=>{e=ie(ie({},e),vt(T)),n(6,o=Ke(e,s)),"asChild"in T&&n(1,c=T.asChild),"id"in T&&n(7,d=T.id),"el"in T&&n(0,p=T.el),"$$scope"in T&&n(11,f=T.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&v.trigger.set(d),t.$$.dirty&1024&&n(8,r={...C,"aria-controls":l?v.content:void 0}),t.$$.dirty&512&&n(2,i=u),t.$$.dirty&260&&Object.assign(i,r)},[p,c,i,m,h,_,o,d,r,u,l,f,a,A]}class k1 extends ve{constructor(e){super(),ye(this,e,v1,y1,fe,{asChild:1,id:7,el:0})}}function bf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function C1(t){const{NAME:e,PARTS:n}=bf(),r=pi(e,n),i={...Vm(wi(t)),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function E1(){const{NAME:t}=bf();return st(t)}const w1=t=>({builder:t&4}),au=t=>({builder:t[2]}),O1=t=>({builder:t&4}),fu=t=>({builder:t[2]});function A1(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],au);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,w1):ge(a[8]),au),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,i()}}}function T1(t){let e;const n=t[9].default,r=pe(n,t,t[8],fu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,O1):ge(i[8]),fu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function $1(t){let e,n,r,i;const s=[T1,A1],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function S1(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=Ke(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:p},updateOption:m,getAttrs:h}=C1({loop:a,orientation:f});J(t,p,_=>n(7,o=_));const v=h("root");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(4,s=Ke(e,i)),"loop"in _&&n(5,a=_.loop),"orientation"in _&&n(6,f=_.orientation),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&m("loop",a),t.$$.dirty&64&&m("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class D1 extends ve{constructor(e){super(),ye(this,e,S1,$1,fe,{loop:5,orientation:6,asChild:1,el:0})}}const R1=t=>({builder:t&4}),cu=t=>({builder:t[2]}),P1=t=>({builder:t&4}),du=t=>({builder:t[2]});function F1(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],cu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,R1):ge(a[7]),cu),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&E(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function L1(t){let e;const n=t[8].default,r=pe(n,t,t[7],du);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,P1):ge(i[7]),du)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function I1(t){let e,n,r,i;const s=[L1,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=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function M1(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=E1();J(t,c,g=>n(6,o=g));const p=Fn(),m=d("button");function h(g){Oe.call(this,t,g)}function v(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),vt(g)),n(5,s=Ke(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(7,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h,v]}class N1 extends ve{constructor(e){super(),ye(this,e,M1,I1,fe,{asChild:1,el:0})}}var M0="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",H1="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",V1="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",N0="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",H0="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",V0="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",B1="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",U1="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",j1="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",K1="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",q1="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",W1="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",Q1="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",z1="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",G1="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",Y1="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",Z1="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",X1="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",J1="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",x1="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",e_="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",B0="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",t_="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",n_="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",r_="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",zt="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",i_="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",U0="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",s_="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function o_(t){let e,n,r,i,s=t[0]!==null&&mu(t);return{c(){e=Ks("svg"),s&&s.c(),n=Ks("path"),I(n,"d",t[1]),I(e,"class",r="fill-current "+t[2]),I(e,"viewBox","0 0 24 24"),I(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=mu(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&I(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&I(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&I(e,"aria-hidden",i)},d(o){o&&E(e),s&&s.d()}}}function l_(t){let e,n;return{c(){e=D("span"),I(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&I(e,"class",n)},d(r){r&&E(e)}}}function mu(t){let e,n;return{c(){e=Ks("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 u_(t){let e;function n(s,o){return s[1]===null?l_:o_}let r=n(t),i=r(t);return{c(){i.c(),e=$e()},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 a_(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,a_,u_,fe,{label:0,path:1,class:2})}}async function cn({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 yf(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(yf(n));return e.join("")}}function j0(t){return t.content&&t.content.length>0?yf(t.content[0]):"<Empty Document>"}function vf(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 kf(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 f_(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())}function as(t){return t[0].toUpperCase()+t.substring(1)}const dt=Pe(null),c_=Pe(null),pu=Pe(!1);dt.subscribe(t=>{t!==null&&vf("path",t.fullpath)});function Ln(){return st("apiStatus")}function Ho(){return st("currentUser")}function K0(){return st("uEditorConfig")}function Ct(){return st("currentBranch")}function Vo(){return st("branches")}function d_(){return st("authStatus")}function m_(){return st("hasLoggedOut")}function q0(){return st("configuredTEIBlocks")}function W0(){return st("configuredTEIMarks")}function hu(t,e,n){const r=t.slice();return r[7]=e[n],r}function p_(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),s=Z(i),o=Z(" actions running"),I(r,"class","pl-2")},m(l,a){M(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){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function h_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="1 action running",I(r,"class","pl-2")},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function __(t){let e;return{c(){e=D("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&E(e)}}}function g_(t){let e,n,r,i;const s=[__,h_,p_],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=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function b_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Saving file",I(r,"class","flex-1")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function y_(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Loading file",I(r,"class","flex-1")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function _u(t){let e,n,r,i;const s=[y_,b_],o=[];function u(l,a){return l[7].action==="LoadTextFile"?0:l[7].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=D("li"),r&&r.c(),I(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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function gu(t){let e,n,r,i,s;return n=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=D("li"),H(n.$$.fragment),r=K(),i=D("span"),i.textContent="Fetching branches",I(i,"class","flex-1"),I(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),M(n,e,null),P(e,r),P(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),s=!1},d(o){o&&E(e),N(n)}}}function v_(t){let e,n,r,i=tn(t[0]),s=[];for(let l=0;l<i.length;l+=1)s[l]=_u(hu(t,i,l));const o=l=>y(s[l],1,1,()=>{s[l]=null});let u=t[2].isFetching&&gu();return{c(){e=D("ul");for(let l=0;l<s.length;l+=1)s[l].c();n=K(),u&&u.c()},m(l,a){w(l,e,a);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);P(e,n),u&&u.m(e,null),r=!0},p(l,a){if(a&1){i=tn(l[0]);let f;for(f=0;f<i.length;f+=1){const c=hu(l,i,f);s[f]?(s[f].p(c,a),b(s[f],1)):(s[f]=_u(c),s[f].c(),b(s[f],1),s[f].m(e,n))}for(de(),f=i.length;f<s.length;f+=1)o(f);me()}l[2].isFetching?u?a&4&&b(u,1):(u=gu(),u.c(),b(u,1),u.m(e,null)):u&&(de(),y(u,1,1,()=>{u=null}),me())},i(l){if(!r){for(let a=0;a<i.length;a+=1)b(s[a]);b(u),r=!0}},o(l){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)y(s[a]);y(u),r=!1},d(l){l&&E(e),yi(s,l),u&&u.d()}}}function k_(t){let e,n,r,i;return e=new k1({props:{class:"inline-flex items-center",$$slots:{default:[g_]},$$scope:{ctx:t}}}),r=new p1({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[v_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1027&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&1029&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function bu(t){let e,n;return e=new mr({props:{open:!0,onOpenChange:t[6],$$slots:{default:[A_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function C_(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function E_(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function w_(t){let e,n,r,i,s,o,u,l;return e=new Ot({props:{$$slots:{default:[C_]},$$scope:{ctx:t}}}),u=new Rt({props:{"data-button":!0,$$slots:{default:[E_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("div"),i=D("p"),i.textContent="Unfortunately saving the file failed.",s=K(),o=D("div"),H(u.$$.fragment),I(o,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(a,f){M(e,a,f),w(a,n,f),w(a,r,f),P(r,i),P(r,s),P(r,o),M(u,o,null),l=!0},p(a,f){const c={};f&1024&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&1024&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(E(n),E(r)),N(e,a),N(u)}}}function O_(t){let e,n,r,i;return e=new Br({}),r=new Vr({props:{$$slots:{default:[w_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function A_(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[O_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function T_(t){let e,n,r,i;e=new xh({props:{$$slots:{default:[k_]},$$scope:{ctx:t}}});let s=t[3]&&bu(t);return{c(){H(e.$$.fragment),n=K(),s&&s.c(),r=$e()},m(o,u){M(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&1031&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[3]?s?(s.p(o,u),u&8&&b(s,1)):(s=bu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),N(e,o),s&&s.d(o)}}}const ho=Pe([]);let _o=Pe(!1);function Cf(t){t.status="active",ho.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=$_(t):t.action==="SaveCurrentFile"?e=S_(t):t.action==="SynchroniseBranches"&&(e=D_(t)),e!==null&&e.then(()=>{ho.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function $_(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function S_(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():_o.set(!0)}async function D_(t){await window.fetch("/api/branches",{method:"PATCH"}),t.callback&&t.callback()}function R_(t,e,n){let r,i,s,o;J(t,ho,f=>n(0,r=f)),J(t,_o,f=>n(3,o=f));const u=Vo();J(t,u,f=>n(2,s=f));const l=Be([u],f=>{let c=0;for(const d of f)d!==null&&d.isFetching&&(c=c+1);return c});return J(t,l,f=>n(1,i=f)),[r,i,s,o,u,l,f=>{f||_o.set(!1)}]}let P_=class extends ve{constructor(e){super(),ye(this,e,R_,T_,fe,{})}};function F_(t){let e;const n=t[3].default,r=pe(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)&&_e(r,n,i,i[5],e?he(n,i[5],s,null):ge(i[5]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function L_(t){let e,n,r,i;return e=new Br({}),r=new Vr({props:{$$slots:{default:[F_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function I_(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[L_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function M_(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[I_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new mr({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function N_(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)}cs(()=>{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,N_,M_,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function H_(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function yu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 V_(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[U_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("button"),r.textContent="Create",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function B_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Creating...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function U_(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function j_(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h;e=new Ot({props:{$$slots:{default:[H_]},$$scope:{ctx:t}}});let v=t[2]&&yu(t);const g=[B_,V_],_=[];function C(A,T){return A[3].isPending?0:1}return c=C(t),d=_[c]=g[c](t),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=K(),u=D("input"),l=K(),v&&v.c(),a=K(),f=D("div"),d.c(),I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(A,T){M(e,A,T),w(A,n,T),w(A,r,T),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),v&&v.m(i,null),P(r,a),P(r,f),_[c].m(f,null),p=!0,m||(h=[G(u,"input",t[7]),G(r,"submit",t[6])],m=!0)},p(A,T){const k={};T&2048&&(k.$$scope={dirty:T,ctx:A}),e.$set(k),T&2&&u.value!==A[1]&&it(u,A[1]),A[2]?v?v.p(A,T):(v=yu(A),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let L=c;c=C(A),c!==L&&(de(),y(_[L],1,1,()=>{_[L]=null}),me(),d=_[c],d||(d=_[c]=g[c](A),d.c()),b(d,1),d.m(f,null))},i(A){p||(b(e.$$.fragment,A),b(d),p=!0)},o(A){y(e.$$.fragment,A),y(d),p=!1},d(A){A&&(E(n),E(r)),N(e,A),v&&v.d(),_[c].d(),m=!1,Te(h)}}}function K_(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[j_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function q_(t,e,n){let r;const i=kt(),s=Ct();let o=!1,u="",l="";function a(m){m&&n(1,u="")}const f=ki({mutationFn:async m=>{const h=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:m.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(h.ok){i.invalidateQueries({queryKey:["branches"]});const v=await h.json();s.set(v),Ge.set(Ae.NONE)}else n(2,l=(await h.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});J(t,f,m=>n(3,r=m));async function c(m){m.preventDefault(),r.mutate({title:u})}function d(){u=this.value,n(1,u)}function p(m){o=m,n(0,o)}return[o,u,l,r,a,f,c,d,p]}class W_ extends ve{constructor(e){super(),ye(this,e,q_,K_,fe,{})}}function Q_(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function vu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 z_(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[Y_]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("button"),r.textContent="Delete",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function G_(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Deleting...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function Y_(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Z_(t){var V;let e,n,r,i,s,o,u=((V=t[5])==null?void 0:V.title)+"",l,a,f,c,d,p,m,h,v,g,_,C,A,T,k,L,R,W,j;e=new Ot({props:{$$slots:{default:[Q_]},$$scope:{ctx:t}}});let $=t[2]&&vu(t);const U=[G_,z_],O=[];function F(B,ee){return B[4].isPending?0:1}return k=F(t),L=O[k]=U[k](t),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the branch "),o=D("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=K(),c=D("label"),d=D("span"),d.textContent="Confirm branch name",p=K(),m=D("input"),h=K(),$&&$.c(),v=K(),g=D("label"),_=D("input"),C=Z(` Only delete the local
14
- branch`),A=K(),T=D("div"),L.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block mb-4"),I(_,"type","checkbox"),I(g,"class","block text-sm"),I(T,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(B,ee){M(e,B,ee),w(B,n,ee),w(B,r,ee),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,p),P(c,m),it(m,t[1]),P(c,h),$&&$.m(c,null),P(r,v),P(r,g),P(g,_),_.checked=t[3],P(g,C),P(r,A),P(r,T),O[k].m(T,null),R=!0,W||(j=[G(m,"input",t[10]),G(_,"change",t[11]),G(r,"submit",t[9])],W=!0)},p(B,ee){var oe;const te={};ee&16384&&(te.$$scope={dirty:ee,ctx:B}),e.$set(te),(!R||ee&32)&&u!==(u=((oe=B[5])==null?void 0:oe.title)+"")&&qe(l,u),ee&2&&m.value!==B[1]&&it(m,B[1]),B[2]?$?$.p(B,ee):($=vu(B),$.c(),$.m(c,null)):$&&($.d(1),$=null),ee&8&&(_.checked=B[3]);let z=k;k=F(B),k!==z&&(de(),y(O[z],1,1,()=>{O[z]=null}),me(),L=O[k],L||(L=O[k]=U[k](B),L.c()),b(L,1),L.m(T,null))},i(B){R||(b(e.$$.fragment,B),b(L),R=!0)},o(B){y(e.$$.fragment,B),y(L),R=!1},d(B){B&&(E(n),E(r)),N(e,B),$&&$.d(),O[k].d(),W=!1,Te(j)}}}function X_(t){let e,n,r;function i(o){t[12](o)}let s={onOpenChange:t[7],$$slots:{default:[Z_]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&16446&&(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function J_(t,e,n){let r,i;const s=kt(),o=Ct();J(t,o,g=>n(5,i=g));let u=!1,l="",a="",f=!1;function c(g){g&&n(1,l="")}const d=ki({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json","X-UEDITOR-DELETE-LOCAL-ONLY":f?"true":"false"}});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)))}});J(t,d,g=>n(4,r=g));function p(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 h(){f=this.checked,n(3,f)}function v(g){u=g,n(0,u)}return[u,l,a,f,r,i,o,c,d,p,m,h,v]}class x_ extends ve{constructor(e){super(),ye(this,e,J_,X_,fe,{})}}function ku(t,e,n){const r=t.slice();return r[14]=e[n],r}function eg(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Cu(t){let e,n=t[14].title+"",r,i;return{c(){e=D("option"),r=Z(n),e.__value=i=t[14].id,it(e,e.__value)},m(s,o){w(s,e,o),P(e,r)},p(s,o){o&16&&n!==(n=s[14].title+"")&&qe(r,n),o&16&&i!==(i=s[14].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&E(e)}}}function Eu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 tg(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[rg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("button"),r.textContent="Import",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function ng(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Importing...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function rg(t){let e;return{c(){e=Z("Don't import")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ig(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h;e=new Ot({props:{$$slots:{default:[eg]},$$scope:{ctx:t}}});let v=tn(t[4]),g=[];for(let k=0;k<v.length;k+=1)g[k]=Cu(ku(t,v,k));let _=t[2]&&Eu(t);const C=[ng,tg],A=[];function T(k,L){return k[3].isPending?0:1}return c=T(t),d=A[c]=C[c](t),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=K(),u=D("select");for(let k=0;k<g.length;k+=1)g[k].c();l=K(),_&&_.c(),a=K(),f=D("div"),d.c(),I(s,"data-form-field-label",""),I(u,"data-form-field-text",""),t[1]===void 0&&ct(()=>t[9].call(u)),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(k,L){M(e,k,L),w(k,n,L),w(k,r,L),P(r,i),P(i,s),P(i,o),P(i,u);for(let R=0;R<g.length;R+=1)g[R]&&g[R].m(u,null);Wo(u,t[1],!0),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),A[c].m(f,null),p=!0,m||(h=[G(u,"change",t[9]),G(r,"submit",t[8])],m=!0)},p(k,L){const R={};if(L&131072&&(R.$$scope={dirty:L,ctx:k}),e.$set(R),L&16){v=tn(k[4]);let j;for(j=0;j<v.length;j+=1){const $=ku(k,v,j);g[j]?g[j].p($,L):(g[j]=Cu($),g[j].c(),g[j].m(u,null))}for(;j<g.length;j+=1)g[j].d(1);g.length=v.length}L&18&&Wo(u,k[1]),k[2]?_?_.p(k,L):(_=Eu(k),_.c(),_.m(i,null)):_&&(_.d(1),_=null);let W=c;c=T(k),c!==W&&(de(),y(A[W],1,1,()=>{A[W]=null}),me(),d=A[c],d||(d=A[c]=C[c](k),d.c()),b(d,1),d.m(f,null))},i(k){p||(b(e.$$.fragment,k),b(d),p=!0)},o(k){y(e.$$.fragment,k),y(d),p=!1},d(k){k&&(E(n),E(r)),N(e,k),yi(g,k),_&&_.d(),A[c].d(),m=!1,Te(h)}}}function sg(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$slots:{default:[ig]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(e,o,u),r=!0},p(o,[u]){const l={};u&131102&&(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function og(t,e,n){let r,i;const s=kt(),o=Ct(),u=Vo();let l=!1,a="",f="";function c(g){g&&n(1,a="")}const d=Be(u,g=>g.isSuccess?g.data.remote.filter(_=>{let C=!1;for(const A of g.data.local)if(_.id.endsWith("/"+A.id)){C=!0;break}return!C}).map(_=>({id:_.id.substring(_.id.indexOf("/")+1),title:_.title,nogit:!1})):[]);J(t,d,g=>n(4,i=g));const p=ki({mutationFn:async g=>{const _=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:g.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(_.ok){s.invalidateQueries({queryKey:["branches"]});const C=await _.json();o.set(C),Ge.set(Ae.NONE)}else n(2,f=(await _.json()).detail[0].msg),n(2,f=f[0].toUpperCase()+f.substring(1))}});J(t,p,g=>n(3,r=g));async function m(g){g.preventDefault(),r.mutate({title:a})}function h(){a=Uf(this),n(1,a)}function v(g){l=g,n(0,l)}return[l,a,f,r,i,c,d,p,m,h,v]}class lg extends ve{constructor(e){super(),ye(this,e,og,sg,fe,{})}}function ug(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 wu(t){let e,n;return{c(){e=D("p"),n=Z(t[1]),I(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 ag(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[cg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("button"),r.textContent="Merge",I(r,"type","submit"),I(r,"data-button","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function fg(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),H(n.$$.fragment),r=D("span"),r.textContent="Merging...",I(e,"data-button",""),I(e,"class","inline-flex")},m(s,o){w(s,e,o),M(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&E(e),N(n)}}}function cg(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function dg(t){var j;let e,n,r,i,s,o,u=as(t[4].data.git.default_branch)+"",l,a,f,c=((j=t[3])==null?void 0:j.title)+"",d,p,m,h,v,g,_,C,A,T;e=new Ot({props:{$$slots:{default:[ug]},$$scope:{ctx:t}}});let k=t[1]&&wu(t);const L=[fg,ag],R=[];function W($,U){return $[2].isPending?0:1}return g=W(t),_=R[g]=L[g](t),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=D("span"),l=Z(u),a=Z(`
15
- into the current branch`),f=D("span"),d=Z(c),p=Z(". This cannot be undone."),m=K(),k&&k.c(),h=K(),v=D("div"),_.c(),I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(v,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m($,U){M(e,$,U),w($,n,U),w($,r,U),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(i,f),P(f,d),P(i,p),P(r,m),k&&k.m(r,null),P(r,h),P(r,v),R[g].m(v,null),C=!0,A||(T=G(r,"submit",t[9]),A=!0)},p($,U){var V;const O={};U&8192&&(O.$$scope={dirty:U,ctx:$}),e.$set(O),(!C||U&16)&&u!==(u=as($[4].data.git.default_branch)+"")&&qe(l,u),(!C||U&8)&&c!==(c=((V=$[3])==null?void 0:V.title)+"")&&qe(d,c),$[1]?k?k.p($,U):(k=wu($),k.c(),k.m(r,h)):k&&(k.d(1),k=null);let F=g;g=W($),g!==F&&(de(),y(R[F],1,1,()=>{R[F]=null}),me(),_=R[g],_||(_=R[g]=L[g]($),_.c()),b(_,1),_.m(v,null))},i($){C||(b(e.$$.fragment,$),b(_),C=!0)},o($){y(e.$$.fragment,$),y(_),C=!1},d($){$&&(E(n),E(r)),N(e,$),k&&k.d(),R[g].d(),A=!1,T()}}}function mg(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[dg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function pg(t,e,n){let r,i,s;const o=kt(),u=Ln();J(t,u,h=>n(4,s=h));const l=Ct();J(t,l,h=>n(3,i=h));let a=!1,f="";function c(h){}const d=ki({mutationFn:async()=>{const h=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});h.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set(Ae.NONE)):(n(1,f=(await h.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});J(t,d,h=>n(2,r=h));function p(h){h.preventDefault(),r.mutate()}function m(h){a=h,n(0,a)}return[a,f,r,i,s,u,l,c,d,p,m]}class hg extends ve{constructor(e){super(),ye(this,e,pg,mg,fe,{})}}function _g(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 Ou(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 gg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function bg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ot({props:{$$slots:{default:[_g]},$$scope:{ctx:t}}});let g=t[2]&&Ou(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[gg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),H(c.$$.fragment),d=K(),p=D("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(_,C){M(e,_,C),w(_,n,C),w(_,r,C),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),M(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,C){const A={};C&2056&&(A.$$scope={dirty:C,ctx:_}),e.$set(A),C&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,C):(g=Ou(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};C&2048&&(T.$$scope={dirty:C,ctx:_}),c.$set(T)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(E(n),E(r)),N(e,_),g&&g.d(),N(c),h=!1,Te(v)}}}function yg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[bg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function vg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await h.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let kg=class extends ve{constructor(e){super(),ye(this,e,vg,yg,fe,{})}};function Cg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),I(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 Au(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),I(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 Eg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function wg(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,h,v,g,_,C,A,T,k,L;e=new Ot({props:{class:"bg-rose-700",$$slots:{default:[Cg]},$$scope:{ctx:t}}});let R=t[1]&&Au(t);return _=new Rt({props:{"data-button":!0,$$slots:{default:[Eg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the folder "),o=D("span"),l=Z(u),a=Z(`
11
+ */function co(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 tm(t){if(Array.isArray(t))return co(t)}function nm(t,e,n){return(e=lm(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rm(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function im(){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 dl(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 ml(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dl(Object(n),!0).forEach(function(r){nm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sm(t){return tm(t)||rm(t)||um(t)||im()}function om(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 lm(t){var e=om(t,"string");return typeof e=="symbol"?e:e+""}function um(t,e){if(t){if(typeof t=="string")return co(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)?co(t,e):void 0}}var pl={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()}},am=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},fm=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},si=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},cm=function(e){return si(e)&&!e.shiftKey},dm=function(e){return si(e)&&e.shiftKey},hl=function(e){return setTimeout(e,0)},Gr=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},Hi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},mm=[],pm=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||mm,s=ml({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:cm,isKeyBackward:dm},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},u,l=function(O,F,V){return O&&O[F]!==void 0?O[F]:s[V||F]},a=function(O,F){var V=typeof(F==null?void 0:F.composedPath)=="function"?F.composedPath():void 0;return o.containerGroups.findIndex(function(B){var ee=B.container,te=B.tabbableNodes;return ee.contains(O)||(V==null?void 0:V.includes(ee))||te.find(function(z){return z===O})})},f=function(O){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=F.hasFallback,B=V===void 0?!1:V,ee=F.params,te=ee===void 0?[]:ee,z=s[O];if(typeof z=="function"&&(z=z.apply(void 0,sm(te))),z===!0&&(z=void 0),!z){if(z===void 0||z===!1)return z;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var oe=z;if(typeof z=="string"){try{oe=r.querySelector(z)}catch(De){throw new Error("`".concat(O,'` appears to be an invalid selector; error="').concat(De.message,'"'))}if(!oe&&!B)throw new Error("`".concat(O,"` as selector refers to no known node"))}return oe},c=function(){var O=f("initialFocus",{hasFallback:!0});if(O===!1)return!1;if(O===void 0||O&&!Fs(O,s.tabbableOptions))if(a(r.activeElement)>=0)O=r.activeElement;else{var F=o.tabbableGroups[0],V=F&&F.firstTabbableNode;O=V||f("fallbackFocus")}else O===null&&(O=f("fallbackFocus"));if(!O)throw new Error("Your focus-trap needs to have at least one focusable element");return O},d=function(){if(o.containerGroups=o.containers.map(function(O){var F=Jd(O,s.tabbableOptions),V=xd(O,s.tabbableOptions),B=F.length>0?F[0]:void 0,ee=F.length>0?F[F.length-1]:void 0,te=V.find(function(De){return lr(De)}),z=V.slice().reverse().find(function(De){return lr(De)}),oe=!!F.find(function(De){return Nn(De)>0});return{container:O,tabbableNodes:F,focusableNodes:V,posTabIndexesFound:oe,firstTabbableNode:B,lastTabbableNode:ee,firstDomTabbableNode:te,lastDomTabbableNode:z,nextTabbableNode:function(ot){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=F.indexOf(ot);return Y<0?He?V.slice(V.indexOf(ot)+1).find(function(X){return lr(X)}):V.slice(0,V.indexOf(ot)).reverse().find(function(X){return lr(X)}):F[Y+(He?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(O){return O.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(O){return O.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.")},p=function(O){var F=O.activeElement;if(F)return F.shadowRoot&&F.shadowRoot.activeElement!==null?p(F.shadowRoot):F},m=function(O){if(O!==!1&&O!==p(document)){if(!O||!O.focus){m(c());return}O.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=O,am(O)&&O.select()}},h=function(O){var F=f("setReturnFocus",{params:[O]});return F||(F===!1?!1:O)},v=function(O){var F=O.target,V=O.event,B=O.isBackward,ee=B===void 0?!1:B;F=F||Hi(V),d();var te=null;if(o.tabbableGroups.length>0){var z=a(F,V),oe=z>=0?o.containerGroups[z]:void 0;if(z<0)ee?te=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:te=o.tabbableGroups[0].firstTabbableNode;else if(ee){var De=o.tabbableGroups.findIndex(function(gt){var mt=gt.firstTabbableNode;return F===mt});if(De<0&&(oe.container===F||Fs(F,s.tabbableOptions)&&!lr(F,s.tabbableOptions)&&!oe.nextTabbableNode(F,!1))&&(De=z),De>=0){var ot=De===0?o.tabbableGroups.length-1:De-1,He=o.tabbableGroups[ot];te=Nn(F)>=0?He.lastTabbableNode:He.lastDomTabbableNode}else si(V)||(te=oe.nextTabbableNode(F,!1))}else{var Y=o.tabbableGroups.findIndex(function(gt){var mt=gt.lastTabbableNode;return F===mt});if(Y<0&&(oe.container===F||Fs(F,s.tabbableOptions)&&!lr(F,s.tabbableOptions)&&!oe.nextTabbableNode(F))&&(Y=z),Y>=0){var X=Y===o.tabbableGroups.length-1?0:Y+1,_t=o.tabbableGroups[X];te=Nn(F)>=0?_t.firstTabbableNode:_t.firstDomTabbableNode}else si(V)||(te=oe.nextTabbableNode(F))}}else te=f("fallbackFocus");return te},g=function(O){var F=Hi(O);if(!(a(F,O)>=0)){if(Gr(s.clickOutsideDeactivates,O)){u.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Gr(s.allowOutsideClick,O)||O.preventDefault()}},_=function(O){var F=Hi(O),V=a(F,O)>=0;if(V||F instanceof Document)V&&(o.mostRecentlyFocusedNode=F);else{O.stopImmediatePropagation();var B,ee=!0;if(o.mostRecentlyFocusedNode)if(Nn(o.mostRecentlyFocusedNode)>0){var te=a(o.mostRecentlyFocusedNode),z=o.containerGroups[te].tabbableNodes;if(z.length>0){var oe=z.findIndex(function(De){return De===o.mostRecentlyFocusedNode});oe>=0&&(s.isKeyForward(o.recentNavEvent)?oe+1<z.length&&(B=z[oe+1],ee=!1):oe-1>=0&&(B=z[oe-1],ee=!1))}}else o.containerGroups.some(function(De){return De.tabbableNodes.some(function(ot){return Nn(ot)>0})})||(ee=!1);else ee=!1;ee&&(B=v({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),m(B||o.mostRecentlyFocusedNode||c())}o.recentNavEvent=void 0},E=function(O){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=O;var V=v({event:O,isBackward:F});V&&(si(O)&&O.preventDefault(),m(V))},A=function(O){(s.isKeyForward(O)||s.isKeyBackward(O))&&E(O,s.isKeyBackward(O))},$=function(O){fm(O)&&Gr(s.escapeDeactivates,O)!==!1&&(O.preventDefault(),u.deactivate())},k=function(O){var F=Hi(O);a(F,O)>=0||Gr(s.clickOutsideDeactivates,O)||Gr(s.allowOutsideClick,O)||(O.preventDefault(),O.stopImmediatePropagation())},L=function(){if(o.active)return pl.activateTrap(i,u),o.delayInitialFocusTimer=s.delayInitialFocus?hl(function(){m(c())}):m(c()),r.addEventListener("focusin",_,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",k,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",$),u},R=function(){if(o.active)return r.removeEventListener("focusin",_,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",k,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",$),u},W=function(O){var F=O.some(function(V){var B=Array.from(V.removedNodes);return B.some(function(ee){return ee===o.mostRecentlyFocusedNode})});F&&m(c())},j=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(W):void 0,T=function(){j&&(j.disconnect(),o.active&&!o.paused&&o.containers.map(function(O){j.observe(O,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(O){if(o.active)return this;var F=l(O,"onActivate"),V=l(O,"onPostActivate"),B=l(O,"checkCanFocusTrap");B||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,F==null||F();var ee=function(){B&&d(),L(),T(),V==null||V()};return B?(B(o.containers.concat()).then(ee,ee),this):(ee(),this)},deactivate:function(O){if(!o.active)return this;var F=ml({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},O);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,R(),o.active=!1,o.paused=!1,T(),pl.deactivateTrap(i,u);var V=l(F,"onDeactivate"),B=l(F,"onPostDeactivate"),ee=l(F,"checkCanReturnFocus"),te=l(F,"returnFocus","returnFocusOnDeactivate");V==null||V();var z=function(){hl(function(){te&&m(h(o.nodeFocusedBeforeActivation)),B==null||B()})};return te&&ee?(ee(h(o.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(O){if(o.paused||!o.active)return this;var F=l(O,"onPause"),V=l(O,"onPostPause");return o.paused=!0,F==null||F(),R(),T(),V==null||V(),this},unpause:function(O){if(!o.paused||!o.active)return this;var F=l(O,"onUnpause"),V=l(O,"onPostUnpause");return o.paused=!1,F==null||F(),d(),L(),T(),V==null||V(),this},updateContainerElements:function(O){var F=[].concat(O).filter(Boolean);return o.containers=F.map(function(V){return typeof V=="string"?r.querySelector(V):V}),o.active&&d(),T(),this}},u.updateContainerElements(e),u};function mf(t={}){let e;const{immediate:n,...r}=t,i=Pe(!1),s=Pe(!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=pm(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:tl(i),isPaused:tl(s),activate:o,deactivate:u,pause:l,unpause:a}}const Vi=[],pf=(t,e)=>{let n=ze;function r(){const s=Vi.indexOf(t);s>=0&&Vi.splice(s,1)}function i(s){n();const{open:o,onClose:u,shouldCloseOnInteractOutside:l,closeOnInteractOutside:a}=s;fn(100).then(()=>{o?Vi.push(t):r()});function f(){return Oc(Vi)===t}function c(){f()&&u&&(u(),r())}function d(m){const h=m.target;Ci(h)&&h&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())}function p(m){l!=null&&l(m)&&f()&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation(),c())}n=_m(t,{onInteractOutsideStart:d,onInteractOutside:a?p:void 0,enabled:o}).destroy}return i(e),{update:i,destroy(){r(),n()}}},hm={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},us=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:r,options:i}=e;if(!n||!r||!i)return{destroy:ze};const s={...hm,...i},o=[];if(s.portal!==null&&o.push(gs(t,s.portal).destroy),o.push(Md(n,t,s.floating).destroy),s.focusTrap!==null){const{useFocusTrap:l}=mf({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...s.focusTrap});o.push(l(t).destroy)}s.modal!==null&&o.push(pf(t,{onClose:()=>{x(n)&&(r.set(!1),n.focus())},shouldCloseOnInteractOutside:l=>!(l.defaultPrevented||x(n)&&n.contains(l.target)),...s.modal}).destroy),s.escapeKeydown!==null&&o.push(di(t,{enabled:r,handler:()=>{r.set(!1)},...s.escapeKeydown}).destroy);const u=rt(...o);return{destroy(){u()}}},gs=(t,e="body")=>{let n;if(!x(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 qt(),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}},_m=(t,e)=>{let n=ze,r=ze,i=!1,s=!1,o=!1;function u(f){n(),r();const{onInteractOutside:c,onInteractOutsideStart:d,enabled:p}=f;if(!p)return;function m(g){c&&_l(g,t)&&(d==null||d(g));const _=g.target;Ci(_)&&hf(t,_)&&(s=!0),i=!0}function h(g){c==null||c(g)}const v=gm(t);if(typeof PointerEvent<"u"){const g=_=>{r();const E=A=>{l(A)&&h(A),a()};if(_.pointerType==="touch"){r=bt(v,"click",E,{capture:!0,once:!0});return}E(_)};n=rt(bt(v,"pointerdown",m,!0),bt(v,"pointerup",g,!0))}else{const g=E=>{o?o=!1:l(E)&&h(E),a()},_=E=>{o=!0,l(E)&&h(E),a()};n=rt(bt(v,"mousedown",m,!0),bt(v,"mouseup",g,!0),bt(v,"touchstart",m,!0),bt(v,"touchend",_,!0))}}function l(f){return!!(i&&!s&&_l(f,t))}function a(){i=!1,s=!1}return u(e),{update:u,destroy(){n(),r()}}};function _l(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!Ci(n))return!1;const r=n.ownerDocument;return!r||!r.documentElement.contains(n)?!1:e&&!hf(e,n)}function hf(t,e){return t===e||t.contains(e)}function gm(t){return(t==null?void 0:t.ownerDocument)??document}function bm(t){const e={};return Object.keys(t).forEach(n=>{const r=n,i=t[r];Ka(i)?e[r]=Xe(i):e[r]=Xe(yt(i))}),e}const ym={prefix:"",disabled:yt(!1),required:yt(!1),name:yt(void 0)};function U0(t){const e={...ym,...Dc(t)},{name:n}=Jn(e.prefix),{value:r,name:i,disabled:s,required:o}=bm(Mr(e,"prefix")),u=i;return Fe(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:Ft({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 vm={ltr:[...fi,ae.ARROW_RIGHT],rtl:[...fi,ae.ARROW_LEFT]},km={ltr:[ae.ARROW_LEFT],rtl:[ae.ARROW_RIGHT]},gl=["menu","trigger"],Cm={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 Em(t){const{name:e,selector:n}=Jn(t.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:u,portal:l,forceVisible:a,typeahead:f,loop:c,closeFocus:d,disableFocusFirstItem:p,closeOnItemClick:m,onOutsideClick:h}=t.rootOptions,v=t.rootOpen,g=t.rootActiveTrigger,_=t.nextFocusable,E=t.prevFocusable,A=Xe.writable(!1),$=Xe(Pe(0)),k=Xe(Pe(null)),L=Xe(Pe("right")),R=Xe(Pe(null)),W=Xe(Be([L,k],([Q,ne])=>re=>Q===(ne==null?void 0:ne.side)&&wm(re,ne==null?void 0:ne.area))),{typed:j,handleTypeaheadSearch:T}=zc(),U=It({...ai(gl),...t.ids}),O=es({open:v,forceVisible:a,activeTrigger:g}),F=Fe(e(),{stores:[O,l,U.menu,U.trigger],returned:([Q,ne,re,ue])=>({role:"menu",hidden:Q?void 0:!0,style:Ft({display:Q?void 0:"none"}),id:re,"aria-labelledby":ue,"data-state":Q?"open":"closed","data-portal":ms(ne),tabindex:-1}),action:Q=>{let ne=ze;const re=xe([O,g,s,u,l,o],([we,Je,wt,q,Le,We])=>{ne(),!(!we||!Je)&&qt().then(()=>{ne(),Zr(Q,n),ne=us(Q,{anchorElement:Je,open:v,options:{floating:wt,modal:{closeOnInteractOutside:q,shouldCloseOnInteractOutside:Re=>{var Ie;return(Ie=h.get())==null||Ie(Re),!(Re.defaultPrevented||x(Je)&&Je.contains(Re.target))},onClose:()=>{v.set(!1),Je.focus()},open:we},portal:Pr(Q,Le),escapeKeydown:We?void 0:null}}).destroy})}),ue=rt(ke(Q,"keydown",we=>{const Je=we.target,wt=we.currentTarget;if(!x(Je)||!x(wt)||!(Je.closest('[role="menu"]')===wt))return;if(oo.includes(we.key)&&po(we,c.get()??!1),we.key===ae.TAB){we.preventDefault(),v.set(!1),mo(we,_,E);return}const Le=we.key.length===1;!(we.ctrlKey||we.altKey||we.metaKey)&&Le&&f.get()===!0&&T(we.key,ln(wt))}));return{destroy(){re(),ue(),ne()}}}}),V=Fe(e("trigger"),{stores:[v,U.menu,U.trigger],returned:([Q,ne,re])=>({"aria-controls":ne,"aria-expanded":Q,"data-state":Q?"open":"closed",id:re,tabindex:0}),action:Q=>(ti(Q),g.update(re=>re||Q),{destroy:rt(ke(Q,"click",re=>{const ue=v.get(),we=re.currentTarget;x(we)&&(gt(we),ue||re.preventDefault())}),ke(Q,"keydown",re=>{const ue=re.currentTarget;if(!x(ue)||!(fi.includes(re.key)||re.key===ae.ARROW_DOWN))return;re.preventDefault(),gt(ue);const we=ue.getAttribute("aria-controls");if(!we)return;const Je=document.getElementById(we);if(!Je)return;const wt=ln(Je);wt.length&&et(wt[0])}))})}),B=Fe(e("arrow"),{stores:i,returned:Q=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${Q}px)`,height:`var(--arrow-size, ${Q}px)`})})}),ee=Fe(e("overlay"),{stores:[O],returned:([Q])=>({hidden:Q?void 0:!0,tabindex:-1,style:Ft({display:Q?void 0:"none"}),"aria-hidden":"true","data-state":$m(Q)}),action:Q=>{let ne=ze;o.get()&&(ne=di(Q,{handler:()=>{v.set(!1);const we=g.get();we&&we.focus()}}).destroy);const re=xe([l],([ue])=>{if(ue===null)return ze;const we=Pr(Q,ue);return we===null?ze:gs(Q,we).destroy});return{destroy(){ne(),re()}}}}),te=Fe(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:Q=>(Zr(Q,n),ti(Q),{destroy:rt(ke(Q,"pointerdown",re=>{const ue=re.currentTarget;if(x(ue)&&on(ue)){re.preventDefault();return}}),ke(Q,"click",re=>{const ue=re.currentTarget;if(x(ue)){if(on(ue)){re.preventDefault();return}if(re.defaultPrevented){et(ue);return}m.get()&&fn(1).then(()=>{v.set(!1)})}}),ke(Q,"keydown",re=>{qr(re)}),ke(Q,"pointermove",re=>{jr(re)}),ke(Q,"pointerleave",re=>{Kr(re)}),ke(Q,"focusin",re=>{mt(re)}),ke(Q,"focusout",re=>{mn(re)}))})}),z=Fe(e("group"),{returned:()=>Q=>({role:"group","aria-labelledby":Q})}),oe=Fe(e("group-label"),{returned:()=>Q=>({id:Q})}),De={defaultChecked:!1,disabled:!1},ot=Q=>{const ne={...De,...Q},re=ne.checked??Pe(ne.defaultChecked??null),ue=hr(re,ne.onCheckedChange),we=Pe(ne.disabled),Je=Fe(e("checkbox-item"),{stores:[ue,we],returned:([Le,We])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":Wr(Le)?"mixed":Le?"true":"false","data-disabled":ii(We),"data-state":As(Le)}),action:Le=>(Zr(Le,n),ti(Le),{destroy:rt(ke(Le,"pointerdown",Re=>{const Ie=Re.currentTarget;if(x(Ie)&&on(Ie)){Re.preventDefault();return}}),ke(Le,"click",Re=>{const Ie=Re.currentTarget;if(x(Ie)){if(on(Ie)){Re.preventDefault();return}if(Re.defaultPrevented){et(Ie);return}ue.update(hn=>Wr(hn)?!0:!hn),m.get()&&qt().then(()=>{v.set(!1)})}}),ke(Le,"keydown",Re=>{qr(Re)}),ke(Le,"pointermove",Re=>{const Ie=Re.currentTarget;if(x(Ie)){if(on(Ie)){pn(Re);return}jr(Re,Ie)}}),ke(Le,"pointerleave",Re=>{Kr(Re)}),ke(Le,"focusin",Re=>{mt(Re)}),ke(Le,"focusout",Re=>{mn(Re)}))})}),wt=Be(ue,Le=>Le===!0),q=Be(ue,Le=>Le==="indeterminate");return{elements:{checkboxItem:Je},states:{checked:ue},helpers:{isChecked:wt,isIndeterminate:q},options:{disabled:we}}},He=(Q={})=>{const ne=Q.value??Pe(Q.defaultValue??null),re=hr(ne,Q.onValueChange),ue=Fe(e("radio-group"),{returned:()=>({role:"group"})}),we={disabled:!1},Je=Fe(e("radio-item"),{stores:[re],returned:([q])=>Le=>{const{value:We,disabled:Re}={...we,...Le},Ie=q===We;return{disabled:Re,role:"menuitemradio","data-state":Ie?"checked":"unchecked","aria-checked":Ie,"data-disabled":ii(Re),"data-value":We,"data-orientation":"vertical",tabindex:-1}},action:q=>(Zr(q,n),{destroy:rt(ke(q,"pointerdown",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){We.preventDefault();return}}),ke(q,"click",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){We.preventDefault();return}if(We.defaultPrevented){if(!x(Re))return;et(Re);return}re.set(Ie),m.get()&&qt().then(()=>{v.set(!1)})}),ke(q,"keydown",We=>{qr(We)}),ke(q,"pointermove",We=>{const Re=We.currentTarget;if(!x(Re))return;const Ie=q.dataset.value;if(q.dataset.disabled||Ie===void 0){pn(We);return}jr(We,Re)}),ke(q,"pointerleave",We=>{Kr(We)}),ke(q,"focusin",We=>{mt(We)}),ke(q,"focusout",We=>{mn(We)}))})}),wt=Be(re,q=>Le=>q===Le);return{elements:{radioGroup:ue,radioItem:Je},states:{value:re},helpers:{isChecked:wt}}},{elements:{root:Y}}=Vm({orientation:"horizontal"}),X={...Cm,disabled:!1,positioning:{placement:"right-start",gutter:8}},_t=Q=>{const ne={...X,...Q},re=ne.open??Pe(!1),ue=hr(re,ne==null?void 0:ne.onOpenChange),we=It(Mr(ne,"ids")),{positioning:Je,arrowSize:wt,disabled:q}=we,Le=Xe(Pe(null)),We=Xe(Pe(null)),Re=Xe(Pe(0)),Ie=It({...ai(gl),...ne.ids});ui(()=>{const je=document.getElementById(Ie.trigger.get());je&&Le.set(je)});const hn=es({open:ue,forceVisible:a,activeTrigger:Le}),Rf=Fe(e("submenu"),{stores:[hn,Ie.menu,Ie.trigger],returned:([je,pt,Tt])=>({role:"menu",hidden:je?void 0:!0,style:Ft({display:je?void 0:"none"}),id:pt,"aria-labelledby":Tt,"data-state":je?"open":"closed","data-id":pt,tabindex:-1}),action:je=>{let pt=ze;const Tt=xe([hn,Je],([Ee,Ze])=>{if(pt(),!Ee)return;const tt=Le.get();tt&&qt().then(()=>{pt();const lt=Ri(tt);pt=us(je,{anchorElement:tt,open:ue,options:{floating:Ze,portal:x(lt)?lt:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Qe=rt(ke(je,"keydown",Ee=>{if(Ee.key===ae.ESCAPE)return;const Ze=Ee.target,tt=Ee.currentTarget;if(!x(Ze)||!x(tt)||!(Ze.closest('[role="menu"]')===tt))return;if(oo.includes(Ee.key)){Ee.stopImmediatePropagation(),po(Ee,c.get()??!1);return}const rr=km.ltr.includes(Ee.key),ir=Ee.ctrlKey||Ee.altKey||Ee.metaKey,Pi=Ee.key.length===1;if(rr){const jo=Le.get();Ee.preventDefault(),ue.update(()=>(jo&&et(jo),!1));return}if(Ee.key===ae.TAB){Ee.preventDefault(),v.set(!1),mo(Ee,_,E);return}!ir&&Pi&&f.get()===!0&&T(Ee.key,ln(tt))}),ke(je,"pointermove",Ee=>{Os(Ee)}),ke(je,"focusout",Ee=>{const Ze=Le.get();if(A.get()){const tt=Ee.target,lt=document.getElementById(Ie.menu.get());if(!x(lt)||!x(tt))return;!lt.contains(tt)&&tt!==Ze&&ue.set(!1)}else{const tt=Ee.currentTarget,lt=Ee.relatedTarget;if(!x(lt)||!x(tt))return;!tt.contains(lt)&&lt!==Ze&&ue.set(!1)}}));return{destroy(){Tt(),pt(),Qe()}}}}),Pf=Fe(e("subtrigger"),{stores:[ue,q,Ie.menu,Ie.trigger],returned:([je,pt,Tt,Qe])=>({role:"menuitem",id:Qe,tabindex:-1,"aria-controls":Tt,"aria-expanded":je,"data-state":je?"open":"closed","data-disabled":ii(pt),"aria-haspopop":"menu"}),action:je=>{Zr(je,n),ti(je),Le.update(Qe=>Qe||je);const pt=()=>{Ls(We),window.clearTimeout(Re.get()),k.set(null)},Tt=rt(ke(je,"click",Qe=>{if(Qe.defaultPrevented)return;const Ee=Qe.currentTarget;!x(Ee)||on(Ee)||(et(Ee),ue.get()||ue.update(Ze=>Ze||(Le.set(Ee),!Ze)))}),ke(je,"keydown",Qe=>{const Ee=j.get(),Ze=Qe.currentTarget;if(!(!x(Ze)||on(Ze)||Ee.length>0&&Qe.key===ae.SPACE)&&vm.ltr.includes(Qe.key)){if(!ue.get()){Ze.click(),Qe.preventDefault();return}const lt=Ze.getAttribute("aria-controls");if(!lt)return;const rr=document.getElementById(lt);if(!x(rr))return;const ir=ln(rr)[0];et(ir)}}),ke(je,"pointermove",Qe=>{if(!Yr(Qe)||(In(Qe),Qe.defaultPrevented))return;const Ee=Qe.currentTarget;if(!x(Ee))return;Am(Ie.menu.get())||et(Ee);const Ze=We.get();!ue.get()&&!Ze&&!on(Ee)&&We.set(window.setTimeout(()=>{ue.update(()=>(Le.set(Ee),!0)),Ls(We)},100))}),ke(je,"pointerleave",Qe=>{if(!Yr(Qe))return;Ls(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,lt=tt==="right",rr=lt?-5:5,ir=Ze[lt?"left":"right"],Pi=Ze[lt?"right":"left"];k.set({area:[{x:Qe.clientX+rr,y:Qe.clientY},{x:ir,y:Ze.top},{x:Pi,y:Ze.top},{x:Pi,y:Ze.bottom},{x:ir,y:Ze.bottom}],side:tt}),window.clearTimeout(Re.get()),Re.set(window.setTimeout(()=>{k.set(null)},300))}else{if(ws(Qe),Qe.defaultPrevented)return;k.set(null)}}),ke(je,"focusout",Qe=>{const Ee=Qe.currentTarget;if(!x(Ee))return;gn(Ee);const Ze=Qe.relatedTarget;if(!x(Ze))return;const tt=Ee.getAttribute("aria-controls");if(!tt)return;const lt=document.getElementById(tt);lt&&!lt.contains(Ze)&&ue.set(!1)}),ke(je,"focusin",Qe=>{mt(Qe)}));return{destroy(){pt(),Tt()}}}}),Ff=Fe(e("subarrow"),{stores:wt,returned:je=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${je}px)`,height:`var(--arrow-size, ${je}px)`})})});return xe([v],([je])=>{je||(Le.set(null),ue.set(!1))}),xe([k],([je])=>{!ht||je||window.clearTimeout(Re.get())}),xe([ue],([je])=>{if(ht&&(je&&A.get()&&fn(1).then(()=>{const pt=document.getElementById(Ie.menu.get());if(!pt)return;const Tt=ln(pt);Tt.length&&et(Tt[0])}),!je)){const pt=R.get(),Tt=document.getElementById(Ie.trigger.get());if(pt&&fn(1).then(()=>{const Qe=document.getElementById(Ie.menu.get());Qe&&Qe.contains(pt)&&gn(pt)}),!Tt||document.activeElement===Tt)return;gn(Tt)}}),{ids:Ie,elements:{subTrigger:Pf,subMenu:Rf,subArrow:Ff},states:{subOpen:ue},options:we}};ui(()=>{const Q=document.getElementById(U.trigger.get());x(Q)&&v.get()&&g.set(Q);const ne=[],re=()=>A.set(!1),ue=()=>{A.set(!0),ne.push(rt(bt(document,"pointerdown",re,{capture:!0,once:!0}),bt(document,"pointermove",re,{capture:!0,once:!0})))},we=Je=>{if(Je.key===ae.ESCAPE&&o.get()){v.set(!1);return}};return ne.push(bt(document,"keydown",ue,{capture:!0})),ne.push(bt(document,"keydown",we)),()=>{ne.forEach(Je=>Je())}}),xe([v,R],([Q,ne])=>{!Q&&ne&&gn(ne)}),xe([v],([Q])=>{if(ht&&!Q){const ne=g.get();if(!ne)return;const re=d.get();!Q&&ne&&ci({prop:re,defaultEl:ne})}}),xe([v,r],([Q,ne])=>{if(!ht)return;const re=[];return fn(1).then(()=>{const ue=document.getElementById(U.menu.get());if(ue&&Q&&A.get()){if(p.get()){et(ue);return}const we=ln(ue);if(!we.length)return;et(we[0])}}),()=>{re.forEach(ue=>ue())}}),xe(v,Q=>{if(!ht)return;const ne=()=>A.set(!1),re=ue=>{if(A.set(!0),ue.key===ae.ESCAPE&&Q&&o.get()){v.set(!1);return}};return rt(bt(document,"pointerdown",ne,{capture:!0,once:!0}),bt(document,"pointermove",ne,{capture:!0,once:!0}),bt(document,"keydown",re,{capture:!0}))});function gt(Q){v.update(ne=>{const re=!ne;return re&&(_.set(Ya(Q)),E.set(Za(Q)),g.set(Q)),re})}function mt(Q){const ne=Q.currentTarget;if(!x(ne))return;const re=R.get();re&&gn(re),so(ne),R.set(ne)}function mn(Q){const ne=Q.currentTarget;x(ne)&&gn(ne)}function In(Q){Qr(Q)&&Q.preventDefault()}function pn(Q){if(Qr(Q))return;const ne=Q.target;if(!x(ne))return;const re=Ri(ne);re&&et(re)}function ws(Q){Qr(Q)&&Q.preventDefault()}function Os(Q){if(!Yr(Q))return;const ne=Q.target,re=Q.currentTarget;if(!x(re)||!x(ne))return;const ue=$.get(),we=ue!==Q.clientX;if(re.contains(ne)&&we){const Je=Q.clientX>ue?"right":"left";L.set(Je),$.set(Q.clientX)}}function jr(Q,ne=null){if(!Yr(Q)||(In(Q),Q.defaultPrevented))return;if(ne){et(ne);return}const re=Q.currentTarget;x(re)&&et(re)}function Kr(Q){Yr(Q)&&pn(Q)}function qr(Q){if(j.get().length>0&&Q.key===ae.SPACE){Q.preventDefault();return}if(fi.includes(Q.key)){Q.preventDefault();const ue=Q.currentTarget;if(!x(ue))return;ue.click()}}function Wr(Q){return Q==="indeterminate"}function As(Q){return Wr(Q)?"indeterminate":Q?"checked":"unchecked"}function Qr(Q){return W.get()(Q)}function Ri(Q){const ne=Q.closest('[role="menu"]');return x(ne)?ne:null}return{elements:{trigger:V,menu:F,overlay:ee,item:te,group:z,groupLabel:oe,arrow:B,separator:Y},builders:{createCheckboxItem:ot,createSubmenu:_t,createMenuRadioGroup:He},states:{open:v},helpers:{handleTypeaheadSearch:T},ids:U,options:t.rootOptions}}function mo(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),fn(1).then(()=>r.focus()),e.set(null))}}function ln(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>x(e))}function ti(t){!t||!on(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Ls(t){if(!ht)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function Yr(t){return t.pointerType==="mouse"}function Zr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);x(n)&&t.setAttribute("data-melt-menu-id",n.id)}function po(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!x(n)||!x(r))return;const i=ln(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 wm(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Om(n,e)}function Om(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 Am(t){const e=document.activeElement;if(!x(e))return!1;const n=e.closest(`[data-id="${t}"]`);return x(n)}function $m(t){return t?"open":"closed"}const Tm={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"};({...Mr(Tm,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const{name:Mn}=Jn("dialog"),Sm={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 Rm(t){const e={...Sm,...t},n=It(Mr(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),p=It({...ai(Dm),...e.ids}),m=e.open??Pe(e.defaultOpen),h=hr(m,e==null?void 0:e.onOpenChange),v=Be([h,l],([T,U])=>T||U);let g=ze;function _(T){const U=T.currentTarget,O=T.currentTarget;!x(U)||!x(O)||(h.set(!0),d.set(O))}function E(){h.set(!1),ci({prop:f.get(),defaultEl:d.get()})}const A=Fe(Mn("trigger"),{stores:[h],returned:([T])=>({"aria-haspopup":"dialog","aria-expanded":T,type:"button"}),action:T=>({destroy:rt(ke(T,"click",O=>{_(O)}),ke(T,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),_(O))}))})}),$=Fe(Mn("overlay"),{stores:[v,h],returned:([T,U])=>({hidden:T?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),"aria-hidden":!0,"data-state":U?"open":"closed"}),action:T=>{let U=ze;return i.get()&&(U=di(T,{handler:()=>{E()}}).destroy),{destroy(){U()}}}}),k=Fe(Mn("content"),{stores:[v,p.content,p.description,p.title,h],returned:([T,U,O,F,V])=>({id:U,role:o.get(),"aria-describedby":O,"aria-labelledby":F,"aria-modal":T?"true":void 0,"data-state":V?"open":"closed",tabindex:-1,hidden:T?void 0:!0,style:Ft({display:T?void 0:"none"})}),action:T=>{let U=ze,O=ze;const F=rt(xe([h,s,i],([V,B,ee])=>{if(!V)return;const te=mf({immediate:!1,escapeDeactivates:ee,clickOutsideDeactivates:B,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:T});U=te.activate,O=te.deactivate;const z=te.useFocusTrap(T);return z&&z.destroy?z.destroy:te.deactivate}),xe([s,h],([V,B])=>pf(T,{open:B,closeOnInteractOutside:V,onClose(){E()},shouldCloseOnInteractOutside(ee){var te;return(te=c.get())==null||te(ee),!ee.defaultPrevented}}).destroy),xe([i],([V])=>V?di(T,{handler:E}).destroy:ze),xe([v],([V])=>{qt().then(()=>{V?U():O()})}));return{destroy:()=>{g(),F()}}}}),L=Fe(Mn("portalled"),{stores:u,returned:T=>({"data-portal":ms(T)}),action:T=>{const U=xe([u],([O])=>{if(O===null)return ze;const F=Pr(T,O);return F===null?ze:gs(T,F).destroy});return{destroy(){U()}}}}),R=Fe(Mn("title"),{stores:[p.title],returned:([T])=>({id:T})}),W=Fe(Mn("description"),{stores:[p.description],returned:([T])=>({id:T})}),j=Fe(Mn("close"),{returned:()=>({type:"button"}),action:T=>({destroy:rt(ke(T,"click",()=>{E()}),ke(T,"keydown",O=>{O.key!==ae.SPACE&&O.key!==ae.ENTER||(O.preventDefault(),E())}))})});return xe([h,r],([T,U])=>{if(ht){if(U&&T&&(g=To()),T){const O=document.getElementById(p.content.get());ci({prop:a.get(),defaultEl:O})}return()=>{l.get()||g()}}}),{ids:p,elements:{content:k,trigger:A,title:R,description:W,overlay:$,close:j,portalled:L},states:{open:h},options:n}}const bl=[ae.ARROW_LEFT,ae.ARROW_RIGHT,ae.HOME,ae.END],{name:Is}=Jn("menubar"),Pm={loop:!0,closeOnEscape:!0,preventScroll:!1},Fm=["menubar"];function Lm(t){const e={...Pm,...t},n=It(Mr(e,"ids")),{loop:r,closeOnEscape:i,preventScroll:s}=n,o=Xe(Pe("")),u=Xe(Pe(null)),l=Xe(Pe(null)),a=Xe(Pe(null)),f=Xe(Pe(0));let c=!1;const d=It({...ai(Fm),...e.ids}),p=Fe(Is(),{stores:[d.menubar],returned([A]){return{role:"menubar","data-melt-menubar":"","data-orientation":"horizontal",id:A}},action:A=>{const $=Array.from(A.querySelectorAll("[data-melt-menubar-trigger]"));return x($[0])?($[0].tabIndex=0,{destroy:ze}):{}}}),m={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},h=A=>{const $={...m,...A},k=Xe(Pe(!1)),L=Xe(Pe(null)),R=It($),{positioning:W,portal:j,forceVisible:T,closeOnOutsideClick:U,onOutsideClick:O}=R,F=Em({rootOptions:{...R,preventScroll:s},rootOpen:Xe(k),rootActiveTrigger:Xe(L),nextFocusable:Xe(u),prevFocusable:Xe(l),selector:"menubar-menu",removeScroll:!1}),V=es({open:k,forceVisible:T,activeTrigger:L}),B=Fe(Is("menu"),{stores:[V,j,F.ids.menu,F.ids.trigger,d.menubar],returned:([z,oe,De,ot,He])=>({role:"menu",hidden:z?void 0:!0,style:Ft({display:z?void 0:"none"}),id:De,"aria-labelledby":ot,"data-state":z?"open":"closed","data-melt-scope":He,"data-portal":ms(oe),tabindex:-1}),action:z=>{let oe=ze;const De=xe([k,L,W,j,U],([He,Y,X,_t,gt])=>{oe(),He&&Y&&qt().then(()=>{oe(),oe=us(z,{anchorElement:Y,open:k,options:{floating:X,portal:Pr(z,_t),modal:{closeOnInteractOutside:gt,shouldCloseOnInteractOutside:mt=>{var pn;if((pn=O.get())==null||pn(mt),mt.defaultPrevented)return!1;const mn=mt.target,In=document.getElementById(d.menubar.get());return!In||!Ci(mn)?!0:!In.contains(mn)},onClose:()=>{o.set("")},open:He}}}).destroy})}),ot=rt(ke(z,"keydown",He=>{const Y=He.target,X=He.currentTarget;if(!x(X)||!x(Y)||(bl.includes(He.key)&&v(He),!(Y.closest('[role="menu"]')===X)))return;oo.includes(He.key)&&po(He),He.key===ae.TAB&&(He.preventDefault(),L.set(null),k.set(!1),mo(He,u,l));const gt=He.key.length===1;!(He.ctrlKey||He.altKey||He.metaKey)&&gt&&F.helpers.handleTypeaheadSearch(He.key,ln(X))}));return{destroy(){De(),ot(),oe()}}}}),ee=Fe(Is("trigger"),{stores:[k,F.ids.menu,F.ids.trigger],returned:([z,oe,De])=>({"aria-controls":oe,"aria-expanded":z,"data-state":z?"open":"closed",id:De,"aria-haspopup":"menu","data-orientation":"horizontal",role:"menuitem"}),action:z=>{ti(z);const oe=document.getElementById(d.menubar.get());if(!oe)return{};const De=Array.from(oe.querySelectorAll("[data-melt-menubar-trigger]"));if(!De.length)return{};const ot=xe([a],([Y])=>{!Y&&De[0]===z||Y===z?z.tabIndex=0:z.tabIndex=-1});De[0]===z?z.tabIndex=0:z.tabIndex=-1;const He=rt(ke(z,"click",Y=>{const X=k.get(),_t=Y.currentTarget;x(_t)&&(te(_t),X||Y.preventDefault())}),ke(z,"keydown",Y=>{const X=Y.currentTarget;if(x(X)&&(fi.includes(Y.key)||Y.key===ae.ARROW_DOWN)){Y.preventDefault(),te(X);const _t=X.getAttribute("aria-controls");if(!_t)return;const gt=document.getElementById(_t);if(!gt)return;const mt=ln(gt);if(!mt.length)return;et(mt[0])}}),ke(z,"pointerenter",Y=>{const X=Y.currentTarget;if(!x(X))return;const _t=o.get(),gt=k.get();_t&&!gt&&(k.set(!0),o.set(F.ids.menu.get()),L.set(X))}));return{destroy(){He(),ot()}}}});function te(z){k.update(oe=>{const De=!oe;return De?(u.set(Ya(z)),l.set(Za(z)),L.set(z),o.set(F.ids.menu.get())):L.set(null),De})}return xe([o],([z])=>{if(ht){if(z===F.ids.menu.get()){if(k.get())return;const oe=document.getElementById(F.ids.trigger.get());if(!oe)return;L.set(oe),so(oe),k.set(!0);return}if(z!==F.ids.menu.get()){if(!ht)return;if(k.get()){const oe=document.getElementById(F.ids.trigger.get());if(!oe)return;L.set(null),k.set(!1),gn(oe)}return}}}),xe([k],([z])=>{if(!ht)return;const oe=document.getElementById(F.ids.trigger.get());if(oe){if(!z&&o.get()===F.ids.menu.get()){L.set(null),o.set(""),gn(oe);return}z&&(a.set(oe),so(oe))}}),ui(()=>{if(!ht)return;const z=document.getElementById(F.ids.trigger.get());x(z)&&k.get()&&L.set(z)}),{ids:F.ids,elements:{...F.elements,menu:B,trigger:ee},builders:F.builders,states:F.states,options:R}};function v(A){if(!ht)return;A.preventDefault();const $=A.currentTarget,k=A.target;if(!x(k)||!x($))return;const L=k.hasAttribute("data-melt-menubar-menu-subtrigger"),R=k.closest('[role="menu"]')!==$,W=ae.ARROW_LEFT,j=A.key===W;if(!j&&L||j&&R)return;const U=document.getElementById(d.menubar.get());if(!x(U))return;const O=g(U),F=$.getAttribute("aria-labelledby"),V=O.findIndex(z=>z.id===F);let B;switch(A.key){case ae.ARROW_RIGHT:B=V<O.length-1?V+1:0;break;case ae.ARROW_LEFT:B=V>0?V-1:O.length-1;break;case ae.HOME:B=0;break;case ae.END:B=O.length-1;break;default:return}const te=O[B].getAttribute("aria-controls");te&&o.set(te)}function g(A){const $=A.closest('[role="menubar"]');return x($)?Array.from($.querySelectorAll("[data-melt-menubar-trigger]")).filter(k=>x(k)):[]}function _(A){A.preventDefault();const $=document.activeElement,k=A.currentTarget;if(!x(k)||!x($))return;const L=g(k);if(!L.length)return;const R=L.filter(U=>!(U.hasAttribute("data-disabled")||U.getAttribute("disabled")==="true")),W=R.indexOf($);let j;const T=r.get();switch(A.key){case ae.ARROW_RIGHT:j=W<R.length-1?W+1:T?0:W;break;case ae.ARROW_LEFT:j=W>0?W-1:T?R.length-1:0;break;case ae.HOME:j=0;break;case ae.END:j=R.length-1;break;default:return}et(R[j])}ui(()=>{if(!ht)return;const A=document.getElementById(d.menubar.get());if(!A)return;const $=rt(ke(A,"keydown",k=>{const L=k.target,R=k.currentTarget;!x(R)||!x(L)||!L.hasAttribute("data-melt-menubar-trigger")||bl.includes(k.key)&&_(k)}),bt(document,"keydown",k=>{i.get()&&k.key===ae.ESCAPE&&(window.clearTimeout(f.get()),o.set(""))}));return()=>{$()}});const E=[];return xe([o,s],([A,$])=>{!ht||!$||(A?c||(E.push(To()),c=!0):(E.forEach(k=>k()),c=!1))}),qa(()=>{E.forEach(A=>A())}),{ids:d,elements:{menubar:p},builders:{createMenu:h},options:n}}const Im={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:Xr}=Jn("popover"),Mm=["trigger","content"];function Nm(t){const e={...Im,...t},n=It(Mr(e,"open","ids")),{positioning:r,arrowSize:i,disableFocusTrap:s,preventScroll:o,closeOnEscape:u,closeOnOutsideClick:l,portal:a,forceVisible:f,openFocus:c,closeFocus:d,onOutsideClick:p}=n,m=e.open??Pe(e.defaultOpen),h=hr(m,e==null?void 0:e.onOpenChange),v=Xe.writable(null),g=It({...ai(Mm),...e.ids});ui(()=>{v.set(document.getElementById(g.trigger.get()))});function _(){h.set(!1);const T=document.getElementById(g.trigger.get());ci({prop:d.get(),defaultEl:T})}const E=es({open:h,activeTrigger:v,forceVisible:f}),A=Fe(Xr("content"),{stores:[E,a,g.content],returned:([T,U,O])=>({hidden:T&&ht?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),id:O,"data-state":T?"open":"closed","data-portal":ms(U)}),action:T=>{let U=ze;const O=xe([E,v,r,s,u,l,a],([F,V,B,ee,te,z,oe])=>{U(),!(!F||!V)&&qt().then(()=>{U(),U=us(T,{anchorElement:V,open:h,options:{floating:B,focusTrap:ee?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:z,allowOutsideClick:!0,escapeDeactivates:te},modal:{shouldCloseOnInteractOutside:k,onClose:_,open:F,closeOnInteractOutside:z},escapeKeydown:te?{handler:()=>{_()}}:null,portal:Pr(T,oe)}}).destroy})});return{destroy(){O(),U()}}}});function $(T){h.update(U=>!U),T&&T!==v.get()&&v.set(T)}function k(T){var F;if((F=p.get())==null||F(T),T.defaultPrevented)return!1;const U=T.target,O=document.getElementById(g.trigger.get());return!(O&&Ci(U)&&(U===O||O.contains(U)))}const L=Fe(Xr("trigger"),{stores:[E,g.content,g.trigger],returned:([T,U,O])=>({role:"button","aria-haspopup":"dialog","aria-expanded":T?"true":"false","data-state":yl(T),"aria-controls":U,id:O}),action:T=>({destroy:rt(ke(T,"click",()=>{$(T)}),ke(T,"keydown",O=>{O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),$(T))}))})}),R=Fe(Xr("overlay"),{stores:[E],returned:([T])=>({hidden:T?void 0:!0,tabindex:-1,style:Ft({display:T?void 0:"none"}),"aria-hidden":"true","data-state":yl(T)}),action:T=>{let U=ze,O=ze,F=ze;return u.get()&&(U=di(T,{handler:()=>{_()}}).destroy),O=xe([a],([V])=>{if(F(),V===null)return;const B=Pr(T,V);B!==null&&(F=gs(T,B).destroy)}),{destroy(){U(),O(),F()}}}}),W=Fe(Xr("arrow"),{stores:i,returned:T=>({"data-arrow":!0,style:Ft({position:"absolute",width:`var(--arrow-size, ${T}px)`,height:`var(--arrow-size, ${T}px)`})})}),j=Fe(Xr("close"),{returned:()=>({type:"button"}),action:T=>({destroy:rt(ke(T,"click",O=>{O.defaultPrevented||_()}),ke(T,"keydown",O=>{O.defaultPrevented||O.key!==ae.ENTER&&O.key!==ae.SPACE||(O.preventDefault(),$())}))})});return xe([h,v,o],([T,U,O])=>{if(!ht)return;const F=[];if(T){U||qt().then(()=>{const B=document.getElementById(g.trigger.get());x(B)&&v.set(B)}),O&&F.push(To());const V=U??document.getElementById(g.trigger.get());ci({prop:c.get(),defaultEl:V})}return()=>{F.forEach(V=>V())}}),{ids:g,elements:{trigger:L,content:A,arrow:W,close:j,overlay:R},states:{open:h},options:n}}function yl(t){return t?"open":"closed"}const Hm={orientation:"horizontal",decorative:!1},Vm=t=>{const e={...Hm,...t},n=It(e),{orientation:r,decorative:i}=n;return{elements:{root:Fe("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}},Bm={loop:!0,orientation:"horizontal"},{name:Bi,selector:Ms}=Jn("toolbar"),Um=t=>{const e={...Bm,...t},n=It(e),{loop:r,orientation:i}=n,s=Fe(Bi(),{stores:i,returned:d=>({role:"toolbar","data-orientation":d})}),o=Fe(Bi("button"),{returned:()=>({role:"button",type:"button"}),action:d=>(Ns(d),{destroy:ke(d,"keydown",c)})}),u=Fe(Bi("link"),{returned:()=>({role:"link"}),action:d=>(Ns(d),{destroy:ke(d,"keydown",c)})}),l=Fe(Bi("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 p={...a,...d},m=It(p),{type:h,disabled:v}=m,g=p.defaultValue?p.defaultValue:p.type==="single"?void 0:[],_=p.value??Pe(g),E=hr(_,p==null?void 0:p.onValueChange),{name:A}=Jn("toolbar-group"),$=Fe(A(),{stores:i,returned:R=>({role:"group","data-orientation":R})}),k=Fe(A("item"),{stores:[v,h,E,i],returned:([R,W,j,T])=>U=>{const O=typeof U=="string"?U:U.value,F=typeof U=="string"?!1:!!U.disabled,V=R||F,B=Array.isArray(j)?j.includes(O):j===O,ee=W==="single",te=W==="multiple";return{disabled:ii(V),pressed:B,"data-orientation":T,"data-disabled":ii(V),"data-value":O,"data-state":B?"on":"off","aria-checked":ee?B:void 0,"aria-pressed":te?B:void 0,type:"button",role:ee?"radio":void 0,"data-melt-toolbar-item":""}},action:R=>{Ns(R);function W(){const U=R.dataset.value,O=R.dataset.disabled==="true";return{value:U,disabled:O}}function j(){const{value:U,disabled:O}=W();U===void 0||O||E.update(F=>Array.isArray(F)?F.includes(U)?F.filter(V=>V!==U):(F.push(U),F):F===U?void 0:U)}return{destroy:rt(ke(R,"click",()=>{j()}),ke(R,"keydown",U=>{if(U.key===ae.ENTER||U.key===ae.SPACE){U.preventDefault(),j();return}c(U)}))}}}),L=Be(E,R=>W=>Array.isArray(R)?R.includes(W):R===W);return{elements:{group:$,item:k},states:{value:E},helpers:{isPressed:L},options:m}};function c(d){const p=i.get(),m=r.get(),h={horizontal:ae.ARROW_RIGHT,vertical:ae.ARROW_DOWN}[p??"horizontal"],v={horizontal:ae.ARROW_LEFT,vertical:ae.ARROW_UP}[p??"horizontal"],g=d.currentTarget;if(!x(g))return;const _=g.closest("[data-melt-toolbar]");if(!x(_))return;const E=_f(_),A=E.indexOf(g);if(d.key===h){d.preventDefault();const $=A+1;$>=E.length&&m?et(E[0]):et(E[$])}else if(d.key===v){d.preventDefault();const $=A-1;$<0&&m?et(E[E.length-1]):et(E[$])}else d.key===ae.HOME?(d.preventDefault(),et(E[0])):d.key===ae.END&&(d.preventDefault(),et(E[E.length-1]))}return{elements:{root:s,button:o,separator:l,link:u},builders:{createToolbarGroup:f},options:n}};function Ns(t){const e=t.closest("[data-melt-toolbar]");if(!x(e))return;_f(e)[0]===t?t.tabIndex=0:t.tabIndex=-1}function _f(t){return Array.from(t.querySelectorAll(`${Ms("item")}, ${Ms("button")}, ${Ms("link")}`)).filter(e=>x(e))}function pi(t,e){const n={};return e.forEach(r=>{n[r]={[`data-${t}-${r}`]:""}}),r=>n[r]}function jm(t){return t?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function Fn(){const t=zf();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 wi(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Oi(t){return function(e,n){if(n===void 0)return;const r=t[e];r&&r.set(n)}}function gf(t){return(e={})=>Km(t,e)}function Km(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:qm(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 qm(t,e){return e==="center"?t:`${t}-${e}`}function Mo(){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 Ai(){const{NAME:t}=Mo();return st(t)}function Wm(t){const{RADIO_GROUP_NAME:e}=Mo(),{builders:{createMenuRadioGroup:n},getAttrs:r}=Ai(),i=n(t);return ft(e,{...i,getAttrs:r}),{...i,getAttrs:r}}function Qm(t){const{RADIO_ITEM_NAME:e,RADIO_GROUP_NAME:n}=Mo(),r=st(n);return ft(e,{...r,value:t}),{...r,value:t}}function zm(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Ai();gf(r)(n)}const Gm=t=>({builder:t&8}),vl=t=>({builder:t[3]}),Ym=t=>({builder:t&8}),kl=t=>({builder:t[3]});function Zm(t){let e=t[1]?"a":"div",n,r,i=(t[1]?"a":"div")&&Hs(t);return{c(){i&&i.c(),n=Ae()},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=Hs(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Hs(s),e=s[1]?"a":"div",i.c(),i.m(n.parentNode,n))},i(s){r||(b(i,s),r=!0)},o(s){y(i,s),r=!1},d(s){s&&C(n),i&&i.d(s)}}}function Xm(t){let e;const n=t[11].default,r=pe(n,t,t[10],kl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&1032)&&_e(r,n,i,i[10],e?he(n,i[10],s,Ym):ge(i[10]),kl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Hs(t){let e,n,r,i;const s=t[11].default,o=pe(s,t,t[10],vl);let u=[{href:t[1]},t[3],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]?"a":"div"),o&&o.c(),zi(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=[Ue(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)&&_e(o,s,a,a[10],n?he(s,a[10],f,Gm):ge(a[10]),vl),zi(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){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function Jm(t){let e,n,r,i;const s=[Xm,Zm],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function xm(t,e,n){let r,i;const s=["href","asChild","disabled","el"];let o=Ke(e,s),u,{$$slots:l={},$$scope:a}=e,{href:f=void 0}=e,{asChild:c=!1}=e,{disabled:d=!1}=e,{el:p=void 0}=e;const{elements:{item:m},getAttrs:h}=Ai();J(t,m,E=>n(9,u=E));const v=Fn();function g(E){Oe.call(this,t,E)}function _(E){Ce[E?"unshift":"push"](()=>{p=E,n(0,p)})}return t.$$set=E=>{e=ie(ie({},e),vt(E)),n(6,o=Ke(e,s)),"href"in E&&n(1,f=E.href),"asChild"in E&&n(2,c=E.asChild),"disabled"in E&&n(7,d=E.disabled),"el"in E&&n(0,p=E.el),"$$scope"in E&&n(10,a=E.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=u),t.$$.dirty&128&&n(8,i={...h("item"),...jm(d)}),t.$$.dirty&264&&Object.assign(r,i)},[p,f,c,r,m,v,o,d,i,u,a,l,g,_]}class Lt extends ve{constructor(e){super(),ye(this,e,xm,Jm,fe,{href:1,asChild:2,disabled:7,el:0})}}const ep=t=>({builder:t&4}),Cl=t=>({builder:t[2]}),tp=t=>({builder:t&4}),El=t=>({builder:t[2]});function np(t){let e,n,r,i;const s=t[10].default,o=pe(s,t,t[9],Cl);let u=[t[2],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[12](e),n=!0,r||(i=[Ue(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)&&_e(o,s,a,a[9],n?he(s,a[9],f,ep):ge(a[9]),Cl),le(e,l=Me(u,[f&4&&a[2],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[12](null),r=!1,Te(i)}}}function rp(t){let e;const n=t[10].default,r=pe(n,t,t[9],El);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&516)&&_e(r,n,i,i[9],e?he(n,i[9],s,tp):ge(i[9]),El)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function ip(t){let e,n,r,i;const s=[rp,np],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function sp(t,e,n){let r;const i=["value","disabled","asChild","el"];let s=Ke(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:p},getAttrs:m}=Qm(a);J(t,p,E=>n(8,o=E));const h=m("radio-item"),v=Fn();function g(E){Oe.call(this,t,E)}function _(E){Ce[E?"unshift":"push"](()=>{d=E,n(0,d)})}return t.$$set=E=>{e=ie(ie({},e),vt(E)),n(5,s=Ke(e,i)),"value"in E&&n(6,a=E.value),"disabled"in E&&n(7,f=E.disabled),"asChild"in E&&n(1,c=E.asChild),"el"in E&&n(0,d=E.el),"$$scope"in E&&n(9,l=E.$$scope)},t.$$.update=()=>{t.$$.dirty&448&&n(2,r=o({value:a,disabled:f})),t.$$.dirty&4&&Object.assign(r,h)},[d,c,r,p,v,s,a,f,o,l,u,g,_]}class op extends ve{constructor(e){super(),ye(this,e,sp,ip,fe,{value:6,disabled:7,asChild:1,el:0})}}const lp=t=>({builder:t&4}),wl=t=>({builder:t[2]});function up(t){let e,n,r,i=[t[3],t[5]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[8](e),n||(r=Ue(t[3].action(e)),n=!0)},p(o,u){le(e,s=Me(i,[u&8&&o[3],u&32&&o[5]]))},i:ce,o:ce,d(o){o&&C(e),t[8](null),n=!1,r()}}}function ap(t){let e;const n=t[7].default,r=pe(n,t,t[6],wl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,lp):ge(i[6]),wl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function fp(t){let e,n,r,i;const s=[ap,up],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function cp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{separator:c},getAttrs:d}=Ai();J(t,c,h=>n(3,o=h));const p=d("separator");function m(h){Ce[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),vt(h)),n(5,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&8&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,o,c,s,l,u,m]}class bs extends ve{constructor(e){super(),ye(this,e,cp,fp,fe,{asChild:1,el:0})}}const dp=t=>({builder:t&4}),Ol=t=>({builder:t[2]}),mp=t=>({builder:t&4}),Al=t=>({builder:t[2]});function pp(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Ol);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,dp):ge(a[8]),Ol),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[10](null),r=!1,i()}}}function hp(t){let e;const n=t[9].default,r=pe(n,t,t[8],Al);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,mp):ge(i[8]),Al)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function _p(t){let e,n,r,i;const s=[hp,pp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function gp(t,e,n){let r;const i=["value","onValueChange","asChild","el"];let s=Ke(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:p},states:{value:m},getAttrs:h}=Wm({defaultValue:a,onValueChange:({next:_})=>(_!=null&&_!==a&&(f==null||f(_),n(5,a=_)),_)});J(t,p,_=>n(7,o=_));const v=h("radio-group");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(4,s=Ke(e,i)),"value"in _&&n(5,a=_.value),"onValueChange"in _&&n(6,f=_.onValueChange),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&a!==void 0&&m.set(a),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class bp extends ve{constructor(e){super(),ye(this,e,gp,_p,fe,{value:5,onValueChange:6,asChild:1,el:0})}}function bf(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function yp(t){const{NAME:e,PARTS:n}=bf(),r=pi(e,n),i={...Nm({positioning:{placement:"bottom",gutter:0},...wi(t),forceVisible:!0}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function No(){const{NAME:t}=bf();return st(t)}function vp(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=No();gf(r)(n)}function yf(){return{NAME:"dialog",PARTS:["close","content","description","overlay","portal","title","trigger"]}}function kp(t){const{NAME:e,PARTS:n}=yf(),r=pi(e,n),i={...Rm({...wi(t),role:"dialog",forceVisible:!0}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function Br(){const{NAME:t}=yf();return st(t)}const Cp=t=>({ids:t&1}),$l=t=>({ids:t[0]});function Ep(t){let e;const n=t[12].default,r=pe(n,t,t[11],$l);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&2049)&&_e(r,n,i,i[11],e?he(n,i[11],s,Cp):ge(i[11]),$l)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function wp(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:p=void 0}=e,{onOutsideClick:m=void 0}=e;const{states:{open:h},updateOption:v,ids:g}=kp({closeOnEscape:u,preventScroll:o,closeOnOutsideClick:l,portal:a,forceVisible:!0,defaultOpen:f,openFocus:d,closeFocus:p,onOutsideClick:m,onOpenChange:({next:E})=>(f!==E&&(c==null||c(E),n(2,f=E)),E)}),_=Be([g.content,g.description,g.title],([E,A,$])=>({content:E,description:A,title:$}));return J(t,_,E=>n(0,r=E)),t.$$set=E=>{"preventScroll"in E&&n(3,o=E.preventScroll),"closeOnEscape"in E&&n(4,u=E.closeOnEscape),"closeOnOutsideClick"in E&&n(5,l=E.closeOnOutsideClick),"portal"in E&&n(6,a=E.portal),"open"in E&&n(2,f=E.open),"onOpenChange"in E&&n(7,c=E.onOpenChange),"openFocus"in E&&n(8,d=E.openFocus),"closeFocus"in E&&n(9,p=E.closeFocus),"onOutsideClick"in E&&n(10,m=E.onOutsideClick),"$$scope"in E&&n(11,s=E.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&f!==void 0&&h.set(f),t.$$.dirty&8&&v("preventScroll",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("portal",a),t.$$.dirty&256&&v("openFocus",d),t.$$.dirty&512&&v("closeFocus",p),t.$$.dirty&1024&&v("onOutsideClick",m)},[r,_,f,o,u,l,a,c,d,p,m,s,i]}class Qn extends ve{constructor(e){super(),ye(this,e,wp,Ep,fe,{preventScroll:3,closeOnEscape:4,closeOnOutsideClick:5,portal:6,open:2,onOpenChange:7,openFocus:8,closeFocus:9,onOutsideClick:10})}}const Op=t=>({builder:t&8}),Tl=t=>({builder:t[3]}),Ap=t=>({builder:t&8}),Sl=t=>({builder:t[3]});function $p(t){let e=t[1],n,r,i=t[1]&&Vs(t);return{c(){i&&i.c(),n=Ae()},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=Vs(s),e=s[1],i.c(),i.m(n.parentNode,n)):i.p(s,o):(i=Vs(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){y(i,s),r=!1},d(s){s&&C(n),i&&i.d(s)}}}function Tp(t){let e;const n=t[9].default,r=pe(n,t,t[8],Sl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&264)&&_e(r,n,i,i[8],e?he(n,i[8],s,Ap):ge(i[8]),Sl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Vs(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Tl);let u=[t[3],t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D(t[1]),o&&o.c(),zi(t[1])(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[3].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&264)&&_e(o,s,a,a[8],n?he(s,a[8],f,Op):ge(a[8]),Tl),zi(a[1])(e,l=Me(u,[f&8&&a[3],f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[10](null),r=!1,i()}}}function Sp(t){let e,n,r,i;const s=[Tp,$p],o=[];function u(l,a){return l[2]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Dp(t,e,n){let r;const i=["level","asChild","id","el"];let s=Ke(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:p},ids:m,getAttrs:h}=Br();J(t,p,_=>n(7,o=_));const v=h("title");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(5,s=Ke(e,i)),"level"in _&&n(1,a=_.level),"asChild"in _&&n(2,f=_.asChild),"id"in _&&n(6,c=_.id),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&m.title.set(c),t.$$.dirty&128&&n(3,r=o),t.$$.dirty&8&&Object.assign(r,v)},[d,a,f,r,p,s,c,o,l,u,g]}class Ct extends ve{constructor(e){super(),ye(this,e,Dp,Sp,fe,{level:1,asChild:2,id:6,el:0})}}const Rp=t=>({builder:t&4}),Dl=t=>({builder:t[2]}),Pp=t=>({builder:t&4}),Rl=t=>({builder:t[2]});function Fp(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Dl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,Rp):ge(a[7]),Dl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function Lp(t){let e;const n=t[8].default,r=pe(n,t,t[7],Rl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,Pp):ge(i[7]),Rl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Ip(t){let e,n,r,i;const s=[Lp,Fp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Mp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{close:c},getAttrs:d}=Br();J(t,c,v=>n(6,o=v));const p=Fn(),m=d("close");function h(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),vt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h]}class Rt extends ve{constructor(e){super(),ye(this,e,Mp,Ip,fe,{asChild:1,el:0})}}const Np=t=>({builder:t&4}),Pl=t=>({builder:t[2]}),Hp=t=>({builder:t&4}),Fl=t=>({builder:t[2]});function Vp(t){let e,n,r,i;const s=t[7].default,o=pe(s,t,t[6],Pl);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[8](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&68)&&_e(o,s,a,a[6],n?he(s,a[6],f,Np):ge(a[6]),Pl),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[8](null),r=!1,i()}}}function Bp(t){let e;const n=t[7].default,r=pe(n,t,t[6],Fl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&68)&&_e(r,n,i,i[6],e?he(n,i[6],s,Hp):ge(i[6]),Fl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Up(t){let e,n,r,i;const s=[Bp,Vp],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function jp(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{portalled:c},getAttrs:d}=Br();J(t,c,h=>n(5,o=h));const p=d("portal");function m(h){Ce[h?"unshift":"push"](()=>{f=h,n(0,f)})}return t.$$set=h=>{e=ie(ie({},e),vt(h)),n(4,s=Ke(e,i)),"asChild"in h&&n(1,a=h.asChild),"el"in h&&n(0,f=h.el),"$$scope"in h&&n(6,l=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,p)},[f,a,r,c,s,o,l,u,m]}class xn extends ve{constructor(e){super(),ye(this,e,jp,Up,fe,{asChild:1,el:0})}}const Kp=t=>({builder:t[0]&256}),Ll=t=>({builder:t[8]}),qp=t=>({builder:t[0]&256}),Il=t=>({builder:t[8]}),Wp=t=>({builder:t[0]&256}),Ml=t=>({builder:t[8]}),Qp=t=>({builder:t[0]&256}),Nl=t=>({builder:t[8]}),zp=t=>({builder:t[0]&256}),Hl=t=>({builder:t[8]}),Gp=t=>({builder:t[0]&256}),Vl=t=>({builder:t[8]});function Yp(t){let e,n,r,i;const s=t[16].default,o=pe(s,t,t[15],Ll);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[56](e),n=!0,r||(i=[Ue(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)&&_e(o,s,a,a[15],n?he(s,a[15],f,Kp):ge(a[15]),Ll),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[56](null),r=!1,Te(i)}}}function Zp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Il);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[55](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,qp):ge(t[15]),Il),le(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){y(u,f),f&&(n=Pn(e,t[5],t[6])),r=!1},d(f){f&&C(e),u&&u.d(f),t[55](null),f&&n&&n.end(),i=!1,Te(s)}}}function Xp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Ml);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[54](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,Wp):ge(t[15]),Ml),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&C(e),u&&u.d(f),t[54](null),i=!1,Te(s)}}}function Jp(t){let e,n,r,i,s,o;const u=t[16].default,l=pe(u,t,t[15],Nl);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[53](e),i=!0,s||(o=[Ue(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)&&_e(l,u,t,t[15],i?he(u,t[15],d,Qp):ge(t[15]),Nl),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(e,t[5],t[6])),i=!1},d(c){c&&C(e),l&&l.d(c),t[53](null),c&&r&&r.end(),s=!1,Te(o)}}}function xp(t){let e,n,r,i,s;const o=t[16].default,u=pe(o,t,t[15],Hl);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[52](e),r=!0,i||(s=[Ue(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)&&_e(u,o,t,t[15],r?he(o,t[15],c,zp):ge(t[15]),Hl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&C(e),u&&u.d(f),t[52](null),f&&n&&n.end(),i=!1,Te(s)}}}function eh(t){let e;const n=t[16].default,r=pe(n,t,t[15],Vl);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)&&_e(r,n,i,i[15],e?he(n,i[15],s,Gp):ge(i[15]),Vl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function th(t){let e,n,r,i;const s=[eh,xp,Jp,Xp,Zp,Yp],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=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}function nh(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","el"];let s=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{el:_=void 0}=e;const{elements:{content:E},states:{open:A},ids:$,getAttrs:k}=Br();J(t,E,q=>n(14,o=q)),J(t,A,q=>n(9,u=q));const L=k("content");function R(q){Oe.call(this,t,q)}function W(q){Oe.call(this,t,q)}function j(q){Oe.call(this,t,q)}function T(q){Oe.call(this,t,q)}function U(q){Oe.call(this,t,q)}function O(q){Oe.call(this,t,q)}function F(q){Oe.call(this,t,q)}function V(q){Oe.call(this,t,q)}function B(q){Oe.call(this,t,q)}function ee(q){Oe.call(this,t,q)}function te(q){Oe.call(this,t,q)}function z(q){Oe.call(this,t,q)}function oe(q){Oe.call(this,t,q)}function De(q){Oe.call(this,t,q)}function ot(q){Oe.call(this,t,q)}function He(q){Oe.call(this,t,q)}function Y(q){Oe.call(this,t,q)}function X(q){Oe.call(this,t,q)}function _t(q){Oe.call(this,t,q)}function gt(q){Oe.call(this,t,q)}function mt(q){Oe.call(this,t,q)}function mn(q){Oe.call(this,t,q)}function In(q){Oe.call(this,t,q)}function pn(q){Oe.call(this,t,q)}function ws(q){Oe.call(this,t,q)}function Os(q){Oe.call(this,t,q)}function jr(q){Oe.call(this,t,q)}function Kr(q){Oe.call(this,t,q)}function qr(q){Oe.call(this,t,q)}function Wr(q){Oe.call(this,t,q)}function As(q){Oe.call(this,t,q)}function Qr(q){Oe.call(this,t,q)}function Ri(q){Oe.call(this,t,q)}function Q(q){Oe.call(this,t,q)}function ne(q){Oe.call(this,t,q)}function re(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function ue(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function we(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function Je(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}function wt(q){Ce[q?"unshift":"push"](()=>{_=q,n(0,_)})}return t.$$set=q=>{e=ie(ie({},e),vt(q)),n(12,s=Ke(e,i)),"transition"in q&&n(1,f=q.transition),"transitionConfig"in q&&n(2,c=q.transitionConfig),"inTransition"in q&&n(3,d=q.inTransition),"inTransitionConfig"in q&&n(4,p=q.inTransitionConfig),"outTransition"in q&&n(5,m=q.outTransition),"outTransitionConfig"in q&&n(6,h=q.outTransitionConfig),"asChild"in q&&n(7,v=q.asChild),"id"in q&&n(13,g=q.id),"el"in q&&n(0,_=q.el),"$$scope"in q&&n(15,a=q.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&$.content.set(g),t.$$.dirty[0]&16384&&n(8,r=o),t.$$.dirty[0]&256&&Object.assign(r,L)},[_,f,c,d,p,m,h,v,r,u,E,A,s,g,o,a,l,R,W,j,T,U,O,F,V,B,ee,te,z,oe,De,ot,He,Y,X,_t,gt,mt,mn,In,pn,ws,Os,jr,Kr,qr,Wr,As,Qr,Ri,Q,ne,re,ue,we,Je,wt]}class er extends ve{constructor(e){super(),ye(this,e,nh,th,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,el:0},null,[-1,-1])}}const rh=t=>({builder:t&256}),Bl=t=>({builder:t[8]});function ih(t){let e,n,r,i=[t[8],t[12]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("div"),le(e,s)},m(o,u){w(o,e,u),t[25](e),n||(r=[Ue(t[8].action(e)),G(e,"mouseup",t[20])],n=!0)},p(o,u){le(e,s=Me(i,[u&256&&o[8],u&4096&&o[12]]))},i:ce,o:ce,d(o){o&&C(e),t[25](null),n=!1,Te(r)}}}function sh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[24](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"mouseup",t[19])],i=!0)},p(l,a){t=l,le(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=Pn(e,t[5],t[6])),r=!1},d(l){l&&C(e),t[24](null),l&&n&&n.end(),i=!1,Te(s)}}}function oh(t){let e,n,r,i,s=[t[8],t[12]],o={};for(let u=0;u<s.length;u+=1)o=ie(o,s[u]);return{c(){e=D("div"),le(e,o)},m(u,l){w(u,e,l),t[23](e),r||(i=[Ue(t[8].action(e)),G(e,"mouseup",t[18])],r=!0)},p(u,l){t=u,le(e,o=Me(s,[l&256&&t[8],l&4096&&t[12]]))},i(u){u&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()}))},o:ce,d(u){u&&C(e),t[23](null),r=!1,Te(i)}}}function lh(t){let e,n,r,i,s,o,u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),le(e,l)},m(a,f){w(a,e,f),t[22](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"mouseup",t[17])],s=!0)},p(a,f){t=a,le(e,l=Me(u,[f&256&&t[8],f&4096&&t[12]]))},i(a){i||(a&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(a){n&&n.invalidate(),a&&(r=Pn(e,t[5],t[6])),i=!1},d(a){a&&C(e),t[22](null),a&&r&&r.end(),s=!1,Te(o)}}}function uh(t){let e,n,r,i,s,o=[t[8],t[12]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("div"),le(e,u)},m(l,a){w(l,e,a),t[21](e),r=!0,i||(s=[G(e,"mouseup",t[16]),Ue(t[8].action(e))],i=!0)},p(l,a){t=l,le(e,u=Me(o,[a&256&&t[8],a&4096&&t[12]]))},i(l){r||(l&&ct(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(l){l&&(n||(n=$n(e,t[1],t[2],!1)),n.run(0)),r=!1},d(l){l&&C(e),t[21](null),l&&n&&n.end(),i=!1,Te(s)}}}function ah(t){let e;const n=t[15].default,r=pe(n,t,t[14],Bl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16640)&&_e(r,n,i,i[14],e?he(n,i[14],s,rh):ge(i[14]),Bl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function fh(t){let e,n,r,i;const s=[ah,uh,lh,oh,sh,ih],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=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}function ch(t,e,n){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{el:g=void 0}=e;const{elements:{overlay:_},states:{open:E},getAttrs:A}=Br();J(t,_,B=>n(13,o=B)),J(t,E,B=>n(9,u=B));const $=A("overlay");function k(B){Oe.call(this,t,B)}function L(B){Oe.call(this,t,B)}function R(B){Oe.call(this,t,B)}function W(B){Oe.call(this,t,B)}function j(B){Oe.call(this,t,B)}function T(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function U(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function O(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function F(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}function V(B){Ce[B?"unshift":"push"](()=>{g=B,n(0,g)})}return t.$$set=B=>{e=ie(ie({},e),vt(B)),n(12,s=Ke(e,i)),"transition"in B&&n(1,f=B.transition),"transitionConfig"in B&&n(2,c=B.transitionConfig),"inTransition"in B&&n(3,d=B.inTransition),"inTransitionConfig"in B&&n(4,p=B.inTransitionConfig),"outTransition"in B&&n(5,m=B.outTransition),"outTransitionConfig"in B&&n(6,h=B.outTransitionConfig),"asChild"in B&&n(7,v=B.asChild),"el"in B&&n(0,g=B.el),"$$scope"in B&&n(14,a=B.$$scope)},t.$$.update=()=>{t.$$.dirty&8192&&n(8,r=o),t.$$.dirty&256&&Object.assign(r,$)},[g,f,c,d,p,m,h,v,r,u,_,E,s,o,a,l,k,L,R,W,j,T,U,O,F,V]}class Ur extends ve{constructor(e){super(),ye(this,e,ch,fh,fe,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}}const dh=t=>({builder:t&4}),Ul=t=>({builder:t[2]}),mh=t=>({builder:t&4}),jl=t=>({builder:t[2]});function ph(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],Ul);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,dh):ge(a[7]),Ul),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[9](null),r=!1,Te(i)}}}function hh(t){let e;const n=t[8].default,r=pe(n,t,t[7],jl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,mh):ge(i[7]),jl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function _h(t){let e,n,r,i;const s=[hh,ph],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function gh(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{trigger:c},getAttrs:d}=Br();J(t,c,v=>n(6,o=v));const p=Fn(),m=d("trigger");function h(v){Ce[v?"unshift":"push"](()=>{f=v,n(0,f)})}return t.$$set=v=>{e=ie(ie({},e),vt(v)),n(5,s=Ke(e,i)),"asChild"in v&&n(1,a=v.asChild),"el"in v&&n(0,f=v.el),"$$scope"in v&&n(7,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h]}class tr extends ve{constructor(e){super(),ye(this,e,gh,_h,fe,{asChild:1,el:0})}}const bh=t=>({builder:t[0]&256}),Kl=t=>({builder:t[8]}),yh=t=>({builder:t[0]&256}),ql=t=>({builder:t[8]}),vh=t=>({builder:t[0]&256}),Wl=t=>({builder:t[8]}),kh=t=>({builder:t[0]&256}),Ql=t=>({builder:t[8]}),Ch=t=>({builder:t[0]&256}),zl=t=>({builder:t[8]}),Eh=t=>({builder:t[0]&256}),Gl=t=>({builder:t[8]});function wh(t){let e,n,r,i;const s=t[28].default,o=pe(s,t,t[27],Kl);let u=[t[8],t[13]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[33](e),n=!0,r||(i=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],r=!0)},p(a,f){o&&o.p&&(!n||f[0]&134217984)&&_e(o,s,a,a[27],n?he(s,a[27],f,bh):ge(a[27]),Kl),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&8192&&a[13]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[33](null),r=!1,Te(i)}}}function Oh(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],ql);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[32](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,yh):ge(t[27]),ql),le(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){y(u,f),f&&(n=Pn(e,t[5],t[6])),r=!1},d(f){f&&C(e),u&&u.d(f),t[32](null),f&&n&&n.end(),i=!1,Te(s)}}}function Ah(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],Wl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,vh):ge(t[27]),Wl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&C(e),u&&u.d(f),t[31](null),i=!1,Te(s)}}}function $h(t){let e,n,r,i,s,o;const u=t[28].default,l=pe(u,t,t[27],Ql);let a=[t[8],t[13]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[30](e),i=!0,s||(o=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&134217984)&&_e(l,u,t,t[27],i?he(u,t[27],d,kh):ge(t[27]),Ql),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&8192&&t[13]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(e,t[5],t[6])),i=!1},d(c){c&&C(e),l&&l.d(c),t[30](null),c&&r&&r.end(),s=!1,Te(o)}}}function Th(t){let e,n,r,i,s;const o=t[28].default,u=pe(o,t,t[27],zl);let l=[t[8],t[13]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[29](e),r=!0,i||(s=[Ue(t[8].action(e)),G(e,"m-keydown",t[12])],i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&134217984)&&_e(u,o,t,t[27],r?he(o,t[27],c,Ch):ge(t[27]),zl),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&8192&&t[13]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&C(e),u&&u.d(f),t[29](null),f&&n&&n.end(),i=!1,Te(s)}}}function Sh(t){let e;const n=t[28].default,r=pe(n,t,t[27],Gl);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)&&_e(r,n,i,i[27],e?he(n,i[27],s,Eh):ge(i[27]),Gl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Dh(t){let e,n,r,i;const s=[Sh,Th,$h,Ah,Oh,wh],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=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}function Rh(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=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:E="center"}=e,{sideOffset:A=0}=e,{alignOffset:$=0}=e,{collisionPadding:k=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:j=!1}=e,{strategy:T="absolute"}=e,{overlap:U=!1}=e,{el:O=void 0}=e;const{elements:{menu:F},states:{open:V},ids:B,getAttrs:ee}=Ai();J(t,F,X=>n(26,u=X)),J(t,V,X=>n(9,o=X));const te=Fn(),z=ee("content");function oe(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function De(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function ot(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function He(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}function Y(X){Ce[X?"unshift":"push"](()=>{O=X,n(0,O)})}return t.$$set=X=>{e=ie(ie({},e),vt(X)),n(13,s=Ke(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,p=X.inTransitionConfig),"outTransition"in X&&n(5,m=X.outTransition),"outTransitionConfig"in X&&n(6,h=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,g=X.id),"side"in X&&n(15,_=X.side),"align"in X&&n(16,E=X.align),"sideOffset"in X&&n(17,A=X.sideOffset),"alignOffset"in X&&n(18,$=X.alignOffset),"collisionPadding"in X&&n(19,k=X.collisionPadding),"avoidCollisions"in X&&n(20,L=X.avoidCollisions),"collisionBoundary"in X&&n(21,R=X.collisionBoundary),"sameWidth"in X&&n(22,W=X.sameWidth),"fitViewport"in X&&n(23,j=X.fitViewport),"strategy"in X&&n(24,T=X.strategy),"overlap"in X&&n(25,U=X.overlap),"el"in X&&n(0,O=X.el),"$$scope"in X&&n(27,a=X.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&g&&B.menu.set(g),t.$$.dirty[0]&67108864&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,z),t.$$.dirty[0]&67076608&&o&&zm({side:_,align:E,sideOffset:A,alignOffset:$,collisionPadding:k,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:j,strategy:T,overlap:U})},[O,f,c,d,p,m,h,v,r,o,F,V,te,s,g,_,E,A,$,k,L,R,W,j,T,U,u,a,l,oe,De,ot,He,Y]}class ys extends ve{constructor(e){super(),ye(this,e,Rh,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 vs(){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}=vs(),i=pi(e,["root"]),s=pi(r,n),o={...Lm(wi(t)),getAttrs:s,getMenubarAttrs:i};return ft(e,o),{...o,updateOption:Oi(o.options)}}function Fh(){const{NAME:t}=vs();return st(t)}function Lh(t){const{MENU_NAME:e}=vs(),{builders:{createMenu:n},getAttrs:r}=Fh(),i={...n({...wi(t),forceVisible:!1}),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function Ih(){const{MENU_NAME:t}=vs();return st(t)}const Mh=t=>({builder:t&4,ids:t&8}),Yl=t=>({builder:t[2],ids:t[3]}),Nh=t=>({builder:t&4,ids:t&8}),Zl=t=>({builder:t[2],ids:t[3]});function Hh(t){let e,n,r,i;const s=t[13].default,o=pe(s,t,t[12],Yl);let u=[t[2],t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[14](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&4108)&&_e(o,s,a,a[12],n?he(s,a[12],f,Mh):ge(a[12]),Yl),le(e,l=Me(u,[f&4&&a[2],f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[14](null),r=!1,i()}}}function Vh(t){let e;const n=t[13].default,r=pe(n,t,t[12],Zl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&4108)&&_e(r,n,i,i[12],e?he(n,i[12],s,Nh):ge(i[12]),Zl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Bh(t){let e,n,r,i;const s=[Vh,Hh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Uh(t,e,n){let r;const i=["loop","closeOnEscape","asChild","id","preventScroll","el"];let s=Ke(e,i),o,u,{$$slots:l={},$$scope:a}=e,{loop:f=!0}=e,{closeOnEscape:c=!0}=e,{asChild:d=!1}=e,{id:p=void 0}=e,{preventScroll:m=void 0}=e,{el:h=void 0}=e;const{elements:{menubar:v},updateOption:g,ids:_,getMenubarAttrs:E}=Ph({loop:f,closeOnEscape:c,preventScroll:m});J(t,v,L=>n(11,o=L));const A=Be([_.menubar],([L])=>({menubar:L}));J(t,A,L=>n(3,u=L));const $=E("root");function k(L){Ce[L?"unshift":"push"](()=>{h=L,n(0,h)})}return t.$$set=L=>{e=ie(ie({},e),vt(L)),n(6,s=Ke(e,i)),"loop"in L&&n(7,f=L.loop),"closeOnEscape"in L&&n(8,c=L.closeOnEscape),"asChild"in L&&n(1,d=L.asChild),"id"in L&&n(9,p=L.id),"preventScroll"in L&&n(10,m=L.preventScroll),"el"in L&&n(0,h=L.el),"$$scope"in L&&n(12,a=L.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&p&&_.menubar.set(p),t.$$.dirty&128&&g("loop",f),t.$$.dirty&256&&g("closeOnEscape",c),t.$$.dirty&1024&&g("preventScroll",m),t.$$.dirty&2048&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,$)},[h,d,r,u,v,A,s,f,c,p,m,o,a,l,k]}class jh extends ve{constructor(e){super(),ye(this,e,Uh,Bh,fe,{loop:7,closeOnEscape:8,asChild:1,id:9,preventScroll:10,el:0})}}const Kh=t=>({menuIds:t&1}),Xl=t=>({menuIds:t[0]});function qh(t){let e;const n=t[15].default,r=pe(n,t,t[14],Xl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&16385)&&_e(r,n,i,i[14],e?he(n,i[14],s,Kh):ge(i[14]),Xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Wh(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:p=void 0}=e,{closeFocus:m=void 0}=e,{disableFocusFirstItem:h=void 0}=e,{closeOnItemClick:v=void 0}=e,{onOutsideClick:g=void 0}=e;const{states:{open:_},updateOption:E,ids:A}=Lh({closeOnOutsideClick:o,closeOnEscape:u,portal:l,loop:c,dir:d,typeahead:p,closeFocus:m,disableFocusFirstItem:h,closeOnItemClick:v,onOutsideClick:g,onOpenChange:({next:k})=>(a!==k&&(f==null||f(k),n(2,a=k)),k)}),$=Be([A.menu,A.trigger],([k,L])=>({menu:k,trigger:L}));return J(t,$,k=>n(0,r=k)),t.$$set=k=>{"closeOnOutsideClick"in k&&n(3,o=k.closeOnOutsideClick),"closeOnEscape"in k&&n(4,u=k.closeOnEscape),"portal"in k&&n(5,l=k.portal),"open"in k&&n(2,a=k.open),"onOpenChange"in k&&n(6,f=k.onOpenChange),"loop"in k&&n(7,c=k.loop),"dir"in k&&n(8,d=k.dir),"typeahead"in k&&n(9,p=k.typeahead),"closeFocus"in k&&n(10,m=k.closeFocus),"disableFocusFirstItem"in k&&n(11,h=k.disableFocusFirstItem),"closeOnItemClick"in k&&n(12,v=k.closeOnItemClick),"onOutsideClick"in k&&n(13,g=k.onOutsideClick),"$$scope"in k&&n(14,s=k.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&a!==void 0&&_.set(a),t.$$.dirty&8&&E("closeOnOutsideClick",o),t.$$.dirty&16&&E("closeOnEscape",u),t.$$.dirty&32&&E("portal",l),t.$$.dirty&128&&E("loop",c),t.$$.dirty&256&&E("dir",d),t.$$.dirty&1024&&E("closeFocus",m),t.$$.dirty&2048&&E("disableFocusFirstItem",h),t.$$.dirty&512&&E("typeahead",p),t.$$.dirty&4096&&E("closeOnItemClick",v),t.$$.dirty&8192&&E("onOutsideClick",g)},[r,$,a,o,u,l,f,c,d,p,m,h,v,g,s,i]}class ks extends ve{constructor(e){super(),ye(this,e,Wh,qh,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 Qh=t=>({builder:t&4}),Jl=t=>({builder:t[2]}),zh=t=>({builder:t&4}),xl=t=>({builder:t[2]});function Gh(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],Jl);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[8],n?he(s,a[8],f,Qh):ge(a[8]),Jl),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function Yh(t){let e;const n=t[9].default,r=pe(n,t,t[8],xl);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,zh):ge(i[8]),xl)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Zh(t){let e,n,r,i;const s=[Yh,Gh],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Xh(t,e,n){let r;const i=["asChild","id","el"];let s=Ke(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:p,getAttrs:m}=Ih();J(t,d,_=>n(7,o=_));const h=Fn(),v=m("trigger");function g(_){Ce[_?"unshift":"push"](()=>{c=_,n(0,c)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(5,s=Ke(e,i)),"asChild"in _&&n(1,a=_.asChild),"id"in _&&n(6,f=_.id),"el"in _&&n(0,c=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&f&&p.trigger.set(f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[c,a,r,d,h,s,f,o,l,u,g]}class Cs extends ve{constructor(e){super(),ye(this,e,Xh,Zh,fe,{asChild:1,id:6,el:0})}}const Jh=t=>({ids:t&1}),eu=t=>({ids:t[0]});function xh(t){let e;const n=t[13].default,r=pe(n,t,t[12],eu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,[s]){r&&r.p&&(!e||s&4097)&&_e(r,n,i,i[12],e?he(n,i[12],s,Jh):ge(i[12]),eu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function e_(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:p=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:h=void 0}=e;const{updateOption:v,states:{open:g},ids:_}=yp({disableFocusTrap:o,closeOnEscape:u,closeOnOutsideClick:l,preventScroll:a,portal:f,defaultOpen:c,openFocus:p,closeFocus:m,onOutsideClick:h,onOpenChange:({next:A})=>(c!==A&&(d==null||d(A),n(2,c=A)),A),positioning:{gutter:0,offset:{mainAxis:1}}}),E=Be([_.content,_.trigger],([A,$])=>({content:A,trigger:$}));return J(t,E,A=>n(0,r=A)),t.$$set=A=>{"disableFocusTrap"in A&&n(3,o=A.disableFocusTrap),"closeOnEscape"in A&&n(4,u=A.closeOnEscape),"closeOnOutsideClick"in A&&n(5,l=A.closeOnOutsideClick),"preventScroll"in A&&n(6,a=A.preventScroll),"portal"in A&&n(7,f=A.portal),"open"in A&&n(2,c=A.open),"onOpenChange"in A&&n(8,d=A.onOpenChange),"openFocus"in A&&n(9,p=A.openFocus),"closeFocus"in A&&n(10,m=A.closeFocus),"onOutsideClick"in A&&n(11,h=A.onOutsideClick),"$$scope"in A&&n(12,s=A.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&c!==void 0&&g.set(c),t.$$.dirty&8&&v("disableFocusTrap",o),t.$$.dirty&16&&v("closeOnEscape",u),t.$$.dirty&32&&v("closeOnOutsideClick",l),t.$$.dirty&64&&v("preventScroll",a),t.$$.dirty&128&&v("portal",f),t.$$.dirty&512&&v("openFocus",p),t.$$.dirty&1024&&v("closeFocus",m),t.$$.dirty&2048&&v("onOutsideClick",h)},[r,E,c,o,u,l,a,f,d,p,m,h,s,i]}class t_ extends ve{constructor(e){super(),ye(this,e,e_,xh,fe,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const n_=t=>({builder:t[0]&256}),tu=t=>({builder:t[8]}),r_=t=>({builder:t[0]&256}),nu=t=>({builder:t[8]}),i_=t=>({builder:t[0]&256}),ru=t=>({builder:t[8]}),s_=t=>({builder:t[0]&256}),iu=t=>({builder:t[8]}),o_=t=>({builder:t[0]&256}),su=t=>({builder:t[8]}),l_=t=>({builder:t[0]&256}),ou=t=>({builder:t[8]});function u_(t){let e,n,r,i;const s=t[27].default,o=pe(s,t,t[26],tu);let u=[t[8],t[12]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[32](e),n=!0,r||(i=Ue(t[8].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f[0]&67109120)&&_e(o,s,a,a[26],n?he(s,a[26],f,n_):ge(a[26]),tu),le(e,l=Me(u,[f[0]&256&&a[8],f[0]&4096&&a[12]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[32](null),r=!1,i()}}}function a_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],nu);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[31](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,r_):ge(t[26]),nu),le(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){y(u,f),f&&(n=Pn(e,t[5],t[6])),r=!1},d(f){f&&C(e),u&&u.d(f),t[31](null),f&&n&&n.end(),i=!1,s()}}}function f_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],ru);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[30](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,i_):ge(t[26]),ru),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&(n||ct(()=>{n=Rn(e,t[3],t[4]),n.start()})),r=!0)},o(f){y(u,f),r=!1},d(f){f&&C(e),u&&u.d(f),t[30](null),i=!1,s()}}}function c_(t){let e,n,r,i,s,o;const u=t[27].default,l=pe(u,t,t[26],iu);let a=[t[8],t[12]],f={};for(let c=0;c<a.length;c+=1)f=ie(f,a[c]);return{c(){e=D("div"),l&&l.c(),le(e,f)},m(c,d){w(c,e,d),l&&l.m(e,null),t[29](e),i=!0,s||(o=Ue(t[8].action(e)),s=!0)},p(c,d){t=c,l&&l.p&&(!i||d[0]&67109120)&&_e(l,u,t,t[26],i?he(u,t[26],d,s_):ge(t[26]),iu),le(e,f=Me(a,[d[0]&256&&t[8],d[0]&4096&&t[12]]))},i(c){i||(b(l,c),c&&ct(()=>{i&&(r&&r.end(1),n=Rn(e,t[3],t[4]),n.start())}),i=!0)},o(c){y(l,c),n&&n.invalidate(),c&&(r=Pn(e,t[5],t[6])),i=!1},d(c){c&&C(e),l&&l.d(c),t[29](null),c&&r&&r.end(),s=!1,o()}}}function d_(t){let e,n,r,i,s;const o=t[27].default,u=pe(o,t,t[26],su);let l=[t[8],t[12]],a={};for(let f=0;f<l.length;f+=1)a=ie(a,l[f]);return{c(){e=D("div"),u&&u.c(),le(e,a)},m(f,c){w(f,e,c),u&&u.m(e,null),t[28](e),r=!0,i||(s=Ue(t[8].action(e)),i=!0)},p(f,c){t=f,u&&u.p&&(!r||c[0]&67109120)&&_e(u,o,t,t[26],r?he(o,t[26],c,o_):ge(t[26]),su),le(e,a=Me(l,[c[0]&256&&t[8],c[0]&4096&&t[12]]))},i(f){r||(b(u,f),f&&ct(()=>{r&&(n||(n=$n(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(f){y(u,f),f&&(n||(n=$n(e,t[1],t[2],!1)),n.run(0)),r=!1},d(f){f&&C(e),u&&u.d(f),t[28](null),f&&n&&n.end(),i=!1,s()}}}function m_(t){let e;const n=t[27].default,r=pe(n,t,t[26],ou);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)&&_e(r,n,i,i[26],e?he(n,i[26],s,l_):ge(i[26]),ou)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function p_(t){let e,n,r,i;const s=[m_,d_,c_,f_,a_,u_],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=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}function h_(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=Ke(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:p=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:h=void 0}=e,{asChild:v=!1}=e,{id:g=void 0}=e,{side:_="bottom"}=e,{align:E="center"}=e,{sideOffset:A=0}=e,{alignOffset:$=0}=e,{collisionPadding:k=8}=e,{avoidCollisions:L=!0}=e,{collisionBoundary:R=void 0}=e,{sameWidth:W=!1}=e,{fitViewport:j=!1}=e,{strategy:T="absolute"}=e,{overlap:U=!1}=e,{el:O=void 0}=e;const{elements:{content:F},states:{open:V},ids:B,getAttrs:ee}=No();J(t,F,Y=>n(25,u=Y)),J(t,V,Y=>n(9,o=Y));const te=ee("content");function z(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function oe(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function De(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function ot(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}function He(Y){Ce[Y?"unshift":"push"](()=>{O=Y,n(0,O)})}return t.$$set=Y=>{e=ie(ie({},e),vt(Y)),n(12,s=Ke(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,p=Y.inTransitionConfig),"outTransition"in Y&&n(5,m=Y.outTransition),"outTransitionConfig"in Y&&n(6,h=Y.outTransitionConfig),"asChild"in Y&&n(7,v=Y.asChild),"id"in Y&&n(13,g=Y.id),"side"in Y&&n(14,_=Y.side),"align"in Y&&n(15,E=Y.align),"sideOffset"in Y&&n(16,A=Y.sideOffset),"alignOffset"in Y&&n(17,$=Y.alignOffset),"collisionPadding"in Y&&n(18,k=Y.collisionPadding),"avoidCollisions"in Y&&n(19,L=Y.avoidCollisions),"collisionBoundary"in Y&&n(20,R=Y.collisionBoundary),"sameWidth"in Y&&n(21,W=Y.sameWidth),"fitViewport"in Y&&n(22,j=Y.fitViewport),"strategy"in Y&&n(23,T=Y.strategy),"overlap"in Y&&n(24,U=Y.overlap),"el"in Y&&n(0,O=Y.el),"$$scope"in Y&&n(26,a=Y.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8192&&g&&B.content.set(g),t.$$.dirty[0]&33554432&&n(8,r=u),t.$$.dirty[0]&256&&Object.assign(r,te),t.$$.dirty[0]&33538560&&o&&vp({side:_,align:E,sideOffset:A,alignOffset:$,collisionPadding:k,avoidCollisions:L,collisionBoundary:R,sameWidth:W,fitViewport:j,strategy:T,overlap:U})},[O,f,c,d,p,m,h,v,r,o,F,V,s,g,_,E,A,$,k,L,R,W,j,T,U,u,a,l,z,oe,De,ot,He]}class __ extends ve{constructor(e){super(),ye(this,e,h_,p_,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 g_=t=>({builder:t&4}),lu=t=>({builder:t[2]}),b_=t=>({builder:t&4}),uu=t=>({builder:t[2]});function y_(t){let e,n,r,i;const s=t[12].default,o=pe(s,t,t[11],lu);let u=[t[2],{type:"button"},t[6]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[11],n?he(s,a[11],f,g_):ge(a[11]),lu),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&64&&a[6]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[13](null),r=!1,Te(i)}}}function v_(t){let e;const n=t[12].default,r=pe(n,t,t[11],uu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&2052)&&_e(r,n,i,i[11],e?he(n,i[11],s,b_):ge(i[11]),uu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function k_(t){let e,n,r,i;const s=[v_,y_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function C_(t,e,n){let r,i;const s=["asChild","id","el"];let o=Ke(e,s),u,l,{$$slots:a={},$$scope:f}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:p=void 0}=e;const{elements:{trigger:m},states:{open:h},ids:v,getAttrs:g}=No();J(t,m,$=>n(9,u=$)),J(t,h,$=>n(10,l=$));const _=Fn(),E=g("trigger");function A($){Ce[$?"unshift":"push"](()=>{p=$,n(0,p)})}return t.$$set=$=>{e=ie(ie({},e),vt($)),n(6,o=Ke(e,s)),"asChild"in $&&n(1,c=$.asChild),"id"in $&&n(7,d=$.id),"el"in $&&n(0,p=$.el),"$$scope"in $&&n(11,f=$.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&d&&v.trigger.set(d),t.$$.dirty&1024&&n(8,r={...E,"aria-controls":l?v.content:void 0}),t.$$.dirty&512&&n(2,i=u),t.$$.dirty&260&&Object.assign(i,r)},[p,c,i,m,h,_,o,d,r,u,l,f,a,A]}class E_ extends ve{constructor(e){super(),ye(this,e,C_,k_,fe,{asChild:1,id:7,el:0})}}function vf(){return{NAME:"toolbar",GROUP_NAME:"toolbar-group",PARTS:["root","button","link","group","group-item"]}}function w_(t){const{NAME:e,PARTS:n}=vf(),r=pi(e,n),i={...Um(wi(t)),getAttrs:r};return ft(e,i),{...i,updateOption:Oi(i.options)}}function O_(){const{NAME:t}=vf();return st(t)}const A_=t=>({builder:t&4}),au=t=>({builder:t[2]}),$_=t=>({builder:t&4}),fu=t=>({builder:t[2]});function T_(t){let e,n,r,i;const s=t[9].default,o=pe(s,t,t[8],au);let u=[t[2],t[4]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("div"),o&&o.c(),le(e,l)},m(a,f){w(a,e,f),o&&o.m(e,null),t[10](e),n=!0,r||(i=Ue(t[2].action(e)),r=!0)},p(a,f){o&&o.p&&(!n||f&260)&&_e(o,s,a,a[8],n?he(s,a[8],f,A_):ge(a[8]),au),le(e,l=Me(u,[f&4&&a[2],f&16&&a[4]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[10](null),r=!1,i()}}}function S_(t){let e;const n=t[9].default,r=pe(n,t,t[8],fu);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&260)&&_e(r,n,i,i[8],e?he(n,i[8],s,$_):ge(i[8]),fu)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function D_(t){let e,n,r,i;const s=[S_,T_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function R_(t,e,n){let r;const i=["loop","orientation","asChild","el"];let s=Ke(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:p},updateOption:m,getAttrs:h}=w_({loop:a,orientation:f});J(t,p,_=>n(7,o=_));const v=h("root");function g(_){Ce[_?"unshift":"push"](()=>{d=_,n(0,d)})}return t.$$set=_=>{e=ie(ie({},e),vt(_)),n(4,s=Ke(e,i)),"loop"in _&&n(5,a=_.loop),"orientation"in _&&n(6,f=_.orientation),"asChild"in _&&n(1,c=_.asChild),"el"in _&&n(0,d=_.el),"$$scope"in _&&n(8,l=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&m("loop",a),t.$$.dirty&64&&m("orientation",f),t.$$.dirty&128&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,v)},[d,c,r,p,s,a,f,o,l,u,g]}class P_ extends ve{constructor(e){super(),ye(this,e,R_,D_,fe,{loop:5,orientation:6,asChild:1,el:0})}}const F_=t=>({builder:t&4}),cu=t=>({builder:t[2]}),L_=t=>({builder:t&4}),du=t=>({builder:t[2]});function I_(t){let e,n,r,i;const s=t[8].default,o=pe(s,t,t[7],cu);let u=[t[2],{type:"button"},t[5]],l={};for(let a=0;a<u.length;a+=1)l=ie(l,u[a]);return{c(){e=D("button"),o&&o.c(),le(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=[Ue(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)&&_e(o,s,a,a[7],n?he(s,a[7],f,F_):ge(a[7]),cu),le(e,l=Me(u,[f&4&&a[2],{type:"button"},f&32&&a[5]]))},i(a){n||(b(o,a),n=!0)},o(a){y(o,a),n=!1},d(a){a&&C(e),o&&o.d(a),t[10](null),r=!1,Te(i)}}}function M_(t){let e;const n=t[8].default,r=pe(n,t,t[7],du);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&132)&&_e(r,n,i,i[7],e?he(n,i[7],s,L_):ge(i[7]),du)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function N_(t){let e,n,r,i;const s=[M_,I_],o=[];function u(l,a){return l[1]?0:1}return e=u(t),n=o[e]=s[e](t),{c(){n.c(),r=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function H_(t,e,n){let r;const i=["asChild","el"];let s=Ke(e,i),o,{$$slots:u={},$$scope:l}=e,{asChild:a=!1}=e,{el:f=void 0}=e;const{elements:{button:c},getAttrs:d}=O_();J(t,c,g=>n(6,o=g));const p=Fn(),m=d("button");function h(g){Oe.call(this,t,g)}function v(g){Ce[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{e=ie(ie({},e),vt(g)),n(5,s=Ke(e,i)),"asChild"in g&&n(1,a=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(7,l=g.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&n(2,r=o),t.$$.dirty&4&&Object.assign(r,m)},[f,a,r,c,p,s,o,l,u,h,v]}class V_ extends ve{constructor(e){super(),ye(this,e,H_,N_,fe,{asChild:1,el:0})}}var j0="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",B_="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",U_="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",K0="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",q0="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",W0="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",j_="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",K_="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",q_="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",W_="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",Q_="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z",z_="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",G_="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",Y_="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z",Z_="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",X_="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",J_="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",x_="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",e1="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",t1="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",n1="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",Q0="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",r1="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",i1="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",s1="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",zt="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",o1="M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z",z0="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",l1="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z";function u1(t){let e,n,r,i,s=t[0]!==null&&mu(t);return{c(){e=Ks("svg"),s&&s.c(),n=Ks("path"),H(n,"d",t[1]),H(e,"class",r="fill-current "+t[2]),H(e,"viewBox","0 0 24 24"),H(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=mu(o),s.c(),s.m(e,n)):s&&(s.d(1),s=null),u&2&&H(n,"d",o[1]),u&4&&r!==(r="fill-current "+o[2])&&H(e,"class",r),u&1&&i!==(i=o[0]===null?"true":"false")&&H(e,"aria-hidden",i)},d(o){o&&C(e),s&&s.d()}}}function a1(t){let e,n;return{c(){e=D("span"),H(e,"class",n="block "+t[2])},m(r,i){w(r,e,i)},p(r,i){i&4&&n!==(n="block "+r[2])&&H(e,"class",n)},d(r){r&&C(e)}}}function mu(t){let e,n;return{c(){e=Ks("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&&C(e)}}}function f1(t){let e;function n(s,o){return s[1]===null?a1:u1}let r=n(t),i=r(t);return{c(){i.c(),e=Ae()},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&&C(e),i.d(s)}}}function c1(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,c1,f1,fe,{label:0,path:1,class:2})}}async function cn({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 kf(t){if(t.type==="text")return t.text;{let e=[];for(let n of t.content)e.push(kf(n));return e.join("")}}function G0(t){return t.content&&t.content.length>0?kf(t.content[0]):"<Empty Document>"}function Cf(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 Ef(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 d1(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())}function as(t){return t[0].toUpperCase()+t.substring(1)}const dt=Pe(null),m1=Pe(null),pu=Pe(!1);dt.subscribe(t=>{t!==null&&Cf("path",t.fullpath)});function Ln(){return st("apiStatus")}function Ho(){return st("currentUser")}function Y0(){return st("uEditorConfig")}function Et(){return st("currentBranch")}function Vo(){return st("branches")}function p1(){return st("authStatus")}function h1(){return st("hasLoggedOut")}function Z0(){return st("configuredTEIBlocks")}function X0(){return st("configuredTEIMarks")}function hu(t,e,n){const r=t.slice();return r[7]=e[n],r}function _1(t){let e,n,r,i=t[0].length+t[1]+"",s,o,u;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),s=Z(i),o=Z(" actions running"),H(r,"class","pl-2")},m(l,a){I(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){y(e.$$.fragment,l),u=!1},d(l){l&&(C(n),C(r)),M(e,l)}}}function g1(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="1 action running",H(r,"class","pl-2")},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function b1(t){let e;return{c(){e=D("span"),e.textContent="Idle"},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&C(e)}}}function y1(t){let e,n,r,i;const s=[b1,g1,_1],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=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function v1(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Saving file",H(r,"class","flex-1")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function k1(t){let e,n,r,i;return e=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Loading file",H(r,"class","flex-1")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function _u(t){let e,n,r,i;const s=[k1,v1],o=[];function u(l,a){return l[7].action==="LoadTextFile"?0:l[7].action==="SaveCurrentFile"?1:-1}return~(n=u(t))&&(r=o[n]=s[n](t)),{c(){e=D("li"),r&&r.c(),H(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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(r),i=!1},d(l){l&&C(e),~n&&o[n].d()}}}function gu(t){let e,n,r,i,s;return n=new Ne({props:{path:zt,class:"w-4 h-4 animate-spin animate-reverse"}}),{c(){e=D("li"),N(n.$$.fragment),r=K(),i=D("span"),i.textContent="Fetching branches",H(i,"class","flex-1"),H(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),I(n,e,null),P(e,r),P(e,i),s=!0},i(o){s||(b(n.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),s=!1},d(o){o&&C(e),M(n)}}}function C1(t){let e,n,r,i=tn(t[0]),s=[];for(let l=0;l<i.length;l+=1)s[l]=_u(hu(t,i,l));const o=l=>y(s[l],1,1,()=>{s[l]=null});let u=t[2].isFetching&&gu();return{c(){e=D("ul");for(let l=0;l<s.length;l+=1)s[l].c();n=K(),u&&u.c()},m(l,a){w(l,e,a);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(e,null);P(e,n),u&&u.m(e,null),r=!0},p(l,a){if(a&1){i=tn(l[0]);let f;for(f=0;f<i.length;f+=1){const c=hu(l,i,f);s[f]?(s[f].p(c,a),b(s[f],1)):(s[f]=_u(c),s[f].c(),b(s[f],1),s[f].m(e,n))}for(de(),f=i.length;f<s.length;f+=1)o(f);me()}l[2].isFetching?u?a&4&&b(u,1):(u=gu(),u.c(),b(u,1),u.m(e,null)):u&&(de(),y(u,1,1,()=>{u=null}),me())},i(l){if(!r){for(let a=0;a<i.length;a+=1)b(s[a]);b(u),r=!0}},o(l){s=s.filter(Boolean);for(let a=0;a<s.length;a+=1)y(s[a]);y(u),r=!1},d(l){l&&C(e),yi(s,l),u&&u.d()}}}function E1(t){let e,n,r,i;return e=new E_({props:{class:"inline-flex items-center",$$slots:{default:[y1]},$$scope:{ctx:t}}}),r=new __({props:{class:"z-50 bg-white shadow-lg",$$slots:{default:[C1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&1027&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&1029&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function bu(t){let e,n;return e=new Qn({props:{open:!0,onOpenChange:t[6],$$slots:{default:[T1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function w1(t){let e;return{c(){e=Z("Saving failed")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function O1(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function A1(t){let e,n,r,i,s,o,u,l;return e=new Ct({props:{$$slots:{default:[w1]},$$scope:{ctx:t}}}),u=new Rt({props:{"data-button":!0,$$slots:{default:[O1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("div"),i=D("p"),i.textContent="Unfortunately saving the file failed.",s=K(),o=D("div"),N(u.$$.fragment),H(o,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(a,f){I(e,a,f),w(a,n,f),w(a,r,f),P(r,i),P(r,s),P(r,o),I(u,o,null),l=!0},p(a,f){const c={};f&1024&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&1024&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(C(n),C(r)),M(e,a),M(u)}}}function $1(t){let e,n,r,i;return e=new Ur({}),r=new er({props:{$$slots:{default:[A1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function T1(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[$1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&1024&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function S1(t){let e,n,r,i;e=new t_({props:{$$slots:{default:[E1]},$$scope:{ctx:t}}});let s=t[3]&&bu(t);return{c(){N(e.$$.fragment),n=K(),s&&s.c(),r=Ae()},m(o,u){I(e,o,u),w(o,n,u),s&&s.m(o,u),w(o,r,u),i=!0},p(o,[u]){const l={};u&1031&&(l.$$scope={dirty:u,ctx:o}),e.$set(l),o[3]?s?(s.p(o,u),u&8&&b(s,1)):(s=bu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(C(n),C(r)),M(e,o),s&&s.d(o)}}}const ho=Pe([]);let _o=Pe(!1);function wf(t){t.status="active",ho.update(n=>n.concat([t]));let e=null;t.action==="LoadTextFile"?e=D1(t):t.action==="SaveCurrentFile"?e=R1(t):t.action==="SynchroniseBranches"&&(e=P1(t)),e!==null&&e.then(()=>{ho.update(n=>{const r=n.indexOf(t);return r>=0?n.slice(0,r).concat(n.slice(r+1)):n})})}async function D1(t){const e=await window.fetch("/api/branches/"+t.branch.id+"/files/"+t.filename);t.callback(await e.text())}async function R1(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():_o.set(!0)}async function P1(t){await window.fetch("/api/branches",{method:"PATCH"}),t.callback&&t.callback()}function F1(t,e,n){let r,i,s,o;J(t,ho,f=>n(0,r=f)),J(t,_o,f=>n(3,o=f));const u=Vo();J(t,u,f=>n(2,s=f));const l=Be([u],f=>{let c=0;for(const d of f)d!==null&&d.isFetching&&(c=c+1);return c});return J(t,l,f=>n(1,i=f)),[r,i,s,o,u,l,f=>{f||_o.set(!1)}]}let L1=class extends ve{constructor(e){super(),ye(this,e,F1,S1,fe,{})}};function I1(t){let e;const n=t[3].default,r=pe(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)&&_e(r,n,i,i[5],e?he(n,i[5],s,null):ge(i[5]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function M1(t){let e,n,r,i;return e=new Ur({}),r=new er({props:{$$slots:{default:[I1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function N1(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[M1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function H1(t){let e,n,r;function i(o){t[4](o)}let s={onOpenChange:t[1],$$slots:{default:[N1]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Qn({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function V1(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=null;let{open:o=!1}=e;function u(a){a||Ge.set($e.NONE)}cs(()=>{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,V1,H1,fe,{onOpenChange:2,open:0})}get onOpenChange(){return this.$$.ctx[2]}}function B1(t){let e;return{c(){e=Z("Create a new branch")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function yu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function U1(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[K1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("button"),r.textContent="Create",H(r,"type","submit"),H(r,"data-button","")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function j1(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),N(n.$$.fragment),r=D("span"),r.textContent="Creating...",H(e,"data-button",""),H(e,"class","inline-flex")},m(s,o){w(s,e,o),I(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&C(e),M(n)}}}function K1(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function q1(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h;e=new Ct({props:{$$slots:{default:[B1]},$$scope:{ctx:t}}});let v=t[2]&&yu(t);const g=[j1,U1],_=[];function E(A,$){return A[3].isPending?0:1}return c=E(t),d=_[c]=g[c](t),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=K(),u=D("input"),l=K(),v&&v.c(),a=K(),f=D("div"),d.c(),H(s,"data-form-field-label",""),H(u,"type","text"),H(u,"data-form-field-text",""),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(A,$){I(e,A,$),w(A,n,$),w(A,r,$),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),v&&v.m(i,null),P(r,a),P(r,f),_[c].m(f,null),p=!0,m||(h=[G(u,"input",t[7]),G(r,"submit",t[6])],m=!0)},p(A,$){const k={};$&2048&&(k.$$scope={dirty:$,ctx:A}),e.$set(k),$&2&&u.value!==A[1]&&it(u,A[1]),A[2]?v?v.p(A,$):(v=yu(A),v.c(),v.m(i,null)):v&&(v.d(1),v=null);let L=c;c=E(A),c!==L&&(de(),y(_[L],1,1,()=>{_[L]=null}),me(),d=_[c],d||(d=_[c]=g[c](A),d.c()),b(d,1),d.m(f,null))},i(A){p||(b(e.$$.fragment,A),b(d),p=!0)},o(A){y(e.$$.fragment,A),y(d),p=!1},d(A){A&&(C(n),C(r)),M(e,A),v&&v.d(),_[c].d(),m=!1,Te(h)}}}function W1(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[4],$$slots:{default:[q1]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Q1(t,e,n){let r;const i=kt(),s=Et();let o=!1,u="",l="";function a(m){m&&n(1,u="")}const f=ki({mutationFn:async m=>{const h=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:m.title}),headers:{Accept:"application/json","Content-Type":"application/json"}});if(h.ok){i.invalidateQueries({queryKey:["branches"]});const v=await h.json();s.set(v),Ge.set($e.NONE)}else n(2,l=(await h.json()).detail[0].msg),n(2,l=l[0].toUpperCase()+l.substring(1))}});J(t,f,m=>n(3,r=m));async function c(m){m.preventDefault(),r.mutate({title:u})}function d(){u=this.value,n(1,u)}function p(m){o=m,n(0,o)}return[o,u,l,r,a,f,c,d,p]}class z1 extends ve{constructor(e){super(),ye(this,e,Q1,W1,fe,{})}}function G1(t){let e;return{c(){e=Z("Delete the branch")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function vu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function Y1(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[X1]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("button"),r.textContent="Delete",H(r,"type","submit"),H(r,"data-button","")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Z1(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),N(n.$$.fragment),r=D("span"),r.textContent="Deleting...",H(e,"data-button",""),H(e,"class","inline-flex")},m(s,o){w(s,e,o),I(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&C(e),M(n)}}}function X1(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function J1(t){var V;let e,n,r,i,s,o,u=((V=t[5])==null?void 0:V.title)+"",l,a,f,c,d,p,m,h,v,g,_,E,A,$,k,L,R,W,j;e=new Ct({props:{$$slots:{default:[G1]},$$scope:{ctx:t}}});let T=t[2]&&vu(t);const U=[Z1,Y1],O=[];function F(B,ee){return B[4].isPending?0:1}return k=F(t),L=O[k]=U[k](t),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the branch "),o=D("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=K(),c=D("label"),d=D("span"),d.textContent="Confirm branch name",p=K(),m=D("input"),h=K(),T&&T.c(),v=K(),g=D("label"),_=D("input"),E=Z(` Only delete the local
14
+ branch`),A=K(),$=D("div"),L.c(),H(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),H(i,"class","mb-4"),H(d,"data-form-field-label",""),H(m,"type","text"),H(m,"data-form-field-text",""),H(c,"class","block mb-4"),H(_,"type","checkbox"),H(g,"class","block text-sm"),H($,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(B,ee){I(e,B,ee),w(B,n,ee),w(B,r,ee),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,p),P(c,m),it(m,t[1]),P(c,h),T&&T.m(c,null),P(r,v),P(r,g),P(g,_),_.checked=t[3],P(g,E),P(r,A),P(r,$),O[k].m($,null),R=!0,W||(j=[G(m,"input",t[10]),G(_,"change",t[11]),G(r,"submit",t[9])],W=!0)},p(B,ee){var oe;const te={};ee&16384&&(te.$$scope={dirty:ee,ctx:B}),e.$set(te),(!R||ee&32)&&u!==(u=((oe=B[5])==null?void 0:oe.title)+"")&&qe(l,u),ee&2&&m.value!==B[1]&&it(m,B[1]),B[2]?T?T.p(B,ee):(T=vu(B),T.c(),T.m(c,null)):T&&(T.d(1),T=null),ee&8&&(_.checked=B[3]);let z=k;k=F(B),k!==z&&(de(),y(O[z],1,1,()=>{O[z]=null}),me(),L=O[k],L||(L=O[k]=U[k](B),L.c()),b(L,1),L.m($,null))},i(B){R||(b(e.$$.fragment,B),b(L),R=!0)},o(B){y(e.$$.fragment,B),y(L),R=!1},d(B){B&&(C(n),C(r)),M(e,B),T&&T.d(),O[k].d(),W=!1,Te(j)}}}function x1(t){let e,n,r;function i(o){t[12](o)}let s={onOpenChange:t[7],$$slots:{default:[J1]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(e,o,u),r=!0},p(o,[u]){const l={};u&16446&&(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function eg(t,e,n){let r,i;const s=kt(),o=Et();J(t,o,g=>n(5,i=g));let u=!1,l="",a="",f=!1;function c(g){g&&n(1,l="")}const d=ki({mutationFn:async()=>{const g=await window.fetch("/api/branches/"+(i==null?void 0:i.id),{method:"DELETE",headers:{Accept:"application/json","X-UEDITOR-DELETE-LOCAL-ONLY":f?"true":"false"}});g.ok?(s.invalidateQueries({queryKey:["branches"]}),o.set(null),Ge.set($e.NONE)):(n(2,a=(await g.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}});J(t,d,g=>n(4,r=g));function p(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 h(){f=this.checked,n(3,f)}function v(g){u=g,n(0,u)}return[u,l,a,f,r,i,o,c,d,p,m,h,v]}class tg extends ve{constructor(e){super(),ye(this,e,eg,x1,fe,{})}}function ku(t,e,n){const r=t.slice();return r[14]=e[n],r}function ng(t){let e;return{c(){e=Z("Import a remote branch")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Cu(t){let e,n=t[14].title+"",r,i;return{c(){e=D("option"),r=Z(n),e.__value=i=t[14].id,it(e,e.__value)},m(s,o){w(s,e,o),P(e,r)},p(s,o){o&16&&n!==(n=s[14].title+"")&&qe(r,n),o&16&&i!==(i=s[14].id)&&(e.__value=i,it(e,e.__value))},d(s){s&&C(e)}}}function Eu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function rg(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[sg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("button"),r.textContent="Import",H(r,"type","submit"),H(r,"data-button","")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function ig(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),N(n.$$.fragment),r=D("span"),r.textContent="Importing...",H(e,"data-button",""),H(e,"class","inline-flex")},m(s,o){w(s,e,o),I(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&C(e),M(n)}}}function sg(t){let e;return{c(){e=Z("Don't import")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function og(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h;e=new Ct({props:{$$slots:{default:[ng]},$$scope:{ctx:t}}});let v=tn(t[4]),g=[];for(let k=0;k<v.length;k+=1)g[k]=Cu(ku(t,v,k));let _=t[2]&&Eu(t);const E=[ig,rg],A=[];function $(k,L){return k[3].isPending?0:1}return c=$(t),d=A[c]=E[c](t),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New branch title",o=K(),u=D("select");for(let k=0;k<g.length;k+=1)g[k].c();l=K(),_&&_.c(),a=K(),f=D("div"),d.c(),H(s,"data-form-field-label",""),H(u,"data-form-field-text",""),t[1]===void 0&&ct(()=>t[9].call(u)),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(k,L){I(e,k,L),w(k,n,L),w(k,r,L),P(r,i),P(i,s),P(i,o),P(i,u);for(let R=0;R<g.length;R+=1)g[R]&&g[R].m(u,null);Wo(u,t[1],!0),P(i,l),_&&_.m(i,null),P(r,a),P(r,f),A[c].m(f,null),p=!0,m||(h=[G(u,"change",t[9]),G(r,"submit",t[8])],m=!0)},p(k,L){const R={};if(L&131072&&(R.$$scope={dirty:L,ctx:k}),e.$set(R),L&16){v=tn(k[4]);let j;for(j=0;j<v.length;j+=1){const T=ku(k,v,j);g[j]?g[j].p(T,L):(g[j]=Cu(T),g[j].c(),g[j].m(u,null))}for(;j<g.length;j+=1)g[j].d(1);g.length=v.length}L&18&&Wo(u,k[1]),k[2]?_?_.p(k,L):(_=Eu(k),_.c(),_.m(i,null)):_&&(_.d(1),_=null);let W=c;c=$(k),c!==W&&(de(),y(A[W],1,1,()=>{A[W]=null}),me(),d=A[c],d||(d=A[c]=E[c](k),d.c()),b(d,1),d.m(f,null))},i(k){p||(b(e.$$.fragment,k),b(d),p=!0)},o(k){y(e.$$.fragment,k),y(d),p=!1},d(k){k&&(C(n),C(r)),M(e,k),yi(g,k),_&&_.d(),A[c].d(),m=!1,Te(h)}}}function lg(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[5],$$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(){N(e.$$.fragment)},m(o,u){I(e,o,u),r=!0},p(o,[u]){const l={};u&131102&&(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function ug(t,e,n){let r,i;const s=kt(),o=Et(),u=Vo();let l=!1,a="",f="";function c(g){g&&n(1,a="")}const d=Be(u,g=>g.isSuccess?g.data.remote.filter(_=>{let E=!1;for(const A of g.data.local)if(_.id.endsWith("/"+A.id)){E=!0;break}return!E}).map(_=>({id:_.id.substring(_.id.indexOf("/")+1),title:_.title,nogit:!1})):[]);J(t,d,g=>n(4,i=g));const p=ki({mutationFn:async g=>{const _=await window.fetch("/api/branches",{method:"POST",body:JSON.stringify({title:g.title}),headers:{Accept:"application/json","Content-Type":"application/json","X-UEditor-Import-Branch":"true"}});if(_.ok){s.invalidateQueries({queryKey:["branches"]});const E=await _.json();o.set(E),Ge.set($e.NONE)}else n(2,f=(await _.json()).detail[0].msg),n(2,f=f[0].toUpperCase()+f.substring(1))}});J(t,p,g=>n(3,r=g));async function m(g){g.preventDefault(),r.mutate({title:a})}function h(){a=Kf(this),n(1,a)}function v(g){l=g,n(0,l)}return[l,a,f,r,i,c,d,p,m,h,v]}class ag extends ve{constructor(e){super(),ye(this,e,ug,lg,fe,{})}}function fg(t){let e;return{c(){e=Z("Merge changes from the default branch")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function wu(t){let e,n;return{c(){e=D("p"),n=Z(t[1]),H(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&&C(e)}}}function cg(t){let e,n,r,i;return e=new Rt({props:{"data-button":!0,$$slots:{default:[mg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("button"),r.textContent="Merge",H(r,"type","submit"),H(r,"data-button","")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function dg(t){let e,n,r,i;return n=new Ne({props:{path:zt,class:"block w-6 h-6 animate-spin"}}),{c(){e=D("span"),N(n.$$.fragment),r=D("span"),r.textContent="Merging...",H(e,"data-button",""),H(e,"class","inline-flex")},m(s,o){w(s,e,o),I(n,e,null),P(e,r),i=!0},i(s){i||(b(n.$$.fragment,s),i=!0)},o(s){y(n.$$.fragment,s),i=!1},d(s){s&&C(e),M(n)}}}function mg(t){let e;return{c(){e=Z("Don't merge")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function pg(t){var j;let e,n,r,i,s,o,u=as(t[4].data.git.default_branch)+"",l,a,f,c=((j=t[3])==null?void 0:j.title)+"",d,p,m,h,v,g,_,E,A,$;e=new Ct({props:{$$slots:{default:[fg]},$$scope:{ctx:t}}});let k=t[1]&&wu(t);const L=[dg,cg],R=[];function W(T,U){return T[2].isPending?0:1}return g=W(t),_=R[g]=L[g](t),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to merge all changes from the default branch "),o=D("span"),l=Z(u),a=Z(`
15
+ into the current branch`),f=D("span"),d=Z(c),p=Z(". This cannot be undone."),m=K(),k&&k.c(),h=K(),v=D("div"),_.c(),H(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),H(f,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),H(i,"class","mb-4"),H(v,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(T,U){I(e,T,U),w(T,n,U),w(T,r,U),P(r,i),P(i,s),P(i,o),P(o,l),P(i,a),P(i,f),P(f,d),P(i,p),P(r,m),k&&k.m(r,null),P(r,h),P(r,v),R[g].m(v,null),E=!0,A||($=G(r,"submit",t[9]),A=!0)},p(T,U){var V;const O={};U&8192&&(O.$$scope={dirty:U,ctx:T}),e.$set(O),(!E||U&16)&&u!==(u=as(T[4].data.git.default_branch)+"")&&qe(l,u),(!E||U&8)&&c!==(c=((V=T[3])==null?void 0:V.title)+"")&&qe(d,c),T[1]?k?k.p(T,U):(k=wu(T),k.c(),k.m(r,h)):k&&(k.d(1),k=null);let F=g;g=W(T),g!==F&&(de(),y(R[F],1,1,()=>{R[F]=null}),me(),_=R[g],_||(_=R[g]=L[g](T),_.c()),b(_,1),_.m(v,null))},i(T){E||(b(e.$$.fragment,T),b(_),E=!0)},o(T){y(e.$$.fragment,T),y(_),E=!1},d(T){T&&(C(n),C(r)),M(e,T),k&&k.d(),R[g].d(),A=!1,$()}}}function hg(t){let e,n,r;function i(o){t[10](o)}let s={onOpenChange:t[7],$$slots:{default:[pg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function _g(t,e,n){let r,i,s;const o=kt(),u=Ln();J(t,u,h=>n(4,s=h));const l=Et();J(t,l,h=>n(3,i=h));let a=!1,f="";function c(h){}const d=ki({mutationFn:async()=>{const h=await window.fetch("/api/branches/"+(i==null?void 0:i.id)+"/merge-from-default",{method:"POST",headers:{Accept:"application/json"}});h.ok?(o.invalidateQueries({queryKey:["branches"]}),Ge.set($e.NONE)):(n(1,f=(await h.json()).detail[0].msg),n(1,f=f[0].toUpperCase()+f.substring(1)))}});J(t,d,h=>n(2,r=h));function p(h){h.preventDefault(),r.mutate()}function m(h){a=h,n(0,a)}return[a,f,r,i,s,u,l,c,d,p,m]}class gg extends ve{constructor(e){super(),ye(this,e,_g,hg,fe,{})}}function bg(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&&(C(e),C(r),C(i))}}}function Ou(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function yg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function vg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ct({props:{$$slots:{default:[bg]},$$scope:{ctx:t}}});let g=t[2]&&Ou(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[yg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),N(c.$$.fragment),d=K(),p=D("button"),p.textContent="Create",H(s,"data-form-field-label",""),H(u,"type","text"),H(u,"data-form-field-text",""),H(p,"type","submit"),H(p,"data-button",""),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(_,E){I(e,_,E),w(_,n,E),w(_,r,E),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),I(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,E){const A={};E&2056&&(A.$$scope={dirty:E,ctx:_}),e.$set(A),E&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,E):(g=Ou(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};E&2048&&($.$$scope={dirty:E,ctx:_}),c.$set($)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(C(n),C(r)),M(e,_),g&&g.d(),M(c),h=!1,Te(v)}}}function kg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[vg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Cg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else{const h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set($e.NONE)):(n(2,a=(await h.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set($e.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let Eg=class extends ve{constructor(e){super(),ye(this,e,Cg,kg,fe,{})}};function wg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),H(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&&(C(e),C(n))}}}function Au(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),H(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&&C(e)}}}function Og(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Ag(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,h,v,g,_,E,A,$,k,L;e=new Ct({props:{class:"bg-rose-700",$$slots:{default:[wg]},$$scope:{ctx:t}}});let R=t[1]&&Au(t);return _=new Rt({props:{"data-button":!0,$$slots:{default:[Og]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the folder "),o=D("span"),l=Z(u),a=Z(`
16
16
  and all the files and folders within that. To confirm the action, please enter
17
- the name of the folder to delete.`),f=K(),c=D("label"),d=D("span"),d.textContent="Confirmation Folder Name",p=K(),m=D("input"),h=K(),R&&R.c(),v=K(),g=D("div"),H(_.$$.fragment),C=K(),A=D("button"),A.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block"),I(A,"type","submit"),I(A,"data-button",""),I(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(g,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(j,$){M(e,j,$),w(j,n,$),w(j,r,$),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,p),P(c,m),it(m,t[2]),P(c,h),R&&R.m(c,null),P(r,v),P(r,g),M(_,g,null),P(g,C),P(g,A),T=!0,k||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],k=!0)},p(j,$){var F;const U={};$&2056&&(U.$$scope={dirty:$,ctx:j}),e.$set(U),(!T||$&8)&&u!==(u=((F=j[3])==null?void 0:F.fullpath)+"")&&qe(l,u),$&4&&m.value!==j[2]&&it(m,j[2]),j[1]?R?R.p(j,$):(R=Au(j),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};$&2048&&(O.$$scope={dirty:$,ctx:j}),_.$set(O)},i(j){T||(b(e.$$.fragment,j),b(_.$$.fragment,j),T=!0)},o(j){y(e.$$.fragment,j),y(_.$$.fragment,j),T=!1},d(j){j&&(E(n),E(r)),N(e,j),R&&R.d(),N(_),k=!1,Te(L)}}}function Og(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[wg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Ag(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.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/"]}),dt.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(m){m?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let Ef=class extends ve{constructor(e){super(),ye(this,e,Ag,Og,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 Tu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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,p,m,h,v;e=new Ot({props:{$$slots:{default:[Tg]},$$scope:{ctx:t}}});let g=t[2]&&Tu(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[$g]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),H(c.$$.fragment),d=K(),p=D("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(_,C){M(e,_,C),w(_,n,C),w(_,r,C),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),M(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,C){const A={};C&2056&&(A.$$scope={dirty:C,ctx:_}),e.$set(A),C&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,C):(g=Tu(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};C&2048&&(T.$$scope={dirty:C,ctx:_}),c.$set(T)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(E(n),E(r)),N(e,_),g&&g.d(),N(c),h=!1,Te(v)}}}function Dg(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(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Rg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),dt.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let Pg=class extends ve{constructor(e){super(),ye(this,e,Rg,Dg,fe,{})}};function Fg(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 $u(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 Lg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ig(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ot({props:{$$slots:{default:[Fg]},$$scope:{ctx:t}}});let g=t[2]&&$u(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[Lg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),H(c.$$.fragment),d=K(),p=D("button"),p.textContent="Create",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(_,C){M(e,_,C),w(_,n,C),w(_,r,C),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),M(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,C){const A={};C&2056&&(A.$$scope={dirty:C,ctx:_}),e.$set(A),C&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,C):(g=$u(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};C&2048&&(T.$$scope={dirty:C,ctx:_}),c.$set(T)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(E(n),E(r)),N(e,_),g&&g.d(),N(c),h=!1,Te(v)}}}function Mg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Ig]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Ng(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set(Ae.NONE)):(n(2,a=(await h.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Hg extends ve{constructor(e){super(),ye(this,e,Ng,Mg,fe,{})}}function Vg(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),I(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 Su(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),I(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 Bg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ug(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,h,v,g,_,C,A,T,k,L;e=new Ot({props:{class:"bg-rose-700",$$slots:{default:[Vg]},$$scope:{ctx:t}}});let R=t[1]&&Su(t);return _=new Rt({props:{"data-button":!0,$$slots:{default:[Bg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the file "),o=D("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=K(),c=D("label"),d=D("span"),d.textContent="Confirm filename",p=K(),m=D("input"),h=K(),R&&R.c(),v=K(),g=D("div"),H(_.$$.fragment),C=K(),A=D("button"),A.textContent="Delete",I(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),I(i,"class","mb-4"),I(d,"data-form-field-label",""),I(m,"type","text"),I(m,"data-form-field-text",""),I(c,"class","block"),I(A,"type","submit"),I(A,"data-button",""),I(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),I(g,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(j,$){M(e,j,$),w(j,n,$),w(j,r,$),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,p),P(c,m),it(m,t[2]),P(c,h),R&&R.m(c,null),P(r,v),P(r,g),M(_,g,null),P(g,C),P(g,A),T=!0,k||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],k=!0)},p(j,$){var F;const U={};$&2056&&(U.$$scope={dirty:$,ctx:j}),e.$set(U),(!T||$&8)&&u!==(u=((F=j[3])==null?void 0:F.fullpath)+"")&&qe(l,u),$&4&&m.value!==j[2]&&it(m,j[2]),j[1]?R?R.p(j,$):(R=Su(j),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};$&2048&&(O.$$scope={dirty:$,ctx:j}),_.$set(O)},i(j){T||(b(e.$$.fragment,j),b(_.$$.fragment,j),T=!0)},o(j){y(e.$$.fragment,j),y(_.$$.fragment,j),T=!1},d(j){j&&(E(n),E(r)),N(e,j),R&&R.d(),N(_),k=!1,Te(L)}}}function jg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Ug]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Kg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.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/"]}),dt.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(m){m?(n(2,a=""),n(1,l="")):Ge.set(Ae.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class qg extends ve{constructor(e){super(),ye(this,e,Kg,jg,fe,{})}}function Wg(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 Du(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),I(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 Qg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function zg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ot({props:{$$slots:{default:[Wg]},$$scope:{ctx:t}}});let g=t[2]&&Du(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[Qg]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),H(c.$$.fragment),d=K(),p=D("button"),p.textContent="Rename",I(s,"data-form-field-label",""),I(u,"type","text"),I(u,"data-form-field-text",""),I(p,"type","submit"),I(p,"data-button",""),I(f,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(_,C){M(e,_,C),w(_,n,C),w(_,r,C),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),M(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,C){const A={};C&2056&&(A.$$scope={dirty:C,ctx:_}),e.$set(A),C&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,C):(g=Du(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const T={};C&2048&&(T.$$scope={dirty:C,ctx:_}),c.$set(T)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(E(n),E(r)),N(e,_),g&&g.d(),N(c),h=!1,Te(v)}}}function Gg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[zg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function Yg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Ct();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"file","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),dt.set(null),Ge.set(Ae.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set(Ae.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Zg extends ve{constructor(e){super(),ye(this,e,Yg,Gg,fe,{})}}function Ru(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function Xg(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Jg(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function xg(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?Jg:Xg}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,p;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?(p=f[6])==null?void 0:p.fullpath:"/")+"")&&qe(r,n)},d(f){f&&(E(e),E(r),E(i)),u.d(f)}}}function eb(t){let e,n,r,i,s,o,u=tn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Pu(Ru(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Rt({props:{"data-button":!0,$$slots:{default:[ub]},$$scope:{ctx:t}}}),{c(){e=D("div"),n=D("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=K(),i=D("div"),H(s.$$.fragment),I(i,"data-dialog-buttons",""),I(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),M(s,i,null),o=!0},p(f,c){if(c&144){u=tn(f[4]);let p;for(p=0;p<u.length;p+=1){const m=Ru(f,u,p);l[p]?(l[p].p(m,c),b(l[p],1)):(l[p]=Pu(m),l[p].c(),b(l[p],1),l[p].m(n,null))}for(de(),p=u.length;p<l.length;p+=1)a(p);me()}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)y(l[c]);y(s.$$.fragment,f),o=!1},d(f){f&&E(e),yi(l,f),N(s)}}}function tb(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m;return a=new Rt({props:{"data-button":!0,$$slots:{default:[ab]},$$scope:{ctx:t}}}),{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=K(),s=D("input"),u=K(),l=D("div"),H(a.$$.fragment),f=K(),c=D("button"),c.textContent="Upload",I(s,"type","file"),I(s,"class","sr-only"),I(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),I(c,"type","submit"),I(c,"data-button",""),I(c,"class","sr-only"),I(l,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(h,v){w(h,e,v),P(e,n),P(n,r),P(n,i),P(n,s),t[12](s),P(e,u),P(e,l),M(a,l,null),P(l,f),P(l,c),t[16](c),d=!0,p||(m=[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])],p=!0)},p(h,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(h[2]?"border-solid":"border-dashed")+" rounded"))&&I(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:h}),a.$set(g)},i(h){d||(b(a.$$.fragment,h),d=!0)},o(h){y(a.$$.fragment,h),d=!1},d(h){h&&E(e),t[12](null),N(a),t[16](null),p=!1,Te(m)}}}function nb(t){let e,n,r,i;return r=new Ne({props:{path:B1,class:"w-6 h-6 text-rose-700"}}),{c(){e=D("span"),e.textContent="failed to upload",n=K(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function rb(t){let e,n,r,i;return r=new Ne({props:{path:H1,class:"w-6 h-6 text-lime-500"}}),{c(){e=D("span"),e.textContent="successfully uploaded",n=K(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function ib(t){let e,n,r,i;return r=new Ne({props:{path:zt,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=D("span"),e.textContent="uploading",n=K(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function sb(t){let e,n,r,i;return r=new Ne({props:{path:i_}}),{c(){e=D("span"),e.textContent="waiting to upload",n=K(),H(r.$$.fragment),I(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),M(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(E(e),E(n)),N(r,s)}}}function Pu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[sb,ib,rb,nb],c=[];function d(p,m){return p[22]===p[7].READY?0:p[22]==p[7].ACTIVE?1:p[22]===p[7].SUCCESS?2:p[22]===p[7].FAILED?3:-1}return~(o=d(t))&&(u=c[o]=f[o](t)),{c(){e=D("li"),n=D("span"),i=Z(r),s=K(),u&&u.c(),l=K(),I(n,"class","flex-1"),I(e,"class","flex flex-row space-x-4")},m(p,m){w(p,e,m),P(e,n),P(n,i),P(e,s),~o&&c[o].m(e,null),P(e,l),a=!0},p(p,m){(!a||m&16)&&r!==(r=p[21].name+"")&&qe(i,r);let h=o;o=d(p),o!==h&&(u&&(de(),y(c[h],1,1,()=>{c[h]=null}),me()),~o?(u=c[o],u||(u=c[o]=f[o](p),u.c()),b(u,1),u.m(e,l)):u=null)},i(p){a||(b(u),a=!0)},o(p){y(u),a=!1},d(p){p&&E(e),~o&&c[o].d()}}}function ob(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function lb(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ub(t){let e;function n(s,o){return s[5]?lb:ob}let r=n(t),i=r(t);return{c(){i.c(),e=$e()},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 ab(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function fb(t){let e,n,r,i,s,o;e=new Ot({props:{$$slots:{default:[xg]},$$scope:{ctx:t}}});const u=[tb,eb],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){H(e.$$.fragment),n=K(),i.c(),s=$e()},m(f,c){M(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 p=r;r=a(f),r===p?l[r].p(f,c):(de(),y(l[p],1,1,()=>{l[p]=null}),me(),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){y(e.$$.fragment,f),y(i),o=!1},d(f){f&&(E(n),E(s)),N(e,f),l[r].d(f)}}}function cb(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[fb]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){H(e.$$.fragment)},m(o,u){M(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){y(e.$$.fragment,o),r=!1},d(o){N(e,o)}}}function db(t,e,n){let r,i;J(t,dt,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=kt(),u=Ct();J(t,u,R=>n(18,r=R));let l=null,a=null,f=!1,c=!1,d=[],p=!1;function m(R){R||Ge.set(Ae.NONE)}async function h(R){if(R.preventDefault(),l&&l.files){n(4,d=[]);for(let W of l.files)d.push([W,0]);d.length>0&&g()}}async function v(R){if(R.preventDefault(),n(4,d=[]),R.dataTransfer&&R.dataTransfer.items){for(let W of R.dataTransfer.items)if(W.kind==="file"){const j=W.getAsFile();j!==null&&d.push([j,0])}d.length>0&&g()}}async function g(){n(5,p=!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 j=new FormData;j.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:j})).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,p=!0)}function _(R){Ce[R?"unshift":"push"](()=>{l=R,n(0,l)})}const C=()=>{a&&a.click()},A=R=>{R.preventDefault(),n(2,f=!0)},T=()=>{n(2,f=!1)};function k(R){Ce[R?"unshift":"push"](()=>{a=R,n(1,a)})}function L(R){c=R,n(3,c)}return[l,a,f,c,d,p,i,s,u,m,h,v,_,C,A,T,k,L]}class mb extends ve{constructor(e){super(),ye(this,e,db,cb,fe,{})}}function pb(t){let e,n;return e=new mb({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function hb(t){let e,n;return e=new Zg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function _b(t){let e,n;return e=new qg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function gb(t){let e,n;return e=new Hg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function bb(t){let e,n;return e=new Pg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function yb(t){let e,n;return e=new Ef({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function vb(t){let e,n;return e=new kg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function kb(t){let e,n;return e=new hg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Cb(t){let e,n;return e=new x_({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Eb(t){let e,n;return e=new lg({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function wb(t){let e,n;return e=new W_({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Ob(t){let e,n,r,i;const s=[wb,Eb,Cb,kb,vb,yb,bb,gb,_b,hb,pb],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(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=Pe(1);function Ab(t,e,n){let r,i=ce;return J(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let Tb=class extends ve{constructor(e){super(),ye(this,e,Ab,Ob,fe,{})}};const $b="modulepreload",Sb=function(t){return"/app/"+t},Fu={},Ui=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=Sb(l),l in Fu)return;Fu[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":$b,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(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=D("div"),e.textContent="Please select a file or folder from the file-browser on the left",I(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 Rb(t){let e,n,r,i;const s=[Lb,Fb,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=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(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=D("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),I(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 Fb(t){let e;return{c(){e=D("div"),e.textContent="Loading the editor. Please wait...",I(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 Lb(t){let e=t[3].id,n,r,i=Lu(t);return{c(){i.c(),n=$e()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(de(),y(i,1,1,ce),me(),i=Lu(s),i.c(),b(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){r||(b(i),r=!0)},o(s){y(i),r=!1},d(s){s&&E(n),i.d(s)}}}function Lu(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Qo(i,s())),{c(){e&&H(e.$$.fragment),n=$e()},m(o,u){e&&M(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){de();const l=e;y(l.$$.fragment,1,0,()=>{N(l,1)}),me()}i?(e=Qo(i,s()),H(e.$$.fragment),b(e.$$.fragment,1),M(e,n.parentNode,n)):e=null}},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&y(e.$$.fragment,o),r=!1},d(o){o&&E(n),e&&N(e,o)}}}function Ib(t){let e,n,r,i;const s=[Rb,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=$e()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&E(r),o[e].d(l)}}}function Mb(t,e,n){let r,i,s;J(t,dt,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=Ct();J(t,a,d=>n(3,s=d));const f=Be(dt,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=Be(f,(d,p)=>{let m=null;d==="Folder"?m=Ui(()=>import("./FolderEditor-BRCtr0pK.js"),[]):d==="CodeMirror"?m=Ui(()=>import("./CodeMirrorEditor-DaVvZ_iF.js"),__vite__mapDeps([0,1,2])):d==="Tei"?m=Ui(()=>import("./TeiEditor-Cl1q8UQU.js"),__vite__mapDeps([3,1])):d==="Image"&&(m=Ui(()=>import("./ImageEditor-Bi68IyPx.js"),[])),m?(n(0,o=!0),m.then(h=>{p(h.default),n(0,o=!1)},()=>{n(0,o=!1)})):p(null)},null);return J(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let Nb=class extends ve{constructor(e){super(),ye(this,e,Mb,Ib,fe,{})}};function Hb(t){return t[t.length-1]}function wf(t){return Object.keys(t).reduce((e,n)=>t[n]===void 0?e:e+`${n}:${t[n]};`,"")}wf({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function Vb(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function ji(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Iu(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Mu(t,e){if(!Ub)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return Bo(n)?n:null}const Ki=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Nu=t=>typeof t=="function";Qi("empty");function Qi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Be(n,u=>{const l=i(u);if(Nu(l)){const a=(...f)=>Ki(ji({...l(...f),[`data-melt-${t}`]:"",action:r??ir}));return a.action=r??ir,a}return Ki(ji({...l,[`data-melt-${t}`]:"",action:r??ir}))});{const u=i,l=u==null?void 0:u();if(Nu(l)){const a=(...f)=>Ki(ji({...l(...f),[`data-melt-${t}`]:"",action:r??ir}));return a.action=r??ir,Iu(a)}return Iu(Ki(ji({...l,[`data-melt-${t}`]:"",action:r??ir})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function Bb(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 Ub=typeof document<"u",jb=t=>/^[a-z]$/i.test(t);function Bo(t){return t instanceof HTMLElement}function Kb(t){return t.offsetParent===null}function qb(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ir(){}function Bs(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Qb(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function Wb(t){const e=t.currentTarget;if(!Bo(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Qb(t){return e=>{const n=Wb(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Uo(t){return{...t,get:()=>Rr(t)}}Uo.writable=function(t){const e=Pe(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}}};Uo.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 zb=(t,e)=>{const n=Uo(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 Gb(){return Ka(10)}function Yb(t){return t.reduce((e,n)=>(e[n]=Gb(),e),{})}const ut={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"};yt(!1),yt(!1),yt(void 0),yt(void 0);const Zb={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"};({...Vb(Zb,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const Xb={forceVisible:!1,defaultExpanded:[]},sr={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Us}=Bb("tree-view");function Jb(t){const e={...Xb,...t},{forceVisible:n}=e,r=Pe(null),i=Pe(null),s=e.expanded??Pe(e.defaultExpanded),o=zb(s,e==null?void 0:e.onExpandedChange),u=Be([i],([k])=>k==null?void 0:k.getAttribute("data-id")),l=Be([i],([k])=>L=>(k==null?void 0:k.getAttribute("data-id"))===L),a=Be([o],([k])=>L=>k.includes(L)),f=Yb(["tree"]),c=Qi(Us(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const p=Qi(Us("item"),{stores:[o,u,r],returned:([k,L,R])=>W=>{const{id:j,hasChildren:$}=W;let U=0;return R!==null&&(U=R===j?0:-1),{role:"treeitem","aria-selected":L===j,"data-id":j,tabindex:U,"aria-expanded":$?k.includes(j):void 0}},action:k=>{const L=qb(Bs(k,"keydown",R=>{const{key:W}=R,j=jb(W);if(![ut.ARROW_DOWN,ut.ARROW_UP,ut.ARROW_LEFT,ut.ARROW_RIGHT,ut.ENTER,ut.SPACE,ut.END,ut.HOME,ut.ASTERISK].includes(W)&&!j||!Mu(f.tree)||!Bo(k)||k.getAttribute("role")!=="treeitem")return;const O=g(),F=O.findIndex(V=>V===k);if(W!==ut.ENTER&&W!==ut.SPACE&&R.preventDefault(),W===ut.ENTER||W===ut.SPACE)v(k),d=!0;else if(W===ut.ARROW_DOWN&&F!==O.length-1){const V=O[F+1];if(!V)return;h(V)}else if(W===ut.ARROW_UP&&F!==0){const V=O[F-1];if(!V)return;h(V)}else if(W===ut.HOME&&F!==0){const V=O[0];if(!V)return;h(V)}else if(W===ut.END&&F!=O.length-1){const V=Hb(O);if(!V)return;h(V)}else if(W===ut.ARROW_LEFT)if(T(k))C(k);else{const V=k==null?void 0:k.closest('[role="group"]'),B=V==null?void 0:V.getAttribute("data-group-id"),ee=O.find(te=>te.getAttribute("data-id")===B);if(!ee)return;h(ee)}else if(W===ut.ARROW_RIGHT)if(T(k)){const V=O[F+1];if(!V)return;h(V)}else A(k)&&C(k);else if(j){const V=O.map(te=>{var z;return{value:(z=te.textContent)==null?void 0:z.toLowerCase().trim(),id:te.getAttribute("data-id")}});let B=-1,ee=V.slice(F+1).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase()[0])===W?(B=F+1+z,!0):!1});if(ee||(ee=V.slice(0,F).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase().at(0))===W?(B=z,!0):!1})),ee&&V[B].id){const te=O[B];if(!te)return;h(te)}}}),Bs(k,"click",async()=>{v(k),h(k),d||C(k),d=!1}),Bs(k,"focus",()=>{r.update(R=>k.getAttribute("data-id")??R)}));return{destroy(){L()}}}}),m=Qi(Us("group"),{stores:[o],returned:([k])=>L=>({role:"group","data-group-id":L.id,hidden:!n&&!k.includes(L.id)?!0:void 0,style:wf({display:!n&&!k.includes(L.id)?"none":void 0})})});function h(k){r.update(L=>k.getAttribute("data-id")??L),k.focus()}function v(k){k.getAttribute(sr.DATAID)&&i.set(k)}function g(){let k=[];const L=Mu(f.tree);return L&&(k=Array.from(L.querySelectorAll('[role="treeitem"]')).filter(R=>!Kb(R))),k}function _(k){const L=k.hasAttribute(sr.EXPANDED),R=k.getAttribute(sr.EXPANDED),W=k.getAttribute(sr.DATAID);return{hasChildren:L,expanded:R,dataId:W}}function C(k){const{hasChildren:L,expanded:R,dataId:W}=_(k);!L||R===null||W===null||(R==="false"?o.update(j=>[...j,W]):o.update(j=>j.filter($=>$!==W)))}function A(k){return k.hasAttribute(sr.EXPANDED)}function T(k){return k.getAttribute(sr.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:p,group:m},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Of={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",go,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 p=u[d];return p===void 0&&(p=n[d]),p===void 0&&(p=d),p===l&&(p=" "),c+p.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})})(Of);var e2=Of.exports;const t2=xb(e2);function Hu(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-${t2(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 n2(t){let e,n,r,i,s;const o=[u2,l2,o2,s2],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=$e()},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&&(de(),y(u[c],1,1,()=>{u[c]=null}),me(),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){y(r),s=!1},d(a){a&&E(i),u[n].d(a)}}}function r2(t){let e,n;return e=new Ne({props:{path:X1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function i2(t){let e,n;return e=new Ne({props:{path:Z1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function s2(t){let e,n;return e=new Ne({props:{path:z1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function o2(t){let e,n;return e=new Ne({props:{path:K1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function l2(t){let e,n;return e=new Ne({props:{path:Q1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function u2(t){let e,n;return e=new Ne({props:{path:q1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function Vu(t){let e,n,r,i,s;n=new Af({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("ol"),H(n.$$.fragment),le(e,u)},m(l,a){w(l,e,a),M(n,e,null),r=!0,i||(s=Ue(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),le(e,u=Me(o,[a&7&&l[16]]))},i(l){r||(b(n.$$.fragment,l),r=!0)},o(l){y(n.$$.fragment,l),r=!1},d(l){l&&E(e),N(n),i=!1,s()}}}function Bu(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,p,m,h;const v=[i2,r2,n2],g=[];function _(k,L){return L&19&&(r=null),r==null&&(r=!!(k[10]==="folder"&&k[15]&&k[4](k[14]))),r?0:k[10]==="folder"?1:k[10]==="file"?2:-1}~(i=_(t,-1))&&(s=g[i]=v[i](t));let C=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],A={};for(let k=0;k<C.length;k+=1)A=ie(A,C[k]);let T=t[12]&&Vu(t);return{c(){e=D("li"),n=D("button"),s&&s.c(),o=K(),u=D("span"),a=Z(l),c=K(),T&&T.c(),d=K(),I(u,"class","select-none"),le(n,A),I(e,"role","none")},m(k,L){w(k,e,L),P(e,n),~i&&g[i].m(n,null),P(n,o),P(n,u),P(u,a),n.autofocus&&n.focus(),P(e,c),T&&T.m(e,null),P(e,d),p=!0,m||(h=Ue(t[17].action(n)),m=!0)},p(k,L){let R=i;i=_(k,L),i===R?~i&&g[i].p(k,L):(s&&(de(),y(g[R],1,1,()=>{g[R]=null}),me()),~i?(s=g[i],s?s.p(k,L):(s=g[i]=v[i](k),s.c()),b(s,1),s.m(n,o)):s=null),(!p||L&1)&&l!==(l=k[9]+"")&&qe(a,l),le(n,A=Me(C,[{class:"flex items-center gap-1 p-1"},L&11&&k[17],(!p||L&1&&f!==(f=k[11]))&&{"data-file-path":f}])),k[12]?T?(T.p(k,L),L&1&&b(T,1)):(T=Vu(k),T.c(),b(T,1),T.m(e,d)):T&&(de(),y(T,1,1,()=>{T=null}),me())},i(k){p||(b(s),b(T),p=!0)},o(k){y(s),y(T),p=!1},d(k){k&&E(e),~i&&g[i].d(),T&&T.d(),m=!1,h()}}}function a2(t){let e,n,r=tn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Bu(Hu(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$e()},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=tn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=Hu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Bu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},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)y(i[u]);n=!1},d(o){o&&E(e),yi(i,o)}}}function f2(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}}=st("tree");return J(t,l,d=>n(3,i=d)),J(t,a,d=>n(2,r=d)),J(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 Af extends ve{constructor(e){super(),ye(this,e,f2,a2,fe,{treeItems:0,level:1})}}function c2(t){let e,n,r,i,s;const o=t[1].default,u=pe(o,t,t[0],null);return i=new Ne({props:{path:zt,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=D("div"),n=D("p"),u&&u.c(),r=K(),H(i.$$.fragment),I(n,"class","sr-only"),I(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),M(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&_e(u,o,l,l[0],s?he(o,l[0],a,null):ge(l[0]),null)},i(l){s||(b(u,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(i.$$.fragment,l),s=!1},d(l){l&&E(e),u&&u.d(l),N(i)}}}function d2(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class m2 extends ve{constructor(e){super(),ye(this,e,d2,c2,fe,{})}}function p2(t){let e,n;return e=new m2({props:{$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function h2(t){let e,n,r;n=new Af({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("ol"),H(n.$$.fragment),le(e,s)},m(o,u){w(o,e,u),M(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),le(e,s=Me(i,[u&2&&o[1]]))},i(o){r||(b(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&E(e),N(n)}}}function _2(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 g2(t){let e,n,r,i;const s=[h2,p2],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=D("nav"),r&&r.c(),I(e,"aria-label","Files"),I(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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(r),i=!1},d(l){l&&E(e),~n&&o[n].d()}}}function Tf(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=Tf(n.content,e);if(r!==null)return r}}return null}function b2(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 y2(t,e,n){let r,i;const s=Ct(),o=Ho(),u=Be([s,o],([m,h])=>m?{queryKey:["branches",m.id,"files/"],queryFn:cn,enabled:h.isSuccess}:{queryKey:["branches","-","files/"],queryFn:cn,enabled:!1}),l=$r(u);J(t,l,m=>n(0,r=m));const a=Jb({defaultExpanded:["file-tree--1-0"]});ft("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;J(t,f,m=>n(1,i=m));const p=c.subscribe(m=>{if(c!==null&&(m==null?void 0:m.getAttribute("data-file-path"))!==null&&r.isSuccess){const h=Tf(r.data,m==null?void 0:m.getAttribute("data-file-path"));dt.set(h)}else dt.set(null)});return ds(p),cs(()=>{let m;m=l.subscribe(h=>{if(h.isSuccess){const v=kf("path");v&&qt().then(()=>{const g=document.querySelector('[data-file-path="'+v+'"]');g&&(d.set(b2(g)),c.set(g))}),m&&m()}})}),[r,i,l,f]}class v2 extends ve{constructor(e){super(),ye(this,e,y2,g2,fe,{})}}function Uu(t,e,n){const r=t.slice();return r[15]=e[n],r}function ju(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 k2(t){let e,n,r=t[0]!==null&&ju(t);return{c(){e=Z("μEditor"),r&&r.c(),n=$e()},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=ju(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 Ku(t){let e,n,r,i,s,o,u,l,a,f;e=new Lt({props:{$$slots:{default:[C2]},$$scope:{ctx:t}}}),e.$on("click",t[9]);let c=t[2].isSuccess&&t[2].data.remote.length>0&&qu(t);i=new Lt({props:{$$slots:{default:[w2]},$$scope:{ctx:t}}}),i.$on("click",t[11]),o=new bs({});let d=t[3]!==null&&Wu(t),p=t[2].isSuccess&&t[2].data.local.length>0&&Gu(t);return{c(){H(e.$$.fragment),n=K(),c&&c.c(),r=K(),H(i.$$.fragment),s=K(),H(o.$$.fragment),u=K(),d&&d.c(),l=K(),p&&p.c(),a=$e()},m(m,h){M(e,m,h),w(m,n,h),c&&c.m(m,h),w(m,r,h),M(i,m,h),w(m,s,h),M(o,m,h),w(m,u,h),d&&d.m(m,h),w(m,l,h),p&&p.m(m,h),w(m,a,h),f=!0},p(m,h){const v={};h&262144&&(v.$$scope={dirty:h,ctx:m}),e.$set(v),m[2].isSuccess&&m[2].data.remote.length>0?c?h&4&&b(c,1):(c=qu(m),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(de(),y(c,1,1,()=>{c=null}),me());const g={};h&262144&&(g.$$scope={dirty:h,ctx:m}),i.$set(g),m[3]!==null?d?(d.p(m,h),h&8&&b(d,1)):(d=Wu(m),d.c(),b(d,1),d.m(l.parentNode,l)):d&&(de(),y(d,1,1,()=>{d=null}),me()),m[2].isSuccess&&m[2].data.local.length>0?p?(p.p(m,h),h&4&&b(p,1)):(p=Gu(m),p.c(),b(p,1),p.m(a.parentNode,a)):p&&(de(),y(p,1,1,()=>{p=null}),me())},i(m){f||(b(e.$$.fragment,m),b(c),b(i.$$.fragment,m),b(o.$$.fragment,m),b(d),b(p),f=!0)},o(m){y(e.$$.fragment,m),y(c),y(i.$$.fragment,m),y(o.$$.fragment,m),y(d),y(p),f=!1},d(m){m&&(E(n),E(r),E(s),E(u),E(l),E(a)),N(e,m),c&&c.d(m),N(i,m),N(o,m),d&&d.d(m),p&&p.d(m)}}}function C2(t){let e,n,r,i;return e=new Ne({props:{path:t_,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="New Branch"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function qu(t){let e,n;return e=new Lt({props:{$$slots:{default:[E2]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function E2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Import Branch"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function w2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Synchronise Branches"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Wu(t){let e,n,r,i=t[3].update_from_default&&Qu(t),s=t[1].data.git.default_branch!==t[3].id&&zu(t);return{c(){i&&i.c(),e=K(),s&&s.c(),n=$e()},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[3].update_from_default?i?(i.p(o,u),u&8&&b(i,1)):(i=Qu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me()),o[1].data.git.default_branch!==o[3].id?s?(s.p(o,u),u&10&&b(s,1)):(s=zu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){r||(b(i),b(s),r=!0)},o(o){y(i),y(s),r=!1},d(o){o&&(E(e),E(n)),i&&i.d(o),s&&s.d(o)}}}function Qu(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[O2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new bs({}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&262146&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function O2(t){let e,n,r,i,s=as(t[1].data.git.default_branch)+"",o,u;return e=new Ne({props:{path:r_,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),i=Z("Merge Updates from "),o=Z(s)},m(l,a){M(e,l,a),w(l,n,a),w(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&2)&&s!==(s=as(l[1].data.git.default_branch)+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function zu(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[A2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new bs({}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function A2(t){let e,n,r,i,s=t[3].title+"",o,u;return e=new Ne({props:{path:n_,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){M(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].title+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(E(n),E(r)),N(e,l)}}}function Gu(t){let e,n;return e=new _p({props:{onValueChange:t[14],$$slots:{default:[D2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.onValueChange=r[14]),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function T2(t){let e,n;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function $2(t){let e,n;return e=new Ne({props:{path:V1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function S2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[$2,T2],f=[];function c(d,p){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=K(),i=D("span"),o=Z(s),u=K()},m(d,p){f[e].m(d,p),w(d,r,p),w(d,i,p),P(i,o),w(d,u,p),l=!0},p(d,p){let m=e;e=c(d),e!==m&&(de(),y(f[m],1,1,()=>{f[m]=null}),me(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||p&4)&&s!==(s=d[15].title+"")&&qe(o,s)},i(d){l||(b(n),l=!0)},o(d){y(n),l=!1},d(d){d&&(E(r),E(i),E(u)),f[e].d(d)}}}function Yu(t){let e,n;return e=new ip({props:{value:t[15].id,$$slots:{default:[S2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.value=r[15].id),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function D2(t){let e,n,r=tn(t[2].data.local),i=[];for(let o=0;o<r.length;o+=1)i[o]=Yu(Uu(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$e()},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&5){r=tn(o[2].data.local);let l;for(l=0;l<r.length;l+=1){const a=Uu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Yu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},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)y(i[u]);n=!1},d(o){o&&E(e),yi(i,o)}}}function R2(t){let e,n,r=t[1].isSuccess&&t[1].data.git.enabled&&Ku(t);return{c(){r&&r.c(),e=$e()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,s){i[1].isSuccess&&i[1].data.git.enabled?r?(r.p(i,s),s&2&&b(r,1)):(r=Ku(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function P2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[k2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[R2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262159&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function F2(t){let e,n;return e=new ks({props:{$$slots:{default:[P2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&262159&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function L2(t,e,n){let r,i,s,o;const u=Ln();J(t,u,_=>n(1,i=_));const l=Vo();J(t,l,_=>n(2,s=_));const a=Ct();J(t,a,_=>n(0,r=_));const f=kt(),c=Be([l,a],([_,C])=>{if(_.isSuccess&&C!==null){for(const A of _.data.local)if(A.id===C.id)return A}return null});return J(t,c,_=>n(3,o=_)),[r,i,s,o,u,l,a,f,c,()=>{Ge.set(Ae.UEDITOR_NEW_BRANCH)},()=>{Ge.set(Ae.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{Cf({action:"SynchroniseBranches",callback:()=>{f.invalidateQueries({queryKey:["branches"]})}})},()=>{Ge.set(Ae.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set(Ae.UEDITOR_DELETE_BRANCH)},_=>{if(s.isSuccess)for(let C of s.data.local)C.id===_&&a.set(C)}]}class I2 extends ve{constructor(e){super(),ye(this,e,L2,F2,fe,{})}}function M2(t){let e;return{c(){e=Z("File")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function N2(t){let e,n,r,i;return e=new Ne({props:{path:e_,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Rename"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function H2(t){let e,n,r,i;return e=new Ne({props:{path:s_,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Delete"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function V2(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[N2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Lt({props:{$$slots:{default:[H2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function B2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[M2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function U2(t){let e,n;return e=new ks({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function j2(t){return[()=>{Ge.set(Ae.FILE_RENAME)},()=>{Ge.set(Ae.FILE_DELETE)}]}class K2 extends ve{constructor(e){super(),ye(this,e,j2,U2,fe,{})}}function q2(t){let e;return{c(){e=Z("Folder")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function W2(t){let e,n,r,i;return e=new Ne({props:{path:J1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="New Folder"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Q2(t){let e,n,r,i;return e=new Ne({props:{path:W1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="New File"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function z2(t){let e,n,r,i;return e=new Ne({props:{path:G1,class:"w4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Upload Files"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function G2(t){let e,n,r,i;return e=new Ne({props:{path:Y1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Rename"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Y2(t){let e,n,r,i;return e=new Ne({props:{path:x1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Delete"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Z2(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Lt({props:{$$slots:{default:[W2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Lt({props:{$$slots:{default:[Q2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Lt({props:{$$slots:{default:[z2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new bs({}),a=new Lt({props:{$$slots:{default:[G2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Lt({props:{$$slots:{default:[Y2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment),i=K(),H(s.$$.fragment),o=K(),H(u.$$.fragment),l=K(),H(a.$$.fragment),f=K(),H(c.$$.fragment)},m(p,m){M(e,p,m),w(p,n,m),M(r,p,m),w(p,i,m),M(s,p,m),w(p,o,m),M(u,p,m),w(p,l,m),M(a,p,m),w(p,f,m),M(c,p,m),d=!0},p(p,m){const h={};m&256&&(h.$$scope={dirty:m,ctx:p}),e.$set(h);const v={};m&256&&(v.$$scope={dirty:m,ctx:p}),r.$set(v);const g={};m&256&&(g.$$scope={dirty:m,ctx:p}),s.$set(g);const _={};m&256&&(_.$$scope={dirty:m,ctx:p}),a.$set(_);const C={};m&256&&(C.$$scope={dirty:m,ctx:p}),c.$set(C)},i(p){d||(b(e.$$.fragment,p),b(r.$$.fragment,p),b(s.$$.fragment,p),b(u.$$.fragment,p),b(a.$$.fragment,p),b(c.$$.fragment,p),d=!0)},o(p){y(e.$$.fragment,p),y(r.$$.fragment,p),y(s.$$.fragment,p),y(u.$$.fragment,p),y(a.$$.fragment,p),y(c.$$.fragment,p),d=!1},d(p){p&&(E(n),E(i),E(o),E(l),E(f)),N(e,p),N(r,p),N(s,p),N(u,p),N(a,p),N(c,p)}}}function X2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[q2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[Z2]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Zu(t){let e,n;return e=new Ef({}),e.$on("close",t[7]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function J2(t){let e,n,r,i;e=new ks({props:{$$slots:{default:[X2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Zu(t);return{c(){H(e.$$.fragment),n=K(),s&&s.c(),r=$e()},m(o,u){M(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=Zu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(E(n),E(r)),N(e,o),s&&s.d(o)}}}function x2(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 ey extends ve{constructor(e){super(),ye(this,e,x2,J2,fe,{})}}function Xu(t){let e,n;return e=new ks({props:{$$slots:{default:[iy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&516&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ty(t){var r;let e=((r=t[2].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&4&&e!==(e=((o=i[2].data)==null?void 0:o.name)+"")&&qe(n,e)},d(i){i&&E(n)}}}function ny(t){let e,n,r,i;return e=new Ne({props:{path:j1,class:"w-4 h-4"}}),{c(){H(e.$$.fragment),n=K(),r=D("span"),r.textContent="Logout"},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function ry(t){let e,n;return e=new Lt({props:{$$slots:{default:[ny]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&512&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function iy(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[ty]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[ry]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&516&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&512&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function sy(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&t[1]==="authenticated"&&Xu(t);return{c(){r&&r.c(),e=$e()},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"&&i[1]==="authenticated"?r?(r.p(i,s),s&3&&b(r,1)):(r=Xu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&E(e),r&&r.d(i)}}}function oy(t,e,n){let r,i,s;const o=Ho();J(t,o,d=>n(2,s=d));const u=Ln();J(t,u,d=>n(0,r=d));const l=kt(),a=d_();J(t,a,d=>n(1,i=d));const f=m_();async function c(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(l.cancelQueries(),l.invalidateQueries({queryKey:["auth"]}),f.set(!0))}return[r,i,s,o,u,a,c]}class ly extends ve{constructor(e){super(),ye(this,e,oy,sy,fe,{})}}function Ju(t){let e,n,r,i;const s=[ay,uy],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=$e()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&E(r),~e&&o[e].d(l)}}}function uy(t){let e,n;return e=new ey({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function ay(t){let e,n;return e=new K2({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function fy(t){var a,f,c;let e,n,r,i,s,o,u;e=new I2({});let l=t[0]&&(!((a=t[1].data)!=null&&a.git.protect_default_branch)||((f=t[1].data)==null?void 0:f.git.default_branch)!==((c=t[2])==null?void 0:c.id))&&Ju(t);return o=new ly({}),{c(){H(e.$$.fragment),n=K(),l&&l.c(),r=K(),i=D("span"),s=K(),H(o.$$.fragment),I(i,"class","flex-1")},m(d,p){M(e,d,p),w(d,n,p),l&&l.m(d,p),w(d,r,p),w(d,i,p),w(d,s,p),M(o,d,p),u=!0},p(d,p){var m,h,v;d[0]&&(!((m=d[1].data)!=null&&m.git.protect_default_branch)||((h=d[1].data)==null?void 0:h.git.default_branch)!==((v=d[2])==null?void 0:v.id))?l?(l.p(d,p),p&7&&b(l,1)):(l=Ju(d),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(de(),y(l,1,1,()=>{l=null}),me())},i(d){u||(b(e.$$.fragment,d),b(l),b(o.$$.fragment,d),u=!0)},o(d){y(e.$$.fragment,d),y(l),y(o.$$.fragment,d),u=!1},d(d){d&&(E(n),E(r),E(i),E(s)),N(e,d),l&&l.d(d),N(o,d)}}}function cy(t){let e,n;return e=new Bh({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[fy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&39&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function dy(t,e,n){let r,i,s;J(t,dt,l=>n(0,r=l));const o=Ln();J(t,o,l=>n(1,i=l));const u=Ct();return J(t,u,l=>n(2,s=l)),[r,i,s,o,u]}class my extends ve{constructor(e){super(),ye(this,e,dy,cy,fe,{})}}function xu(t){let e,n;return e=new N1({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[3]?null:"true",$$slots:{default:[py]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,i){const s={};i&9&&(s["aria-disabled"]=r[0]!==null&&r[3]?null:"true"),i&512&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function py(t){let e,n;return e=new Ne({props:{path:U1}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function hy(t){var i,s,o;let e,n,r=(!((i=t[2].data)!=null&&i.git.protect_default_branch)||((s=t[2].data)==null?void 0:s.git.default_branch)!==((o=t[1])==null?void 0:o.id))&&xu(t);return{c(){r&&r.c(),e=$e()},m(u,l){r&&r.m(u,l),w(u,e,l),n=!0},p(u,l){var a,f,c;!((a=u[2].data)!=null&&a.git.protect_default_branch)||((f=u[2].data)==null?void 0:f.git.default_branch)!==((c=u[1])==null?void 0:c.id)?r?(r.p(u,l),l&6&&b(r,1)):(r=xu(u),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(u){n||(b(r),n=!0)},o(u){y(r),n=!1},d(u){u&&E(e),r&&r.d(u)}}}function _y(t){let e,n;return e=new D1({props:{class:"border-b border-gray-300",$$slots:{default:[hy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},p(r,[i]){const s={};i&527&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function gy(t,e,n){let r,i,s,o,u;J(t,dt,d=>n(7,r=d)),J(t,c_,d=>n(0,i=d)),J(t,pu,d=>n(3,u=d));const l=kt(),a=Ct();J(t,a,d=>n(1,s=d));const f=Ln();J(t,f,d=>n(2,o=d));function c(){r!==null&&i!==null&&Cf({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){pu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&l.invalidateQueries({queryKey:["configs"]})}})}return[i,s,o,u,a,f,c]}class by extends ve{constructor(e){super(),ye(this,e,gy,_y,fe,{})}}function yy(t){let e;return{c(){e=D("div"),I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function vy(t){let e;return{c(){e=D("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',I(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&E(e)}}}function ky(t){let e,n,r,i,s;return n=new v2({}),i=new Nb({}),{c(){e=D("div"),H(n.$$.fragment),r=K(),H(i.$$.fragment),I(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),M(n,e,null),P(e,r),M(i,e,null),s=!0},i(o){s||(b(n.$$.fragment,o),b(i.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),y(i.$$.fragment,o),s=!1},d(o){o&&E(e),N(n),N(i)}}}function ea(t){let e;return{c(){e=D("div"),e.textContent="This branch is protected and cannot be edited directly",I(e,"class","text-red-500")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ta(t){let e=t[5].fullpath+"",n;return{c(){n=Z(e)},m(r,i){w(r,n,i)},p(r,i){i&32&&e!==(e=r[5].fullpath+"")&&qe(n,e)},d(r){r&&E(n)}}}function Cy(t){var U,O,F;let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v,g,_,C,A,T,k;document.title=e=t[0],o=new my({}),l=new by({});const L=[ky,vy,yy],R=[];function W(V,B){return V[1]!==null&&V[3].isSuccess?0:V[1]===null?1:2}f=W(t),c=R[f]=L[f](t);let j=((U=t[4].data)==null?void 0:U.git.protect_default_branch)&&((O=t[4].data)==null?void 0:O.git.default_branch)===((F=t[1])==null?void 0:F.id)&&ea(),$=t[5]&&ta(t);return C=new P_({}),T=new Tb({}),{c(){n=D("link"),i=K(),s=D("main"),H(o.$$.fragment),u=K(),H(l.$$.fragment),a=K(),c.c(),d=K(),p=D("footer"),j&&j.c(),m=K(),h=D("div"),$&&$.c(),v=K(),g=D("div"),_=K(),H(C.$$.fragment),A=K(),H(T.$$.fragment),I(n,"rel","stylesheet"),I(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),I(h,"class","font-mono font-bold"),I(g,"class","flex-1"),I(p,"class","flex flex-row space-x-4 px-2 py-1 border-t border-slate-300 text-sm items-center"),I(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(V,B){P(document.head,n),w(V,i,B),w(V,s,B),M(o,s,null),P(s,u),M(l,s,null),P(s,a),R[f].m(s,null),P(s,d),P(s,p),j&&j.m(p,null),P(p,m),P(p,h),$&&$.m(h,null),P(p,v),P(p,g),P(p,_),M(C,p,null),w(V,A,B),M(T,V,B),k=!0},p(V,[B]){var te,z,oe;(!k||B&1)&&e!==(e=V[0])&&(document.title=e),(!k||B&6&&r!==(r="/api/branches/"+(V[1]!==null?V[1].id:"-")+"/configs/ui-stylesheet?timestamp="+V[2]))&&I(n,"href",r);let ee=f;f=W(V),f!==ee&&(de(),y(R[ee],1,1,()=>{R[ee]=null}),me(),c=R[f],c||(c=R[f]=L[f](V),c.c()),b(c,1),c.m(s,d)),(te=V[4].data)!=null&&te.git.protect_default_branch&&((z=V[4].data)==null?void 0:z.git.default_branch)===((oe=V[1])==null?void 0:oe.id)?j||(j=ea(),j.c(),j.m(p,m)):j&&(j.d(1),j=null),V[5]?$?$.p(V,B):($=ta(V),$.c(),$.m(h,null)):$&&($.d(1),$=null)},i(V){k||(b(o.$$.fragment,V),b(l.$$.fragment,V),b(c),b(C.$$.fragment,V),b(T.$$.fragment,V),k=!0)},o(V){y(o.$$.fragment,V),y(l.$$.fragment,V),y(c),y(C.$$.fragment,V),y(T.$$.fragment,V),k=!1},d(V){V&&(E(i),E(s),E(A)),E(n),N(o),N(l),R[f].d(),j&&j.d(),$&&$.d(),N(C),N(T,V)}}}function Ey(t,e,n){let r,i,s,o,u,l;J(t,dt,h=>n(5,l=h));const a=st("uEditionConfig"),f=st("uEditorConfig");J(t,f,h=>n(3,o=h));const c=st("currentBranch");J(t,c,h=>n(1,i=h));const d=Ln();J(t,d,h=>n(4,u=h));const p=Be(a,h=>h.isSuccess&&h.data.languages&&h.data.languages.length>0&&h.data.languages[0].code&&h.data.title&&h.data.title[h.data.languages[0].code]?"μEditor - "+h.data.title[h.data.languages[0].code]:"μEditor");J(t,p,h=>n(0,r=h));const m=Be(a,h=>new Date().getTime());return J(t,m,h=>n(2,s=h)),[r,i,s,o,u,l,f,c,d,p,m]}class wy extends ve{constructor(e){super(),ye(this,e,Ey,Cy,fe,{})}}function Es(t,{delay:e=0,duration:n=400,easing:r=fs}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}function na(t){let e;const n=t[2].default,r=pe(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)&&_e(r,n,i,i[3],e?he(n,i[3],s,null):ge(i[3]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function Oy(t){let e;return{c(){e=Z("μEditor not ready")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ay(t){let e,n,r,i;return e=new Ot({props:{$$slots:{default:[Oy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
18
- logs to determine what the issue is.</p>`,I(r,"data-dialog-content-area","")},m(s,o){M(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){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Ty(t){let e,n,r,i;return e=new Br({props:{transition:Es}}),r=new Vr({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden",$$slots:{default:[Ay]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function $y(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[Ty]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Sy(t){let e,n,r,i=t[0].isSuccess&&na(t);return n=new mr({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[$y]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=K(),H(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),M(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=na(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me());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){y(i),y(n.$$.fragment,s),r=!1},d(s){s&&E(e),i&&i.d(s),N(n,s)}}}function Dy(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=$r({queryKey:[""],queryFn:cn,refetchInterval:6e4});return J(t,o,u=>n(0,r=u)),ft("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class Ry extends ve{constructor(e){super(),ye(this,e,Dy,Sy,fe,{})}}function Py(t){let e;return{c(){e=Z("Authenticating")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Fy(t){let e,n,r,i;return e=new Ot({props:{$$slots:{default:[Py]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",I(r,"data-dialog-content-area","")},m(s,o){M(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(E(n),E(r)),N(e,s)}}}function Ly(t){let e,n,r,i;return e=new Br({props:{transition:Es,class:"z-40"}}),r=new Vr({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[Fy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Iy(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[Ly]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function My(t){let e;return{c(){e=Z("Login")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Ny(t){let e;return{c(){e=D("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>',I(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:ce,d(n){n&&E(e)}}}function Hy(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v,g=t[5].isError&&ra(),_=t[5].isError&&ia();function C(k,L){return k[5].isPending?By:Vy}let A=C(t),T=A(t);return{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="E-Mail",i=K(),s=D("input"),o=K(),g&&g.c(),u=K(),l=D("label"),a=D("span"),a.textContent="Password",f=K(),c=D("input"),d=K(),_&&_.c(),p=K(),m=D("div"),T.c(),I(r,"data-form-field-label",""),I(s,"type","text"),I(s,"data-form-field-text",""),I(a,"data-form-field-label",""),I(c,"type","password"),I(c,"data-form-field-text",""),I(m,"data-dialog-buttons",""),I(e,"data-dialog-content-area","")},m(k,L){w(k,e,L),P(e,n),P(n,r),P(n,i),P(n,s),it(s,t[0]),P(n,o),g&&g.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),_&&_.m(l,null),P(e,p),P(e,m),T.m(m,null),h||(v=[G(s,"input",t[11]),G(c,"input",t[12]),G(e,"submit",t[13])],h=!0)},p(k,L){L&1&&s.value!==k[0]&&it(s,k[0]),k[5].isError?g||(g=ra(),g.c(),g.m(n,null)):g&&(g.d(1),g=null),L&2&&c.value!==k[1]&&it(c,k[1]),k[5].isError?_||(_=ia(),_.c(),_.m(l,null)):_&&(_.d(1),_=null),A!==(A=C(k))&&(T.d(1),T=A(k),T&&(T.c(),T.m(m,null)))},d(k){k&&E(e),g&&g.d(),_&&_.d(),T.d(),h=!1,Te(v)}}}function ra(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function ia(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",I(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Vy(t){let e;return{c(){e=D("button"),e.textContent="Login",I(e,"type","submit"),I(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function By(t){let e;return{c(){e=D("span"),e.textContent="Logging in...",I(e,"data-button",""),I(e,"class","inline-flex")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Uy(t){let e,n,r,i;e=new Ot({props:{$$slots:{default:[My]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[4].data)==null?void 0:f.auth.provider)==="email-password")return Hy;if(((c=l[4].data)==null?void 0:c.auth.provider)==="github")return Ny}let o=s(t),u=o&&o(t);return{c(){H(e.$$.fragment),n=K(),u&&u.c(),r=$e()},m(l,a){M(e,l,a),w(l,n,a),u&&u.m(l,a),w(l,r,a),i=!0},p(l,a){const f={};a&32768&&(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){y(e.$$.fragment,l),i=!1},d(l){l&&(E(n),E(r)),N(e,l),u&&u.d(l)}}}function jy(t){let e,n,r,i;return e=new Br({props:{transition:Es,class:"z-40"}}),r=new Vr({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[Uy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32819&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Ky(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[jy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32819&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function qy(t){let e;return{c(){e=Z("Logged out")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Wy(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&E(e)}}}function Qy(t){let e,n,r,i,s,o,u,l;return e=new Ot({props:{$$slots:{default:[qy]},$$scope:{ctx:t}}}),u=new Rt({props:{"data-button":!0,$$slots:{default:[Wy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),r=D("div"),i=D("p"),i.textContent="You have logged out. You can now close the browser tab or window.",s=K(),o=D("div"),H(u.$$.fragment),I(i,"class","mb-4"),I(o,"data-dialog-buttons",""),I(r,"data-dialog-content-area","")},m(a,f){M(e,a,f),w(a,n,f),w(a,r,f),P(r,i),P(r,s),P(r,o),M(u,o,null),l=!0},p(a,f){const c={};f&32768&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&32768&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(E(n),E(r)),N(e,a),N(u)}}}function zy(t){let e,n,r,i;return e=new Br({props:{transition:Es,class:"z-40"}}),r=new Vr({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[Qy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Gy(t){let e,n,r,i;return e=new Ur({props:{class:"hidden"}}),r=new Hr({props:{$$slots:{default:[zy]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment),n=K(),H(r.$$.fragment)},m(s,o){M(e,s,o),w(s,n,o),M(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&E(n),N(e,s),N(r,s)}}}function Yy(t){let e,n,r,i,s,o,u;const l=t[10].default,a=pe(l,t,t[15],null);return n=new mr({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Iy]},$$scope:{ctx:t}}}),i=new mr({props:{open:!t[3]&&t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Ky]},$$scope:{ctx:t}}}),o=new mr({props:{open:t[3],onOpenChange:t[14],$$slots:{default:[Gy]},$$scope:{ctx:t}}}),{c(){a&&a.c(),e=K(),H(n.$$.fragment),r=K(),H(i.$$.fragment),s=K(),H(o.$$.fragment)},m(f,c){a&&a.m(f,c),w(f,e,c),M(n,f,c),w(f,r,c),M(i,f,c),w(f,s,c),M(o,f,c),u=!0},p(f,[c]){a&&a.p&&(!u||c&32768)&&_e(a,l,f,f[15],u?he(l,f[15],c,null):ge(f[15]),null);const d={};c&4&&(d.open=f[2]==="pending"),c&32768&&(d.$$scope={dirty:c,ctx:f}),n.$set(d);const p={};c&12&&(p.open=!f[3]&&f[2]==="error"),c&32819&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const m={};c&8&&(m.open=f[3]),c&32768&&(m.$$scope={dirty:c,ctx:f}),o.$set(m)},i(f){u||(b(a,f),b(n.$$.fragment,f),b(i.$$.fragment,f),b(o.$$.fragment,f),u=!0)},o(f){y(a,f),y(n.$$.fragment,f),y(i.$$.fragment,f),y(o.$$.fragment,f),u=!1},d(f){f&&(E(e),E(r),E(s)),a&&a.d(f),N(n,f),N(i,f),N(o,f)}}}function Zy(t,e,n){let r,i,s,o,{$$slots:u={},$$scope:l}=e;const a=kt(),f=Ln();J(t,f,T=>n(4,s=T));const c=$r({queryKey:["auth","user"],queryFn:cn,retry:!1,refetchInterval:2e4});ft("currentUser",c);const d=Be([f,c],([T,k])=>T.isSuccess?k.isSuccess?"authenticated":k.isError?T.data.auth.provider==="no-auth"||T.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(L=>{L.ok&&a.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":k.status:T.status);J(t,d,T=>n(2,r=T)),ft("authStatus",d);let p="",m="";const h=ki({mutationFn:async([T,k])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:T,password:k})})).ok)a.invalidateQueries({queryKey:["auth"]}),a.invalidateQueries({queryKey:["branches"]}),n(0,p=""),n(1,m="");else throw"Authentication failed"}});J(t,h,T=>n(5,o=T));const v=Pe(!1);J(t,v,T=>n(3,i=T)),ft("hasLoggedOut",v);function g(){p=this.value,n(0,p)}function _(){m=this.value,n(1,m)}const C=T=>{T.preventDefault(),o.isPending||o.mutate([p,m])},A=T=>{T||v.set(!1)};return t.$$set=T=>{"$$scope"in T&&n(15,l=T.$$scope)},[p,m,r,i,s,o,f,d,h,v,u,g,_,C,A,l]}class Xy extends ve{constructor(e){super(),ye(this,e,Zy,Yy,fe,{})}}function Jy(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function xy(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=kf("branch"),o=Ln(),u=Ho(),l=Be([o,u],([m,h])=>({queryKey:["branches"],queryFn:cn,refetchInterval:6e4,enabled:m.isSuccess&&m.data.ready&&h.isSuccess})),a=$r(l);ft("branches",a);const f=Pe(null);ft("currentBranch",f);const c=o.subscribe(m=>{m.isSuccess&&m.data.ready&&!m.data.git.enabled&&f.set({id:"-",nogit:!0,title:"All files"})}),d=f.subscribe(m=>{m!==null?vf("branch",m.id):f_("branch")}),p=a.subscribe(m=>{if(m.isSuccess){for(let h of m.data.local)h.id===s&&f.set(h);p()}});return ds(()=>{d(),c()}),t.$$set=m=>{"$$scope"in m&&n(0,i=m.$$scope)},[i,r]}class e0 extends ve{constructor(e){super(),ye(this,e,xy,Jy,fe,{})}}var ni={},Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.cloneArrayBuffer=void 0;function t0(t){var e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}Jn.cloneArrayBuffer=t0;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.cloneDataView=void 0;var n0=Jn;function r0(t){var e=(0,n0.cloneArrayBuffer)(t.buffer);return new DataView(e,t.byteOffset,t.byteLength)}Ti.cloneDataView=r0;var $i={};Object.defineProperty($i,"__esModule",{value:!0});$i.cloneDate=void 0;function i0(t){return new Date(t.getTime())}$i.cloneDate=i0;var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.cloneRegExp=void 0;function s0(t){var e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}Si.cloneRegExp=s0;var Di={};Object.defineProperty(Di,"__esModule",{value:!0});Di.cloneTypedArray=void 0;var o0=Jn,js={"[object Float32Array]":Float32Array,"[object Float64Array]":Float64Array,"[object Int8Array]":Int8Array,"[object Int16Array]":Int16Array,"[object Int32Array]":Int32Array,"[object Uint8Array]":Uint8Array,"[object Uint16Array]":Uint16Array,"[object Uint32Array]":Uint32Array,"[object Uint8ClampedArray]":Uint8ClampedArray};function l0(t){try{js["[object BigInt64Array]"]=BigInt64Array,js["[object BigUint64Array]"]=BigUint64Array}catch{}var e=(0,o0.cloneArrayBuffer)(t.buffer);return new js[Object.prototype.toString.call(t)](e,t.byteOffset,t.length)}Di.cloneTypedArray=l0;var Jr={},xr={},sa;function u0(){if(sa)return xr;sa=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.cloneMap=void 0;var t=$f();function e(n){var r=new Map;return n.forEach(function(i,s){return r.set((0,t.deepCopy)(s),(0,t.deepCopy)(i))}),r}return xr.cloneMap=e,xr}var oa;function $f(){if(oa)return Jr;oa=1;var t=go&&go.__assign||function(){return t=Object.assign||function(a){for(var f,c=1,d=arguments.length;c<d;c++){f=arguments[c];for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(a[p]=f[p])}return a},t.apply(this,arguments)};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.deepCopy=void 0;var e=Jn,n=Ti,r=$i,i=u0(),s=Si,o=Di,u={"[object Date]":r.cloneDate,"[object ArrayBuffer]":e.cloneArrayBuffer,"[object DataView]":n.cloneDataView,"[object Float32Array]":o.cloneTypedArray,"[object Float64Array]":o.cloneTypedArray,"[object Int8Array]":o.cloneTypedArray,"[object Int16Array]":o.cloneTypedArray,"[object Int32Array]":o.cloneTypedArray,"[object Uint8Array]":o.cloneTypedArray,"[object Uint8ClampedArray]":o.cloneTypedArray,"[object Uint16Array]":o.cloneTypedArray,"[object Uint32Array]":o.cloneTypedArray,"[object BigInt64Array]":o.cloneTypedArray,"[object BigUint64Array]":o.cloneTypedArray,"[object RegExp]":s.cloneRegExp,"[object Map]":i.cloneMap};function l(a){var f=Object.prototype.toString.call(a);if(u[f])return u[f](a);if(a===null)return a;if(a instanceof Array){var c=[];return a.forEach(function(p){c.push(p)}),c.map(function(p){return l(p)})}if(typeof a=="object"){var d=t({},a);return Object.keys(d).forEach(function(p){d[p]=l(d[p])}),d}return a}return Jr.deepCopy=l,Jr}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.deepCopy=t.cloneTypedArray=t.cloneRegExp=t.cloneDate=t.cloneDataView=t.cloneArrayBuffer=void 0;var e=Jn;Object.defineProperty(t,"cloneArrayBuffer",{enumerable:!0,get:function(){return e.cloneArrayBuffer}});var n=Ti;Object.defineProperty(t,"cloneDataView",{enumerable:!0,get:function(){return n.cloneDataView}});var r=$i;Object.defineProperty(t,"cloneDate",{enumerable:!0,get:function(){return r.cloneDate}});var i=Si;Object.defineProperty(t,"cloneRegExp",{enumerable:!0,get:function(){return i.cloneRegExp}});var s=Di;Object.defineProperty(t,"cloneTypedArray",{enumerable:!0,get:function(){return s.cloneTypedArray}});var o=$f();Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return o.deepCopy}})})(ni);function a0(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function f0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=Ct(),o=Be(s,d=>d!==null?{queryKey:["branches",d.id,"configs","uedition"],queryFn:cn}:{queryKey:["branches","-","configs","uedition"],queryFn:cn,enabled:d!==null}),u=$r(o);ft("uEditionConfig",u);const l=Be(s,d=>d!==null?{queryKey:["branches",d.id,"configs","ueditor"],queryFn:cn}:{queryKey:["branches","-","configs","ueditor"],queryFn:cn,enabled:!1}),a=$r(l);ft("uEditorConfig",a);const f=Be([u,a],([d,p])=>{if(d.isSuccess&&p.isSuccess){let m=ni.deepCopy(p.data.tei.blocks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.blocks&&(m=m.concat(ni.deepCopy(d.data.sphinx_config.tei.blocks))),m}return[]});ft("configuredTEIBlocks",f);const c=Be([u,a],([d,p])=>{if(d.isSuccess&&p.isSuccess){let m=ni.deepCopy(p.data.tei.marks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.marks&&(m=m.concat(ni.deepCopy(d.data.sphinx_config.tei.marks))),m}return[]});return ft("configuredTEIMarks",c),t.$$set=d=>{"$$scope"in d&&n(0,i=d.$$scope)},[i,r]}class c0 extends ve{constructor(e){super(),ye(this,e,f0,a0,fe,{})}}function d0(t){let e,n;return e=new wy({}),{c(){H(e.$$.fragment)},m(r,i){M(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function m0(t){let e,n;return e=new c0({props:{$$slots:{default:[d0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function p0(t){let e,n;return e=new e0({props:{$$slots:{default:[m0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function h0(t){let e,n;return e=new Xy({props:{$$slots:{default:[p0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function _0(t){let e,n;return e=new Ry({props:{$$slots:{default:[h0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function g0(t){let e,n;return e=new Cc({props:{client:t[0],$$slots:{default:[_0]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(r,i){M(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){y(e.$$.fragment,r),n=!1},d(r){N(e,r)}}}function b0(t){return[new Ia]}class y0 extends ve{constructor(e){super(),ye(this,e,b0,g0,fe,{})}}new y0({target:document.getElementById("app")});export{cr as $,H as A,M as B,G as C,Ae as D,N as E,Te as F,Y1 as G,x1 as H,Ne as I,$e as J,Wf as K,c_ as L,kt as M,Cf as N,pu as O,Bt as P,Vt as Q,m2 as R,ve as S,x as T,$0 as U,Ci as V,D0 as W,Fe as X,ke as Y,Xe as Z,Pe as _,K as a,Tn as a$,Be as a0,It as a1,Fr as a2,Xn as a3,ai as a4,Wc as a5,es as a6,fr as a7,Oc as a8,F0 as a9,S0 as aA,ze as aB,T0 as aC,bt as aD,P0 as aE,L0 as aF,pi as aG,wi as aH,ft as aI,Oi as aJ,st as aK,hf as aL,pe as aM,_e as aN,ge as aO,he as aP,Ke as aQ,Fn as aR,ie as aS,vt as aT,Oe as aU,le as aV,Ue as aW,Me as aX,Pn as aY,ct as aZ,Rn as a_,ii as aa,rt as ab,ae as ac,R0 as ad,qt as ae,Ec as af,oo as ag,on as ah,E0 as ai,w0 as aj,A0 as ak,O0 as al,di as am,Ft as an,xe as ao,us as ap,Sr as aq,Rr as ar,Dc as as,I0 as at,tl as au,ui as av,ht as aw,so as ax,gn as ay,$o as az,I as b,Nm as b0,tn as b1,yi as b2,H0 as b3,N0 as b4,Jb as b5,D1 as b6,N1 as b7,B0 as b8,V0 as b9,U0 as ba,M0 as bb,q0 as bc,W0 as bd,j0 as be,Wo as bf,it as bg,e_ as bh,mr as bi,K0 as bj,Ur as bk,Hr as bl,Br as bm,Vr as bn,Ot as bo,Rt as bp,k0 as bq,w as c,P as d,D as e,qe as f,de as g,y as h,ye as i,me as j,b as k,E as l,J as m,dt as n,Ct as o,cs as p,ds as q,Ge as r,fe as s,Z as t,Ln as u,Ce as v,ce as w,J1 as x,W1 as y,G1 as z};
17
+ the name of the folder to delete.`),f=K(),c=D("label"),d=D("span"),d.textContent="Confirmation Folder Name",p=K(),m=D("input"),h=K(),R&&R.c(),v=K(),g=D("div"),N(_.$$.fragment),E=K(),A=D("button"),A.textContent="Delete",H(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),H(i,"class","mb-4"),H(d,"data-form-field-label",""),H(m,"type","text"),H(m,"data-form-field-text",""),H(c,"class","block"),H(A,"type","submit"),H(A,"data-button",""),H(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),H(g,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(j,T){I(e,j,T),w(j,n,T),w(j,r,T),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,p),P(c,m),it(m,t[2]),P(c,h),R&&R.m(c,null),P(r,v),P(r,g),I(_,g,null),P(g,E),P(g,A),$=!0,k||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],k=!0)},p(j,T){var F;const U={};T&2056&&(U.$$scope={dirty:T,ctx:j}),e.$set(U),(!$||T&8)&&u!==(u=((F=j[3])==null?void 0:F.fullpath)+"")&&qe(l,u),T&4&&m.value!==j[2]&&it(m,j[2]),j[1]?R?R.p(j,T):(R=Au(j),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};T&2048&&(O.$$scope={dirty:T,ctx:j}),_.$set(O)},i(j){$||(b(e.$$.fragment,j),b(_.$$.fragment,j),$=!0)},o(j){y(e.$$.fragment,j),y(_.$$.fragment,j),$=!1},d(j){j&&(C(n),C(r)),M(e,j),R&&R.d(),M(_),k=!1,Te(L)}}}function $g(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Ag]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Tg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.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/"]}),dt.set(null),n(0,u=!1),Ge.set($e.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(m){m?(n(2,a=""),n(1,l="")):Ge.set($e.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let Of=class extends ve{constructor(e){super(),ye(this,e,Tg,$g,fe,{})}};function Sg(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&&(C(e),C(r),C(i))}}}function $u(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function Dg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Rg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ct({props:{$$slots:{default:[Sg]},$$scope:{ctx:t}}});let g=t[2]&&$u(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[Dg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Folder Name",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),N(c.$$.fragment),d=K(),p=D("button"),p.textContent="Rename",H(s,"data-form-field-label",""),H(u,"type","text"),H(u,"data-form-field-text",""),H(p,"type","submit"),H(p,"data-button",""),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(_,E){I(e,_,E),w(_,n,E),w(_,r,E),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),I(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,E){const A={};E&2056&&(A.$$scope={dirty:E,ctx:_}),e.$set(A),E&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,E):(g=$u(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};E&2048&&($.$$scope={dirty:E,ctx:_}),c.$set($)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(C(n),C(r)),M(e,_),g&&g.d(),M(c),h=!1,Te(v)}}}function Pg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Rg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Fg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"folder","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),dt.set(null),Ge.set($e.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set($e.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}let Lg=class extends ve{constructor(e){super(),ye(this,e,Fg,Pg,fe,{})}};function Ig(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&&(C(e),C(r),C(i))}}}function Tu(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function Mg(t){let e;return{c(){e=Z("Don't create")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Ng(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ct({props:{$$slots:{default:[Ig]},$$scope:{ctx:t}}});let g=t[2]&&Tu(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[Mg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),N(c.$$.fragment),d=K(),p=D("button"),p.textContent="Create",H(s,"data-form-field-label",""),H(u,"type","text"),H(u,"data-form-field-text",""),H(p,"type","submit"),H(p,"data-button",""),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(_,E){I(e,_,E),w(_,n,E),w(_,r,E),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),I(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,E){const A={};E&2056&&(A.$$scope={dirty:E,ctx:_}),e.$set(A),E&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,E):(g=Tu(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};E&2048&&($.$$scope={dirty:E,ctx:_}),c.$set($)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(C(n),C(r)),M(e,_),g&&g.d(),M(c),h=!1,Te(v)}}}function Hg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Ng]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Vg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a filename");else{const h=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"}});h.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),Ge.set($e.NONE)):(n(2,a=(await h.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set($e.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Bg extends ve{constructor(e){super(),ye(this,e,Vg,Hg,fe,{})}}function Ug(t){var s;let e,n,r=((s=t[3])==null?void 0:s.fullpath)+"",i;return{c(){e=Z("Delete "),n=D("span"),i=Z(r),H(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&&(C(e),C(n))}}}function Su(t){let e,n;return{c(){e=D("span"),n=Z(t[1]),H(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&&C(e)}}}function jg(t){let e;return{c(){e=Z("Don't delete")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Kg(t){var W;let e,n,r,i,s,o,u=((W=t[3])==null?void 0:W.fullpath)+"",l,a,f,c,d,p,m,h,v,g,_,E,A,$,k,L;e=new Ct({props:{class:"bg-rose-700",$$slots:{default:[Ug]},$$scope:{ctx:t}}});let R=t[1]&&Su(t);return _=new Rt({props:{"data-button":!0,$$slots:{default:[jg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("p"),s=Z("Please confirm you wish to delete the file "),o=D("span"),l=Z(u),a=Z(". To confirm the action, please enter the name of the file to delete."),f=K(),c=D("label"),d=D("span"),d.textContent="Confirm filename",p=K(),m=D("input"),h=K(),R&&R.c(),v=K(),g=D("div"),N(_.$$.fragment),E=K(),A=D("button"),A.textContent="Delete",H(o,"class","inline-block mx-1 px-2 border border-fuchsia-700 rounded font-bold"),H(i,"class","mb-4"),H(d,"data-form-field-label",""),H(m,"type","text"),H(m,"data-form-field-text",""),H(c,"class","block"),H(A,"type","submit"),H(A,"data-button",""),H(A,"class","border-rose-700 hover:bg-rose-700 focus:bg-rose-700"),H(g,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(j,T){I(e,j,T),w(j,n,T),w(j,r,T),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,p),P(c,m),it(m,t[2]),P(c,h),R&&R.m(c,null),P(r,v),P(r,g),I(_,g,null),P(g,E),P(g,A),$=!0,k||(L=[G(m,"input",t[7]),G(r,"submit",t[5])],k=!0)},p(j,T){var F;const U={};T&2056&&(U.$$scope={dirty:T,ctx:j}),e.$set(U),(!$||T&8)&&u!==(u=((F=j[3])==null?void 0:F.fullpath)+"")&&qe(l,u),T&4&&m.value!==j[2]&&it(m,j[2]),j[1]?R?R.p(j,T):(R=Su(j),R.c(),R.m(c,null)):R&&(R.d(1),R=null);const O={};T&2048&&(O.$$scope={dirty:T,ctx:j}),_.$set(O)},i(j){$||(b(e.$$.fragment,j),b(_.$$.fragment,j),$=!0)},o(j){y(e.$$.fragment,j),y(_.$$.fragment,j),$=!1},d(j){j&&(C(n),C(r)),M(e,j),R&&R.d(),M(_),k=!1,Te(L)}}}function qg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Kg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Wg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){m.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/"]}),dt.set(null),n(0,u=!1),Ge.set($e.NONE)):n(1,l="Please check that you have typed in the correct name.")}function c(m){m?(n(2,a=""),n(1,l="")):Ge.set($e.NONE)}function d(){a=this.value,n(2,a)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Qg extends ve{constructor(e){super(),ye(this,e,Wg,qg,fe,{})}}function zg(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&&(C(e),C(r),C(i))}}}function Du(t){let e,n;return{c(){e=D("span"),n=Z(t[2]),H(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&&C(e)}}}function Gg(t){let e;return{c(){e=Z("Don't rename")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Yg(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v;e=new Ct({props:{$$slots:{default:[zg]},$$scope:{ctx:t}}});let g=t[2]&&Du(t);return c=new Rt({props:{"data-button":!0,$$slots:{default:[Gg]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("form"),i=D("label"),s=D("span"),s.textContent="New Filename",o=K(),u=D("input"),l=K(),g&&g.c(),a=K(),f=D("div"),N(c.$$.fragment),d=K(),p=D("button"),p.textContent="Rename",H(s,"data-form-field-label",""),H(u,"type","text"),H(u,"data-form-field-text",""),H(p,"type","submit"),H(p,"data-button",""),H(f,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(_,E){I(e,_,E),w(_,n,E),w(_,r,E),P(r,i),P(i,s),P(i,o),P(i,u),it(u,t[1]),P(i,l),g&&g.m(i,null),P(r,a),P(r,f),I(c,f,null),P(f,d),P(f,p),m=!0,h||(v=[G(u,"input",t[7]),G(r,"submit",t[5])],h=!0)},p(_,E){const A={};E&2056&&(A.$$scope={dirty:E,ctx:_}),e.$set(A),E&2&&u.value!==_[1]&&it(u,_[1]),_[2]?g?g.p(_,E):(g=Du(_),g.c(),g.m(i,null)):g&&(g.d(1),g=null);const $={};E&2048&&($.$$scope={dirty:E,ctx:_}),c.$set($)},i(_){m||(b(e.$$.fragment,_),b(c.$$.fragment,_),m=!0)},o(_){y(e.$$.fragment,_),y(c.$$.fragment,_),m=!1},d(_){_&&(C(n),C(r)),M(e,_),g&&g.d(),M(c),h=!1,Te(v)}}}function Zg(t){let e,n,r;function i(o){t[8](o)}let s={onOpenChange:t[6],$$slots:{default:[Yg]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.open=t[0]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function Xg(t,e,n){let r,i;J(t,dt,m=>n(3,i=m));const s=kt(),o=Et();J(t,o,m=>n(9,r=m));let u=!1,l="",a="";async function f(m){if(m.preventDefault(),l.trim()==="")n(2,a="Please enter a folder name");else if(i!=null&&i.fullpath){const h=i.fullpath.split("/").slice(0,i.fullpath.split("/").length-1).join("/"),v=await fetch("/api/branches/"+(r==null?void 0:r.id)+"/files/"+h+"/"+l.trim(),{method:"POST",headers:{"X-uEditor-New-Type":"file","X-uEditor-Rename-From":i==null?void 0:i.fullpath}});v.ok?(n(0,u=!1),s.invalidateQueries({queryKey:["branches",r==null?void 0:r.id,"files/"]}),dt.set(null),Ge.set($e.NONE)):(n(2,a=(await v.json()).detail[0].msg),n(2,a=a[0].toUpperCase()+a.substring(1)))}else n(2,a="Cannot rename the root folder")}function c(m){m?(n(1,l=""),n(2,a="")):Ge.set($e.NONE)}function d(){l=this.value,n(1,l)}function p(m){u=m,n(0,u)}return[u,l,a,i,o,f,c,d,p]}class Jg extends ve{constructor(e){super(),ye(this,e,Xg,Zg,fe,{})}}function Ru(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function xg(t){let e;return{c(){e=Z("Upload")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function eb(t){let e;return{c(){e=Z("Uploading")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function tb(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?eb:xg}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,p;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?(p=f[6])==null?void 0:p.fullpath:"/")+"")&&qe(r,n)},d(f){f&&(C(e),C(r),C(i)),u.d(f)}}}function nb(t){let e,n,r,i,s,o,u=tn(t[4]),l=[];for(let f=0;f<u.length;f+=1)l[f]=Pu(Ru(t,u,f));const a=f=>y(l[f],1,1,()=>{l[f]=null});return s=new Rt({props:{"data-button":!0,$$slots:{default:[fb]},$$scope:{ctx:t}}}),{c(){e=D("div"),n=D("ul");for(let f=0;f<l.length;f+=1)l[f].c();r=K(),i=D("div"),N(s.$$.fragment),H(i,"data-dialog-buttons",""),H(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),I(s,i,null),o=!0},p(f,c){if(c&144){u=tn(f[4]);let p;for(p=0;p<u.length;p+=1){const m=Ru(f,u,p);l[p]?(l[p].p(m,c),b(l[p],1)):(l[p]=Pu(m),l[p].c(),b(l[p],1),l[p].m(n,null))}for(de(),p=u.length;p<l.length;p+=1)a(p);me()}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)y(l[c]);y(s.$$.fragment,f),o=!1},d(f){f&&C(e),yi(l,f),M(s)}}}function rb(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m;return a=new Rt({props:{"data-button":!0,$$slots:{default:[cb]},$$scope:{ctx:t}}}),{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="Drop a file to upload or click to select a file to upload.",i=K(),s=D("input"),u=K(),l=D("div"),N(a.$$.fragment),f=K(),c=D("button"),c.textContent="Upload",H(s,"type","file"),H(s,"class","sr-only"),H(n,"class",o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(t[2]?"border-solid":"border-dashed")+" rounded"),H(c,"type","submit"),H(c,"data-button",""),H(c,"class","sr-only"),H(l,"data-dialog-buttons",""),H(e,"data-dialog-content-area","")},m(h,v){w(h,e,v),P(e,n),P(n,r),P(n,i),P(n,s),t[12](s),P(e,u),P(e,l),I(a,l,null),P(l,f),P(l,c),t[16](c),d=!0,p||(m=[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])],p=!0)},p(h,v){(!d||v&4&&o!==(o="flex justify-center items-center h-20 border-fuchsia-700 border-2 "+(h[2]?"border-solid":"border-dashed")+" rounded"))&&H(n,"class",o);const g={};v&33554432&&(g.$$scope={dirty:v,ctx:h}),a.$set(g)},i(h){d||(b(a.$$.fragment,h),d=!0)},o(h){y(a.$$.fragment,h),d=!1},d(h){h&&C(e),t[12](null),M(a),t[16](null),p=!1,Te(m)}}}function ib(t){let e,n,r,i;return r=new Ne({props:{path:j_,class:"w-6 h-6 text-rose-700"}}),{c(){e=D("span"),e.textContent="failed to upload",n=K(),N(r.$$.fragment),H(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),I(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(C(e),C(n)),M(r,s)}}}function sb(t){let e,n,r,i;return r=new Ne({props:{path:B_,class:"w-6 h-6 text-lime-500"}}),{c(){e=D("span"),e.textContent="successfully uploaded",n=K(),N(r.$$.fragment),H(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),I(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(C(e),C(n)),M(r,s)}}}function ob(t){let e,n,r,i;return r=new Ne({props:{path:zt,class:"w-6 h-6 animate-spin text-fuchsia-700"}}),{c(){e=D("span"),e.textContent="uploading",n=K(),N(r.$$.fragment),H(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),I(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(C(e),C(n)),M(r,s)}}}function lb(t){let e,n,r,i;return r=new Ne({props:{path:o1}}),{c(){e=D("span"),e.textContent="waiting to upload",n=K(),N(r.$$.fragment),H(e,"class","sr-only")},m(s,o){w(s,e,o),w(s,n,o),I(r,s,o),i=!0},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){y(r.$$.fragment,s),i=!1},d(s){s&&(C(e),C(n)),M(r,s)}}}function Pu(t){let e,n,r=t[21].name+"",i,s,o,u,l,a;const f=[lb,ob,sb,ib],c=[];function d(p,m){return p[22]===p[7].READY?0:p[22]==p[7].ACTIVE?1:p[22]===p[7].SUCCESS?2:p[22]===p[7].FAILED?3:-1}return~(o=d(t))&&(u=c[o]=f[o](t)),{c(){e=D("li"),n=D("span"),i=Z(r),s=K(),u&&u.c(),l=K(),H(n,"class","flex-1"),H(e,"class","flex flex-row space-x-4")},m(p,m){w(p,e,m),P(e,n),P(n,i),P(e,s),~o&&c[o].m(e,null),P(e,l),a=!0},p(p,m){(!a||m&16)&&r!==(r=p[21].name+"")&&qe(i,r);let h=o;o=d(p),o!==h&&(u&&(de(),y(c[h],1,1,()=>{c[h]=null}),me()),~o?(u=c[o],u||(u=c[o]=f[o](p),u.c()),b(u,1),u.m(e,l)):u=null)},i(p){a||(b(u),a=!0)},o(p){y(u),a=!1},d(p){p&&C(e),~o&&c[o].d()}}}function ub(t){let e;return{c(){e=Z("Cancel upload")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function ab(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function fb(t){let e;function n(s,o){return s[5]?ab:ub}let r=n(t),i=r(t);return{c(){i.c(),e=Ae()},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&&C(e),i.d(s)}}}function cb(t){let e;return{c(){e=Z("Don't upload")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function db(t){let e,n,r,i,s,o;e=new Ct({props:{$$slots:{default:[tb]},$$scope:{ctx:t}}});const u=[rb,nb],l=[];function a(f,c){return f[4].length===0?0:1}return r=a(t),i=l[r]=u[r](t),{c(){N(e.$$.fragment),n=K(),i.c(),s=Ae()},m(f,c){I(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 p=r;r=a(f),r===p?l[r].p(f,c):(de(),y(l[p],1,1,()=>{l[p]=null}),me(),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){y(e.$$.fragment,f),y(i),o=!1},d(f){f&&(C(n),C(s)),M(e,f),l[r].d(f)}}}function mb(t){let e,n,r;function i(o){t[17](o)}let s={onOpenChange:t[9],$$slots:{default:[db]},$$scope:{ctx:t}};return t[3]!==void 0&&(s.open=t[3]),e=new Gt({props:s}),Ce.push(()=>Bt(e,"open",i)),{c(){N(e.$$.fragment)},m(o,u){I(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){y(e.$$.fragment,o),r=!1},d(o){M(e,o)}}}function pb(t,e,n){let r,i;J(t,dt,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=kt(),u=Et();J(t,u,R=>n(18,r=R));let l=null,a=null,f=!1,c=!1,d=[],p=!1;function m(R){R||Ge.set($e.NONE)}async function h(R){if(R.preventDefault(),l&&l.files){n(4,d=[]);for(let W of l.files)d.push([W,0]);d.length>0&&g()}}async function v(R){if(R.preventDefault(),n(4,d=[]),R.dataTransfer&&R.dataTransfer.items){for(let W of R.dataTransfer.items)if(W.kind==="file"){const j=W.getAsFile();j!==null&&d.push([j,0])}d.length>0&&g()}}async function g(){n(5,p=!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 j=new FormData;j.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:j})).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,p=!0)}function _(R){Ce[R?"unshift":"push"](()=>{l=R,n(0,l)})}const E=()=>{a&&a.click()},A=R=>{R.preventDefault(),n(2,f=!0)},$=()=>{n(2,f=!1)};function k(R){Ce[R?"unshift":"push"](()=>{a=R,n(1,a)})}function L(R){c=R,n(3,c)}return[l,a,f,c,d,p,i,s,u,m,h,v,_,E,A,$,k,L]}class hb extends ve{constructor(e){super(),ye(this,e,pb,mb,fe,{})}}function _b(t){let e,n;return e=new hb({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function gb(t){let e,n;return e=new Jg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function bb(t){let e,n;return e=new Qg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function yb(t){let e,n;return e=new Bg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function vb(t){let e,n;return e=new Lg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function kb(t){let e,n;return e=new Of({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Cb(t){let e,n;return e=new Eg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Eb(t){let e,n;return e=new gg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function wb(t){let e,n;return e=new tg({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Ob(t){let e,n;return e=new ag({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Ab(t){let e,n;return e=new z1({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function $b(t){let e,n,r,i;const s=[Ab,Ob,wb,Eb,Cb,kb,vb,yb,bb,gb,_b],o=[];function u(l,a){return l[0]===$e.UEDITOR_NEW_BRANCH?0:l[0]===$e.UEDITOR_IMPORT_REMOTE_BRANCH?1:l[0]===$e.UEDITOR_DELETE_BRANCH?2:l[0]===$e.UEDITOR_MERGE_FROM_DEFAULT?3:l[0]===$e.FOLDER_CREATE?4:l[0]===$e.FOLDER_DELETE?5:l[0]===$e.FOLDER_RENAME?6:l[0]===$e.FILE_CREATE?7:l[0]===$e.FILE_DELETE?8:l[0]===$e.FILE_RENAME?9:l[0]===$e.FILE_UPLOAD?10:-1}return~(e=u(t))&&(n=o[e]=s[e](t)),{c(){n&&n.c(),r=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}var $e=(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))($e||{});const Ge=Pe(1);function Tb(t,e,n){let r,i=ce;return J(t,Ge,s=>n(0,r=s)),t.$$.on_destroy.push(()=>i()),[r]}let Sb=class extends ve{constructor(e){super(),ye(this,e,Tb,$b,fe,{})}};const Db="modulepreload",Rb=function(t){return"/app/"+t},Fu={},Ui=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=Rb(l),l in Fu)return;Fu[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":Db,a||(c.as="script"),c.crossOrigin="",c.href=l,u&&c.setAttribute("nonce",u),document.head.appendChild(c),a)return new Promise((d,p)=>{c.addEventListener("load",d),c.addEventListener("error",()=>p(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 Pb(t){let e;return{c(){e=D("div"),e.textContent="Please select a file or folder from the file-browser on the left",H(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&&C(e)}}}function Fb(t){let e,n,r,i;const s=[Mb,Ib,Lb],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=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Lb(t){let e,n,r=t[1].mimetype+"",i,s;return{c(){e=D("div"),n=Z("Unfortunately the μEditor does not know how to edit this file ("),i=Z(r),s=Z(")."),H(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&&C(e)}}}function Ib(t){let e;return{c(){e=D("div"),e.textContent="Loading the editor. Please wait...",H(e,"class","flex-1 px-2 py-1")},m(n,r){w(n,e,r)},p:ce,i:ce,o:ce,d(n){n&&C(e)}}}function Mb(t){let e=t[3].id,n,r,i=Lu(t);return{c(){i.c(),n=Ae()},m(s,o){i.m(s,o),w(s,n,o),r=!0},p(s,o){o&8&&fe(e,e=s[3].id)?(de(),y(i,1,1,ce),me(),i=Lu(s),i.c(),b(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){r||(b(i),r=!0)},o(s){y(i),r=!1},d(s){s&&C(n),i.d(s)}}}function Lu(t){let e,n,r;var i=t[2];function s(o,u){return{}}return i&&(e=Qo(i,s())),{c(){e&&N(e.$$.fragment),n=Ae()},m(o,u){e&&I(e,o,u),w(o,n,u),r=!0},p(o,u){if(u&4&&i!==(i=o[2])){if(e){de();const l=e;y(l.$$.fragment,1,0,()=>{M(l,1)}),me()}i?(e=Qo(i,s()),N(e.$$.fragment),b(e.$$.fragment,1),I(e,n.parentNode,n)):e=null}},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&y(e.$$.fragment,o),r=!1},d(o){o&&C(n),e&&M(e,o)}}}function Nb(t){let e,n,r,i;const s=[Fb,Pb],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=Ae()},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):(de(),y(o[f],1,1,()=>{o[f]=null}),me(),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){y(n),i=!1},d(l){l&&C(r),o[e].d(l)}}}function Hb(t,e,n){let r,i,s;J(t,dt,d=>n(1,r=d));let o=!1;const u=["application/gitignore","application/json","application/toml","application/yaml"],l=["application/tei+xml"],a=Et();J(t,a,d=>n(3,s=d));const f=Be(dt,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=Be(f,(d,p)=>{let m=null;d==="Folder"?m=Ui(()=>import("./FolderEditor-DxuUgzoi.js"),[]):d==="CodeMirror"?m=Ui(()=>import("./CodeMirrorEditor-843IlM1G.js"),__vite__mapDeps([0,1,2])):d==="Tei"?m=Ui(()=>import("./TeiEditor-79-RF-kq.js"),__vite__mapDeps([3,1])):d==="Image"&&(m=Ui(()=>import("./ImageEditor-DTrJs74v.js"),[])),m?(n(0,o=!0),m.then(h=>{p(h.default),n(0,o=!1)},()=>{n(0,o=!1)})):p(null)},null);return J(t,c,d=>n(2,i=d)),[o,r,i,s,a,c]}let Vb=class extends ve{constructor(e){super(),ye(this,e,Hb,Nb,fe,{})}};function Bb(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 Ub(t,...e){const n={};for(const r of Object.keys(t))e.includes(r)||(n[r]=t[r]);return n}function ji(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=r)}return e}function Iu(t){function e(n){return n(t),()=>{}}return{subscribe:e}}function Mu(t,e){if(!Kb)return null;const n=document.querySelector(`[data-melt-id="${t}"]`);return Bo(n)?n:null}const Ki=t=>new Proxy(t,{get(e,n,r){return Reflect.get(e,n,r)},ownKeys(e){return Reflect.ownKeys(e).filter(n=>n!=="action")}}),Nu=t=>typeof t=="function";Qi("empty");function Qi(t,e){const{stores:n,action:r,returned:i}=e??{},s=(()=>{if(n&&i)return Be(n,u=>{const l=i(u);if(Nu(l)){const a=(...f)=>Ki(ji({...l(...f),[`data-melt-${t}`]:"",action:r??ur}));return a.action=r??ur,a}return Ki(ji({...l,[`data-melt-${t}`]:"",action:r??ur}))});{const u=i,l=u==null?void 0:u();if(Nu(l)){const a=(...f)=>Ki(ji({...l(...f),[`data-melt-${t}`]:"",action:r??ur}));return a.action=r??ur,Iu(a)}return Iu(Ki(ji({...l,[`data-melt-${t}`]:"",action:r??ur})))}})(),o=r??(()=>{});return o.subscribe=s.subscribe,o}function jb(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 Kb=typeof document<"u",qb=t=>/^[a-z]$/i.test(t);function Bo(t){return t instanceof HTMLElement}function Wb(t){return t.offsetParent===null}function Qb(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}function ur(){}function Bs(t,e,n,r){const i=Array.isArray(e)?e:[e];if(typeof n=="function"){const s=Gb(o=>n(o));return i.forEach(o=>t.addEventListener(o,s,r)),()=>{i.forEach(o=>t.removeEventListener(o,s,r))}}return()=>void 0}function zb(t){const e=t.currentTarget;if(!Bo(e))return null;const n=new CustomEvent(`m-${t.type}`,{detail:{originalEvent:t},cancelable:!0});return e.dispatchEvent(n),n}function Gb(t){return e=>{const n=zb(e);if(!(n!=null&&n.defaultPrevented))return t(e)}}function Uo(t){return{...t,get:()=>Lr(t)}}Uo.writable=function(t){const e=Pe(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}}};Uo.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 Yb=(t,e)=>{const n=Uo(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 Zb(){return Wa(10)}function Xb(t){return t.reduce((e,n)=>(e[n]=Zb(),e),{})}const ut={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"};yt(!1),yt(!1),yt(void 0),yt(void 0);const Jb={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"};({...Ub(Jb,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});const xb={forceVisible:!1,defaultExpanded:[]},ar={TABINDEX:"tabindex",EXPANDED:"aria-expanded",LABELLEDBY:"aria-labelledby",DATAID:"data-id"},{name:Us}=jb("tree-view");function e2(t){const e={...xb,...t},{forceVisible:n}=e,r=Pe(null),i=Pe(null),s=e.expanded??Pe(e.defaultExpanded),o=Yb(s,e==null?void 0:e.onExpandedChange),u=Be([i],([k])=>k==null?void 0:k.getAttribute("data-id")),l=Be([i],([k])=>L=>(k==null?void 0:k.getAttribute("data-id"))===L),a=Be([o],([k])=>L=>k.includes(L)),f=Xb(["tree"]),c=Qi(Us(),{returned:()=>({role:"tree","data-melt-id":f.tree})});let d=!1;const p=Qi(Us("item"),{stores:[o,u,r],returned:([k,L,R])=>W=>{const{id:j,hasChildren:T}=W;let U=0;return R!==null&&(U=R===j?0:-1),{role:"treeitem","aria-selected":L===j,"data-id":j,tabindex:U,"aria-expanded":T?k.includes(j):void 0}},action:k=>{const L=Qb(Bs(k,"keydown",R=>{const{key:W}=R,j=qb(W);if(![ut.ARROW_DOWN,ut.ARROW_UP,ut.ARROW_LEFT,ut.ARROW_RIGHT,ut.ENTER,ut.SPACE,ut.END,ut.HOME,ut.ASTERISK].includes(W)&&!j||!Mu(f.tree)||!Bo(k)||k.getAttribute("role")!=="treeitem")return;const O=g(),F=O.findIndex(V=>V===k);if(W!==ut.ENTER&&W!==ut.SPACE&&R.preventDefault(),W===ut.ENTER||W===ut.SPACE)v(k),d=!0;else if(W===ut.ARROW_DOWN&&F!==O.length-1){const V=O[F+1];if(!V)return;h(V)}else if(W===ut.ARROW_UP&&F!==0){const V=O[F-1];if(!V)return;h(V)}else if(W===ut.HOME&&F!==0){const V=O[0];if(!V)return;h(V)}else if(W===ut.END&&F!=O.length-1){const V=Bb(O);if(!V)return;h(V)}else if(W===ut.ARROW_LEFT)if($(k))E(k);else{const V=k==null?void 0:k.closest('[role="group"]'),B=V==null?void 0:V.getAttribute("data-group-id"),ee=O.find(te=>te.getAttribute("data-id")===B);if(!ee)return;h(ee)}else if(W===ut.ARROW_RIGHT)if($(k)){const V=O[F+1];if(!V)return;h(V)}else A(k)&&E(k);else if(j){const V=O.map(te=>{var z;return{value:(z=te.textContent)==null?void 0:z.toLowerCase().trim(),id:te.getAttribute("data-id")}});let B=-1,ee=V.slice(F+1).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase()[0])===W?(B=F+1+z,!0):!1});if(ee||(ee=V.slice(0,F).some((te,z)=>{var oe;return((oe=te.value)==null?void 0:oe.toLowerCase().at(0))===W?(B=z,!0):!1})),ee&&V[B].id){const te=O[B];if(!te)return;h(te)}}}),Bs(k,"click",async()=>{v(k),h(k),d||E(k),d=!1}),Bs(k,"focus",()=>{r.update(R=>k.getAttribute("data-id")??R)}));return{destroy(){L()}}}}),m=Qi(Us("group"),{stores:[o],returned:([k])=>L=>({role:"group","data-group-id":L.id,hidden:!n&&!k.includes(L.id)?!0:void 0,style:Af({display:!n&&!k.includes(L.id)?"none":void 0})})});function h(k){r.update(L=>k.getAttribute("data-id")??L),k.focus()}function v(k){k.getAttribute(ar.DATAID)&&i.set(k)}function g(){let k=[];const L=Mu(f.tree);return L&&(k=Array.from(L.querySelectorAll('[role="treeitem"]')).filter(R=>!Wb(R))),k}function _(k){const L=k.hasAttribute(ar.EXPANDED),R=k.getAttribute(ar.EXPANDED),W=k.getAttribute(ar.DATAID);return{hasChildren:L,expanded:R,dataId:W}}function E(k){const{hasChildren:L,expanded:R,dataId:W}=_(k);!L||R===null||W===null||(R==="false"?o.update(j=>[...j,W]):o.update(j=>j.filter(T=>T!==W)))}function A(k){return k.hasAttribute(ar.EXPANDED)}function $(k){return k.getAttribute(ar.EXPANDED)==="true"}return{ids:f,elements:{tree:c,item:p,group:m},states:{expanded:o,selectedItem:i},helpers:{isExpanded:a,isSelected:l}}}var go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $f={exports:{}};(function(t,e){(function(n,r,i){t.exports=i(),t.exports.default=i()})("slugify",go,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 p=u[d];return p===void 0&&(p=n[d]),p===void 0&&(p=d),p===l&&(p=" "),c+p.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})})($f);var n2=$f.exports;const r2=t2(n2);function Hu(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-${r2(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 i2(t){let e,n,r,i,s;const o=[f2,a2,u2,l2],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=Ae()},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&&(de(),y(u[c],1,1,()=>{u[c]=null}),me(),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){y(r),s=!1},d(a){a&&C(i),u[n].d(a)}}}function s2(t){let e,n;return e=new Ne({props:{path:x_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function o2(t){let e,n;return e=new Ne({props:{path:J_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function l2(t){let e,n;return e=new Ne({props:{path:Y_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function u2(t){let e,n;return e=new Ne({props:{path:W_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function a2(t){let e,n;return e=new Ne({props:{path:G_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function f2(t){let e,n;return e=new Ne({props:{path:Q_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Vu(t){let e,n,r,i,s;n=new Tf({props:{treeItems:t[12],level:t[1]+1}});let o=[t[16]],u={};for(let l=0;l<o.length;l+=1)u=ie(u,o[l]);return{c(){e=D("ol"),N(n.$$.fragment),le(e,u)},m(l,a){w(l,e,a),I(n,e,null),r=!0,i||(s=Ue(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),le(e,u=Me(o,[a&7&&l[16]]))},i(l){r||(b(n.$$.fragment,l),r=!0)},o(l){y(n.$$.fragment,l),r=!1},d(l){l&&C(e),M(n),i=!1,s()}}}function Bu(t){let e,n,r,i,s,o,u,l=t[9]+"",a,f,c,d,p,m,h;const v=[o2,s2,i2],g=[];function _(k,L){return L&19&&(r=null),r==null&&(r=!!(k[10]==="folder"&&k[15]&&k[4](k[14]))),r?0:k[10]==="folder"?1:k[10]==="file"?2:-1}~(i=_(t,-1))&&(s=g[i]=v[i](t));let E=[{class:"flex items-center gap-1 p-1"},t[17],{"data-file-path":f=t[11]}],A={};for(let k=0;k<E.length;k+=1)A=ie(A,E[k]);let $=t[12]&&Vu(t);return{c(){e=D("li"),n=D("button"),s&&s.c(),o=K(),u=D("span"),a=Z(l),c=K(),$&&$.c(),d=K(),H(u,"class","select-none"),le(n,A),H(e,"role","none")},m(k,L){w(k,e,L),P(e,n),~i&&g[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),p=!0,m||(h=Ue(t[17].action(n)),m=!0)},p(k,L){let R=i;i=_(k,L),i===R?~i&&g[i].p(k,L):(s&&(de(),y(g[R],1,1,()=>{g[R]=null}),me()),~i?(s=g[i],s?s.p(k,L):(s=g[i]=v[i](k),s.c()),b(s,1),s.m(n,o)):s=null),(!p||L&1)&&l!==(l=k[9]+"")&&qe(a,l),le(n,A=Me(E,[{class:"flex items-center gap-1 p-1"},L&11&&k[17],(!p||L&1&&f!==(f=k[11]))&&{"data-file-path":f}])),k[12]?$?($.p(k,L),L&1&&b($,1)):($=Vu(k),$.c(),b($,1),$.m(e,d)):$&&(de(),y($,1,1,()=>{$=null}),me())},i(k){p||(b(s),b($),p=!0)},o(k){y(s),y($),p=!1},d(k){k&&C(e),~i&&g[i].d(),$&&$.d(),m=!1,h()}}}function c2(t){let e,n,r=tn(t[0]),i=[];for(let o=0;o<r.length;o+=1)i[o]=Bu(Hu(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Ae()},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=tn(o[0]);let l;for(l=0;l<r.length;l+=1){const a=Hu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Bu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},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)y(i[u]);n=!1},d(o){o&&C(e),yi(i,o)}}}function d2(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}}=st("tree");return J(t,l,d=>n(3,i=d)),J(t,a,d=>n(2,r=d)),J(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 Tf extends ve{constructor(e){super(),ye(this,e,d2,c2,fe,{treeItems:0,level:1})}}function m2(t){let e,n,r,i,s;const o=t[1].default,u=pe(o,t,t[0],null);return i=new Ne({props:{path:zt,class:"w-12 h-12 animate-spin animate-reverse"}}),{c(){e=D("div"),n=D("p"),u&&u.c(),r=K(),N(i.$$.fragment),H(n,"class","sr-only"),H(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),I(i,e,null),s=!0},p(l,[a]){u&&u.p&&(!s||a&1)&&_e(u,o,l,l[0],s?he(o,l[0],a,null):ge(l[0]),null)},i(l){s||(b(u,l),b(i.$$.fragment,l),s=!0)},o(l){y(u,l),y(i.$$.fragment,l),s=!1},d(l){l&&C(e),u&&u.d(l),M(i)}}}function p2(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class h2 extends ve{constructor(e){super(),ye(this,e,p2,m2,fe,{})}}function _2(t){let e,n;return e=new h2({props:{$$slots:{default:[b2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function g2(t){let e,n,r;n=new Tf({props:{treeItems:t[0].data}});let i=[t[1]],s={};for(let o=0;o<i.length;o+=1)s=ie(s,i[o]);return{c(){e=D("ol"),N(n.$$.fragment),le(e,s)},m(o,u){w(o,e,u),I(n,e,null),r=!0},p(o,u){const l={};u&1&&(l.treeItems=o[0].data),n.$set(l),le(e,s=Me(i,[u&2&&o[1]]))},i(o){r||(b(n.$$.fragment,o),r=!0)},o(o){y(n.$$.fragment,o),r=!1},d(o){o&&C(e),M(n)}}}function b2(t){let e;return{c(){e=Z("Loading the file list. Please wait...")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function y2(t){let e,n,r,i;const s=[g2,_2],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=D("nav"),r&&r.c(),H(e,"aria-label","Files"),H(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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(r),i=!1},d(l){l&&C(e),~n&&o[n].d()}}}function Sf(t,e){for(let n of t){if(n.fullpath===e)return n;if(n.content){const r=Sf(n.content,e);if(r!==null)return r}}return null}function v2(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 k2(t,e,n){let r,i;const s=Et(),o=Ho(),u=Be([s,o],([m,h])=>m?{queryKey:["branches",m.id,"files/"],queryFn:cn,enabled:h.isSuccess}:{queryKey:["branches","-","files/"],queryFn:cn,enabled:!1}),l=Rr(u);J(t,l,m=>n(0,r=m));const a=e2({defaultExpanded:["file-tree--1-0"]});ft("tree",a);const{elements:{tree:f},states:{selectedItem:c,expanded:d}}=a;J(t,f,m=>n(1,i=m));const p=c.subscribe(m=>{if(c!==null&&(m==null?void 0:m.getAttribute("data-file-path"))!==null&&r.isSuccess){const h=Sf(r.data,m==null?void 0:m.getAttribute("data-file-path"));dt.set(h)}else dt.set(null)});return ds(p),cs(()=>{let m;m=l.subscribe(h=>{if(h.isSuccess){const v=Ef("path");v&&qt().then(()=>{const g=document.querySelector('[data-file-path="'+v+'"]');g&&(d.set(v2(g)),c.set(g))}),m&&m()}})}),[r,i,l,f]}class C2 extends ve{constructor(e){super(),ye(this,e,k2,y2,fe,{})}}function Uu(t,e,n){const r=t.slice();return r[15]=e[n],r}function ju(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&&(C(e),C(r),C(i))}}}function E2(t){let e,n,r=t[0]!==null&&ju(t);return{c(){e=Z("μEditor"),r&&r.c(),n=Ae()},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=ju(i),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},d(i){i&&(C(e),C(n)),r&&r.d(i)}}}function Ku(t){let e,n,r,i,s,o,u,l,a,f;e=new Lt({props:{$$slots:{default:[w2]},$$scope:{ctx:t}}}),e.$on("click",t[9]);let c=t[2].isSuccess&&t[2].data.remote.length>0&&qu(t);i=new Lt({props:{$$slots:{default:[A2]},$$scope:{ctx:t}}}),i.$on("click",t[11]),o=new bs({});let d=t[3]!==null&&Wu(t),p=t[2].isSuccess&&t[2].data.local.length>0&&Gu(t);return{c(){N(e.$$.fragment),n=K(),c&&c.c(),r=K(),N(i.$$.fragment),s=K(),N(o.$$.fragment),u=K(),d&&d.c(),l=K(),p&&p.c(),a=Ae()},m(m,h){I(e,m,h),w(m,n,h),c&&c.m(m,h),w(m,r,h),I(i,m,h),w(m,s,h),I(o,m,h),w(m,u,h),d&&d.m(m,h),w(m,l,h),p&&p.m(m,h),w(m,a,h),f=!0},p(m,h){const v={};h&262144&&(v.$$scope={dirty:h,ctx:m}),e.$set(v),m[2].isSuccess&&m[2].data.remote.length>0?c?h&4&&b(c,1):(c=qu(m),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(de(),y(c,1,1,()=>{c=null}),me());const g={};h&262144&&(g.$$scope={dirty:h,ctx:m}),i.$set(g),m[3]!==null?d?(d.p(m,h),h&8&&b(d,1)):(d=Wu(m),d.c(),b(d,1),d.m(l.parentNode,l)):d&&(de(),y(d,1,1,()=>{d=null}),me()),m[2].isSuccess&&m[2].data.local.length>0?p?(p.p(m,h),h&4&&b(p,1)):(p=Gu(m),p.c(),b(p,1),p.m(a.parentNode,a)):p&&(de(),y(p,1,1,()=>{p=null}),me())},i(m){f||(b(e.$$.fragment,m),b(c),b(i.$$.fragment,m),b(o.$$.fragment,m),b(d),b(p),f=!0)},o(m){y(e.$$.fragment,m),y(c),y(i.$$.fragment,m),y(o.$$.fragment,m),y(d),y(p),f=!1},d(m){m&&(C(n),C(r),C(s),C(u),C(l),C(a)),M(e,m),c&&c.d(m),M(i,m),M(o,m),d&&d.d(m),p&&p.d(m)}}}function w2(t){let e,n,r,i;return e=new Ne({props:{path:r1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="New Branch"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function qu(t){let e,n;return e=new Lt({props:{$$slots:{default:[O2]},$$scope:{ctx:t}}}),e.$on("click",t[10]),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function O2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Import Branch"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function A2(t){let e,n,r,i;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Synchronise Branches"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Wu(t){let e,n,r,i=t[3].update_from_default&&Qu(t),s=t[1].data.git.default_branch!==t[3].id&&zu(t);return{c(){i&&i.c(),e=K(),s&&s.c(),n=Ae()},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[3].update_from_default?i?(i.p(o,u),u&8&&b(i,1)):(i=Qu(o),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me()),o[1].data.git.default_branch!==o[3].id?s?(s.p(o,u),u&10&&b(s,1)):(s=zu(o),s.c(),b(s,1),s.m(n.parentNode,n)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){r||(b(i),b(s),r=!0)},o(o){y(i),y(s),r=!1},d(o){o&&(C(e),C(n)),i&&i.d(o),s&&s.d(o)}}}function Qu(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[$2]},$$scope:{ctx:t}}}),e.$on("click",t[12]),r=new bs({}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&262146&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function $2(t){let e,n,r,i,s=as(t[1].data.git.default_branch)+"",o,u;return e=new Ne({props:{path:s1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),i=Z("Merge Updates from "),o=Z(s)},m(l,a){I(e,l,a),w(l,n,a),w(l,r,a),P(r,i),P(r,o),u=!0},p(l,a){(!u||a&2)&&s!==(s=as(l[1].data.git.default_branch)+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(C(n),C(r)),M(e,l)}}}function zu(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[T2]},$$scope:{ctx:t}}}),e.$on("click",t[13]),r=new bs({}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function T2(t){let e,n,r,i,s=t[3].title+"",o,u;return e=new Ne({props:{path:i1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),i=Z("Delete Branch "),o=Z(s)},m(l,a){I(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].title+"")&&qe(o,s)},i(l){u||(b(e.$$.fragment,l),u=!0)},o(l){y(e.$$.fragment,l),u=!1},d(l){l&&(C(n),C(r)),M(e,l)}}}function Gu(t){let e,n;return e=new bp({props:{onValueChange:t[14],$$slots:{default:[P2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.onValueChange=r[14]),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function S2(t){let e,n;return e=new Ne({props:{class:"w-4 h-4"}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function D2(t){let e,n;return e=new Ne({props:{path:U_,class:"w-4 h-4"}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function R2(t){let e,n,r,i,s=t[15].title+"",o,u,l;const a=[D2,S2],f=[];function c(d,p){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=K(),i=D("span"),o=Z(s),u=K()},m(d,p){f[e].m(d,p),w(d,r,p),w(d,i,p),P(i,o),w(d,u,p),l=!0},p(d,p){let m=e;e=c(d),e!==m&&(de(),y(f[m],1,1,()=>{f[m]=null}),me(),n=f[e],n||(n=f[e]=a[e](d),n.c()),b(n,1),n.m(r.parentNode,r)),(!l||p&4)&&s!==(s=d[15].title+"")&&qe(o,s)},i(d){l||(b(n),l=!0)},o(d){y(n),l=!1},d(d){d&&(C(r),C(i),C(u)),f[e].d(d)}}}function Yu(t){let e,n;return e=new op({props:{value:t[15].id,$$slots:{default:[R2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.value=r[15].id),i&262149&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function P2(t){let e,n,r=tn(t[2].data.local),i=[];for(let o=0;o<r.length;o+=1)i[o]=Yu(Uu(t,r,o));const s=o=>y(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=Ae()},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&5){r=tn(o[2].data.local);let l;for(l=0;l<r.length;l+=1){const a=Uu(o,r,l);i[l]?(i[l].p(a,u),b(i[l],1)):(i[l]=Yu(a),i[l].c(),b(i[l],1),i[l].m(e.parentNode,e))}for(de(),l=r.length;l<i.length;l+=1)s(l);me()}},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)y(i[u]);n=!1},d(o){o&&C(e),yi(i,o)}}}function F2(t){let e,n,r=t[1].isSuccess&&t[1].data.git.enabled&&Ku(t);return{c(){r&&r.c(),e=Ae()},m(i,s){r&&r.m(i,s),w(i,e,s),n=!0},p(i,s){i[1].isSuccess&&i[1].data.git.enabled?r?(r.p(i,s),s&2&&b(r,1)):(r=Ku(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&C(e),r&&r.d(i)}}}function L2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[E2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[F2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&262145&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&262159&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function I2(t){let e,n;return e=new ks({props:{$$slots:{default:[L2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,[i]){const s={};i&262159&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function M2(t,e,n){let r,i,s,o;const u=Ln();J(t,u,_=>n(1,i=_));const l=Vo();J(t,l,_=>n(2,s=_));const a=Et();J(t,a,_=>n(0,r=_));const f=kt(),c=Be([l,a],([_,E])=>{if(_.isSuccess&&E!==null){for(const A of _.data.local)if(A.id===E.id)return A}return null});return J(t,c,_=>n(3,o=_)),[r,i,s,o,u,l,a,f,c,()=>{Ge.set($e.UEDITOR_NEW_BRANCH)},()=>{Ge.set($e.UEDITOR_IMPORT_REMOTE_BRANCH)},()=>{wf({action:"SynchroniseBranches",callback:()=>{f.invalidateQueries({queryKey:["branches"]})}})},()=>{Ge.set($e.UEDITOR_MERGE_FROM_DEFAULT)},()=>{Ge.set($e.UEDITOR_DELETE_BRANCH)},_=>{if(s.isSuccess)for(let E of s.data.local)E.id===_&&a.set(E)}]}class N2 extends ve{constructor(e){super(),ye(this,e,M2,I2,fe,{})}}function H2(t){let e;return{c(){e=Z("File")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function V2(t){let e,n,r,i;return e=new Ne({props:{path:n1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Rename"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function B2(t){let e,n,r,i;return e=new Ne({props:{path:l1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Delete"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function U2(t){let e,n,r,i;return e=new Lt({props:{$$slots:{default:[V2]},$$scope:{ctx:t}}}),e.$on("click",t[0]),r=new Lt({props:{$$slots:{default:[B2]},$$scope:{ctx:t}}}),r.$on("click",t[1]),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function j2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[H2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[U2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function K2(t){let e,n;return e=new ks({props:{$$slots:{default:[j2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function q2(t){return[()=>{Ge.set($e.FILE_RENAME)},()=>{Ge.set($e.FILE_DELETE)}]}class W2 extends ve{constructor(e){super(),ye(this,e,q2,K2,fe,{})}}function Q2(t){let e;return{c(){e=Z("Folder")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function z2(t){let e,n,r,i;return e=new Ne({props:{path:e1,class:"w4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="New Folder"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function G2(t){let e,n,r,i;return e=new Ne({props:{path:z_,class:"w4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="New File"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Y2(t){let e,n,r,i;return e=new Ne({props:{path:Z_,class:"w4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Upload Files"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Z2(t){let e,n,r,i;return e=new Ne({props:{path:X_,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Rename"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function X2(t){let e,n,r,i;return e=new Ne({props:{path:t1,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Delete"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function J2(t){let e,n,r,i,s,o,u,l,a,f,c,d;return e=new Lt({props:{$$slots:{default:[z2]},$$scope:{ctx:t}}}),e.$on("click",t[2]),r=new Lt({props:{$$slots:{default:[G2]},$$scope:{ctx:t}}}),r.$on("click",t[3]),s=new Lt({props:{$$slots:{default:[Y2]},$$scope:{ctx:t}}}),s.$on("click",t[4]),u=new bs({}),a=new Lt({props:{$$slots:{default:[Z2]},$$scope:{ctx:t}}}),a.$on("click",t[5]),c=new Lt({props:{$$slots:{default:[X2]},$$scope:{ctx:t}}}),c.$on("click",t[6]),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment),i=K(),N(s.$$.fragment),o=K(),N(u.$$.fragment),l=K(),N(a.$$.fragment),f=K(),N(c.$$.fragment)},m(p,m){I(e,p,m),w(p,n,m),I(r,p,m),w(p,i,m),I(s,p,m),w(p,o,m),I(u,p,m),w(p,l,m),I(a,p,m),w(p,f,m),I(c,p,m),d=!0},p(p,m){const h={};m&256&&(h.$$scope={dirty:m,ctx:p}),e.$set(h);const v={};m&256&&(v.$$scope={dirty:m,ctx:p}),r.$set(v);const g={};m&256&&(g.$$scope={dirty:m,ctx:p}),s.$set(g);const _={};m&256&&(_.$$scope={dirty:m,ctx:p}),a.$set(_);const E={};m&256&&(E.$$scope={dirty:m,ctx:p}),c.$set(E)},i(p){d||(b(e.$$.fragment,p),b(r.$$.fragment,p),b(s.$$.fragment,p),b(u.$$.fragment,p),b(a.$$.fragment,p),b(c.$$.fragment,p),d=!0)},o(p){y(e.$$.fragment,p),y(r.$$.fragment,p),y(s.$$.fragment,p),y(u.$$.fragment,p),y(a.$$.fragment,p),y(c.$$.fragment,p),d=!1},d(p){p&&(C(n),C(i),C(o),C(l),C(f)),M(e,p),M(r,p),M(s,p),M(u,p),M(a,p),M(c,p)}}}function x2(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[Q2]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[J2]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Zu(t){let e,n;return e=new Of({}),e.$on("close",t[7]),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function ey(t){let e,n,r,i;e=new ks({props:{$$slots:{default:[x2]},$$scope:{ctx:t}}});let s=t[0]===t[1].Delete&&Zu(t);return{c(){N(e.$$.fragment),n=K(),s&&s.c(),r=Ae()},m(o,u){I(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=Zu(o),s.c(),b(s,1),s.m(r.parentNode,r)):s&&(de(),y(s,1,1,()=>{s=null}),me())},i(o){i||(b(e.$$.fragment,o),b(s),i=!0)},o(o){y(e.$$.fragment,o),y(s),i=!1},d(o){o&&(C(n),C(r)),M(e,o),s&&s.d(o)}}}function ty(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($e.FOLDER_CREATE)},()=>{Ge.set($e.FILE_CREATE)},()=>{Ge.set($e.FILE_UPLOAD)},()=>{Ge.set($e.FOLDER_RENAME)},()=>{Ge.set($e.FOLDER_DELETE)},()=>{console.log("Resetting action"),n(0,i=r.Nothing)}]}class ny extends ve{constructor(e){super(),ye(this,e,ty,ey,fe,{})}}function Xu(t){let e,n;return e=new ks({props:{$$slots:{default:[oy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&516&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function ry(t){var r;let e=((r=t[2].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&4&&e!==(e=((o=i[2].data)==null?void 0:o.name)+"")&&qe(n,e)},d(i){i&&C(n)}}}function iy(t){let e,n,r,i;return e=new Ne({props:{path:q_,class:"w-4 h-4"}}),{c(){N(e.$$.fragment),n=K(),r=D("span"),r.textContent="Logout"},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function sy(t){let e,n;return e=new Lt({props:{$$slots:{default:[iy]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&512&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function oy(t){let e,n,r,i;return e=new Cs({props:{$$slots:{default:[ry]},$$scope:{ctx:t}}}),r=new ys({props:{$$slots:{default:[sy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&516&&(u.$$scope={dirty:o,ctx:s}),e.$set(u);const l={};o&512&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function ly(t){let e,n,r=t[0].isSuccess&&t[0].data.auth.provider!=="no-auth"&&t[1]==="authenticated"&&Xu(t);return{c(){r&&r.c(),e=Ae()},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"&&i[1]==="authenticated"?r?(r.p(i,s),s&3&&b(r,1)):(r=Xu(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(i){n||(b(r),n=!0)},o(i){y(r),n=!1},d(i){i&&C(e),r&&r.d(i)}}}function uy(t,e,n){let r,i,s;const o=Ho();J(t,o,d=>n(2,s=d));const u=Ln();J(t,u,d=>n(0,r=d));const l=kt(),a=p1();J(t,a,d=>n(1,i=d));const f=h1();async function c(){(await window.fetch("/api/auth/login",{method:"DELETE"})).ok&&(l.cancelQueries(),l.invalidateQueries(),f.set(!0))}return[r,i,s,o,u,a,c]}class ay extends ve{constructor(e){super(),ye(this,e,uy,ly,fe,{})}}function Ju(t){let e,n,r,i;const s=[cy,fy],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=Ae()},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&&(de(),y(o[f],1,1,()=>{o[f]=null}),me()),~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){y(n),i=!1},d(l){l&&C(r),~e&&o[e].d(l)}}}function fy(t){let e,n;return e=new ny({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function cy(t){let e,n;return e=new W2({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function dy(t){var a,f,c;let e,n,r,i,s,o,u;e=new N2({});let l=t[0]&&(!((a=t[1].data)!=null&&a.git.protect_default_branch)||((f=t[1].data)==null?void 0:f.git.default_branch)!==((c=t[2])==null?void 0:c.id))&&Ju(t);return o=new ay({}),{c(){N(e.$$.fragment),n=K(),l&&l.c(),r=K(),i=D("span"),s=K(),N(o.$$.fragment),H(i,"class","flex-1")},m(d,p){I(e,d,p),w(d,n,p),l&&l.m(d,p),w(d,r,p),w(d,i,p),w(d,s,p),I(o,d,p),u=!0},p(d,p){var m,h,v;d[0]&&(!((m=d[1].data)!=null&&m.git.protect_default_branch)||((h=d[1].data)==null?void 0:h.git.default_branch)!==((v=d[2])==null?void 0:v.id))?l?(l.p(d,p),p&7&&b(l,1)):(l=Ju(d),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(de(),y(l,1,1,()=>{l=null}),me())},i(d){u||(b(e.$$.fragment,d),b(l),b(o.$$.fragment,d),u=!0)},o(d){y(e.$$.fragment,d),y(l),y(o.$$.fragment,d),u=!1},d(d){d&&(C(n),C(r),C(i),C(s)),M(e,d),l&&l.d(d),M(o,d)}}}function my(t){let e,n;return e=new jh({props:{class:"border-b border-gray-300 px-2 pt-px",$$slots:{default:[dy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,[i]){const s={};i&39&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function py(t,e,n){let r,i,s;J(t,dt,l=>n(0,r=l));const o=Ln();J(t,o,l=>n(1,i=l));const u=Et();return J(t,u,l=>n(2,s=l)),[r,i,s,o,u]}class hy extends ve{constructor(e){super(),ye(this,e,py,my,fe,{})}}function xu(t){let e,n;return e=new V_({props:{"aria-label":"Save",title:"Save","aria-disabled":t[0]!==null&&t[3]?null:"true",$$slots:{default:[_y]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&9&&(s["aria-disabled"]=r[0]!==null&&r[3]?null:"true"),i&512&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function _y(t){let e,n;return e=new Ne({props:{path:K_}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p:ce,i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function gy(t){var i,s,o;let e,n,r=(!((i=t[2].data)!=null&&i.git.protect_default_branch)||((s=t[2].data)==null?void 0:s.git.default_branch)!==((o=t[1])==null?void 0:o.id))&&xu(t);return{c(){r&&r.c(),e=Ae()},m(u,l){r&&r.m(u,l),w(u,e,l),n=!0},p(u,l){var a,f,c;!((a=u[2].data)!=null&&a.git.protect_default_branch)||((f=u[2].data)==null?void 0:f.git.default_branch)!==((c=u[1])==null?void 0:c.id)?r?(r.p(u,l),l&6&&b(r,1)):(r=xu(u),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(de(),y(r,1,1,()=>{r=null}),me())},i(u){n||(b(r),n=!0)},o(u){y(r),n=!1},d(u){u&&C(e),r&&r.d(u)}}}function by(t){let e,n;return e=new P_({props:{class:"border-b border-gray-300",$$slots:{default:[gy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,[i]){const s={};i&527&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function yy(t,e,n){let r,i,s,o,u;J(t,dt,d=>n(7,r=d)),J(t,m1,d=>n(0,i=d)),J(t,pu,d=>n(3,u=d));const l=kt(),a=Et();J(t,a,d=>n(1,s=d));const f=Ln();J(t,f,d=>n(2,o=d));function c(){r!==null&&i!==null&&wf({action:"SaveCurrentFile",branch:s,filename:r.fullpath,data:i,callback(){pu.set(!1),(r.name==="uEdition.yml"||r.name==="uEdition.yaml"||r.name==="uEditor.yml"||r.name==="uEditor.yaml")&&l.invalidateQueries({queryKey:["configs"]})}})}return[i,s,o,u,a,f,c]}class vy extends ve{constructor(e){super(),ye(this,e,yy,by,fe,{})}}function ky(t){let e;return{c(){e=D("div"),H(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&C(e)}}}function Cy(t){let e;return{c(){e=D("div"),e.innerHTML='<p class="px-4 py-2">Please select the branch you wish to work on from the μEditor menu.</p>',H(e,"class","flex-1")},m(n,r){w(n,e,r)},i:ce,o:ce,d(n){n&&C(e)}}}function Ey(t){let e,n,r,i,s;return n=new C2({}),i=new Vb({}),{c(){e=D("div"),N(n.$$.fragment),r=K(),N(i.$$.fragment),H(e,"class","flex flex-row flex-1 overflow-hidden")},m(o,u){w(o,e,u),I(n,e,null),P(e,r),I(i,e,null),s=!0},i(o){s||(b(n.$$.fragment,o),b(i.$$.fragment,o),s=!0)},o(o){y(n.$$.fragment,o),y(i.$$.fragment,o),s=!1},d(o){o&&C(e),M(n),M(i)}}}function ea(t){let e;return{c(){e=D("div"),e.textContent="This branch is protected and cannot be edited directly",H(e,"class","text-red-500")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function ta(t){let e=t[5].fullpath+"",n;return{c(){n=Z(e)},m(r,i){w(r,n,i)},p(r,i){i&32&&e!==(e=r[5].fullpath+"")&&qe(n,e)},d(r){r&&C(n)}}}function wy(t){var U,O,F;let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v,g,_,E,A,$,k;document.title=e=t[0],o=new hy({}),l=new vy({});const L=[Ey,Cy,ky],R=[];function W(V,B){return V[1]!==null&&V[3].isSuccess?0:V[1]===null?1:2}f=W(t),c=R[f]=L[f](t);let j=((U=t[4].data)==null?void 0:U.git.protect_default_branch)&&((O=t[4].data)==null?void 0:O.git.default_branch)===((F=t[1])==null?void 0:F.id)&&ea(),T=t[5]&&ta(t);return E=new L1({}),$=new Sb({}),{c(){n=D("link"),i=K(),s=D("main"),N(o.$$.fragment),u=K(),N(l.$$.fragment),a=K(),c.c(),d=K(),p=D("footer"),j&&j.c(),m=K(),h=D("div"),T&&T.c(),v=K(),g=D("div"),_=K(),N(E.$$.fragment),A=K(),N($.$$.fragment),H(n,"rel","stylesheet"),H(n,"href",r="/api/branches/"+(t[1]!==null?t[1].id:"-")+"/configs/ui-stylesheet?timestamp="+t[2]),H(h,"class","font-mono font-bold"),H(g,"class","flex-1"),H(p,"class","flex flex-row space-x-4 px-2 py-1 border-t border-slate-300 text-sm items-center"),H(s,"class","flex flex-col w-screen h-screen overflow-hidden")},m(V,B){P(document.head,n),w(V,i,B),w(V,s,B),I(o,s,null),P(s,u),I(l,s,null),P(s,a),R[f].m(s,null),P(s,d),P(s,p),j&&j.m(p,null),P(p,m),P(p,h),T&&T.m(h,null),P(p,v),P(p,g),P(p,_),I(E,p,null),w(V,A,B),I($,V,B),k=!0},p(V,[B]){var te,z,oe;(!k||B&1)&&e!==(e=V[0])&&(document.title=e),(!k||B&6&&r!==(r="/api/branches/"+(V[1]!==null?V[1].id:"-")+"/configs/ui-stylesheet?timestamp="+V[2]))&&H(n,"href",r);let ee=f;f=W(V),f!==ee&&(de(),y(R[ee],1,1,()=>{R[ee]=null}),me(),c=R[f],c||(c=R[f]=L[f](V),c.c()),b(c,1),c.m(s,d)),(te=V[4].data)!=null&&te.git.protect_default_branch&&((z=V[4].data)==null?void 0:z.git.default_branch)===((oe=V[1])==null?void 0:oe.id)?j||(j=ea(),j.c(),j.m(p,m)):j&&(j.d(1),j=null),V[5]?T?T.p(V,B):(T=ta(V),T.c(),T.m(h,null)):T&&(T.d(1),T=null)},i(V){k||(b(o.$$.fragment,V),b(l.$$.fragment,V),b(c),b(E.$$.fragment,V),b($.$$.fragment,V),k=!0)},o(V){y(o.$$.fragment,V),y(l.$$.fragment,V),y(c),y(E.$$.fragment,V),y($.$$.fragment,V),k=!1},d(V){V&&(C(i),C(s),C(A)),C(n),M(o),M(l),R[f].d(),j&&j.d(),T&&T.d(),M(E),M($,V)}}}function Oy(t,e,n){let r,i,s,o,u,l;J(t,dt,h=>n(5,l=h));const a=st("uEditionConfig"),f=st("uEditorConfig");J(t,f,h=>n(3,o=h));const c=st("currentBranch");J(t,c,h=>n(1,i=h));const d=Ln();J(t,d,h=>n(4,u=h));const p=Be(a,h=>h.isSuccess&&h.data.languages&&h.data.languages.length>0&&h.data.languages[0].code&&h.data.title&&h.data.title[h.data.languages[0].code]?"μEditor - "+h.data.title[h.data.languages[0].code]:"μEditor");J(t,p,h=>n(0,r=h));const m=Be(a,h=>new Date().getTime());return J(t,m,h=>n(2,s=h)),[r,i,s,o,u,l,f,c,d,p,m]}class Ay extends ve{constructor(e){super(),ye(this,e,Oy,wy,fe,{})}}function Es(t,{delay:e=0,duration:n=400,easing:r=fs}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:s=>`opacity: ${s*i}`}}const na="2.0.0b11";function ra(t){let e,n,r;const i=t[2].default,s=pe(i,t,t[3],null);let o=t[0].data.version!==na&&ia(t);return{c(){s&&s.c(),e=K(),o&&o.c(),n=Ae()},m(u,l){s&&s.m(u,l),w(u,e,l),o&&o.m(u,l),w(u,n,l),r=!0},p(u,l){s&&s.p&&(!r||l&8)&&_e(s,i,u,u[3],r?he(i,u[3],l,null):ge(u[3]),null),u[0].data.version!==na?o?l&1&&b(o,1):(o=ia(u),o.c(),b(o,1),o.m(n.parentNode,n)):o&&(de(),y(o,1,1,()=>{o=null}),me())},i(u){r||(b(s,u),b(o),r=!0)},o(u){y(s,u),y(o),r=!1},d(u){u&&(C(e),C(n)),s&&s.d(u),o&&o.d(u)}}}function ia(t){let e,n;return e=new Qn({props:{open:!0,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Dy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function $y(t){let e;return{c(){e=Z("μEditor update required")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Ty(t){let e,n,r,i;return e=new Ct({props:{$$slots:{default:[$y]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("div"),r.innerHTML=`The μEditor has been updated and you need to reload the μEditor in
18
+ order to benefit from the latest updates.
19
+ <div data-dialog-buttons=""><a href="/" data-button="">Reload</a></div>`,H(r,"data-dialog-content-area","")},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Sy(t){let e,n;return e=new er({props:{class:"flex flex-col overflow-hidden","data-update-dialog":!0,$$slots:{default:[Ty]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},p(r,i){const s={};i&8&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function Dy(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[Sy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Ry(t){let e;return{c(){e=Z("μEditor not ready")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Py(t){let e,n,r,i;return e=new Ct({props:{$$slots:{default:[Ry]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("div"),r.innerHTML=`<p>Unfortunately the μEditor server is not ready. Please check the server
20
+ logs to determine what the issue is.</p>`,H(r,"data-dialog-content-area","")},m(s,o){I(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){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function Fy(t){let e,n,r,i;return e=new Ur({props:{transition:Es}}),r=new er({props:{"data-dialog-role":"error",class:"flex flex-col overflow-hidden left-10",$$slots:{default:[Py]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Ly(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[Fy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(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){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Iy(t){let e,n,r,i=t[0].isSuccess&&ra(t);return n=new Qn({props:{open:t[0].isSuccess&&!t[0].data.ready,closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Ly]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=K(),N(n.$$.fragment)},m(s,o){i&&i.m(s,o),w(s,e,o),I(n,s,o),r=!0},p(s,[o]){s[0].isSuccess?i?(i.p(s,o),o&1&&b(i,1)):(i=ra(s),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(de(),y(i,1,1,()=>{i=null}),me());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){y(i),y(n.$$.fragment,s),r=!1},d(s){s&&C(e),i&&i.d(s),M(n,s)}}}function My(t,e,n){let r,{$$slots:i={},$$scope:s}=e;const o=Rr({queryKey:[""],queryFn:cn,refetchInterval:6e4});return J(t,o,u=>n(0,r=u)),ft("apiStatus",o),t.$$set=u=>{"$$scope"in u&&n(3,s=u.$$scope)},[r,o,i,s]}class Ny extends ve{constructor(e){super(),ye(this,e,My,Iy,fe,{})}}function Hy(t){let e;return{c(){e=Z("Authenticating")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Vy(t){let e,n,r,i;return e=new Ct({props:{$$slots:{default:[Hy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("div"),r.innerHTML="<p>You are being authenticated. Please wait.</p>",H(r,"data-dialog-content-area","")},m(s,o){I(e,s,o),w(s,n,o),w(s,r,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),e.$set(u)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),i=!1},d(s){s&&(C(n),C(r)),M(e,s)}}}function By(t){let e,n,r,i;return e=new Ur({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[Vy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Uy(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[By]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function jy(t){let e;return{c(){e=Z("Login")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Ky(t){let e;return{c(){e=D("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>',H(e,"data-dialog-content-area","")},m(n,r){w(n,e,r)},p:ce,d(n){n&&C(e)}}}function qy(t){let e,n,r,i,s,o,u,l,a,f,c,d,p,m,h,v,g=t[5].isError&&sa(),_=t[5].isError&&oa();function E(k,L){return k[5].isPending?Qy:Wy}let A=E(t),$=A(t);return{c(){e=D("form"),n=D("label"),r=D("span"),r.textContent="E-Mail",i=K(),s=D("input"),o=K(),g&&g.c(),u=K(),l=D("label"),a=D("span"),a.textContent="Password",f=K(),c=D("input"),d=K(),_&&_.c(),p=K(),m=D("div"),$.c(),H(r,"data-form-field-label",""),H(s,"type","text"),H(s,"data-form-field-text",""),H(a,"data-form-field-label",""),H(c,"type","password"),H(c,"data-form-field-text",""),H(m,"data-dialog-buttons",""),H(e,"data-dialog-content-area","")},m(k,L){w(k,e,L),P(e,n),P(n,r),P(n,i),P(n,s),it(s,t[0]),P(n,o),g&&g.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),_&&_.m(l,null),P(e,p),P(e,m),$.m(m,null),h||(v=[G(s,"input",t[11]),G(c,"input",t[12]),G(e,"submit",t[13])],h=!0)},p(k,L){L&1&&s.value!==k[0]&&it(s,k[0]),k[5].isError?g||(g=sa(),g.c(),g.m(n,null)):g&&(g.d(1),g=null),L&2&&c.value!==k[1]&&it(c,k[1]),k[5].isError?_||(_=oa(),_.c(),_.m(l,null)):_&&(_.d(1),_=null),A!==(A=E(k))&&($.d(1),$=A(k),$&&($.c(),$.m(m,null)))},d(k){k&&C(e),g&&g.d(),_&&_.d(),$.d(),h=!1,Te(v)}}}function sa(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",H(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function oa(t){let e;return{c(){e=D("span"),e.textContent="Incorred e-mail address or password",H(e,"data-form-field-error","")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Wy(t){let e;return{c(){e=D("button"),e.textContent="Login",H(e,"type","submit"),H(e,"data-button","")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Qy(t){let e;return{c(){e=D("span"),e.textContent="Logging in...",H(e,"data-button",""),H(e,"class","inline-flex")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function zy(t){let e,n,r,i;e=new Ct({props:{$$slots:{default:[jy]},$$scope:{ctx:t}}});function s(l,a){var f,c;if(((f=l[4].data)==null?void 0:f.auth.provider)==="email-password")return qy;if(((c=l[4].data)==null?void 0:c.auth.provider)==="github")return Ky}let o=s(t),u=o&&o(t);return{c(){N(e.$$.fragment),n=K(),u&&u.c(),r=Ae()},m(l,a){I(e,l,a),w(l,n,a),u&&u.m(l,a),w(l,r,a),i=!0},p(l,a){const f={};a&32768&&(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){y(e.$$.fragment,l),i=!1},d(l){l&&(C(n),C(r)),M(e,l),u&&u.d(l)}}}function Gy(t){let e,n,r,i;return e=new Ur({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[zy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32819&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Yy(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[Gy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32819&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function Zy(t){let e;return{c(){e=Z("Logged out")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Xy(t){let e;return{c(){e=Z("Close")},m(n,r){w(n,e,r)},d(n){n&&C(e)}}}function Jy(t){let e,n,r,i,s,o,u,l;return e=new Ct({props:{$$slots:{default:[Zy]},$$scope:{ctx:t}}}),u=new Rt({props:{"data-button":!0,$$slots:{default:[Xy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),r=D("div"),i=D("p"),i.textContent="You have logged out. You can now close the browser tab or window.",s=K(),o=D("div"),N(u.$$.fragment),H(i,"class","mb-4"),H(o,"data-dialog-buttons",""),H(r,"data-dialog-content-area","")},m(a,f){I(e,a,f),w(a,n,f),w(a,r,f),P(r,i),P(r,s),P(r,o),I(u,o,null),l=!0},p(a,f){const c={};f&32768&&(c.$$scope={dirty:f,ctx:a}),e.$set(c);const d={};f&32768&&(d.$$scope={dirty:f,ctx:a}),u.$set(d)},i(a){l||(b(e.$$.fragment,a),b(u.$$.fragment,a),l=!0)},o(a){y(e.$$.fragment,a),y(u.$$.fragment,a),l=!1},d(a){a&&(C(n),C(r)),M(e,a),M(u)}}}function xy(t){let e,n,r,i;return e=new Ur({props:{transition:Es,class:"z-40"}}),r=new er({props:{class:"flex flex-col overflow-hidden z-50",$$slots:{default:[Jy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function e0(t){let e,n,r,i;return e=new tr({props:{class:"hidden"}}),r=new xn({props:{$$slots:{default:[xy]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment),n=K(),N(r.$$.fragment)},m(s,o){I(e,s,o),w(s,n,o),I(r,s,o),i=!0},p(s,o){const u={};o&32768&&(u.$$scope={dirty:o,ctx:s}),r.$set(u)},i(s){i||(b(e.$$.fragment,s),b(r.$$.fragment,s),i=!0)},o(s){y(e.$$.fragment,s),y(r.$$.fragment,s),i=!1},d(s){s&&C(n),M(e,s),M(r,s)}}}function t0(t){let e,n,r,i,s,o,u;const l=t[10].default,a=pe(l,t,t[15],null);return n=new Qn({props:{open:t[2]==="pending",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Uy]},$$scope:{ctx:t}}}),i=new Qn({props:{open:!t[3]&&t[2]==="error",closeOnEscape:!1,closeOnOutsideClick:!1,$$slots:{default:[Yy]},$$scope:{ctx:t}}}),o=new Qn({props:{open:t[3],onOpenChange:t[14],$$slots:{default:[e0]},$$scope:{ctx:t}}}),{c(){a&&a.c(),e=K(),N(n.$$.fragment),r=K(),N(i.$$.fragment),s=K(),N(o.$$.fragment)},m(f,c){a&&a.m(f,c),w(f,e,c),I(n,f,c),w(f,r,c),I(i,f,c),w(f,s,c),I(o,f,c),u=!0},p(f,[c]){a&&a.p&&(!u||c&32768)&&_e(a,l,f,f[15],u?he(l,f[15],c,null):ge(f[15]),null);const d={};c&4&&(d.open=f[2]==="pending"),c&32768&&(d.$$scope={dirty:c,ctx:f}),n.$set(d);const p={};c&12&&(p.open=!f[3]&&f[2]==="error"),c&32819&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const m={};c&8&&(m.open=f[3]),c&32768&&(m.$$scope={dirty:c,ctx:f}),o.$set(m)},i(f){u||(b(a,f),b(n.$$.fragment,f),b(i.$$.fragment,f),b(o.$$.fragment,f),u=!0)},o(f){y(a,f),y(n.$$.fragment,f),y(i.$$.fragment,f),y(o.$$.fragment,f),u=!1},d(f){f&&(C(e),C(r),C(s)),a&&a.d(f),M(n,f),M(i,f),M(o,f)}}}function n0(t,e,n){let r,i,s,o,{$$slots:u={},$$scope:l}=e;const a=kt(),f=Ln();J(t,f,$=>n(4,s=$));const c=Rr({queryKey:["auth","user"],queryFn:cn,retry:!1,refetchInterval:2e4});ft("currentUser",c);const d=Be([f,c],([$,k])=>$.isSuccess?k.isSuccess?"authenticated":k.isError?$.data.auth.provider==="no-auth"||$.data.auth.provider==="email"?(window.fetch("/api/auth/login",{method:"POST"}).then(L=>{L.ok&&a.invalidateQueries({queryKey:["auth"]})}),"authenticating"):"error":k.status:$.status);J(t,d,$=>n(2,r=$)),ft("authStatus",d);let p="",m="";const h=ki({mutationFn:async([$,k])=>{if((await window.fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:$,password:k})})).ok)a.invalidateQueries({queryKey:["auth"]}),a.invalidateQueries({queryKey:["branches"]}),n(0,p=""),n(1,m="");else throw"Authentication failed"}});J(t,h,$=>n(5,o=$));const v=Pe(!1);J(t,v,$=>n(3,i=$)),ft("hasLoggedOut",v);function g(){p=this.value,n(0,p)}function _(){m=this.value,n(1,m)}const E=$=>{$.preventDefault(),o.isPending||o.mutate([p,m])},A=$=>{$||v.set(!1)};return t.$$set=$=>{"$$scope"in $&&n(15,l=$.$$scope)},[p,m,r,i,s,o,f,d,h,v,u,g,_,E,A,l]}class r0 extends ve{constructor(e){super(),ye(this,e,n0,t0,fe,{})}}function i0(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function s0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=Ef("branch"),o=Ln(),u=Ho(),l=Be([o,u],([m,h])=>({queryKey:["branches"],queryFn:cn,refetchInterval:6e4,enabled:m.isSuccess&&m.data.ready&&h.isSuccess})),a=Rr(l);ft("branches",a);const f=Pe(null);ft("currentBranch",f);const c=o.subscribe(m=>{m.isSuccess&&m.data.ready&&!m.data.git.enabled&&f.set({id:"-",nogit:!0,title:"All files"})}),d=f.subscribe(m=>{m!==null?Cf("branch",m.id):d1("branch")}),p=a.subscribe(m=>{if(m.isSuccess){for(let h of m.data.local)h.id===s&&f.set(h);p()}});return ds(()=>{d(),c()}),t.$$set=m=>{"$$scope"in m&&n(0,i=m.$$scope)},[i,r]}class o0 extends ve{constructor(e){super(),ye(this,e,s0,i0,fe,{})}}var ni={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.cloneArrayBuffer=void 0;function l0(t){var e=new ArrayBuffer(t.byteLength);return new Uint8Array(e).set(new Uint8Array(t)),e}nr.cloneArrayBuffer=l0;var $i={};Object.defineProperty($i,"__esModule",{value:!0});$i.cloneDataView=void 0;var u0=nr;function a0(t){var e=(0,u0.cloneArrayBuffer)(t.buffer);return new DataView(e,t.byteOffset,t.byteLength)}$i.cloneDataView=a0;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.cloneDate=void 0;function f0(t){return new Date(t.getTime())}Ti.cloneDate=f0;var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.cloneRegExp=void 0;function c0(t){var e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}Si.cloneRegExp=c0;var Di={};Object.defineProperty(Di,"__esModule",{value:!0});Di.cloneTypedArray=void 0;var d0=nr,js={"[object Float32Array]":Float32Array,"[object Float64Array]":Float64Array,"[object Int8Array]":Int8Array,"[object Int16Array]":Int16Array,"[object Int32Array]":Int32Array,"[object Uint8Array]":Uint8Array,"[object Uint16Array]":Uint16Array,"[object Uint32Array]":Uint32Array,"[object Uint8ClampedArray]":Uint8ClampedArray};function m0(t){try{js["[object BigInt64Array]"]=BigInt64Array,js["[object BigUint64Array]"]=BigUint64Array}catch{}var e=(0,d0.cloneArrayBuffer)(t.buffer);return new js[Object.prototype.toString.call(t)](e,t.byteOffset,t.length)}Di.cloneTypedArray=m0;var Jr={},xr={},la;function p0(){if(la)return xr;la=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.cloneMap=void 0;var t=Df();function e(n){var r=new Map;return n.forEach(function(i,s){return r.set((0,t.deepCopy)(s),(0,t.deepCopy)(i))}),r}return xr.cloneMap=e,xr}var ua;function Df(){if(ua)return Jr;ua=1;var t=go&&go.__assign||function(){return t=Object.assign||function(a){for(var f,c=1,d=arguments.length;c<d;c++){f=arguments[c];for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(a[p]=f[p])}return a},t.apply(this,arguments)};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.deepCopy=void 0;var e=nr,n=$i,r=Ti,i=p0(),s=Si,o=Di,u={"[object Date]":r.cloneDate,"[object ArrayBuffer]":e.cloneArrayBuffer,"[object DataView]":n.cloneDataView,"[object Float32Array]":o.cloneTypedArray,"[object Float64Array]":o.cloneTypedArray,"[object Int8Array]":o.cloneTypedArray,"[object Int16Array]":o.cloneTypedArray,"[object Int32Array]":o.cloneTypedArray,"[object Uint8Array]":o.cloneTypedArray,"[object Uint8ClampedArray]":o.cloneTypedArray,"[object Uint16Array]":o.cloneTypedArray,"[object Uint32Array]":o.cloneTypedArray,"[object BigInt64Array]":o.cloneTypedArray,"[object BigUint64Array]":o.cloneTypedArray,"[object RegExp]":s.cloneRegExp,"[object Map]":i.cloneMap};function l(a){var f=Object.prototype.toString.call(a);if(u[f])return u[f](a);if(a===null)return a;if(a instanceof Array){var c=[];return a.forEach(function(p){c.push(p)}),c.map(function(p){return l(p)})}if(typeof a=="object"){var d=t({},a);return Object.keys(d).forEach(function(p){d[p]=l(d[p])}),d}return a}return Jr.deepCopy=l,Jr}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.deepCopy=t.cloneTypedArray=t.cloneRegExp=t.cloneDate=t.cloneDataView=t.cloneArrayBuffer=void 0;var e=nr;Object.defineProperty(t,"cloneArrayBuffer",{enumerable:!0,get:function(){return e.cloneArrayBuffer}});var n=$i;Object.defineProperty(t,"cloneDataView",{enumerable:!0,get:function(){return n.cloneDataView}});var r=Ti;Object.defineProperty(t,"cloneDate",{enumerable:!0,get:function(){return r.cloneDate}});var i=Si;Object.defineProperty(t,"cloneRegExp",{enumerable:!0,get:function(){return i.cloneRegExp}});var s=Di;Object.defineProperty(t,"cloneTypedArray",{enumerable:!0,get:function(){return s.cloneTypedArray}});var o=Df();Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return o.deepCopy}})})(ni);function h0(t){let e;const n=t[1].default,r=pe(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)&&_e(r,n,i,i[0],e?he(n,i[0],s,null):ge(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){y(r,i),e=!1},d(i){r&&r.d(i)}}}function _0(t,e,n){let{$$slots:r={},$$scope:i}=e;const s=Et(),o=Be(s,d=>d!==null?{queryKey:["branches",d.id,"configs","uedition"],queryFn:cn}:{queryKey:["branches","-","configs","uedition"],queryFn:cn,enabled:d!==null}),u=Rr(o);ft("uEditionConfig",u);const l=Be(s,d=>d!==null?{queryKey:["branches",d.id,"configs","ueditor"],queryFn:cn}:{queryKey:["branches","-","configs","ueditor"],queryFn:cn,enabled:!1}),a=Rr(l);ft("uEditorConfig",a);const f=Be([u,a],([d,p])=>{if(d.isSuccess&&p.isSuccess){let m=ni.deepCopy(p.data.tei.blocks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.blocks&&(m=m.concat(ni.deepCopy(d.data.sphinx_config.tei.blocks))),m}return[]});ft("configuredTEIBlocks",f);const c=Be([u,a],([d,p])=>{if(d.isSuccess&&p.isSuccess){let m=ni.deepCopy(p.data.tei.marks);return d.data.sphinx_config&&d.data.sphinx_config.tei&&d.data.sphinx_config.tei.marks&&(m=m.concat(ni.deepCopy(d.data.sphinx_config.tei.marks))),m}return[]});return ft("configuredTEIMarks",c),t.$$set=d=>{"$$scope"in d&&n(0,i=d.$$scope)},[i,r]}class g0 extends ve{constructor(e){super(),ye(this,e,_0,h0,fe,{})}}function b0(t){let e,n;return e=new Ay({}),{c(){N(e.$$.fragment)},m(r,i){I(e,r,i),n=!0},i(r){n||(b(e.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function y0(t){let e,n;return e=new g0({props:{$$slots:{default:[b0]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function v0(t){let e,n;return e=new o0({props:{$$slots:{default:[y0]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function k0(t){let e,n;return e=new r0({props:{$$slots:{default:[v0]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function C0(t){let e,n;return e=new Ny({props:{$$slots:{default:[k0]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function E0(t){let e,n;return e=new wc({props:{client:t[0],$$slots:{default:[C0]},$$scope:{ctx:t}}}),{c(){N(e.$$.fragment)},m(r,i){I(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){y(e.$$.fragment,r),n=!1},d(r){M(e,r)}}}function w0(t){return[new Na]}class O0 extends ve{constructor(e){super(),ye(this,e,w0,E0,fe,{})}}new O0({target:document.getElementById("app")});export{hr as $,N as A,I as B,G as C,$e as D,M as E,Te as F,X_ as G,t1 as H,Ne as I,Ae as J,zf as K,m1 as L,kt as M,wf as N,pu as O,Bt as P,Vt as Q,h2 as R,ve as S,x as T,L0 as U,Ci as V,M0 as W,Fe as X,ke as Y,Xe as Z,Pe as _,K as a,$n as a$,Be as a0,It as a1,Mr as a2,Jn as a3,ai as a4,zc as a5,es as a6,pr as a7,$c as a8,V0 as a9,I0 as aA,ze as aB,F0 as aC,bt as aD,H0 as aE,B0 as aF,pi as aG,wi as aH,ft as aI,Oi as aJ,st as aK,gf as aL,pe as aM,_e as aN,ge as aO,he as aP,Ke as aQ,Fn as aR,ie as aS,vt as aT,Oe as aU,le as aV,Ue as aW,Me as aX,Pn as aY,ct as aZ,Rn as a_,ii as aa,rt as ab,ae as ac,N0 as ad,qt as ae,Oc as af,oo as ag,on as ah,S0 as ai,D0 as aj,P0 as ak,R0 as al,di as am,Ft as an,xe as ao,us as ap,Pr as aq,Lr as ar,Pc as as,U0 as at,tl as au,ui as av,ht as aw,so as ax,gn as ay,To as az,H as b,Vm as b0,tn as b1,yi as b2,q0 as b3,K0 as b4,e2 as b5,P_ as b6,V_ as b7,Q0 as b8,W0 as b9,z0 as ba,j0 as bb,Z0 as bc,X0 as bd,G0 as be,Wo as bf,it as bg,n1 as bh,Qn as bi,Y0 as bj,tr as bk,xn as bl,Ur as bm,er as bn,Ct as bo,Rt as bp,$0 as bq,w as c,P as d,D as e,qe as f,de as g,y as h,ye as i,me as j,b as k,C as l,J as m,dt as n,Et as o,cs as p,ds as q,Ge as r,fe as s,Z as t,Ln as u,Ce as v,ce as w,e1 as x,z_ as y,Z_ as z};