studiograph 1.3.44-next.37 → 1.3.44-next.38

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.
Files changed (28) hide show
  1. package/dist/web/_app/immutable/chunks/{C7pMU0EF.js → BCef0pEe.js} +1 -1
  2. package/dist/web/_app/immutable/chunks/{DgzHP0Bp.js → BYCjG6ng.js} +1 -1
  3. package/dist/web/_app/immutable/chunks/{CH22R02s.js → BgXlDvQ1.js} +1 -1
  4. package/dist/web/_app/immutable/chunks/{DLVMYCcI.js → ChH5QYYQ.js} +1 -1
  5. package/dist/web/_app/immutable/chunks/{CuW7xG5N.js → Cl71QSIb.js} +1 -1
  6. package/dist/web/_app/immutable/chunks/{CfGGZQJj.js → Czp0K6Jj.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/{KhbASkK6.js → G_zxnLMy.js} +1 -1
  8. package/dist/web/_app/immutable/chunks/{DQ-yNuWC.js → RMTqoFZj.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{oDjgX3JQ.js → UYy36I9r.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{CRQdBO6S.js → ytVav0Ug.js} +1 -1
  11. package/dist/web/_app/immutable/entry/{app.TSbopjaF.js → app.CccsFRr3.js} +2 -2
  12. package/dist/web/_app/immutable/entry/start.-15L3C3p.js +1 -0
  13. package/dist/web/_app/immutable/nodes/{0.B7GVh9SW.js → 0.CuPSk376.js} +2 -2
  14. package/dist/web/_app/immutable/nodes/{1.CXOHcdad.js → 1.DELdT43Z.js} +1 -1
  15. package/dist/web/_app/immutable/nodes/{10.OJOHrQD5.js → 10.BK-5gila.js} +1 -1
  16. package/dist/web/_app/immutable/nodes/2.Cf9IVeUa.js +86 -0
  17. package/dist/web/_app/immutable/nodes/{3.DJD5vsW5.js → 3.B6Z5XVH7.js} +1 -1
  18. package/dist/web/_app/immutable/nodes/{4.AbWZ4v-8.js → 4.C2F4gyZW.js} +4 -4
  19. package/dist/web/_app/immutable/nodes/{5.DUlW2my1.js → 5.CdkSvjiz.js} +1 -1
  20. package/dist/web/_app/immutable/nodes/{6.EElsiS1h.js → 6.C0Le0wLH.js} +1 -1
  21. package/dist/web/_app/immutable/nodes/{7.Bgm7yqqb.js → 7.DKLTXQRz.js} +1 -1
  22. package/dist/web/_app/immutable/nodes/{8.D9jgtbZM.js → 8.B6uagsK1.js} +1 -1
  23. package/dist/web/_app/immutable/nodes/{9.pw-YflI0.js → 9.BsgiQGiB.js} +1 -1
  24. package/dist/web/_app/version.json +1 -1
  25. package/dist/web/index.html +6 -6
  26. package/package.json +1 -1
  27. package/dist/web/_app/immutable/entry/start.C7B7SCD6.js +0 -1
  28. package/dist/web/_app/immutable/nodes/2.D8M65WeS.js +0 -86
@@ -1 +1 @@
1
- import{e as i,f as y,g as r,s as n}from"./CT6oIU-C.js";import{g as l}from"./DQ-yNuWC.js";import{d as v,u as V,c as F,f as h}from"./CALGIiWi.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
1
+ import{e as i,f as y,g as r,s as n}from"./CT6oIU-C.js";import{g as l}from"./RMTqoFZj.js";import{d as v,u as V,c as F,f as h}from"./CALGIiWi.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
@@ -1 +1 @@
1
- import{s as e}from"./DQ-yNuWC.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./RMTqoFZj.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -1 +1 @@
1
- import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./oDjgX3JQ.js";const T=3e4;class $ extends _{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=b();this.getLocalState()!==null&&T/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&T<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&Y(this,s,"timeout")},P(T/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:b()});const i=[],u=[],r=[],f=[];n===null?f.push(e):c==null?n!=null&&i.push(e):(u.push(e),W(c,n)||r.push(e)),(i.length>0||r.length>0||f.length>0)&&this.emit("change",[{added:i,updated:r,removed:f},"local"]),this.emit("update",[{added:i,updated:u,removed:f},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const Y=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const i=t.meta.get(c);t.meta.set(c,{clock:i.clock+1,lastUpdated:b()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},H=(t,n,e=t.states)=>{const s=n.length,a=A();m(a,s);for(let c=0;c<s;c++){const i=n[c],u=e.get(i)||null,r=t.meta.get(i).clock;m(a,i),m(a,r),G(a,JSON.stringify(u))}return k(a)},tt=(t,n,e)=>{const s=j(n),a=b(),c=[],i=[],u=[],r=[],f=I(s);for(let w=0;w<f;w++){const d=I(s);let y=I(s);const h=JSON.parse(q(s)),g=t.meta.get(d),U=t.states.get(d),S=g===void 0?0:g.clock;(S<y||S===y&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?y++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:y,lastUpdated:a}),g===void 0&&h!==null?c.push(d):g!==void 0&&h===null?r.push(d):h!==null&&(W(h,U)||u.push(d),i.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||i.length>0||r.length>0)&&t.emit("update",[{added:c,updated:i,removed:r},e])},B=0,M=1,N=2,et=(t,n)=>{m(t,B);const e=R(n);V(t,e)},nt=(t,n,e)=>{m(t,M),V(t,K(n,e))},st=(t,n,e)=>nt(n,e,C(t)),F=(t,n,e,s)=>{try{z(n,C(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},at=(t,n)=>{m(t,N),V(t,n)},ct=F,ot=(t,n,e,s,a)=>{const c=I(t);switch(c){case B:st(t,n,e);break;case M:F(t,e,s,a);break;case N:ct(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},L=0,x=1;function it(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function lt(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function ut(t,n){const e=new Q,s=e.getText("content"),a=new $(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,i=!1,u=!1;function r(){return O.ws??null}function f(o,p){const l=r();!l||l.readyState!==WebSocket.OPEN||l.send(it(t,o,p))}function w(){const o=A();et(o,e),f(L,k(o))}function d(o){const p=o??[e.clientID],l=H(a,p);f(x,l)}function y(o){if(i||typeof o.data=="string")return;const p=o.data instanceof ArrayBuffer?o.data:null;if(!p)return;const l=lt(p);if(!(!l||l.docName!==t))if(l.msgType===L){const v=j(l.payload),D=X(v),E=A();ot(v,E,e,"ws-server"),Z(E)>0&&f(L,k(E)),!u&&(D===M||D===N)&&(u=!0,S.synced=!0)}else l.msgType===x&&tt(a,l.payload,"ws-server")}function h(o,p){if(i||p==="ws-server")return;const l=A();at(l,o),f(L,k(l))}function g({added:o,updated:p,removed:l},v){if(i||v==="ws-server")return;const D=o.concat(p,l);d(D)}function U(){if(i)return;const o=r();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=y,o.addEventListener("message",c),w(),d())}const S={ydoc:e,ytext:s,awareness:a,synced:!1,destroy:J};e.on("update",h),a.on("update",g),U(),O.addConnectHandler(U);function J(){if(i)return;i=!0,Y(a,[e.clientID],"local"),d([e.clientID]);const o=r();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",h),a.off("update",g),a.destroy(),e.destroy()}return S}export{ut as createCollabSession};
1
+ import{O as _,f as P,g as b,e as W,w as m,a as G,t as k,c as A,r as I,b as q,d as j,h as V,i as R,j as z,k as C,l as K,D as Q,p as X,m as Z}from"./CSVbGg_b.js";import{r as O}from"./UYy36I9r.js";const T=3e4;class $ extends _{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=b();this.getLocalState()!==null&&T/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&T<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&Y(this,s,"timeout")},P(T/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:b()});const i=[],u=[],r=[],f=[];n===null?f.push(e):c==null?n!=null&&i.push(e):(u.push(e),W(c,n)||r.push(e)),(i.length>0||r.length>0||f.length>0)&&this.emit("change",[{added:i,updated:r,removed:f},"local"]),this.emit("update",[{added:i,updated:u,removed:f},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const Y=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const i=t.meta.get(c);t.meta.set(c,{clock:i.clock+1,lastUpdated:b()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},H=(t,n,e=t.states)=>{const s=n.length,a=A();m(a,s);for(let c=0;c<s;c++){const i=n[c],u=e.get(i)||null,r=t.meta.get(i).clock;m(a,i),m(a,r),G(a,JSON.stringify(u))}return k(a)},tt=(t,n,e)=>{const s=j(n),a=b(),c=[],i=[],u=[],r=[],f=I(s);for(let w=0;w<f;w++){const d=I(s);let y=I(s);const h=JSON.parse(q(s)),g=t.meta.get(d),U=t.states.get(d),S=g===void 0?0:g.clock;(S<y||S===y&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?y++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:y,lastUpdated:a}),g===void 0&&h!==null?c.push(d):g!==void 0&&h===null?r.push(d):h!==null&&(W(h,U)||u.push(d),i.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||i.length>0||r.length>0)&&t.emit("update",[{added:c,updated:i,removed:r},e])},B=0,M=1,N=2,et=(t,n)=>{m(t,B);const e=R(n);V(t,e)},nt=(t,n,e)=>{m(t,M),V(t,K(n,e))},st=(t,n,e)=>nt(n,e,C(t)),F=(t,n,e,s)=>{try{z(n,C(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},at=(t,n)=>{m(t,N),V(t,n)},ct=F,ot=(t,n,e,s,a)=>{const c=I(t);switch(c){case B:st(t,n,e);break;case M:F(t,e,s,a);break;case N:ct(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},L=0,x=1;function it(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function lt(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function ut(t,n){const e=new Q,s=e.getText("content"),a=new $(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,i=!1,u=!1;function r(){return O.ws??null}function f(o,p){const l=r();!l||l.readyState!==WebSocket.OPEN||l.send(it(t,o,p))}function w(){const o=A();et(o,e),f(L,k(o))}function d(o){const p=o??[e.clientID],l=H(a,p);f(x,l)}function y(o){if(i||typeof o.data=="string")return;const p=o.data instanceof ArrayBuffer?o.data:null;if(!p)return;const l=lt(p);if(!(!l||l.docName!==t))if(l.msgType===L){const v=j(l.payload),D=X(v),E=A();ot(v,E,e,"ws-server"),Z(E)>0&&f(L,k(E)),!u&&(D===M||D===N)&&(u=!0,S.synced=!0)}else l.msgType===x&&tt(a,l.payload,"ws-server")}function h(o,p){if(i||p==="ws-server")return;const l=A();at(l,o),f(L,k(l))}function g({added:o,updated:p,removed:l},v){if(i||v==="ws-server")return;const D=o.concat(p,l);d(D)}function U(){if(i)return;const o=r();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=y,o.addEventListener("message",c),w(),d())}const S={ydoc:e,ytext:s,awareness:a,synced:!1,destroy:J};e.on("update",h),a.on("update",g),U(),O.addConnectHandler(U);function J(){if(i)return;i=!0,Y(a,[e.clientID],"local"),d([e.clientID]);const o=r();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",h),a.off("update",g),a.destroy(),e.destroy()}return S}export{ut as createCollabSession};
@@ -1 +1 @@
1
- import{p as ae,c as A,a as d,b as B,s as ee,f as he,t as ne}from"./iDtAARVW.js";import{p as G,h as S,b as N,g as i,c as U,ad as X,r as z,u as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,i as ie}from"./CT6oIU-C.js";import{b as H,a as j}from"./CmCtpZ1Y.js";import{i as q}from"./72bZS3G9.js";import{p as s,r as oe,s as pe,l as _e}from"./cLyZlkXv.js";import{j as se,n as J,M as Me,k as b,m as Q,l as we,o as Ce,p as Se,F as xe,q as Oe,P as Ae,r as Fe,t as ge,D as Ie,u as Re,v as ke,A as Ee,x as Le,y as He,z as Ke,B as Te,G as Ue,H as ze,I as De}from"./C2r294J6.js";import{r as ce}from"./oDjgX3JQ.js";import{i as je}from"./Y90OgS-9.js";import{c as D}from"./CXH6iFbA.js";import{a as me}from"./BS2rFAVq.js";var Be=B("<div><!></div>");function Ve(c,e){const l=ae();G(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=s(e,"disabled",3,!1),M=s(e,"onSelect",3,J),P=s(e,"closeOnSelect",3,!0),f=oe(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const w=Me.create({id:b(()=>p()),disabled:b(()=>_()),onSelect:b(()=>M()),ref:b(()=>m(),r=>m(r)),closeOnSelect:b(()=>P())}),u=L(()=>Q(f,w.props));var x=A(),a=S(x);{var t=r=>{var o=A(),h=S(o);H(h,()=>e.child,()=>({props:i(u)})),d(r,o)},n=r=>{var o=Be();j(o,()=>({...i(u)}));var h=U(o);H(h,()=>e.children??X),z(o),d(r,o)};q(a,r=>{e.child?r(t):r(n,!1)})}d(c,x),N()}var Ze=B("<div><!></div>");function We(c,e){const l=ae();G(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=oe(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const M=we.create({id:b(()=>p()),ref:b(()=>m(),a=>m(a))}),P=L(()=>Q(_,M.props));var f=A(),w=S(f);{var u=a=>{var t=A(),n=S(t);H(n,()=>e.child,()=>({props:i(P)})),d(a,t)},x=a=>{var t=Ze();j(t,()=>({...i(P)}));var n=U(t);H(n,()=>e.children??X),z(t),d(a,t)};q(w,a=>{e.child?a(u):a(x,!1)})}d(c,f),N()}function qe(c,e){G(e,!0);let l=s(e,"open",15,!1),m=s(e,"dir",3,"ltr"),p=s(e,"onOpenChange",3,J),_=s(e,"onOpenChangeComplete",3,J),M=s(e,"_internal_variant",3,"dropdown-menu");const P=Ce.create({variant:b(()=>M()),dir:b(()=>m()),onClose:()=>{l(!1),p()(!1)}});Se.create({open:b(()=>l(),f=>{l(f),p()(f)}),onOpenChangeComplete:b(()=>_())},P),xe(c,{children:(f,w)=>{var u=A(),x=S(u);H(x,()=>e.children??X),d(f,u)},$$slots:{default:!0}}),N()}var Ge=B("<div><div><!></div></div>"),Ne=B("<div><div><!></div></div>");function Ye(c,e){const l=ae();G(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"loop",3,!0),M=s(e,"onInteractOutside",3,J),P=s(e,"onEscapeKeydown",3,J),f=s(e,"onCloseAutoFocus",3,J),w=s(e,"forceMount",3,!1),u=s(e,"trapFocus",3,!1),x=oe(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const a=Oe.create({id:b(()=>m()),loop:b(()=>_()),ref:b(()=>p(),g=>p(g)),onCloseAutoFocus:b(()=>f())}),t=L(()=>Q(x,a.props));function n(g){if(a.handleInteractOutside(g),!g.defaultPrevented&&(M()(g),!g.defaultPrevented)){if(g.target&&g.target instanceof Element){const V=`[${a.parentMenu.root.getBitsAttr("sub-content")}]`;if(g.target.closest(V))return}a.parentMenu.onClose()}}function r(g){P()(g),!g.defaultPrevented&&a.parentMenu.onClose()}var o=A(),h=S(o);{var O=g=>{Ae(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get enabled(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!0,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,K)=>{let $=()=>K?.().props,F=()=>K?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));H(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ge();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);H(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))},Y=g=>{Fe(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get open(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!1,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,K)=>{let $=()=>K?.().props,F=()=>K?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));H(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ne();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);H(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))};q(h,g=>{w()?g(O):w()||g(Y,1)})}d(c,o),N()}var Je=B("<button><!></button>");function Qe(c,e){const l=ae();G(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"disabled",3,!1),M=s(e,"type",3,"button"),P=oe(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const f=Ie.create({id:b(()=>m()),disabled:b(()=>_()??!1),ref:b(()=>p(),u=>p(u))}),w=L(()=>Q(P,f.props,{type:M()}));Re(c,{get id(){return m()},get ref(){return f.opts.ref},children:(u,x)=>{var a=A(),t=S(a);{var n=o=>{var h=A(),O=S(h);H(O,()=>e.child,()=>({props:i(w)})),d(o,h)},r=o=>{var h=Je();j(h,()=>({...i(w)}));var O=U(h);H(O,()=>e.children??X),z(h),d(o,h)};q(t,o=>{e.child?o(n):o(r,!1)})}d(u,a)},$$slots:{default:!0}}),N()}const pt=qe,_t=Qe,gt=ke,mt=Ye,ht=Ve,Pt=We;function Xe(){let c=Pe(ye({})),e=null,l=null;function m(t,n,r){l&&(clearInterval(l),l=null),e=`${t}/${n}/${r}`,_("enter",t,n,r),l=setInterval(()=>{e&&_("heartbeat",t,n,r)},3e4)}function p(){if(l&&(clearInterval(l),l=null),e){const[t,n,r]=e.split("/");t&&n&&r&&_("leave",t,n,r),e=null}}function _(t,n,r,o){ce.send({type:"presence",action:t,repo:n,entityType:r,entityId:o})}function M(t){const n=`${t.repo}/${t.entityType}/${t.entityId}`,r=i(c)[n]??[];if(t.action==="leave")i(c)[n]=r.filter(o=>o.id!==t.user.id);else{const o=r.findIndex(h=>h.id===t.user.id);o>=0?(r[o]=t.user,i(c)[n]=[...r]):i(c)[n]=[...r,t.user]}}function P(){if(de(c,{},!0),!e)return;const[t,n,r]=e.split("/");t&&n&&r&&_("enter",t,n,r)}function f(t,n,r,o){const h=`${t}/${n}/${r}`,O=i(c)[h]??[];return o?O.filter(Y=>Y.id!==o):O}function w(t,n){const r=new Map;for(const[o,h]of Object.entries(i(c)))if(o.startsWith(t))for(const O of h)(!n||O.id!==n)&&r.set(O.id,O);return[...r.values()]}function u(t,n){return w(`${t}/`,n)}function x(t){const n=new Map;for(const r of Object.values(i(c)))for(const o of r)(!t||o.id!==t)&&n.set(o.id,o);return[...n.values()]}const a=L(()=>{const t=new Map;for(const n of Object.values(i(c)))for(const r of n)t.set(r.id,r);return[...t.values()]});return{enter:m,leave:p,handlePresenceEvent:M,resetAndResend:P,getPresence:f,getPresenceByPrefix:w,getRepoPresence:u,getAllUsers:x,get allUsers(){return i(a)}}}const ue=Xe();ce.setPresenceHandler(c=>ue.handlePresenceEvent(c));ce.addConnectHandler(()=>ue.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>ue.leave());var $e=he("<title> </title>"),et=he('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function yt(c,e){const l=_e(e,["children","$$slots","$$events","$$legacy"]),m=_e(l,["size","title"]);G(e,!1);const p=ve(),_=ve();let M=s(e,"size",8,16),P=s(e,"title",8,void 0);fe(()=>(le(l),le(P())),()=>{de(p,l["aria-label"]||l["aria-labelledby"]||P())}),fe(()=>(i(p),le(l)),()=>{de(_,{"aria-hidden":i(p)?void 0:!0,role:i(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),be(),je();var f=et();j(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:M(),height:M(),...i(_),...m}));var w=U(f);{var u=x=>{var a=$e(),t=U(a,!0);z(a),re(()=>ee(t,P())),d(x,a)};q(w,x=>{P()&&x(u)})}te(2),z(f),d(c,f),N()}var tt=B("<!> <!>",1),rt=B("<!> <!>",1),nt=B("<!> <!>",1);function bt(c,e){G(e,!0);let l=s(e,"open",15),m=s(e,"confirmLabel",3,"Confirm"),p=s(e,"cancelLabel",3,"Cancel"),_=s(e,"destructive",3,!1);var M=A(),P=S(M);D(P,()=>De,(f,w)=>{w(f,{onOpenChange:u=>{u||e.oncancel()},get open(){return l()},set open(u){l(u)},children:(u,x)=>{var a=A(),t=S(a);D(t,()=>Ee,(n,r)=>{r(n,{children:(o,h)=>{var O=nt(),Y=S(O);D(Y,()=>Le,(V,Z)=>{Z(V,{children:(K,$)=>{var F=tt(),I=S(F);D(I,()=>He,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.title)),d(E,v)},$$slots:{default:!0}})});var T=ie(I,2);D(T,()=>Ke,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.message)),d(E,v)},$$slots:{default:!0}})}),d(K,F)},$$slots:{default:!0}})});var g=ie(Y,2);D(g,()=>Te,(V,Z)=>{Z(V,{children:(K,$)=>{var F=rt(),I=S(F);{let R=L(()=>me({variant:"ghost"}));D(I,()=>Ue,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.oncancel},children:(y,v)=>{te();var C=ne();re(()=>ee(C,p())),d(y,C)},$$slots:{default:!0}})})}var T=ie(I,2);{let R=L(()=>me({variant:_()?"destructive":"accent"}));D(T,()=>ze,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.onconfirm},children:(y,v)=>{te();var C=ne();re(()=>ee(C,m())),d(y,C)},$$slots:{default:!0}})})}d(K,F)},$$slots:{default:!0}})}),d(o,O)},$$slots:{default:!0}})}),d(u,a)},$$slots:{default:!0}})}),d(c,M),N()}export{mt as C,ht as I,gt as P,pt as R,Pt as S,_t as T,yt as a,bt as b,ue as p};
1
+ import{p as ae,c as A,a as d,b as B,s as ee,f as he,t as ne}from"./iDtAARVW.js";import{p as G,h as S,b as N,g as i,c as U,ad as X,r as z,u as L,e as Pe,f as ye,s as de,l as fe,d as le,a as be,n as te,m as ve,t as re,i as ie}from"./CT6oIU-C.js";import{b as H,a as j}from"./CmCtpZ1Y.js";import{i as q}from"./72bZS3G9.js";import{p as s,r as oe,s as pe,l as _e}from"./cLyZlkXv.js";import{j as se,n as J,M as Me,k as b,m as Q,l as we,o as Ce,p as Se,F as xe,q as Oe,P as Ae,r as Fe,t as ge,D as Ie,u as Re,v as ke,A as Ee,x as Le,y as He,z as Ke,B as Te,G as Ue,H as ze,I as De}from"./C2r294J6.js";import{r as ce}from"./UYy36I9r.js";import{i as je}from"./Y90OgS-9.js";import{c as D}from"./CXH6iFbA.js";import{a as me}from"./BS2rFAVq.js";var Be=B("<div><!></div>");function Ve(c,e){const l=ae();G(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=s(e,"disabled",3,!1),M=s(e,"onSelect",3,J),P=s(e,"closeOnSelect",3,!0),f=oe(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const w=Me.create({id:b(()=>p()),disabled:b(()=>_()),onSelect:b(()=>M()),ref:b(()=>m(),r=>m(r)),closeOnSelect:b(()=>P())}),u=L(()=>Q(f,w.props));var x=A(),a=S(x);{var t=r=>{var o=A(),h=S(o);H(h,()=>e.child,()=>({props:i(u)})),d(r,o)},n=r=>{var o=Be();j(o,()=>({...i(u)}));var h=U(o);H(h,()=>e.children??X),z(o),d(r,o)};q(a,r=>{e.child?r(t):r(n,!1)})}d(c,x),N()}var Ze=B("<div><!></div>");function We(c,e){const l=ae();G(e,!0);let m=s(e,"ref",15,null),p=s(e,"id",19,()=>se(l)),_=oe(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const M=we.create({id:b(()=>p()),ref:b(()=>m(),a=>m(a))}),P=L(()=>Q(_,M.props));var f=A(),w=S(f);{var u=a=>{var t=A(),n=S(t);H(n,()=>e.child,()=>({props:i(P)})),d(a,t)},x=a=>{var t=Ze();j(t,()=>({...i(P)}));var n=U(t);H(n,()=>e.children??X),z(t),d(a,t)};q(w,a=>{e.child?a(u):a(x,!1)})}d(c,f),N()}function qe(c,e){G(e,!0);let l=s(e,"open",15,!1),m=s(e,"dir",3,"ltr"),p=s(e,"onOpenChange",3,J),_=s(e,"onOpenChangeComplete",3,J),M=s(e,"_internal_variant",3,"dropdown-menu");const P=Ce.create({variant:b(()=>M()),dir:b(()=>m()),onClose:()=>{l(!1),p()(!1)}});Se.create({open:b(()=>l(),f=>{l(f),p()(f)}),onOpenChangeComplete:b(()=>_())},P),xe(c,{children:(f,w)=>{var u=A(),x=S(u);H(x,()=>e.children??X),d(f,u)},$$slots:{default:!0}}),N()}var Ge=B("<div><div><!></div></div>"),Ne=B("<div><div><!></div></div>");function Ye(c,e){const l=ae();G(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"loop",3,!0),M=s(e,"onInteractOutside",3,J),P=s(e,"onEscapeKeydown",3,J),f=s(e,"onCloseAutoFocus",3,J),w=s(e,"forceMount",3,!1),u=s(e,"trapFocus",3,!1),x=oe(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const a=Oe.create({id:b(()=>m()),loop:b(()=>_()),ref:b(()=>p(),g=>p(g)),onCloseAutoFocus:b(()=>f())}),t=L(()=>Q(x,a.props));function n(g){if(a.handleInteractOutside(g),!g.defaultPrevented&&(M()(g),!g.defaultPrevented)){if(g.target&&g.target instanceof Element){const V=`[${a.parentMenu.root.getBitsAttr("sub-content")}]`;if(g.target.closest(V))return}a.parentMenu.onClose()}}function r(g){P()(g),!g.defaultPrevented&&a.parentMenu.onClose()}var o=A(),h=S(o);{var O=g=>{Ae(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get enabled(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!0,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,K)=>{let $=()=>K?.().props,F=()=>K?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));H(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ge();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);H(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))},Y=g=>{Fe(g,pe(()=>i(t),()=>a.popperProps,{get ref(){return a.opts.ref},get open(){return a.parentMenu.opts.open.current},onInteractOutside:n,onEscapeKeydown:r,get trapFocus(){return u()},get loop(){return _()},forceMount:!1,get id(){return m()},get shouldRender(){return a.shouldRender},popper:(Z,K)=>{let $=()=>K?.().props,F=()=>K?.().wrapperProps;const I=L(()=>Q($(),{style:ge("dropdown-menu")},{style:e.style}));var T=A(),R=S(T);{var k=y=>{var v=A(),C=S(v);{let W=L(()=>({props:i(I),wrapperProps:F(),...a.snippetProps}));H(C,()=>e.child,()=>i(W))}d(y,v)},E=y=>{var v=Ne();j(v,()=>({...F()}));var C=U(v);j(C,()=>({...i(I)}));var W=U(C);H(W,()=>e.children??X),z(C),z(v),d(y,v)};q(R,y=>{e.child?y(k):y(E,!1)})}d(Z,T)},$$slots:{popper:!0}}))};q(h,g=>{w()?g(O):w()||g(Y,1)})}d(c,o),N()}var Je=B("<button><!></button>");function Qe(c,e){const l=ae();G(e,!0);let m=s(e,"id",19,()=>se(l)),p=s(e,"ref",15,null),_=s(e,"disabled",3,!1),M=s(e,"type",3,"button"),P=oe(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const f=Ie.create({id:b(()=>m()),disabled:b(()=>_()??!1),ref:b(()=>p(),u=>p(u))}),w=L(()=>Q(P,f.props,{type:M()}));Re(c,{get id(){return m()},get ref(){return f.opts.ref},children:(u,x)=>{var a=A(),t=S(a);{var n=o=>{var h=A(),O=S(h);H(O,()=>e.child,()=>({props:i(w)})),d(o,h)},r=o=>{var h=Je();j(h,()=>({...i(w)}));var O=U(h);H(O,()=>e.children??X),z(h),d(o,h)};q(t,o=>{e.child?o(n):o(r,!1)})}d(u,a)},$$slots:{default:!0}}),N()}const pt=qe,_t=Qe,gt=ke,mt=Ye,ht=Ve,Pt=We;function Xe(){let c=Pe(ye({})),e=null,l=null;function m(t,n,r){l&&(clearInterval(l),l=null),e=`${t}/${n}/${r}`,_("enter",t,n,r),l=setInterval(()=>{e&&_("heartbeat",t,n,r)},3e4)}function p(){if(l&&(clearInterval(l),l=null),e){const[t,n,r]=e.split("/");t&&n&&r&&_("leave",t,n,r),e=null}}function _(t,n,r,o){ce.send({type:"presence",action:t,repo:n,entityType:r,entityId:o})}function M(t){const n=`${t.repo}/${t.entityType}/${t.entityId}`,r=i(c)[n]??[];if(t.action==="leave")i(c)[n]=r.filter(o=>o.id!==t.user.id);else{const o=r.findIndex(h=>h.id===t.user.id);o>=0?(r[o]=t.user,i(c)[n]=[...r]):i(c)[n]=[...r,t.user]}}function P(){if(de(c,{},!0),!e)return;const[t,n,r]=e.split("/");t&&n&&r&&_("enter",t,n,r)}function f(t,n,r,o){const h=`${t}/${n}/${r}`,O=i(c)[h]??[];return o?O.filter(Y=>Y.id!==o):O}function w(t,n){const r=new Map;for(const[o,h]of Object.entries(i(c)))if(o.startsWith(t))for(const O of h)(!n||O.id!==n)&&r.set(O.id,O);return[...r.values()]}function u(t,n){return w(`${t}/`,n)}function x(t){const n=new Map;for(const r of Object.values(i(c)))for(const o of r)(!t||o.id!==t)&&n.set(o.id,o);return[...n.values()]}const a=L(()=>{const t=new Map;for(const n of Object.values(i(c)))for(const r of n)t.set(r.id,r);return[...t.values()]});return{enter:m,leave:p,handlePresenceEvent:M,resetAndResend:P,getPresence:f,getPresenceByPrefix:w,getRepoPresence:u,getAllUsers:x,get allUsers(){return i(a)}}}const ue=Xe();ce.setPresenceHandler(c=>ue.handlePresenceEvent(c));ce.addConnectHandler(()=>ue.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>ue.leave());var $e=he("<title> </title>"),et=he('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function yt(c,e){const l=_e(e,["children","$$slots","$$events","$$legacy"]),m=_e(l,["size","title"]);G(e,!1);const p=ve(),_=ve();let M=s(e,"size",8,16),P=s(e,"title",8,void 0);fe(()=>(le(l),le(P())),()=>{de(p,l["aria-label"]||l["aria-labelledby"]||P())}),fe(()=>(i(p),le(l)),()=>{de(_,{"aria-hidden":i(p)?void 0:!0,role:i(p)?"img":void 0,focusable:Number(l.tabindex)===0?!0:void 0})}),be(),je();var f=et();j(f,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:M(),height:M(),...i(_),...m}));var w=U(f);{var u=x=>{var a=$e(),t=U(a,!0);z(a),re(()=>ee(t,P())),d(x,a)};q(w,x=>{P()&&x(u)})}te(2),z(f),d(c,f),N()}var tt=B("<!> <!>",1),rt=B("<!> <!>",1),nt=B("<!> <!>",1);function bt(c,e){G(e,!0);let l=s(e,"open",15),m=s(e,"confirmLabel",3,"Confirm"),p=s(e,"cancelLabel",3,"Cancel"),_=s(e,"destructive",3,!1);var M=A(),P=S(M);D(P,()=>De,(f,w)=>{w(f,{onOpenChange:u=>{u||e.oncancel()},get open(){return l()},set open(u){l(u)},children:(u,x)=>{var a=A(),t=S(a);D(t,()=>Ee,(n,r)=>{r(n,{children:(o,h)=>{var O=nt(),Y=S(O);D(Y,()=>Le,(V,Z)=>{Z(V,{children:(K,$)=>{var F=tt(),I=S(F);D(I,()=>He,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.title)),d(E,v)},$$slots:{default:!0}})});var T=ie(I,2);D(T,()=>Ke,(R,k)=>{k(R,{children:(E,y)=>{te();var v=ne();re(()=>ee(v,e.message)),d(E,v)},$$slots:{default:!0}})}),d(K,F)},$$slots:{default:!0}})});var g=ie(Y,2);D(g,()=>Te,(V,Z)=>{Z(V,{children:(K,$)=>{var F=rt(),I=S(F);{let R=L(()=>me({variant:"ghost"}));D(I,()=>Ue,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.oncancel},children:(y,v)=>{te();var C=ne();re(()=>ee(C,p())),d(y,C)},$$slots:{default:!0}})})}var T=ie(I,2);{let R=L(()=>me({variant:_()?"destructive":"accent"}));D(T,()=>ze,(k,E)=>{E(k,{get class(){return i(R)},get onclick(){return e.onconfirm},children:(y,v)=>{te();var C=ne();re(()=>ee(C,m())),d(y,C)},$$slots:{default:!0}})})}d(K,F)},$$slots:{default:!0}})}),d(o,O)},$$slots:{default:!0}})}),d(u,a)},$$slots:{default:!0}})}),d(c,M),N()}export{mt as C,ht as I,gt as P,pt as R,Pt as S,_t as T,yt as a,bt as b,ue as p};
@@ -1 +1 @@
1
- import{p as nt,c as q,a as n,b as z,s as He,f as Oe,d as ut,g as L,t as Fe,e as pt}from"./iDtAARVW.js";import{e as T,s,g as t,u as k,p as _e,h as w,b as be,c as f,ad as We,r as g,l as Ae,d as te,a as Ge,n as J,m as xe,t as de,aC as ht,a5 as vt,i as I}from"./CT6oIU-C.js";import{b as ue,a as pe,r as ft,s as gt}from"./CmCtpZ1Y.js";import{i as F,b as mt}from"./72bZS3G9.js";import{e as _t}from"./CDV5Q7RN.js";import{c as Y}from"./CXH6iFbA.js";import{s as Re}from"./DGbA7IXh.js";import{b as bt,B as yt}from"./BS2rFAVq.js";import{p as i,s as Xe,r as st,l as Ve}from"./cLyZlkXv.js";import{g as et}from"./DQ-yNuWC.js";import{i as je}from"./Y90OgS-9.js";import{S as wt,A as Ct,C as tt}from"./Q7isgklS.js";import{n as ee}from"./CygV1PFY.js";import{v as Ee}from"./C7pMU0EF.js";import{w as Pt}from"./CALGIiWi.js";import{C as Ht,a as at,J as At,w as it,K as $e,E as xt,S as Vt,L as lt,c as Ot,i as Ye,N as kt,O as ot,k as D,f as Dt,j as ct,n as Pe,P as zt,r as It,m as Se,t as rt,u as Tt,F as Mt,A as Nt,x as Ft,y as Rt,z as Et,B as St,G as Wt,H as $t,I as Kt}from"./C2r294J6.js";const qe=Dt({component:"popover",parts:["root","trigger","content","close","overlay"]}),Je=new Ht("Popover.Root");class Ue{static create(e){return Je.set(new Ue(e))}opts;#e=T(null);get contentNode(){return t(this.#e)}set contentNode(e){s(this.#e,e,!0)}contentPresence;#t=T(null);get triggerNode(){return t(this.#t)}set triggerNode(e){s(this.#t,e,!0)}#r=T(null);get overlayNode(){return t(this.#r)}set overlayNode(e){s(this.#r,e,!0)}overlayPresence;#s=T(!1);get openedViaHover(){return t(this.#s)}set openedViaHover(e){s(this.#s,e,!0)}#a=T(!1);get hasInteractedWithContent(){return t(this.#a)}set hasInteractedWithContent(e){s(this.#a,e,!0)}#i=T(!1);get hoverCooldown(){return t(this.#i)}set hoverCooldown(e){s(this.#i,e,!0)}#c=T(0);get closeDelay(){return t(this.#c)}set closeDelay(e){s(this.#c,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new ot({ref:D(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ot({ref:D(()=>this.overlayNode),open:this.opts.open}),it(()=>this.opts.open.current,o=>{o||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#n())})}setDomContext(e){this.#l=e}#n(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#n(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#n(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#n(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#n(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#n()}markInteraction(){this.hasInteractedWithContent=!0,this.#n()}}class Ze{static create(e){return new Ze(e,Je.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=T(!1);constructor(e,o){this.opts=e,this.root=o,this.attachment=at(this.opts.ref,c=>this.root.triggerNode=c),this.domContext=new At(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),it(()=>this.opts.closeDelay.current,c=>{this.root.closeDelay=c})}#s(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#a(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#i(){this.#s(),this.#a()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||$e(e)||(s(this.#r,!0),this.#a(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const o=this.opts.openDelay.current;o<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},o)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&($e(e)||(s(this.#r,!1),this.#s(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#i(),t(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}t(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===xt||e.key===Vt)&&(e.preventDefault(),this.#i(),this.root.toggleOpen())}#c(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=k(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Ot(this.root.opts.open.current),"data-state":lt(this.root.opts.open.current),"aria-controls":this.#c(),[qe.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return t(this.#o)}set props(e){s(this.#o,e)}}class Qe{static create(e){return new Qe(e,Je.get())}opts;root;attachment;constructor(e,o){this.opts=e,this.root=o,this.attachment=at(this.opts.ref,c=>this.root.contentNode=c),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new wt({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const o=e.target;Ye(o)&&kt(o)&&this.root.markInteraction()}onpointerenter(e){$e(e)||this.root.cancelDelayedClose()}onpointerleave(e){$e(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!Ye(e.target))return;const o=e.target.closest(qe.selector("trigger"));if(!(o&&o===this.root.triggerNode)){if(this.opts.customAnchor.current){if(Ye(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const c=document.querySelector(this.opts.customAnchor.current);if(c&&c.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return t(this.#e)}set snippetProps(e){s(this.#e,e)}#t=k(()=>({id:this.opts.id.current,tabindex:-1,"data-state":lt(this.root.opts.open.current),[qe.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return t(this.#t)}set props(e){s(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Bt=z("<div><div><!></div></div>"),Lt=z("<div><div><!></div></div>");function Yt(M,e){const o=nt();_e(e,!0);let c=i(e,"ref",15,null),a=i(e,"id",19,()=>ct(o)),m=i(e,"forceMount",3,!1),x=i(e,"onOpenAutoFocus",3,Pe),u=i(e,"onCloseAutoFocus",3,Pe),p=i(e,"onEscapeKeydown",3,Pe),R=i(e,"onInteractOutside",3,Pe),C=i(e,"trapFocus",3,!0),d=i(e,"preventScroll",3,!1),h=i(e,"customAnchor",3,null),y=st(e,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const H=Qe.create({id:D(()=>a()),ref:D(()=>c(),V=>c(V)),onInteractOutside:D(()=>R()),onEscapeKeydown:D(()=>p()),customAnchor:D(()=>h())}),oe=k(()=>Se(y,H.props)),ye=k(()=>C()&&H.shouldTrapFocus);function we(V){H.shouldTrapFocus||V.preventDefault(),x()(V)}var E=q(),G=w(E);{var $=V=>{zt(V,Xe(()=>t(oe),()=>H.popperProps,{get ref(){return H.opts.ref},get enabled(){return H.root.opts.open.current},get id(){return a()},get trapFocus(){return t(ye)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:we,get onCloseAutoFocus(){return u()},get shouldRender(){return H.shouldRender},popper:(he,ne)=>{let ve=()=>ne?.().props,se=()=>ne?.().wrapperProps;const ae=k(()=>Se(ve(),{style:rt("popover")},{style:e.style}));var ie=q(),De=w(ie);{var ze=A=>{var P=q(),N=w(P);{let U=k(()=>({props:t(ae),wrapperProps:se(),...H.snippetProps}));ue(N,()=>e.child,()=>t(U))}n(A,P)},Ce=A=>{var P=Bt();pe(P,()=>({...se()}));var N=f(P);pe(N,()=>({...t(ae)}));var U=f(N);ue(U,()=>e.children??We),g(N),g(P),n(A,P)};F(De,A=>{e.child?A(ze):A(Ce,!1)})}n(he,ie)},$$slots:{popper:!0}}))},re=V=>{It(V,Xe(()=>t(oe),()=>H.popperProps,{get ref(){return H.opts.ref},get open(){return H.root.opts.open.current},get id(){return a()},get trapFocus(){return t(ye)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:we,get onCloseAutoFocus(){return u()},get shouldRender(){return H.shouldRender},popper:(he,ne)=>{let ve=()=>ne?.().props,se=()=>ne?.().wrapperProps;const ae=k(()=>Se(ve(),{style:rt("popover")},{style:e.style}));var ie=q(),De=w(ie);{var ze=A=>{var P=q(),N=w(P);{let U=k(()=>({props:t(ae),wrapperProps:se(),...H.snippetProps}));ue(N,()=>e.child,()=>t(U))}n(A,P)},Ce=A=>{var P=Lt();pe(P,()=>({...se()}));var N=f(P);pe(N,()=>({...t(ae)}));var U=f(N);ue(U,()=>e.children??We),g(N),g(P),n(A,P)};F(De,A=>{e.child?A(ze):A(Ce,!1)})}n(he,ie)},$$slots:{popper:!0}}))};F(G,V=>{m()?V($):m()||V(re,1)})}n(M,E),be()}var qt=z("<button><!></button>");function Gt(M,e){const o=nt();_e(e,!0);let c=i(e,"id",19,()=>ct(o)),a=i(e,"ref",15,null),m=i(e,"type",3,"button"),x=i(e,"disabled",3,!1),u=i(e,"openOnHover",3,!1),p=i(e,"openDelay",3,700),R=i(e,"closeDelay",3,300),C=st(e,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const d=Ze.create({id:D(()=>c()),ref:D(()=>a(),y=>a(y)),disabled:D(()=>!!x()),openOnHover:D(()=>u()),openDelay:D(()=>p()),closeDelay:D(()=>R())}),h=k(()=>Se(C,d.props,{type:m()}));Tt(M,{get id(){return c()},get ref(){return d.opts.ref},children:(y,H)=>{var oe=q(),ye=w(oe);{var we=G=>{var $=q(),re=w($);ue(re,()=>e.child,()=>({props:t(h)})),n(G,$)},E=G=>{var $=qt();pe($,()=>({...t(h)}));var re=f($);ue(re,()=>e.children??We),g($),n(G,$)};F(ye,G=>{e.child?G(we):G(E,!1)})}n(y,oe)},$$slots:{default:!0}}),be()}function jt(M,e){_e(e,!0);let o=i(e,"open",15,!1),c=i(e,"onOpenChange",3,Pe),a=i(e,"onOpenChangeComplete",3,Pe);Ue.create({open:D(()=>o(),m=>{o(m),c()(m)}),onOpenChangeComplete:D(()=>a())}),Mt(M,{children:(m,x)=>{var u=q(),p=w(u);ue(p,()=>e.children??We),n(m,u)},$$slots:{default:!0}}),be()}var Jt=Oe("<title> </title>"),Ut=Oe('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function Zt(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=Ut();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=Jt(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(3),g(p),n(M,p),be()}var Qt=Oe("<title> </title>"),Xt=Oe('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function eo(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=Xt();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=Qt(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(6),g(p),n(M,p),be()}var to=Oe("<title> </title>"),oo=Oe('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function ro(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=oo();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=to(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(),g(p),n(M,p),be()}const no=jt,so=Gt,ao=Yt;var io=z('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),lo=z('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),co=z('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),uo=z('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),po=z('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),ho=z("<!> <span>New View</span>",1),vo=z('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),fo=z("<!> <!>",1),go=z("<!> <!>",1),mo=z("<!> <!>",1),_o=z("<!> <!>",1),bo=z('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function Fo(M,e){_e(e,!0);let o=i(e,"activeView",3,"entity");const c=ht("chat");function a(r){et(r,{noScroll:!0})}const m=k(()=>ee.selectedId!==null),x=k(()=>{if(!ee.selectedRepo||!ee.selectedId)return"";for(const r of Pt.repos){if(r.name!==ee.selectedRepo)continue;const l=r.entities.find(_=>_.id===ee.selectedId);if(l)return l.title}return ee.selectedId.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())});function u(){ee.deselect(),a("/")}let p=T(!1);async function R(r){s(p,!1);const l=r==="calendar"?"Calendar":"List",_=await Ee.create(l,r);et(`/views/${_.id}`)}let C=T(null),d=T(""),h=T(null),y=T(!1);function H(r){s(y,!1),s(C,r.id,!0),s(d,r.name,!0)}vt(()=>{t(C)&&t(h)&&(t(h).focus(),t(h).select(),setTimeout(()=>{s(y,!0)},50))});function oe(){t(y)&&(t(C)&&t(d).trim()&&Ee.update(t(C),{name:t(d).trim()}),s(C,null),s(y,!1))}function ye(){s(C,null),s(y,!1)}function we(r){r.key==="Enter"&&(r.preventDefault(),s(y,!0),oe()),r.key==="Escape"&&(r.preventDefault(),ye())}let E=T(null);function G(r,l){r.stopPropagation(),s(E,l,!0)}async function $(){t(E)&&(await Ee.remove(t(E).id),s(E,null))}var re=bo(),V=w(re),ke=f(V),he=f(ke);let ne;var ve=I(he,2);let se;var ae=I(ve,2);_t(ae,17,()=>Ee.views,r=>r.id,(r,l)=>{var _=q(),Z=w(_);{var Q=S=>{var O=io(),v=f(O);ft(v),mt(v,b=>s(h,b),()=>t(h)),g(O),de(b=>gt(v,"size",b),[()=>Math.max(t(d).length,1)]),L("keydown",v,we),L("input",v,b=>{s(d,b.currentTarget.value,!0)}),pt("blur",v,oe),bt(v,()=>t(d),b=>s(d,b)),n(S,O)},X=S=>{const O=k(()=>o()==="view"&&ee.activeViewId===t(l).id);var v=co();let b;var le=f(v),W=f(le,!0);g(le);var K=I(le,2);{var Ie=B=>{var j=lo(),Te=f(j);tt(Te,{size:12}),g(j),L("click",j,Ke=>G(Ke,t(l))),n(B,j)};F(K,B=>{t(O)&&B(Ie)})}g(v),de(()=>{b=Re(v,1,"tab svelte-r6dy5f",null,b,{"tab-permanent":!t(O),active:t(O)}),He(W,t(l).name)}),L("click",v,()=>a(`/views/${t(l).id}`)),L("dblclick",v,()=>H(t(l))),n(S,v)};F(Z,S=>{t(C)===t(l).id?S(Q):S(X,!1)})}n(r,_)});var ie=I(ae,2);{var De=r=>{const l=k(()=>o()==="entity"&&t(m));var _=po();let Z;var Q=f(_),X=f(Q,!0);g(Q);var S=I(Q,2);{var O=v=>{var b=uo(),le=f(b);tt(le,{size:12}),g(b),L("click",b,W=>{W.stopPropagation(),u()}),n(v,b)};F(S,v=>{t(l)&&v(O)})}g(_),de(()=>{Z=Re(_,1,"tab svelte-r6dy5f",null,Z,{"tab-permanent":!t(l),active:t(l)}),He(X,t(x))}),L("click",_,()=>a(ee.entityPath??"/")),n(r,_)};F(ie,r=>{t(m)&&r(De)})}var ze=I(ie,2);Y(ze,()=>no,(r,l)=>{l(r,{get open(){return t(p)},set open(_){s(p,_,!0)},children:(_,Z)=>{var Q=fo(),X=w(Q);Y(X,()=>so,(O,v)=>{v(O,{class:"new-view-btn",title:"New view",children:(b,le)=>{var W=ho(),K=w(W);Ct(K,{size:16}),J(2),n(b,W)},$$slots:{default:!0}})});var S=I(X,2);Y(S,()=>ao,(O,v)=>{v(O,{class:"add-view-menu",sideOffset:4,align:"start",children:(b,le)=>{var W=vo(),K=w(W),Ie=f(K);eo(Ie,{size:14}),J(),g(K);var B=I(K,2),j=f(B);ro(j,{size:14}),J(),g(B),L("click",K,()=>R("list")),L("click",B,()=>R("calendar")),n(b,W)},$$slots:{default:!0}})}),n(_,Q)},$$slots:{default:!0}})}),g(ke);var Ce=I(ke,2),A=f(Ce);{var P=r=>{var l=q(),_=w(l);ue(_,()=>e.right),n(r,l)};F(A,r=>{e.right&&r(P)})}var N=I(A,2);{var U=r=>{yt(r,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return c.toggle},children:(l,_)=>{Zt(l,{size:14})},$$slots:{default:!0}})};F(N,r=>{c.open||r(U)})}g(Ce),g(V);var dt=I(V,2);{let r=k(()=>!!t(E));Y(dt,()=>Kt,(l,_)=>{_(l,{get open(){return t(r)},onOpenChange:Z=>{Z||s(E,null)},children:(Z,Q)=>{var X=q(),S=w(X);Y(S,()=>Nt,(O,v)=>{v(O,{children:(b,le)=>{var W=_o(),K=w(W);Y(K,()=>Ft,(B,j)=>{j(B,{children:(Te,Ke)=>{var Me=go(),Ne=w(Me);Y(Ne,()=>Rt,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe("Delete view?");n(me,ce)},$$slots:{default:!0}})});var Be=I(Ne,2);Y(Be,()=>Et,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe();de(()=>He(ce,`The view "${t(E)?.name??""}" will be permanently deleted.`)),n(me,ce)},$$slots:{default:!0}})}),n(Te,Me)},$$slots:{default:!0}})});var Ie=I(K,2);Y(Ie,()=>St,(B,j)=>{j(B,{children:(Te,Ke)=>{var Me=mo(),Ne=w(Me);Y(Ne,()=>Wt,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe("Cancel");n(me,ce)},$$slots:{default:!0}})});var Be=I(Ne,2);Y(Be,()=>$t,(fe,ge)=>{ge(fe,{onclick:$,children:(me,Le)=>{J();var ce=Fe("Delete");n(me,ce)},$$slots:{default:!0}})}),n(Te,Me)},$$slots:{default:!0}})}),n(b,W)},$$slots:{default:!0}})}),n(Z,X)},$$slots:{default:!0}})})}de(()=>{ne=Re(he,1,"tab tab-permanent svelte-r6dy5f",null,ne,{active:o()==="home"}),se=Re(ve,1,"tab tab-permanent svelte-r6dy5f",null,se,{active:o()==="graph"})}),L("click",he,()=>a("/")),L("click",ve,()=>o()!=="graph"&&a("/graph")),n(M,re),be()}ut(["click","keydown","input","dblclick"]);export{ao as C,no as R,so as T,Fo as V,ro as a};
1
+ import{p as nt,c as q,a as n,b as z,s as He,f as Oe,d as ut,g as L,t as Fe,e as pt}from"./iDtAARVW.js";import{e as T,s,g as t,u as k,p as _e,h as w,b as be,c as f,ad as We,r as g,l as Ae,d as te,a as Ge,n as J,m as xe,t as de,aC as ht,a5 as vt,i as I}from"./CT6oIU-C.js";import{b as ue,a as pe,r as ft,s as gt}from"./CmCtpZ1Y.js";import{i as F,b as mt}from"./72bZS3G9.js";import{e as _t}from"./CDV5Q7RN.js";import{c as Y}from"./CXH6iFbA.js";import{s as Re}from"./DGbA7IXh.js";import{b as bt,B as yt}from"./BS2rFAVq.js";import{p as i,s as Xe,r as st,l as Ve}from"./cLyZlkXv.js";import{g as et}from"./RMTqoFZj.js";import{i as je}from"./Y90OgS-9.js";import{S as wt,A as Ct,C as tt}from"./Q7isgklS.js";import{n as ee}from"./CygV1PFY.js";import{v as Ee}from"./BCef0pEe.js";import{w as Pt}from"./CALGIiWi.js";import{C as Ht,a as at,J as At,w as it,K as $e,E as xt,S as Vt,L as lt,c as Ot,i as Ye,N as kt,O as ot,k as D,f as Dt,j as ct,n as Pe,P as zt,r as It,m as Se,t as rt,u as Tt,F as Mt,A as Nt,x as Ft,y as Rt,z as Et,B as St,G as Wt,H as $t,I as Kt}from"./C2r294J6.js";const qe=Dt({component:"popover",parts:["root","trigger","content","close","overlay"]}),Je=new Ht("Popover.Root");class Ue{static create(e){return Je.set(new Ue(e))}opts;#e=T(null);get contentNode(){return t(this.#e)}set contentNode(e){s(this.#e,e,!0)}contentPresence;#t=T(null);get triggerNode(){return t(this.#t)}set triggerNode(e){s(this.#t,e,!0)}#r=T(null);get overlayNode(){return t(this.#r)}set overlayNode(e){s(this.#r,e,!0)}overlayPresence;#s=T(!1);get openedViaHover(){return t(this.#s)}set openedViaHover(e){s(this.#s,e,!0)}#a=T(!1);get hasInteractedWithContent(){return t(this.#a)}set hasInteractedWithContent(e){s(this.#a,e,!0)}#i=T(!1);get hoverCooldown(){return t(this.#i)}set hoverCooldown(e){s(this.#i,e,!0)}#c=T(0);get closeDelay(){return t(this.#c)}set closeDelay(e){s(this.#c,e,!0)}#o=null;#l=null;constructor(e){this.opts=e,this.contentPresence=new ot({ref:D(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new ot({ref:D(()=>this.overlayNode),open:this.opts.open}),it(()=>this.opts.open.current,o=>{o||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#n())})}setDomContext(e){this.#l=e}#n(){this.#o!==null&&this.#l&&(this.#l.clearTimeout(this.#o),this.#o=null)}toggleOpen(){this.#n(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#n(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#n(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#n(),this.closeDelay<=0?this.opts.open.current=!1:this.#l&&(this.#o=this.#l.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#o=null},this.closeDelay))))}cancelDelayedClose(){this.#n()}markInteraction(){this.hasInteractedWithContent=!0,this.#n()}}class Ze{static create(e){return new Ze(e,Je.get())}opts;root;attachment;domContext;#e=null;#t=null;#r=T(!1);constructor(e,o){this.opts=e,this.root=o,this.attachment=at(this.opts.ref,c=>this.root.triggerNode=c),this.domContext=new At(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),it(()=>this.opts.closeDelay.current,c=>{this.root.closeDelay=c})}#s(){this.#e!==null&&(this.domContext.clearTimeout(this.#e),this.#e=null)}#a(){this.#t!==null&&(this.domContext.clearTimeout(this.#t),this.#t=null)}#i(){this.#s(),this.#a()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||$e(e)||(s(this.#r,!0),this.#a(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const o=this.opts.openDelay.current;o<=0?this.root.handleHoverOpen():this.#e=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#e=null},o)}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&($e(e)||(s(this.#r,!1),this.#s(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#i(),t(this.#r)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}t(this.#r)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===xt||e.key===Vt)&&(e.preventDefault(),this.#i(),this.root.toggleOpen())}#c(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#o=k(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Ot(this.root.opts.open.current),"data-state":lt(this.root.opts.open.current),"aria-controls":this.#c(),[qe.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return t(this.#o)}set props(e){s(this.#o,e)}}class Qe{static create(e){return new Qe(e,Je.get())}opts;root;attachment;constructor(e,o){this.opts=e,this.root=o,this.attachment=at(this.opts.ref,c=>this.root.contentNode=c),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new wt({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const o=e.target;Ye(o)&&kt(o)&&this.root.markInteraction()}onpointerenter(e){$e(e)||this.root.cancelDelayedClose()}onpointerleave(e){$e(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!Ye(e.target))return;const o=e.target.closest(qe.selector("trigger"));if(!(o&&o===this.root.triggerNode)){if(this.opts.customAnchor.current){if(Ye(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const c=document.querySelector(this.opts.customAnchor.current);if(c&&c.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#e=k(()=>({open:this.root.opts.open.current}));get snippetProps(){return t(this.#e)}set snippetProps(e){s(this.#e,e)}#t=k(()=>({id:this.opts.id.current,tabindex:-1,"data-state":lt(this.root.opts.open.current),[qe.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return t(this.#t)}set props(e){s(this.#t,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var Bt=z("<div><div><!></div></div>"),Lt=z("<div><div><!></div></div>");function Yt(M,e){const o=nt();_e(e,!0);let c=i(e,"ref",15,null),a=i(e,"id",19,()=>ct(o)),m=i(e,"forceMount",3,!1),x=i(e,"onOpenAutoFocus",3,Pe),u=i(e,"onCloseAutoFocus",3,Pe),p=i(e,"onEscapeKeydown",3,Pe),R=i(e,"onInteractOutside",3,Pe),C=i(e,"trapFocus",3,!0),d=i(e,"preventScroll",3,!1),h=i(e,"customAnchor",3,null),y=st(e,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const H=Qe.create({id:D(()=>a()),ref:D(()=>c(),V=>c(V)),onInteractOutside:D(()=>R()),onEscapeKeydown:D(()=>p()),customAnchor:D(()=>h())}),oe=k(()=>Se(y,H.props)),ye=k(()=>C()&&H.shouldTrapFocus);function we(V){H.shouldTrapFocus||V.preventDefault(),x()(V)}var E=q(),G=w(E);{var $=V=>{zt(V,Xe(()=>t(oe),()=>H.popperProps,{get ref(){return H.opts.ref},get enabled(){return H.root.opts.open.current},get id(){return a()},get trapFocus(){return t(ye)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return h()},onOpenAutoFocus:we,get onCloseAutoFocus(){return u()},get shouldRender(){return H.shouldRender},popper:(he,ne)=>{let ve=()=>ne?.().props,se=()=>ne?.().wrapperProps;const ae=k(()=>Se(ve(),{style:rt("popover")},{style:e.style}));var ie=q(),De=w(ie);{var ze=A=>{var P=q(),N=w(P);{let U=k(()=>({props:t(ae),wrapperProps:se(),...H.snippetProps}));ue(N,()=>e.child,()=>t(U))}n(A,P)},Ce=A=>{var P=Bt();pe(P,()=>({...se()}));var N=f(P);pe(N,()=>({...t(ae)}));var U=f(N);ue(U,()=>e.children??We),g(N),g(P),n(A,P)};F(De,A=>{e.child?A(ze):A(Ce,!1)})}n(he,ie)},$$slots:{popper:!0}}))},re=V=>{It(V,Xe(()=>t(oe),()=>H.popperProps,{get ref(){return H.opts.ref},get open(){return H.root.opts.open.current},get id(){return a()},get trapFocus(){return t(ye)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return h()},onOpenAutoFocus:we,get onCloseAutoFocus(){return u()},get shouldRender(){return H.shouldRender},popper:(he,ne)=>{let ve=()=>ne?.().props,se=()=>ne?.().wrapperProps;const ae=k(()=>Se(ve(),{style:rt("popover")},{style:e.style}));var ie=q(),De=w(ie);{var ze=A=>{var P=q(),N=w(P);{let U=k(()=>({props:t(ae),wrapperProps:se(),...H.snippetProps}));ue(N,()=>e.child,()=>t(U))}n(A,P)},Ce=A=>{var P=Lt();pe(P,()=>({...se()}));var N=f(P);pe(N,()=>({...t(ae)}));var U=f(N);ue(U,()=>e.children??We),g(N),g(P),n(A,P)};F(De,A=>{e.child?A(ze):A(Ce,!1)})}n(he,ie)},$$slots:{popper:!0}}))};F(G,V=>{m()?V($):m()||V(re,1)})}n(M,E),be()}var qt=z("<button><!></button>");function Gt(M,e){const o=nt();_e(e,!0);let c=i(e,"id",19,()=>ct(o)),a=i(e,"ref",15,null),m=i(e,"type",3,"button"),x=i(e,"disabled",3,!1),u=i(e,"openOnHover",3,!1),p=i(e,"openDelay",3,700),R=i(e,"closeDelay",3,300),C=st(e,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const d=Ze.create({id:D(()=>c()),ref:D(()=>a(),y=>a(y)),disabled:D(()=>!!x()),openOnHover:D(()=>u()),openDelay:D(()=>p()),closeDelay:D(()=>R())}),h=k(()=>Se(C,d.props,{type:m()}));Tt(M,{get id(){return c()},get ref(){return d.opts.ref},children:(y,H)=>{var oe=q(),ye=w(oe);{var we=G=>{var $=q(),re=w($);ue(re,()=>e.child,()=>({props:t(h)})),n(G,$)},E=G=>{var $=qt();pe($,()=>({...t(h)}));var re=f($);ue(re,()=>e.children??We),g($),n(G,$)};F(ye,G=>{e.child?G(we):G(E,!1)})}n(y,oe)},$$slots:{default:!0}}),be()}function jt(M,e){_e(e,!0);let o=i(e,"open",15,!1),c=i(e,"onOpenChange",3,Pe),a=i(e,"onOpenChangeComplete",3,Pe);Ue.create({open:D(()=>o(),m=>{o(m),c()(m)}),onOpenChangeComplete:D(()=>a())}),Mt(M,{children:(m,x)=>{var u=q(),p=w(u);ue(p,()=>e.children??We),n(m,u)},$$slots:{default:!0}}),be()}var Jt=Oe("<title> </title>"),Ut=Oe('<svg><!><path d="M17.74,30,16,29l4-7h6a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2H6A2,2,0,0,0,4,8V20a2,2,0,0,0,2,2h9v2H6a4,4,0,0,1-4-4V8A4,4,0,0,1,6,4H26a4,4,0,0,1,4,4V20a4,4,0,0,1-4,4H21.16Z"></path><path d="M8 10H24V12H8z"></path><path d="M8 16H18V18H8z"></path></svg>');function Zt(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=Ut();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=Jt(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(3),g(p),n(M,p),be()}var Qt=Oe("<title> </title>"),Xt=Oe('<svg><!><path d="M10 6H28V8H10z"></path><path d="M10 24H28V26H10z"></path><path d="M10 15H28V17H10z"></path><path d="M4 15H6V17H4z"></path><path d="M4 6H6V8H4z"></path><path d="M4 24H6V26H4z"></path></svg>');function eo(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=Xt();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=Qt(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(6),g(p),n(M,p),be()}var to=Oe("<title> </title>"),oo=Oe('<svg><!><path d="M26,4h-4V2h-2v2h-8V2h-2v2H6C4.9,4,4,4.9,4,6v20c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2V6C28,4.9,27.1,4,26,4z M26,26H6V12h20 V26z M26,10H6V6h4v2h2V6h8v2h2V6h4V10z"></path></svg>');function ro(M,e){const o=Ve(e,["children","$$slots","$$events","$$legacy"]),c=Ve(o,["size","title"]);_e(e,!1);const a=xe(),m=xe();let x=i(e,"size",8,16),u=i(e,"title",8,void 0);Ae(()=>(te(o),te(u())),()=>{s(a,o["aria-label"]||o["aria-labelledby"]||u())}),Ae(()=>(t(a),te(o)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),Ge(),je();var p=oo();pe(p,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:x(),height:x(),...t(m),...c}));var R=f(p);{var C=d=>{var h=to(),y=f(h,!0);g(h),de(()=>He(y,u())),n(d,h)};F(R,d=>{u()&&d(C)})}J(),g(p),n(M,p),be()}const no=jt,so=Gt,ao=Yt;var io=z('<div class="tab active svelte-r6dy5f"><input class="tab-rename-input svelte-r6dy5f"/></div>'),lo=z('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),co=z('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),uo=z('<span class="tab-close svelte-r6dy5f" title="Close"><!></span>'),po=z('<button><span class="tab-label svelte-r6dy5f"> </span> <!></button>'),ho=z("<!> <span>New View</span>",1),vo=z('<button class="add-view-option svelte-r6dy5f"><!> List</button> <button class="add-view-option svelte-r6dy5f"><!> Calendar</button>',1),fo=z("<!> <!>",1),go=z("<!> <!>",1),mo=z("<!> <!>",1),_o=z("<!> <!>",1),bo=z('<div class="tab-bar svelte-r6dy5f"><div class="tabs-scroll svelte-r6dy5f"><button><span class="tab-label svelte-r6dy5f">Home</span></button> <button><span class="tab-label svelte-r6dy5f">Graph</span></button> <!> <!> <!></div> <div class="bar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function Fo(M,e){_e(e,!0);let o=i(e,"activeView",3,"entity");const c=ht("chat");function a(r){et(r,{noScroll:!0})}const m=k(()=>ee.selectedId!==null),x=k(()=>{if(!ee.selectedRepo||!ee.selectedId)return"";for(const r of Pt.repos){if(r.name!==ee.selectedRepo)continue;const l=r.entities.find(_=>_.id===ee.selectedId);if(l)return l.title}return ee.selectedId.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())});function u(){ee.deselect(),a("/")}let p=T(!1);async function R(r){s(p,!1);const l=r==="calendar"?"Calendar":"List",_=await Ee.create(l,r);et(`/views/${_.id}`)}let C=T(null),d=T(""),h=T(null),y=T(!1);function H(r){s(y,!1),s(C,r.id,!0),s(d,r.name,!0)}vt(()=>{t(C)&&t(h)&&(t(h).focus(),t(h).select(),setTimeout(()=>{s(y,!0)},50))});function oe(){t(y)&&(t(C)&&t(d).trim()&&Ee.update(t(C),{name:t(d).trim()}),s(C,null),s(y,!1))}function ye(){s(C,null),s(y,!1)}function we(r){r.key==="Enter"&&(r.preventDefault(),s(y,!0),oe()),r.key==="Escape"&&(r.preventDefault(),ye())}let E=T(null);function G(r,l){r.stopPropagation(),s(E,l,!0)}async function $(){t(E)&&(await Ee.remove(t(E).id),s(E,null))}var re=bo(),V=w(re),ke=f(V),he=f(ke);let ne;var ve=I(he,2);let se;var ae=I(ve,2);_t(ae,17,()=>Ee.views,r=>r.id,(r,l)=>{var _=q(),Z=w(_);{var Q=S=>{var O=io(),v=f(O);ft(v),mt(v,b=>s(h,b),()=>t(h)),g(O),de(b=>gt(v,"size",b),[()=>Math.max(t(d).length,1)]),L("keydown",v,we),L("input",v,b=>{s(d,b.currentTarget.value,!0)}),pt("blur",v,oe),bt(v,()=>t(d),b=>s(d,b)),n(S,O)},X=S=>{const O=k(()=>o()==="view"&&ee.activeViewId===t(l).id);var v=co();let b;var le=f(v),W=f(le,!0);g(le);var K=I(le,2);{var Ie=B=>{var j=lo(),Te=f(j);tt(Te,{size:12}),g(j),L("click",j,Ke=>G(Ke,t(l))),n(B,j)};F(K,B=>{t(O)&&B(Ie)})}g(v),de(()=>{b=Re(v,1,"tab svelte-r6dy5f",null,b,{"tab-permanent":!t(O),active:t(O)}),He(W,t(l).name)}),L("click",v,()=>a(`/views/${t(l).id}`)),L("dblclick",v,()=>H(t(l))),n(S,v)};F(Z,S=>{t(C)===t(l).id?S(Q):S(X,!1)})}n(r,_)});var ie=I(ae,2);{var De=r=>{const l=k(()=>o()==="entity"&&t(m));var _=po();let Z;var Q=f(_),X=f(Q,!0);g(Q);var S=I(Q,2);{var O=v=>{var b=uo(),le=f(b);tt(le,{size:12}),g(b),L("click",b,W=>{W.stopPropagation(),u()}),n(v,b)};F(S,v=>{t(l)&&v(O)})}g(_),de(()=>{Z=Re(_,1,"tab svelte-r6dy5f",null,Z,{"tab-permanent":!t(l),active:t(l)}),He(X,t(x))}),L("click",_,()=>a(ee.entityPath??"/")),n(r,_)};F(ie,r=>{t(m)&&r(De)})}var ze=I(ie,2);Y(ze,()=>no,(r,l)=>{l(r,{get open(){return t(p)},set open(_){s(p,_,!0)},children:(_,Z)=>{var Q=fo(),X=w(Q);Y(X,()=>so,(O,v)=>{v(O,{class:"new-view-btn",title:"New view",children:(b,le)=>{var W=ho(),K=w(W);Ct(K,{size:16}),J(2),n(b,W)},$$slots:{default:!0}})});var S=I(X,2);Y(S,()=>ao,(O,v)=>{v(O,{class:"add-view-menu",sideOffset:4,align:"start",children:(b,le)=>{var W=vo(),K=w(W),Ie=f(K);eo(Ie,{size:14}),J(),g(K);var B=I(K,2),j=f(B);ro(j,{size:14}),J(),g(B),L("click",K,()=>R("list")),L("click",B,()=>R("calendar")),n(b,W)},$$slots:{default:!0}})}),n(_,Q)},$$slots:{default:!0}})}),g(ke);var Ce=I(ke,2),A=f(Ce);{var P=r=>{var l=q(),_=w(l);ue(_,()=>e.right),n(r,l)};F(A,r=>{e.right&&r(P)})}var N=I(A,2);{var U=r=>{yt(r,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return c.toggle},children:(l,_)=>{Zt(l,{size:14})},$$slots:{default:!0}})};F(N,r=>{c.open||r(U)})}g(Ce),g(V);var dt=I(V,2);{let r=k(()=>!!t(E));Y(dt,()=>Kt,(l,_)=>{_(l,{get open(){return t(r)},onOpenChange:Z=>{Z||s(E,null)},children:(Z,Q)=>{var X=q(),S=w(X);Y(S,()=>Nt,(O,v)=>{v(O,{children:(b,le)=>{var W=_o(),K=w(W);Y(K,()=>Ft,(B,j)=>{j(B,{children:(Te,Ke)=>{var Me=go(),Ne=w(Me);Y(Ne,()=>Rt,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe("Delete view?");n(me,ce)},$$slots:{default:!0}})});var Be=I(Ne,2);Y(Be,()=>Et,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe();de(()=>He(ce,`The view "${t(E)?.name??""}" will be permanently deleted.`)),n(me,ce)},$$slots:{default:!0}})}),n(Te,Me)},$$slots:{default:!0}})});var Ie=I(K,2);Y(Ie,()=>St,(B,j)=>{j(B,{children:(Te,Ke)=>{var Me=mo(),Ne=w(Me);Y(Ne,()=>Wt,(fe,ge)=>{ge(fe,{children:(me,Le)=>{J();var ce=Fe("Cancel");n(me,ce)},$$slots:{default:!0}})});var Be=I(Ne,2);Y(Be,()=>$t,(fe,ge)=>{ge(fe,{onclick:$,children:(me,Le)=>{J();var ce=Fe("Delete");n(me,ce)},$$slots:{default:!0}})}),n(Te,Me)},$$slots:{default:!0}})}),n(b,W)},$$slots:{default:!0}})}),n(Z,X)},$$slots:{default:!0}})})}de(()=>{ne=Re(he,1,"tab tab-permanent svelte-r6dy5f",null,ne,{active:o()==="home"}),se=Re(ve,1,"tab tab-permanent svelte-r6dy5f",null,se,{active:o()==="graph"})}),L("click",he,()=>a("/")),L("click",ve,()=>o()!=="graph"&&a("/graph")),n(M,re),be()}ut(["click","keydown","input","dblclick"]);export{ao as C,no as R,so as T,Fo as V,ro as a};
@@ -1,4 +1,4 @@
1
- import{e as h,f as U,s as a,g as t,av as x}from"./CT6oIU-C.js";import{i as L,g as V}from"./DQ-yNuWC.js";import{n as y}from"./CygV1PFY.js";import{w as W}from"./CALGIiWi.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
1
+ import{e as h,f as U,s as a,g as t,av as x}from"./CT6oIU-C.js";import{i as L,g as V}from"./RMTqoFZj.js";import{n as y}from"./CygV1PFY.js";import{w as W}from"./CALGIiWi.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
2
2
  `);m=A.pop()??"";for(const C of A)if(C.startsWith("data: "))try{const f=JSON.parse(C.slice(6));c(f)}catch{}}}).catch(n=>{n.name!=="AbortError"&&c({type:"error",message:n.message})})}const D="sg-chat-sessions",J="sg-chat-version",z=14;function b(){try{const g=localStorage.getItem(D);if(!g)return[];if(localStorage.getItem(J)==="2")return JSON.parse(g);const n=JSON.parse(g).map(r=>({id:crypto.randomUUID(),createdAt:r.date+"T00:00:00.000Z",updatedAt:r.date+"T00:00:00.000Z",title:r.messages.find(p=>p.role==="user")?.content.slice(0,50)||"New chat",messages:r.messages}));return localStorage.setItem(D,JSON.stringify(n)),localStorage.setItem(J,"2"),n}catch{return[]}}function _(g){const o=[...g].sort((n,r)=>r.updatedAt.localeCompare(n.updatedAt)).slice(0,z);try{localStorage.setItem(D,JSON.stringify(o)),localStorage.setItem(J,"2")}catch{}}function N(g,c){const o=b(),n=c.map(({streaming:p,...m})=>m),r=o.findIndex(p=>p.id===g);r>=0&&(o[r].messages=n,o[r].updatedAt=new Date().toISOString()),_(o)}function B(){const c=b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt))[0];let o=h(U(c?c.messages.map(e=>({...e,streaming:!1})):[])),n=h(U(c?.id??null)),r=h(!1),p=h(0),m=h(0),k=h(0),O=h(null),A=null,C=h(""),f=h(U(!!c));const R=new Set(["create_entity","update_entity","delete_entity","move_entity"]);function M(){$();const e=crypto.randomUUID();a(n,e,!0),a(o,[],!0),a(f,!1)}function E(){if(t(n)&&t(f))return t(n);const e=t(n)||crypto.randomUUID();a(n,e,!0);const i=new Date().toISOString(),d=b();return d.push({id:e,createdAt:i,updatedAt:i,title:"New chat",messages:[]}),_(d),a(f,!0),e}function K(e){if(!e.trim()||t(r))return;a(O,null);const i=E();t(o).push({role:"user",content:e}),t(o).push({role:"agent",content:"",segments:[],streaming:!0}),a(r,!0);const d=b(),l=d.find(s=>s.id===i);l&&l.title==="New chat"&&(l.title=e.slice(0,50),_(d)),N(i,t(o));let T=!1,w=null;A=new AbortController;const G=y.selectedSubPath?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}/${y.selectedSubPath}`:y.selectedId?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}`:null,P=t(o).slice(0,-2).map(s=>({role:s.role==="agent"?"assistant":s.role,content:s.content})),H={message:e,context:G??void 0,sessionId:i,history:P.length>0?P:void 0};X(H,s=>{if(!t(r))return;const u=t(o)[t(o).length-1];if(!u||u.role!=="agent")return;const S=u.segments;switch(s.type){case"token":{u.content+=s.text??"";const I=S[S.length-1];I&&I.type==="text"?I.content+=s.text??"":S.push({type:"text",content:s.text??""}),u.segments=S,x(m);break}case"tool_start":if(s.name){R.has(s.name)&&(T=!0);const I=S[S.length-1];I&&I.type==="tools"?I.names=[...I.names,s.name]:S.push({type:"tools",names:[s.name]}),u.segments=S,x(m)}break;case"mutation":T=!0,s.action==="created"&&s.repo&&s.entityType&&s.entityId&&(w={repo:s.repo,entityType:s.entityType,entityId:s.entityId}),window.StudioChrome?.emitMutation?.({action:s.action,repo:s.repo,entityType:s.entityType,entityId:s.entityId});break;case"highlight":a(O,s.entityIds&&s.entityIds.length>0?new Set(s.entityIds):null,!0);break;case"done":s.message&&!u.content&&(u.content=s.message,u.segments=[{type:"text",content:s.message}]),u.streaming=!1,a(r,!1),N(i,t(o)),T&&(L().then(()=>{x(p)}),W.refreshAll().then(()=>{w&&V(`/${w.repo}/${w.entityType}/${w.entityId}`)}));break;case"error":u.content+=`
3
3
 
4
4
  Error: ${s.message}`,u.streaming=!1,a(r,!1),N(i,t(o));break}},A.signal)}function $(){if(!t(r))return;fetch("/api/chat/abort",{method:"POST",credentials:"include"}).catch(()=>{}),A?.abort(),A=null,a(r,!1);const e=t(o)[t(o).length-1];e?.streaming&&(e.streaming=!1,t(n)&&N(t(n),t(o)))}function Y(){$(),a(o,[],!0),t(n)&&t(f)&&N(t(n),t(o))}function Z(e){const d=b().filter(l=>l.id!==e);if(_(d),t(n)===e){const l=d.sort((T,w)=>w.updatedAt.localeCompare(T.updatedAt));l.length>0?(a(n,l[0].id,!0),a(o,l[0].messages.map(T=>({...T,streaming:!1})),!0),a(f,!0)):(a(n,null),a(o,[],!0),a(f,!1))}}function j(e){const d=b().find(l=>l.id===e);d&&($(),a(n,d.id,!0),a(o,d.messages.map(l=>({...l,streaming:!1})),!0),a(f,!0))}function q(){return b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(i=>i.role==="user")?.content.slice(0,80)||"",count:e.messages.length,active:e.id===t(n)}))}return{get messages(){return t(o)},get streaming(){return t(r)},get mutationCount(){return t(p)},get scrollTick(){return t(m)},get forceScroll(){return t(k)},triggerScroll(){x(k)},get highlightedIds(){return t(O)},get activeSessionId(){return t(n)},get draftInput(){return t(C)},set draftInput(e){a(C,e,!0)},send:K,stop:$,clear:Y,newSession:M,deleteSession:Z,getSessions:q,loadSession:j}}const te=B();export{te as chatStore};
@@ -1 +1 @@
1
- import{a,b as G,o as ye,g as Ct,e as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./iDtAARVW.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a5 as ht,s as r,g as e,a6 as Xt,aE as xe,i as Lt,u as l,ad as lt,h}from"./CT6oIU-C.js";import{i as B,b as Ie}from"./72bZS3G9.js";import{e as ue}from"./CDV5Q7RN.js";import{s as y,c as le,b as p,a as Pe,S as Ae}from"./CmCtpZ1Y.js";import{p as T,s as ce,r as Ce}from"./cLyZlkXv.js";import{a as O,c as it,s as Le,S as He}from"./oDjgX3JQ.js";import{c as Tt}from"./CXH6iFbA.js";import{c as st,s as rt}from"./DGbA7IXh.js";import"./Y90OgS-9.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(S)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(S)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const St={...je};let V=A(!1),N=A(!1),Dt=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),S=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(S)==="loading"),j=l(()=>({...St,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(S)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(Dt,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(Dt,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(Dt,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(S)==="success"?t.successIcon:e(S)==="error"?t.errorIcon:e(S)==="warning"?t.warningIcon:e(S)==="info"?t.infoIcon:e(S)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(S)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(S)==="loading")&&d(I)})}var P=Lt(o,2);{var D=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(Se,De)=>{De(Se,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(S)==="success"?H(q,1):e(S)==="error"?H(_t,2):e(S)==="warning"?H(Kt,3):e(S)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(D)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(S)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=D=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.title)),a(D,d)};B(o,D=>{typeof t.toast.title!="string"?D(I):D(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=D=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.description)),a(D,d)};B(o,D=>{typeof t.toast.description!="string"?D(I):D(P,!1)})}Y(m),K(D=>rt(m,1,D),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},D=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},D=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(Dt)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(S)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(S)],t.toast?.classes?.[e(S)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function St(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?St(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):St(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),St=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),Dt=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const S=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(S),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(St(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return Dt()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};
1
+ import{a,b as G,o as ye,g as Ct,e as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./iDtAARVW.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a5 as ht,s as r,g as e,a6 as Xt,aE as xe,i as Lt,u as l,ad as lt,h}from"./CT6oIU-C.js";import{i as B,b as Ie}from"./72bZS3G9.js";import{e as ue}from"./CDV5Q7RN.js";import{s as y,c as le,b as p,a as Pe,S as Ae}from"./CmCtpZ1Y.js";import{p as T,s as ce,r as Ce}from"./cLyZlkXv.js";import{a as O,c as it,s as Le,S as He}from"./UYy36I9r.js";import{c as Tt}from"./CXH6iFbA.js";import{c as st,s as rt}from"./DGbA7IXh.js";import"./Y90OgS-9.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(S)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(S)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const St={...je};let V=A(!1),N=A(!1),Dt=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),S=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(S)==="loading"),j=l(()=>({...St,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(S)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(Dt,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(Dt,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(Dt,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(S)==="success"?t.successIcon:e(S)==="error"?t.errorIcon:e(S)==="warning"?t.warningIcon:e(S)==="info"?t.infoIcon:e(S)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(S)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(S)==="loading")&&d(I)})}var P=Lt(o,2);{var D=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(Se,De)=>{De(Se,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(S)==="success"?H(q,1):e(S)==="error"?H(_t,2):e(S)==="warning"?H(Kt,3):e(S)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(D)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(S)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=D=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.title)),a(D,d)};B(o,D=>{typeof t.toast.title!="string"?D(I):D(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=D=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(D,f)},P=D=>{var d=he();K(()=>Yt(d,t.toast.description)),a(D,d)};B(o,D=>{typeof t.toast.description!="string"?D(I):D(P,!1)})}Y(m),K(D=>rt(m,1,D),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},D=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},D=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(D)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(Dt)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(S)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(S)],t.toast?.classes?.[e(S)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function St(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?St(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):St(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),St=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),Dt=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const S=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(S),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(St(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return Dt()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};
@@ -1 +1 @@
1
- import{bB as Le,aE as Ge,e as A,g as U,s as P,aF as ne,bC as wt}from"./CT6oIU-C.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return It(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_16ligtw?.base??"",Ct=globalThis.__sveltekit_16ligtw?.assets??x??"",$t="1774995647361",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,we;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},we={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},we=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>we.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Ft},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ft={traceId:"",spanId:"",traceFlags:0},Kt=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,v;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,K=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let ve;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_16ligtw?.data&&globalThis.__sveltekit_16ligtw.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await F({type:"enter",url:Ie(v.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(ve||=Promise.resolve()),!ve)return;ve=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await F({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new v.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Ke(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Je,current:Je},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ht(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ke(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,w,s);return O?fe({url:n,params:r,branch:w.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else w.push(void 0);return fe({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,v.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Fe(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return z||it.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Fe(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const w=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,v.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await Y(t,i));if(Re(),Ce(w),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=wt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,v.hash);if(f||u)return;const h=re(c),w=p&&de(_.url)===de(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,v.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Fe(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(K=!0,Ce(y),e(r),!o.replace_state)return;K=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!K){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[B]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Kt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Ke(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Fe(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ke(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
1
+ import{bB as Le,aE as Ge,e as A,g as U,s as P,aF as ne,bC as vt}from"./CT6oIU-C.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&G.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);G.delete(r)}}return window.fetch(t,n)}function Te(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(v,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_1527fir?.base??"",Ct=globalThis.__sveltekit_1527fir?.assets??x??"",$t="1774995973685",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Ft},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ft={traceId:"",spanId:"",traceFlags:0},Kt=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,K=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_1527fir?.data&&globalThis.__sveltekit_1527fir.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await F({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await F({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:Ke(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],v=_.branch[u];h?.data!==v?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==b.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:b.data}),l}async function De({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Je,current:Je},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:kt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},w.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:v}=ht(f,u,n);return o&&d(h.href),v},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ke(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==de(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.server:void 0)}))});for(const m of h)m.catch(()=>{});const v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.push(await h[m])}catch(g){if(g instanceof Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);w.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Fe(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return z||it.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Fe(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Be({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Fe(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,x,w.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(w.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(K=!0,Ce(y),e(r),!o.replace_state)return;K=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!K){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[B]:++y,[H]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Kt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Ke(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(v,m)=>{const g=o[m];return g?.uses&&(g.uses=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(g)})}),h=await Promise.all(u);if(d){const v=d.layouts;for(let m=0;m<v.length;m++)v[m]||h.splice(m,0,void 0)}p=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Fe(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ke(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./IvlPKm-T.js","./CT6oIU-C.js","./CALGIiWi.js","./DGbA7IXh.js"])))=>i.map(i=>d[i]);
2
- import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a6 as D,u as q}from"./CT6oIU-C.js";import{i as z}from"./DQ-yNuWC.js";import{i as H,w as h}from"./CALGIiWi.js";import{a as K}from"./DbbB6Up5.js";import{n as $}from"./CygV1PFY.js";import{l as Q,o as N}from"./iDtAARVW.js";function At(...t){return t.filter(Boolean).join(" ")}const Z=typeof document<"u",v=typeof window<"u"?window:void 0;function tt(t){let e=t.activeElement;for(;e?.shadowRoot;){const s=e.shadowRoot.activeElement;if(s===e)break;e=s}return e}class et{#e;#t;constructor(e={}){const{window:s=v,document:i=s?.document}=e;s!==void 0&&(this.#e=i,this.#t=Q(n=>{const r=N(s,"focusin",n),o=N(s,"focusout",n);return()=>{r(),o()}}))}get current(){return this.#t?.(),this.#e?tt(this.#e):null}}new et;class st{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return G(this.#t)}get(){const e=A(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=A(this.#t);return s===void 0?e:s}set(e){return X(this.#t,e)}}const it=new st("<Toaster/>");let U=0;class nt{#e=S(P([]));get toasts(){return g(this.#e)}set toasts(e){c(this.#e,e,!0)}#t=S(P([]));get heights(){return g(this.#t)}set heights(e){c(this.#t,e,!0)}#s=e=>{const s=this.toasts.findIndex(i=>i.id===e);return s===-1?null:s};addToast=e=>{Z&&this.toasts.unshift(e)};updateToast=({id:e,data:s,type:i,message:n})=>{const r=this.toasts.findIndex(f=>f.id===e),o=this.toasts[r];this.toasts[r]={...o,...s,id:e,title:n,type:i,updated:!0}};create=e=>{const{message:s,...i}=e,n=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:U++,r=e.dismissible!==void 0?e.dismissible:e.dismissable!==void 0?e.dismissable:!0,o=e.type===void 0?"default":e.type;return D(()=>{this.toasts.find(E=>E.id===n)?this.updateToast({id:n,data:e,type:o,message:s,dismissible:r}):this.addToast({...i,id:n,title:s,dismissible:r,type:o})}),n};dismiss=e=>(D(()=>{if(e===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const s=this.toasts.findIndex(i=>i.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}const s=this.#s(e);if(s!==null)return this.toasts.splice(s,1),e};message=(e,s)=>this.create({...s,type:"default",message:e});error=(e,s)=>this.create({...s,type:"error",message:e});success=(e,s)=>this.create({...s,type:"success",message:e});info=(e,s)=>this.create({...s,type:"info",message:e});warning=(e,s)=>this.create({...s,type:"warning",message:e});loading=(e,s)=>this.create({...s,type:"loading",message:e});promise=(e,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const n=e instanceof Promise?e:e();let r=i!==void 0;return n.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){r=!1;const f=rt(o);this.create({id:i,type:"error",message:f})}else if(s.success!==void 0){r=!1;const f=typeof s.success=="function"?s.success(o):s.success;this.create({id:i,type:"success",message:f})}}).catch(o=>{if(s.error!==void 0){r=!1;const f=typeof s.error=="function"?s.error(o):s.error;this.create({id:i,type:"error",message:f})}}).finally(()=>{r&&(this.dismiss(i),i=void 0),s.finally?.()}),i};custom=(e,s)=>{const i=s?.id||U++;return this.create({component:e,id:i,...s}),i};removeHeight=e=>{this.heights=this.heights.filter(s=>s.toastId!==e)};setHeight=e=>{const s=this.#s(e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e};reset=()=>{this.toasts=[],this.heights=[]}}function rt(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const d=new nt;function ot(t,e){return d.create({message:t,...e})}class Pt{#e=q(()=>d.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}}function Dt(){return it.get()}const ct=ot,u=Object.assign(ct,{success:d.success,info:d.info,warning:d.warning,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading,getActiveToasts:()=>d.toasts.filter(t=>!t.dismiss)}),at=800;function ut(){let t=S(!1),e=S(null),s=S(null),i=null,n=null,r=!1;function o(p,w,m,l){i&&i.repo===p&&i.type===w&&i.id===m?(l.data!==void 0&&(i.payload.data=l.data),l.content!==void 0&&(i.payload.content=l.content)):i={repo:p,type:w,id:m,payload:{...l}},f()}function f(){n&&clearTimeout(n),n=setTimeout(E,at)}async function E(){if(n=null,!r&&i){const{repo:p,type:w,id:m,payload:l}=i;i=null,r=!0,c(t,!0),c(s,null);try{if(await H(p,w,m,l),c(e,new Date,!0),l.data?.name){const b=h.repos.find(C=>C.name===p)?.entities.find(C=>C.id===m);b&&(b.title=l.data.name)}}catch(y){c(s,y.message??"Save failed",!0);const b=y.status??y.statusCode;(!b||b>=500)&&(i={repo:p,type:w,id:m,payload:l})}finally{c(t,!1),r=!1,i&&E()}}}function J(){n&&(clearTimeout(n),n=null),i&&E()}async function L(p,w,m,l){c(t,!0),c(s,null);try{const y=await H(p,w,m,l);return c(e,new Date,!0),y}catch(y){return c(s,y.message??"Save failed",!0),null}finally{c(t,!1)}}function V(){c(s,null),c(e,null),i=null,n&&(clearTimeout(n),n=null)}return{get saving(){return g(t)},get lastSaved(){return g(e)},get error(){return g(s)},get hasPending(){return!!(i||r)},scheduleAutoSave:o,flush:J,saveEntity:L,reset:V}}const lt=ut();let a=null,B=null,R=null,F=[],I=null,_=1e3,k=S(!1),W=S(null);const T=new Map,x={},O={};function j(t,e){T.delete(t);const s=e.entities.length,i=s===1?`${t} updated ${e.entities[0]}`:`${t} updated ${s} entities`;u(i)}function dt(t){for(const[e,s]of T)s.repo===t&&(clearTimeout(s.timer),T.delete(e))}function ft(t){const e=K.user?.displayName;if(t.type==="sync_progress"){const s=x[t.repo];if(s){const i=t.message.trim(),n=i.match(/^Syncing from source:\s*(.+)$/i);n&&(O[t.repo]=`Syncing ${n[1].trim()}…`);const r=O[t.repo]??`Syncing ${t.repo}…`;u.loading(r,{id:s,description:i,duration:36e5})}return}if(t.type==="entity_change"){if(e&&t.actor===e&&t.source==="api"){h.refreshEntities(t.repo);return}if(h.refreshEntities(t.repo),$.selectedRepo===t.repo&&$.selectedType===t.entityType&&$.selectedId===t.entityId){lt.hasPending?u(`${t.actor} also saved changes to this entity`):z();return}const i=T.get(t.actor);if(i)clearTimeout(i.timer),i.entities.includes(t.entityId)||i.entities.push(t.entityId),i.timer=setTimeout(()=>j(t.actor,i),1e4);else{const n={entities:[t.entityId],repo:t.repo,timer:setTimeout(()=>j(t.actor,n),1e4)};T.set(t.actor,n)}return}if(t.type==="session_commit"){if(e&&t.actor===e){c(W,t.timestamp,!0);return}const s=t.entities.length,i=s===1?`${t.actor} saved changes to ${t.entities[0]}`:`${t.actor} saved ${s} changes in ${t.repo}`;u(i),h.refreshEntities(t.repo);return}if(t.type==="sync_complete"){if(dt(t.repo),!x[t.repo]){const s=t.created+t.updated+t.deleted,i=s===0?`Sync complete · no changes in ${t.repo}`:`Sync complete · ${s} ${s===1?"entity":"entities"} from ${t.source}`;u.success(i)}h.refreshEntities(t.repo);return}if(t.type==="collection_created"){u(`${t.actor} created collection ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="collection_deleted"){u(`${t.actor} deleted collection ${t.repo}`);return}if(t.type==="repo_sync"){u(`${t.actor} pushed to ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="presence"){B?.(t);return}if(t.type==="online"){R?.(t);return}if(t.type==="insights_updated"){Y(()=>import("./IvlPKm-T.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.insightsStore.load());return}if(t.type==="access_granted"||t.type==="access_revoked"){t.type==="access_revoked"&&$.selectedRepo===t.repo&&$.deselect(),h.load();return}}function M(){if(typeof window>"u"||a&&(a.readyState===WebSocket.OPEN||a.readyState===WebSocket.CONNECTING))return;const e=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{c(k,!0),_=1e3,h.refreshAll();for(const s of F)s()},a.onmessage=s=>{if(!(s.data instanceof ArrayBuffer))try{const i=JSON.parse(s.data);if(i?.type==="ping"){a?.send(JSON.stringify({type:"pong"}));return}const n=i;n.type&&n.type!=="toast"&&ft(n)}catch{}},a.onclose=()=>{c(k,!1),a=null,I=setTimeout(()=>{_=Math.min(_*2,1e4),M()},_)},a.onerror=()=>{}}function ht(){I&&(clearTimeout(I),I=null),a&&(a.close(),a=null),c(k,!1);for(const[,t]of T)clearTimeout(t.timer);T.clear()}function pt(t,e=4e3){u(t,{duration:e})}function mt(t,e){const s=crypto.randomUUID();return e?.loading?u.loading(t,{id:s,duration:36e5}):u(t,{id:s}),s}function yt(t,e,s){if(s?.loading){u.loading(e,{id:t});return}/failed|error/i.test(e)?u.error(e,{id:t,duration:s?.duration??6e3}):u.success(e,{id:t,duration:s?.duration??4e3})}function gt(t){const e=crypto.randomUUID();x[t]=e,u.loading(`Syncing ${t}…`,{id:e,duration:36e5})}function wt(t,e,s){const i=x[t];i&&(delete x[t],delete O[t],s?u.error(e,{id:i,duration:6e3}):u.success(e,{id:i,duration:4e3}))}function St(t){B=t}function Tt(t){R=t}function Et(t){F.push(t)}function bt(t){a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify(t))}const Ht={get connected(){return g(k)},get lastAutoSaved(){return g(W)},get ws(){return a},connect:M,disconnect:ht,showToast:pt,showPersistentToast:mt,updateToast:yt,startSyncToast:gt,finishSyncToast:wt,send:bt,setPresenceHandler:St,setOnlineHandler:Tt,addConnectHandler:Et};export{Pt as S,d as a,At as c,lt as e,Ht as r,it as s,u as t,Dt as u};
2
+ import{_ as Y}from"./PPVm8Dsz.js";import{aY as G,aC as A,aX as X,e as S,f as P,g,s as c,a6 as D,u as q}from"./CT6oIU-C.js";import{i as z}from"./RMTqoFZj.js";import{i as H,w as h}from"./CALGIiWi.js";import{a as K}from"./DbbB6Up5.js";import{n as $}from"./CygV1PFY.js";import{l as Q,o as N}from"./iDtAARVW.js";function At(...t){return t.filter(Boolean).join(" ")}const Z=typeof document<"u",v=typeof window<"u"?window:void 0;function tt(t){let e=t.activeElement;for(;e?.shadowRoot;){const s=e.shadowRoot.activeElement;if(s===e)break;e=s}return e}class et{#e;#t;constructor(e={}){const{window:s=v,document:i=s?.document}=e;s!==void 0&&(this.#e=i,this.#t=Q(n=>{const r=N(s,"focusin",n),o=N(s,"focusout",n);return()=>{r(),o()}}))}get current(){return this.#t?.(),this.#e?tt(this.#e):null}}new et;class st{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return G(this.#t)}get(){const e=A(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=A(this.#t);return s===void 0?e:s}set(e){return X(this.#t,e)}}const it=new st("<Toaster/>");let U=0;class nt{#e=S(P([]));get toasts(){return g(this.#e)}set toasts(e){c(this.#e,e,!0)}#t=S(P([]));get heights(){return g(this.#t)}set heights(e){c(this.#t,e,!0)}#s=e=>{const s=this.toasts.findIndex(i=>i.id===e);return s===-1?null:s};addToast=e=>{Z&&this.toasts.unshift(e)};updateToast=({id:e,data:s,type:i,message:n})=>{const r=this.toasts.findIndex(f=>f.id===e),o=this.toasts[r];this.toasts[r]={...o,...s,id:e,title:n,type:i,updated:!0}};create=e=>{const{message:s,...i}=e,n=typeof e?.id=="number"||e.id&&e.id?.length>0?e.id:U++,r=e.dismissible!==void 0?e.dismissible:e.dismissable!==void 0?e.dismissable:!0,o=e.type===void 0?"default":e.type;return D(()=>{this.toasts.find(E=>E.id===n)?this.updateToast({id:n,data:e,type:o,message:s,dismissible:r}):this.addToast({...i,id:n,title:s,dismissible:r,type:o})}),n};dismiss=e=>(D(()=>{if(e===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const s=this.toasts.findIndex(i=>i.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e);remove=e=>{if(e===void 0){this.toasts=[];return}const s=this.#s(e);if(s!==null)return this.toasts.splice(s,1),e};message=(e,s)=>this.create({...s,type:"default",message:e});error=(e,s)=>this.create({...s,type:"error",message:e});success=(e,s)=>this.create({...s,type:"success",message:e});info=(e,s)=>this.create({...s,type:"info",message:e});warning=(e,s)=>this.create({...s,type:"warning",message:e});loading=(e,s)=>this.create({...s,type:"loading",message:e});promise=(e,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const n=e instanceof Promise?e:e();let r=i!==void 0;return n.then(o=>{if(typeof o=="object"&&o&&"ok"in o&&typeof o.ok=="boolean"&&!o.ok){r=!1;const f=rt(o);this.create({id:i,type:"error",message:f})}else if(s.success!==void 0){r=!1;const f=typeof s.success=="function"?s.success(o):s.success;this.create({id:i,type:"success",message:f})}}).catch(o=>{if(s.error!==void 0){r=!1;const f=typeof s.error=="function"?s.error(o):s.error;this.create({id:i,type:"error",message:f})}}).finally(()=>{r&&(this.dismiss(i),i=void 0),s.finally?.()}),i};custom=(e,s)=>{const i=s?.id||U++;return this.create({component:e,id:i,...s}),i};removeHeight=e=>{this.heights=this.heights.filter(s=>s.toastId!==e)};setHeight=e=>{const s=this.#s(e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e};reset=()=>{this.toasts=[],this.heights=[]}}function rt(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const d=new nt;function ot(t,e){return d.create({message:t,...e})}class Pt{#e=q(()=>d.toasts.filter(e=>!e.dismiss));get toasts(){return g(this.#e)}}function Dt(){return it.get()}const ct=ot,u=Object.assign(ct,{success:d.success,info:d.info,warning:d.warning,error:d.error,custom:d.custom,message:d.message,promise:d.promise,dismiss:d.dismiss,loading:d.loading,getActiveToasts:()=>d.toasts.filter(t=>!t.dismiss)}),at=800;function ut(){let t=S(!1),e=S(null),s=S(null),i=null,n=null,r=!1;function o(p,w,m,l){i&&i.repo===p&&i.type===w&&i.id===m?(l.data!==void 0&&(i.payload.data=l.data),l.content!==void 0&&(i.payload.content=l.content)):i={repo:p,type:w,id:m,payload:{...l}},f()}function f(){n&&clearTimeout(n),n=setTimeout(E,at)}async function E(){if(n=null,!r&&i){const{repo:p,type:w,id:m,payload:l}=i;i=null,r=!0,c(t,!0),c(s,null);try{if(await H(p,w,m,l),c(e,new Date,!0),l.data?.name){const b=h.repos.find(C=>C.name===p)?.entities.find(C=>C.id===m);b&&(b.title=l.data.name)}}catch(y){c(s,y.message??"Save failed",!0);const b=y.status??y.statusCode;(!b||b>=500)&&(i={repo:p,type:w,id:m,payload:l})}finally{c(t,!1),r=!1,i&&E()}}}function J(){n&&(clearTimeout(n),n=null),i&&E()}async function L(p,w,m,l){c(t,!0),c(s,null);try{const y=await H(p,w,m,l);return c(e,new Date,!0),y}catch(y){return c(s,y.message??"Save failed",!0),null}finally{c(t,!1)}}function V(){c(s,null),c(e,null),i=null,n&&(clearTimeout(n),n=null)}return{get saving(){return g(t)},get lastSaved(){return g(e)},get error(){return g(s)},get hasPending(){return!!(i||r)},scheduleAutoSave:o,flush:J,saveEntity:L,reset:V}}const lt=ut();let a=null,B=null,R=null,F=[],I=null,_=1e3,k=S(!1),W=S(null);const T=new Map,x={},O={};function j(t,e){T.delete(t);const s=e.entities.length,i=s===1?`${t} updated ${e.entities[0]}`:`${t} updated ${s} entities`;u(i)}function dt(t){for(const[e,s]of T)s.repo===t&&(clearTimeout(s.timer),T.delete(e))}function ft(t){const e=K.user?.displayName;if(t.type==="sync_progress"){const s=x[t.repo];if(s){const i=t.message.trim(),n=i.match(/^Syncing from source:\s*(.+)$/i);n&&(O[t.repo]=`Syncing ${n[1].trim()}…`);const r=O[t.repo]??`Syncing ${t.repo}…`;u.loading(r,{id:s,description:i,duration:36e5})}return}if(t.type==="entity_change"){if(e&&t.actor===e&&t.source==="api"){h.refreshEntities(t.repo);return}if(h.refreshEntities(t.repo),$.selectedRepo===t.repo&&$.selectedType===t.entityType&&$.selectedId===t.entityId){lt.hasPending?u(`${t.actor} also saved changes to this entity`):z();return}const i=T.get(t.actor);if(i)clearTimeout(i.timer),i.entities.includes(t.entityId)||i.entities.push(t.entityId),i.timer=setTimeout(()=>j(t.actor,i),1e4);else{const n={entities:[t.entityId],repo:t.repo,timer:setTimeout(()=>j(t.actor,n),1e4)};T.set(t.actor,n)}return}if(t.type==="session_commit"){if(e&&t.actor===e){c(W,t.timestamp,!0);return}const s=t.entities.length,i=s===1?`${t.actor} saved changes to ${t.entities[0]}`:`${t.actor} saved ${s} changes in ${t.repo}`;u(i),h.refreshEntities(t.repo);return}if(t.type==="sync_complete"){if(dt(t.repo),!x[t.repo]){const s=t.created+t.updated+t.deleted,i=s===0?`Sync complete · no changes in ${t.repo}`:`Sync complete · ${s} ${s===1?"entity":"entities"} from ${t.source}`;u.success(i)}h.refreshEntities(t.repo);return}if(t.type==="collection_created"){u(`${t.actor} created collection ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="collection_deleted"){u(`${t.actor} deleted collection ${t.repo}`);return}if(t.type==="repo_sync"){u(`${t.actor} pushed to ${t.repo}`),h.refreshEntities(t.repo);return}if(t.type==="presence"){B?.(t);return}if(t.type==="online"){R?.(t);return}if(t.type==="insights_updated"){Y(()=>import("./IvlPKm-T.js"),__vite__mapDeps([0,1,2,3]),import.meta.url).then(s=>s.insightsStore.load());return}if(t.type==="access_granted"||t.type==="access_revoked"){t.type==="access_revoked"&&$.selectedRepo===t.repo&&$.deselect(),h.load();return}}function M(){if(typeof window>"u"||a&&(a.readyState===WebSocket.OPEN||a.readyState===WebSocket.CONNECTING))return;const e=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{c(k,!0),_=1e3,h.refreshAll();for(const s of F)s()},a.onmessage=s=>{if(!(s.data instanceof ArrayBuffer))try{const i=JSON.parse(s.data);if(i?.type==="ping"){a?.send(JSON.stringify({type:"pong"}));return}const n=i;n.type&&n.type!=="toast"&&ft(n)}catch{}},a.onclose=()=>{c(k,!1),a=null,I=setTimeout(()=>{_=Math.min(_*2,1e4),M()},_)},a.onerror=()=>{}}function ht(){I&&(clearTimeout(I),I=null),a&&(a.close(),a=null),c(k,!1);for(const[,t]of T)clearTimeout(t.timer);T.clear()}function pt(t,e=4e3){u(t,{duration:e})}function mt(t,e){const s=crypto.randomUUID();return e?.loading?u.loading(t,{id:s,duration:36e5}):u(t,{id:s}),s}function yt(t,e,s){if(s?.loading){u.loading(e,{id:t});return}/failed|error/i.test(e)?u.error(e,{id:t,duration:s?.duration??6e3}):u.success(e,{id:t,duration:s?.duration??4e3})}function gt(t){const e=crypto.randomUUID();x[t]=e,u.loading(`Syncing ${t}…`,{id:e,duration:36e5})}function wt(t,e,s){const i=x[t];i&&(delete x[t],delete O[t],s?u.error(e,{id:i,duration:6e3}):u.success(e,{id:i,duration:4e3}))}function St(t){B=t}function Tt(t){R=t}function Et(t){F.push(t)}function bt(t){a?.readyState===WebSocket.OPEN&&a.send(JSON.stringify(t))}const Ht={get connected(){return g(k)},get lastAutoSaved(){return g(W)},get ws(){return a},connect:M,disconnect:ht,showToast:pt,showPersistentToast:mt,updateToast:yt,startSyncToast:gt,finishSyncToast:wt,send:bt,setPresenceHandler:St,setOnlineHandler:Tt,addConnectHandler:Et};export{Pt as S,d as a,At as c,lt as e,Ht as r,it as s,u as t,Dt as u};
@@ -1 +1 @@
1
- import{c as m,a,f as l}from"./iDtAARVW.js";import{h as w}from"./CT6oIU-C.js";import{i as n}from"./72bZS3G9.js";import{p as d}from"./cLyZlkXv.js";import{L as b,T as k}from"./KhbASkK6.js";import{t as y}from"./oDjgX3JQ.js";import{u as S}from"./oDjgX3JQ.js";var u=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),x=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),_=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),z=l('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function H(s,v){const t=d(v,"type",3,"success");var e=m(),c=w(e);{var i=o=>{var r=u();a(o,r)},p=o=>{var r=x();a(o,r)},h=o=>{var r=_();a(o,r)},g=o=>{var r=z();a(o,r)},f=o=>{};n(c,o=>{t()==="success"?o(i):t()==="error"?o(p,1):t()==="info"?o(h,2):t()==="warning"?o(g,3):o(f,!1)})}a(s,e)}export{H as Icon,b as Loader,k as Toaster,y as toast,S as useSonner};
1
+ import{c as m,a,f as l}from"./iDtAARVW.js";import{h as w}from"./CT6oIU-C.js";import{i as n}from"./72bZS3G9.js";import{p as d}from"./cLyZlkXv.js";import{L as b,T as k}from"./G_zxnLMy.js";import{t as y}from"./UYy36I9r.js";import{u as S}from"./UYy36I9r.js";var u=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),x=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),_=l('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),z=l('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function H(s,v){const t=d(v,"type",3,"success");var e=m(),c=w(e);{var i=o=>{var r=u();a(o,r)},p=o=>{var r=x();a(o,r)},h=o=>{var r=_();a(o,r)},g=o=>{var r=z();a(o,r)},f=o=>{};n(c,o=>{t()==="success"?o(i):t()==="error"?o(p,1):t()==="info"?o(h,2):t()==="warning"?o(g,3):o(f,!1)})}a(s,e)}export{H as Icon,b as Loader,k as Toaster,y as toast,S as useSonner};