studiograph 1.3.43 → 1.3.44-next.0

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 (68) hide show
  1. package/dist/core/graph.d.ts +5 -0
  2. package/dist/core/graph.js +93 -2
  3. package/dist/core/graph.js.map +1 -1
  4. package/dist/core/validation.d.ts +189 -119
  5. package/dist/core/validation.js +16 -26
  6. package/dist/core/validation.js.map +1 -1
  7. package/dist/server/routes/graph-api.js +41 -0
  8. package/dist/server/routes/graph-api.js.map +1 -1
  9. package/dist/web/_app/immutable/assets/2.DNpjFx0k.css +1 -0
  10. package/dist/web/_app/immutable/assets/4.CjSyz-ka.css +1 -0
  11. package/dist/web/_app/immutable/chunks/{CP30HKCf.js → 3ONneP0Z.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/8aEH9o48.js +1 -0
  13. package/dist/web/_app/immutable/chunks/B3cbqYdb.js +1 -0
  14. package/dist/web/_app/immutable/chunks/BBDMeJL4.js +1 -0
  15. package/dist/web/_app/immutable/chunks/{DNfruFPs.js → BMrbs3EC.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/{B3OdLZwd.js → BQZlAX3A.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/BmP3yl81.js +1 -0
  18. package/dist/web/_app/immutable/chunks/{Cbba0X2k.js → Bt7P6UBm.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/C8IfoK2g.js +1 -0
  20. package/dist/web/_app/immutable/chunks/{BlYD-5Z_.js → C8t_lVji.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/CClliU_-.js +4 -0
  22. package/dist/web/_app/immutable/chunks/{CvT005bt.js → CDs3H3KT.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{9TVbAwoF.js → CRbsz2jz.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{D-Er8WL_.js → CWmHQEyb.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{B3cgneCL.js → CpAdcarq.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/CpXgbTWt.js +1 -0
  27. package/dist/web/_app/immutable/chunks/{DVpZtGWL.js → DYpjUIN_.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{BpQkNqbd.js → Ddpk8P2X.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{BbsQ7LcO.js → Dtbtl5su.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/DvqvTNdq.js +1 -0
  31. package/dist/web/_app/immutable/chunks/{Dw9UPwc-.js → Dx6YFABE.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/{CHyNkE69.js → Iwcm6r7d.js} +1 -1
  33. package/dist/web/_app/immutable/chunks/{CIgxv4dO.js → QOJagAiA.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/Zf7H0ZZc.js +5 -0
  35. package/dist/web/_app/immutable/chunks/{C39N6y-4.js → qvfhHbjx.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{DY21hM66.js → yEDUbZbk.js} +2 -2
  37. package/dist/web/_app/immutable/entry/app.oDy7ig5b.js +2 -0
  38. package/dist/web/_app/immutable/entry/start.Cz7A2G8_.js +1 -0
  39. package/dist/web/_app/immutable/nodes/{0.BZ4775L8.js → 0.BuWS-_Tw.js} +1 -1
  40. package/dist/web/_app/immutable/nodes/{1.Bsi4xvt_.js → 1.ClV7Vf9J.js} +1 -1
  41. package/dist/web/_app/immutable/nodes/2.Dg3m027a.js +84 -0
  42. package/dist/web/_app/immutable/nodes/{3.BnPkMEuM.js → 3.9iNkY9mM.js} +1 -1
  43. package/dist/web/_app/immutable/nodes/4.UG11YFmx.js +11 -0
  44. package/dist/web/_app/immutable/nodes/{5.jC5vBcjM.js → 5.BZZysw6z.js} +2 -2
  45. package/dist/web/_app/immutable/nodes/6.LCPXZT0S.js +2 -0
  46. package/dist/web/_app/immutable/nodes/{7.DhmNA9F-.js → 7.kgjplPpk.js} +1 -1
  47. package/dist/web/_app/immutable/nodes/{8.D4qXhOtf.js → 8.CZ7vB_Pl.js} +1 -1
  48. package/dist/web/_app/immutable/nodes/{9.B9Hbxu54.js → 9.DlSjDUl0.js} +1 -1
  49. package/dist/web/_app/version.json +1 -1
  50. package/dist/web/index.html +12 -12
  51. package/package.json +1 -1
  52. package/dist/web/_app/immutable/assets/2.C8WqLKVH.css +0 -1
  53. package/dist/web/_app/immutable/assets/4.C3fKtWtl.css +0 -1
  54. package/dist/web/_app/immutable/chunks/3kn731Pp.js +0 -1
  55. package/dist/web/_app/immutable/chunks/B-46Slz_.js +0 -4
  56. package/dist/web/_app/immutable/chunks/BOcEeypC.js +0 -1
  57. package/dist/web/_app/immutable/chunks/BRjGNUzV.js +0 -5
  58. package/dist/web/_app/immutable/chunks/Bo0CMKlC.js +0 -1
  59. package/dist/web/_app/immutable/chunks/BwiF2fxX.js +0 -1
  60. package/dist/web/_app/immutable/chunks/ByGNDrbC.js +0 -1
  61. package/dist/web/_app/immutable/chunks/CA7sXyoK.js +0 -1
  62. package/dist/web/_app/immutable/chunks/CdoeTcKU.js +0 -1
  63. package/dist/web/_app/immutable/chunks/D5GOt_JW.js +0 -1
  64. package/dist/web/_app/immutable/entry/app.EJEuMPYz.js +0 -2
  65. package/dist/web/_app/immutable/entry/start.BOMbKPKA.js +0 -1
  66. package/dist/web/_app/immutable/nodes/2.Dtg7XjMw.js +0 -84
  67. package/dist/web/_app/immutable/nodes/4.B8xw3uIV.js +0 -11
  68. package/dist/web/_app/immutable/nodes/6.BrJWdUaW.js +0 -2
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js"])))=>i.map(i=>d[i]);
2
- import{_ as jt}from"../chunks/PPVm8Dsz.js";import{a as o,b as at,l as Ye,o as re,c as Kt,e as Ue,g as S,d as je,t as Le,s as Lt,f as ot}from"../chunks/DY21hM66.js";import{p as At,c as Y,r as F,t as G,b as Bt,bm as Ke,ax as Se,bn as Ae,Y as R,a6 as Qt,aa as vt,s as a,g as e,a1 as le,aC as Pe,a5 as Vt,ag as f,aS as yt,a4 as x,l as Ht,a as ce,n as de,m as Ot,d as ct,af as Ge,ah as Xe}from"../chunks/Bo0CMKlC.js";import{i as D,b as Re}from"../chunks/BbsQ7LcO.js";import{b as P,c as Te,s as lt,a as Jt,S as qe}from"../chunks/DNfruFPs.js";import{h as Qe}from"../chunks/D-Er8WL_.js";import{g as Me}from"../chunks/D5GOt_JW.js";import{w as He}from"../chunks/BOcEeypC.js";import{n as Je}from"../chunks/Dw9UPwc-.js";import{a as qt}from"../chunks/BlYD-5Z_.js";import{t as Q,c as _t,S as pe,r as Oe}from"../chunks/9TVbAwoF.js";import{p as I,s as se,r as Ne,l as zt}from"../chunks/CdoeTcKU.js";import{e as Be}from"../chunks/B3cgneCL.js";import{c as Zt}from"../chunks/CvT005bt.js";import{c as bt,s as wt}from"../chunks/Cbba0X2k.js";import{i as ue}from"../chunks/BpQkNqbd.js";import{I as $e}from"../chunks/CHyNkE69.js";const tn=Array(12).fill(0);var en=at('<div class="sonner-loading-bar"></div>'),nn=at('<div><div class="sonner-spinner"></div></div>');function an(c,t){At(t,!0);var n=nn(),b=Y(n);Be(b,23,()=>tn,(d,C)=>`spinner-bar-${C}`,(d,C)=>{var T=en();o(d,T)}),F(b),F(n),G(d=>{wt(n,1,d),P(n,"data-visible",t.visible)},[()=>bt(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),o(c,n),Bt()}const on=typeof window<"u"?window:void 0;function sn(c){let t=c.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class rn{#e;#t;constructor(t={}){const{window:n=on,document:b=n?.document}=t;n!==void 0&&(this.#e=b,this.#t=Ye(d=>{const C=re(n,"focusin",d),T=re(n,"focusout",d);return()=>{C(),T()}}))}get current(){return this.#t?.(),this.#e?sn(this.#e):null}}new rn;class ln{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return Ke(this.#t)}get(){const t=Se(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const n=Se(this.#t);return n===void 0?t:n}set(t){return Ae(this.#t,t)}}const cn=new ln("<Toaster/>");function oe(c){return c.label!==void 0}function dn(){let c=R(Qt(typeof document<"u"?document.hidden:!1));return vt(()=>re(document,"visibilitychange",()=>{a(c,document.hidden,!0)})),{get current(){return e(c)}}}const ze=4e3,un=14,fn=45,vn=200,mn=.05,gn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function hn(c){const[t,n]=c.split("-"),b=[];return t&&b.push(t),n&&b.push(n),b}function ke(c){return 1/(1.5+Math.abs(c)/20)}var _n=at("<div><!></div>"),bn=at('<button data-close-button=""><!></button>'),wn=at('<div data-icon=""><!> <!></div>'),yn=at('<div data-description=""><!></div>'),xn=at('<button data-button="" data-cancel=""> </button>'),In=at('<button data-button=""> </button>'),Tn=at('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Mn=at('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function En(c,t){At(t,!0);const n=l=>{var v=S(),w=x(v);{var L=E=>{var X=_n(),Ft=Y(X);lt(Ft,()=>t.loadingIcon),F(X),G(Xt=>{wt(X,1,Xt),P(X,"data-visible",e(k)==="loading")},[()=>bt(_t(e(nt)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),o(E,X)},H=E=>{{let X=f(()=>_t(e(nt)?.loader,t.toast.classes?.loader)),Ft=f(()=>e(k)==="loading");an(E,{get class(){return e(X)},get visible(){return e(Ft)}})}};D(w,E=>{t.loadingIcon?E(L):E(H,!1)})}o(l,v)};let b=I(t,"cancelButtonStyle",3,""),d=I(t,"actionButtonStyle",3,""),C=I(t,"descriptionClass",3,""),T=I(t,"unstyled",3,!1),M=I(t,"defaultRichColors",3,!1);const g={...gn};let u=R(!1),A=R(!1),B=R(!1),N=R(!1),U=R(!1),j=R(0),it=R(0),Pt=t.toast.duration||t.duration||ze,et=R(void 0),z=R(null),st=R(null);const xt=f(()=>t.index===0),Wt=f(()=>t.index+1<=t.visibleToasts),k=f(()=>t.toast.type),J=f(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),rt=f(()=>t.toast.class||""),kt=f(()=>t.toast.descriptionClass||""),It=f(()=>Q.heights.findIndex(l=>l.toastId===t.toast.id)||0),Tt=f(()=>t.toast.closeButton??t.closeButton),Rt=f(()=>t.toast.duration??t.duration??ze);let Dt=null;const pt=f(()=>t.position.split("-")),fe=f(()=>Q.heights.reduce((l,v,w)=>w>=e(It)?l:l+v.height,0)),ve=dn(),me=f(()=>t.toast.invert||t.invert),Gt=f(()=>e(k)==="loading"),nt=f(()=>({...g,...t.classes})),ge=f(()=>t.toast.title),he=f(()=>t.toast.description);let Mt=R(0),$t=R(0);const Yt=f(()=>Math.round(e(It)*un+e(fe)));vt(()=>{e(ge),e(he);let l;t.expanded||t.expandByDefault?l=1:l=1-t.index*mn;const v=le(()=>e(et));if(v===void 0)return;v.style.setProperty("height","auto");const w=v.offsetHeight,L=v.getBoundingClientRect().height,H=Math.round(L/l+Number.EPSILON&100)/100;v.style.removeProperty("height");let E;Math.abs(H-w)<1?E=H:E=w,a(it,E,!0),Q.setHeight({toastId:t.toast.id,height:E})});function i(){a(A,!0),a(j,e(Yt),!0),Q.removeHeight(t.toast.id),setTimeout(()=>{Q.remove(t.toast.id)},vn)}let V;const mt=f(()=>t.toast.promise&&e(k)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function gt(){a(Mt,new Date().getTime(),!0),V=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),i()},Pt)}function Nt(){if(e($t)<e(Mt)){const l=new Date().getTime()-e(Mt);Pt=Pt-l}a($t,new Date().getTime(),!0)}vt(()=>{t.toast.updated&&(clearTimeout(V),Pt=e(Rt),gt())}),vt(()=>(e(mt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&ve.current?Nt():gt()),()=>clearTimeout(V))),Pe(()=>{a(u,!0);const l=e(et)?.getBoundingClientRect().height;return a(it,l,!0),Q.setHeight({toastId:t.toast.id,height:l}),()=>{Q.removeHeight(t.toast.id)}}),vt(()=>{t.toast.delete&&le(()=>{i(),t.toast.onDismiss?.(t.toast)})});const _e=l=>{if(e(Gt))return;a(j,e(Yt),!0);const v=l.target;v.setPointerCapture(l.pointerId),v.tagName!=="BUTTON"&&(a(B,!0),Dt={x:l.clientX,y:l.clientY})},De=()=>{if(e(N)||!e(J))return;Dt=null;const l=Number(e(et)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),v=Number(e(et)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),w=new Date().getTime()-0,L=e(z)==="x"?l:v,H=Math.abs(L)/w;if(Math.abs(L)>=fn||H>.11){a(j,e(Yt),!0),t.toast.onDismiss?.(t.toast),e(z)==="x"?a(st,l>0?"right":"left",!0):a(st,v>0?"down":"up",!0),i(),a(N,!0);return}else e(et)?.style.setProperty("--swipe-amount-x","0px"),e(et)?.style.setProperty("--swipe-amount-y","0px");a(U,!1),a(B,!1),a(z,null)},te=l=>{if(!Dt||!e(J)||(window.getSelection()?.toString().length??-1)>0)return;const w=l.clientY-Dt.y,L=l.clientX-Dt.x,H=t.swipeDirections??hn(t.position);!e(z)&&(Math.abs(L)>1||Math.abs(w)>1)&&a(z,Math.abs(L)>Math.abs(w)?"x":"y",!0);let E={x:0,y:0};if(e(z)==="y"){if(H.includes("top")||H.includes("bottom"))if(H.includes("top")&&w<0||H.includes("bottom")&&w>0)E.y=w;else{const X=w*ke(w);E.y=Math.abs(X)<Math.abs(w)?X:w}}else if(e(z)==="x"&&(H.includes("left")||H.includes("right")))if(H.includes("left")&&L<0||H.includes("right")&&L>0)E.x=L;else{const X=L*ke(L);E.x=Math.abs(X)<Math.abs(L)?X:L}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&a(U,!0),e(et)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(et)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},ht=()=>{a(B,!1),a(z,null),Dt=null},Et=f(()=>t.toast.icon?t.toast.icon:e(k)==="success"?t.successIcon:e(k)==="error"?t.errorIcon:e(k)==="warning"?t.warningIcon:e(k)==="info"?t.infoIcon:e(k)==="loading"?t.loadingIcon:null);var r=Mn();P(r,"tabindex",0);let Ut;var ee=Y(r);{var Ce=l=>{var v=bn(),w=Y(v);lt(w,()=>t.closeIcon??yt),F(v),G(L=>{P(v,"aria-label",t.closeButtonAriaLabel),P(v,"data-disabled",e(Gt)),wt(v,1,L)},[()=>bt(_t(e(nt)?.closeButton,t.toast?.classes?.closeButton))]),Kt("click",v,()=>{e(Gt)||!e(J)||(i(),t.toast.onDismiss?.(t.toast))}),o(l,v)};D(ee,l=>{e(Tt)&&!t.toast.component&&e(k)!=="loading"&&t.closeIcon!==null&&l(Ce)})}var be=Vt(ee,2);{var we=l=>{const v=f(()=>t.toast.component);var w=S(),L=x(w);Zt(L,()=>e(v),(H,E)=>{E(H,se(()=>t.toast.componentProps,{closeToast:i}))}),o(l,w)},ye=l=>{var v=Tn(),w=x(v);{var L=h=>{var y=wn(),s=Y(y);{var O=m=>{var _=S(),tt=x(_);{var W=Ct=>{var ae=S(),Ie=x(ae);Zt(Ie,()=>t.toast.icon,(q,$)=>{$(q,{})}),o(Ct,ae)},ft=Ct=>{n(Ct)};D(tt,Ct=>{t.toast.icon?Ct(W):Ct(ft,!1)})}o(m,_)};D(s,m=>{(t.toast.promise||e(k)==="loading")&&m(O)})}var K=Vt(s,2);{var Z=m=>{var _=S(),tt=x(_);{var W=q=>{var $=S(),St=x($);Zt(St,()=>t.toast.icon,(Ve,We)=>{We(Ve,{})}),o(q,$)},ft=q=>{var $=S(),St=x($);lt(St,()=>t.successIcon??yt),o(q,$)},Ct=q=>{var $=S(),St=x($);lt(St,()=>t.errorIcon??yt),o(q,$)},ae=q=>{var $=S(),St=x($);lt(St,()=>t.warningIcon??yt),o(q,$)},Ie=q=>{var $=S(),St=x($);lt(St,()=>t.infoIcon??yt),o(q,$)};D(tt,q=>{t.toast.icon?q(W):e(k)==="success"?q(ft,1):e(k)==="error"?q(Ct,2):e(k)==="warning"?q(ae,3):e(k)==="info"&&q(Ie,4)})}o(m,_)};D(K,m=>{t.toast.type!=="loading"&&m(Z)})}F(y),G(m=>wt(y,1,m),[()=>bt(_t(e(nt)?.icon,t.toast?.classes?.icon))]),o(h,y)};D(w,h=>{(e(k)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&h(L)})}var H=Vt(w,2),E=Y(H),X=Y(E);{var Ft=h=>{var y=S(),s=x(y);{var O=Z=>{const m=f(()=>t.toast.title);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.title)),o(Z,m)};D(s,Z=>{typeof t.toast.title!="string"?Z(O):Z(K,!1)})}o(h,y)};D(X,h=>{t.toast.title&&h(Ft)})}F(E);var Xt=Vt(E,2);{var xe=h=>{var y=yn(),s=Y(y);{var O=Z=>{const m=f(()=>t.toast.description);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.description)),o(Z,m)};D(s,Z=>{typeof t.toast.description!="string"?Z(O):Z(K,!1)})}F(y),G(Z=>wt(y,1,Z),[()=>bt(_t(C(),e(kt),e(nt)?.description,t.toast.classes?.description))]),o(h,y)};D(Xt,h=>{t.toast.description&&h(xe)})}F(H);var ne=Vt(H,2);{var dt=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=xn(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.cancelButtonStyle??b()),wt(_,1,W),Lt(tt,t.toast.cancel.label)},[()=>bt(_t(e(nt)?.cancelButton,t.toast?.classes?.cancelButton))]),Kt("click",_,W=>{oe(t.toast.cancel)&&e(J)&&(t.toast.cancel?.onClick?.(W),i())}),o(m,_)},Z=f(()=>oe(t.toast.cancel));D(s,m=>{typeof t.toast.cancel=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(ne,h=>{t.toast.cancel&&h(dt)})}var p=Vt(ne,2);{var ut=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.action,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=In(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.actionButtonStyle??d()),wt(_,1,W),Lt(tt,t.toast.action.label)},[()=>bt(_t(e(nt)?.actionButton,t.toast?.classes?.actionButton))]),Kt("click",_,W=>{oe(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&i())}),o(m,_)},Z=f(()=>oe(t.toast.action));D(s,m=>{typeof t.toast.action=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(p,h=>{t.toast.action&&h(ut)})}G((h,y)=>{wt(H,1,h),wt(E,1,y)},[()=>bt(_t(e(nt)?.content,t.toast?.classes?.content)),()=>bt(_t(e(nt)?.title,t.toast?.classes?.title))]),o(l,v)};D(be,l=>{t.toast.component?l(we):l(ye,!1)})}F(r),Re(r,l=>a(et,l),()=>e(et)),G((l,v,w)=>{wt(r,1,l),P(r,"aria-live",t.toast.important?"assertive":"polite"),P(r,"data-rich-colors",t.toast.richColors??M()),P(r,"data-styled",!(t.toast.component||t.toast.unstyled||T())),P(r,"data-mounted",e(u)),P(r,"data-promise",v),P(r,"data-swiped",e(U)),P(r,"data-removed",e(A)),P(r,"data-visible",e(Wt)),P(r,"data-y-position",e(pt)[0]),P(r,"data-x-position",e(pt)[1]),P(r,"data-index",t.index),P(r,"data-front",e(xt)),P(r,"data-swiping",e(B)),P(r,"data-dismissible",e(J)),P(r,"data-type",e(k)),P(r,"data-invert",e(me)),P(r,"data-swipe-out",e(N)),P(r,"data-swipe-direction",e(st)),P(r,"data-expanded",w),Ut=Te(r,`${t.style} ${t.toast.style}`,Ut,{"--index":t.index,"--toasts-before":t.index,"--z-index":Q.toasts.length-t.index,"--offset":`${e(A)?e(j):e(Yt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(it)}px`})},[()=>bt(_t(t.class,e(rt),e(nt)?.toast,t.toast?.classes?.toast,e(nt)?.[e(k)],t.toast?.classes?.[e(k)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(u))]),Kt("pointermove",r,te),Kt("pointerup",r,De),Kt("pointerdown",r,_e),Ue("dragend",r,ht),o(c,r),Bt()}je(["pointermove","pointerup","pointerdown","click"]);var Sn=ot('<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 An(c){var t=Sn();o(c,t)}var Bn=ot('<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 Pn(c){var t=Bn();o(c,t)}var Dn=ot('<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 Cn(c){var t=Dn();o(c,t)}var Ln=ot('<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 Hn(c){var t=Ln();o(c,t)}var On=ot('<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 zn(c){var t=On();o(c,t)}const kn=3,Fe="24px",Ze="16px",Rn=4e3,Nn=356,Fn=14,Ee="dark",ie="light";function Zn(c,t){const n={};return[c,t].forEach((b,d)=>{const C=d===1,T=C?"--mobile-offset":"--offset",M=C?Ze:Fe;function g(u){["top","right","bottom","left"].forEach(A=>{n[`${T}-${A}`]=typeof u=="number"?`${u}px`:u})}typeof b=="number"||typeof b=="string"?g(b):typeof b=="object"?["top","right","bottom","left"].forEach(u=>{const A=b[u];A===void 0?n[`${T}-${u}`]=M:n[`${T}-${u}`]=typeof A=="number"?`${A}px`:A}):g(M)}),n}var Vn=at("<ol></ol>"),Wn=at('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function Yn(c,t){At(t,!0);function n(i){return i!=="system"?i:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ee:ie}let b=I(t,"invert",3,!1),d=I(t,"position",3,"bottom-right"),C=I(t,"hotkey",19,()=>["altKey","KeyT"]),T=I(t,"expand",3,!1),M=I(t,"closeButton",3,!1),g=I(t,"offset",3,Fe),u=I(t,"mobileOffset",3,Ze),A=I(t,"theme",3,"light"),B=I(t,"richColors",3,!1),N=I(t,"duration",3,Rn),U=I(t,"visibleToasts",3,kn),j=I(t,"toastOptions",19,()=>({})),it=I(t,"dir",7,"auto"),Pt=I(t,"gap",3,Fn),et=I(t,"pauseWhenPageIsHidden",3,!1),z=I(t,"containerAriaLabel",3,"Notifications"),st=I(t,"closeButtonAriaLabel",3,"Close toast"),xt=Ne(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 Wt(){if(it()!=="auto")return it();if(typeof window>"u"||typeof document>"u")return"ltr";const i=document.documentElement.getAttribute("dir");return i==="auto"||!i?(le(()=>it(window.getComputedStyle(document.documentElement).direction??"ltr")),it()):(le(()=>it(i)),i)}const k=f(()=>Array.from(new Set([d(),...Q.toasts.filter(i=>i.position).map(i=>i.position)].filter(Boolean))));let J=R(!1),rt=R(!1),kt=R(Qt(n(A()))),It=R(void 0),Tt=R(null),Rt=R(!1);const Dt=f(()=>C().join("+").replace(/Key/g,"").replace(/Digit/g,""));vt(()=>{Q.toasts.length<=1&&a(J,!1)}),vt(()=>{const i=Q.toasts.filter(V=>V.dismiss&&!V.delete);if(i.length>0){const V=Q.toasts.map(mt=>i.find(Nt=>Nt.id===mt.id)?{...mt,delete:!0}:mt);Q.toasts=V}}),vt(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null),a(Rt,!1))}),Pe(()=>(Q.reset(),re(document,"keydown",V=>{C().every(gt=>V[gt]||V.code===gt)&&(a(J,!0),e(It)?.focus()),V.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&a(J,!1)}))),vt(()=>{if(A()!=="system"&&a(kt,A()),typeof window<"u"){A()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?a(kt,Ee):a(kt,ie));const i=window.matchMedia("(prefers-color-scheme: dark)"),V=({matches:mt})=>{A()==="system"&&a(kt,mt?Ee:ie,!0)};"addEventListener"in i?i.addEventListener("change",V):i.addListener(V)}});const pt=i=>{t.onblur?.(i),e(Rt)&&!i.currentTarget.contains(i.relatedTarget)&&(a(Rt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null)))},fe=i=>{t.onfocus?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&(e(Rt)||(a(Rt,!0),a(Tt,i.relatedTarget,!0)))},ve=i=>{t.onpointerdown?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&a(rt,!0)},me=i=>{t.onmouseenter?.(i),a(J,!0)},Gt=i=>{t.onmouseleave?.(i),e(rt)||a(J,!1)},nt=i=>{t.onmousemove?.(i),a(J,!0)},ge=i=>{t.ondragend?.(i),a(J,!1)},he=i=>{t.onpointerup?.(i),a(rt,!1)};cn.set(new pe);var Mt=Wn();P(Mt,"tabindex",-1);var $t=Y(Mt);{var Yt=i=>{var V=S(),mt=x(V);Be(mt,18,()=>e(k),gt=>gt,(gt,Nt,_e,De)=>{const te=f(()=>{const[r,Ut]=Nt.split("-");return{y:r,x:Ut}}),ht=f(()=>Zn(g(),u()));var Et=Vn();Jt(Et,r=>({tabindex:-1,dir:r,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(kt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:fe,onmouseenter:me,onmousemove:nt,onmouseleave:Gt,ondragend:ge,onpointerdown:ve,onpointerup:he,...xt,[qe]:{"--front-toast-height":`${Q.heights[0]?.height}px`,"--width":`${Nn}px`,"--gap":`${Pt()}px`,"--offset-top":e(ht)["--offset-top"],"--offset-right":e(ht)["--offset-right"],"--offset-bottom":e(ht)["--offset-bottom"],"--offset-left":e(ht)["--offset-left"],"--mobile-offset-top":e(ht)["--mobile-offset-top"],"--mobile-offset-right":e(ht)["--mobile-offset-right"],"--mobile-offset-bottom":e(ht)["--mobile-offset-bottom"],"--mobile-offset-left":e(ht)["--mobile-offset-left"]}}),[Wt],void 0,void 0,"svelte-nbs0zk"),Be(Et,23,()=>Q.toasts.filter(r=>!r.position&&e(_e)===0||r.position===Nt),r=>r.id,(r,Ut,ee,Ce)=>{{const be=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.successIcon??yt),o(s,O)},y=s=>{An(s)};D(ut,s=>{t.successIcon?s(h):t.successIcon!==null&&s(y,1)})}o(dt,p)},we=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.errorIcon??yt),o(s,O)},y=s=>{Pn(s)};D(ut,s=>{t.errorIcon?s(h):t.errorIcon!==null&&s(y,1)})}o(dt,p)},ye=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.warningIcon??yt),o(s,O)},y=s=>{Cn(s)};D(ut,s=>{t.warningIcon?s(h):t.warningIcon!==null&&s(y,1)})}o(dt,p)},l=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.infoIcon??yt),o(s,O)},y=s=>{Hn(s)};D(ut,s=>{t.infoIcon?s(h):t.infoIcon!==null&&s(y,1)})}o(dt,p)},v=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.closeIcon??yt),o(s,O)},y=s=>{zn(s)};D(ut,s=>{t.closeIcon?s(h):t.closeIcon!==null&&s(y,1)})}o(dt,p)};let w=f(()=>j()?.duration??N()),L=f(()=>j()?.class??""),H=f(()=>j()?.descriptionClass||""),E=f(()=>j()?.style??""),X=f(()=>j().classes||{}),Ft=f(()=>j().unstyled??!1),Xt=f(()=>j()?.cancelButtonStyle??""),xe=f(()=>j()?.actionButtonStyle??""),ne=f(()=>j()?.closeButtonAriaLabel??st());En(r,{get index(){return e(ee)},get toast(){return e(Ut)},get defaultRichColors(){return B()},get duration(){return e(w)},get class(){return e(L)},get descriptionClass(){return e(H)},get invert(){return b()},get visibleToasts(){return U()},get closeButton(){return M()},get interacting(){return e(rt)},get position(){return Nt},get style(){return e(E)},get classes(){return e(X)},get unstyled(){return e(Ft)},get cancelButtonStyle(){return e(Xt)},get actionButtonStyle(){return e(xe)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return T()},get expanded(){return e(J)},get pauseWhenPageIsHidden(){return et()},get loadingIcon(){return t.loadingIcon},successIcon:be,errorIcon:we,warningIcon:ye,infoIcon:l,closeIcon:v,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),F(Et),Re(Et,r=>a(It,r),()=>e(It)),G(()=>Et.dir=Et.dir),o(gt,Et)}),o(i,V)};D($t,i=>{Q.toasts.length>0&&i(Yt)})}F(Mt),G(()=>P(Mt,"aria-label",`${z()??""} ${e(Dt)??""}`)),o(c,Mt),Bt()}var Un=ot("<title> </title>"),jn=ot('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function Kn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Un(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Gn=ot("<title> </title>"),Xn=ot('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function qn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Xn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Gn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Qn=ot("<title> </title>"),Jn=ot('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function pn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Qn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var $n=ot("<title> </title>"),ta=ot('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function ea(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=ta();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=$n(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(3),F(g),o(c,g),Bt()}function na(c,t){At(t,!0);const n=Se("theme");let b=Ne(t,["$$slots","$$events","$$legacy"]);Yn(c,se({get theme(){return n.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>b,{loadingIcon:u=>{$e(u,{class:"size-4 animate-spin"})},successIcon:u=>{Kn(u,{class:"size-4"})},errorIcon:u=>{qn(u,{class:"size-4"})},infoIcon:u=>{pn(u,{class:"size-4"})},warningIcon:u=>{ea(u,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),Bt()}var aa=at('<div style="display: contents;"><!> <!></div>');function xa(c,t){At(t,!0);const n=typeof localStorage<"u"?localStorage.getItem("theme"):null,b=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let d=R(Qt(n||b));Ae("theme",{get current(){return e(d)},toggle(){a(d,e(d)==="dark"?"light":"dark",!0),localStorage.setItem("theme",e(d))}});const T=typeof localStorage<"u"?localStorage.getItem("chatMode"):null,M=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null,g=T==="panel"||T==="full"?T:T==="closed"?"closed":M==="true"?"panel":"closed";let u=R(Qt(g)),A=R(Qt(g==="closed"?"panel":g));function B(){localStorage.setItem("chatMode",e(u))}Ae("chat",{get open(){return e(u)!=="closed"},get mode(){return e(u)},toggle(){a(u,e(u)==="closed"?e(A):"closed",!0),B()},close(){a(u,"closed"),B()},expand(){a(u,"full"),a(A,"full"),B()},collapse(){a(u,"panel"),a(A,"panel"),B()}}),vt(()=>{document.documentElement.setAttribute("data-theme",e(d))});let U=R(null);vt(()=>{if(qt.loading)return;const z=qt.user?.email??(qt.authEnabled?null:"__open__");z&&z!==e(U)&&(e(U)!==null&&Je.deselect(),a(U,z,!0),He.load(),Oe.connect()),!z&&e(U)&&(a(U,null),Oe.disconnect())}),Pe(async()=>{const z=window.location.pathname,st=z==="/login",xt=z==="/setup",{authenticated:Wt,authEnabled:k,needsSetup:J}=await qt.checkAuth();if(J&&!xt){Me("/setup");return}if(k&&!Wt&&!st){Me("/login");return}if(Wt&&(st||xt)){Me("/");return}st||xt||(jt(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url).catch(()=>{}),Promise.all([jt(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),jt(()=>import("../chunks/DnL9f0lc.js").then(rt=>rt.i),__vite__mapDeps([3,4]),import.meta.url),jt(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([5,4,3,6,7,8]),import.meta.url),jt(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([6,7,4,3]),import.meta.url),jt(()=>import("../chunks/C7VoTosa.js").then(rt=>rt.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",rt=>{a(d,rt.detail,!0)}))});var j=aa();Qe("12qhfyh",z=>{Ge(()=>{Xe.title=(He.name||"Studiograph")??""})});var it=Y(j);{var Pt=z=>{var st=S(),xt=x(st);lt(xt,()=>t.children),o(z,st)};D(it,z=>{qt.loading||z(Pt)})}var et=Vt(it,2);na(et,{}),F(j),G(()=>P(j,"data-theme",e(d))),o(c,j),Bt()}export{xa as component};
2
+ import{_ as jt}from"../chunks/PPVm8Dsz.js";import{a as o,b as at,l as Ye,o as re,c as Kt,e as Ue,g as S,d as je,t as Le,s as Lt,f as ot}from"../chunks/yEDUbZbk.js";import{p as At,c as Y,r as F,t as G,b as Bt,bo as Ke,aC as Se,bp as Ae,Y as R,ag as Qt,a8 as vt,s as a,g as e,a1 as le,aG as Pe,a5 as Vt,ae as f,ah as yt,a4 as x,l as Ht,a as ce,n as de,m as Ot,d as ct,ad as Ge,af as Xe}from"../chunks/BBDMeJL4.js";import{i as D,b as Re}from"../chunks/Dtbtl5su.js";import{b as P,c as Te,s as lt,a as Jt,S as qe}from"../chunks/BMrbs3EC.js";import{h as Qe}from"../chunks/CWmHQEyb.js";import{g as Me}from"../chunks/BmP3yl81.js";import{w as He}from"../chunks/B3cbqYdb.js";import{n as Je}from"../chunks/Dx6YFABE.js";import{a as qt}from"../chunks/C8t_lVji.js";import{t as Q,c as _t,S as pe,r as Oe}from"../chunks/CRbsz2jz.js";import{p as I,s as se,r as Ne,l as zt}from"../chunks/CpXgbTWt.js";import{e as Be}from"../chunks/CpAdcarq.js";import{c as Zt}from"../chunks/CDs3H3KT.js";import{c as bt,s as wt}from"../chunks/Bt7P6UBm.js";import{i as ue}from"../chunks/Ddpk8P2X.js";import{I as $e}from"../chunks/Iwcm6r7d.js";const tn=Array(12).fill(0);var en=at('<div class="sonner-loading-bar"></div>'),nn=at('<div><div class="sonner-spinner"></div></div>');function an(c,t){At(t,!0);var n=nn(),b=Y(n);Be(b,23,()=>tn,(d,C)=>`spinner-bar-${C}`,(d,C)=>{var T=en();o(d,T)}),F(b),F(n),G(d=>{wt(n,1,d),P(n,"data-visible",t.visible)},[()=>bt(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),o(c,n),Bt()}const on=typeof window<"u"?window:void 0;function sn(c){let t=c.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class rn{#e;#t;constructor(t={}){const{window:n=on,document:b=n?.document}=t;n!==void 0&&(this.#e=b,this.#t=Ye(d=>{const C=re(n,"focusin",d),T=re(n,"focusout",d);return()=>{C(),T()}}))}get current(){return this.#t?.(),this.#e?sn(this.#e):null}}new rn;class ln{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return Ke(this.#t)}get(){const t=Se(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const n=Se(this.#t);return n===void 0?t:n}set(t){return Ae(this.#t,t)}}const cn=new ln("<Toaster/>");function oe(c){return c.label!==void 0}function dn(){let c=R(Qt(typeof document<"u"?document.hidden:!1));return vt(()=>re(document,"visibilitychange",()=>{a(c,document.hidden,!0)})),{get current(){return e(c)}}}const ze=4e3,un=14,fn=45,vn=200,mn=.05,gn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function hn(c){const[t,n]=c.split("-"),b=[];return t&&b.push(t),n&&b.push(n),b}function ke(c){return 1/(1.5+Math.abs(c)/20)}var _n=at("<div><!></div>"),bn=at('<button data-close-button=""><!></button>'),wn=at('<div data-icon=""><!> <!></div>'),yn=at('<div data-description=""><!></div>'),xn=at('<button data-button="" data-cancel=""> </button>'),In=at('<button data-button=""> </button>'),Tn=at('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Mn=at('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function En(c,t){At(t,!0);const n=l=>{var v=S(),w=x(v);{var L=E=>{var X=_n(),Ft=Y(X);lt(Ft,()=>t.loadingIcon),F(X),G(Xt=>{wt(X,1,Xt),P(X,"data-visible",e(k)==="loading")},[()=>bt(_t(e(nt)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),o(E,X)},H=E=>{{let X=f(()=>_t(e(nt)?.loader,t.toast.classes?.loader)),Ft=f(()=>e(k)==="loading");an(E,{get class(){return e(X)},get visible(){return e(Ft)}})}};D(w,E=>{t.loadingIcon?E(L):E(H,!1)})}o(l,v)};let b=I(t,"cancelButtonStyle",3,""),d=I(t,"actionButtonStyle",3,""),C=I(t,"descriptionClass",3,""),T=I(t,"unstyled",3,!1),M=I(t,"defaultRichColors",3,!1);const g={...gn};let u=R(!1),A=R(!1),B=R(!1),N=R(!1),U=R(!1),j=R(0),it=R(0),Pt=t.toast.duration||t.duration||ze,et=R(void 0),z=R(null),st=R(null);const xt=f(()=>t.index===0),Wt=f(()=>t.index+1<=t.visibleToasts),k=f(()=>t.toast.type),J=f(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),rt=f(()=>t.toast.class||""),kt=f(()=>t.toast.descriptionClass||""),It=f(()=>Q.heights.findIndex(l=>l.toastId===t.toast.id)||0),Tt=f(()=>t.toast.closeButton??t.closeButton),Rt=f(()=>t.toast.duration??t.duration??ze);let Dt=null;const pt=f(()=>t.position.split("-")),fe=f(()=>Q.heights.reduce((l,v,w)=>w>=e(It)?l:l+v.height,0)),ve=dn(),me=f(()=>t.toast.invert||t.invert),Gt=f(()=>e(k)==="loading"),nt=f(()=>({...g,...t.classes})),ge=f(()=>t.toast.title),he=f(()=>t.toast.description);let Mt=R(0),$t=R(0);const Yt=f(()=>Math.round(e(It)*un+e(fe)));vt(()=>{e(ge),e(he);let l;t.expanded||t.expandByDefault?l=1:l=1-t.index*mn;const v=le(()=>e(et));if(v===void 0)return;v.style.setProperty("height","auto");const w=v.offsetHeight,L=v.getBoundingClientRect().height,H=Math.round(L/l+Number.EPSILON&100)/100;v.style.removeProperty("height");let E;Math.abs(H-w)<1?E=H:E=w,a(it,E,!0),Q.setHeight({toastId:t.toast.id,height:E})});function i(){a(A,!0),a(j,e(Yt),!0),Q.removeHeight(t.toast.id),setTimeout(()=>{Q.remove(t.toast.id)},vn)}let V;const mt=f(()=>t.toast.promise&&e(k)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function gt(){a(Mt,new Date().getTime(),!0),V=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),i()},Pt)}function Nt(){if(e($t)<e(Mt)){const l=new Date().getTime()-e(Mt);Pt=Pt-l}a($t,new Date().getTime(),!0)}vt(()=>{t.toast.updated&&(clearTimeout(V),Pt=e(Rt),gt())}),vt(()=>(e(mt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&ve.current?Nt():gt()),()=>clearTimeout(V))),Pe(()=>{a(u,!0);const l=e(et)?.getBoundingClientRect().height;return a(it,l,!0),Q.setHeight({toastId:t.toast.id,height:l}),()=>{Q.removeHeight(t.toast.id)}}),vt(()=>{t.toast.delete&&le(()=>{i(),t.toast.onDismiss?.(t.toast)})});const _e=l=>{if(e(Gt))return;a(j,e(Yt),!0);const v=l.target;v.setPointerCapture(l.pointerId),v.tagName!=="BUTTON"&&(a(B,!0),Dt={x:l.clientX,y:l.clientY})},De=()=>{if(e(N)||!e(J))return;Dt=null;const l=Number(e(et)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),v=Number(e(et)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),w=new Date().getTime()-0,L=e(z)==="x"?l:v,H=Math.abs(L)/w;if(Math.abs(L)>=fn||H>.11){a(j,e(Yt),!0),t.toast.onDismiss?.(t.toast),e(z)==="x"?a(st,l>0?"right":"left",!0):a(st,v>0?"down":"up",!0),i(),a(N,!0);return}else e(et)?.style.setProperty("--swipe-amount-x","0px"),e(et)?.style.setProperty("--swipe-amount-y","0px");a(U,!1),a(B,!1),a(z,null)},te=l=>{if(!Dt||!e(J)||(window.getSelection()?.toString().length??-1)>0)return;const w=l.clientY-Dt.y,L=l.clientX-Dt.x,H=t.swipeDirections??hn(t.position);!e(z)&&(Math.abs(L)>1||Math.abs(w)>1)&&a(z,Math.abs(L)>Math.abs(w)?"x":"y",!0);let E={x:0,y:0};if(e(z)==="y"){if(H.includes("top")||H.includes("bottom"))if(H.includes("top")&&w<0||H.includes("bottom")&&w>0)E.y=w;else{const X=w*ke(w);E.y=Math.abs(X)<Math.abs(w)?X:w}}else if(e(z)==="x"&&(H.includes("left")||H.includes("right")))if(H.includes("left")&&L<0||H.includes("right")&&L>0)E.x=L;else{const X=L*ke(L);E.x=Math.abs(X)<Math.abs(L)?X:L}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&a(U,!0),e(et)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(et)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},ht=()=>{a(B,!1),a(z,null),Dt=null},Et=f(()=>t.toast.icon?t.toast.icon:e(k)==="success"?t.successIcon:e(k)==="error"?t.errorIcon:e(k)==="warning"?t.warningIcon:e(k)==="info"?t.infoIcon:e(k)==="loading"?t.loadingIcon:null);var r=Mn();P(r,"tabindex",0);let Ut;var ee=Y(r);{var Ce=l=>{var v=bn(),w=Y(v);lt(w,()=>t.closeIcon??yt),F(v),G(L=>{P(v,"aria-label",t.closeButtonAriaLabel),P(v,"data-disabled",e(Gt)),wt(v,1,L)},[()=>bt(_t(e(nt)?.closeButton,t.toast?.classes?.closeButton))]),Kt("click",v,()=>{e(Gt)||!e(J)||(i(),t.toast.onDismiss?.(t.toast))}),o(l,v)};D(ee,l=>{e(Tt)&&!t.toast.component&&e(k)!=="loading"&&t.closeIcon!==null&&l(Ce)})}var be=Vt(ee,2);{var we=l=>{const v=f(()=>t.toast.component);var w=S(),L=x(w);Zt(L,()=>e(v),(H,E)=>{E(H,se(()=>t.toast.componentProps,{closeToast:i}))}),o(l,w)},ye=l=>{var v=Tn(),w=x(v);{var L=h=>{var y=wn(),s=Y(y);{var O=m=>{var _=S(),tt=x(_);{var W=Ct=>{var ae=S(),Ie=x(ae);Zt(Ie,()=>t.toast.icon,(q,$)=>{$(q,{})}),o(Ct,ae)},ft=Ct=>{n(Ct)};D(tt,Ct=>{t.toast.icon?Ct(W):Ct(ft,!1)})}o(m,_)};D(s,m=>{(t.toast.promise||e(k)==="loading")&&m(O)})}var K=Vt(s,2);{var Z=m=>{var _=S(),tt=x(_);{var W=q=>{var $=S(),St=x($);Zt(St,()=>t.toast.icon,(Ve,We)=>{We(Ve,{})}),o(q,$)},ft=q=>{var $=S(),St=x($);lt(St,()=>t.successIcon??yt),o(q,$)},Ct=q=>{var $=S(),St=x($);lt(St,()=>t.errorIcon??yt),o(q,$)},ae=q=>{var $=S(),St=x($);lt(St,()=>t.warningIcon??yt),o(q,$)},Ie=q=>{var $=S(),St=x($);lt(St,()=>t.infoIcon??yt),o(q,$)};D(tt,q=>{t.toast.icon?q(W):e(k)==="success"?q(ft,1):e(k)==="error"?q(Ct,2):e(k)==="warning"?q(ae,3):e(k)==="info"&&q(Ie,4)})}o(m,_)};D(K,m=>{t.toast.type!=="loading"&&m(Z)})}F(y),G(m=>wt(y,1,m),[()=>bt(_t(e(nt)?.icon,t.toast?.classes?.icon))]),o(h,y)};D(w,h=>{(e(k)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&h(L)})}var H=Vt(w,2),E=Y(H),X=Y(E);{var Ft=h=>{var y=S(),s=x(y);{var O=Z=>{const m=f(()=>t.toast.title);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.title)),o(Z,m)};D(s,Z=>{typeof t.toast.title!="string"?Z(O):Z(K,!1)})}o(h,y)};D(X,h=>{t.toast.title&&h(Ft)})}F(E);var Xt=Vt(E,2);{var xe=h=>{var y=yn(),s=Y(y);{var O=Z=>{const m=f(()=>t.toast.description);var _=S(),tt=x(_);Zt(tt,()=>e(m),(W,ft)=>{ft(W,se(()=>t.toast.componentProps))}),o(Z,_)},K=Z=>{var m=Le();G(()=>Lt(m,t.toast.description)),o(Z,m)};D(s,Z=>{typeof t.toast.description!="string"?Z(O):Z(K,!1)})}F(y),G(Z=>wt(y,1,Z),[()=>bt(_t(C(),e(kt),e(nt)?.description,t.toast.classes?.description))]),o(h,y)};D(Xt,h=>{t.toast.description&&h(xe)})}F(H);var ne=Vt(H,2);{var dt=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=xn(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.cancelButtonStyle??b()),wt(_,1,W),Lt(tt,t.toast.cancel.label)},[()=>bt(_t(e(nt)?.cancelButton,t.toast?.classes?.cancelButton))]),Kt("click",_,W=>{oe(t.toast.cancel)&&e(J)&&(t.toast.cancel?.onClick?.(W),i())}),o(m,_)},Z=f(()=>oe(t.toast.cancel));D(s,m=>{typeof t.toast.cancel=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(ne,h=>{t.toast.cancel&&h(dt)})}var p=Vt(ne,2);{var ut=h=>{var y=S(),s=x(y);{var O=m=>{var _=S(),tt=x(_);Zt(tt,()=>t.toast.action,(W,ft)=>{ft(W,{})}),o(m,_)},K=m=>{var _=In(),tt=Y(_,!0);F(_),G(W=>{Te(_,t.toast.actionButtonStyle??d()),wt(_,1,W),Lt(tt,t.toast.action.label)},[()=>bt(_t(e(nt)?.actionButton,t.toast?.classes?.actionButton))]),Kt("click",_,W=>{oe(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&i())}),o(m,_)},Z=f(()=>oe(t.toast.action));D(s,m=>{typeof t.toast.action=="function"?m(O):e(Z)&&m(K,1)})}o(h,y)};D(p,h=>{t.toast.action&&h(ut)})}G((h,y)=>{wt(H,1,h),wt(E,1,y)},[()=>bt(_t(e(nt)?.content,t.toast?.classes?.content)),()=>bt(_t(e(nt)?.title,t.toast?.classes?.title))]),o(l,v)};D(be,l=>{t.toast.component?l(we):l(ye,!1)})}F(r),Re(r,l=>a(et,l),()=>e(et)),G((l,v,w)=>{wt(r,1,l),P(r,"aria-live",t.toast.important?"assertive":"polite"),P(r,"data-rich-colors",t.toast.richColors??M()),P(r,"data-styled",!(t.toast.component||t.toast.unstyled||T())),P(r,"data-mounted",e(u)),P(r,"data-promise",v),P(r,"data-swiped",e(U)),P(r,"data-removed",e(A)),P(r,"data-visible",e(Wt)),P(r,"data-y-position",e(pt)[0]),P(r,"data-x-position",e(pt)[1]),P(r,"data-index",t.index),P(r,"data-front",e(xt)),P(r,"data-swiping",e(B)),P(r,"data-dismissible",e(J)),P(r,"data-type",e(k)),P(r,"data-invert",e(me)),P(r,"data-swipe-out",e(N)),P(r,"data-swipe-direction",e(st)),P(r,"data-expanded",w),Ut=Te(r,`${t.style} ${t.toast.style}`,Ut,{"--index":t.index,"--toasts-before":t.index,"--z-index":Q.toasts.length-t.index,"--offset":`${e(A)?e(j):e(Yt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(it)}px`})},[()=>bt(_t(t.class,e(rt),e(nt)?.toast,t.toast?.classes?.toast,e(nt)?.[e(k)],t.toast?.classes?.[e(k)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(u))]),Kt("pointermove",r,te),Kt("pointerup",r,De),Kt("pointerdown",r,_e),Ue("dragend",r,ht),o(c,r),Bt()}je(["pointermove","pointerup","pointerdown","click"]);var Sn=ot('<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 An(c){var t=Sn();o(c,t)}var Bn=ot('<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 Pn(c){var t=Bn();o(c,t)}var Dn=ot('<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 Cn(c){var t=Dn();o(c,t)}var Ln=ot('<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 Hn(c){var t=Ln();o(c,t)}var On=ot('<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 zn(c){var t=On();o(c,t)}const kn=3,Fe="24px",Ze="16px",Rn=4e3,Nn=356,Fn=14,Ee="dark",ie="light";function Zn(c,t){const n={};return[c,t].forEach((b,d)=>{const C=d===1,T=C?"--mobile-offset":"--offset",M=C?Ze:Fe;function g(u){["top","right","bottom","left"].forEach(A=>{n[`${T}-${A}`]=typeof u=="number"?`${u}px`:u})}typeof b=="number"||typeof b=="string"?g(b):typeof b=="object"?["top","right","bottom","left"].forEach(u=>{const A=b[u];A===void 0?n[`${T}-${u}`]=M:n[`${T}-${u}`]=typeof A=="number"?`${A}px`:A}):g(M)}),n}var Vn=at("<ol></ol>"),Wn=at('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function Yn(c,t){At(t,!0);function n(i){return i!=="system"?i:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ee:ie}let b=I(t,"invert",3,!1),d=I(t,"position",3,"bottom-right"),C=I(t,"hotkey",19,()=>["altKey","KeyT"]),T=I(t,"expand",3,!1),M=I(t,"closeButton",3,!1),g=I(t,"offset",3,Fe),u=I(t,"mobileOffset",3,Ze),A=I(t,"theme",3,"light"),B=I(t,"richColors",3,!1),N=I(t,"duration",3,Rn),U=I(t,"visibleToasts",3,kn),j=I(t,"toastOptions",19,()=>({})),it=I(t,"dir",7,"auto"),Pt=I(t,"gap",3,Fn),et=I(t,"pauseWhenPageIsHidden",3,!1),z=I(t,"containerAriaLabel",3,"Notifications"),st=I(t,"closeButtonAriaLabel",3,"Close toast"),xt=Ne(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 Wt(){if(it()!=="auto")return it();if(typeof window>"u"||typeof document>"u")return"ltr";const i=document.documentElement.getAttribute("dir");return i==="auto"||!i?(le(()=>it(window.getComputedStyle(document.documentElement).direction??"ltr")),it()):(le(()=>it(i)),i)}const k=f(()=>Array.from(new Set([d(),...Q.toasts.filter(i=>i.position).map(i=>i.position)].filter(Boolean))));let J=R(!1),rt=R(!1),kt=R(Qt(n(A()))),It=R(void 0),Tt=R(null),Rt=R(!1);const Dt=f(()=>C().join("+").replace(/Key/g,"").replace(/Digit/g,""));vt(()=>{Q.toasts.length<=1&&a(J,!1)}),vt(()=>{const i=Q.toasts.filter(V=>V.dismiss&&!V.delete);if(i.length>0){const V=Q.toasts.map(mt=>i.find(Nt=>Nt.id===mt.id)?{...mt,delete:!0}:mt);Q.toasts=V}}),vt(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null),a(Rt,!1))}),Pe(()=>(Q.reset(),re(document,"keydown",V=>{C().every(gt=>V[gt]||V.code===gt)&&(a(J,!0),e(It)?.focus()),V.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&a(J,!1)}))),vt(()=>{if(A()!=="system"&&a(kt,A()),typeof window<"u"){A()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?a(kt,Ee):a(kt,ie));const i=window.matchMedia("(prefers-color-scheme: dark)"),V=({matches:mt})=>{A()==="system"&&a(kt,mt?Ee:ie,!0)};"addEventListener"in i?i.addEventListener("change",V):i.addListener(V)}});const pt=i=>{t.onblur?.(i),e(Rt)&&!i.currentTarget.contains(i.relatedTarget)&&(a(Rt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),a(Tt,null)))},fe=i=>{t.onfocus?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&(e(Rt)||(a(Rt,!0),a(Tt,i.relatedTarget,!0)))},ve=i=>{t.onpointerdown?.(i),!(i.target instanceof HTMLElement&&i.target.dataset.dismissible==="false")&&a(rt,!0)},me=i=>{t.onmouseenter?.(i),a(J,!0)},Gt=i=>{t.onmouseleave?.(i),e(rt)||a(J,!1)},nt=i=>{t.onmousemove?.(i),a(J,!0)},ge=i=>{t.ondragend?.(i),a(J,!1)},he=i=>{t.onpointerup?.(i),a(rt,!1)};cn.set(new pe);var Mt=Wn();P(Mt,"tabindex",-1);var $t=Y(Mt);{var Yt=i=>{var V=S(),mt=x(V);Be(mt,18,()=>e(k),gt=>gt,(gt,Nt,_e,De)=>{const te=f(()=>{const[r,Ut]=Nt.split("-");return{y:r,x:Ut}}),ht=f(()=>Zn(g(),u()));var Et=Vn();Jt(Et,r=>({tabindex:-1,dir:r,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(kt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:fe,onmouseenter:me,onmousemove:nt,onmouseleave:Gt,ondragend:ge,onpointerdown:ve,onpointerup:he,...xt,[qe]:{"--front-toast-height":`${Q.heights[0]?.height}px`,"--width":`${Nn}px`,"--gap":`${Pt()}px`,"--offset-top":e(ht)["--offset-top"],"--offset-right":e(ht)["--offset-right"],"--offset-bottom":e(ht)["--offset-bottom"],"--offset-left":e(ht)["--offset-left"],"--mobile-offset-top":e(ht)["--mobile-offset-top"],"--mobile-offset-right":e(ht)["--mobile-offset-right"],"--mobile-offset-bottom":e(ht)["--mobile-offset-bottom"],"--mobile-offset-left":e(ht)["--mobile-offset-left"]}}),[Wt],void 0,void 0,"svelte-nbs0zk"),Be(Et,23,()=>Q.toasts.filter(r=>!r.position&&e(_e)===0||r.position===Nt),r=>r.id,(r,Ut,ee,Ce)=>{{const be=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.successIcon??yt),o(s,O)},y=s=>{An(s)};D(ut,s=>{t.successIcon?s(h):t.successIcon!==null&&s(y,1)})}o(dt,p)},we=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.errorIcon??yt),o(s,O)},y=s=>{Pn(s)};D(ut,s=>{t.errorIcon?s(h):t.errorIcon!==null&&s(y,1)})}o(dt,p)},ye=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.warningIcon??yt),o(s,O)},y=s=>{Cn(s)};D(ut,s=>{t.warningIcon?s(h):t.warningIcon!==null&&s(y,1)})}o(dt,p)},l=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.infoIcon??yt),o(s,O)},y=s=>{Hn(s)};D(ut,s=>{t.infoIcon?s(h):t.infoIcon!==null&&s(y,1)})}o(dt,p)},v=dt=>{var p=S(),ut=x(p);{var h=s=>{var O=S(),K=x(O);lt(K,()=>t.closeIcon??yt),o(s,O)},y=s=>{zn(s)};D(ut,s=>{t.closeIcon?s(h):t.closeIcon!==null&&s(y,1)})}o(dt,p)};let w=f(()=>j()?.duration??N()),L=f(()=>j()?.class??""),H=f(()=>j()?.descriptionClass||""),E=f(()=>j()?.style??""),X=f(()=>j().classes||{}),Ft=f(()=>j().unstyled??!1),Xt=f(()=>j()?.cancelButtonStyle??""),xe=f(()=>j()?.actionButtonStyle??""),ne=f(()=>j()?.closeButtonAriaLabel??st());En(r,{get index(){return e(ee)},get toast(){return e(Ut)},get defaultRichColors(){return B()},get duration(){return e(w)},get class(){return e(L)},get descriptionClass(){return e(H)},get invert(){return b()},get visibleToasts(){return U()},get closeButton(){return M()},get interacting(){return e(rt)},get position(){return Nt},get style(){return e(E)},get classes(){return e(X)},get unstyled(){return e(Ft)},get cancelButtonStyle(){return e(Xt)},get actionButtonStyle(){return e(xe)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return T()},get expanded(){return e(J)},get pauseWhenPageIsHidden(){return et()},get loadingIcon(){return t.loadingIcon},successIcon:be,errorIcon:we,warningIcon:ye,infoIcon:l,closeIcon:v,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),F(Et),Re(Et,r=>a(It,r),()=>e(It)),G(()=>Et.dir=Et.dir),o(gt,Et)}),o(i,V)};D($t,i=>{Q.toasts.length>0&&i(Yt)})}F(Mt),G(()=>P(Mt,"aria-label",`${z()??""} ${e(Dt)??""}`)),o(c,Mt),Bt()}var Un=ot("<title> </title>"),jn=ot('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function Kn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Un(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Gn=ot("<title> </title>"),Xn=ot('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function qn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Xn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Gn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var Qn=ot("<title> </title>"),Jn=ot('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function pn(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=Jn();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=Qn(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(2),F(g),o(c,g),Bt()}var $n=ot("<title> </title>"),ta=ot('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function ea(c,t){const n=zt(t,["children","$$slots","$$events","$$legacy"]),b=zt(n,["size","title"]);At(t,!1);const d=Ot(),C=Ot();let T=I(t,"size",8,16),M=I(t,"title",8,void 0);Ht(()=>(ct(n),ct(M())),()=>{a(d,n["aria-label"]||n["aria-labelledby"]||M())}),Ht(()=>(e(d),ct(n)),()=>{a(C,{"aria-hidden":e(d)?void 0:!0,role:e(d)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),ce(),ue();var g=ta();Jt(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:T(),height:T(),...e(C),...b}));var u=Y(g);{var A=B=>{var N=$n(),U=Y(N,!0);F(N),G(()=>Lt(U,M())),o(B,N)};D(u,B=>{M()&&B(A)})}de(3),F(g),o(c,g),Bt()}function na(c,t){At(t,!0);const n=Se("theme");let b=Ne(t,["$$slots","$$events","$$legacy"]);Yn(c,se({get theme(){return n.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>b,{loadingIcon:u=>{$e(u,{class:"size-4 animate-spin"})},successIcon:u=>{Kn(u,{class:"size-4"})},errorIcon:u=>{qn(u,{class:"size-4"})},infoIcon:u=>{pn(u,{class:"size-4"})},warningIcon:u=>{ea(u,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),Bt()}var aa=at('<div style="display: contents;"><!> <!></div>');function xa(c,t){At(t,!0);const n=typeof localStorage<"u"?localStorage.getItem("theme"):null,b=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let d=R(Qt(n||b));Ae("theme",{get current(){return e(d)},toggle(){a(d,e(d)==="dark"?"light":"dark",!0),localStorage.setItem("theme",e(d))}});const T=typeof localStorage<"u"?localStorage.getItem("chatMode"):null,M=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null,g=T==="panel"||T==="full"?T:T==="closed"?"closed":M==="true"?"panel":"closed";let u=R(Qt(g)),A=R(Qt(g==="closed"?"panel":g));function B(){localStorage.setItem("chatMode",e(u))}Ae("chat",{get open(){return e(u)!=="closed"},get mode(){return e(u)},toggle(){a(u,e(u)==="closed"?e(A):"closed",!0),B()},close(){a(u,"closed"),B()},expand(){a(u,"full"),a(A,"full"),B()},collapse(){a(u,"panel"),a(A,"panel"),B()}}),vt(()=>{document.documentElement.setAttribute("data-theme",e(d))});let U=R(null);vt(()=>{if(qt.loading)return;const z=qt.user?.email??(qt.authEnabled?null:"__open__");z&&z!==e(U)&&(e(U)!==null&&Je.deselect(),a(U,z,!0),He.load(),Oe.connect()),!z&&e(U)&&(a(U,null),Oe.disconnect())}),Pe(async()=>{const z=window.location.pathname,st=z==="/login",xt=z==="/setup",{authenticated:Wt,authEnabled:k,needsSetup:J}=await qt.checkAuth();if(J&&!xt){Me("/setup");return}if(k&&!Wt&&!st){Me("/login");return}if(Wt&&(st||xt)){Me("/");return}st||xt||(jt(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url).catch(()=>{}),Promise.all([jt(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),jt(()=>import("../chunks/DnL9f0lc.js").then(rt=>rt.i),__vite__mapDeps([3,4]),import.meta.url),jt(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([5,4,3,6,7,8]),import.meta.url),jt(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([6,7,4,3]),import.meta.url),jt(()=>import("../chunks/C7VoTosa.js").then(rt=>rt.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",rt=>{a(d,rt.detail,!0)}))});var j=aa();Qe("12qhfyh",z=>{Ge(()=>{Xe.title=(He.name||"Studiograph")??""})});var it=Y(j);{var Pt=z=>{var st=S(),xt=x(st);lt(xt,()=>t.children),o(z,st)};D(it,z=>{qt.loading||z(Pt)})}var et=Vt(it,2);na(et,{}),F(j),G(()=>P(j,"data-theme",e(d))),o(c,j),Bt()}export{xa as component};
@@ -1 +1 @@
1
- import{a as u,b as h,s}from"../chunks/DY21hM66.js";import{i as g}from"../chunks/BpQkNqbd.js";import{p as l,a4 as v,t as d,b as _,c as e,r as o,a5 as x}from"../chunks/Bo0CMKlC.js";import{p}from"../chunks/ByGNDrbC.js";import{s as b}from"../chunks/D5GOt_JW.js";const $={get error(){return p.error},get status(){return p.status}};b.updated.check;const m=$;var k=h("<h1> </h1> <p> </p>",1);function z(i,c){l(c,!1),g();var t=k(),r=v(t),f=e(r,!0);o(r);var a=x(r,2),n=e(a,!0);o(a),d(()=>{s(f,m.status),s(n,m.error?.message)}),u(i,t),_()}export{z as component};
1
+ import{a as u,b as h,s}from"../chunks/yEDUbZbk.js";import{i as g}from"../chunks/Ddpk8P2X.js";import{p as l,a4 as v,t as d,b as _,c as e,r as o,a5 as x}from"../chunks/BBDMeJL4.js";import{p}from"../chunks/C8IfoK2g.js";import{s as b}from"../chunks/BmP3yl81.js";const $={get error(){return p.error},get status(){return p.status}};b.updated.check;const m=$;var k=h("<h1> </h1> <p> </p>",1);function z(i,c){l(c,!1),g();var t=k(),r=v(t),f=e(r,!0);o(r);var a=x(r,2),n=e(a,!0);o(a),d(()=>{s(f,m.status),s(n,m.error?.message)}),u(i,t),_()}export{z as component};