studiograph 1.3.44-next.1 → 1.3.44-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/server/index.js +36 -0
  2. package/dist/server/index.js.map +1 -1
  3. package/dist/server/routes/insights-api.d.ts +7 -3
  4. package/dist/server/routes/insights-api.js +46 -21
  5. package/dist/server/routes/insights-api.js.map +1 -1
  6. package/dist/server/ws-hub.d.ts +6 -1
  7. package/dist/server/ws-hub.js.map +1 -1
  8. package/dist/services/auth-service.d.ts +11 -0
  9. package/dist/services/auth-service.js +38 -0
  10. package/dist/services/auth-service.js.map +1 -1
  11. package/dist/services/insights.d.ts +18 -11
  12. package/dist/services/insights.js +121 -77
  13. package/dist/services/insights.js.map +1 -1
  14. package/dist/web/_app/immutable/assets/3.zsEg_MDN.css +1 -0
  15. package/dist/web/_app/immutable/assets/{7.CObh-s2-.css → 7.5LBMlZdT.css} +1 -1
  16. package/dist/web/_app/immutable/chunks/{Dv65pOU4.js → 0rsp5-Up.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/{DTDfEpZd.js → 0wBGAod7.js} +1 -1
  18. package/dist/web/_app/immutable/chunks/{Be5VhuaI.js → APIqItee.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/{JDb8RpWX.js → B3NI-DOv.js} +1 -1
  20. package/dist/web/_app/immutable/chunks/BAAbylyg.js +1 -0
  21. package/dist/web/_app/immutable/chunks/{SJusBvJH.js → BHue2Ock.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/{DRJ9YW_E.js → BPXdu_FX.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/BU2bHQbQ.js +4 -0
  24. package/dist/web/_app/immutable/chunks/{DYVSnKKh.js → BUcIsKRk.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{BJimep0Q.js → BgBJ0u3M.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/{P7PfXw_H.js → Bnl5ADsW.js} +1 -1
  27. package/dist/web/_app/immutable/chunks/Bs4ovbtO.js +2 -0
  28. package/dist/web/_app/immutable/chunks/{7lzM-85A.js → Bt5_mycY.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{D0zbd2ZV.js → By_Wtb5J.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/{DEyrdHQB.js → CFtRXHDP.js} +1 -1
  31. package/dist/web/_app/immutable/chunks/{BA_Wro7X.js → CRnhIQbv.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/CSzKZPD4.js +1 -0
  33. package/dist/web/_app/immutable/chunks/{RGHlrGBn.js → D-yNNNdf.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/DC9z5DEo.js +1 -0
  35. package/dist/web/_app/immutable/chunks/{BtJ5VKKi.js → DCVmM0L5.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{CdvQjHNy.js → DHtLlmE0.js} +1 -1
  37. package/dist/web/_app/immutable/chunks/{9QAsBMIK.js → DQ5NTKSo.js} +1 -1
  38. package/dist/web/_app/immutable/chunks/{B-eIKuyV.js → DQJwHeKh.js} +1 -1
  39. package/dist/web/_app/immutable/chunks/{CNVuHNwC.js → DQYNi3YK.js} +1 -1
  40. package/dist/web/_app/immutable/chunks/{CfuRx7rA.js → DSh-OF2y.js} +1 -1
  41. package/dist/web/_app/immutable/chunks/DSkxw4Ss.js +1 -0
  42. package/dist/web/_app/immutable/chunks/{Cwkp_c4R.js → DT3KtxWU.js} +1 -1
  43. package/dist/web/_app/immutable/chunks/DVx_0hnZ.js +1 -0
  44. package/dist/web/_app/immutable/chunks/{mkNdSDMf.js → DiWKchgv.js} +1 -1
  45. package/dist/web/_app/immutable/chunks/{Dg_GUhrt.js → Diui_MO0.js} +1 -1
  46. package/dist/web/_app/immutable/chunks/DodWDTE5.js +1 -0
  47. package/dist/web/_app/immutable/chunks/{fKdE_Jx_.js → KHKAD2Ng.js} +1 -1
  48. package/dist/web/_app/immutable/chunks/{BH82yShn.js → Sk0ODu4Y.js} +1 -1
  49. package/dist/web/_app/immutable/chunks/{Bypyvp-Q.js → azUmHUDT.js} +1 -1
  50. package/dist/web/_app/immutable/chunks/{CajNsaOw.js → b0XUoOIH.js} +2 -2
  51. package/dist/web/_app/immutable/chunks/{DP6MOIr2.js → lsAKkphT.js} +1 -1
  52. package/dist/web/_app/immutable/chunks/{BLi1Oegj.js → vZ2iBqLE.js} +1 -1
  53. package/dist/web/_app/immutable/entry/app.DA5OyPOi.js +2 -0
  54. package/dist/web/_app/immutable/entry/start.DTjSVtws.js +1 -0
  55. package/dist/web/_app/immutable/nodes/0.BIvpQ3Qk.js +2 -0
  56. package/dist/web/_app/immutable/nodes/1.y3j9wcQE.js +1 -0
  57. package/dist/web/_app/immutable/nodes/{10.BqjRpXN6.js → 10.D03BZcr1.js} +1 -1
  58. package/dist/web/_app/immutable/nodes/2.Du0xZVQg.js +84 -0
  59. package/dist/web/_app/immutable/nodes/3.weQEi2lI.js +1 -0
  60. package/dist/web/_app/immutable/nodes/4.DJyhWznw.js +11 -0
  61. package/dist/web/_app/immutable/nodes/{5.pB3H4l7g.js → 5.CipwuwB3.js} +1 -1
  62. package/dist/web/_app/immutable/nodes/6.Daxwm3Lw.js +2 -0
  63. package/dist/web/_app/immutable/nodes/7.TxeJDMtw.js +2 -0
  64. package/dist/web/_app/immutable/nodes/{8.B5sO5Rkn.js → 8.DWNdmB4l.js} +1 -1
  65. package/dist/web/_app/immutable/nodes/{9.DOysjWYm.js → 9.BuTZk7Le.js} +1 -1
  66. package/dist/web/_app/version.json +1 -1
  67. package/dist/web/index.html +11 -12
  68. package/package.json +1 -1
  69. package/dist/web/_app/immutable/assets/3.CHSDCrUY.css +0 -1
  70. package/dist/web/_app/immutable/chunks/BZd_7gpI.js +0 -1
  71. package/dist/web/_app/immutable/chunks/CAEA_aBe.js +0 -1
  72. package/dist/web/_app/immutable/chunks/CHDa87Lu.js +0 -1
  73. package/dist/web/_app/immutable/chunks/D18-Aspv.js +0 -1
  74. package/dist/web/_app/immutable/chunks/DQ_O96iG.js +0 -1
  75. package/dist/web/_app/immutable/chunks/DUsnWwWN.js +0 -1
  76. package/dist/web/_app/immutable/chunks/DgMUDNqD.js +0 -4
  77. package/dist/web/_app/immutable/entry/app.FJ-QaQhu.js +0 -2
  78. package/dist/web/_app/immutable/entry/start.Cae6DI7N.js +0 -1
  79. package/dist/web/_app/immutable/nodes/0.tyq0tjYR.js +0 -2
  80. package/dist/web/_app/immutable/nodes/1.D-QPCIcu.js +0 -1
  81. package/dist/web/_app/immutable/nodes/2.CogYiW3g.js +0 -84
  82. package/dist/web/_app/immutable/nodes/3.CQ8SfijF.js +0 -1
  83. package/dist/web/_app/immutable/nodes/4.BS-4PSr6.js +0 -11
  84. package/dist/web/_app/immutable/nodes/6.CKD5i0Ve.js +0 -2
  85. package/dist/web/_app/immutable/nodes/7.au7lCUbq.js +0 -2
@@ -1 +1 @@
1
- import{a as S}from"./DEyrdHQB.js";import{c as _,a as h,p as Q,b as D}from"./CajNsaOw.js";import{ac as y,g as s,s as P,e as R,p as C,a0 as m,b as O,ae as z,c as M,r as K,a1 as at}from"./CfuRx7rA.js";import{c as J}from"./BtJ5VKKi.js";import{p as l,r as A,s as k}from"./RGHlrGBn.js";import{s as I,a as j}from"./BA_Wro7X.js";import{C as kt,s as q,L as nt,w as it,v as _t,E as Pt,A as mt,b,N as Rt,x as xt,B as Dt,n as G,c as X,m as x,H as Et,O as Ut,I as Bt,J as Ft,T as Tt,K as yt,p as zt}from"./CNVuHNwC.js";import{c as H,a as bt}from"./9QAsBMIK.js";import{i as F,b as Ct}from"./Cwkp_c4R.js";const Mt=Dt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),T=new kt("Dialog.Root | AlertDialog.Root");class lt{static create(t){const e=T.getOr(null);return T.set(new lt(t,e))}opts;#t=R(null);get triggerNode(){return s(this.#t)}set triggerNode(t){P(this.#t,t,!0)}#e=R(null);get contentNode(){return s(this.#e)}set contentNode(t){P(this.#e,t,!0)}#r=R(null);get overlayNode(){return s(this.#r)}set overlayNode(t){P(this.#r,t,!0)}#o=R(null);get descriptionNode(){return s(this.#o)}set descriptionNode(t){P(this.#o,t,!0)}#n=R(void 0);get contentId(){return s(this.#n)}set contentId(t){P(this.#n,t,!0)}#s=R(void 0);get titleId(){return s(this.#s)}set titleId(t){P(this.#s,t,!0)}#a=R(void 0);get triggerId(){return s(this.#a)}set triggerId(t){P(this.#a,t,!0)}#i=R(void 0);get descriptionId(){return s(this.#i)}set descriptionId(t){P(this.#i,t,!0)}#l=R(null);get cancelNode(){return s(this.#l)}set cancelNode(t){P(this.#l,t,!0)}#c=R(0);get nestedOpenCount(){return s(this.#c)}set nestedOpenCount(t){P(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new mt({ref:b(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new mt({ref:b(()=>this.overlayNode),open:this.opts.open,enabled:!0}),it(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Rt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>Mt.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=y(()=>({"data-state":xt(this.opts.open.current)}));get sharedProps(){return s(this.#d)}set sharedProps(t){P(this.#d,t)}}class Ot{static create(t){return new Ot(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ct{static create(t){return new ct(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class dt{static create(t){return new dt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=q(this.opts.ref),it.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ut{static create(t){return new ut(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=q(this.opts.ref,n=>{this.root.descriptionNode=n}),it.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ht{static create(t){return new ht(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class pt{static create(t){return new pt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.overlayNode=n)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class ft{static create(t){return new ft(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.cancelNode=n),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}function Kt(r,t){C(t,!0);let e=l(t,"open",15,!1),n=l(t,"onOpenChange",3,G),o=l(t,"onOpenChangeComplete",3,G);lt.create({variant:b(()=>"alert-dialog"),open:b(()=>e(),d=>{e(d),n()(d)}),onOpenChangeComplete:b(()=>o())});var c=_(),a=m(c);I(a,()=>t.children??z),h(r,c),O()}var Jt=D("<div><!></div>");function jt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"level",3,2),a=A(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const d=dt.create({id:b(()=>n()),level:b(()=>c()),ref:b(()=>o(),i=>o(i))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Jt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Ht=D("<button><!></button>");function Lt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const a=ct.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Ht();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}var Wt=D("<button><!></button>");function qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"disabled",3,!1),a=A(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const d=ft.create({id:b(()=>n()),ref:b(()=>o(),i=>o(i)),disabled:b(()=>!!c())}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Wt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Vt=D("<!> <!>",1),Gt=D("<!> <div><!></div>",1);function Qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"forceMount",3,!1),a=l(t,"interactOutsideBehavior",3,"ignore"),d=l(t,"onCloseAutoFocus",3,G),p=l(t,"onEscapeKeydown",3,G),g=l(t,"onOpenAutoFocus",3,G),N=l(t,"onInteractOutside",3,G),w=l(t,"preventScroll",3,!0),u=l(t,"trapFocus",3,!0),i=l(t,"restoreScrollDelay",3,null),f=A(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const v=ht.create({id:b(()=>n()),ref:b(()=>o(),B=>o(B))}),L=y(()=>x(f,v.props));var E=_(),U=m(E);{var Y=B=>{Et(B,{get ref(){return v.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return v.root.opts.open.current},get onCloseAutoFocus(){return d()},onOpenAutoFocus:Z=>{g()(Z),!Z.defaultPrevented&&(Z.preventDefault(),Ut(0,()=>v.opts.ref.current?.focus()))},focusScope:(Z,At)=>{let gt=()=>At?.().props;Bt(Z,k(()=>s(L),{get enabled(){return v.root.opts.open.current},get ref(){return v.opts.ref},onEscapeKeydown:rt=>{p()(rt),!rt.defaultPrevented&&v.root.handleClose()},children:(rt,ae)=>{Ft(rt,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},get interactOutsideBehavior(){return a()},onInteractOutside:ot=>{N()(ot),!ot.defaultPrevented&&v.root.handleClose()},children:(ot,ie)=>{Tt(ot,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},children:(It,le)=>{var vt=_(),St=m(vt);{var wt=V=>{var $=Vt(),tt=m($);{var et=W=>{yt(W,{get preventScroll(){return w()},get restoreScrollDelay(){return i()}})};F(tt,W=>{v.root.opts.open.current&&W(et)})}var st=at(tt,2);{let W=y(()=>({props:x(s(L),gt()),...v.snippetProps}));I(st,()=>t.child,()=>s(W))}h(V,$)},Nt=V=>{var $=Gt(),tt=m($);yt(tt,{get preventScroll(){return w()}});var et=at(tt,2);j(et,W=>({...W}),[()=>x(s(L),gt())]);var st=M(et);I(st,()=>t.children??z),K(et),h(V,$)};F(St,V=>{t.child?V(wt):V(Nt,!1)})}h(It,vt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};F(U,B=>{(v.shouldRender||c())&&B(Y)})}h(r,E),O()}var Xt=D("<div><!></div>");function Yt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"forceMount",3,!1),c=l(t,"ref",15,null),a=A(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const d=pt.create({id:b(()=>n()),ref:b(()=>c(),u=>c(u))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=u=>{var i=_(),f=m(i);{var v=E=>{var U=_(),Y=m(U);{let B=y(()=>({props:x(s(p)),...d.snippetProps}));I(Y,()=>t.child,()=>s(B))}h(E,U)},L=E=>{var U=Xt();j(U,B=>({...B}),[()=>x(s(p))]);var Y=M(U);I(Y,()=>t.children??z,()=>d.snippetProps),K(U),h(E,U)};F(f,E=>{t.child?E(v):E(L,!1)})}h(u,i)};F(N,u=>{(d.shouldRender||o())&&u(w)})}h(r,g),O()}var Zt=D("<div><!></div>");function $t(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=ut.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Zt();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}function ye(r){return S(`/api/repos/${encodeURIComponent(r)}/sync`,{method:"POST"})}function _e(){return S("/api/sync",{method:"POST"})}function Pe(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh`,{method:"POST"})}function be(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh/apply`,{method:"POST"})}function Ce(){return S("/api/sources")}function Oe(){return S("/api/connectors")}function Ae(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`)}function Ie(r,t){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"POST",body:JSON.stringify({...t,name:r})})}function Se(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"DELETE"})}function we(r){return S(`/api/sources/${encodeURIComponent(r)}`)}function Ne(r,t){return S(`/api/sources/${encodeURIComponent(r)}`,{method:"POST",body:JSON.stringify(t)})}function ke(r,t){return S(`/api/repos/${encodeURIComponent(r)}`,{method:"PATCH",body:JSON.stringify({sync:t})})}function Re(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/authorize`,{method:"POST"})}function xe(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/status`)}function De(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/disconnect`,{method:"POST"})}function Ee(r,t){C(t,!0);let e=l(t,"open",15,!1),n=A(t,["$$slots","$$events","$$legacy","open"]);var o=_(),c=m(o);J(c,()=>Kt,(a,d)=>{d(a,k(()=>n,{get open(){return e()},set open(p){e(p)}}))}),h(r,o),O()}function te(r,t){let e=A(t,["$$slots","$$events","$$legacy"]);var n=_(),o=m(n);J(o,()=>zt,(c,a)=>{a(c,k(()=>e))}),h(r,n)}function Ue(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-lg font-semibold",t.class));J(c,()=>jt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-title",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Be(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt()));J(c,()=>Lt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-action",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Fe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt({variant:"ghost"})));J(c,()=>qt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-cancel",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ee=D("<div><!></div>");function Te(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=ee();j(o,a=>({"data-slot":"alert-dialog-footer",class:a,...n}),[()=>H("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}var re=D("<div><!></div>");function ze(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=re();j(o,a=>({"data-slot":"alert-dialog-header",class:a,...n}),[()=>H("flex flex-col gap-2 text-center sm:text-start",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}function oe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));J(c,()=>Yt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-overlay",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ne=D("<!> <!>",1);function Me(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","portalProps"]);te(r,k(()=>t.portalProps,{children:(o,c)=>{var a=ne(),d=m(a);oe(d,{});var p=at(d,2);{let g=y(()=>H("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));J(p,()=>Qt,(N,w)=>{w(N,k({"data-slot":"alert-dialog-content",get class(){return s(g)}},()=>n,{get ref(){return e()},set ref(u){e(u)}}))})}h(o,a)},$$slots:{default:!0}})),O()}function Ke(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-[var(--color-text-secondary)] text-sm",t.class));J(c,()=>$t,(d,p)=>{p(d,k({"data-slot":"alert-dialog-description",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}export{Me as A,ye as B,lt as D,ze as a,Ue as b,Ke as c,Te as d,Fe as e,Be as f,Ee as g,ht as h,Yt as i,jt as j,Ce as k,Oe as l,we as m,Ae as n,Ie as o,De as p,Se as q,Re as r,Ne as s,xe as t,ke as u,be as v,Pe as w,Ot as x,$t as y,_e as z};
1
+ import{a as S}from"./CFtRXHDP.js";import{c as _,a as h,p as Q,b as D}from"./b0XUoOIH.js";import{a4 as y,g as s,s as P,e as R,p as C,a0 as m,b as O,ae as z,c as M,r as K,a3 as at}from"./DSh-OF2y.js";import{c as J}from"./DCVmM0L5.js";import{p as l,r as A,s as k}from"./D-yNNNdf.js";import{s as I,a as j}from"./CRnhIQbv.js";import{C as kt,s as q,L as nt,w as it,v as _t,E as Pt,A as mt,b,N as Rt,x as xt,B as Dt,n as G,c as X,m as x,H as Et,O as Ut,I as Bt,J as Ft,T as Tt,K as yt,p as zt}from"./DQYNi3YK.js";import{c as H,a as bt}from"./DQ5NTKSo.js";import{i as F,b as Ct}from"./DT3KtxWU.js";const Mt=Dt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),T=new kt("Dialog.Root | AlertDialog.Root");class lt{static create(t){const e=T.getOr(null);return T.set(new lt(t,e))}opts;#t=R(null);get triggerNode(){return s(this.#t)}set triggerNode(t){P(this.#t,t,!0)}#e=R(null);get contentNode(){return s(this.#e)}set contentNode(t){P(this.#e,t,!0)}#r=R(null);get overlayNode(){return s(this.#r)}set overlayNode(t){P(this.#r,t,!0)}#o=R(null);get descriptionNode(){return s(this.#o)}set descriptionNode(t){P(this.#o,t,!0)}#n=R(void 0);get contentId(){return s(this.#n)}set contentId(t){P(this.#n,t,!0)}#s=R(void 0);get titleId(){return s(this.#s)}set titleId(t){P(this.#s,t,!0)}#a=R(void 0);get triggerId(){return s(this.#a)}set triggerId(t){P(this.#a,t,!0)}#i=R(void 0);get descriptionId(){return s(this.#i)}set descriptionId(t){P(this.#i,t,!0)}#l=R(null);get cancelNode(){return s(this.#l)}set cancelNode(t){P(this.#l,t,!0)}#c=R(0);get nestedOpenCount(){return s(this.#c)}set nestedOpenCount(t){P(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new mt({ref:b(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new mt({ref:b(()=>this.overlayNode),open:this.opts.open,enabled:!0}),it(()=>this.opts.open.current,n=>{this.parent&&(n?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Rt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>Mt.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#d=y(()=>({"data-state":xt(this.opts.open.current)}));get sharedProps(){return s(this.#d)}set sharedProps(t){P(this.#d,t)}}class Ot{static create(t){return new Ot(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ct{static create(t){return new ct(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref)}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class dt{static create(t){return new dt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=q(this.opts.ref),it.pre(()=>this.opts.id.current,n=>{this.root.titleId=n})}#t=y(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ut{static create(t){return new ut(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=q(this.opts.ref,n=>{this.root.descriptionNode=n}),it.pre(()=>this.opts.id.current,n=>{this.root.descriptionId=n})}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}class ht{static create(t){return new ht(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>{this.root.contentNode=n,this.root.contentId=n?.id})}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class pt{static create(t){return new pt(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.overlayNode=n)}#t=y(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#t)}set snippetProps(t){P(this.#t,t)}#e=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":nt(this.root.nestedOpenCount>0),"data-nested":nt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return s(this.#e)}set props(t){P(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class ft{static create(t){return new ft(t,T.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=q(this.opts.ref,n=>this.root.cancelNode=n),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===_t||t.key===Pt)&&(t.preventDefault(),this.root.handleClose())}#t=y(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return s(this.#t)}set props(t){P(this.#t,t)}}function Kt(r,t){C(t,!0);let e=l(t,"open",15,!1),n=l(t,"onOpenChange",3,G),o=l(t,"onOpenChangeComplete",3,G);lt.create({variant:b(()=>"alert-dialog"),open:b(()=>e(),d=>{e(d),n()(d)}),onOpenChangeComplete:b(()=>o())});var c=_(),a=m(c);I(a,()=>t.children??z),h(r,c),O()}var Jt=D("<div><!></div>");function jt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"level",3,2),a=A(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const d=dt.create({id:b(()=>n()),level:b(()=>c()),ref:b(()=>o(),i=>o(i))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Jt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Ht=D("<button><!></button>");function Lt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","children","child","id","ref"]);const a=ct.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Ht();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}var Wt=D("<button><!></button>");function qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"disabled",3,!1),a=A(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const d=ft.create({id:b(()=>n()),ref:b(()=>o(),i=>o(i)),disabled:b(()=>!!c())}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=i=>{var f=_(),v=m(f);I(v,()=>t.child,()=>({props:s(p)})),h(i,f)},u=i=>{var f=Wt();j(f,()=>({...s(p)}));var v=M(f);I(v,()=>t.children??z),K(f),h(i,f)};F(N,i=>{t.child?i(w):i(u,!1)})}h(r,g),O()}var Vt=D("<!> <!>",1),Gt=D("<!> <div><!></div>",1);function Qt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=l(t,"forceMount",3,!1),a=l(t,"interactOutsideBehavior",3,"ignore"),d=l(t,"onCloseAutoFocus",3,G),p=l(t,"onEscapeKeydown",3,G),g=l(t,"onOpenAutoFocus",3,G),N=l(t,"onInteractOutside",3,G),w=l(t,"preventScroll",3,!0),u=l(t,"trapFocus",3,!0),i=l(t,"restoreScrollDelay",3,null),f=A(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const v=ht.create({id:b(()=>n()),ref:b(()=>o(),B=>o(B))}),L=y(()=>x(f,v.props));var E=_(),U=m(E);{var Y=B=>{Et(B,{get ref(){return v.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return v.root.opts.open.current},get onCloseAutoFocus(){return d()},onOpenAutoFocus:Z=>{g()(Z),!Z.defaultPrevented&&(Z.preventDefault(),Ut(0,()=>v.opts.ref.current?.focus()))},focusScope:(Z,At)=>{let gt=()=>At?.().props;Bt(Z,k(()=>s(L),{get enabled(){return v.root.opts.open.current},get ref(){return v.opts.ref},onEscapeKeydown:rt=>{p()(rt),!rt.defaultPrevented&&v.root.handleClose()},children:(rt,ae)=>{Ft(rt,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},get interactOutsideBehavior(){return a()},onInteractOutside:ot=>{N()(ot),!ot.defaultPrevented&&v.root.handleClose()},children:(ot,ie)=>{Tt(ot,k(()=>s(L),{get ref(){return v.opts.ref},get enabled(){return v.root.opts.open.current},children:(It,le)=>{var vt=_(),St=m(vt);{var wt=V=>{var $=Vt(),tt=m($);{var et=W=>{yt(W,{get preventScroll(){return w()},get restoreScrollDelay(){return i()}})};F(tt,W=>{v.root.opts.open.current&&W(et)})}var st=at(tt,2);{let W=y(()=>({props:x(s(L),gt()),...v.snippetProps}));I(st,()=>t.child,()=>s(W))}h(V,$)},Nt=V=>{var $=Gt(),tt=m($);yt(tt,{get preventScroll(){return w()}});var et=at(tt,2);j(et,W=>({...W}),[()=>x(s(L),gt())]);var st=M(et);I(st,()=>t.children??z),K(et),h(V,$)};F(St,V=>{t.child?V(wt):V(Nt,!1)})}h(It,vt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};F(U,B=>{(v.shouldRender||c())&&B(Y)})}h(r,E),O()}var Xt=D("<div><!></div>");function Yt(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"forceMount",3,!1),c=l(t,"ref",15,null),a=A(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const d=pt.create({id:b(()=>n()),ref:b(()=>c(),u=>c(u))}),p=y(()=>x(a,d.props));var g=_(),N=m(g);{var w=u=>{var i=_(),f=m(i);{var v=E=>{var U=_(),Y=m(U);{let B=y(()=>({props:x(s(p)),...d.snippetProps}));I(Y,()=>t.child,()=>s(B))}h(E,U)},L=E=>{var U=Xt();j(U,B=>({...B}),[()=>x(s(p))]);var Y=M(U);I(Y,()=>t.children??z,()=>d.snippetProps),K(U),h(E,U)};F(f,E=>{t.child?E(v):E(L,!1)})}h(u,i)};F(N,u=>{(d.shouldRender||o())&&u(w)})}h(r,g),O()}var Zt=D("<div><!></div>");function $t(r,t){const e=Q();C(t,!0);let n=l(t,"id",19,()=>X(e)),o=l(t,"ref",15,null),c=A(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=ut.create({id:b(()=>n()),ref:b(()=>o(),u=>o(u))}),d=y(()=>x(c,a.props));var p=_(),g=m(p);{var N=u=>{var i=_(),f=m(i);I(f,()=>t.child,()=>({props:s(d)})),h(u,i)},w=u=>{var i=Zt();j(i,()=>({...s(d)}));var f=M(i);I(f,()=>t.children??z),K(i),h(u,i)};F(g,u=>{t.child?u(N):u(w,!1)})}h(r,p),O()}function ye(r){return S(`/api/repos/${encodeURIComponent(r)}/sync`,{method:"POST"})}function _e(){return S("/api/sync",{method:"POST"})}function Pe(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh`,{method:"POST"})}function be(r,t,e){return S(`/api/repos/${encodeURIComponent(r)}/entities/${encodeURIComponent(t)}/${encodeURIComponent(e)}/refresh/apply`,{method:"POST"})}function Ce(){return S("/api/sources")}function Oe(){return S("/api/connectors")}function Ae(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`)}function Ie(r,t){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"POST",body:JSON.stringify({...t,name:r})})}function Se(r){return S(`/api/connectors/${encodeURIComponent(r)}/config`,{method:"DELETE"})}function we(r){return S(`/api/sources/${encodeURIComponent(r)}`)}function Ne(r,t){return S(`/api/sources/${encodeURIComponent(r)}`,{method:"POST",body:JSON.stringify(t)})}function ke(r,t){return S(`/api/repos/${encodeURIComponent(r)}`,{method:"PATCH",body:JSON.stringify({sync:t})})}function Re(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/authorize`,{method:"POST"})}function xe(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/status`)}function De(r){return S(`/api/connectors/${encodeURIComponent(r)}/oauth/disconnect`,{method:"POST"})}function Ee(r,t){C(t,!0);let e=l(t,"open",15,!1),n=A(t,["$$slots","$$events","$$legacy","open"]);var o=_(),c=m(o);J(c,()=>Kt,(a,d)=>{d(a,k(()=>n,{get open(){return e()},set open(p){e(p)}}))}),h(r,o),O()}function te(r,t){let e=A(t,["$$slots","$$events","$$legacy"]);var n=_(),o=m(n);J(o,()=>zt,(c,a)=>{a(c,k(()=>e))}),h(r,n)}function Ue(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-lg font-semibold",t.class));J(c,()=>jt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-title",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Be(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt()));J(c,()=>Lt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-action",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}function Fe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>t.class||H(bt({variant:"ghost"})));J(c,()=>qt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-cancel",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ee=D("<div><!></div>");function Te(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=ee();j(o,a=>({"data-slot":"alert-dialog-footer",class:a,...n}),[()=>H("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}var re=D("<div><!></div>");function ze(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","children"]);var o=re();j(o,a=>({"data-slot":"alert-dialog-header",class:a,...n}),[()=>H("flex flex-col gap-2 text-center sm:text-start",t.class)]);var c=M(o);I(c,()=>t.children??z),K(o),Ct(o,a=>e(a),()=>e()),h(r,o),O()}function oe(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));J(c,()=>Yt,(d,p)=>{p(d,k({"data-slot":"alert-dialog-overlay",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}var ne=D("<!> <!>",1);function Me(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class","portalProps"]);te(r,k(()=>t.portalProps,{children:(o,c)=>{var a=ne(),d=m(a);oe(d,{});var p=at(d,2);{let g=y(()=>H("bg-[var(--color-bg-elevated)] border-[var(--color-border)] text-[var(--color-text-primary)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));J(p,()=>Qt,(N,w)=>{w(N,k({"data-slot":"alert-dialog-content",get class(){return s(g)}},()=>n,{get ref(){return e()},set ref(u){e(u)}}))})}h(o,a)},$$slots:{default:!0}})),O()}function Ke(r,t){C(t,!0);let e=l(t,"ref",15,null),n=A(t,["$$slots","$$events","$$legacy","ref","class"]);var o=_(),c=m(o);{let a=y(()=>H("text-[var(--color-text-secondary)] text-sm",t.class));J(c,()=>$t,(d,p)=>{p(d,k({"data-slot":"alert-dialog-description",get class(){return s(a)}},()=>n,{get ref(){return e()},set ref(g){e(g)}}))})}h(r,o),O()}export{Me as A,ye as B,lt as D,ze as a,Ue as b,Ke as c,Te as d,Fe as e,Be as f,Ee as g,ht as h,Yt as i,jt as j,Ce as k,Oe as l,we as m,Ae as n,Ie as o,De as p,Se as q,Re as r,Ne as s,xe as t,ke as u,be as v,Pe as w,Ot as x,$t as y,_e as z};
@@ -1 +1 @@
1
- import{a as p,s as C,f as h}from"./CajNsaOw.js";import{i as M}from"./BLi1Oegj.js";import{p as k,l as c,s as m,d as f,g as i,a as A,c as _,n as B,r as u,b as N,m as v,t as P}from"./CfuRx7rA.js";import{i as R}from"./Cwkp_c4R.js";import{a as Y}from"./BA_Wro7X.js";import{l as g,p as b}from"./RGHlrGBn.js";var j=h("<title> </title>"),q=h('<svg><!><path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),n=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(f(e),f(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),f(e)),()=>{m(n,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(n),...w}));var y=_(r);{var z=o=>{var l=j(),$=_(l,!0);u(l),P(()=>C($,s())),p(o,l)};R(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),N()}export{J as C};
1
+ import{a as p,s as C,f as h}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,s as m,d as f,g as i,a as A,c as _,n as B,r as u,b as N,m as v,t as P}from"./DSh-OF2y.js";import{i as R}from"./DT3KtxWU.js";import{a as Y}from"./CRnhIQbv.js";import{l as g,p as b}from"./D-yNNNdf.js";var j=h("<title> </title>"),q=h('<svg><!><path d="M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),n=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(f(e),f(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),f(e)),()=>{m(n,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(n),...w}));var y=_(r);{var z=o=>{var l=j(),$=_(l,!0);u(l),P(()=>C($,s())),p(o,l)};R(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),N()}export{J as C};
@@ -0,0 +1,4 @@
1
+ import{e as h,f as U,s as a,g as t,aw as x}from"./DSh-OF2y.js";import{i as L,g as V}from"./BAAbylyg.js";import{n as y}from"./DC9z5DEo.js";import{w as W}from"./DSkxw4Ss.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
+ `);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
+
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"./CajNsaOw.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,aD as xe,a1 as Lt,ac as l,ae as lt,a0 as h}from"./CfuRx7rA.js";import{i as B,b as Ie}from"./Cwkp_c4R.js";import{e as ue}from"./CdvQjHNy.js";import{c as y,b as le,s as p,a as Pe,S as Ae}from"./BA_Wro7X.js";import{p as T,s as ce,r as Ce}from"./RGHlrGBn.js";import{a as O,c as it,s as Le,S as He}from"./D18-Aspv.js";import{c as Tt}from"./BtJ5VKKi.js";import{c as st,s as rt}from"./DEyrdHQB.js";import"./BLi1Oegj.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(D)==="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(D)==="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 Dt={...je};let V=A(!1),N=A(!1),St=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),D=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(D)==="loading"),j=l(()=>({...Dt,...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(D)==="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(St,!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(St,!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(St,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(D)==="success"?t.successIcon:e(D)==="error"?t.errorIcon:e(D)==="warning"?t.warningIcon:e(D)==="info"?t.infoIcon:e(D)==="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(D)!=="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(D)==="loading")&&d(I)})}var P=Lt(o,2);{var S=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(De,Se)=>{Se(De,{})}),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(D)==="success"?H(q,1):e(D)==="error"?H(_t,2):e(D)==="warning"?H(Kt,3):e(D)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(S)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(D)||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=S=>{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(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.title)),a(S,d)};B(o,S=>{typeof t.toast.title!="string"?S(I):S(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=S=>{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(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.description)),a(S,d)};B(o,S=>{typeof t.toast.description!="string"?S(I):S(P,!1)})}Y(m),K(S=>rt(m,1,S),[()=>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)},S=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(S)&&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)},S=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(S)&&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(St)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(D)),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(D)],t.toast?.classes?.[e(D)])),()=>!!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 Dt(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?Dt(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}):Dt(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),Dt=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),St=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 D=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(D),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(Dt(),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 St()},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,e as Ct,g as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./b0XUoOIH.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a2 as ht,s as r,g as e,a7 as Xt,aD as xe,a3 as Lt,a4 as l,ae as lt,a0 as h}from"./DSh-OF2y.js";import{i as B,b as Ie}from"./DT3KtxWU.js";import{e as ue}from"./DHtLlmE0.js";import{c as y,b as le,s as p,a as Pe,S as Ae}from"./CRnhIQbv.js";import{p as T,s as ce,r as Ce}from"./D-yNNNdf.js";import{a as O,c as it,s as Le,S as He}from"./Bs4ovbtO.js";import{c as Tt}from"./DCVmM0L5.js";import{c as st,s as rt}from"./CFtRXHDP.js";import"./vZ2iBqLE.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(D)==="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(D)==="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 Dt={...je};let V=A(!1),N=A(!1),St=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),D=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(D)==="loading"),j=l(()=>({...Dt,...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(D)==="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(St,!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(St,!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(St,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(D)==="success"?t.successIcon:e(D)==="error"?t.errorIcon:e(D)==="warning"?t.warningIcon:e(D)==="info"?t.infoIcon:e(D)==="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(D)!=="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(D)==="loading")&&d(I)})}var P=Lt(o,2);{var S=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(De,Se)=>{Se(De,{})}),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(D)==="success"?H(q,1):e(D)==="error"?H(_t,2):e(D)==="warning"?H(Kt,3):e(D)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(S)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(D)||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=S=>{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(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.title)),a(S,d)};B(o,S=>{typeof t.toast.title!="string"?S(I):S(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=S=>{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(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.description)),a(S,d)};B(o,S=>{typeof t.toast.description!="string"?S(I):S(P,!1)})}Y(m),K(S=>rt(m,1,S),[()=>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)},S=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(S)&&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)},S=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(S)&&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(St)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(D)),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(D)],t.toast?.classes?.[e(D)])),()=>!!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 Dt(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?Dt(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}):Dt(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),Dt=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),St=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 D=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(D),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(Dt(),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 St()},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{a as p,f as h,s as A}from"./CajNsaOw.js";import{i as M}from"./BLi1Oegj.js";import{p as k,l as c,a as B,b as C,s as m,d,g as i,c as _,n as L,r as u,m as g,t as N}from"./CfuRx7rA.js";import{i as P}from"./Cwkp_c4R.js";import{a as R}from"./BA_Wro7X.js";import{l as v,p as b}from"./RGHlrGBn.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M17 15 17 5 15 5 15 15 5 15 5 17 15 17 15 27 17 27 17 17 27 17 27 15 17 15z"></path></svg>');function I(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);k(t,!1);const a=g(),f=g();let n=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(d(e),d(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),d(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),B(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>A($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}L(),u(r),p(x,r),C()}export{I as A};
1
+ import{a as p,f as h,s as A}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,a as B,b as C,s as m,d,g as i,c as _,n as L,r as u,m as g,t as N}from"./DSh-OF2y.js";import{i as P}from"./DT3KtxWU.js";import{a as R}from"./CRnhIQbv.js";import{l as v,p as b}from"./D-yNNNdf.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M17 15 17 5 15 5 15 15 5 15 5 17 15 17 15 27 17 27 17 17 27 17 27 15 17 15z"></path></svg>');function I(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);k(t,!1);const a=g(),f=g();let n=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(d(e),d(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),d(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),B(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>A($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}L(),u(r),p(x,r),C()}export{I as A};
@@ -1 +1 @@
1
- import{a as p,s as C,f as h}from"./CajNsaOw.js";import{i as M}from"./BLi1Oegj.js";import{p as k,l as c,s as m,d as n,g as i,a as A,c as _,n as B,r as u,b as D,m as v,t as N}from"./CfuRx7rA.js";import{i as P}from"./Cwkp_c4R.js";import{a as R}from"./BA_Wro7X.js";import{l as g,p as b}from"./RGHlrGBn.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),f=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>C($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),D()}export{J as C};
1
+ import{a as p,s as C,f as h}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as k,l as c,s as m,d as n,g as i,a as A,c as _,n as B,r as u,b as D,m as v,t as N}from"./DSh-OF2y.js";import{i as P}from"./DT3KtxWU.js";import{a as R}from"./CRnhIQbv.js";import{l as g,p as b}from"./D-yNNNdf.js";var Y=h("<title> </title>"),j=h('<svg><!><path d="M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"></path></svg>');function J(x,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),w=g(e,["size","title"]);k(t,!1);const a=v(),f=v();let d=b(t,"size",8,16),s=b(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{m(f,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),A(),M();var r=j();R(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...i(f),...w}));var y=_(r);{var z=o=>{var l=Y(),$=_(l,!0);u(l),N(()=>C($,s())),p(o,l)};P(y,o=>{s()&&o(z)})}B(),u(r),p(x,r),D()}export{J as C};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DVx_0hnZ.js","./DSh-OF2y.js","./DSkxw4Ss.js","./CFtRXHDP.js"])))=>i.map(i=>d[i]);
2
+ import{_ as G}from"./PPVm8Dsz.js";import{aW as Y,a1 as C,aV as q,e as S,f as P,g,s as c,a7 as D,a4 as z}from"./DSh-OF2y.js";import{i as K}from"./BAAbylyg.js";import{i as H,w as h}from"./DSkxw4Ss.js";import{a as Q}from"./Sk0ODu4Y.js";import{n as $}from"./DC9z5DEo.js";import{l as X,o as N}from"./b0XUoOIH.js";function Ct(...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=X(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 Y(this.#t)}get(){const e=C(this.#t);if(e===void 0)throw new Error(`Context "${this.#e}" not found`);return e}getOr(e){const s=C(this.#t);return s===void 0?e:s}set(e){return q(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=z(()=>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(O=>O.name===p)?.entities.find(O=>O.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 V(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 L(){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:V,reset:L}}const lt=ut();let a=null,B=null,R=null,W=[],I=null,_=1e3,k=S(!1),F=S(null);const T=new Map,x={},A={};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=Q.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&&(A[t.repo]=`Syncing ${n[1].trim()}…`);const r=A[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`):K();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(F,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"){G(()=>import("./DVx_0hnZ.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 W)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 A[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){W.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(F)},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,Ct as c,lt as e,Ht as r,it as s,u as t,Dt as u};
@@ -1 +1 @@
1
- import{c as I,a as f,b as A,p as ct,o as Zt,s as ut,f as Mt}from"./CajNsaOw.js";import{L as $t,aL as te,bt as ee,ac as h,g as s,a5 as Ct,a6 as re,s as g,e as U,p as V,a0 as k,b as E,a1 as ot,c as F,ae as tt,r as L,a4 as se,t as dt,l as It,d as vt,a as ie,n as oe,m as Rt}from"./CfuRx7rA.js";import{a as W,s as B}from"./BA_Wro7X.js";import{i as M}from"./Cwkp_c4R.js";import{c as et}from"./BtJ5VKKi.js";import{p as l,r as G,s as X,l as Ot}from"./RGHlrGBn.js";import{b as ne,c as pt}from"./9QAsBMIK.js";import{C as ae}from"./P7PfXw_H.js";import{X as le,C as gt,s as nt,w as Y,E as bt,v as lt,L as it,y as yt,Y as he,i as ue,B as At,U as Ht,m as Z,c as ft,b,Z as de,_ as ce,t as _t,$ as pe,a0 as $,a1 as st,a2 as Tt,a3 as Vt,a4 as Et,a5 as Kt,a6 as qt,a7 as ge,a8 as fe,a9 as ve,aa as me,x as Ft,N as be,h as ye,ab as Ce,ac as Dt,Q as Lt,A as _e,n as J,P as ke,f as we,F as Ne,k as xe,p as Se,W as Bt}from"./CNVuHNwC.js";import{i as zt}from"./BLi1Oegj.js";import{e as Pe}from"./CdvQjHNy.js";const Ie=[];function Ut(i,t=!1,e=!1){return ht(i,new Map,"",Ie,null,e)}function ht(i,t,e,r,o=null,u=!1){if(typeof i=="object"&&i!==null){var n=t.get(i);if(n!==void 0)return n;if(i instanceof Map)return new Map(i);if(i instanceof Set)return new Set(i);if($t(i)){var a=Array(i.length);t.set(i,a),o!==null&&t.set(o,a);for(var d=0;d<i.length;d+=1){var m=i[d];d in i&&(a[d]=ht(m,t,e,r,null,u))}return a}if(te(i)===ee){a={},t.set(i,a),o!==null&&t.set(o,a);for(var c of Object.keys(i))a[c]=ht(i[c],t,e,r,null,u);return a}if(i instanceof Date)return structuredClone(i);if(typeof i.toJSON=="function"&&!u)return ht(i.toJSON(),t,e,r,i)}if(i instanceof EventTarget)return i;try{return structuredClone(i)}catch{return i}}const Re={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Oe=le(Re);class He{#t=()=>{};#e=h(()=>this.#t());constructor(t,e){let r;e!==void 0&&(r=e),this.#t=()=>{try{return r}finally{r=t()}}}get current(){return s(this.#e)}}function Te(i){Ct(()=>re(()=>i()))}const Wt=At({component:"checkbox",parts:["root","group","group-label","input"]}),Yt=new gt("Checkbox.Group");class Gt{static create(t){return Yt.set(new Gt(t))}opts;attachment;#t=U(void 0);get labelId(){return s(this.#t)}set labelId(t){g(this.#t,t,!0)}constructor(t){this.opts=t,this.attachment=nt(this.opts.ref)}addValue(t){if(t&&!this.opts.value.current.includes(t)){const e=[...Ut(this.opts.value.current),t];if(this.opts.value.current=e,Ht(this.opts.value.current,e))return;this.opts.onValueChange.current(e)}}removeValue(t){if(!t||this.opts.value.current.indexOf(t)===-1)return;const r=this.opts.value.current.filter(o=>o!==t);this.opts.value.current=r,!Ht(this.opts.value.current,r)&&this.opts.onValueChange.current(r)}#e=h(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.labelId,"data-disabled":it(this.opts.disabled.current),[Wt.group]:"",...this.attachment}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}const jt=new gt("Checkbox.Root");class kt{static create(t,e=null){return jt.set(new kt(t,e))}opts;group;#t=h(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return s(this.#t)}set trueName(t){g(this.#t,t)}#e=h(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return s(this.#e)}set trueRequired(t){g(this.#e,t)}#r=h(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return s(this.#r)}set trueDisabled(t){g(this.#r,t)}#s=h(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return s(this.#s)}set trueReadonly(t){g(this.#s,t)}attachment;constructor(t,e){this.opts=t,this.group=e,this.attachment=nt(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Y.pre([()=>Ut(this.group?.opts.value.current),()=>this.opts.value.current],([r,o])=>{!r||!o||(this.opts.checked.current=r.includes(o))}),Y.pre(()=>this.opts.checked.current,r=>{this.group&&(r?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===bt){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===lt&&(t.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}t.preventDefault(),this.#i()}}#o=h(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return s(this.#o)}set snippetProps(t){g(this.#o,t)}#n=h(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":he(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":yt(this.trueRequired),"aria-readonly":yt(this.trueReadonly),"data-disabled":it(this.trueDisabled),"data-readonly":it(this.trueReadonly),"data-state":De(this.opts.checked.current,this.opts.indeterminate.current),[Wt.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return s(this.#n)}set props(t){g(this.#n,t)}}class wt{static create(){return new wt(jt.get())}root;#t=h(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return s(this.#t)}set trueChecked(t){g(this.#t,t)}#e=h(()=>!!this.root.trueName);get shouldRender(){return s(this.#e)}set shouldRender(t){g(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){ue(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=h(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return s(this.#r)}set props(t){g(this.#r,t)}}function De(i,t){return t?"indeterminate":i?"checked":"unchecked"}var Me=A("<input/>"),Ae=A("<input/>");function Jt(i,t){V(t,!0);let e=l(t,"value",15),r=G(t,["$$slots","$$events","$$legacy","value"]);const o=h(()=>Z(r,{"aria-hidden":"true",tabindex:-1,style:Oe}));var u=I(),n=k(u);{var a=m=>{var c=Me();W(c,()=>({...s(o),value:e()}),void 0,void 0,void 0,void 0,!0),f(m,c)},d=m=>{var c=Ae();W(c,()=>({...s(o)}),void 0,void 0,void 0,void 0,!0),ne(c,e),f(m,c)};M(n,m=>{s(o).type==="checkbox"?m(a):m(d,!1)})}f(i,u),E()}function Ve(i,t){V(t,!1);const e=wt.create();zt();var r=I(),o=k(r);{var u=n=>{Jt(n,X(()=>e.props))};M(o,n=>{e.shouldRender&&n(u)})}f(i,r),E()}var Ee=A("<button><!></button>"),Ke=A("<!> <!>",1);function qe(i,t){const e=ct();V(t,!0);let r=l(t,"checked",15,!1),o=l(t,"ref",15,null),u=l(t,"disabled",3,!1),n=l(t,"required",3,!1),a=l(t,"name",3,void 0),d=l(t,"value",3,"on"),m=l(t,"id",19,()=>ft(e)),c=l(t,"indeterminate",15,!1),p=l(t,"type",3,"button"),y=G(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const w=Yt.getOr(null);w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1)),Y.pre(()=>d(),()=>{w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1))});const R=kt.create({checked:b(()=>r(),P=>{r(P),t.onCheckedChange?.(P)}),disabled:b(()=>u()??!1),required:b(()=>n()),name:b(()=>a()),value:b(()=>d()),id:b(()=>m()),ref:b(()=>o(),P=>o(P)),indeterminate:b(()=>c(),P=>{c(P),t.onIndeterminateChange?.(P)}),type:b(()=>p()),readonly:b(()=>!!t.readonly)},w),O=h(()=>Z({...y},R.props));var S=Ke(),C=k(S);{var v=P=>{var D=I(),N=k(D);{let K=h(()=>({props:s(O),...R.snippetProps}));B(N,()=>t.child,()=>s(K))}f(P,D)},_=P=>{var D=Ee();W(D,()=>({...s(O)}));var N=F(D);B(N,()=>t.children??tt,()=>R.snippetProps),L(D),f(P,D)};M(C,P=>{t.child?P(v):P(_,!1)})}var x=ot(C,2);Ve(x,{}),f(i,S),E()}class Fe{#t;#e=h(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=de("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!s(this.#e).length)return;this.#r.current=this.#r.current+t;const e=this.#t.getCurrentItem(),r=s(this.#e).find(a=>a===e)??"",o=s(this.#e).map(a=>a??""),u=ce(o,this.#r.current,r),n=s(this.#e).find(a=>a===u);return n&&this.#t.onMatch(n),n}resetTypeahead(){this.#r.current=""}}const Le=[st,Vt,Et],Be=[$,Kt,qt],ze=[...Le,...Be],Ue=At({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),at=new gt("Select.Root | Combobox.Root"),We=new gt("Select.Content | Combobox.Content");class Xt{opts;#t=U(!1);get touchedInput(){return s(this.#t)}set touchedInput(t){g(this.#t,t,!0)}#e=U(null);get inputNode(){return s(this.#e)}set inputNode(t){g(this.#e,t,!0)}#r=U(null);get contentNode(){return s(this.#r)}set contentNode(t){g(this.#r,t,!0)}contentPresence;#s=U(null);get viewportNode(){return s(this.#s)}set viewportNode(t){g(this.#s,t,!0)}#i=U(null);get triggerNode(){return s(this.#i)}set triggerNode(t){g(this.#i,t,!0)}#o=U("");get valueId(){return s(this.#o)}set valueId(t){g(this.#o,t,!0)}#n=U(null);get highlightedNode(){return s(this.#n)}set highlightedNode(t){g(this.#n,t,!0)}#a=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return s(this.#a)}set highlightedValue(t){g(this.#a,t)}#l=h(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return s(this.#l)}set highlightedId(t){g(this.#l,t)}#h=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return s(this.#h)}set highlightedLabel(t){g(this.#h,t)}isUsingKeyboard=!1;isCombobox=!1;domContext=new _t(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new _e({ref:b(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),se(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(o=>{if(!this.viewportNode)return!1;const u=o.getBoundingClientRect();return u.right<=r.right&&u.left>=r.left&&u.bottom<=r.bottom&&u.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>Ue.getAttr(t,this.isCombobox?"combobox":void 0)}class Ye extends Xt{opts;isMulti=!1;#t=h(()=>this.opts.value.current!=="");get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}#e=h(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return s(this.#e)}set currentLabel(t){g(this.#e,t)}#r=h(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return s(this.#r)}set candidateLabels(t){g(this.#r,t)}#s=h(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return s(this.#s)}set dataTypeaheadEnabled(t){g(this.#s,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,e=t){const r=this.includesItem(t)?"":t;this.opts.value.current=r,r!==""&&(this.opts.inputValue.current=e)}setInitialHighlightedNode(){Lt(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class Ge extends Xt{opts;isMulti=!0;#t=h(()=>this.opts.value.current.length>0);get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,e=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(r=>r!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=e}setInitialHighlightedNode(){Lt(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class je{static create(t){const{type:e,...r}=t,o=e==="single"?new Ye(r):new Ge(r);return at.set(o)}}class Nt{static create(t){return new Nt(t,at.get())}opts;root;attachment;#t;#e;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new _t(t.ref),this.#t=new pe({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new Fe({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const o=this.root.opts.items.current.find(u=>u.label===r);o&&(this.root.opts.value.current=o.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#s(t){this.#r()}#i(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===$||t.key===st)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===bt||t.key===lt||t.key===st||t.key===$)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const n=this.root.getCandidateNodes();if(!n.length)return;if(t.key===st){const a=n[0];this.root.setHighlightedNode(a)}else if(t.key===$){const a=n[n.length-1];this.root.setHighlightedNode(a)}return}if(t.key===Tt){this.root.handleClose();return}if((t.key===bt||t.key===lt&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#i()))return;if(t.key===$&&t.altKey&&this.root.handleClose(),ze.includes(t.key)){t.preventDefault();const n=this.root.getCandidateNodes(),a=this.root.highlightedNode,d=a?n.indexOf(a):-1,m=this.root.opts.loop.current;let c;if(t.key===st?c=ge(n,d,m):t.key===$?c=fe(n,d,m):t.key===Kt?c=ve(n,d,10,m):t.key===Vt?c=me(n,d,10,m):t.key===Et?c=n[0]:t.key===qt&&(c=n[n.length-1]),!c)return;this.root.setHighlightedNode(c);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,o=t.key===lt,u=this.root.getCandidateNodes();if(t.key!==Tt){if(!e&&(r||o)){!this.#t.handleTypeaheadSearch(t.key,u)&&o&&(t.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose()))}#o=h(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":yt(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ft(this.root.opts.open.current),"data-disabled":it(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#o)}set props(t){g(this.#o,t)}}class xt{static create(t){return We.set(new xt(t,at.get()))}opts;root;attachment;#t=U(!1);get isPositioned(){return s(this.#t)}set isPositioned(t){g(this.#t,t,!0)}domContext;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.contentNode=r),this.domContext=new _t(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),be(()=>{this.root.contentNode=null,this.isPositioned=!1}),Y(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=h(()=>ye(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#r)}set snippetProps(t){g(this.#r,t)}#s=h(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ft(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...s(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return s(this.#s)}set props(t){g(this.#s,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class St{static create(t){return new St(t,at.get())}opts;root;attachment;#t=h(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return s(this.#t)}set isSelected(t){g(this.#t,t)}#e=h(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return s(this.#e)}set isHighlighted(t){g(this.#e,t)}prevHighlighted=new He(()=>this.isHighlighted);#r=U(!1);get mounted(){return s(this.#r)}set mounted(t){g(this.#r,t,!0)}constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref),Y([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Y(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#s=h(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return s(this.#s)}set snippetProps(t){g(this.#s,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Ce){Zt(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=h(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":it(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#i)}set props(t){g(this.#i,t)}}class Pt{static create(t){return new Pt(t,at.get())}opts;root;#t=h(()=>this.root.opts.name.current!=="");get shouldRender(){return s(this.#t)}set shouldRender(t){g(this.#t,t)}constructor(t,e){this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=h(()=>({disabled:Dt(this.root.opts.disabled.current),required:Dt(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}function mt(i,t){V(t,!0);let e=l(t,"value",15);const r=Pt.create({value:b(()=>e())});var o=I(),u=k(o);{var n=a=>{Jt(a,X(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(d){e(d)}}))};M(u,a=>{r.shouldRender&&a(n)})}f(i,o),E()}var Je=A("<div><div><!></div></div>"),Xe=A("<div><div><!></div></div>");function Qe(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"forceMount",3,!1),n=l(t,"side",3,"bottom"),a=l(t,"onInteractOutside",3,J),d=l(t,"onEscapeKeydown",3,J),m=l(t,"preventScroll",3,!1),c=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const p=xt.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),onInteractOutside:b(()=>a()),onEscapeKeydown:b(()=>d())}),y=h(()=>Z(c,p.props));var w=I(),R=k(w);{var O=C=>{ke(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get enabled(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!0,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Je();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))},S=C=>{we(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get open(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!1,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Xe();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))};M(R,C=>{u()?C(O):u()||C(S,1)})}f(i,w),E()}function Ze(i,t){V(t,!0);let e=l(t,"mounted",15,!1),r=l(t,"onMountedChange",3,J);Te(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),E()}var $e=A("<div><!></div>"),tr=A("<!> <!>",1);function er(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"label",19,()=>t.value),n=l(t,"disabled",3,!1),a=l(t,"onHighlight",3,J),d=l(t,"onUnhighlight",3,J),m=G(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const c=St.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),value:b(()=>t.value),disabled:b(()=>n()),label:b(()=>u()),onHighlight:b(()=>a()),onUnhighlight:b(()=>d())}),p=h(()=>Z(m,c.props));var y=tr(),w=k(y);{var R=C=>{var v=I(),_=k(v);{let x=h(()=>({props:s(p),...c.snippetProps}));B(_,()=>t.child,()=>s(x))}f(C,v)},O=C=>{var v=$e();W(v,()=>({...s(p)}));var _=F(v);B(_,()=>t.children??tt,()=>c.snippetProps),L(v),f(C,v)};M(w,C=>{t.child?C(R):C(O,!1)})}var S=ot(w,2);Ze(S,{get mounted(){return c.mounted},set mounted(C){c.mounted=C}}),f(i,y),E()}var rr=A("<!> <!>",1);function sr(i,t){V(t,!0);let e=l(t,"value",15),r=l(t,"onValueChange",3,J),o=l(t,"name",3,""),u=l(t,"disabled",3,!1),n=l(t,"open",15,!1),a=l(t,"onOpenChange",3,J),d=l(t,"onOpenChangeComplete",3,J),m=l(t,"loop",3,!1),c=l(t,"scrollAlignment",3,"nearest"),p=l(t,"required",3,!1),y=l(t,"items",19,()=>[]),w=l(t,"allowDeselect",3,!1);function R(){e()===void 0&&e(t.type==="single"?"":[])}R(),Y.pre(()=>e(),()=>{R()});let O=U("");const S=je.create({type:t.type,value:b(()=>e(),N=>{e(N),r()(N)}),disabled:b(()=>u()),required:b(()=>p()),open:b(()=>n(),N=>{n(N),a()(N)}),loop:b(()=>m()),scrollAlignment:b(()=>c()),name:b(()=>o()),isCombobox:!1,items:b(()=>y()),allowDeselect:b(()=>w()),inputValue:b(()=>s(O),N=>g(O,N,!0)),onOpenChangeComplete:b(()=>d())});var C=rr(),v=k(C);Ne(v,{children:(N,K)=>{var j=I(),Q=k(j);B(Q,()=>t.children??tt),f(N,j)},$$slots:{default:!0}});var _=ot(v,2);{var x=N=>{var K=I(),j=k(K);{var Q=H=>{mt(H,{get autocomplete(){return t.autocomplete}})},rt=H=>{var T=I(),q=k(T);Pe(q,16,()=>S.opts.value.current,z=>z,(z,Qt)=>{mt(z,{get value(){return Qt},get autocomplete(){return t.autocomplete}})}),f(H,T)};M(j,H=>{S.opts.value.current.length===0?H(Q):H(rt,!1)})}f(N,K)},P=h(()=>Array.isArray(S.opts.value.current)),D=N=>{mt(N,{get autocomplete(){return t.autocomplete},get value(){return S.opts.value.current},set value(K){S.opts.value.current=K}})};M(_,N=>{s(P)?N(x):N(D,!1)})}f(i,C),E()}var ir=A("<button><!></button>");function or(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"type",3,"button"),n=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=Nt.create({id:b(()=>r()),ref:b(()=>o(),p=>o(p))}),d=h(()=>Z(n,a.props,{type:u()}));var m=I(),c=k(m);et(c,()=>xe,(p,y)=>{y(p,{get id(){return r()},get ref(){return a.opts.ref},children:(w,R)=>{var O=I(),S=k(O);{var C=_=>{var x=I(),P=k(x);B(P,()=>t.child,()=>({props:s(d)})),f(_,x)},v=_=>{var x=ir();W(x,()=>({...s(d)}));var P=F(x);B(P,()=>t.children??tt),L(x),f(_,x)};M(S,_=>{t.child?_(C):_(v,!1)})}f(w,O)},$$slots:{default:!0}})}),f(i,m),E()}var nr=A("<span> </span>"),ar=A('<span class="select-placeholder"> </span>'),lr=A("<!> <!>",1);function xr(i,t){V(t,!0);let e=l(t,"placeholder",3,"Select..."),r=l(t,"size",3,"default"),o=G(t,["$$slots","$$events","$$legacy","children","value","placeholder","class","size"]);var u=I(),n=k(u);{let a=h(()=>pt("select-trigger",r()==="sm"&&"select-trigger-sm",t.class));et(n,()=>or,(d,m)=>{m(d,X({get class(){return s(a)}},()=>o,{children:(c,p)=>{var y=lr(),w=k(y);{var R=v=>{var _=I(),x=k(_);B(x,()=>t.children),f(v,_)},O=v=>{var _=nr(),x=F(_,!0);L(_),dt(()=>ut(x,t.value)),f(v,_)},S=v=>{var _=ar(),x=F(_,!0);L(_),dt(()=>ut(x,e())),f(v,_)};M(w,v=>{t.children?v(R):t.value?v(O,1):v(S,!1)})}var C=ot(w,2);{let v=h(()=>r()==="sm"?12:14);ae(C,{get size(){return s(v)},class:"select-chevron"})}f(c,y)},$$slots:{default:!0}}))})}f(i,u),E()}function Sr(i,t){V(t,!0);let e=l(t,"side",3,"bottom"),r=l(t,"sideOffset",3,4),o=G(t,["$$slots","$$events","$$legacy","children","class","side","sideOffset"]);var u=I(),n=k(u);et(n,()=>Se,(a,d)=>{d(a,{children:(m,c)=>{var p=I(),y=k(p);{let w=h(()=>pt("select-content",t.class));et(y,()=>Qe,(R,O)=>{O(R,X({get class(){return s(w)},get side(){return e()},get sideOffset(){return r()}},()=>o,{children:(S,C)=>{var v=I(),_=k(v);B(_,()=>t.children),f(S,v)},$$slots:{default:!0}}))})}f(m,p)},$$slots:{default:!0}})}),f(i,u),E()}var hr=A('<span class="select-item-text"> </span> <!>',1);function Pr(i,t){V(t,!0);let e=l(t,"disabled",3,!1),r=G(t,["$$slots","$$events","$$legacy","value","label","disabled","class"]);var o=I(),u=k(o);{const n=(d,m)=>{let c=()=>m?.().selected;var p=hr(),y=k(p),w=F(y,!0);L(y);var R=ot(y,2);{var O=S=>{Bt(S,{size:12,class:"select-item-check"})};M(R,S=>{c()&&S(O)})}dt(()=>ut(w,t.label??t.value)),f(d,p)};let a=h(()=>pt("select-item",t.class));et(u,()=>er,(d,m)=>{m(d,X({get value(){return t.value},get label(){return t.label},get disabled(){return e()},get class(){return s(a)}},()=>r,{children:n,$$slots:{default:!0}}))})}f(i,o),E()}const Ir=sr;var ur=Mt("<title> </title>"),dr=Mt('<svg><!><path d="M8 15H24V17H8z"></path></svg>');function cr(i,t){const e=Ot(t,["children","$$slots","$$events","$$legacy"]),r=Ot(e,["size","title"]);V(t,!1);const o=Rt(),u=Rt();let n=l(t,"size",8,16),a=l(t,"title",8,void 0);It(()=>(vt(e),vt(a())),()=>{g(o,e["aria-label"]||e["aria-labelledby"]||a())}),It(()=>(s(o),vt(e)),()=>{g(u,{"aria-hidden":s(o)?void 0:!0,role:s(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),ie(),zt();var d=dr();W(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...s(u),...r}));var m=F(d);{var c=p=>{var y=ur(),w=F(y,!0);L(y),dt(()=>ut(w,a())),f(p,y)};M(m,p=>{a()&&p(c)})}oe(),L(d),f(i,d),E()}var pr=A('<span class="flex items-center justify-center text-current"><!></span>');function Rr(i,t){V(t,!0);let e=l(t,"checked",15,!1),r=l(t,"indeterminate",15,!1),o=l(t,"ref",15,null),u=G(t,["$$slots","$$events","$$legacy","class","checked","indeterminate","ref"]);var n=I(),a=k(n);{const d=(c,p)=>{let y=()=>p?.().checked,w=()=>p?.().indeterminate;var R=pr(),O=F(R);{var S=v=>{cr(v,{class:"size-3"})},C=v=>{Bt(v,{class:"size-3"})};M(O,v=>{w()?v(S):y()&&v(C,1)})}L(R),f(c,R)};let m=h(()=>pt("peer inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-[var(--color-border)] bg-transparent transition-colors","hover:border-[var(--color-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-primary)]","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-[var(--color-accent)] data-[state=checked]:bg-[var(--color-accent)] data-[state=checked]:text-white",t.class));et(a,()=>qe,(c,p)=>{p(c,X({get class(){return s(m)}},()=>u,{get checked(){return e()},set checked(y){e(y)},get indeterminate(){return r()},set indeterminate(y){r(y)},get ref(){return o()},set ref(y){o(y)},children:d,$$slots:{default:!0}}))})}f(i,n),E()}export{Rr as C,Ir as R,xr as S,Sr as a,Pr as b,Gt as c,Ut as s};
1
+ import{c as I,a as f,b as A,p as ct,o as Zt,s as ut,f as Mt}from"./b0XUoOIH.js";import{L as $t,aL as te,bs as ee,a4 as h,g as s,a2 as Ct,a7 as re,s as g,e as U,p as V,a0 as k,b as E,a3 as ot,c as F,ae as tt,r as L,a6 as se,t as dt,l as It,d as vt,a as ie,n as oe,m as Rt}from"./DSh-OF2y.js";import{a as W,s as B}from"./CRnhIQbv.js";import{i as M}from"./DT3KtxWU.js";import{c as et}from"./DCVmM0L5.js";import{p as l,r as G,s as X,l as Ot}from"./D-yNNNdf.js";import{b as ne,c as pt}from"./DQ5NTKSo.js";import{C as ae}from"./Bnl5ADsW.js";import{X as le,C as gt,s as nt,w as Y,E as bt,v as lt,L as it,y as yt,Y as he,i as ue,B as At,U as Ht,m as Z,c as ft,b,Z as de,_ as ce,t as _t,$ as pe,a0 as $,a1 as st,a2 as Tt,a3 as Vt,a4 as Et,a5 as Kt,a6 as qt,a7 as ge,a8 as fe,a9 as ve,aa as me,x as Ft,N as be,h as ye,ab as Ce,ac as Dt,Q as Lt,A as _e,n as J,P as ke,f as we,F as Ne,k as xe,p as Se,W as Bt}from"./DQYNi3YK.js";import{i as zt}from"./vZ2iBqLE.js";import{e as Pe}from"./DHtLlmE0.js";const Ie=[];function Ut(i,t=!1,e=!1){return ht(i,new Map,"",Ie,null,e)}function ht(i,t,e,r,o=null,u=!1){if(typeof i=="object"&&i!==null){var n=t.get(i);if(n!==void 0)return n;if(i instanceof Map)return new Map(i);if(i instanceof Set)return new Set(i);if($t(i)){var a=Array(i.length);t.set(i,a),o!==null&&t.set(o,a);for(var d=0;d<i.length;d+=1){var m=i[d];d in i&&(a[d]=ht(m,t,e,r,null,u))}return a}if(te(i)===ee){a={},t.set(i,a),o!==null&&t.set(o,a);for(var c of Object.keys(i))a[c]=ht(i[c],t,e,r,null,u);return a}if(i instanceof Date)return structuredClone(i);if(typeof i.toJSON=="function"&&!u)return ht(i.toJSON(),t,e,r,i)}if(i instanceof EventTarget)return i;try{return structuredClone(i)}catch{return i}}const Re={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},Oe=le(Re);class He{#t=()=>{};#e=h(()=>this.#t());constructor(t,e){let r;e!==void 0&&(r=e),this.#t=()=>{try{return r}finally{r=t()}}}get current(){return s(this.#e)}}function Te(i){Ct(()=>re(()=>i()))}const Wt=At({component:"checkbox",parts:["root","group","group-label","input"]}),Yt=new gt("Checkbox.Group");class Gt{static create(t){return Yt.set(new Gt(t))}opts;attachment;#t=U(void 0);get labelId(){return s(this.#t)}set labelId(t){g(this.#t,t,!0)}constructor(t){this.opts=t,this.attachment=nt(this.opts.ref)}addValue(t){if(t&&!this.opts.value.current.includes(t)){const e=[...Ut(this.opts.value.current),t];if(this.opts.value.current=e,Ht(this.opts.value.current,e))return;this.opts.onValueChange.current(e)}}removeValue(t){if(!t||this.opts.value.current.indexOf(t)===-1)return;const r=this.opts.value.current.filter(o=>o!==t);this.opts.value.current=r,!Ht(this.opts.value.current,r)&&this.opts.onValueChange.current(r)}#e=h(()=>({id:this.opts.id.current,role:"group","aria-labelledby":this.labelId,"data-disabled":it(this.opts.disabled.current),[Wt.group]:"",...this.attachment}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}const jt=new gt("Checkbox.Root");class kt{static create(t,e=null){return jt.set(new kt(t,e))}opts;group;#t=h(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current);get trueName(){return s(this.#t)}set trueName(t){g(this.#t,t)}#e=h(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return s(this.#e)}set trueRequired(t){g(this.#e,t)}#r=h(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return s(this.#r)}set trueDisabled(t){g(this.#r,t)}#s=h(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return s(this.#s)}set trueReadonly(t){g(this.#s,t)}attachment;constructor(t,e){this.opts=t,this.group=e,this.attachment=nt(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Y.pre([()=>Ut(this.group?.opts.value.current),()=>this.opts.value.current],([r,o])=>{!r||!o||(this.opts.checked.current=r.includes(o))}),Y.pre(()=>this.opts.checked.current,r=>{this.group&&(r?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(t){if(!(this.trueDisabled||this.trueReadonly)){if(t.key===bt){t.preventDefault(),this.opts.type.current==="submit"&&t.currentTarget.closest("form")?.requestSubmit();return}t.key===lt&&(t.preventDefault(),this.#i())}}#i(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(t){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#i();return}t.preventDefault(),this.#i()}}#o=h(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return s(this.#o)}set snippetProps(t){g(this.#o,t)}#n=h(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":he(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":yt(this.trueRequired),"aria-readonly":yt(this.trueReadonly),"data-disabled":it(this.trueDisabled),"data-readonly":it(this.trueReadonly),"data-state":De(this.opts.checked.current,this.opts.indeterminate.current),[Wt.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return s(this.#n)}set props(t){g(this.#n,t)}}class wt{static create(){return new wt(jt.get())}root;#t=h(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){return s(this.#t)}set trueChecked(t){g(this.#t,t)}#e=h(()=>!!this.root.trueName);get shouldRender(){return s(this.#e)}set shouldRender(t){g(this.#e,t)}constructor(t){this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(t){ue(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#r=h(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return s(this.#r)}set props(t){g(this.#r,t)}}function De(i,t){return t?"indeterminate":i?"checked":"unchecked"}var Me=A("<input/>"),Ae=A("<input/>");function Jt(i,t){V(t,!0);let e=l(t,"value",15),r=G(t,["$$slots","$$events","$$legacy","value"]);const o=h(()=>Z(r,{"aria-hidden":"true",tabindex:-1,style:Oe}));var u=I(),n=k(u);{var a=m=>{var c=Me();W(c,()=>({...s(o),value:e()}),void 0,void 0,void 0,void 0,!0),f(m,c)},d=m=>{var c=Ae();W(c,()=>({...s(o)}),void 0,void 0,void 0,void 0,!0),ne(c,e),f(m,c)};M(n,m=>{s(o).type==="checkbox"?m(a):m(d,!1)})}f(i,u),E()}function Ve(i,t){V(t,!1);const e=wt.create();zt();var r=I(),o=k(r);{var u=n=>{Jt(n,X(()=>e.props))};M(o,n=>{e.shouldRender&&n(u)})}f(i,r),E()}var Ee=A("<button><!></button>"),Ke=A("<!> <!>",1);function qe(i,t){const e=ct();V(t,!0);let r=l(t,"checked",15,!1),o=l(t,"ref",15,null),u=l(t,"disabled",3,!1),n=l(t,"required",3,!1),a=l(t,"name",3,void 0),d=l(t,"value",3,"on"),m=l(t,"id",19,()=>ft(e)),c=l(t,"indeterminate",15,!1),p=l(t,"type",3,"button"),y=G(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const w=Yt.getOr(null);w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1)),Y.pre(()=>d(),()=>{w&&d()&&(w.opts.value.current.includes(d())?r(!0):r(!1))});const R=kt.create({checked:b(()=>r(),P=>{r(P),t.onCheckedChange?.(P)}),disabled:b(()=>u()??!1),required:b(()=>n()),name:b(()=>a()),value:b(()=>d()),id:b(()=>m()),ref:b(()=>o(),P=>o(P)),indeterminate:b(()=>c(),P=>{c(P),t.onIndeterminateChange?.(P)}),type:b(()=>p()),readonly:b(()=>!!t.readonly)},w),O=h(()=>Z({...y},R.props));var S=Ke(),C=k(S);{var v=P=>{var D=I(),N=k(D);{let K=h(()=>({props:s(O),...R.snippetProps}));B(N,()=>t.child,()=>s(K))}f(P,D)},_=P=>{var D=Ee();W(D,()=>({...s(O)}));var N=F(D);B(N,()=>t.children??tt,()=>R.snippetProps),L(D),f(P,D)};M(C,P=>{t.child?P(v):P(_,!1)})}var x=ot(C,2);Ve(x,{}),f(i,S),E()}class Fe{#t;#e=h(()=>this.#t.candidateValues());#r;constructor(t){this.#t=t,this.#r=de("",{afterMs:1e3,getWindow:this.#t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!this.#t.enabled()||!s(this.#e).length)return;this.#r.current=this.#r.current+t;const e=this.#t.getCurrentItem(),r=s(this.#e).find(a=>a===e)??"",o=s(this.#e).map(a=>a??""),u=ce(o,this.#r.current,r),n=s(this.#e).find(a=>a===u);return n&&this.#t.onMatch(n),n}resetTypeahead(){this.#r.current=""}}const Le=[st,Vt,Et],Be=[$,Kt,qt],ze=[...Le,...Be],Ue=At({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),at=new gt("Select.Root | Combobox.Root"),We=new gt("Select.Content | Combobox.Content");class Xt{opts;#t=U(!1);get touchedInput(){return s(this.#t)}set touchedInput(t){g(this.#t,t,!0)}#e=U(null);get inputNode(){return s(this.#e)}set inputNode(t){g(this.#e,t,!0)}#r=U(null);get contentNode(){return s(this.#r)}set contentNode(t){g(this.#r,t,!0)}contentPresence;#s=U(null);get viewportNode(){return s(this.#s)}set viewportNode(t){g(this.#s,t,!0)}#i=U(null);get triggerNode(){return s(this.#i)}set triggerNode(t){g(this.#i,t,!0)}#o=U("");get valueId(){return s(this.#o)}set valueId(t){g(this.#o,t,!0)}#n=U(null);get highlightedNode(){return s(this.#n)}set highlightedNode(t){g(this.#n,t,!0)}#a=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return s(this.#a)}set highlightedValue(t){g(this.#a,t)}#l=h(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return s(this.#l)}set highlightedId(t){g(this.#l,t)}#h=h(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return s(this.#h)}set highlightedLabel(t){g(this.#h,t)}isUsingKeyboard=!1;isCombobox=!1;domContext=new _t(()=>null);constructor(t){this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new _e({ref:b(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),se(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(o=>{if(!this.viewportNode)return!1;const u=o.getBoundingClientRect();return u.right<=r.right&&u.left>=r.left&&u.bottom<=r.bottom&&u.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=t=>Ue.getAttr(t,this.isCombobox?"combobox":void 0)}class Ye extends Xt{opts;isMulti=!1;#t=h(()=>this.opts.value.current!=="");get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}#e=h(()=>this.opts.items.current.length?this.opts.items.current.find(t=>t.value===this.opts.value.current)?.label??"":"");get currentLabel(){return s(this.#e)}set currentLabel(t){g(this.#e,t)}#r=h(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return s(this.#r)}set candidateLabels(t){g(this.#r,t)}#s=h(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return s(this.#s)}set dataTypeaheadEnabled(t){g(this.#s,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current===t}toggleItem(t,e=t){const r=this.includesItem(t)?"":t;this.opts.value.current=r,r!==""&&(this.opts.inputValue.current=e)}setInitialHighlightedNode(){Lt(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const t=this.getNodeByValue(this.opts.value.current);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class Ge extends Xt{opts;isMulti=!0;#t=h(()=>this.opts.value.current.length>0);get hasValue(){return s(this.#t)}set hasValue(t){g(this.#t,t)}constructor(t){super(t),this.opts=t,Ct(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Y(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(t){return this.opts.value.current.includes(t)}toggleItem(t,e=t){this.includesItem(t)?this.opts.value.current=this.opts.value.current.filter(r=>r!==t):this.opts.value.current=[...this.opts.value.current,t],this.opts.inputValue.current=e}setInitialHighlightedNode(){Lt(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const t=this.getNodeByValue(this.opts.value.current[0]);if(t){this.setHighlightedNode(t,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class je{static create(t){const{type:e,...r}=t,o=e==="single"?new Ye(r):new Ge(r);return at.set(o)}}class Nt{static create(t){return new Nt(t,at.get())}opts;root;attachment;#t;#e;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new _t(t.ref),this.#t=new pe({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#e=new Fe({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const o=this.root.opts.items.current.find(u=>u.label===r);o&&(this.root.opts.value.current=o.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#r(){this.root.opts.open.current=!0,this.#e.resetTypeahead(),this.#t.resetTypeahead()}#s(t){this.#r()}#i(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===$||t.key===st)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===bt||t.key===lt||t.key===st||t.key===$)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#e.handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const n=this.root.getCandidateNodes();if(!n.length)return;if(t.key===st){const a=n[0];this.root.setHighlightedNode(a)}else if(t.key===$){const a=n[n.length-1];this.root.setHighlightedNode(a)}return}if(t.key===Tt){this.root.handleClose();return}if((t.key===bt||t.key===lt&&this.#t.search==="")&&!t.isComposing&&(t.preventDefault(),this.#i()))return;if(t.key===$&&t.altKey&&this.root.handleClose(),ze.includes(t.key)){t.preventDefault();const n=this.root.getCandidateNodes(),a=this.root.highlightedNode,d=a?n.indexOf(a):-1,m=this.root.opts.loop.current;let c;if(t.key===st?c=ge(n,d,m):t.key===$?c=fe(n,d,m):t.key===Kt?c=ve(n,d,10,m):t.key===Vt?c=me(n,d,10,m):t.key===Et?c=n[0]:t.key===qt&&(c=n[n.length-1]),!c)return;this.root.setHighlightedNode(c);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,o=t.key===lt,u=this.root.getCandidateNodes();if(t.key!==Tt){if(!e&&(r||o)){!this.#t.handleTypeaheadSearch(t.key,u)&&o&&(t.preventDefault(),this.#i());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#s(t):this.root.handleClose()))}#o=h(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":yt(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ft(this.root.opts.open.current),"data-disabled":it(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#o)}set props(t){g(this.#o,t)}}class xt{static create(t){return We.set(new xt(t,at.get()))}opts;root;attachment;#t=U(!1);get isPositioned(){return s(this.#t)}set isPositioned(t){g(this.#t,t,!0)}domContext;constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref,r=>this.root.contentNode=r),this.domContext=new _t(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),be(()=>{this.root.contentNode=null,this.isPositioned=!1}),Y(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(t){this.root.isUsingKeyboard=!1}#e=h(()=>ye(this.root.isCombobox?"combobox":"select"));onInteractOutside=t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=t=>{t.preventDefault()};onCloseAutoFocus=t=>{t.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#r=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return s(this.#r)}set snippetProps(t){g(this.#r,t)}#s=h(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ft(this.root.opts.open.current),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...s(this.#e)},onpointermove:this.onpointermove,...this.attachment}));get props(){return s(this.#s)}set props(t){g(this.#s,t)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}}}class St{static create(t){return new St(t,at.get())}opts;root;attachment;#t=h(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return s(this.#t)}set isSelected(t){g(this.#t,t)}#e=h(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return s(this.#e)}set isHighlighted(t){g(this.#e,t)}prevHighlighted=new He(()=>this.isHighlighted);#r=U(!1);get mounted(){return s(this.#r)}set mounted(t){g(this.#r,t,!0)}constructor(t,e){this.opts=t,this.root=e,this.attachment=nt(t.ref),Y([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Y(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}#s=h(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return s(this.#s)}set snippetProps(t){g(this.#s,t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Ce){Zt(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#i=h(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":it(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return s(this.#i)}set props(t){g(this.#i,t)}}class Pt{static create(t){return new Pt(t,at.get())}opts;root;#t=h(()=>this.root.opts.name.current!=="");get shouldRender(){return s(this.#t)}set shouldRender(t){g(this.#t,t)}constructor(t,e){this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#e=h(()=>({disabled:Dt(this.root.opts.disabled.current),required:Dt(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return s(this.#e)}set props(t){g(this.#e,t)}}function mt(i,t){V(t,!0);let e=l(t,"value",15);const r=Pt.create({value:b(()=>e())});var o=I(),u=k(o);{var n=a=>{Jt(a,X(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(d){e(d)}}))};M(u,a=>{r.shouldRender&&a(n)})}f(i,o),E()}var Je=A("<div><div><!></div></div>"),Xe=A("<div><div><!></div></div>");function Qe(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"forceMount",3,!1),n=l(t,"side",3,"bottom"),a=l(t,"onInteractOutside",3,J),d=l(t,"onEscapeKeydown",3,J),m=l(t,"preventScroll",3,!1),c=G(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const p=xt.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),onInteractOutside:b(()=>a()),onEscapeKeydown:b(()=>d())}),y=h(()=>Z(c,p.props));var w=I(),R=k(w);{var O=C=>{ke(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get enabled(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!0,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Je();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))},S=C=>{we(C,X(()=>s(y),()=>p.popperProps,{get ref(){return p.opts.ref},get side(){return n()},get open(){return p.root.opts.open.current},get id(){return r()},get preventScroll(){return m()},forceMount:!1,get shouldRender(){return p.shouldRender},popper:(_,x)=>{let P=()=>x?.().props,D=()=>x?.().wrapperProps;const N=h(()=>Z(P(),{style:p.props.style},{style:t.style}));var K=I(),j=k(K);{var Q=H=>{var T=I(),q=k(T);{let z=h(()=>({props:s(N),wrapperProps:D(),...p.snippetProps}));B(q,()=>t.child,()=>s(z))}f(H,T)},rt=H=>{var T=Xe();W(T,()=>({...D()}));var q=F(T);W(q,()=>({...s(N)}));var z=F(q);B(z,()=>t.children??tt),L(q),L(T),f(H,T)};M(j,H=>{t.child?H(Q):H(rt,!1)})}f(_,K)},$$slots:{popper:!0}}))};M(R,C=>{u()?C(O):u()||C(S,1)})}f(i,w),E()}function Ze(i,t){V(t,!0);let e=l(t,"mounted",15,!1),r=l(t,"onMountedChange",3,J);Te(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),E()}var $e=A("<div><!></div>"),tr=A("<!> <!>",1);function er(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"label",19,()=>t.value),n=l(t,"disabled",3,!1),a=l(t,"onHighlight",3,J),d=l(t,"onUnhighlight",3,J),m=G(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const c=St.create({id:b(()=>r()),ref:b(()=>o(),C=>o(C)),value:b(()=>t.value),disabled:b(()=>n()),label:b(()=>u()),onHighlight:b(()=>a()),onUnhighlight:b(()=>d())}),p=h(()=>Z(m,c.props));var y=tr(),w=k(y);{var R=C=>{var v=I(),_=k(v);{let x=h(()=>({props:s(p),...c.snippetProps}));B(_,()=>t.child,()=>s(x))}f(C,v)},O=C=>{var v=$e();W(v,()=>({...s(p)}));var _=F(v);B(_,()=>t.children??tt,()=>c.snippetProps),L(v),f(C,v)};M(w,C=>{t.child?C(R):C(O,!1)})}var S=ot(w,2);Ze(S,{get mounted(){return c.mounted},set mounted(C){c.mounted=C}}),f(i,y),E()}var rr=A("<!> <!>",1);function sr(i,t){V(t,!0);let e=l(t,"value",15),r=l(t,"onValueChange",3,J),o=l(t,"name",3,""),u=l(t,"disabled",3,!1),n=l(t,"open",15,!1),a=l(t,"onOpenChange",3,J),d=l(t,"onOpenChangeComplete",3,J),m=l(t,"loop",3,!1),c=l(t,"scrollAlignment",3,"nearest"),p=l(t,"required",3,!1),y=l(t,"items",19,()=>[]),w=l(t,"allowDeselect",3,!1);function R(){e()===void 0&&e(t.type==="single"?"":[])}R(),Y.pre(()=>e(),()=>{R()});let O=U("");const S=je.create({type:t.type,value:b(()=>e(),N=>{e(N),r()(N)}),disabled:b(()=>u()),required:b(()=>p()),open:b(()=>n(),N=>{n(N),a()(N)}),loop:b(()=>m()),scrollAlignment:b(()=>c()),name:b(()=>o()),isCombobox:!1,items:b(()=>y()),allowDeselect:b(()=>w()),inputValue:b(()=>s(O),N=>g(O,N,!0)),onOpenChangeComplete:b(()=>d())});var C=rr(),v=k(C);Ne(v,{children:(N,K)=>{var j=I(),Q=k(j);B(Q,()=>t.children??tt),f(N,j)},$$slots:{default:!0}});var _=ot(v,2);{var x=N=>{var K=I(),j=k(K);{var Q=H=>{mt(H,{get autocomplete(){return t.autocomplete}})},rt=H=>{var T=I(),q=k(T);Pe(q,16,()=>S.opts.value.current,z=>z,(z,Qt)=>{mt(z,{get value(){return Qt},get autocomplete(){return t.autocomplete}})}),f(H,T)};M(j,H=>{S.opts.value.current.length===0?H(Q):H(rt,!1)})}f(N,K)},P=h(()=>Array.isArray(S.opts.value.current)),D=N=>{mt(N,{get autocomplete(){return t.autocomplete},get value(){return S.opts.value.current},set value(K){S.opts.value.current=K}})};M(_,N=>{s(P)?N(x):N(D,!1)})}f(i,C),E()}var ir=A("<button><!></button>");function or(i,t){const e=ct();V(t,!0);let r=l(t,"id",19,()=>ft(e)),o=l(t,"ref",15,null),u=l(t,"type",3,"button"),n=G(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=Nt.create({id:b(()=>r()),ref:b(()=>o(),p=>o(p))}),d=h(()=>Z(n,a.props,{type:u()}));var m=I(),c=k(m);et(c,()=>xe,(p,y)=>{y(p,{get id(){return r()},get ref(){return a.opts.ref},children:(w,R)=>{var O=I(),S=k(O);{var C=_=>{var x=I(),P=k(x);B(P,()=>t.child,()=>({props:s(d)})),f(_,x)},v=_=>{var x=ir();W(x,()=>({...s(d)}));var P=F(x);B(P,()=>t.children??tt),L(x),f(_,x)};M(S,_=>{t.child?_(C):_(v,!1)})}f(w,O)},$$slots:{default:!0}})}),f(i,m),E()}var nr=A("<span> </span>"),ar=A('<span class="select-placeholder"> </span>'),lr=A("<!> <!>",1);function xr(i,t){V(t,!0);let e=l(t,"placeholder",3,"Select..."),r=l(t,"size",3,"default"),o=G(t,["$$slots","$$events","$$legacy","children","value","placeholder","class","size"]);var u=I(),n=k(u);{let a=h(()=>pt("select-trigger",r()==="sm"&&"select-trigger-sm",t.class));et(n,()=>or,(d,m)=>{m(d,X({get class(){return s(a)}},()=>o,{children:(c,p)=>{var y=lr(),w=k(y);{var R=v=>{var _=I(),x=k(_);B(x,()=>t.children),f(v,_)},O=v=>{var _=nr(),x=F(_,!0);L(_),dt(()=>ut(x,t.value)),f(v,_)},S=v=>{var _=ar(),x=F(_,!0);L(_),dt(()=>ut(x,e())),f(v,_)};M(w,v=>{t.children?v(R):t.value?v(O,1):v(S,!1)})}var C=ot(w,2);{let v=h(()=>r()==="sm"?12:14);ae(C,{get size(){return s(v)},class:"select-chevron"})}f(c,y)},$$slots:{default:!0}}))})}f(i,u),E()}function Sr(i,t){V(t,!0);let e=l(t,"side",3,"bottom"),r=l(t,"sideOffset",3,4),o=G(t,["$$slots","$$events","$$legacy","children","class","side","sideOffset"]);var u=I(),n=k(u);et(n,()=>Se,(a,d)=>{d(a,{children:(m,c)=>{var p=I(),y=k(p);{let w=h(()=>pt("select-content",t.class));et(y,()=>Qe,(R,O)=>{O(R,X({get class(){return s(w)},get side(){return e()},get sideOffset(){return r()}},()=>o,{children:(S,C)=>{var v=I(),_=k(v);B(_,()=>t.children),f(S,v)},$$slots:{default:!0}}))})}f(m,p)},$$slots:{default:!0}})}),f(i,u),E()}var hr=A('<span class="select-item-text"> </span> <!>',1);function Pr(i,t){V(t,!0);let e=l(t,"disabled",3,!1),r=G(t,["$$slots","$$events","$$legacy","value","label","disabled","class"]);var o=I(),u=k(o);{const n=(d,m)=>{let c=()=>m?.().selected;var p=hr(),y=k(p),w=F(y,!0);L(y);var R=ot(y,2);{var O=S=>{Bt(S,{size:12,class:"select-item-check"})};M(R,S=>{c()&&S(O)})}dt(()=>ut(w,t.label??t.value)),f(d,p)};let a=h(()=>pt("select-item",t.class));et(u,()=>er,(d,m)=>{m(d,X({get value(){return t.value},get label(){return t.label},get disabled(){return e()},get class(){return s(a)}},()=>r,{children:n,$$slots:{default:!0}}))})}f(i,o),E()}const Ir=sr;var ur=Mt("<title> </title>"),dr=Mt('<svg><!><path d="M8 15H24V17H8z"></path></svg>');function cr(i,t){const e=Ot(t,["children","$$slots","$$events","$$legacy"]),r=Ot(e,["size","title"]);V(t,!1);const o=Rt(),u=Rt();let n=l(t,"size",8,16),a=l(t,"title",8,void 0);It(()=>(vt(e),vt(a())),()=>{g(o,e["aria-label"]||e["aria-labelledby"]||a())}),It(()=>(s(o),vt(e)),()=>{g(u,{"aria-hidden":s(o)?void 0:!0,role:s(o)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),ie(),zt();var d=dr();W(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:n(),height:n(),...s(u),...r}));var m=F(d);{var c=p=>{var y=ur(),w=F(y,!0);L(y),dt(()=>ut(w,a())),f(p,y)};M(m,p=>{a()&&p(c)})}oe(),L(d),f(i,d),E()}var pr=A('<span class="flex items-center justify-center text-current"><!></span>');function Rr(i,t){V(t,!0);let e=l(t,"checked",15,!1),r=l(t,"indeterminate",15,!1),o=l(t,"ref",15,null),u=G(t,["$$slots","$$events","$$legacy","class","checked","indeterminate","ref"]);var n=I(),a=k(n);{const d=(c,p)=>{let y=()=>p?.().checked,w=()=>p?.().indeterminate;var R=pr(),O=F(R);{var S=v=>{cr(v,{class:"size-3"})},C=v=>{Bt(v,{class:"size-3"})};M(O,v=>{w()?v(S):y()&&v(C,1)})}L(R),f(c,R)};let m=h(()=>pt("peer inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-[var(--color-border)] bg-transparent transition-colors","hover:border-[var(--color-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-primary)]","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:border-[var(--color-accent)] data-[state=checked]:bg-[var(--color-accent)] data-[state=checked]:text-white",t.class));et(a,()=>qe,(c,p)=>{p(c,X({get class(){return s(m)}},()=>u,{get checked(){return e()},set checked(y){e(y)},get indeterminate(){return r()},set indeterminate(y){r(y)},get ref(){return o()},set ref(y){o(y)},children:d,$$slots:{default:!0}}))})}f(i,n),E()}export{Rr as C,Ir as R,xr as S,Sr as a,Pr as b,Gt as c,Ut as s};
@@ -1 +1 @@
1
- import{a as g,s as de,f as fe,d as ke,g as f,b as P,c as F,e as ze}from"./CajNsaOw.js";import{p as ue,l as le,s,d as J,g as t,a as Me,c as l,n as W,r as o,b as me,m as oe,t as I,ay as Ce,a5 as He,e as V,f as De,a0 as H,a1 as p,ac as Re}from"./CfuRx7rA.js";import{a as Ae,r as $e,s as Ie,b as Pe}from"./BA_Wro7X.js";import{i as k,b as Ee}from"./Cwkp_c4R.js";import{e as Te}from"./CdvQjHNy.js";import{s as Q}from"./DEyrdHQB.js";import{b as Be,B as Ne}from"./9QAsBMIK.js";import{l as ve,p as ee}from"./RGHlrGBn.js";import{g as ce}from"./DUsnWwWN.js";import{i as Se}from"./BLi1Oegj.js";import{A as Ye}from"./BJimep0Q.js";import{E as Ge,T as Ke}from"./Bypyvp-Q.js";import{n as U}from"./BZd_7gpI.js";import{v as D}from"./DTDfEpZd.js";var Le=fe("<title> </title>"),Oe=fe('<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 Xe(E,u){const n=ve(u,["children","$$slots","$$events","$$legacy"]),R=ve(n,["size","title"]);ue(u,!1);const _=oe(),A=oe();let v=ee(u,"size",8,16),c=ee(u,"title",8,void 0);le(()=>(J(n),J(c())),()=>{s(_,n["aria-label"]||n["aria-labelledby"]||c())}),le(()=>(t(_),J(n)),()=>{s(A,{"aria-hidden":t(_)?void 0:!0,role:t(_)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Me(),Se();var d=Oe();Ae(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:v(),height:v(),...t(A),...R}));var b=l(d);{var T=w=>{var z=Le(),B=l(z,!0);o(z),I(()=>de(B,c())),g(w,z)};k(b,w=>{c()&&w(T)})}W(3),o(d),g(E,d),me()}var Ze=P('<input class="view-rename-input svelte-r6dy5f"/>'),je=P('<button><span class="toggle-label"> </span></button>'),qe=P('<div class="context-backdrop svelte-r6dy5f"></div> <div class="view-context-menu svelte-r6dy5f"><div class="view-menu-item svelte-r6dy5f"><!> Rename</div> <div class="view-menu-item view-menu-item-danger svelte-r6dy5f"><!> Delete</div></div>',1),Fe=P('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><button><span class="toggle-label">Details</span></button> <button><span class="toggle-label">Graph</span></button> <!> <button class="toggle-btn add-view-btn svelte-r6dy5f" title="New view"><!></button></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function ct(E,u){ue(u,!0);let n=ee(u,"activeView",3,"entity");const R=Ce("chat");function _(e){ce(e,{noScroll:!0})}async function A(){const e=await D.create("New View");ce(`/views/${e.id}`)}let v=V(null),c=V(""),d=V(null),b=V(!1);function T(e){s(b,!1),s(v,e.id,!0),s(c,e.name,!0)}He(()=>{t(v)&&t(d)&&(t(d).focus(),t(d).select(),setTimeout(()=>{s(b,!0)},50))});function w(){t(b)&&(t(v)&&t(c).trim()&&D.update(t(v),{name:t(c).trim()}),s(v,null),s(b,!1))}function z(){s(v,null),s(b,!1)}function B(e){e.key==="Enter"&&(e.preventDefault(),s(b,!0),w()),e.key==="Escape"&&(e.preventDefault(),z())}let $=V(null),N=V(De({x:0,y:0}));function pe(e,a){e.preventDefault(),s($,a.id,!0),s(N,{x:e.clientX,y:e.clientY},!0)}function S(){s($,null)}async function ge(e){S(),confirm(`Delete view "${e.name}"?`)&&await D.remove(e.id)}var te=Fe(),Y=H(te),G=p(l(Y),2),K=l(G);let ae;var L=p(K,2);let ie;var se=p(L,2);Te(se,17,()=>D.views,e=>e.id,(e,a)=>{var h=F(),X=H(h);{var Z=m=>{var i=Ze();$e(i),Ee(i,r=>s(d,r),()=>t(d)),f("keydown",i,B),ze("blur",i,w),Be(i,()=>t(c),r=>s(c,r)),g(m,i)},y=m=>{var i=je();let r;var M=l(i),x=l(M,!0);o(M),o(i),I(()=>{r=Q(i,1,"toggle-btn svelte-r6dy5f",null,r,{active:n()==="view"&&U.activeViewId===t(a).id}),de(x,t(a).name)}),f("click",i,()=>!(n()==="view"&&U.activeViewId===t(a).id)&&_(`/views/${t(a).id}`)),f("contextmenu",i,j=>pe(j,t(a))),g(m,i)};k(X,m=>{t(v)===t(a).id?m(Z):m(y,!1)})}g(e,h)});var O=p(se,2),_e=l(O);Ye(_e,{size:14}),o(O),o(G);var ne=p(G,2),re=l(ne);{var be=e=>{var a=F(),h=H(a);Ie(h,()=>u.right),g(e,a)};k(re,e=>{u.right&&e(be)})}var he=p(re,2);{var ye=e=>{Ne(e,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return R.toggle},children:(a,h)=>{Xe(a,{size:14})},$$slots:{default:!0}})};k(he,e=>{R.open||e(ye)})}o(ne),o(Y);var we=p(Y,2);{var xe=e=>{const a=Re(()=>D.views.find(y=>y.id===t($)));var h=F(),X=H(h);{var Z=y=>{var m=qe(),i=H(m),r=p(i,2);let M;var x=l(r),j=l(x);Ge(j,{size:12}),W(),o(x);var q=p(x,2),Ve=l(q);Ke(Ve,{size:12}),W(),o(q),o(r),I(()=>M=Pe(r,"",M,{left:`${t(N).x??""}px`,top:`${t(N).y??""}px`})),f("click",i,S),f("click",r,C=>C.stopPropagation()),f("click",x,()=>{const C=t(a);S(),T(C)}),f("click",q,()=>{const C=t(a);ge(C)}),g(y,m)};k(X,y=>{t(a)&&y(Z)})}g(e,h)};k(we,e=>{t($)&&e(xe)})}I(()=>{ae=Q(K,1,"toggle-btn svelte-r6dy5f",null,ae,{active:n()==="entity"}),ie=Q(L,1,"toggle-btn svelte-r6dy5f",null,ie,{active:n()==="graph"})}),f("click",K,()=>n()!=="entity"&&_(U.entityPath??"/")),f("click",L,()=>n()!=="graph"&&_("/graph")),f("click",O,A),g(E,te),me()}ke(["click","keydown","contextmenu"]);export{ct as V};
1
+ import{a as g,s as ce,f as fe,d as ke,e as f,b as P,c as F,g as ze}from"./b0XUoOIH.js";import{p as ue,l as le,s,d as J,g as t,a as Me,c as l,n as W,r as o,b as me,m as oe,t as I,a1 as Ce,a2 as He,e as V,f as De,a0 as H,a3 as p,a4 as Re}from"./DSh-OF2y.js";import{a as Ae,r as $e,s as Ie,b as Pe}from"./CRnhIQbv.js";import{i as k,b as Ee}from"./DT3KtxWU.js";import{e as Te}from"./DHtLlmE0.js";import{s as Q}from"./CFtRXHDP.js";import{b as Be,B as Ne}from"./DQ5NTKSo.js";import{l as ve,p as ee}from"./D-yNNNdf.js";import{g as de}from"./BAAbylyg.js";import{i as Se}from"./vZ2iBqLE.js";import{A as Ye}from"./BgBJ0u3M.js";import{E as Ge,T as Ke}from"./azUmHUDT.js";import{n as U}from"./DC9z5DEo.js";import{v as D}from"./0wBGAod7.js";var Le=fe("<title> </title>"),Oe=fe('<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 Xe(E,u){const n=ve(u,["children","$$slots","$$events","$$legacy"]),R=ve(n,["size","title"]);ue(u,!1);const _=oe(),A=oe();let v=ee(u,"size",8,16),d=ee(u,"title",8,void 0);le(()=>(J(n),J(d())),()=>{s(_,n["aria-label"]||n["aria-labelledby"]||d())}),le(()=>(t(_),J(n)),()=>{s(A,{"aria-hidden":t(_)?void 0:!0,role:t(_)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Me(),Se();var c=Oe();Ae(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:v(),height:v(),...t(A),...R}));var b=l(c);{var T=w=>{var z=Le(),B=l(z,!0);o(z),I(()=>ce(B,d())),g(w,z)};k(b,w=>{d()&&w(T)})}W(3),o(c),g(E,c),me()}var Ze=P('<input class="view-rename-input svelte-r6dy5f"/>'),je=P('<button><span class="toggle-label"> </span></button>'),qe=P('<div class="context-backdrop svelte-r6dy5f"></div> <div class="view-context-menu svelte-r6dy5f"><div class="view-menu-item svelte-r6dy5f"><!> Rename</div> <div class="view-menu-item view-menu-item-danger svelte-r6dy5f"><!> Delete</div></div>',1),Fe=P('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><button><span class="toggle-label">Details</span></button> <button><span class="toggle-label">Graph</span></button> <!> <button class="toggle-btn add-view-btn svelte-r6dy5f" title="New view"><!></button></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div> <!>',1);function dt(E,u){ue(u,!0);let n=ee(u,"activeView",3,"entity");const R=Ce("chat");function _(e){de(e,{noScroll:!0})}async function A(){const e=await D.create("New View");de(`/views/${e.id}`)}let v=V(null),d=V(""),c=V(null),b=V(!1);function T(e){s(b,!1),s(v,e.id,!0),s(d,e.name,!0)}He(()=>{t(v)&&t(c)&&(t(c).focus(),t(c).select(),setTimeout(()=>{s(b,!0)},50))});function w(){t(b)&&(t(v)&&t(d).trim()&&D.update(t(v),{name:t(d).trim()}),s(v,null),s(b,!1))}function z(){s(v,null),s(b,!1)}function B(e){e.key==="Enter"&&(e.preventDefault(),s(b,!0),w()),e.key==="Escape"&&(e.preventDefault(),z())}let $=V(null),N=V(De({x:0,y:0}));function pe(e,a){e.preventDefault(),s($,a.id,!0),s(N,{x:e.clientX,y:e.clientY},!0)}function S(){s($,null)}async function ge(e){S(),confirm(`Delete view "${e.name}"?`)&&await D.remove(e.id)}var te=Fe(),Y=H(te),G=p(l(Y),2),K=l(G);let ae;var L=p(K,2);let ie;var se=p(L,2);Te(se,17,()=>D.views,e=>e.id,(e,a)=>{var h=F(),X=H(h);{var Z=m=>{var i=Ze();$e(i),Ee(i,r=>s(c,r),()=>t(c)),f("keydown",i,B),ze("blur",i,w),Be(i,()=>t(d),r=>s(d,r)),g(m,i)},y=m=>{var i=je();let r;var M=l(i),x=l(M,!0);o(M),o(i),I(()=>{r=Q(i,1,"toggle-btn svelte-r6dy5f",null,r,{active:n()==="view"&&U.activeViewId===t(a).id}),ce(x,t(a).name)}),f("click",i,()=>!(n()==="view"&&U.activeViewId===t(a).id)&&_(`/views/${t(a).id}`)),f("contextmenu",i,j=>pe(j,t(a))),g(m,i)};k(X,m=>{t(v)===t(a).id?m(Z):m(y,!1)})}g(e,h)});var O=p(se,2),_e=l(O);Ye(_e,{size:14}),o(O),o(G);var ne=p(G,2),re=l(ne);{var be=e=>{var a=F(),h=H(a);Ie(h,()=>u.right),g(e,a)};k(re,e=>{u.right&&e(be)})}var he=p(re,2);{var ye=e=>{Ne(e,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return R.toggle},children:(a,h)=>{Xe(a,{size:14})},$$slots:{default:!0}})};k(he,e=>{R.open||e(ye)})}o(ne),o(Y);var we=p(Y,2);{var xe=e=>{const a=Re(()=>D.views.find(y=>y.id===t($)));var h=F(),X=H(h);{var Z=y=>{var m=qe(),i=H(m),r=p(i,2);let M;var x=l(r),j=l(x);Ge(j,{size:12}),W(),o(x);var q=p(x,2),Ve=l(q);Ke(Ve,{size:12}),W(),o(q),o(r),I(()=>M=Pe(r,"",M,{left:`${t(N).x??""}px`,top:`${t(N).y??""}px`})),f("click",i,S),f("click",r,C=>C.stopPropagation()),f("click",x,()=>{const C=t(a);S(),T(C)}),f("click",q,()=>{const C=t(a);ge(C)}),g(y,m)};k(X,y=>{t(a)&&y(Z)})}g(e,h)};k(we,e=>{t($)&&e(xe)})}I(()=>{ae=Q(K,1,"toggle-btn svelte-r6dy5f",null,ae,{active:n()==="entity"}),ie=Q(L,1,"toggle-btn svelte-r6dy5f",null,ie,{active:n()==="graph"})}),f("click",K,()=>n()!=="entity"&&_(U.entityPath??"/")),f("click",L,()=>n()!=="graph"&&_("/graph")),f("click",O,A),g(E,te),me()}ke(["click","keydown","contextmenu"]);export{dt as V};
@@ -1,2 +1,2 @@
1
- import{i as h}from"./CfuRx7rA.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
1
+ import{i as h}from"./DSh-OF2y.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
2
2
  \r\f \v\uFEFF`];function T(r,i,t){var f=r==null?"":""+r;if(i&&(f=f?f+" "+i:i),t){for(var o of Object.keys(t))if(t[o])f=f?f+" "+o:o;else if(f.length)for(var n=o.length,u=0;(u=f.indexOf(o,u))>=0;){var s=u+n;(u===0||j.includes(f[u-1]))&&(s===f.length||j.includes(f[s]))?f=(u===0?"":f.substring(0,u))+f.substring(s+1):u=s}}return f===""?null:f}function A(r,i=!1){var t=i?" !important;":";",f="";for(var o of Object.keys(r)){var n=r[o];n!=null&&n!==""&&(f+=" "+o+": "+n+t)}return f}function p(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function L(r,i){if(i){var t="",f,o;if(Array.isArray(i)?(f=i[0],o=i[1]):f=i,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,u=0,s=!1,c=[];f&&c.push(...Object.keys(f).map(p)),o&&c.push(...Object.keys(o).map(p));var l=0,g=-1;const b=r.length;for(var e=0;e<b;e++){var a=r[e];if(s?a==="/"&&r[e-1]==="*"&&(s=!1):n?n===a&&(n=!1):a==="/"&&r[e+1]==="*"?s=!0:a==='"'||a==="'"?n=a:a==="("?u++:a===")"&&u--,!s&&n===!1&&u===0){if(a===":"&&g===-1)g=e;else if(a===";"||e===b-1){if(g!==-1){var O=p(r.substring(l,g).trim());if(!c.includes(O)){a!==";"&&e++;var d=r.substring(l,e).trim();t+=" "+d+";"}}l=e+1,g=-1}}}}return f&&(t+=A(f)),o&&(t+=A(o,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function z(r,i,t,f,o,n){var u=r.__className;if(h||u!==t||u===void 0){var s=T(t,f,n);(!h||s!==r.getAttribute("class"))&&(s==null?r.removeAttribute("class"):i?r.className=s:r.setAttribute("class",s)),r.__className=t}else if(n&&o!==n)for(var c in n){var l=!!n[c];(o==null||l!==!!o[c])&&r.classList.toggle(c,l)}return n}const E="";class w extends Error{constructor(i,t){super(t),this.status=i,this.name="ApiError"}}async function C(r,i){const t={...i?.headers};i?.body&&(t["Content-Type"]=t["Content-Type"]??"application/json");const f=await fetch(`${E}${r}`,{...i,headers:t});if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw f.status===401&&typeof window<"u"&&!r.startsWith("/api/auth/")&&window.location.pathname!=="/login"&&(window.location.href="/login"),new w(f.status,o.error??f.statusText)}return f.json()}const B=Object.freeze(Object.defineProperty({__proto__:null,ApiError:w,apiFetch:C},Symbol.toStringTag,{value:"Module"}));export{C as a,S as b,$ as c,B as d,z as s,L as t};
@@ -1 +1 @@
1
- import{h as J,E as Q,aG as V,Y as P,G as Y,aA as $,i as g,L as X,aH as Z,aI as W,ah as m,aJ as x,aK as ee,aL as se,g as re,aM as ae,aN as te,aO as I,u as H,aP as ie,aQ as fe,U as ue,aR as oe,aS as le}from"./CfuRx7rA.js";import{B as ce}from"./Cwkp_c4R.js";import{i as ne,g as ve,d as _e,j as de,n as be,k as he}from"./CajNsaOw.js";import{t as pe,c as Ae,s as ge}from"./DEyrdHQB.js";function Ue(e,r,...s){var a=new ce(e);J(()=>{const t=r()??null;a.ensure(t,t&&(c=>t(c,...s)))},Q)}function ye(e,r){var s=void 0,a;V(()=>{s!==(s=r())&&(a&&(P(a),a=null),s&&(a=Y(()=>{$(()=>s(e))})))})}function w(e,r={},s,a){for(var t in s){var c=s[t];r[t]!==c&&(s[t]==null?e.style.removeProperty(t):e.style.setProperty(t,c,a))}}function Te(e,r,s,a){var t=e.__style;if(g||t!==r){var c=pe(r,a);(!g||c!==e.getAttribute("style"))&&(c==null?e.removeAttribute("style"):e.style.cssText=c),e.__style=r}else a&&(Array.isArray(a)?(w(e,s?.[0],a[0]),w(e,s?.[1],a[1],"important")):w(e,s,a));return a}function M(e,r,s=!1){if(e.multiple){if(r==null)return;if(!X(r))return Z();for(var a of e.options)a.selected=r.includes(B(a));return}for(a of e.options){var t=B(a);if(W(t,r)){a.selected=!0;return}}(!s||r!==void 0)&&(e.selectedIndex=-1)}function Se(e){var r=new MutationObserver(()=>{M(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),m(()=>{r.disconnect()})}function B(e){return"__value"in e?e.__value:e.value}const N=Symbol("class"),E=Symbol("style"),j=Symbol("is custom element"),F=Symbol("is html"),Ne=I?"link":"LINK",Ee=I?"input":"INPUT",Ie=I?"option":"OPTION",Le=I?"select":"SELECT",Oe=I?"progress":"PROGRESS";function ke(e){if(g){var r=!1,s=()=>{if(!r){if(r=!0,e.hasAttribute("value")){var a=e.value;O(e,"value",null),e.value=a}if(e.hasAttribute("checked")){var t=e.checked;O(e,"checked",null),e.checked=t}}};e.__on_r=s,ue(s),oe()}}function He(e,r){var s=C(e);s.value===(s.value=r??void 0)||e.value===r&&(r!==0||e.nodeName!==Oe)||(e.value=r??"")}function we(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function O(e,r,s,a){var t=C(e);g&&(t[r]=e.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&e.nodeName===Ne)||t[r]!==(t[r]=s)&&(r==="loading"&&(e[le]=s),s==null?e.removeAttribute(r):typeof s!="string"&&D(e).includes(r)?e[r]=s:e.setAttribute(r,s))}function Pe(e,r,s,a,t=!1,c=!1){if(g&&t&&e.nodeName===Ee){var b=e,k=b.type==="checkbox"?"defaultChecked":"defaultValue";k in s||ke(b)}var h=C(e),_=h[j],p=!h[F];let y=g&&_;y&&H(!1);var u=r||{},T=e.nodeName===Ie;for(var d in r)d in s||(s[d]=null);s.class?s.class=Ae(s.class):(a||s[N])&&(s.class=null),s[E]&&(s.style??=null);var L=D(e);for(const i in s){let f=s[i];if(T&&i==="value"&&f==null){e.value=e.__value="",u[i]=f;continue}if(i==="class"){var S=e.namespaceURI==="http://www.w3.org/1999/xhtml";ge(e,S,f,a,r?.[N],s[N]),u[i]=f,u[N]=s[N];continue}if(i==="style"){Te(e,f,r?.[E],s[E]),u[i]=f,u[E]=s[E];continue}var n=u[i];if(!(f===n&&!(f===void 0&&e.hasAttribute(i)))){u[i]=f;var G=i[0]+i[1];if(G!=="$$")if(G==="on"){const v={},A="$$"+i;let l=i.slice(2);var R=he(l);if(ne(l)&&(l=l.slice(0,-7),v.capture=!0),!R&&n){if(f!=null)continue;e.removeEventListener(l,u[A],v),u[A]=null}if(R)ve(l,e,f),_e([l]);else if(f!=null){let q=function(z){u[i].call(this,z)};u[A]=de(l,e,q,v)}}else if(i==="style")O(e,i,f);else if(i==="autofocus")ie(e,!!f);else if(!_&&(i==="__value"||i==="value"&&f!=null))e.value=e.__value=f;else if(i==="selected"&&T)we(e,f);else{var o=i;p||(o=be(o));var U=o==="defaultValue"||o==="defaultChecked";if(f==null&&!_&&!U)if(h[i]=null,o==="value"||o==="checked"){let v=e;const A=r===void 0;if(o==="value"){let l=v.defaultValue;v.removeAttribute(o),v.defaultValue=l,v.value=v.__value=A?l:null}else{let l=v.defaultChecked;v.removeAttribute(o),v.defaultChecked=l,v.checked=A?l:!1}}else e.removeAttribute(i);else U||L.includes(o)&&(_||typeof f!="string")?(e[o]=f,o in h&&(h[o]=fe)):typeof f!="function"&&O(e,o,f)}}}return y&&H(!0),u}function Be(e,r,s=[],a=[],t=[],c,b=!1,k=!1){x(t,s,a,h=>{var _=void 0,p={},y=e.nodeName===Le,u=!1;if(V(()=>{var d=r(...h.map(re)),L=Pe(e,_,d,c,b,k);u&&y&&"value"in d&&M(e,d.value);for(let n of Object.getOwnPropertySymbols(p))d[n]||P(p[n]);for(let n of Object.getOwnPropertySymbols(d)){var S=d[n];n.description===ae&&(!_||S!==_[n])&&(p[n]&&P(p[n]),p[n]=Y(()=>ye(e,()=>S))),L[n]=S}_=L}),y){var T=e;$(()=>{M(T,_.value,!0),Se(T)})}u=!0})}function C(e){return e.__attributes??={[j]:e.nodeName.includes("-"),[F]:e.namespaceURI===ee}}var K=new Map;function D(e){var r=e.getAttribute("is")||e.nodeName,s=K.get(r);if(s)return s;K.set(r,s=[]);for(var a,t=e,c=Element.prototype;c!==t;){a=te(t);for(var b in a)a[b].set&&s.push(b);t=se(t)}return s}export{E as S,Be as a,Te as b,O as c,He as d,ke as r,Ue as s};
1
+ import{h as J,E as Q,aG as V,Y as P,G as Y,aA as $,i as g,L as X,aH as Z,aI as W,ah as m,aJ as x,aK as ee,aL as se,g as re,aM as ae,aN as te,aO as I,u as H,aP as ie,aQ as fe,U as ue,aR as oe,aS as le}from"./DSh-OF2y.js";import{B as ce}from"./DT3KtxWU.js";import{i as ne,e as ve,d as _e,j as de,n as be,k as he}from"./b0XUoOIH.js";import{t as pe,c as Ae,s as ge}from"./CFtRXHDP.js";function Ue(e,r,...s){var a=new ce(e);J(()=>{const t=r()??null;a.ensure(t,t&&(c=>t(c,...s)))},Q)}function ye(e,r){var s=void 0,a;V(()=>{s!==(s=r())&&(a&&(P(a),a=null),s&&(a=Y(()=>{$(()=>s(e))})))})}function w(e,r={},s,a){for(var t in s){var c=s[t];r[t]!==c&&(s[t]==null?e.style.removeProperty(t):e.style.setProperty(t,c,a))}}function Te(e,r,s,a){var t=e.__style;if(g||t!==r){var c=pe(r,a);(!g||c!==e.getAttribute("style"))&&(c==null?e.removeAttribute("style"):e.style.cssText=c),e.__style=r}else a&&(Array.isArray(a)?(w(e,s?.[0],a[0]),w(e,s?.[1],a[1],"important")):w(e,s,a));return a}function M(e,r,s=!1){if(e.multiple){if(r==null)return;if(!X(r))return Z();for(var a of e.options)a.selected=r.includes(B(a));return}for(a of e.options){var t=B(a);if(W(t,r)){a.selected=!0;return}}(!s||r!==void 0)&&(e.selectedIndex=-1)}function Se(e){var r=new MutationObserver(()=>{M(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),m(()=>{r.disconnect()})}function B(e){return"__value"in e?e.__value:e.value}const N=Symbol("class"),E=Symbol("style"),j=Symbol("is custom element"),F=Symbol("is html"),Ne=I?"link":"LINK",Ee=I?"input":"INPUT",Ie=I?"option":"OPTION",Le=I?"select":"SELECT",Oe=I?"progress":"PROGRESS";function ke(e){if(g){var r=!1,s=()=>{if(!r){if(r=!0,e.hasAttribute("value")){var a=e.value;O(e,"value",null),e.value=a}if(e.hasAttribute("checked")){var t=e.checked;O(e,"checked",null),e.checked=t}}};e.__on_r=s,ue(s),oe()}}function He(e,r){var s=C(e);s.value===(s.value=r??void 0)||e.value===r&&(r!==0||e.nodeName!==Oe)||(e.value=r??"")}function we(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function O(e,r,s,a){var t=C(e);g&&(t[r]=e.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&e.nodeName===Ne)||t[r]!==(t[r]=s)&&(r==="loading"&&(e[le]=s),s==null?e.removeAttribute(r):typeof s!="string"&&D(e).includes(r)?e[r]=s:e.setAttribute(r,s))}function Pe(e,r,s,a,t=!1,c=!1){if(g&&t&&e.nodeName===Ee){var b=e,k=b.type==="checkbox"?"defaultChecked":"defaultValue";k in s||ke(b)}var h=C(e),_=h[j],p=!h[F];let y=g&&_;y&&H(!1);var u=r||{},T=e.nodeName===Ie;for(var d in r)d in s||(s[d]=null);s.class?s.class=Ae(s.class):(a||s[N])&&(s.class=null),s[E]&&(s.style??=null);var L=D(e);for(const i in s){let f=s[i];if(T&&i==="value"&&f==null){e.value=e.__value="",u[i]=f;continue}if(i==="class"){var S=e.namespaceURI==="http://www.w3.org/1999/xhtml";ge(e,S,f,a,r?.[N],s[N]),u[i]=f,u[N]=s[N];continue}if(i==="style"){Te(e,f,r?.[E],s[E]),u[i]=f,u[E]=s[E];continue}var n=u[i];if(!(f===n&&!(f===void 0&&e.hasAttribute(i)))){u[i]=f;var G=i[0]+i[1];if(G!=="$$")if(G==="on"){const v={},A="$$"+i;let l=i.slice(2);var R=he(l);if(ne(l)&&(l=l.slice(0,-7),v.capture=!0),!R&&n){if(f!=null)continue;e.removeEventListener(l,u[A],v),u[A]=null}if(R)ve(l,e,f),_e([l]);else if(f!=null){let q=function(z){u[i].call(this,z)};u[A]=de(l,e,q,v)}}else if(i==="style")O(e,i,f);else if(i==="autofocus")ie(e,!!f);else if(!_&&(i==="__value"||i==="value"&&f!=null))e.value=e.__value=f;else if(i==="selected"&&T)we(e,f);else{var o=i;p||(o=be(o));var U=o==="defaultValue"||o==="defaultChecked";if(f==null&&!_&&!U)if(h[i]=null,o==="value"||o==="checked"){let v=e;const A=r===void 0;if(o==="value"){let l=v.defaultValue;v.removeAttribute(o),v.defaultValue=l,v.value=v.__value=A?l:null}else{let l=v.defaultChecked;v.removeAttribute(o),v.defaultChecked=l,v.checked=A?l:!1}}else e.removeAttribute(i);else U||L.includes(o)&&(_||typeof f!="string")?(e[o]=f,o in h&&(h[o]=fe)):typeof f!="function"&&O(e,o,f)}}}return y&&H(!0),u}function Be(e,r,s=[],a=[],t=[],c,b=!1,k=!1){x(t,s,a,h=>{var _=void 0,p={},y=e.nodeName===Le,u=!1;if(V(()=>{var d=r(...h.map(re)),L=Pe(e,_,d,c,b,k);u&&y&&"value"in d&&M(e,d.value);for(let n of Object.getOwnPropertySymbols(p))d[n]||P(p[n]);for(let n of Object.getOwnPropertySymbols(d)){var S=d[n];n.description===ae&&(!_||S!==_[n])&&(p[n]&&P(p[n]),p[n]=Y(()=>ye(e,()=>S))),L[n]=S}_=L}),y){var T=e;$(()=>{M(T,_.value,!0),Se(T)})}u=!0})}function C(e){return e.__attributes??={[j]:e.nodeName.includes("-"),[F]:e.namespaceURI===ee}}var K=new Map;function D(e){var r=e.getAttribute("is")||e.nodeName,s=K.get(r);if(s)return s;K.set(r,s=[]);for(var a,t=e,c=Element.prototype;c!==t;){a=te(t);for(var b in a)a[b].set&&s.push(b);t=se(t)}return s}export{E as S,Be as a,Te as b,O as c,He as d,ke as r,Ue as s};
@@ -0,0 +1 @@
1
+ import{a as c,s as A,f as b}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as y,l as v,s as p,d as n,g as r,a as Z,c as u,n as R,r as m,b as B,m as g,t as C}from"./DSh-OF2y.js";import{i as H}from"./DT3KtxWU.js";import{a as N}from"./CRnhIQbv.js";import{l as h,p as _}from"./D-yNNNdf.js";var P=b("<title> </title>"),S=b('<svg><!><path d="M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"></path></svg>');function I(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=S();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=P(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(),m(s),c(w,s),B()}var Y=b("<title> </title>"),k=b('<svg><!><path d="M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"></path><path d="M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"></path></svg>');function J(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=k();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=Y(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(2),m(s),c(w,s),B()}export{I as A,J as S};