lightly-studio 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl

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

Potentially problematic release.


This version of lightly-studio might be problematic. Click here for more details.

Files changed (115) hide show
  1. lightly_studio/__init__.py +1 -1
  2. lightly_studio/api/app.py +6 -4
  3. lightly_studio/api/db_tables.py +0 -3
  4. lightly_studio/api/routes/api/annotation.py +26 -0
  5. lightly_studio/api/routes/api/annotations/__init__.py +7 -0
  6. lightly_studio/api/routes/api/annotations/create_annotation.py +52 -0
  7. lightly_studio/api/routes/api/dataset.py +3 -5
  8. lightly_studio/api/routes/api/embeddings2d.py +104 -0
  9. lightly_studio/api/routes/api/export.py +73 -0
  10. lightly_studio/api/routes/api/selection.py +87 -0
  11. lightly_studio/core/add_samples.py +0 -9
  12. lightly_studio/core/dataset.py +32 -48
  13. lightly_studio/core/dataset_query/dataset_query.py +5 -0
  14. lightly_studio/dataset/env.py +4 -0
  15. lightly_studio/dataset/file_utils.py +13 -2
  16. lightly_studio/dataset/loader.py +0 -54
  17. lightly_studio/dataset/mobileclip_embedding_generator.py +3 -2
  18. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.CA_CXIBb.css +1 -0
  19. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.DS78jgNY.css +1 -0
  20. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{SelectableSvgGroup.BNTuXSAe.css → index.BVs_sZj9.css} +1 -1
  21. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{SelectableSvgGroup.BBm0IWdq.css → transform.D487hwJk.css} +1 -1
  22. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/6t3IJ0vQ.js +1 -0
  23. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{gLNdjSzu.js → 8NsknIT2.js} +1 -1
  24. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Cur71c3O.js → BND_-4Kp.js} +1 -1
  25. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DRZO-E-T.js → BdfTHw61.js} +1 -1
  26. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BqBqV92V.js → BfHVnyNT.js} +1 -1
  27. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BjkP1AHA.js +1 -0
  28. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BuuNVL9G.js +1 -0
  29. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{7YNGEs1C.js → BzKGpnl4.js} +1 -1
  30. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{C0JiMuYn.js → CCx7Ho51.js} +1 -1
  31. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DcGCxgpH.js → CH6P3X75.js} +1 -1
  32. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CR2upx_Q.js +4 -0
  33. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWPZrTTJ.js +1 -0
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Ccq4ZD0B.js → Cs1XmhiF.js} +1 -1
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{OH7-C_mc.js → CwPowJfP.js} +1 -1
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CxFKfZ9T.js +1 -0
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cxevwdid.js +1 -0
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{C98Hk3r5.js → D4whDBUi.js} +1 -1
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D6r9vr07.js +1 -0
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DqUGznj_.js → DA6bFLPR.js} +1 -1
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{2O287xak.js → DEgUu98i.js} +2 -2
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{KpAtIldw.js → DGTPl6Gk.js} +1 -1
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Cs31G8Qn.js → DKGxBSlK.js} +1 -1
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{D8GZDMNN.js → DQXoLcsF.js} +1 -1
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQe_kdRt.js +92 -0
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DcY4jgG3.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Crk-jcvV.js → RmD8FzRo.js} +1 -1
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/V-MnMC1X.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Df3aMO5B.js → keKYsoph.js} +1 -1
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/{app.BI-EA5gL.js → app.BVr6DYqP.js} +2 -2
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.u7zsVvqp.js +1 -0
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.Da2agmdd.js +1 -0
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{1._I9GR805.js → 1.B11tVRJV.js} +1 -1
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{10.J2RBFrSr.js → 10.l30Zud4h.js} +1 -1
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{12.Cmqj25a-.js → 12.CgKPGcAP.js} +1 -1
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.C8HLK8mj.js +857 -0
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.w9g4AcAx.js → 3.CLvg3QcJ.js} +1 -1
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.BBI8KwnD.js → 4.BQhDtXUI.js} +1 -1
  59. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.-6XqWX5G.js +1 -0
  60. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{6.CrbkRPam.js → 6.uBV1Lhat.js} +1 -1
  61. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{7.FomEdhD6.js → 7.BXsgoQZh.js} +1 -1
  62. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BkbcnUs8.js +1 -0
  63. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{9.CajIG5ce.js → 9.Bkrv-Vww.js} +1 -1
  64. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/clustering.worker-DKqeLtG0.js +2 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/search.worker-vNSty3B0.js +1 -0
  66. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  67. lightly_studio/dist_lightly_studio_view_app/index.html +14 -14
  68. lightly_studio/export/export_dataset.py +65 -0
  69. lightly_studio/export/lightly_studio_label_input.py +120 -0
  70. lightly_studio/few_shot_classifier/classifier_manager.py +5 -26
  71. lightly_studio/metadata/compute_typicality.py +67 -0
  72. lightly_studio/models/annotation/annotation_base.py +11 -12
  73. lightly_studio/resolvers/annotation_label_resolver/__init__.py +2 -1
  74. lightly_studio/resolvers/annotation_label_resolver/get_all.py +15 -0
  75. lightly_studio/resolvers/annotation_resolver/__init__.py +2 -3
  76. lightly_studio/resolvers/annotation_resolver/create_many.py +3 -3
  77. lightly_studio/resolvers/annotation_resolver/delete_annotation.py +1 -1
  78. lightly_studio/resolvers/annotation_resolver/delete_annotations.py +7 -3
  79. lightly_studio/resolvers/annotation_resolver/get_by_id.py +19 -1
  80. lightly_studio/resolvers/annotation_resolver/update_annotation_label.py +0 -1
  81. lightly_studio/resolvers/annotations/annotations_filter.py +1 -11
  82. lightly_studio/selection/mundig.py +7 -10
  83. lightly_studio/selection/selection_config.py +4 -1
  84. lightly_studio/services/annotations_service/__init__.py +8 -0
  85. lightly_studio/services/annotations_service/create_annotation.py +63 -0
  86. lightly_studio/services/annotations_service/delete_annotation.py +22 -0
  87. {lightly_studio-0.3.2.dist-info → lightly_studio-0.3.3.dist-info}/METADATA +152 -27
  88. {lightly_studio-0.3.2.dist-info → lightly_studio-0.3.3.dist-info}/RECORD +89 -85
  89. lightly_studio/api/routes/api/annotation_task.py +0 -37
  90. lightly_studio/api/routes/api/metrics.py +0 -76
  91. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.DenzbfeK.css +0 -1
  92. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.T-zjSUd3.css +0 -1
  93. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BBoGk9hq.js +0 -1
  94. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BRnH9v23.js +0 -92
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bg1Y5eUZ.js +0 -1
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CG0dMCJi.js +0 -1
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cpy-nab_.js +0 -1
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CsKrY2zA.js +0 -1
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CzgC3GFB.js +0 -1
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DFRh-Spp.js +0 -1
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DkR_EZ_B.js +0 -1
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/M1Q1F7bw.js +0 -4
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/i0ZZ4z06.js +0 -1
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.CcsRl3cZ.js +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.BbO4Zc3r.js +0 -1
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.C45iKJHA.js +0 -6
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.huHuxdiF.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Cb_ADSLk.js +0 -1
  109. lightly_studio/metrics/__init__.py +0 -0
  110. lightly_studio/metrics/detection/__init__.py +0 -0
  111. lightly_studio/metrics/detection/map.py +0 -268
  112. lightly_studio/models/annotation_task.py +0 -28
  113. lightly_studio/resolvers/annotation_resolver/create.py +0 -19
  114. lightly_studio/resolvers/annotation_task_resolver.py +0 -31
  115. {lightly_studio-0.3.2.dist-info → lightly_studio-0.3.3.dist-info}/WHEEL +0 -0
@@ -1,92 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CsKrY2zA.js","./CWj6FrbW.js","./DcGCxgpH.js","./DIeogL5L.js","./Crk-jcvV.js","./C0JiMuYn.js","./BBoGk9hq.js","./Cpy-nab_.js","./D8GZDMNN.js","./DqUGznj_.js"])))=>i.map(i=>d[i]);
2
- var mE=Object.defineProperty;var bE=Object.getPrototypeOf;var _E=Reflect.get;var hb=e=>{throw TypeError(e)};var wE=(e,t,n)=>t in e?mE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>wE(e,typeof t!="symbol"?t+"":t,n),Rh=(e,t,n)=>t.has(e)||hb("Cannot "+n);var A=(e,t,n)=>(Rh(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>t.has(e)?hb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),le=(e,t,n,i)=>(Rh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Pt=(e,t,n)=>(Rh(e,t,"access private method"),n);var gb=(e,t,n)=>_E(bE(e),n,t);import"./CWj6FrbW.js";import"./69_IOA4Y.js";import{a6 as K_,af as q_,a9 as yE,q as ye,v as Bs,aH as Kg,o as uf,aI as xE,U as og,aJ as Ms,ab as er,G as sg,a2 as qg,a4 as ku,a3 as Tu,aK as pb,b as SE,B as cf,C as ol,D as To,av as AE,F as mr,aL as CE,aM as PE,g as m,ak as nn,x as EE,y as vb,z as Ls,A as Qi,X as kE,a0 as Y_,aN as Mh,P as Vs,aO as Yg,aP as TE,_ as IE,aQ as OE,at as X_,aR as Xg,aS as NE,N as Z_,M as J_,S as RE,aT as Q_,aU as ME,E as j_,aV as LE,aW as DE,aX as FE,aY as BE,aZ as VE,a_ as zE,a$ as WE,ag as $_,i as Rn,b0 as HE,as as UE,n as St,a5 as GE,ah as Zg,J as rt,b1 as KE,aw as Jg,aA as t0,ay as ag,c as tt,r as $,s as _t,t as yt,au as Pi,l as Pe,w as Ee,p as ft,a7 as vt,u as xe,d as N,f as z,a as ht,az as mb,ax as we,e as df,aF as qE,b2 as YE,b3 as e0,m as iu,$ as XE}from"./DcGCxgpH.js";import{i as ZE,b as bb,c as JE,n as QE,d as jE,e as $E,s as De,m as tk,u as ek}from"./KpAtIldw.js";import{i as wt,s as $o,a as Ge,b as _b,m as wb}from"./DqUGznj_.js";import{b as nk,t as et,a as P,c as X,n as sl,d as Ce}from"./Crk-jcvV.js";import{c as rk,d as io,f as ik,g as ok,w as sk,l as n0,o as Re,e as yb}from"./C98Hk3r5.js";import{i as Qg}from"./7YNGEs1C.js";import{p as to}from"./Df3aMO5B.js";import{s as it,c as Nn,u as ak,P as lk}from"./C0JiMuYn.js";import{p as k,a as dt,b as rr,r as xt,s as Rt,c as Ot,_ as xb}from"./D8GZDMNN.js";import{a as uk,u as zs}from"./BBoGk9hq.js";import{j as ck,s as dk}from"./Cpy-nab_.js";import{o as jg,g as vu}from"./2O287xak.js";import"./gLNdjSzu.js";import{r as mu}from"./H7C68rOM.js";import{R as fk,q as hk,n as $g,t as gk,v as pk,w as vk,x as mk,S as bk,y as _k,k as Sb,z as wk,u as tp,A as yk,B as xk,C as Sk,D as Ak,c as r0,E as i0,F as Ck,a as Pk}from"./i0ZZ4z06.js";const Ek=[];function o0(e,t=!1){return bu(e,new Map,"",Ek)}function bu(e,t,n,i,s=null){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(K_(e)){var l=Array(e.length);t.set(e,l),s!==null&&t.set(s,l);for(var c=0;c<e.length;c+=1){var d=e[c];c in e&&(l[c]=bu(d,t,n,i))}return l}if(q_(e)===yE){l={},t.set(e,l),s!==null&&t.set(s,l);for(var f in e)l[f]=bu(e[f],t,n,i);return l}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function")return bu(e.toJSON(),t,n,i,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}const Lh=0,ou=1,Dh=2;function Ab(e,t,n,i,s){ye&&Bs();var a=e,l=Kg(),c=SE,d=og,f,h,g,v=(l?er:sg)(void 0),b=(l?er:sg)(void 0),_=!1;function y(S,I){_=!0,I&&(ku(x),Tu(x),pb(c));try{S===ou&&i&&(h?cf(h):h=ol(()=>i(a,v))),S!==Lh&&f&&To(f,()=>f=null),S!==ou&&h&&To(h,()=>h=null),S!==Dh&&g&&To(g,()=>g=null)}finally{I&&(pb(null),Tu(null),ku(null),AE())}}var x=uf(()=>{if(d!==(d=t())){if(xE(d)){var S=d;_=!1,S.then(I=>{S===d&&(Ms(v,I),y(ou,!0))},I=>{if(S===d)throw Ms(b,I),y(Dh,!0),b.v}),ye||qg(()=>{_||y(Lh,!0)})}else Ms(v,d),y(ou,!1);return()=>d=og}});ye&&(a=mr)}function Ws(e,t,n){ye&&Bs();var i=e,s=og,a,l=Kg()?CE:PE;uf(()=>{l(s,s=t())&&(a&&To(a),a=ol(()=>n(i)))}),ye&&(i=mr)}function ff(e,t){return t}function kk(e,t,n,i){for(var s=[],a=t.length,l=0;l<a;l++)TE(t[l].e,s,!0);var c=a>0&&s.length===0&&n!==null;if(c){var d=n.parentNode;IE(d),d.append(n),i.clear(),mi(e,t[0].prev,t[a-1].next)}OE(s,()=>{for(var f=0;f<a;f++){var h=t[f];c||(i.delete(h.k),mi(e,h.prev,h.next)),X_(h.e,!c)}})}function Ei(e,t,n,i,s,a=null){var l=e,c={flags:t,items:new Map,first:null},d=(t&Q_)!==0;if(d){var f=e;l=ye?Ls(Z_(f)):f.appendChild(J_())}ye&&Bs();var h=null,g=!1,v=nn(()=>{var b=n();return K_(b)?b:b==null?[]:Y_(b)});uf(()=>{var b=m(v),_=b.length;if(g&&_===0)return;g=_===0;let y=!1;if(ye){var x=l.data===EE;x!==(_===0)&&(l=vb(),Ls(l),Qi(!1),y=!0)}if(ye){for(var S=null,I,T=0;T<_;T++){if(mr.nodeType===8&&mr.data===kE){l=mr,y=!0,Qi(!1);break}var O=b[T],D=i(O,T);I=s0(mr,c,S,null,O,D,T,s,t,n),c.items.set(D,I),S=I}_>0&&Ls(vb())}ye||Tk(b,c,l,s,t,i,n),a!==null&&(_===0?h?cf(h):h=ol(()=>a(l)):h!==null&&To(h,()=>{h=null})),y&&Qi(!0),m(v)}),ye&&(l=mr)}function Tk(e,t,n,i,s,a,l){var G,Z,Q,ot;var c=(s&ME)!==0,d=(s&(Xg|Yg))!==0,f=e.length,h=t.items,g=t.first,v=g,b,_=null,y,x=[],S=[],I,T,O,D;if(c)for(D=0;D<f;D+=1)I=e[D],T=a(I,D),O=h.get(T),O!==void 0&&((G=O.a)==null||G.measure(),(y??(y=new Set)).add(O));for(D=0;D<f;D+=1){if(I=e[D],T=a(I,D),O=h.get(T),O===void 0){var L=v?v.e.nodes_start:n;_=s0(L,t,_,_===null?t.first:_.next,I,T,D,i,s,l),h.set(T,_),x=[],S=[],v=_.next;continue}if(d&&Ik(O,I,D,s),O.e.f&Mh&&(cf(O.e),c&&((Z=O.a)==null||Z.unfix(),(y??(y=new Set)).delete(O))),O!==v){if(b!==void 0&&b.has(O)){if(x.length<S.length){var M=S[0],U;_=M.prev;var q=x[0],at=x[x.length-1];for(U=0;U<x.length;U+=1)Cb(x[U],M,n);for(U=0;U<S.length;U+=1)b.delete(S[U]);mi(t,q.prev,at.next),mi(t,_,q),mi(t,at,M),v=M,_=at,D-=1,x=[],S=[]}else b.delete(O),Cb(O,v,n),mi(t,O.prev,O.next),mi(t,O,_===null?t.first:_.next),mi(t,_,O),_=O;continue}for(x=[],S=[];v!==null&&v.k!==T;)v.e.f&Mh||(b??(b=new Set)).add(v),S.push(v),v=v.next;if(v===null)continue;O=v}x.push(O),_=O,v=O.next}if(v!==null||b!==void 0){for(var gt=b===void 0?[]:Y_(b);v!==null;)v.e.f&Mh||gt.push(v),v=v.next;var W=gt.length;if(W>0){var j=s&Q_&&f===0?n:null;if(c){for(D=0;D<W;D+=1)(Q=gt[D].a)==null||Q.measure();for(D=0;D<W;D+=1)(ot=gt[D].a)==null||ot.fix()}kk(t,gt,j,h)}}c&&qg(()=>{var ut;if(y!==void 0)for(O of y)(ut=O.a)==null||ut.apply()}),Vs.first=t.first&&t.first.e,Vs.last=_&&_.e}function Ik(e,t,n,i){i&Xg&&Ms(e.v,t),i&Yg?Ms(e.i,n):e.i=n}function s0(e,t,n,i,s,a,l,c,d,f){var h=(d&Xg)!==0,g=(d&NE)===0,v=h?g?sg(s):er(s):s,b=d&Yg?er(l):l,_={i:b,v,k:a,a:null,e:null,prev:n,next:i};try{return _.e=ol(()=>c(e,v,b,f),ye),_.e.prev=n&&n.e,_.e.next=i&&i.e,n===null?t.first=_:(n.next=_,n.e.next=_.e),i!==null&&(i.prev=_,i.e.prev=_.e),_}finally{}}function Cb(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var l=RE(a);s.before(a),a=l}}function mi(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function Ok(e,t,n,i,s,a){let l=ye;ye&&Bs();var c,d,f=null;ye&&mr.nodeType===1&&(f=mr,Bs());var h=ye?mr:e,g;uf(()=>{const v=t()||null;var b=LE;v!==c&&(g&&(v===null?To(g,()=>{g=null,d=null}):v===d?cf(g):(X_(g),bb(!1))),v&&v!==d&&(g=ol(()=>{if(f=ye?f:document.createElementNS(b,v),nk(f,f),i){ye&&ZE(v)&&f.append(document.createComment(""));var _=ye?Z_(f):f.appendChild(J_());ye&&(_===null?Qi(!1):Ls(_)),i(f,_)}Vs.nodes_end=f,h.before(f)})),c=v,c&&(d=c),bb(!0))},j_),l&&(Qi(!0),Ls(h))}function a0(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=a0(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Ds(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=a0(e))&&(i&&(i+=" "),i+=t);return i}function ki(e){return typeof e=="object"?Ds(e):e??""}const Pb=[...`
3
- \r\f \v\uFEFF`];function Nk(e,t,n){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),n){for(var s in n)if(n[s])i=i?i+" "+s:s;else if(i.length)for(var a=s.length,l=0;(l=i.indexOf(s,l))>=0;){var c=l+a;(l===0||Pb.includes(i[l-1]))&&(c===i.length||Pb.includes(i[c]))?i=(l===0?"":i.substring(0,l))+i.substring(c+1):l=c}}return i===""?null:i}function Eb(e,t=!1){var n=t?" !important;":";",i="";for(var s in e){var a=e[s];a!=null&&a!==""&&(i+=" "+s+": "+a+n)}return i}function Fh(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Rk(e,t){if(t){var n="",i,s;if(Array.isArray(t)?(i=t[0],s=t[1]):i=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,c=!1,d=[];i&&d.push(...Object.keys(i).map(Fh)),s&&d.push(...Object.keys(s).map(Fh));var f=0,h=-1;const y=e.length;for(var g=0;g<y;g++){var v=e[g];if(c?v==="/"&&e[g-1]==="*"&&(c=!1):a?a===v&&(a=!1):v==="/"&&e[g+1]==="*"?c=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!c&&a===!1&&l===0){if(v===":"&&h===-1)h=g;else if(v===";"||g===y-1){if(h!==-1){var b=Fh(e.substring(f,h).trim());if(!d.includes(b)){v!==";"&&g++;var _=e.substring(f,g).trim();n+=" "+_+";"}}f=g+1,h=-1}}}}return i&&(n+=Eb(i)),s&&(n+=Eb(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Xn(e,t,n,i,s,a){var l=e.__className;if(ye||l!==n){var c=Nk(n,i,a);(!ye||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c)),e.__className=n}else if(a&&s!==a)for(var d in a){var f=!!a[d];(s==null||f!==!!s[d])&&e.classList.toggle(d,f)}return a}function Bh(e,t={},n,i){for(var s in n){var a=n[s];t[s]!==a&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,i))}}function yn(e,t,n,i){var s=e.__style;if(ye||s!==t){var a=Rk(t,i);(!ye||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}else i&&(Array.isArray(i)?(Bh(e,n==null?void 0:n[0],i[0]),Bh(e,n==null?void 0:n[1],i[1],"important")):Bh(e,n,i));return i}const ws=Symbol("class"),Ao=Symbol("style"),l0=Symbol("is custom element"),u0=Symbol("is html");function Iu(e){if(ye){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;ze(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var s=e.checked;ze(e,"checked",null),e.checked=s}}};e.__on_r=n,BE(n),ok()}}function Mk(e,t){var n=ep(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function Lk(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ze(e,t,n,i){var s=ep(e);ye&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[DE]=n),n==null?e.removeAttribute(t):typeof n!="string"&&c0(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Lt(e,t,n,i,s=!1){var a=ep(e),l=a[l0],c=!a[u0];let d=ye&&l;d&&Qi(!1);var f=t||{},h=e.tagName==="OPTION";for(var g in t)g in n||(n[g]=null);n.class?n.class=ki(n.class):(i||n[ws])&&(n.class=null),n[Ao]&&(n.style??(n.style=null));var v=c0(e);for(const T in n){let O=n[T];if(h&&T==="value"&&O==null){e.value=e.__value="",f[T]=O;continue}if(T==="class"){var b=e.namespaceURI==="http://www.w3.org/1999/xhtml";Xn(e,b,O,i,t==null?void 0:t[ws],n[ws]),f[T]=O,f[ws]=n[ws];continue}if(T==="style"){yn(e,O,t==null?void 0:t[Ao],n[Ao]),f[T]=O,f[Ao]=n[Ao];continue}var _=f[T];if(O!==_){f[T]=O;var y=T[0]+T[1];if(y!=="$$")if(y==="on"){const D={},L="$$"+T;let M=T.slice(2);var x=jE(M);if(JE(M)&&(M=M.slice(0,-7),D.capture=!0),!x&&_){if(O!=null)continue;e.removeEventListener(M,f[L],D),f[L]=null}if(O!=null)if(x)e[`__${M}`]=O,io([M]);else{let U=function(q){f[T].call(this,q)};f[L]=rk(M,e,U,D)}else x&&(e[`__${M}`]=void 0)}else if(T==="style")ze(e,T,O);else if(T==="autofocus")ik(e,!!O);else if(!l&&(T==="__value"||T==="value"&&O!=null))e.value=e.__value=O;else if(T==="selected"&&h)Lk(e,O);else{var S=T;c||(S=QE(S));var I=S==="defaultValue"||S==="defaultChecked";if(O==null&&!l&&!I)if(a[T]=null,S==="value"||S==="checked"){let D=e;const L=t===void 0;if(S==="value"){let M=D.defaultValue;D.removeAttribute(S),D.defaultValue=M,D.value=D.__value=L?M:null}else{let M=D.defaultChecked;D.removeAttribute(S),D.defaultChecked=M,D.checked=L?M:!1}}else e.removeAttribute(T);else I||v.includes(S)&&(l||typeof O!="string")?e[S]=O:typeof O!="function"&&ze(e,S,O)}}}return d&&Qi(!0),f}function ep(e){return e.__attributes??(e.__attributes={[l0]:e.nodeName.includes("-"),[u0]:e.namespaceURI===FE})}var kb=new Map;function c0(e){var t=kb.get(e.nodeName);if(t)return t;kb.set(e.nodeName,t=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=VE(i);for(var a in n)n[a].set&&t.push(a);i=q_(i)}return t}const Dk=()=>performance.now(),Gr={tick:e=>requestAnimationFrame(e),now:()=>Dk(),tasks:new Set};function d0(){const e=Gr.now();Gr.tasks.forEach(t=>{t.c(e)||(Gr.tasks.delete(t),t.f())}),Gr.tasks.size!==0&&Gr.tick(d0)}function Fk(e){let t;return Gr.tasks.size===0&&Gr.tick(d0),{promise:new Promise(n=>{Gr.tasks.add(t={c:e,f:n})}),abort(){Gr.tasks.delete(t)}}}function su(e,t){sk(()=>{e.dispatchEvent(new CustomEvent(t))})}function Bk(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Tb(e){const t={},n=e.split(";");for(const i of n){const[s,a]=i.split(":");if(!s||a===void 0)break;const l=Bk(s.trim());t[l]=a.trim()}return t}const Vk=e=>e;function f0(e,t,n,i){var s=(e&HE)!==0,a="both",l,c=t.inert,d=t.style.overflow,f,h;function g(){var x=GE,S=Vs;Tu(null),ku(null);try{return l??(l=n()(t,(i==null?void 0:i())??{},{direction:a}))}finally{Tu(x),ku(S)}}var v={is_global:s,in(){t.inert=c,su(t,"introstart"),f=lg(t,g(),h,1,()=>{su(t,"introend"),f==null||f.abort(),f=l=void 0,t.style.overflow=d})},out(x){t.inert=!0,su(t,"outrostart"),h=lg(t,g(),f,0,()=>{su(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),h==null||h.abort()}},b=Vs;if((b.transitions??(b.transitions=[])).push(v),$E){var _=s;if(!_){for(var y=b.parent;y&&y.f&j_;)for(;(y=y.parent)&&!(y.f&zE););_=!y||(y.f&WE)!==0}_&&$_(()=>{Rn(()=>v.in())})}}function lg(e,t,n,i,s){var a=i===1;if(UE(t)){var l,c=!1;return qg(()=>{if(!c){var x=t({direction:a?"in":"out"});l=lg(e,x,n,i,s)}}),{abort:()=>{c=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return s(),{abort:St,deactivate:St,reset:St,t:()=>i};const{delay:d=0,css:f,tick:h,easing:g=Vk}=t;var v=[];if(a&&n===void 0&&(h&&h(0,1),f)){var b=Tb(f(0,1));v.push(b,b)}var _=()=>1-i,y=e.animate(v,{duration:d});return y.onfinish=()=>{var x=(n==null?void 0:n.t())??1-i;n==null||n.abort();var S=i-x,I=t.duration*Math.abs(S),T=[];if(I>0){var O=!1;if(f)for(var D=Math.ceil(I/16.666666666666668),L=0;L<=D;L+=1){var M=x+S*g(L/D),U=Tb(f(M,1-M));T.push(U),O||(O=U.overflow==="hidden")}O&&(e.style.overflow="hidden"),_=()=>{var q=y.currentTime;return x+S*g(q/I)},h&&Fk(()=>{if(y.playState!=="running")return!1;var q=_();return h(q,1-q),!0})}y=e.animate(T,{duration:I,fill:"forwards"}),y.onfinish=()=>{_=()=>i,h==null||h(i,1-i),s()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=St)},deactivate:()=>{s=St},reset:()=>{i===0&&(h==null||h(1,0))},t:()=>_()}}function h0(e,t,n=t){var i=Kg();n0(e,"input",s=>{var a=s?e.defaultValue:e.value;if(a=Vh(e)?zh(a):a,n(a),i&&a!==(a=t())){var l=e.selectionStart,c=e.selectionEnd;e.value=a??"",c!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(c,e.value.length))}}),(ye&&e.defaultValue!==e.value||Rn(t)==null&&e.value)&&n(Vh(e)?zh(e.value):e.value),Zg(()=>{var s=t();Vh(e)&&s===zh(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Vh(e){var t=e.type;return t==="number"||t==="range"}function zh(e){return e===""?null:+e}function e6(e,t,n=t){n0(e,"change",()=>{n(e.files)}),ye&&e.files&&n(e.files),Zg(()=>{e.files=t()})}var _i,Lo,Js,Yu,g0;const Xu=class Xu{constructor(t){F(this,Yu);F(this,_i,new WeakMap);F(this,Lo);F(this,Js);le(this,Js,t)}observe(t,n){var i=A(this,_i).get(t)||new Set;return i.add(n),A(this,_i).set(t,i),Pt(this,Yu,g0).call(this).observe(t,A(this,Js)),()=>{var s=A(this,_i).get(t);s.delete(n),s.size===0&&(A(this,_i).delete(t),A(this,Lo).unobserve(t))}}};_i=new WeakMap,Lo=new WeakMap,Js=new WeakMap,Yu=new WeakSet,g0=function(){return A(this,Lo)??le(this,Lo,new ResizeObserver(t=>{for(var n of t){Xu.entries.set(n.target,n);for(var i of A(this,_i).get(n.target)||[])i(n)}}))},Y(Xu,"entries",new WeakMap);let ug=Xu;var zk=new ug({box:"border-box"});function Wh(e,t,n){var i=zk.observe(e,()=>n(e[t]));$_(()=>(Rn(()=>n(e[t])),i))}function Co(e){rt(e,e.v+1)}function Wk(e){let t=0,n=er(0),i;return()=>{KE()&&(m(n),Zg(()=>(t===0&&(i=Rn(()=>e(()=>Co(n)))),t+=1,()=>{Jg().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}const Hk="data-no-translate",n6="paraglide:lang",r6="paraglide_lang",p0={},Uk=()=>ag(p0),i6=e=>{t0(p0,e)};function $r(){const e=Uk();function t(i,s){return typeof i!="string"||!e?i:e.translateHref(i,s)}function n(i,s){if(i[Hk])return i;for(const{attribute_name:a,lang_attribute_name:l}of s)if(a in i){const c=i[a],d=l?i[l]:void 0;i[a]=t(c,typeof d=="string"?d:void 0)}return i}return[t,n]}var Gk=et('<div class="relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700" role="alert"><strong class="block font-bold"> </strong> <span class="block"><!></span></div>');function Kk(e,t){var n=Gk(),i=tt(n),s=tt(i,!0);$(i);var a=_t(i,2),l=tt(a);it(l,()=>t.children),$(a),$(n),yt(()=>De(s,t.title)),P(e,n)}const v0={setting_id:"00000000-0000-0000-0000-000000000000",grid_view_sample_rendering:"contain",key_hide_annotations:"v",key_go_back:"Escape",show_annotation_text_labels:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()},yr=Ee(v0),Ci=Ee(!1),ji=Ee(null),Fs=Ee(!1),Ib=Pi(yr,e=>e.grid_view_sample_rendering||"contain"),Ob=Pi(yr,e=>e.show_annotation_text_labels??!0),Nb=async()=>{if(yr.set(v0),!(Pe(Fs)||Pe(Ci))){Ci.set(!0),ji.set(null);try{const{data:e}=await ck();e&&(yr.set(e),Fs.set(!0))}catch(e){ji.set(String(e))}finally{Ci.set(!1)}}},m0=async e=>{Ci.set(!0),ji.set(null);try{const t=Pe(yr),n={setting_id:t.setting_id||"",grid_view_sample_rendering:e.grid_view_sample_rendering||t.grid_view_sample_rendering||"contain",key_hide_annotations:e.key_hide_annotations||t.key_hide_annotations||"v",key_go_back:e.key_go_back||t.key_go_back||"Escape",show_annotation_text_labels:e.show_annotation_text_labels!==void 0?e.show_annotation_text_labels:t.show_annotation_text_labels??!0,created_at:t.created_at||new Date().toISOString(),updated_at:new Date().toISOString()},i=await Nn.POST("/api/settings",{body:n,headers:{"Content-Type":"application/json"}});if(i.error){const s=JSON.stringify(i.error);return console.error("Settings API error:",s),ji.set(s),{success:!1,error:s}}return i.data?(yr.set(i.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(t){const n=String(t);return console.error("Error saving settings:",n),ji.set(n),{success:!1,error:n}}finally{Ci.set(!1)}},qk=async e=>m0({grid_view_sample_rendering:e}),Yk=async e=>{const t=!!e,i={...Pe(yr),show_annotation_text_labels:t};try{const s=await Nn.POST("/api/settings",{body:i,headers:{"Content-Type":"application/json"}});return s.error?(console.error("API error saving setting:",s.error),{success:!1,error:JSON.stringify(s.error)}):s.data?(yr.set(s.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(s){return console.error("Error saving annotation text label setting:",s),{success:!1,error:String(s)}}};function np(){return!Pe(Fs)&&!Pe(Ci)&&Nb(),{settingsStore:yr,isLoadingStore:Ci,errorStore:ji,isLoadedStore:Fs,gridViewSampleRenderingStore:Ib,showAnnotationTextLabelsStore:Ob,initSettings:Nb,saveSettings:m0,updateGridViewSampleRendering:qk,updateShowAnnotationTextLabels:Yk,get settings(){return Pe(yr)},get isLoading(){return Pe(Ci)},get error(){return Pe(ji)},get isLoaded(){return Pe(Fs)},get getGridViewSampleRendering(){return Pe(Ib)},get getShowAnnotationTextLabels(){return Pe(Ob)}}}function Xk(e=100){let t;return n=>{clearTimeout(t),t=setTimeout(n,e)}}function Zk(e=200){let t,n;return(i,s)=>a=>{t&&(Math.abs(a-t)>i?(s.fast(),n!==void 0&&(clearTimeout(n),n=void 0),n=setTimeout(()=>{s.slow(),n=void 0},e)):n===void 0&&s.slow()),t=a}}const cg={ceil:(e,t)=>Math.ceil(e/t)*t,floor:(e,t)=>~~(e/t)*t},Jk=(e,t,n,i,s,a)=>{const l=[],c=cg.floor(a/t*i,i),d=c>s?c-s:0,f=c>0&&d>=0?d:c,g=Math.min(e,cg.ceil((a+n)/t*i,i))+s,v=g<e?g:e;for(let b=f;b<v;b++)l.push(b);return l},Rb=(e,t)=>~~(e/t),Qk=Xk(),jk=Zk();var $k=et("<div><!></div>"),tT=et("<div><!> <div></div> <!></div>");function eT(e,t){ft(t,!0);let n=k(t,"width",3,"100%"),i=k(t,"overScan",3,1),s=k(t,"marginLeft",3,0),a=k(t,"marginTop",3,0),l=k(t,"scrollPosition",15,0),c=k(t,"scrollBehavior",3,"auto"),d=k(t,"getKey",3,st=>st),f=xt(t,["$$slots","$$events","$$legacy","itemCount","itemHeight","itemWidth","height","width","overScan","marginLeft","marginTop","scrollPosition","scrollBehavior","getKey","columnCount","onscroll","header","item","placeholder","footer"]),h=vt(void 0),g=vt(dt(l())),v=vt(0),b=vt(0),_=vt(0),y=vt(dt([])),x=!1,S=!1,I=vt(!1);function T(st,At=c()){D(Rb(st,m(q))*t.itemHeight+a()+m(v),At)}function O(st,At=c()){D(st,At)}const D=(st,At=c())=>{m(h)&&(x=!0,m(h).scrollTo({top:st,behavior:At}),x=!1)},L=st=>{m(h)&&!x&&!S&&(x=!0,m(h).scrollTo({top:st,behavior:c()}),x=!1)},M=st=>{const At=Rb(st,m(q)),kt=st%m(q);return{rowIndex:At,columnIndex:kt,style:`position: absolute; transform: translate3d(${kt*t.itemWidth+s()}px, ${At*t.itemHeight+a()}px, 0px); height: ${t.itemHeight}px; width: ${t.itemWidth}px; will-change: transform;`}},U=st=>{S=!0,x||(rt(g,dt(Math.max(0,st.currentTarget.scrollTop-m(v)))),l(st.currentTarget.scrollTop),m(W)(m(g))),Qk(()=>{S=!1})};let q=N(()=>t.columnCount?t.columnCount:Math.max(~~((m(b)-s()-(m(b)-m(_)))/t.itemWidth),1)),at=N(()=>cg.ceil(t.itemCount,m(q))*t.itemHeight/m(q)),gt=N(()=>m(q)*i());xe(()=>{(m(b)||m(q))&&rt(y,dt(Jk(t.itemCount,t.itemHeight,t.height,m(q),m(gt),m(g))))}),xe(()=>{m(h)&&L(l())});let W=N(()=>jk(t.height,{fast:()=>{rt(I,!0)},slow:()=>{rt(I,!1)}}));var j=tT(),G=st=>{var At;U(st),(At=t.onscroll)==null||At.call(t,st)};let Z;var Q=tt(j);{var ot=st=>{var At=$k(),kt=tt(At);it(kt,()=>t.header),$(At),Wh(At,"offsetHeight",Vt=>rt(v,Vt)),P(st,At)};wt(Q,st=>{t.header&&st(ot)})}var ut=_t(Q,2);let mt;Ei(ut,21,()=>m(y),st=>d()(st),(st,At)=>{var kt=X();const Vt=N(()=>{const{rowIndex:Yt,columnIndex:It,style:Ht}=M(m(At));return{rowIndex:Yt,columnIndex:It,style:Ht}});var Nt=z(kt);{var Bt=Yt=>{var It=X(),Ht=z(It);it(Ht,()=>t.item,()=>({index:m(At),rowIndex:m(Vt).rowIndex,columnIndex:m(Vt).columnIndex,style:m(Vt).style})),P(Yt,It)},ue=Yt=>{var It=X(),Ht=z(It);it(Ht,()=>t.placeholder,()=>({index:m(At),rowIndex:m(Vt).rowIndex,columnIndex:m(Vt).columnIndex,style:m(Vt).style})),P(Yt,It)};wt(Nt,Yt=>{!m(I)||!t.placeholder?Yt(Bt):Yt(ue,!1)})}P(st,kt)}),$(ut);var bt=_t(ut,2);return it(bt,()=>t.footer??St),$(j),rr(j,st=>rt(h,st),()=>m(h)),yt(()=>{Z=Lt(j,Z,{onscroll:G,...f,[Ao]:{position:"relative",overflow:"auto",height:`${t.height??""}px`,width:n()}}),mt=yn(ut,"",mt,{height:`${m(at)??""}px`,width:"100%"})}),Wh(j,"offsetWidth",st=>rt(b,st)),Wh(j,"clientWidth",st=>rt(_,st)),P(e,j),ht({scrollToIndex:T,scrollToPosition:O})}var hr,hn,qi,gr,pi,U_,o6=(U_=class extends fk{constructor(t){super();F(this,gr);F(this,hr);F(this,hn);F(this,qi);this.mutationId=t.mutationId,le(this,hn,t.mutationCache),le(this,hr,[]),this.state=t.state||b0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,hr).includes(t)||(A(this,hr).push(t),this.clearGcTimeout(),A(this,hn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){le(this,hr,A(this,hr).filter(n=>n!==t)),this.scheduleGc(),A(this,hn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,hr).length||(this.state.status==="pending"?this.scheduleGc():A(this,hn).remove(this))}continue(){var t;return((t=A(this,qi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,c,d,f,h,g,v,b,_,y,x,S,I,T,O,D,L,M;le(this,qi,hk({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(U,q)=>{Pt(this,gr,pi).call(this,{type:"failed",failureCount:U,error:q})},onPause:()=>{Pt(this,gr,pi).call(this,{type:"pause"})},onContinue:()=>{Pt(this,gr,pi).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,hn).canRun(this)}));const n=this.state.status==="pending",i=!A(this,qi).canStart();try{if(!n){Pt(this,gr,pi).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=A(this,hn).config).onMutate)==null?void 0:a.call(s,t,this));const q=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));q!==this.state.context&&Pt(this,gr,pi).call(this,{type:"pending",context:q,variables:t,isPaused:i})}const U=await A(this,qi).start();return await((f=(d=A(this,hn).config).onSuccess)==null?void 0:f.call(d,U,t,this.state.context,this)),await((g=(h=this.options).onSuccess)==null?void 0:g.call(h,U,t,this.state.context)),await((b=(v=A(this,hn).config).onSettled)==null?void 0:b.call(v,U,null,this.state.variables,this.state.context,this)),await((y=(_=this.options).onSettled)==null?void 0:y.call(_,U,null,t,this.state.context)),Pt(this,gr,pi).call(this,{type:"success",data:U}),U}catch(U){try{throw await((S=(x=A(this,hn).config).onError)==null?void 0:S.call(x,U,t,this.state.context,this)),await((T=(I=this.options).onError)==null?void 0:T.call(I,U,t,this.state.context)),await((D=(O=A(this,hn).config).onSettled)==null?void 0:D.call(O,void 0,U,this.state.variables,this.state.context,this)),await((M=(L=this.options).onSettled)==null?void 0:M.call(L,void 0,U,t,this.state.context)),U}finally{Pt(this,gr,pi).call(this,{type:"error",error:U})}}finally{A(this,hn).runNext(this)}}},hr=new WeakMap,hn=new WeakMap,qi=new WeakMap,gr=new WeakSet,pi=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),$g.batch(()=>{A(this,hr).forEach(i=>{i.onMutationUpdate(t)}),A(this,hn).notify({mutation:this,type:"updated",action:t})})},U_);function b0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}function Mb(e){return{onFetch:(t,n)=>{var h,g,v,b,_;const i=t.options,s=(v=(g=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,a=((b=t.state.data)==null?void 0:b.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let y=!1;const x=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},S=gk(t.options,t.fetchOptions),I=async(T,O,D)=>{if(y)return Promise.reject();if(O==null&&T.pages.length)return Promise.resolve(T);const L={client:t.client,queryKey:t.queryKey,pageParam:O,direction:D?"backward":"forward",meta:t.options.meta};x(L);const M=await S(L),{maxPages:U}=t.options,q=D?pk:vk;return{pages:q(T.pages,M,U),pageParams:q(T.pageParams,O,U)}};if(s&&a.length){const T=s==="backward",O=T?_0:dg,D={pages:a,pageParams:l},L=O(i,D);c=await I(D,L,T)}else{const T=e??a.length;do{const O=d===0?l[0]??i.initialPageParam:dg(i,c);if(d>0&&O==null)break;c=await I(c,O),d++}while(d<T)}return c};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function dg(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function _0(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}function nT(e,t){return t?dg(e,t)!=null:!1}function rT(e,t){return!t||!e.getPreviousPageParam?!1:_0(e,t)!=null}var iT=class extends mk{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Mb()},t)}getOptimisticResult(e){return e.behavior=Mb(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var _,y;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:a,isError:l,isRefetchError:c}=i,d=(y=(_=n.fetchMeta)==null?void 0:_.fetchMore)==null?void 0:y.direction,f=l&&d==="forward",h=s&&d==="forward",g=l&&d==="backward",v=s&&d==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:nT(t,n.data),hasPreviousPage:rT(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:g,isFetchingPreviousPage:v,isRefetchError:c&&!f&&!g,isRefetching:a&&!h&&!v}}},wi,yi,wn,Vr,Xr,_u,fg,G_,oT=(G_=class extends bk{constructor(n,i){super();F(this,Xr);F(this,wi);F(this,yi);F(this,wn);F(this,Vr);le(this,wi,n),this.setOptions(i),this.bindMethods(),Pt(this,Xr,_u).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const i=this.options;this.options=A(this,wi).defaultMutationOptions(n),_k(this.options,i)||A(this,wi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,wn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Sb(i.mutationKey)!==Sb(this.options.mutationKey)?this.reset():((s=A(this,wn))==null?void 0:s.state.status)==="pending"&&A(this,wn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=A(this,wn))==null||n.removeObserver(this)}onMutationUpdate(n){Pt(this,Xr,_u).call(this),Pt(this,Xr,fg).call(this,n)}getCurrentResult(){return A(this,yi)}reset(){var n;(n=A(this,wn))==null||n.removeObserver(this),le(this,wn,void 0),Pt(this,Xr,_u).call(this),Pt(this,Xr,fg).call(this)}mutate(n,i){var s;return le(this,Vr,i),(s=A(this,wn))==null||s.removeObserver(this),le(this,wn,A(this,wi).getMutationCache().build(A(this,wi),this.options)),A(this,wn).addObserver(this),A(this,wn).execute(n)}},wi=new WeakMap,yi=new WeakMap,wn=new WeakMap,Vr=new WeakMap,Xr=new WeakSet,_u=function(){var i;const n=((i=A(this,wn))==null?void 0:i.state)??b0();le(this,yi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fg=function(n){$g.batch(()=>{var i,s,a,l,c,d,f,h;if(A(this,Vr)&&this.hasListeners()){const g=A(this,yi).variables,v=A(this,yi).context;(n==null?void 0:n.type)==="success"?((s=(i=A(this,Vr)).onSuccess)==null||s.call(i,n.data,g,v),(l=(a=A(this,Vr)).onSettled)==null||l.call(a,n.data,null,g,v)):(n==null?void 0:n.type)==="error"&&((d=(c=A(this,Vr)).onError)==null||d.call(c,n.error,g,v),(h=(f=A(this,Vr)).onSettled)==null||h.call(f,void 0,n.error,g,v))}this.listeners.forEach(g=>{g(A(this,yi))})})},G_);function sT(e,t){return wk(e,iT)}function aT(e,t){const n=tp(),i=yk(e)?e:mb(e),s=new oT(n,Pe(i));let a;i.subscribe(d=>{a=(f,h)=>{s.mutate(f,h).catch(xk)},s.setOptions(d)});const l=mb(s.getCurrentResult(),d=>s.subscribe($g.batchCalls(f=>d(f)))),{subscribe:c}=Pi(l,d=>({...d,mutate:a,mutateAsync:d.mutate}));return{subscribe:c}}const w0=({datasetId:e})=>{const t=aT(Sk());return t.subscribe(()=>{}),{updateAnnotations:i=>new Promise((s,a)=>{Pe(t).mutate({path:{dataset_id:e},body:i},{onSuccess:()=>{s()},onError:l=>{a(l)}})})}};function a6(...e){return e.filter(Boolean).join(" ")}const lT=typeof document<"u";var pr,vr,zr,Do,wu;const Vp=class Vp extends Map{constructor(n){super();F(this,Do);F(this,pr,new Map);F(this,vr,er(0));F(this,zr,er(0));if(n){for(var[i,s]of n)super.set(i,s);A(this,zr).v=super.size}}has(n){var i=A(this,pr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=er(0),i.set(n,s);else return m(A(this,vr)),!1}return m(s),!0}forEach(n,i){Pt(this,Do,wu).call(this),super.forEach(n,i)}get(n){var i=A(this,pr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=er(0),i.set(n,s);else{m(A(this,vr));return}}return m(s),super.get(n)}set(n,i){var g;var s=A(this,pr),a=s.get(n),l=super.get(n),c=super.set(n,i),d=A(this,vr);if(a===void 0)s.set(n,er(0)),rt(A(this,zr),super.size),Co(d);else if(l!==i){Co(a);var f=d.reactions===null?null:new Set(d.reactions),h=f===null||!((g=a.reactions)!=null&&g.every(v=>f.has(v)));h&&Co(d)}return c}delete(n){var i=A(this,pr),s=i.get(n),a=super.delete(n);return s!==void 0&&(i.delete(n),rt(A(this,zr),super.size),rt(s,-1),Co(A(this,vr))),a}clear(){if(super.size!==0){super.clear();var n=A(this,pr);rt(A(this,zr),0);for(var i of n.values())rt(i,-1);Co(A(this,vr)),n.clear()}}keys(){return m(A(this,vr)),super.keys()}values(){return Pt(this,Do,wu).call(this),super.values()}entries(){return Pt(this,Do,wu).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return m(A(this,zr)),super.size}};pr=new WeakMap,vr=new WeakMap,zr=new WeakMap,Do=new WeakSet,wu=function(){m(A(this,vr));var n=A(this,pr);if(A(this,zr).v!==n.size)for(var i of gb(Vp.prototype,this,"keys").call(this))n.has(i)||n.set(i,er(0));for(var[,s]of A(this,pr))m(s)};let hg=Vp,Lb=0;var Qs,js,$s;class uT{constructor(){F(this,Qs,vt(dt([])));F(this,js,vt(dt([])));F(this,$s,t=>{const n=this.toasts.findIndex(i=>i.id===t);return n===-1?null:n});Y(this,"addToast",t=>{lT&&this.toasts.unshift(t)});Y(this,"updateToast",({id:t,data:n,type:i,message:s})=>{const a=this.toasts.findIndex(c=>c.id===t),l=this.toasts[a];this.toasts[a]={...l,...n,id:t,title:s,type:i,updated:!0}});Y(this,"create",t=>{var c;const{message:n,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||t.id&&((c=t.id)==null?void 0:c.length)>0?t.id:Lb++,a=t.dismissable===void 0?!0:t.dismissable,l=t.type===void 0?"default":t.type;return Rn(()=>{this.toasts.find(f=>f.id===s)?this.updateToast({id:s,data:t,type:l,message:n,dismissable:a}):this.addToast({...i,id:s,title:n,dismissable:a,type:l})}),s});Y(this,"dismiss",t=>(Rn(()=>{if(t===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const n=this.toasts.findIndex(i=>i.id===t);this.toasts[n]&&(this.toasts[n]={...this.toasts[n],dismiss:!0})}),t));Y(this,"remove",t=>{if(t===void 0){this.toasts=[];return}const n=A(this,$s).call(this,t);if(n!==null)return this.toasts.splice(n,1),t});Y(this,"message",(t,n)=>this.create({...n,type:"default",message:t}));Y(this,"error",(t,n)=>this.create({...n,type:"error",message:t}));Y(this,"success",(t,n)=>this.create({...n,type:"success",message:t}));Y(this,"info",(t,n)=>this.create({...n,type:"info",message:t}));Y(this,"warning",(t,n)=>this.create({...n,type:"warning",message:t}));Y(this,"loading",(t,n)=>this.create({...n,type:"loading",message:t}));Y(this,"promise",(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:typeof n.loading=="string"?n.loading:n.loading()}));const s=t instanceof Promise?t:t();let a=i!==void 0;return s.then(l=>{if(typeof l=="object"&&l&&"ok"in l&&typeof l.ok=="boolean"&&!l.ok){a=!1;const c=cT(l);this.create({id:i,type:"error",message:c})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?n.success(l):n.success;this.create({id:i,type:"success",message:c})}}).catch(l=>{if(n.error!==void 0){a=!1;const c=typeof n.error=="function"?n.error(l):n.error;this.create({id:i,type:"error",message:c})}}).finally(()=>{var l;a&&(this.dismiss(i),i=void 0),(l=n.finally)==null||l.call(n)}),i});Y(this,"custom",(t,n)=>{const i=(n==null?void 0:n.id)||Lb++;return this.create({component:t,id:i,...n}),i});Y(this,"removeHeight",t=>{this.heights=this.heights.filter(n=>n.toastId!==t)});Y(this,"setHeight",t=>{const n=A(this,$s).call(this,t.toastId);if(n===null){this.heights.push(t);return}this.heights[n]=t});Y(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return m(A(this,Qs))}set toasts(t){rt(A(this,Qs),dt(t))}get heights(){return m(A(this,js))}set heights(t){rt(A(this,js),dt(t))}}Qs=new WeakMap,js=new WeakMap,$s=new WeakMap;function cT(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const qn=new uT;function dT(e,t){return qn.create({message:e,...t})}var Zu;class l6{constructor(){F(this,Zu,N(()=>qn.toasts.filter(t=>!t.dismiss)))}get toasts(){return m(A(this,Zu))}}Zu=new WeakMap;const fT=dT,Ou=Object.assign(fT,{success:qn.success,info:qn.info,warning:qn.warning,error:qn.error,custom:qn.custom,message:qn.message,promise:qn.promise,dismiss:qn.dismiss,loading:qn.loading,getActiveToasts:()=>qn.toasts.filter(e=>!e.dismiss)}),hT=(...e)=>{const t=Ak(...e),n=Ee(!1),i=sT({...t,getNextPageParam:d=>d.nextCursor||void 0}),s=tp(),a=()=>{s.invalidateQueries({queryKey:t.queryKey})},l=e[0].path.dataset_id,{updateAnnotations:c}=w0({datasetId:l});return{annotations:i,refresh:a,isPending:n,updateAnnotations:async d=>{try{n.set(!0),await c(d),a(),Ou.success("Annotations updated successfully")}catch(f){Ou.error("Failed to update annotations:"+f.message)}finally{n.set(!1)}}}};var gT=et('<div role="status"><svg aria-hidden="true" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg> <span class="sr-only">Loading...</span></div>');function pT(e,t){const n=k(t,"size",3,"medium"),i=k(t,"align",3,"center"),s={small:"h-4 w-4",medium:"h-6 w-6",large:"h-8 w-8"},a={left:"text-start",center:"text-center",right:"text-end"};var l=gT(),c=tt(l);we(2),$(l),yt(()=>Xn(c,0,s[n()]+" "+a[i()]+" spinner inline animate-spin text-gray-200 dark:text-gray-600","svelte-18zpdab")),P(e,l)}/**
4
- * @license @lucide/svelte v0.482.0 - ISC
5
- *
6
- * ISC License
7
- *
8
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
9
- *
10
- * Permission to use, copy, modify, and/or distribute this software for any
11
- * purpose with or without fee is hereby granted, provided that the above
12
- * copyright notice and this permission notice appear in all copies.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21
- *
22
- */const vT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var mT=sl("<svg><!><!></svg>");function Ln(e,t){ft(t,!0);const n=k(t,"color",3,"currentColor"),i=k(t,"size",3,24),s=k(t,"strokeWidth",3,2),a=k(t,"absoluteStrokeWidth",3,!1),l=k(t,"iconNode",19,()=>[]),c=xt(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),d=$r(),[f,h]=d;var g=mT();let v;var b=tt(g);Ei(b,17,l,ff,(y,x)=>{let S=()=>m(x)[0],I=()=>m(x)[1];var T=X(),O=z(T);Ok(O,S,!0,(D,L)=>{let M;yt(U=>M=Lt(D,M,{...U}),[()=>`${S()}`=="button"?h({...I()},[{attribute_name:"formaction"}]):`${S()}`=="form"?h({...I()},[{attribute_name:"action"}]):`${S()}`=="a"?h({...I()},[{attribute_name:"href",lang_attribute_name:"hreflang"}]):{...I()}])}),P(y,T)});var _=_t(b);it(_,()=>t.children??St),$(g),yt(y=>v=Lt(g,v,{...vT,...c,width:i(),height:i(),stroke:n(),"stroke-width":y,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>a()?Number(s())*24/Number(i()):s()]),P(e,g),ht()}function rp(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"check"},()=>n,{iconNode:[["path",{d:"M20 6 9 17l-5-5"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}/**
23
- * @license @lucide/svelte v0.482.0 - ISC
24
- *
25
- * ISC License
26
- *
27
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
28
- *
29
- * Permission to use, copy, modify, and/or distribute this software for any
30
- * purpose with or without fee is hereby granted, provided that the above
31
- * copyright notice and this permission notice appear in all copies.
32
- *
33
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
34
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
35
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
38
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
39
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40
- *
41
- */const bT=Object.freeze(Object.defineProperty({__proto__:null,default:rp},Symbol.toStringTag,{value:"Module"}));function _T(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"chevrons-up-down"},()=>n,{iconNode:[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function wT(e){return typeof e=="function"}function yT(e){return e!==null&&typeof e=="object"}const xT=["string","number","bigint","boolean"];function gg(e){return e==null||xT.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>gg(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Hs=Symbol("box"),ip=Symbol("is-writable");function ST(e){return yT(e)&&Hs in e}function AT(e){return B.isBox(e)&&ip in e}function B(e){let t=vt(dt(e));return{[Hs]:!0,[ip]:!0,get current(){return m(t)},set current(n){rt(t,dt(n))}}}function CT(e,t){const n=N(e);return t?{[Hs]:!0,[ip]:!0,get current(){return m(n)},set current(i){t(i)}}:{[Hs]:!0,get current(){return e()}}}function PT(e){return B.isBox(e)?e:wT(e)?B.with(e):B(e)}function ET(e){return Object.entries(e).reduce((t,[n,i])=>B.isBox(i)?(B.isWritableBox(i)?Object.defineProperty(t,n,{get(){return i.current},set(s){i.current=s}}):Object.defineProperty(t,n,{get(){return i.current}}),t):Object.assign(t,{[n]:i}),{})}function kT(e){return B.isWritableBox(e)?{[Hs]:!0,get current(){return e.current}}:e}B.from=PT;B.with=CT;B.flatten=ET;B.readonly=kT;B.isBox=ST;B.isWritableBox=AT;function y0(...e){return function(t){var n;for(const i of e)if(i){if(t.defaultPrevented)return;typeof i=="function"?i.call(this,t):(n=i.current)==null||n.call(this,t)}}}var br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function x0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S0={},Db=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,TT=/\n/g,IT=/^\s*/,OT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,NT=/^:\s*/,RT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,MT=/^[;\s]*/,LT=/^\s+|\s+$/g,DT=`
42
- `,Fb="/",Bb="*",Ui="",FT="comment",BT="declaration",VT=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function s(_){var y=_.match(TT);y&&(n+=y.length);var x=_.lastIndexOf(DT);i=~x?_.length-x:i+_.length}function a(){var _={line:n,column:i};return function(y){return y.position=new l(_),f(),y}}function l(_){this.start=_,this.end={line:n,column:i},this.source=t.source}l.prototype.content=e;function c(_){var y=new Error(t.source+":"+n+":"+i+": "+_);if(y.reason=_,y.filename=t.source,y.line=n,y.column=i,y.source=e,!t.silent)throw y}function d(_){var y=_.exec(e);if(y){var x=y[0];return s(x),e=e.slice(x.length),y}}function f(){d(IT)}function h(_){var y;for(_=_||[];y=g();)y!==!1&&_.push(y);return _}function g(){var _=a();if(!(Fb!=e.charAt(0)||Bb!=e.charAt(1))){for(var y=2;Ui!=e.charAt(y)&&(Bb!=e.charAt(y)||Fb!=e.charAt(y+1));)++y;if(y+=2,Ui===e.charAt(y-1))return c("End of comment missing");var x=e.slice(2,y-2);return i+=2,s(x),e=e.slice(y),i+=2,_({type:FT,comment:x})}}function v(){var _=a(),y=d(OT);if(y){if(g(),!d(NT))return c("property missing ':'");var x=d(RT),S=_({type:BT,property:Vb(y[0].replace(Db,Ui)),value:x?Vb(x[0].replace(Db,Ui)):Ui});return d(MT),S}}function b(){var _=[];h(_);for(var y;y=v();)y!==!1&&(_.push(y),h(_));return _}return f(),b()};function Vb(e){return e?e.replace(LT,Ui):Ui}var zT=br&&br.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(S0,"__esModule",{value:!0});var zb=S0.default=HT,WT=zT(VT);function HT(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,WT.default)(e),s=typeof t=="function";return i.forEach(function(a){if(a.type==="declaration"){var l=a.property,c=a.value;s?t(l,c,a):c&&(n=n||{},n[l]=c)}}),n}const UT=zb.default||zb,GT=/\d/,KT=["-","_","/","."];function qT(e=""){if(!GT.test(e))return e!==e.toLowerCase()}function YT(e){const t=[];let n="",i,s;for(const a of e){const l=KT.includes(a);if(l===!0){t.push(n),n="",i=void 0;continue}const c=qT(a);if(s===!1){if(i===!1&&c===!0){t.push(n),n=a,i=c;continue}if(i===!0&&c===!1&&n.length>1){const d=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=d+a,i=c;continue}}n+=a,i=c,s=l}return t.push(n),t}function A0(e){return e?YT(e).map(t=>ZT(t)).join(""):""}function XT(e){return JT(A0(e||""))}function ZT(e){return e?e[0].toUpperCase()+e.slice(1):""}function JT(e){return e?e[0].toLowerCase()+e.slice(1):""}function Ts(e){if(!e)return{};const t={};function n(i,s){if(i.startsWith("-moz-")||i.startsWith("-webkit-")||i.startsWith("-ms-")||i.startsWith("-o-")){t[A0(i)]=s;return}if(i.startsWith("--")){t[i]=s;return}t[XT(i)]=s}return UT(e,n),t}function qr(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function QT(e,t){const n=RegExp(e,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(n)?i.replace(n,t):i}}const jT=QT(/[A-Z]/,e=>`-${e.toLowerCase()}`);function $T(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${jT(t)}: ${e[t]};`).join(`
43
- `)}function op(e={}){return $T(e).replace(`
44
- `," ")}const C0={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%)"},tI=op(C0);function eI(e){var t;return e.length>2&&e.startsWith("on")&&e[2]===((t=e[2])==null?void 0:t.toLowerCase())}function Wt(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const i=e[n];for(const s in i){const a=t[s],l=i[s],c=typeof a=="function",d=typeof l=="function";if(c&&eI(s)){const f=a,h=l;t[s]=y0(f,h)}else if(c&&d)t[s]=qr(a,l);else if(s==="class"){const f=gg(a),h=gg(l);f&&h?t[s]=Ds(a,l):f?t[s]=Ds(a):h&&(t[s]=Ds(l))}else if(s==="style"){const f=typeof a=="object",h=typeof l=="object",g=typeof a=="string",v=typeof l=="string";if(f&&h)t[s]={...a,...l};else if(f&&v){const b=Ts(l);t[s]={...a,...b}}else if(g&&h){const b=Ts(a);t[s]={...b,...l}}else if(g&&v){const b=Ts(a),_=Ts(l);t[s]={...b,..._}}else f?t[s]=a:h?t[s]=l:g?t[s]=a:v&&(t[s]=l)}else t[s]=l!==void 0?l:a}}return typeof t.style=="object"&&(t.style=op(t.style).replaceAll(`
45
- `," ")),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}const P0=typeof window<"u"?window:void 0;function nI(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var Fo,ta;class rI{constructor(t={}){F(this,Fo);F(this,ta);const{window:n=P0,document:i=n==null?void 0:n.document}=t;n!==void 0&&(le(this,Fo,i),le(this,ta,Wk(s=>{const a=Re(n,"focusin",s),l=Re(n,"focusout",s);return()=>{a(),l()}})))}get current(){var t;return(t=A(this,ta))==null||t.call(this),A(this,Fo)?nI(A(this,Fo)):null}}Fo=new WeakMap,ta=new WeakMap;new rI;function iI(e){return typeof e=="function"}function oI(e,t){switch(e){case"post":xe(t);break;case"pre":df(t);break}}function E0(e,t,n,i={}){const{lazy:s=!1}=i;let a=!s,l=Array.isArray(e)?[]:void 0;oI(t,()=>{const c=Array.isArray(e)?e.map(f=>f()):e();if(!a){a=!0,l=c;return}const d=Rn(()=>n(c,l));return l=c,d})}function ie(e,t,n){E0(e,"post",t,n)}function sI(e,t,n){E0(e,"pre",t,n)}ie.pre=sI;function aI(e){return iI(e)?e():e}var Wr;class lI{constructor(t,n={box:"border-box"}){F(this,Wr,vt(dt({width:0,height:0})));var s,a;const i=n.window??P0;A(this,Wr).v=dt({width:((s=n.initialSize)==null?void 0:s.width)??0,height:((a=n.initialSize)==null?void 0:a.height)??0}),xe(()=>{if(!i)return;const l=aI(t);if(!l)return;const c=new i.ResizeObserver(d=>{for(const f of d){const h=n.box==="content-box"?f.contentBoxSize:f.borderBoxSize,g=Array.isArray(h)?h:[h];m(A(this,Wr)).width=g.reduce((v,b)=>Math.max(v,b.inlineSize),0),m(A(this,Wr)).height=g.reduce((v,b)=>Math.max(v,b.blockSize),0)}});return c.observe(l),()=>{c.disconnect()}})}get current(){return m(A(this,Wr))}get width(){return m(A(this,Wr)).width}get height(){return m(A(this,Wr)).height}}Wr=new WeakMap;var ea,na;class k0{constructor(t){F(this,ea,vt(void 0));F(this,na);xe(()=>{rt(A(this,ea),dt(A(this,na))),le(this,na,t())})}get current(){return m(A(this,ea))}}ea=new WeakMap,na=new WeakMap;var ra,Hr;class sn{constructor(t){F(this,ra);F(this,Hr);le(this,ra,t),le(this,Hr,Symbol(t))}get key(){return A(this,Hr)}exists(){return qE(A(this,Hr))}get(){const t=ag(A(this,Hr));if(t===void 0)throw new Error(`Context "${A(this,ra)}" not found`);return t}getOr(t){const n=ag(A(this,Hr));return n===void 0?t:n}set(t){return t0(A(this,Hr),t)}}ra=new WeakMap,Hr=new WeakMap;function sp(e){xe(()=>()=>{e()})}function $t({id:e,ref:t,deps:n=()=>!0,onRefChange:i,getRootNode:s}){ie([()=>e.current,n],([a])=>{const l=(s==null?void 0:s())??document,c=l==null?void 0:l.getElementById(a);c?t.current=c:t.current=null,i==null||i(t.current)}),sp(()=>{t.current=null,i==null||i(null)})}function al(e,t){return setTimeout(t,e)}function In(e){Jg().then(e)}function ap(e){xe(()=>Rn(()=>e()))}function Ni(e){return e?"open":"closed"}function uI(e){return e?"checked":"unchecked"}function lp(e){return e?"true":"false"}function ll(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function T0(e){return e?"true":"false"}function cI(e){return e?"true":"false"}function I0(e,t){return t?"mixed":e?"true":"false"}function u6(e){return e}function dI(e){return e?"true":void 0}function c6(e){return e}function fI(e){return e?"":void 0}function hI(e){return e?"":void 0}function d6(e){return e?!0:void 0}function O0(e){return e?!0:void 0}function gI(e){return e?!0:void 0}const Ai="ArrowDown",N0="ArrowLeft",R0="ArrowRight",Kr="ArrowUp",ul="End",Zr="Enter",pI="Escape",cl="Home",M0="PageDown",L0="PageUp",Yr=" ",pg="Tab",vI="p",mI="n",bI="j",_I="k",up=typeof document<"u",vg=wI();function wI(){var e,t;return up&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function mg(e){return e instanceof HTMLElement}function D0(e){return e instanceof Element}function F0(e){return e instanceof Element||e instanceof SVGElement}function yI(e){return e!==null}function xI(e){return e instanceof HTMLInputElement&&"select"in e}function SI(e,t){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function te(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function ne(){}function AI(e,t){const n=B(e);function i(a){return t[n.current][a]??n.current}return{state:n,dispatch:a=>{n.current=i(a)}}}function CI(e,t){let n=vt(dt({})),i=vt("none");const s=e.current?"mounted":"unmounted";let a=vt(null);const l=new k0(()=>e.current);ie([()=>t.current,()=>e.current],([v,b])=>{!v||!b||In(()=>{rt(a,dt(document.getElementById(v)))})});const{state:c,dispatch:d}=AI(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ie(()=>e.current,v=>{if(m(a)||rt(a,dt(document.getElementById(t.current))),!m(a)||!(v!==l.current))return;const _=m(i),y=au(m(a));v?d("MOUNT"):y==="none"||m(n).display==="none"?d("UNMOUNT"):d(l&&_!==y?"ANIMATION_OUT":"UNMOUNT")});function f(v){if(m(a)||rt(a,dt(document.getElementById(t.current))),!m(a))return;const b=au(m(a)),_=b.includes(v.animationName)||b==="none";v.target===m(a)&&_&&d("ANIMATION_END")}function h(v){m(a)||rt(a,dt(document.getElementById(t.current))),m(a)&&v.target===m(a)&&rt(i,dt(au(m(a))))}ie(()=>c.current,()=>{if(m(a)||rt(a,dt(document.getElementById(t.current))),!m(a))return;const v=au(m(a));rt(i,dt(c.current==="mounted"?v:"none"))}),ie(()=>m(a),v=>{if(v)return rt(n,dt(getComputedStyle(v))),qr(Re(v,"animationstart",h),Re(v,"animationcancel",f),Re(v,"animationend",f))});const g=N(()=>["mounted","unmountSuspended"].includes(c.current));return{get current(){return m(g)}}}function au(e){return e&&getComputedStyle(e).animationName||"none"}function hf(e,t){ft(t,!0);const n=CI(B.with(()=>t.present),B.with(()=>t.id));var i=X(),s=z(i);{var a=l=>{var c=X(),d=z(c);it(d,()=>t.presence??St,()=>({present:n})),P(l,c)};wt(s,l=>{(t.forceMount||t.present||n.current)&&l(a)})}P(e,i),ht()}function PI(e){return{content:`data-${e}-content`,trigger:`data-${e}-trigger`,overlay:`data-${e}-overlay`,title:`data-${e}-title`,description:`data-${e}-description`,close:`data-${e}-close`,cancel:`data-${e}-cancel`,action:`data-${e}-action`}}var ia,oa,sa,aa,la,ua,ca,da,Ju,Qu;class EI{constructor(t){Y(this,"opts");F(this,ia,vt(null));F(this,oa,vt(null));F(this,sa,vt(null));F(this,aa,vt(void 0));F(this,la,vt(void 0));F(this,ua,vt(void 0));F(this,ca,vt(void 0));F(this,da,vt(null));F(this,Ju,N(()=>PI(this.opts.variant.current)));F(this,Qu,N(()=>({"data-state":Ni(this.opts.open.current)})));this.opts=t,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return m(A(this,ia))}set triggerNode(t){rt(A(this,ia),dt(t))}get contentNode(){return m(A(this,oa))}set contentNode(t){rt(A(this,oa),dt(t))}get descriptionNode(){return m(A(this,sa))}set descriptionNode(t){rt(A(this,sa),dt(t))}get contentId(){return m(A(this,aa))}set contentId(t){rt(A(this,aa),dt(t))}get titleId(){return m(A(this,la))}set titleId(t){rt(A(this,la),dt(t))}get triggerId(){return m(A(this,ua))}set triggerId(t){rt(A(this,ua),dt(t))}get descriptionId(){return m(A(this,ca))}set descriptionId(t){rt(A(this,ca),dt(t))}get cancelNode(){return m(A(this,da))}set cancelNode(t){rt(A(this,da),dt(t))}get attrs(){return m(A(this,Ju))}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return m(A(this,Qu))}}ia=new WeakMap,oa=new WeakMap,sa=new WeakMap,aa=new WeakMap,la=new WeakMap,ua=new WeakMap,ca=new WeakMap,da=new WeakMap,Ju=new WeakMap,Qu=new WeakMap;var ju;class kI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,ju,N(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ll(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.attrs.trigger]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps})));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.triggerNode=i,this.root.triggerId=i==null?void 0:i.id}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Yr||t.key===Zr)&&(t.preventDefault(),this.root.handleOpen())}get props(){return m(A(this,ju))}}ju=new WeakMap;var $u,tc;class TI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,$u,N(()=>this.root.attrs[this.opts.variant.current]));F(this,tc,N(()=>({id:this.opts.id.current,[m(A(this,$u))]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps})));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),$t({...t,deps:()=>this.root.opts.open.current})}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Yr||t.key===Zr)&&(t.preventDefault(),this.root.handleClose())}get props(){return m(A(this,tc))}}$u=new WeakMap,tc=new WeakMap;var ec;class II{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,ec,N(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps})));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.titleId=i==null?void 0:i.id},deps:()=>this.root.opts.open.current})}get props(){return m(A(this,ec))}}ec=new WeakMap;var nc;class OI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,nc,N(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=t,this.root=n,$t({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.descriptionNode=i,this.root.descriptionId=i==null?void 0:i.id}})}get props(){return m(A(this,nc))}}nc=new WeakMap;var rc,ic;class NI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,rc,N(()=>({open:this.root.opts.open.current})));F(this,ic,N(()=>({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.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps})));this.opts=t,this.root=n,$t({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i,this.root.contentId=i==null?void 0:i.id}})}get snippetProps(){return m(A(this,rc))}get props(){return m(A(this,ic))}}rc=new WeakMap,ic=new WeakMap;var oc,sc;class RI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,oc,N(()=>({open:this.root.opts.open.current})));F(this,sc,N(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=t,this.root=n,$t({...t,deps:()=>this.root.opts.open.current})}get snippetProps(){return m(A(this,oc))}get props(){return m(A(this,sc))}}oc=new WeakMap,sc=new WeakMap;const oo=new sn("Dialog.Root");function MI(e){return oo.set(new EI(e))}function LI(e){return new kI(e,oo.get())}function DI(e){return new II(e,oo.get())}function FI(e){return new NI(e,oo.get())}function BI(e){return new RI(e,oo.get())}function VI(e){return new OI(e,oo.get())}function zI(e){return new TI(e,oo.get())}var WI=et("<div><!></div>");function HI(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"level",3,2),a=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const l=DI({id:B.with(()=>n()),level:B.with(()=>s()),ref:B.with(()=>i(),v=>i(v))}),c=N(()=>Wt(a,l.props));var d=X(),f=z(d);{var h=v=>{var b=X(),_=z(b);it(_,()=>t.child,()=>({props:m(c)})),P(v,b)},g=v=>{var b=WI();let _;var y=tt(b);it(y,()=>t.children??St),$(b),yt(()=>_=Lt(b,_,{...m(c)})),P(v,b)};wt(f,v=>{t.child?v(h):v(g,!1)})}P(e,d),ht()}function UI(e,t){var n=X(),i=z(n);Ws(i,()=>t.children,s=>{var a=X(),l=z(a);it(l,()=>t.children??St),P(s,a)}),P(e,n)}function dl(e,t){ft(t,!0);let n=k(t,"to",3,"body");const i=YE();let s=N(a);function a(){if(!up||t.disabled)return null;let g=null;return typeof n()=="string"?g=document.querySelector(n()):(n()instanceof HTMLElement||n()instanceof DocumentFragment)&&(g=n()),g}let l;function c(){l&&(ek(l),l=null)}ie([()=>m(s),()=>t.disabled],([g,v])=>{if(!g||v){c();return}return l=tk(UI,{target:g,props:{children:t.children},context:i}),()=>{c()}});var d=X(),f=z(d);{var h=g=>{var v=X(),b=z(v);it(b,()=>t.children??St),P(g,v)};wt(f,g=>{t.disabled&&g(h)})}P(e,d),ht()}function B0(e,t,n,i){const s=Array.isArray(t)?t:[t];return s.forEach(a=>e.addEventListener(a,n,i)),()=>{s.forEach(a=>e.removeEventListener(a,n,i))}}class V0{constructor(t,n={bubbles:!0,cancelable:!0}){Y(this,"eventName");Y(this,"options");this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const i=this.createEvent(n);return t.dispatchEvent(i),i}listen(t,n,i){const s=a=>{n(a)};return Re(t,this.eventName,s,i)}}function Wb(e,t=500){let n=null;const i=(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)};return i.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},i}function cp(e,t){return e===t||e.contains(t)}function z0(e){return(e==null?void 0:e.ownerDocument)??document}function GI(e){if(!e)return null;for(const t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function KI(e,t){const{clientX:n,clientY:i}=e,s=t.getBoundingClientRect();return n<s.left||n>s.right||i<s.top||i>s.bottom}globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var Bo,Yi,xi,Vo,zo,Si,fa,ha,Ur,ac,jo,W0,lc,Wo,uc,cc,dc,fc,ga,H0,hc,gc;class qI{constructor(t){F(this,jo);Y(this,"opts");F(this,Bo);F(this,Yi);F(this,xi,{pointerdown:!1});F(this,Vo,!1);F(this,zo,!1);Y(this,"node",B(null));F(this,Si);F(this,fa);F(this,ha,vt(null));F(this,Ur,ne);F(this,ac,t=>{t.defaultPrevented||this.currNode&&In(()=>{var n,i;!this.currNode||A(this,fc).call(this,t.target)||t.target&&!A(this,zo)&&((i=(n=A(this,fa)).current)==null||i.call(n,t))})});F(this,lc,t=>{let n=t;n.defaultPrevented&&(n=Hb(t)),A(this,Bo).current(t)});F(this,Wo,Wb(t=>{if(!this.currNode){A(this,Ur).call(this);return}const n=this.opts.isValidEvent.current(t,this.currNode)||JI(t,this.currNode);if(!A(this,Vo)||Pt(this,jo,H0).call(this)||!n){A(this,Ur).call(this);return}let i=t;if(i.defaultPrevented&&(i=Hb(i)),A(this,Yi).current!=="close"&&A(this,Yi).current!=="defer-otherwise-close"){A(this,Ur).call(this);return}t.pointerType==="touch"?(A(this,Ur).call(this),le(this,Ur,B0(A(this,Si),"click",A(this,lc),{once:!0}))):A(this,Bo).current(i)},10));F(this,uc,t=>{A(this,xi)[t.type]=!0});F(this,cc,t=>{A(this,xi)[t.type]=!1});F(this,dc,()=>{this.node.current&&le(this,Vo,ZI(this.node.current))});F(this,fc,t=>this.node.current?cp(this.node.current,t):!1);F(this,ga,Wb(()=>{for(const t in A(this,xi))A(this,xi)[t]=!1;le(this,Vo,!1)},20));F(this,hc,()=>{le(this,zo,!0)});F(this,gc,()=>{le(this,zo,!1)});Y(this,"props",{onfocuscapture:A(this,hc),onblurcapture:A(this,gc)});this.opts=t,$t({id:t.id,ref:this.node,deps:()=>t.enabled.current,onRefChange:s=>{this.currNode=s}}),le(this,Yi,t.interactOutsideBehavior),le(this,Bo,t.onInteractOutside),le(this,fa,t.onFocusOutside),xe(()=>{le(this,Si,z0(this.currNode))});let n=ne;const i=()=>{A(this,ga).call(this),globalThis.bitsDismissableLayers.delete(this),A(this,Wo).destroy(),n()};ie([()=>this.opts.enabled.current,()=>this.currNode],([s,a])=>{if(!(!s||!a))return al(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,A(this,Yi)),n(),n=Pt(this,jo,W0).call(this))}),i}),sp(()=>{A(this,ga).destroy(),globalThis.bitsDismissableLayers.delete(this),A(this,Wo).destroy(),A(this,Ur).call(this),n()})}get currNode(){return m(A(this,ha))}set currNode(t){rt(A(this,ha),dt(t))}}Bo=new WeakMap,Yi=new WeakMap,xi=new WeakMap,Vo=new WeakMap,zo=new WeakMap,Si=new WeakMap,fa=new WeakMap,ha=new WeakMap,Ur=new WeakMap,ac=new WeakMap,jo=new WeakSet,W0=function(){return qr(Re(A(this,Si),"pointerdown",qr(A(this,uc),A(this,dc)),{capture:!0}),Re(A(this,Si),"pointerdown",qr(A(this,cc),A(this,Wo))),Re(A(this,Si),"focusin",A(this,ac)))},lc=new WeakMap,Wo=new WeakMap,uc=new WeakMap,cc=new WeakMap,dc=new WeakMap,fc=new WeakMap,ga=new WeakMap,H0=function(){return Object.values(A(this,xi)).some(Boolean)},hc=new WeakMap,gc=new WeakMap;function YI(e){return new qI(e)}function XI(e){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function ZI(e){const t=[...globalThis.bitsDismissableLayers],n=XI(t);if(n)return n[0].node.current===e;const[i]=t[0];return i.node.current===e}function JI(e,t){if("button"in e&&e.button>0)return!1;const n=e.target;return D0(n)?z0(n).documentElement.contains(n)&&!cp(t,n)&&KI(e,t):!1}function Hb(e){const t=e.currentTarget,n=e.target;let i;e instanceof PointerEvent?i=new PointerEvent(e.type,e):i=new PointerEvent("pointerdown",e);let s=!1;return new Proxy(i,{get:(l,c)=>c==="currentTarget"?t:c==="target"?n:c==="preventDefault"?()=>{s=!0,typeof l.preventDefault=="function"&&l.preventDefault()}:c==="defaultPrevented"?s:c in l?l[c]:e[c]})}function U0(e,t){ft(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"onInteractOutside",3,ne),s=k(t,"onFocusOutside",3,ne),a=k(t,"isValidEvent",3,()=>!1);const l=YI({id:B.with(()=>t.id),interactOutsideBehavior:B.with(()=>n()),onInteractOutside:B.with(()=>i()),enabled:B.with(()=>t.enabled),onFocusOutside:B.with(()=>s()),isValidEvent:B.with(()=>a())});var c=X(),d=z(c);it(d,()=>t.children??St,()=>({props:l.props})),P(e,c),ht()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var pc,vc;class QI{constructor(t){Y(this,"opts");F(this,pc,()=>Re(document,"keydown",A(this,vc),{passive:!1}));F(this,vc,t=>{if(t.key!==pI||!$I(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const i=this.opts.escapeKeydownBehavior.current;i!=="close"&&i!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)});this.opts=t;let n=ne;ie(()=>t.enabled.current,i=>(i&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=A(this,pc).call(this)),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}}pc=new WeakMap,vc=new WeakMap;function jI(e){return new QI(e)}function $I(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([s,{current:a}])=>a==="close"||a==="ignore");if(n)return n[0]===e;const[i]=t[0];return i===e}function G0(e,t){ft(t,!0);let n=k(t,"escapeKeydownBehavior",3,"close"),i=k(t,"onEscapeKeydown",3,ne);jI({escapeKeydownBehavior:B.with(()=>n()),onEscapeKeydown:B.with(()=>i()),enabled:B.with(()=>t.enabled)});var s=X(),a=z(s);it(a,()=>t.children??St),P(e,s),ht()}const ci=B([]);function tO(){return{add(e){const t=ci.current[0];t&&e.id!==t.id&&t.pause(),ci.current=Ub(ci.current,e),ci.current.unshift(e)},remove(e){var t;ci.current=Ub(ci.current,e),(t=ci.current[0])==null||t.resume()},get current(){return ci.current}}}function eO(){let e=vt(!1),t=vt(!1);return{id:te(),get paused(){return m(e)},get isHandlingFocus(){return m(t)},set isHandlingFocus(n){rt(t,dt(n))},pause(){rt(e,!0)},resume(){rt(e,!1)}}}function Ub(e,t){return[...e].filter(n=>n.id!==t.id)}function nO(e){return e.filter(t=>t.tagName!=="A")}function vi(e,{select:t=!1}={}){if(!(e&&e.focus)||document.activeElement===e)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xI(e)&&t&&e.select()}function rO(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(vi(i,{select:t}),document.activeElement!==n)return!0}function Gb(e,t){for(const n of e)if(!SI(n,t))return n}function K0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iO(e){const t=K0(e),n=Gb(t,e),i=Gb(t.reverse(),e);return[n,i]}/*!
46
- * tabbable 6.2.0
47
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
48
- */var oO=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],sO=oO.join(","),q0=typeof Element>"u",Nu=q0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ru=!q0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},aO=function e(t,n){var i;n===void 0&&(n=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&e(t.parentNode);return l},lO=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},uO=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},cO=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||lO(t))&&!uO(t)?0:t.tabIndex},Y0=function(t){return t.tagName==="INPUT"},dO=function(t){return Y0(t)&&t.type==="hidden"},fO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},hO=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},gO=function(t){if(!t.name)return!0;var n=t.form||Ru(t),i=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=hO(s,t.form);return!a||a===t},pO=function(t){return Y0(t)&&t.type==="radio"},vO=function(t){return pO(t)&&!gO(t)},mO=function(t){var n,i=t&&Ru(t),s=(n=i)===null||n===void 0?void 0:n.host,a=!1;if(i&&i!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,g;i=Ru(s),s=(f=i)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(g=h.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return a},Kb=function(t){var n=t.getBoundingClientRect(),i=n.width,s=n.height;return i===0&&s===0},bO=function(t,n){var i=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Nu.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(Nu.call(l,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var d=t.parentElement,f=Ru(t);if(d&&!d.shadowRoot&&s(d)===!0)return Kb(t);t.assignedSlot?t=t.assignedSlot:!d&&f!==t.ownerDocument?t=f.host:t=d}t=c}if(mO(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Kb(t);return!1},_O=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var s=n.children.item(i);if(s.tagName==="LEGEND")return Nu.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},wO=function(t,n){return!(n.disabled||aO(n)||dO(n)||bO(n,t)||fO(n)||_O(n))},yO=function(t,n){return!(vO(n)||cO(n)<0||!wO(t,n))},xO=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Nu.call(t,sO)===!1?!1:yO(n,t)};const SO=new V0("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),AO=new V0("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),CO=new sn("FocusScope");function PO({id:e,loop:t,enabled:n,onOpenAutoFocus:i,onCloseAutoFocus:s,forceMount:a}){const l=tO(),c=eO(),d=B(null),f=CO.getOr({ignoreCloseAutoFocus:!1});let h=null;$t({id:e,ref:d,deps:()=>n.current});function g(S){if(!(c.paused||!d.current||c.isHandlingFocus)){c.isHandlingFocus=!0;try{const I=S.target;if(!mg(I))return;const T=d.current.contains(I);if(S.type==="focusin")if(T)h=I;else{if(f.ignoreCloseAutoFocus)return;vi(h,{select:!0})}else S.type==="focusout"&&!T&&!f.ignoreCloseAutoFocus&&vi(h,{select:!0})}finally{c.isHandlingFocus=!1}}}function v(S){if(!h||!d.current)return;let I=!1;for(const T of S){if(T.type==="childList"&&T.removedNodes.length>0)for(const O of T.removedNodes){if(O===h){I=!0;break}if(O.nodeType===Node.ELEMENT_NODE&&O.contains(h)){I=!0;break}}if(I)break}I&&d.current&&!d.current.contains(document.activeElement)&&vi(d.current)}ie([()=>d.current,()=>n.current],([S,I])=>{if(!S||!I)return;const T=qr(Re(document,"focusin",g),Re(document,"focusout",g)),O=new MutationObserver(v);return O.observe(S,{childList:!0,subtree:!0,attributes:!1}),()=>{T(),O.disconnect()}}),ie([()=>a.current,()=>d.current],([S,I])=>{if(S)return;const T=document.activeElement;return b(I,T),()=>{I&&_(T)}}),ie([()=>a.current,()=>d.current,()=>n.current],([S,I])=>{if(!S)return;const T=document.activeElement;return b(I,T),()=>{I&&_(T)}});function b(S,I){if(S||(S=document.getElementById(e.current)),!S||!n.current)return;if(l.add(c),!S.contains(I)){const O=SO.createEvent();i.current(O),O.defaultPrevented||In(()=>{if(!S)return;rO(nO(K0(S)),{select:!0})||vi(S)})}}function _(S){var O;const I=AO.createEvent();(O=s.current)==null||O.call(s,I);const T=f.ignoreCloseAutoFocus;al(0,()=>{!I.defaultPrevented&&S&&!T&&vi(xO(S)?S:document.body,{select:!0}),l.remove(c)})}function y(S){if(!n.current||!t.current&&!n.current||c.paused)return;const I=S.key===pg&&!S.ctrlKey&&!S.altKey&&!S.metaKey,T=document.activeElement;if(!(I&&T))return;const O=d.current;if(!O)return;const[D,L]=iO(O);D&&L?!S.shiftKey&&T===L?(S.preventDefault(),t.current&&vi(D,{select:!0})):S.shiftKey&&T===D&&(S.preventDefault(),t.current&&vi(L,{select:!0})):T===O&&S.preventDefault()}const x=N(()=>({id:e.current,tabindex:-1,onkeydown:y}));return{get props(){return m(x)}}}function X0(e,t){ft(t,!0);let n=k(t,"trapFocus",3,!1),i=k(t,"loop",3,!1),s=k(t,"onCloseAutoFocus",3,ne),a=k(t,"onOpenAutoFocus",3,ne),l=k(t,"forceMount",3,!1);const c=PO({enabled:B.with(()=>n()),loop:B.with(()=>i()),onCloseAutoFocus:B.with(()=>s()),onOpenAutoFocus:B.with(()=>a()),id:B.with(()=>t.id),forceMount:B.with(()=>l())});var d=X(),f=z(d);it(f,()=>t.focusScope??St,()=>({props:c.props})),P(e,d),ht()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var Ho,pa,mc,Z0,bc,va;class EO{constructor(t){F(this,mc);Y(this,"opts");F(this,Ho,ne);F(this,pa,B(null));F(this,bc,t=>{const n=A(this,pa).current,i=t.target;!mg(n)||!mg(i)||!this.opts.enabled.current||!IO(this)||!cp(n,i)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&le(this,Ho,TO(n)))});F(this,va,()=>{A(this,Ho).call(this),le(this,Ho,ne)});this.opts=t,$t({id:t.id,ref:A(this,pa),deps:()=>this.opts.enabled.current});let n=ne;ie(()=>this.opts.enabled.current,i=>(i&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=Pt(this,mc,Z0).call(this)),()=>{n(),A(this,va).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}Ho=new WeakMap,pa=new WeakMap,mc=new WeakSet,Z0=function(){return qr(Re(document,"pointerdown",A(this,bc)),Re(document,"pointerup",y0(A(this,va),this.opts.onPointerUp.current)))},bc=new WeakMap,va=new WeakMap;function kO(e){return new EO(e)}const qb=e=>e.style.userSelect||e.style.webkitUserSelect;function TO(e){const t=document.body,n=qb(t),i=qb(e);return lu(t,"none"),lu(e,"text"),()=>{lu(t,n),lu(e,i)}}function lu(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function IO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function J0(e,t){ft(t,!0);let n=k(t,"preventOverflowTextSelection",3,!0),i=k(t,"onPointerDown",3,ne),s=k(t,"onPointerUp",3,ne);kO({id:B.with(()=>t.id),onPointerDown:B.with(()=>i()),onPointerUp:B.with(()=>s()),enabled:B.with(()=>t.enabled&&n())});var a=X(),l=z(a);it(l,()=>t.children??St),P(e,a),ht()}function OO(e){let t=0,n=vt(void 0),i;function s(){t-=1,i&&t<=0&&(i(),rt(n,void 0),i=void 0)}return(...a)=>(t+=1,m(n)===void 0&&(i=e0(()=>{rt(n,dt(e(...a)))})),xe(()=>()=>{s()}),m(n))}const NO=OO(()=>{const e=new hg,t=N(()=>{for(const a of e.values())if(a)return!0;return!1});let n=vt(null),i=null;function s(){up&&(document.body.setAttribute("style",m(n)??""),document.body.style.removeProperty("--scrollbar-width"),vg&&(i==null||i()))}return xe(()=>{const a=m(t);return Rn(()=>{if(!a)return;rt(n,dt(document.body.getAttribute("style")));const l=getComputedStyle(document.body),c=window.innerWidth-document.documentElement.clientWidth,f={padding:Number.parseInt(l.paddingRight??"0",10)+c,margin:Number.parseInt(l.marginRight??"0",10)};c>0&&(document.body.style.paddingRight=`${f.padding}px`,document.body.style.marginRight=`${f.margin}px`,document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),vg&&(i=B0(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),In(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),xe(()=>()=>{i==null||i()}),{get map(){return e},resetBodyStyle:s}});function RO(e,t=()=>null){const n=te(),i=NO();if(!i)return;const s=N(t);i.map.set(n,e??!1);const a=B.with(()=>i.map.get(n)??!1,l=>i.map.set(n,l));return xe(()=>()=>{i.map.delete(n),!MO(i.map)&&(m(s)===null?requestAnimationFrame(()=>i.resetBodyStyle()):al(m(s),()=>i.resetBodyStyle()))}),a}function MO(e){for(const[t,n]of e)if(n)return!0;return!1}function Mu(e,t){ft(t,!0);let n=k(t,"preventScroll",3,!0),i=k(t,"restoreScrollDelay",3,null);RO(n(),()=>i()),ht()}function LO({forceMount:e,present:t,trapFocus:n,open:i}){return e?i&&n:t&&n&&i}var DO=et("<div><!></div>");function Q0(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"forceMount",3,!1),s=k(t,"ref",15,null),a=xt(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const l=BI({id:B.with(()=>n()),ref:B.with(()=>s(),f=>s(f))}),c=N(()=>Wt(a,l.props)),d=N(()=>l.root.opts.open.current||i());hf(e,{get id(){return n()},get present(){return m(d)},presence:h=>{var g=X(),v=z(g);{var b=y=>{var x=X(),S=z(x),I=nn(()=>({props:Wt(m(c)),...l.snippetProps}));it(S,()=>t.child,()=>m(I)),P(y,x)},_=y=>{var x=DO();let S;var I=tt(x);it(I,()=>t.children??St,()=>l.snippetProps),$(x),yt(T=>S=Lt(x,S,{...T}),[()=>Wt(m(c))]),P(y,x)};wt(v,y=>{t.child?y(b):y(_,!1)})}P(h,g)},$$slots:{presence:!0}}),ht()}var FO=et("<button><!></button>");function BO(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const l=LI({id:B.with(()=>n()),ref:B.with(()=>i(),y=>i(y)),disabled:B.with(()=>!!s())}),c=N(()=>Wt(a,l.props)),d=$r(),[f,h]=d;var g=X(),v=z(g);{var b=y=>{var x=X(),S=z(x);it(S,()=>t.child,()=>({props:m(c)})),P(y,x)},_=y=>{var x=FO();let S;var I=tt(x);it(I,()=>t.children??St),$(x),yt(T=>S=Lt(x,S,{...T}),[()=>h({...m(c)},[{attribute_name:"formaction"}])]),P(y,x)};wt(v,y=>{t.child?y(b):y(_,!1)})}P(e,g),ht()}var VO=et("<div><!></div>");function zO(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=VI({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=VO();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}function WO(e,t){return e>=0&&e<t.length}function HO(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function UO(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function GO(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t+n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function KO(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t-n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function dp(e,t,n){const i=t.toLowerCase();if(i.endsWith(" ")){const g=i.slice(0,-1);if(e.filter(y=>y.toLowerCase().startsWith(g)).length<=1)return dp(e,g,n);const b=n==null?void 0:n.toLowerCase();if(b&&b.startsWith(g)&&b.charAt(g.length)===" "&&t.trim()===g)return n;const _=e.filter(y=>y.toLowerCase().startsWith(i));if(_.length>0){const y=n?e.indexOf(n):-1;return Yb(_,Math.max(y,0)).find(I=>I!==n)||n}}const a=t.length>1&&Array.from(t).every(g=>g===t[0])?t[0]:t,l=a.toLowerCase(),c=n?e.indexOf(n):-1;let d=Yb(e,Math.max(c,0));a.length===1&&(d=d.filter(g=>g!==n));const h=d.find(g=>g==null?void 0:g.toLowerCase().startsWith(l));return h!==n?h:void 0}function Yb(e,t){return e.map((n,i)=>e[(t+i)%e.length])}const qO="data-checkbox-root";var _c,wc,yc,ma,bg,xc,Sc;class YO{constructor(t,n=null){F(this,ma);Y(this,"opts");Y(this,"group");F(this,_c,N(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current));F(this,wc,N(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current));F(this,yc,N(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current));F(this,xc,N(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current})));F(this,Sc,N(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":I0(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":T0(this.trueRequired),"data-disabled":Zn(this.trueDisabled),"data-state":ZO(this.opts.checked.current,this.opts.indeterminate.current),[qO]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,this.group=n,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),$t(t),ie.pre([()=>{var i;return o0((i=this.group)==null?void 0:i.opts.value.current)},()=>this.opts.value.current],([i,s])=>{!i||!s||(this.opts.checked.current=i.includes(s))}),ie.pre(()=>this.opts.checked.current,i=>{var s,a;this.group&&(i?(s=this.group)==null||s.addValue(this.opts.value.current):(a=this.group)==null||a.removeValue(this.opts.value.current))})}get trueName(){return m(A(this,_c))}get trueRequired(){return m(A(this,wc))}get trueDisabled(){return m(A(this,yc))}onkeydown(t){this.opts.disabled.current||(t.key===Zr&&t.preventDefault(),t.key===Yr&&(t.preventDefault(),Pt(this,ma,bg).call(this)))}onclick(t){this.opts.disabled.current||Pt(this,ma,bg).call(this)}get snippetProps(){return m(A(this,xc))}get props(){return m(A(this,Sc))}}_c=new WeakMap,wc=new WeakMap,yc=new WeakMap,ma=new WeakSet,bg=function(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current},xc=new WeakMap,Sc=new WeakMap;var Ac,Cc,Pc;class XO{constructor(t){Y(this,"root");F(this,Ac,N(()=>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));F(this,Cc,N(()=>!!this.root.trueName));F(this,Pc,N(()=>({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})));this.root=t}get trueChecked(){return m(A(this,Ac))}get shouldRender(){return m(A(this,Cc))}get props(){return m(A(this,Pc))}}Ac=new WeakMap,Cc=new WeakMap,Pc=new WeakMap;function ZO(e,t){return t?"indeterminate":e?"checked":"unchecked"}const JO=new sn("Checkbox.Group"),j0=new sn("Checkbox.Root");function QO(e,t){return j0.set(new YO(e,t))}function jO(){return new XO(j0.get())}var $O=et("<input>"),tN=et("<input>");function fp(e,t){ft(t,!0);let n=k(t,"value",15),i=xt(t,["$$slots","$$events","$$legacy","value"]);const s=N(()=>Wt(i,{"aria-hidden":"true",tabindex:-1,style:tI}));var a=X(),l=z(a);{var c=f=>{var h=$O();Iu(h);let g;yt(()=>g=Lt(h,g,{...m(s),value:n()})),P(f,h)},d=f=>{var h=tN();Iu(h);let g;yt(()=>g=Lt(h,g,{...m(s)})),h0(h,n),P(f,h)};wt(l,f=>{m(s).type==="checkbox"?f(c):f(d,!1)})}P(e,a),ht()}function eN(e,t){ft(t,!1);const n=jO();Qg();var i=X(),s=z(i);{var a=l=>{fp(l,Rt(()=>n.props))};wt(s,l=>{n.shouldRender&&l(a)})}P(e,i),ht()}var nN=et("<button><!></button>"),rN=et("<!> <!>",1);function iN(e,t){ft(t,!0);let n=k(t,"checked",15,!1),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=k(t,"required",3,!1),l=k(t,"name",3,void 0),c=k(t,"value",3,"on"),d=k(t,"id",19,te),f=k(t,"indeterminate",15,!1),h=k(t,"type",3,"button"),g=xt(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type"]);const v=JO.getOr(null);v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1)),ie.pre(()=>c(),()=>{v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1))});const b=QO({checked:B.with(()=>n(),M=>{var U;n(M),(U=t.onCheckedChange)==null||U.call(t,M)}),disabled:B.with(()=>s()??!1),required:B.with(()=>a()),name:B.with(()=>l()),value:B.with(()=>c()),id:B.with(()=>d()),ref:B.with(()=>i(),M=>i(M)),indeterminate:B.with(()=>f(),M=>{var U;f(M),(U=t.onIndeterminateChange)==null||U.call(t,M)}),type:B.with(()=>h())},v),_=N(()=>Wt({...g},b.props)),y=$r(),[x,S]=y;var I=rN(),T=z(I);{var O=M=>{var U=X(),q=z(U),at=nn(()=>({props:m(_),...b.snippetProps}));it(q,()=>t.child,()=>m(at)),P(M,U)},D=M=>{var U=nN();let q;var at=tt(U);it(at,()=>t.children??St,()=>b.snippetProps),$(U),yt(gt=>q=Lt(U,q,{...gt}),[()=>S({...m(_)},[{attribute_name:"formaction"}])]),P(M,U)};wt(T,M=>{t.child?M(O):M(D,!1)})}var L=_t(T,2);eN(L,{}),P(e,I),ht()}const oN="data-collapsible-root",sN="data-collapsible-content",aN="data-collapsible-trigger";var ba,Ec;class lN{constructor(t){Y(this,"opts");F(this,ba,vt(null));F(this,Ec,N(()=>({id:this.opts.id.current,"data-state":Ni(this.opts.open.current),"data-disabled":Zn(this.opts.disabled.current),[oN]:""})));this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),$t(t)}get contentNode(){return m(A(this,ba))}set contentNode(t){rt(A(this,ba),dt(t))}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return m(A(this,Ec))}}ba=new WeakMap,Ec=new WeakMap;var Uo,Go,Ko,qo,kc,Tc,Ic;class uN{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Uo);F(this,Go,vt(!1));F(this,Ko,vt(0));F(this,qo,vt(0));F(this,kc,N(()=>this.opts.forceMount.current||this.root.opts.open.current));F(this,Tc,N(()=>({open:this.root.opts.open.current})));F(this,Ic,N(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":m(A(this,qo))?`${m(A(this,qo))}px`:void 0,"--bits-collapsible-content-width":m(A(this,Ko))?`${m(A(this,Ko))}px`:void 0},"data-state":Ni(this.root.opts.open.current),"data-disabled":Zn(this.root.opts.disabled.current),[sN]:""})));this.opts=t,this.root=n,A(this,Go).v=dt(n.opts.open.current),$t({...t,deps:()=>this.present,onRefChange:i=>{this.root.contentNode=i}}),df(()=>{const i=requestAnimationFrame(()=>{rt(A(this,Go),!1)});return()=>{cancelAnimationFrame(i)}}),ie([()=>this.opts.ref.current,()=>this.present],([i])=>{i&&In(()=>{if(!this.opts.ref.current)return;le(this,Uo,A(this,Uo)||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName}),i.style.transitionDuration="0s",i.style.animationName="none";const s=i.getBoundingClientRect();if(rt(A(this,qo),dt(s.height)),rt(A(this,Ko),dt(s.width)),!m(A(this,Go))){const{animationName:a,transitionDuration:l}=A(this,Uo);i.style.transitionDuration=l,i.style.animationName=a}})})}get present(){return m(A(this,kc))}get snippetProps(){return m(A(this,Tc))}get props(){return m(A(this,Ic))}}Uo=new WeakMap,Go=new WeakMap,Ko=new WeakMap,qo=new WeakMap,kc=new WeakMap,Tc=new WeakMap,Ic=new WeakMap;var Xi,Oc;class cN{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Xi,N(()=>this.opts.disabled.current||this.root.opts.disabled.current));F(this,Oc,N(()=>{var t;return{id:this.opts.id.current,type:"button",disabled:m(A(this,Xi)),"aria-controls":(t=this.root.contentNode)==null?void 0:t.id,"aria-expanded":ll(this.root.opts.open.current),"data-state":Ni(this.root.opts.open.current),"data-disabled":Zn(m(A(this,Xi))),[aN]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),$t(t)}onclick(t){if(!m(A(this,Xi))){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){m(A(this,Xi))||(t.key===Yr||t.key===Zr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return m(A(this,Oc))}}Xi=new WeakMap,Oc=new WeakMap;const hp=new sn("Collapsible.Root");function dN(e){return hp.set(new lN(e))}function fN(e){return new cN(e,hp.get())}function hN(e){return new uN(e,hp.get())}var gN=et("<div><!></div>");function pN(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"open",15,!1),a=k(t,"disabled",3,!1),l=k(t,"onOpenChange",3,ne),c=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange"]);const d=dN({open:B.with(()=>s(),_=>{s(_),l()(_)}),disabled:B.with(()=>a()),id:B.with(()=>n()),ref:B.with(()=>i(),_=>i(_))}),f=N(()=>Wt(c,d.props));var h=X(),g=z(h);{var v=_=>{var y=X(),x=z(y);it(x,()=>t.child,()=>({props:m(f)})),P(_,y)},b=_=>{var y=gN();let x;var S=tt(y);it(S,()=>t.children??St),$(y),yt(()=>x=Lt(y,x,{...m(f)})),P(_,y)};wt(g,_=>{t.child?_(v):_(b,!1)})}P(e,h),ht()}var vN=et("<div><!></div>");function mN(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"forceMount",3,!1),s=k(t,"id",19,te),a=xt(t,["$$slots","$$events","$$legacy","child","ref","forceMount","children","id"]);const l=hN({id:B.with(()=>s()),forceMount:B.with(()=>i()),ref:B.with(()=>n(),c=>n(c))});hf(e,{forceMount:!0,get present(){return l.present},get id(){return s()},presence:(d,f)=>{let h=()=>f==null?void 0:f().present;var g=X();const v=N(()=>Wt(a,l.props,{hidden:i()?void 0:!h().current}));var b=z(g);{var _=x=>{var S=X(),I=z(S),T=nn(()=>({...l.snippetProps,props:m(v)}));it(I,()=>t.child,()=>m(T)),P(x,S)},y=x=>{var S=vN();let I;var T=tt(S);it(T,()=>t.children??St),$(S),yt(()=>I=Lt(S,I,{...m(v)})),P(x,S)};wt(b,x=>{t.child?x(_):x(y,!1)})}P(d,g)},$$slots:{presence:!0}}),ht()}var bN=et("<button><!></button>");function _N(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=k(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const l=fN({id:B.with(()=>i()),ref:B.with(()=>n(),y=>n(y)),disabled:B.with(()=>s())}),c=N(()=>Wt(a,l.props)),d=$r(),[f,h]=d;var g=X(),v=z(g);{var b=y=>{var x=X(),S=z(x);it(S,()=>t.child,()=>({props:m(c)})),P(y,x)},_=y=>{var x=bN();let S;var I=tt(x);it(I,()=>t.children??St),$(x),yt(T=>S=Lt(x,S,{...T}),[()=>h({...m(c)},[{attribute_name:"formaction"}])]),P(y,x)};wt(v,y=>{t.child?y(b):y(_,!1)})}P(e,g),ht()}const wN=["top","right","bottom","left"],Ti=Math.min,On=Math.max,Lu=Math.round,uu=Math.floor,_r=e=>({x:e,y:e}),yN={left:"right",right:"left",bottom:"top",top:"bottom"},xN={start:"end",end:"start"};function _g(e,t,n){return On(e,Ti(t,n))}function Jr(e,t){return typeof e=="function"?e(t):e}function Qr(e){return e.split("-")[0]}function ts(e){return e.split("-")[1]}function gp(e){return e==="x"?"y":"x"}function pp(e){return e==="y"?"height":"width"}function Ii(e){return["top","bottom"].includes(Qr(e))?"y":"x"}function vp(e){return gp(Ii(e))}function SN(e,t,n){n===void 0&&(n=!1);const i=ts(e),s=vp(e),a=pp(s);let l=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Du(l)),[l,Du(l)]}function AN(e){const t=Du(e);return[wg(e),t,wg(t)]}function wg(e){return e.replace(/start|end/g,t=>xN[t])}function CN(e,t,n){const i=["left","right"],s=["right","left"],a=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?a:l;default:return[]}}function PN(e,t,n,i){const s=ts(e);let a=CN(Qr(e),n==="start",i);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(wg)))),a}function Du(e){return e.replace(/left|right|bottom|top/g,t=>yN[t])}function EN(e){return{top:0,right:0,bottom:0,left:0,...e}}function $0(e){return typeof e!="number"?EN(e):{top:e,right:e,bottom:e,left:e}}function Fu(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function Xb(e,t,n){let{reference:i,floating:s}=e;const a=Ii(t),l=vp(t),c=pp(l),d=Qr(t),f=a==="y",h=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,v=i[c]/2-s[c]/2;let b;switch(d){case"top":b={x:h,y:i.y-s.height};break;case"bottom":b={x:h,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:g};break;case"left":b={x:i.x-s.width,y:g};break;default:b={x:i.x,y:i.y}}switch(ts(t)){case"start":b[l]-=v*(n&&f?-1:1);break;case"end":b[l]+=v*(n&&f?-1:1);break}return b}const kN=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:g}=Xb(f,i,d),v=i,b={},_=0;for(let y=0;y<c.length;y++){const{name:x,fn:S}=c[y],{x:I,y:T,data:O,reset:D}=await S({x:h,y:g,initialPlacement:i,placement:v,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=I??h,g=T??g,b={...b,[x]:{...b[x],...O}},D&&_<=50&&(_++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(f=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:h,y:g}=Xb(f,v,d)),y=-1)}return{x:h,y:g,placement:v,strategy:s,middlewareData:b}};async function Us(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:v=!1,padding:b=0}=Jr(t,e),_=$0(b),x=c[v?g==="floating"?"reference":"floating":g],S=Fu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),I=g==="floating"?{x:i,y:s,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),O=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},D=Fu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:I,offsetParent:T,strategy:d}):I);return{top:(S.top-D.top+_.top)/O.y,bottom:(D.bottom-S.bottom+_.bottom)/O.y,left:(S.left-D.left+_.left)/O.x,right:(D.right-S.right+_.right)/O.x}}const TN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:h=0}=Jr(e,t)||{};if(f==null)return{};const g=$0(h),v={x:n,y:i},b=vp(s),_=pp(b),y=await l.getDimensions(f),x=b==="y",S=x?"top":"left",I=x?"bottom":"right",T=x?"clientHeight":"clientWidth",O=a.reference[_]+a.reference[b]-v[b]-a.floating[_],D=v[b]-a.reference[b],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=L?L[T]:0;(!M||!await(l.isElement==null?void 0:l.isElement(L)))&&(M=c.floating[T]||a.floating[_]);const U=O/2-D/2,q=M/2-y[_]/2-1,at=Ti(g[S],q),gt=Ti(g[I],q),W=at,j=M-y[_]-gt,G=M/2-y[_]/2+U,Z=_g(W,G,j),Q=!d.arrow&&ts(s)!=null&&G!==Z&&a.reference[_]/2-(G<W?at:gt)-y[_]/2<0,ot=Q?G<W?G-W:G-j:0;return{[b]:v[b]+ot,data:{[b]:Z,centerOffset:G-Z-ot,...Q&&{alignmentOffset:ot}},reset:Q}}}),IN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:y=!0,...x}=Jr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Qr(s),I=Ii(c),T=Qr(c)===c,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),D=v||(T||!y?[Du(c)]:AN(c)),L=_!=="none";!v&&L&&D.push(...PN(c,y,_,O));const M=[c,...D],U=await Us(t,x),q=[];let at=((i=a.flip)==null?void 0:i.overflows)||[];if(h&&q.push(U[S]),g){const G=SN(s,l,O);q.push(U[G[0]],U[G[1]])}if(at=[...at,{placement:s,overflows:q}],!q.every(G=>G<=0)){var gt,W;const G=(((gt=a.flip)==null?void 0:gt.index)||0)+1,Z=M[G];if(Z)return{data:{index:G,overflows:at},reset:{placement:Z}};let Q=(W=at.filter(ot=>ot.overflows[0]<=0).sort((ot,ut)=>ot.overflows[1]-ut.overflows[1])[0])==null?void 0:W.placement;if(!Q)switch(b){case"bestFit":{var j;const ot=(j=at.filter(ut=>{if(L){const mt=Ii(ut.placement);return mt===I||mt==="y"}return!0}).map(ut=>[ut.placement,ut.overflows.filter(mt=>mt>0).reduce((mt,bt)=>mt+bt,0)]).sort((ut,mt)=>ut[1]-mt[1])[0])==null?void 0:j[0];ot&&(Q=ot);break}case"initialPlacement":Q=c;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}};function Zb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jb(e){return wN.some(t=>e[t]>=0)}const ON=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=Jr(e,t);switch(i){case"referenceHidden":{const a=await Us(t,{...s,elementContext:"reference"}),l=Zb(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Jb(l)}}}case"escaped":{const a=await Us(t,{...s,altBoundary:!0}),l=Zb(a,n.floating);return{data:{escapedOffsets:l,escaped:Jb(l)}}}default:return{}}}}};async function NN(e,t){const{placement:n,platform:i,elements:s}=e,a=await(i.isRTL==null?void 0:i.isRTL(s.floating)),l=Qr(n),c=ts(n),d=Ii(n)==="y",f=["left","top"].includes(l)?-1:1,h=a&&d?-1:1,g=Jr(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*h,y:v*f}:{x:v*f,y:b*h}}const RN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:a,placement:l,middlewareData:c}=t,d=await NN(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},MN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:S,y:I}=x;return{x:S,y:I}}},...d}=Jr(e,t),f={x:n,y:i},h=await Us(t,d),g=Ii(Qr(s)),v=gp(g);let b=f[v],_=f[g];if(a){const x=v==="y"?"top":"left",S=v==="y"?"bottom":"right",I=b+h[x],T=b-h[S];b=_g(I,b,T)}if(l){const x=g==="y"?"top":"left",S=g==="y"?"bottom":"right",I=_+h[x],T=_-h[S];_=_g(I,_,T)}const y=c.fn({...t,[v]:b,[g]:_});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[v]:a,[g]:l}}}}}},LN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Jr(e,t),h={x:n,y:i},g=Ii(s),v=gp(g);let b=h[v],_=h[g];const y=Jr(c,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(d){const T=v==="y"?"height":"width",O=a.reference[v]-a.floating[T]+x.mainAxis,D=a.reference[v]+a.reference[T]-x.mainAxis;b<O?b=O:b>D&&(b=D)}if(f){var S,I;const T=v==="y"?"width":"height",O=["top","left"].includes(Qr(s)),D=a.reference[g]-a.floating[T]+(O&&((S=l.offset)==null?void 0:S[g])||0)+(O?0:x.crossAxis),L=a.reference[g]+a.reference[T]+(O?0:((I=l.offset)==null?void 0:I[g])||0)-(O?x.crossAxis:0);_<D?_=D:_>L&&(_=L)}return{[v]:b,[g]:_}}}},DN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:d=()=>{},...f}=Jr(e,t),h=await Us(t,f),g=Qr(s),v=ts(s),b=Ii(s)==="y",{width:_,height:y}=a.floating;let x,S;g==="top"||g==="bottom"?(x=g,S=v===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(S=g,x=v==="end"?"top":"bottom");const I=y-h.top-h.bottom,T=_-h.left-h.right,O=Ti(y-h[x],I),D=Ti(_-h[S],T),L=!t.middlewareData.shift;let M=O,U=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=I),L&&!v){const at=On(h.left,0),gt=On(h.right,0),W=On(h.top,0),j=On(h.bottom,0);b?U=_-2*(at!==0||gt!==0?at+gt:On(h.left,h.right)):M=y-2*(W!==0||j!==0?W+j:On(h.top,h.bottom))}await d({...t,availableWidth:U,availableHeight:M});const q=await l.getDimensions(c.floating);return _!==q.width||y!==q.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function es(e){return tw(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ar(e){var t;return(t=(tw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tw(e){return gf()?e instanceof Node||e instanceof Mn(e).Node:!1}function ir(e){return gf()?e instanceof Element||e instanceof Mn(e).Element:!1}function xr(e){return gf()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function Qb(e){return!gf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}function fl(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function FN(e){return["table","td","th"].includes(es(e))}function pf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mp(e){const t=bp(),n=ir(e)?or(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function BN(e){let t=Oi(e);for(;xr(t)&&!Zo(t);){if(mp(t))return t;if(pf(t))return null;t=Oi(t)}return null}function bp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zo(e){return["html","body","#document"].includes(es(e))}function or(e){return Mn(e).getComputedStyle(e)}function vf(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oi(e){if(es(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qb(e)&&e.host||Ar(e);return Qb(t)?t.host:t}function ew(e){const t=Oi(e);return Zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:xr(t)&&fl(t)?t:ew(t)}function Gs(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=ew(e),a=s===((i=e.ownerDocument)==null?void 0:i.body),l=Mn(s);if(a){const c=yg(l);return t.concat(l,l.visualViewport||[],fl(s)?s:[],c&&n?Gs(c):[])}return t.concat(s,Gs(s,[],n))}function yg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nw(e){const t=or(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=xr(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:i,c=Lu(n)!==a||Lu(i)!==l;return c&&(n=a,i=l),{width:n,height:i,$:c}}function _p(e){return ir(e)?e:e.contextElement}function Io(e){const t=_p(e);if(!xr(t))return _r(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:a}=nw(t);let l=(a?Lu(n.width):n.width)/i,c=(a?Lu(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const VN=_r(0);function rw(e){const t=Mn(e);return!bp()||!t.visualViewport?VN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function eo(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=_p(e);let l=_r(1);t&&(i?ir(i)&&(l=Io(i)):l=Io(e));const c=zN(a,n,i)?rw(a):_r(0);let d=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,g=s.height/l.y;if(a){const v=Mn(a),b=i&&ir(i)?Mn(i):i;let _=v,y=yg(_);for(;y&&i&&b!==_;){const x=Io(y),S=y.getBoundingClientRect(),I=or(y),T=S.left+(y.clientLeft+parseFloat(I.paddingLeft))*x.x,O=S.top+(y.clientTop+parseFloat(I.paddingTop))*x.y;d*=x.x,f*=x.y,h*=x.x,g*=x.y,d+=T,f+=O,_=Mn(y),y=yg(_)}}return Fu({width:h,height:g,x:d,y:f})}function wp(e,t){const n=vf(e).scrollLeft;return t?t.left+n:eo(Ar(e)).left+n}function iw(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:wp(e,i)),a=i.top+t.scrollTop;return{x:s,y:a}}function WN(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const a=s==="fixed",l=Ar(i),c=t?pf(t.floating):!1;if(i===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=_r(1);const h=_r(0),g=xr(i);if((g||!g&&!a)&&((es(i)!=="body"||fl(l))&&(d=vf(i)),xr(i))){const b=eo(i);f=Io(i),h.x=b.x+i.clientLeft,h.y=b.y+i.clientTop}const v=l&&!g&&!a?iw(l,d,!0):_r(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+v.x,y:n.y*f.y-d.scrollTop*f.y+h.y+v.y}}function HN(e){return Array.from(e.getClientRects())}function UN(e){const t=Ar(e),n=vf(e),i=e.ownerDocument.body,s=On(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=On(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+wp(e);const c=-n.scrollTop;return or(i).direction==="rtl"&&(l+=On(t.clientWidth,i.clientWidth)-s),{width:s,height:a,x:l,y:c}}function GN(e,t){const n=Mn(e),i=Ar(e),s=n.visualViewport;let a=i.clientWidth,l=i.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const f=bp();(!f||f&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:a,height:l,x:c,y:d}}function KN(e,t){const n=eo(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,a=xr(e)?Io(e):_r(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=i*a.y;return{width:l,height:c,x:d,y:f}}function jb(e,t,n){let i;if(t==="viewport")i=GN(e,n);else if(t==="document")i=UN(Ar(e));else if(ir(t))i=KN(t,n);else{const s=rw(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Fu(i)}function ow(e,t){const n=Oi(e);return n===t||!ir(n)||Zo(n)?!1:or(n).position==="fixed"||ow(n,t)}function qN(e,t){const n=t.get(e);if(n)return n;let i=Gs(e,[],!1).filter(c=>ir(c)&&es(c)!=="body"),s=null;const a=or(e).position==="fixed";let l=a?Oi(e):e;for(;ir(l)&&!Zo(l);){const c=or(l),d=mp(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||fl(l)&&!d&&ow(e,l))?i=i.filter(h=>h!==l):s=c,l=Oi(l)}return t.set(e,i),i}function YN(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const l=[...n==="clippingAncestors"?pf(t)?[]:qN(t,this._c):[].concat(n),i],c=l[0],d=l.reduce((f,h)=>{const g=jb(t,h,s);return f.top=On(g.top,f.top),f.right=Ti(g.right,f.right),f.bottom=Ti(g.bottom,f.bottom),f.left=On(g.left,f.left),f},jb(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function XN(e){const{width:t,height:n}=nw(e);return{width:t,height:n}}function ZN(e,t,n){const i=xr(t),s=Ar(t),a=n==="fixed",l=eo(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=_r(0);if(i||!i&&!a)if((es(t)!=="body"||fl(s))&&(c=vf(t)),i){const v=eo(t,!0,a,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else s&&(d.x=wp(s));const f=s&&!i&&!a?iw(s,c):_r(0),h=l.left+c.scrollLeft-d.x-f.x,g=l.top+c.scrollTop-d.y-f.y;return{x:h,y:g,width:l.width,height:l.height}}function Hh(e){return or(e).position==="static"}function $b(e,t){if(!xr(e)||or(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ar(e)===n&&(n=n.ownerDocument.body),n}function sw(e,t){const n=Mn(e);if(pf(e))return n;if(!xr(e)){let s=Oi(e);for(;s&&!Zo(s);){if(ir(s)&&!Hh(s))return s;s=Oi(s)}return n}let i=$b(e,t);for(;i&&FN(i)&&Hh(i);)i=$b(i,t);return i&&Zo(i)&&Hh(i)&&!mp(i)?n:i||BN(e)||n}const JN=async function(e){const t=this.getOffsetParent||sw,n=this.getDimensions,i=await n(e.floating);return{reference:ZN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function QN(e){return or(e).direction==="rtl"}const jN={convertOffsetParentRelativeRectToViewportRelativeRect:WN,getDocumentElement:Ar,getClippingRect:YN,getOffsetParent:sw,getElementRects:JN,getClientRects:HN,getDimensions:XN,getScale:Io,isElement:ir,isRTL:QN};function aw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $N(e,t){let n=null,i;const s=Ar(e);function a(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:g,width:v,height:b}=f;if(c||t(),!v||!b)return;const _=uu(g),y=uu(s.clientWidth-(h+v)),x=uu(s.clientHeight-(g+b)),S=uu(h),T={rootMargin:-_+"px "+-y+"px "+-x+"px "+-S+"px",threshold:On(0,Ti(1,d))||1};let O=!0;function D(L){const M=L[0].intersectionRatio;if(M!==d){if(!O)return l();M?l(!1,M):i=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!aw(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(D,{...T,root:s.ownerDocument})}catch{n=new IntersectionObserver(D,T)}n.observe(e)}return l(!0),a}function tR(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=_p(e),h=s||a?[...f?Gs(f):[],...Gs(t)]:[];h.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const g=f&&c?$N(f,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(S=>{let[I]=S;I&&I.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,y=d?eo(e):null;d&&x();function x(){const S=eo(e);y&&!aw(y,S)&&n(),y=S,_=requestAnimationFrame(x)}return n(),()=>{var S;h.forEach(I=>{s&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),g==null||g(),(S=b)==null||S.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const eR=RN,nR=MN,rR=IN,iR=DN,oR=ON,sR=TN,aR=LN,lR=(e,t,n)=>{const i=new Map,s={platform:jN,...n},a={...s.platform,_c:i};return kN(e,t,{...s,platform:a})};function ys(e){return typeof e=="function"?e():e}function lw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t_(e,t){const n=lw(e);return Math.round(t*n)/n}function e_(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function uR(e){const t=e.whileElementsMounted,n=N(()=>ys(e.open)??!0),i=N(()=>ys(e.middleware)),s=N(()=>ys(e.transform)??!0),a=N(()=>ys(e.placement)??"bottom"),l=N(()=>ys(e.strategy)??"absolute"),c=e.reference;let d=vt(0),f=vt(0);const h=B(null);let g=vt(dt(m(l))),v=vt(dt(m(a))),b=vt(dt({})),_=vt(!1);const y=N(()=>{const D={position:m(g),left:"0",top:"0"};if(!h.current)return D;const L=t_(h.current,m(d)),M=t_(h.current,m(f));return m(s)?{...D,transform:`translate(${L}px, ${M}px)`,...lw(h.current)>=1.5&&{willChange:"transform"}}:{position:m(g),left:`${L}px`,top:`${M}px`}});let x;function S(){c.current===null||h.current===null||lR(c.current,h.current,{middleware:m(i),placement:m(a),strategy:m(l)}).then(D=>{rt(d,dt(D.x)),rt(f,dt(D.y)),rt(g,dt(D.strategy)),rt(v,dt(D.placement)),rt(b,dt(D.middlewareData)),rt(_,!0)})}function I(){typeof x=="function"&&(x(),x=void 0)}function T(){if(I(),t===void 0){S();return}c.current===null||h.current===null||(x=t(c.current,h.current,S))}function O(){m(n)||rt(_,!1)}return xe(S),xe(T),xe(O),xe(()=>I),{floating:h,reference:c,get strategy(){return m(g)},get placement(){return m(v)},get middlewareData(){return m(b)},get isPositioned(){return m(_)},get floatingStyles(){return m(y)},get update(){return S}}}const cR={top:"bottom",right:"left",bottom:"top",left:"right"};class dR{constructor(){Y(this,"anchorNode",B(null));Y(this,"customAnchorNode",B(null));Y(this,"triggerNode",B(null));xe(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}var _a,Nc,wa,Rc,ya,Mc,xa,Lc,Dc,Sa,Aa,Ca,Pa,Fc,Bc,Vc,zc,Wc,Hc,Ea,Uc,Gc,Kc,qc;class fR{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"contentRef",B(null));Y(this,"wrapperRef",B(null));Y(this,"arrowRef",B(null));Y(this,"arrowId",B(te()));F(this,_a,N(()=>{if(typeof this.opts.style=="string")return Ts(this.opts.style);if(!this.opts.style)return{}}));F(this,Nc);F(this,wa,new lI(()=>this.arrowRef.current??void 0));F(this,Rc,N(()=>{var t;return((t=A(this,wa))==null?void 0:t.width)??0}));F(this,ya,N(()=>{var t;return((t=A(this,wa))==null?void 0:t.height)??0}));F(this,Mc,N(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));F(this,xa,N(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));F(this,Lc,N(()=>m(A(this,xa)).length>0));F(this,Dc,N(()=>({padding:this.opts.collisionPadding.current,boundary:m(A(this,xa)).filter(yI),altBoundary:this.hasExplicitBoundaries})));F(this,Sa,vt(void 0));F(this,Aa,vt(void 0));F(this,Ca,vt(void 0));F(this,Pa,vt(void 0));F(this,Fc,N(()=>[eR({mainAxis:this.opts.sideOffset.current+m(A(this,ya)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&nR({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?aR():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&rR({...this.detectOverflowOptions}),iR({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:s,height:a}=t.reference;rt(A(this,Sa),dt(n)),rt(A(this,Aa),dt(i)),rt(A(this,Ca),dt(s)),rt(A(this,Pa),dt(a))}}),this.arrowRef.current&&sR({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),bR({arrowWidth:m(A(this,Rc)),arrowHeight:m(A(this,ya))}),this.opts.hideWhenDetached.current&&oR({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));Y(this,"floating");F(this,Bc,N(()=>_R(this.floating.placement)));F(this,Vc,N(()=>wR(this.floating.placement)));F(this,zc,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));F(this,Wc,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));F(this,Hc,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));F(this,Ea,vt());F(this,Uc,N(()=>cR[this.placedSide]));F(this,Gc,N(()=>{var t,n,i;return{id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(n=this.floating.middlewareData.transformOrigin)==null?void 0:n.y}`,"--bits-floating-available-width":`${m(A(this,Sa))}px`,"--bits-floating-available-height":`${m(A(this,Aa))}px`,"--bits-floating-anchor-width":`${m(A(this,Ca))}px`,"--bits-floating-anchor-height":`${m(A(this,Pa))}px`,...((i=this.floating.middlewareData.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...m(A(this,_a))},dir:this.opts.dir.current}}));F(this,Kc,N(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:op({...m(A(this,_a))})})));F(this,qc,N(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0})));this.opts=t,this.root=n,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),ie(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),$t({id:this.opts.wrapperId,ref:this.wrapperRef,deps:()=>this.opts.enabled.current}),$t({id:this.opts.id,ref:this.contentRef,deps:()=>this.opts.enabled.current}),this.floating=uR({strategy:()=>this.opts.strategy.current,placement:()=>m(A(this,Mc)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>{var a;return tR(...i,{animationFrame:((a=A(this,Nc))==null?void 0:a.current)==="always"})},open:()=>this.opts.enabled.current}),xe(()=>{var i;this.floating.isPositioned&&((i=this.opts.onPlaced)==null||i.current())}),ie(()=>this.contentRef.current,i=>{i&&(this.contentZIndex=window.getComputedStyle(i).zIndex)}),xe(()=>{this.floating.floating.current=this.wrapperRef.current})}get hasExplicitBoundaries(){return m(A(this,Lc))}get detectOverflowOptions(){return m(A(this,Dc))}get middleware(){return m(A(this,Fc))}get placedSide(){return m(A(this,Bc))}get placedAlign(){return m(A(this,Vc))}get arrowX(){return m(A(this,zc))}get arrowY(){return m(A(this,Wc))}get cannotCenterArrow(){return m(A(this,Hc))}get contentZIndex(){return m(A(this,Ea))}set contentZIndex(t){rt(A(this,Ea),dt(t))}get arrowBaseSide(){return m(A(this,Uc))}get wrapperProps(){return m(A(this,Gc))}get props(){return m(A(this,Kc))}get arrowStyle(){return m(A(this,qc))}}_a=new WeakMap,Nc=new WeakMap,wa=new WeakMap,Rc=new WeakMap,ya=new WeakMap,Mc=new WeakMap,xa=new WeakMap,Lc=new WeakMap,Dc=new WeakMap,Sa=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,Pa=new WeakMap,Fc=new WeakMap,Bc=new WeakMap,Vc=new WeakMap,zc=new WeakMap,Wc=new WeakMap,Hc=new WeakMap,Ea=new WeakMap,Uc=new WeakMap,Gc=new WeakMap,Kc=new WeakMap,qc=new WeakMap;class hR{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"ref",B(null));this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=B.from(t.virtualEl.current):$t({id:t.id,ref:this.ref,onRefChange:i=>{n.triggerNode.current=i}})}}const yp=new sn("Floating.Root"),gR=new sn("Floating.Content");function pR(){return yp.set(new dR)}function vR(e){return gR.set(new fR(e,yp.get()))}function mR(e){return new hR(e,yp.get())}function bR(e){return{name:"transformOrigin",options:e,fn(t){var x,S,I;const{placement:n,rects:i,middlewareData:s}=t,l=((x=s.arrow)==null?void 0:x.centerOffset)!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=xp(n),g={start:"0%",center:"50%",end:"100%"}[h],v=(((S=s.arrow)==null?void 0:S.x)??0)+c/2,b=(((I=s.arrow)==null?void 0:I.y)??0)+d/2;let _="",y="";return f==="bottom"?(_=l?g:`${v}px`,y=`${-d}px`):f==="top"?(_=l?g:`${v}px`,y=`${i.floating.height+d}px`):f==="right"?(_=`${-d}px`,y=l?g:`${b}px`):f==="left"&&(_=`${i.floating.width+d}px`,y=l?g:`${b}px`),{data:{x:_,y}}}}}function xp(e){const[t,n="center"]=e.split("-");return[t,n]}function _R(e){return xp(e)[0]}function wR(e){return xp(e)[1]}function uw(e,t){ft(t,!0),pR();var n=X(),i=z(n);it(i,()=>t.children??St),P(e,n),ht()}function cw(e,t=1e4,n=ne){let i=null,s=vt(dt(e));function a(){return window.setTimeout(()=>{rt(s,dt(e)),n(e)},t)}return xe(()=>()=>{i&&clearTimeout(i)}),B.with(()=>m(s),l=>{rt(s,dt(l)),n(l),i&&clearTimeout(i),i=a()})}function yR(e){const t=cw("",1e3),n=(e==null?void 0:e.onMatch)??(l=>l.focus()),i=(e==null?void 0:e.getCurrentItem)??(()=>document.activeElement);function s(l,c){var b,_;if(!c.length)return;t.current=t.current+l;const d=i(),f=((_=(b=c.find(y=>y===d))==null?void 0:b.textContent)==null?void 0:_.trim())??"",h=c.map(y=>{var x;return((x=y.textContent)==null?void 0:x.trim())??""}),g=dp(h,t.current,f),v=c.find(y=>{var x;return((x=y.textContent)==null?void 0:x.trim())===g});return v&&n(v),v}function a(){t.current=""}return{search:t,handleTypeaheadSearch:s,resetTypeahead:a}}function xR(e){const t=cw("",1e3),n=N(()=>e.candidateValues());function i(a){if(!e.enabled||!m(n).length)return;t.current=t.current+a;const l=e.getCurrentItem(),c=m(n).find(g=>g===l)??"",d=m(n).map(g=>g??""),f=dp(d,t.current,c),h=m(n).find(g=>g===f);return h&&e.onMatch(h),h}function s(){t.current=""}return{search:t,handleTypeaheadSearch:i,resetTypeahead:s}}const SR=[Ai,L0,cl],AR=[Kr,M0,ul],CR=[...SR,...AR];var ka,Ta,Ia,Oa,Na,Ra,Ma,Yc,Xc,Zc;class dw{constructor(t){Y(this,"opts");F(this,ka,vt(!1));F(this,Ta,vt(""));F(this,Ia,vt(null));F(this,Oa,vt(null));F(this,Na,vt(null));F(this,Ra,vt(""));F(this,Ma,vt(null));F(this,Yc,N(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));F(this,Xc,N(()=>{if(this.highlightedNode)return this.highlightedNode.id}));F(this,Zc,N(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));Y(this,"isUsingKeyboard",!1);Y(this,"isCombobox",!1);Y(this,"bitsAttrs");this.opts=t,this.isCombobox=t.isCombobox,this.bitsAttrs=XR(this),df(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return m(A(this,ka))}set touchedInput(t){rt(A(this,ka),dt(t))}get inputValue(){return m(A(this,Ta))}set inputValue(t){rt(A(this,Ta),dt(t))}get inputNode(){return m(A(this,Ia))}set inputNode(t){rt(A(this,Ia),dt(t))}get contentNode(){return m(A(this,Oa))}set contentNode(t){rt(A(this,Oa),dt(t))}get triggerNode(){return m(A(this,Na))}set triggerNode(t){rt(A(this,Na),dt(t))}get valueId(){return m(A(this,Ra))}set valueId(t){rt(A(this,Ra),dt(t))}get highlightedNode(){return m(A(this,Ma))}set highlightedNode(t){rt(A(this,Ma),dt(t))}get highlightedValue(){return m(A(this,Yc))}get highlightedId(){return m(A(this,Xc))}get highlightedLabel(){return m(A(this,Zc))}setHighlightedNode(t,n=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||n)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.bitsAttrs.item}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(){this.setHighlightedNode(null);const t=this.getCandidateNodes();t.length&&this.setHighlightedNode(t[0])}getNodeByValue(t){return this.getCandidateNodes().find(i=>i.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()}}ka=new WeakMap,Ta=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Yc=new WeakMap,Xc=new WeakMap,Zc=new WeakMap;var Jc,Qc,jc,$c;class PR extends dw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!1);F(this,Jc,N(()=>this.opts.value.current!==""));F(this,Qc,N(()=>{var i;return this.opts.items.current.length?((i=this.opts.items.current.find(s=>s.value===this.opts.value.current))==null?void 0:i.label)??"":""}));F(this,jc,N(()=>this.opts.items.current.length?this.opts.items.current.filter(i=>!i.disabled).map(i=>i.label):[]));F(this,$c,N(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=n,xe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ie(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return m(A(this,Jc))}get currentLabel(){return m(A(this,Qc))}get candidateLabels(){return m(A(this,jc))}get dataTypeaheadEnabled(){return m(A(this,$c))}includesItem(n){return this.opts.value.current===n}toggleItem(n,i=n){this.opts.value.current=this.includesItem(n)?"":n,this.inputValue=i}setInitialHighlightedNode(){In(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current!==""){const i=this.getNodeByValue(this.opts.value.current);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}Jc=new WeakMap,Qc=new WeakMap,jc=new WeakMap,$c=new WeakMap;var td;class ER extends dw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!0);F(this,td,N(()=>this.opts.value.current.length>0));this.opts=n,xe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ie(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return m(A(this,td))}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i=n){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(s=>s!==n):this.opts.value.current=[...this.opts.value.current,n],this.inputValue=i}setInitialHighlightedNode(){In(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const i=this.getNodeByValue(this.opts.value.current[0]);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}td=new WeakMap;var Zi,Yo,Sr,fw,xg,Sg,ed;class kR{constructor(t,n){F(this,Sr);Y(this,"opts");Y(this,"root");F(this,Zi);F(this,Yo);F(this,ed,N(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":ll(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ni(this.root.opts.open.current),"data-disabled":Zn(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.bitsAttrs.trigger]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup})));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.triggerNode=i}}),le(this,Zi,yR({getCurrentItem:()=>this.root.highlightedNode,onMatch:i=>{this.root.setHighlightedNode(i)}})),le(this,Yo,xR({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:i=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(a=>a.label===i);s&&(this.root.opts.value.current=s.value)},enabled:!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===Kr||t.key===Ai)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Zr||t.key===Yr||t.key===Ai||t.key===Kr)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){A(this,Yo).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const l=this.root.getCandidateNodes();if(!l.length)return;if(t.key===Ai){const c=l[0];this.root.setHighlightedNode(c)}else if(t.key===Kr){const c=l[l.length-1];this.root.setHighlightedNode(c)}return}if(t.key===pg){this.root.handleClose();return}if((t.key===Zr||t.key===Yr&&A(this,Zi).search.current==="")&&!t.isComposing&&(t.preventDefault(),Pt(this,Sr,Sg).call(this)))return;if(t.key===Kr&&t.altKey&&this.root.handleClose(),CR.includes(t.key)){t.preventDefault();const l=this.root.getCandidateNodes(),c=this.root.highlightedNode,d=c?l.indexOf(c):-1,f=this.root.opts.loop.current;let h;if(t.key===Ai?h=HO(l,d,f):t.key===Kr?h=UO(l,d,f):t.key===M0?h=GO(l,d,10,f):t.key===L0?h=KO(l,d,10,f):t.key===cl?h=l[0]:t.key===ul&&(h=l[l.length-1]),!h)return;this.root.setHighlightedNode(h);return}const n=t.ctrlKey||t.altKey||t.metaKey,i=t.key.length===1,s=t.key===Yr,a=this.root.getCandidateNodes();if(t.key!==pg){if(!n&&(i||s)){!A(this,Zi).handleTypeaheadSearch(t.key,a)&&s&&(t.preventDefault(),Pt(this,Sr,Sg).call(this));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 n=t.target;n!=null&&n.hasPointerCapture(t.pointerId)&&(n==null||n.releasePointerCapture(t.pointerId)),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?Pt(this,Sr,xg).call(this,t):this.root.handleClose())}onpointerup(t){t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?Pt(this,Sr,xg).call(this,t):this.root.handleClose())}get props(){return m(A(this,ed))}}Zi=new WeakMap,Yo=new WeakMap,Sr=new WeakSet,fw=function(){this.root.opts.open.current=!0,A(this,Yo).resetTypeahead(),A(this,Zi).resetTypeahead()},xg=function(t){Pt(this,Sr,fw).call(this)},Sg=function(){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)},ed=new WeakMap;var La,Da,nd,rd,id;class TR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,La,vt(null));F(this,Da,vt(!1));F(this,nd,N(()=>{const t=this.root.isCombobox?"--bits-combobox":"--bits-select";return{[`${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`${t}-content-available-width`]:"var(--bits-floating-available-width)",[`${t}-content-available-height`]:"var(--bits-floating-available-height)",[`${t}-anchor-width`]:" var(--bits-floating-anchor-width)",[`${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}));Y(this,"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()});Y(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Y(this,"onOpenAutoFocus",t=>{t.preventDefault()});Y(this,"onCloseAutoFocus",t=>{t.preventDefault()});F(this,rd,N(()=>({open:this.root.opts.open.current})));F(this,id,N(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ni(this.root.opts.open.current),[this.root.bitsAttrs.content]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...m(A(this,nd))},onpointermove:this.onpointermove})));Y(this,"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)}});this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.contentNode=i},deps:()=>this.root.opts.open.current}),sp(()=>{this.root.contentNode=null,this.isPositioned=!1}),ie(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}get viewportNode(){return m(A(this,La))}set viewportNode(t){rt(A(this,La),dt(t))}get isPositioned(){return m(A(this,Da))}set isPositioned(t){rt(A(this,Da),dt(t))}onpointermove(t){this.root.isUsingKeyboard=!1}get snippetProps(){return m(A(this,rd))}get props(){return m(A(this,id))}}La=new WeakMap,Da=new WeakMap,nd=new WeakMap,rd=new WeakMap,id=new WeakMap;var od,sd,Fa,ad,ld;class IR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,od,N(()=>this.root.includesItem(this.opts.value.current)));F(this,sd,N(()=>this.root.highlightedValue===this.opts.value.current));Y(this,"prevHighlighted",new k0(()=>this.isHighlighted));F(this,Fa,vt(!1));F(this,ad,N(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));F(this,ld,N(()=>({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":Zn(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.bitsAttrs.item]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup})));this.opts=t,this.root=n,$t({...t,deps:()=>this.mounted}),ie([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),ie(()=>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)}get isSelected(){return m(A(this,od))}get isHighlighted(){return m(A(this,sd))}get mounted(){return m(A(this,Fa))}set mounted(t){rt(A(this,Fa),dt(t))}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()}get snippetProps(){return m(A(this,ad))}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!vg){Re(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)}get props(){return m(A(this,ld))}}od=new WeakMap,sd=new WeakMap,Fa=new WeakMap,ad=new WeakMap,ld=new WeakMap;var Ba,ud;class OR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Ba,vt(null));F(this,ud,N(()=>{var t;return{id:this.opts.id.current,role:"group",[this.root.bitsAttrs.group]:"","aria-labelledby":((t=this.labelNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.root=n,$t(t)}get labelNode(){return m(A(this,Ba))}set labelNode(t){rt(A(this,Ba),dt(t))}get props(){return m(A(this,ud))}}Ba=new WeakMap,ud=new WeakMap;var cd;class NR{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,cd,N(()=>({id:this.opts.id.current,[this.group.root.bitsAttrs["group-label"]]:""})));this.opts=t,this.group=n,$t({...t,onRefChange:i=>{n.labelNode=i}})}get props(){return m(A(this,cd))}}cd=new WeakMap;var dd,fd;class RR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,dd,N(()=>this.root.opts.name.current!==""));F(this,fd,N(()=>({disabled:O0(this.root.opts.disabled.current),required:gI(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=n,this.onfocus=this.onfocus.bind(this)}get shouldRender(){return m(A(this,dd))}onfocus(t){var n,i;t.preventDefault(),this.root.isCombobox?(i=this.root.inputNode)==null||i.focus():(n=this.root.triggerNode)==null||n.focus()}get props(){return m(A(this,fd))}}dd=new WeakMap,fd=new WeakMap;var Va,hd;class MR{constructor(t,n){Y(this,"opts");Y(this,"content");Y(this,"root");F(this,Va,vt(0));F(this,hd,N(()=>({id:this.opts.id.current,role:"presentation",[this.root.bitsAttrs.viewport]:"",style:{position:"relative",flex:1,overflow:"auto"}})));this.opts=t,this.content=n,this.root=n.root,$t({...t,onRefChange:i=>{this.content.viewportNode=i},deps:()=>this.root.opts.open.current})}get prevScrollTop(){return m(A(this,Va))}set prevScrollTop(t){rt(A(this,Va),dt(t))}get props(){return m(A(this,hd))}}Va=new WeakMap,hd=new WeakMap;var za,gd;class hw{constructor(t,n){Y(this,"opts");Y(this,"content");Y(this,"root");Y(this,"autoScrollTimer",null);Y(this,"userScrollTimer",-1);Y(this,"isUserScrolling",!1);Y(this,"onAutoScroll",ne);F(this,za,vt(!1));F(this,gd,N(()=>({id:this.opts.id.current,"aria-hidden":dI(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave})));this.opts=t,this.content=n,this.root=n.root,$t({...t,deps:()=>this.mounted}),ie([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),xe(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}get mounted(){return m(A(this,za))}set mounted(t){rt(A(this,za),dt(t))}handleUserScroll(){window.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=window.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(window.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const n=i=>{this.onAutoScroll(),this.autoScrollTimer=window.setTimeout(()=>n(i+1),this.opts.delay.current(i))};this.autoScrollTimer=window.setTimeout(()=>n(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}get props(){return m(A(this,gd))}}za=new WeakMap,gd=new WeakMap;var Wa,pd;class LR{constructor(t){Y(this,"scrollButtonState");Y(this,"content");Y(this,"root");F(this,Wa,vt(!1));Y(this,"scrollIntoViewTimer",null);Y(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=this.content.viewportNode.scrollHeight-this.content.viewportNode.clientHeight,i=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.content.viewportNode.scrollTop)<n-i});Y(this,"handleAutoScroll",()=>{const t=this.content.viewportNode,n=this.root.highlightedNode;!t||!n||(t.scrollTop=t.scrollTop+n.offsetHeight)});F(this,pd,N(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-down-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,ie([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Re(this.content.viewportNode,"scroll",()=>this.handleScroll())}),ie(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=al(5,()=>{const n=this.root.highlightedNode;n==null||n.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}get canScrollDown(){return m(A(this,Wa))}set canScrollDown(t){rt(A(this,Wa),dt(t))}get props(){return m(A(this,pd))}}Wa=new WeakMap,pd=new WeakMap;var Ha,vd;class DR{constructor(t){Y(this,"scrollButtonState");Y(this,"content");Y(this,"root");F(this,Ha,vt(!1));Y(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollUp=this.content.viewportNode.scrollTop-n>.1});Y(this,"handleAutoScroll",()=>{!this.content.viewportNode||!this.root.highlightedNode||(this.content.viewportNode.scrollTop=this.content.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});F(this,vd,N(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-up-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,ie([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Re(this.content.viewportNode,"scroll",()=>this.handleScroll())})}get canScrollUp(){return m(A(this,Ha))}set canScrollUp(t){rt(A(this,Ha),dt(t))}get props(){return m(A(this,vd))}}Ha=new WeakMap,vd=new WeakMap;const ns=new sn("Select.Root | Combobox.Root"),gw=new sn("Select.Group | Combobox.Group"),mf=new sn("Select.Content | Combobox.Content");function FR(e){const{type:t,...n}=e,i=t==="single"?new PR(n):new ER(n);return ns.set(i)}function BR(e){return mf.set(new TR(e,ns.get()))}function VR(e){return new kR(e,ns.get())}function zR(e){return new IR(e,ns.get())}function WR(e){return new MR(e,mf.get())}function HR(e){return new DR(new hw(e,mf.get()))}function UR(e){return new LR(new hw(e,mf.get()))}function GR(e){return gw.set(new OR(e,ns.get()))}function KR(e){return new NR(e,gw.get())}function qR(e){return new RR(e,ns.get())}const YR=["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"];function XR(e){const t=e.isCombobox,n={};for(const i of YR)n[i]=t?`data-combobox-${i}`:`data-select-${i}`;return n}function n_(e,t){ft(t,!0);let n=k(t,"value",15,"");const i=qR({value:B.with(()=>n())});var s=X(),a=z(s);{var l=c=>{fp(c,Rt(()=>i.props,{get value(){return n()},set value(d){n(d)}}))};wt(a,c=>{i.shouldRender&&c(l)})}P(e,s),ht()}function pw(e,t){ft(t,!0),mR({id:B.with(()=>t.id),virtualEl:B.with(()=>t.virtualEl)});var n=X(),i=z(n);it(i,()=>t.children??St),P(e,n),ht()}function ZR(e,t){ft(t,!0);let n=k(t,"side",3,"bottom"),i=k(t,"sideOffset",3,0),s=k(t,"align",3,"center"),a=k(t,"alignOffset",3,0),l=k(t,"arrowPadding",3,0),c=k(t,"avoidCollisions",3,!0),d=k(t,"collisionBoundary",19,()=>[]),f=k(t,"collisionPadding",3,0),h=k(t,"hideWhenDetached",3,!1),g=k(t,"onPlaced",3,()=>{}),v=k(t,"sticky",3,"partial"),b=k(t,"updatePositionStrategy",3,"optimized"),_=k(t,"strategy",3,"fixed"),y=k(t,"dir",3,"ltr"),x=k(t,"style",19,()=>({})),S=k(t,"wrapperId",19,te),I=k(t,"customAnchor",3,null);const T=vR({side:B.with(()=>n()),sideOffset:B.with(()=>i()),align:B.with(()=>s()),alignOffset:B.with(()=>a()),id:B.with(()=>t.id),arrowPadding:B.with(()=>l()),avoidCollisions:B.with(()=>c()),collisionBoundary:B.with(()=>d()),collisionPadding:B.with(()=>f()),hideWhenDetached:B.with(()=>h()),onPlaced:B.with(()=>g()),sticky:B.with(()=>v()),updatePositionStrategy:B.with(()=>b()),strategy:B.with(()=>_()),dir:B.with(()=>y()),style:B.with(()=>x()),enabled:B.with(()=>t.enabled),wrapperId:B.with(()=>S()),customAnchor:B.with(()=>I())}),O=N(()=>Wt(T.wrapperProps,{style:{pointerEvents:"auto"}}));var D=X(),L=z(D);it(L,()=>t.content??St,()=>({props:T.props,wrapperProps:m(O)})),P(e,D),ht()}function JR(e,t){ft(t,!0),jg(()=>{var s;(s=t.onPlaced)==null||s.call(t)});var n=X(),i=z(n);it(i,()=>t.content??St,()=>({props:{},wrapperProps:{}})),P(e,n),ht()}function QR(e,t){let n=k(t,"isStatic",3,!1),i=xt(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var s=X(),a=z(s);{var l=d=>{JR(d,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=d=>{ZR(d,Rt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};wt(a,d=>{n()?d(l):d(c,!1)})}P(e,s)}var jR=et("<!> <!>",1);function vw(e,t){ft(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);QR(e,{get isStatic(){return l()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},content:(f,h)=>{let g=()=>h==null?void 0:h().props,v=()=>h==null?void 0:h().wrapperProps;var b=jR(),_=z(b);{var y=T=>{Mu(T,{get preventScroll(){return t.preventScroll}})},x=(T,O)=>{{var D=L=>{Mu(L,{get preventScroll(){return t.preventScroll}})};wt(T,L=>{t.forceMount||L(D)},O)}};wt(_,T=>{t.forceMount&&t.enabled?T(y):T(x,!1)})}var S=_t(_,2);const I=N(()=>t.enabled&&i());X0(S,{get id(){return t.id},get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get trapFocus(){return m(I)},get forceMount(){return t.forceMount},focusScope:(O,D)=>{let L=()=>D==null?void 0:D().props;G0(O,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},children:(M,U)=>{U0(M,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return s()},get enabled(){return t.enabled},children:(at,gt)=>{let W=()=>gt==null?void 0:gt().props;J0(at,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},children:(j,G)=>{var Z=X(),Q=z(Z),ot=nn(()=>({props:Wt(c,g(),W(),L(),{style:{pointerEvents:"auto"}}),wrapperProps:v()}));it(Q,()=>t.popper??St,()=>m(ot)),P(j,Z)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),P(f,b)},$$slots:{content:!0}}),ht()}function mw(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","present","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic"]);hf(e,Rt({get id(){return t.id},get present(){return t.present}},()=>c,{presence:f=>{vw(f,Rt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return l()},get enabled(){return t.present},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1},()=>c))},$$slots:{presence:!0}}))}function bw(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),c=xt(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);vw(e,Rt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return l()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside}},()=>c,{forceMount:!0}))}var $R=et("<div><div><!></div></div>"),tM=et("<div><div><!></div></div>");function eM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=k(t,"side",3,"bottom"),l=k(t,"onInteractOutside",3,ne),c=k(t,"onEscapeKeydown",3,ne),d=k(t,"preventScroll",3,!1),f=xt(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll"]);const h=BR({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),onInteractOutside:B.with(()=>l()),onEscapeKeydown:B.with(()=>c())}),g=N(()=>Wt(f,h.props));var v=X(),b=z(v);{var _=x=>{bw(x,Rt(()=>m(g),()=>h.popperProps,{get side(){return a()},get enabled(){return h.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!0,popper:(I,T)=>{let O=()=>T==null?void 0:T().props,D=()=>T==null?void 0:T().wrapperProps;var L=X();const M=N(()=>Wt(O(),{style:h.props.style}));var U=z(L);{var q=gt=>{var W=X(),j=z(W),G=nn(()=>({props:m(M),wrapperProps:D(),...h.snippetProps}));it(j,()=>t.child,()=>m(G)),P(gt,W)},at=gt=>{var W=$R();let j;var G=tt(W);let Z;var Q=tt(G);it(Q,()=>t.children??St),$(G),$(W),yt(()=>{j=Lt(W,j,{...D()}),Z=Lt(G,Z,{...m(M)})}),P(gt,W)};wt(U,gt=>{t.child?gt(q):gt(at,!1)})}P(I,L)},$$slots:{popper:!0}}))},y=(x,S)=>{{var I=T=>{mw(T,Rt(()=>m(g),()=>h.popperProps,{get side(){return a()},get present(){return h.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!1,popper:(D,L)=>{let M=()=>L==null?void 0:L().props,U=()=>L==null?void 0:L().wrapperProps;var q=X();const at=N(()=>Wt(M(),{style:h.props.style}));var gt=z(q);{var W=G=>{var Z=X(),Q=z(Z),ot=nn(()=>({props:m(at),wrapperProps:U(),...h.snippetProps}));it(Q,()=>t.child,()=>m(ot)),P(G,Z)},j=G=>{var Z=tM();let Q;var ot=tt(Z);let ut;var mt=tt(ot);it(mt,()=>t.children??St),$(ot),$(Z),yt(()=>{Q=Lt(Z,Q,{...U()}),ut=Lt(ot,ut,{...m(at)})}),P(G,Z)};wt(gt,G=>{t.child?G(W):G(j,!1)})}P(D,q)},$$slots:{popper:!0}}))};wt(x,T=>{s()||T(I)},S)}};wt(b,x=>{s()?x(_):x(y,!1)})}P(e,v),ht()}function Sp(e,t){ft(t,!0);let n=k(t,"mounted",15,!1),i=k(t,"onMountedChange",3,ne);ap(()=>(n(!0),i()(!0),()=>{n(!1),i()(!1)})),ht()}var nM=et("<div><!></div>"),rM=et("<!> <!>",1);function iM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"label",19,()=>t.value),a=k(t,"disabled",3,!1),l=k(t,"onHighlight",3,ne),c=k(t,"onUnhighlight",3,ne),d=xt(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const f=zR({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),value:B.with(()=>t.value),disabled:B.with(()=>a()),label:B.with(()=>s()),onHighlight:B.with(()=>l()),onUnhighlight:B.with(()=>c())}),h=N(()=>Wt(d,f.props));var g=rM(),v=z(g);{var b=x=>{var S=X(),I=z(S),T=nn(()=>({props:m(h),...f.snippetProps}));it(I,()=>t.child,()=>m(T)),P(x,S)},_=x=>{var S=nM();let I;var T=tt(S);it(T,()=>t.children??St,()=>f.snippetProps),$(S),yt(()=>I=Lt(S,I,{...m(h)})),P(x,S)};wt(v,x=>{t.child?x(b):x(_,!1)})}var y=_t(v,2);Sp(y,{get mounted(){return f.mounted},set mounted(x){f.mounted=x}}),P(e,g),ht()}var oM=et("<div><!></div>");function sM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=GR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=oM();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}var aM=et("<div><!></div>");function lM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children"]);const a=KR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=aM();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}var uM=et("<div><!></div>");function cM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=WR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=uM();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}var dM=et("<div><!></div>"),fM=et("<!> <!>",1);function hM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),a=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=UR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),delay:B.with(()=>s())}),c=N(()=>Wt(a,l.props));var d=X(),f=z(d);{var h=g=>{var v=fM(),b=z(v);Sp(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(S){l.scrollButtonState.mounted=S}});var _=_t(b,2);{var y=S=>{var I=X(),T=z(I);it(T,()=>t.child,()=>({props:a})),P(S,I)},x=S=>{var I=dM();let T;var O=tt(I);it(O,()=>t.children??St),$(I),yt(()=>T=Lt(I,T,{...m(c)})),P(S,I)};wt(_,S=>{t.child?S(y):S(x,!1)})}P(g,v)};wt(f,g=>{l.canScrollDown&&g(h)})}P(e,d),ht()}var gM=et("<div><!></div>"),pM=et("<!> <!>",1);function vM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),a=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=HR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),delay:B.with(()=>s())}),c=N(()=>Wt(a,l.props));var d=X(),f=z(d);{var h=g=>{var v=pM(),b=z(v);Sp(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(S){l.scrollButtonState.mounted=S}});var _=_t(b,2);{var y=S=>{var I=X(),T=z(I);it(T,()=>t.child,()=>({props:a})),P(S,I)},x=S=>{var I=gM();let T;var O=tt(I);it(O,()=>t.children??St),$(I),yt(()=>T=Lt(I,T,{...m(c)})),P(S,I)};wt(_,S=>{t.child?S(y):S(x,!1)})}P(g,v)};wt(f,g=>{l.canScrollUp&&g(h)})}P(e,d),ht()}function mM(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function bM(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}var _w={exports:{}};/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(function(e,t){(function(n,i){e.exports=i(n)})(br,function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var i=function(s){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var a=String(s),l=a.length,c=-1,d,f="",h=a.charCodeAt(0);++c<l;){if(d=a.charCodeAt(c),d==0){f+="�";continue}if(d>=1&&d<=31||d==127||c==0&&d>=48&&d<=57||c==1&&d>=48&&d<=57&&h==45){f+="\\"+d.toString(16)+" ";continue}if(c==0&&l==1&&d==45){f+="\\"+a.charAt(c);continue}if(d>=128||d==45||d==95||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122){f+=a.charAt(c);continue}f+="\\"+a.charAt(c)}return f};return n.CSS||(n.CSS={}),n.CSS.escape=i,i})})(_w);var _M=_w.exports;const ww=x0(_M),wM="data-command-root",yM="data-command-list",xM="data-command-input",SM="data-command-empty",yw="data-command-group",xw="data-command-group-items",Sw="data-command-group-heading",Aw="data-command-item",AM="data-command-input-label",Gi="data-value",xs=`[${yw}]`,Uh=`[${xw}]`,CM=`[${Sw}]`,Cw=`[${Aw}]`,Gh=`${Cw}:not([aria-disabled="true"])`,so=new sn("Command.Root"),PM=new sn("Command.List"),hl=new sn("Command.Group"),r_={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var Xo,Ua,Ga,Ka,qa,Ya,Xa,jt,Pw,yu,Ag,xu,Su,Au,Po,Ew,Cg,Pg,Eg,md;class EM{constructor(t){F(this,jt);Y(this,"opts");F(this,Xo,!1);Y(this,"sortAfterTick",!1);Y(this,"sortAndFilterAfterTick",!1);Y(this,"allItems",new Set);Y(this,"allGroups",new Map);Y(this,"allIds",new Map);F(this,Ua,vt(0));F(this,Ga,vt(null));F(this,Ka,vt(null));F(this,qa,vt(null));F(this,Ya,vt(r_));F(this,Xa,vt(dt(r_)));F(this,md,N(()=>({id:this.opts.id.current,role:"application",[wM]:"",tabindex:-1,onkeydown:this.onkeydown})));this.opts=t;const n={...this._commandState,value:this.opts.value.current??""};this._commandState=n,this.commandState=n,$t(t),this.onkeydown=this.onkeydown.bind(this)}get key(){return m(A(this,Ua))}set key(t){rt(A(this,Ua),dt(t))}get viewportNode(){return m(A(this,Ga))}set viewportNode(t){rt(A(this,Ga),dt(t))}get inputNode(){return m(A(this,Ka))}set inputNode(t){rt(A(this,Ka),dt(t))}get labelNode(){return m(A(this,qa))}set labelNode(t){rt(A(this,qa),dt(t))}get commandState(){return m(A(this,Ya))}set commandState(t){rt(A(this,Ya),t)}get _commandState(){return m(A(this,Xa))}set _commandState(t){rt(A(this,Xa),dt(t))}setState(t,n,i){Object.is(this._commandState[t],n)||(this._commandState[t]=n,t==="search"?(Pt(this,jt,Au).call(this),Pt(this,jt,xu).call(this)):t==="value"&&(i||Pt(this,jt,Ew).call(this)),Pt(this,jt,yu).call(this))}setValue(t,n){t!==this.opts.value.current&&t===""&&In(()=>{this.key++}),this.setState("value",t,n),this.opts.value.current=t}getValidItems(){const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(Gh)).filter(i=>!!i):[]}updateSelectedToIndex(t){const i=this.getValidItems()[t];i&&this.setValue(i.getAttribute(Gi)??"")}updateSelectedByItem(t){const n=Pt(this,jt,Po).call(this),i=this.getValidItems(),s=i.findIndex(l=>l===n);let a=i[s+t];this.opts.loop.current&&(a=s+t<0?i[i.length-1]:s+t===i.length?i[0]:i[s+t]),a&&this.setValue(a.getAttribute(Gi)??"")}updateSelectedByGroup(t){const n=Pt(this,jt,Po).call(this);let i=n==null?void 0:n.closest(xs),s;for(;i&&!s;)i=t>0?mM(i,xs):bM(i,xs),s=i==null?void 0:i.querySelector(Gh);s?this.setValue(s.getAttribute(Gi)??""):this.updateSelectedByItem(t)}registerValue(t,n){var i;return t&&t===((i=this.allIds.get(t))==null?void 0:i.value)||this.allIds.set(t,{value:t,keywords:n}),this._commandState.filtered.items.set(t,Pt(this,jt,Ag).call(this,t,n)),this.sortAfterTick||(this.sortAfterTick=!0,In(()=>{Pt(this,jt,xu).call(this),this.sortAfterTick=!1})),()=>{this.allIds.delete(t)}}registerItem(t,n){return this.allItems.add(t),n&&(this.allGroups.has(n)?this.allGroups.get(n).add(t):this.allGroups.set(n,new Set([t]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,In(()=>{Pt(this,jt,Au).call(this),Pt(this,jt,xu).call(this),this.sortAndFilterAfterTick=!1})),Pt(this,jt,yu).call(this),()=>{const i=Pt(this,jt,Po).call(this);this.allIds.delete(t),this.allItems.delete(t),this.commandState.filtered.items.delete(t),Pt(this,jt,Au).call(this),(i==null?void 0:i.getAttribute("id"))===t&&Pt(this,jt,Su).call(this),Pt(this,jt,yu).call(this)}}registerGroup(t){return this.allGroups.has(t)||this.allGroups.set(t,new Set),()=>{this.allIds.delete(t),this.allGroups.delete(t)}}onkeydown(t){switch(t.key){case mI:case bI:{this.opts.vimBindings.current&&t.ctrlKey&&Pt(this,jt,Pg).call(this,t);break}case Ai:Pt(this,jt,Pg).call(this,t);break;case vI:case _I:{this.opts.vimBindings.current&&t.ctrlKey&&Pt(this,jt,Eg).call(this,t);break}case Kr:Pt(this,jt,Eg).call(this,t);break;case cl:t.preventDefault(),this.updateSelectedToIndex(0);break;case ul:t.preventDefault(),Pt(this,jt,Cg).call(this);break;case Zr:if(!t.isComposing&&t.keyCode!==229){t.preventDefault();const n=Pt(this,jt,Po).call(this);n&&(n==null||n.click())}}}get props(){return m(A(this,md))}}Xo=new WeakMap,Ua=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,jt=new WeakSet,Pw=function(){return o0(this._commandState)},yu=function(){A(this,Xo)||(le(this,Xo,!0),In(()=>{var i,s;le(this,Xo,!1);const t=Pt(this,jt,Pw).call(this);!Object.is(this.commandState,t)&&(this.commandState=t,(s=(i=this.opts.onStateChange)==null?void 0:i.current)==null||s.call(i,t))}))},Ag=function(t,n){const i=this.opts.filter.current??Iw;return t?i(t,this._commandState.search,n):0},xu=function(){var l;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Pt(this,jt,Su).call(this);return}const t=this._commandState.filtered.items,n=[];for(const c of this._commandState.filtered.groups){const d=this.allGroups.get(c);let f=0;if(!d){n.push([c,f]);continue}for(const h of d){const g=t.get(h);f=Math.max(g??0,f)}n.push([c,f])}const i=this.viewportNode,s=this.getValidItems().sort((c,d)=>{const f=c.getAttribute("data-value"),h=d.getAttribute("data-value"),g=t.get(f)??0;return(t.get(h)??0)-g});for(const c of s){const d=c.closest(Uh);if(d){const f=c.parentElement===d?c:c.closest(`${Uh} > *`);f&&d.appendChild(f)}else{const f=c.parentElement===i?c:c.closest(`${Uh} > *`);f&&(i==null||i.appendChild(f))}}const a=n.sort((c,d)=>d[1]-c[1]);for(const c of a){const d=i==null?void 0:i.querySelector(`${xs}[${Gi}="${ww(c[0])}"]`);(l=d==null?void 0:d.parentElement)==null||l.appendChild(d)}Pt(this,jt,Su).call(this)},Su=function(){In(()=>{const t=this.getValidItems().find(i=>i.getAttribute("aria-disabled")!=="true"),n=t==null?void 0:t.getAttribute(Gi);this.setValue(n||"")})},Au=function(){var n,i;if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let t=0;for(const s of this.allItems){const a=((n=this.allIds.get(s))==null?void 0:n.value)??"",l=((i=this.allIds.get(s))==null?void 0:i.keywords)??[],c=Pt(this,jt,Ag).call(this,a,l);this._commandState.filtered.items.set(s,c),c>0&&t++}for(const[s,a]of this.allGroups)for(const l of a){const c=this._commandState.filtered.items.get(l);if(c&&c>0){this._commandState.filtered.groups.add(s);break}}this._commandState.filtered.count=t},Po=function(){const t=this.opts.ref.current;if(!t)return;const n=t.querySelector(`${Gh}[data-selected]`);if(n)return n},Ew=function(){In(()=>{var s,a,l,c;const t=Pt(this,jt,Po).call(this);if(!t)return;const n=(s=t.parentElement)==null?void 0:s.parentElement;if(!n)return;const i=GI(n);if(i&&((a=i.dataset)==null?void 0:a.value)===((l=t.dataset)==null?void 0:l.value)){const d=(c=t==null?void 0:t.closest(xs))==null?void 0:c.querySelector(CM);d==null||d.scrollIntoView({block:"nearest"});return}t.scrollIntoView({block:"nearest"})})},Cg=function(){return this.updateSelectedToIndex(this.getValidItems().length-1)},Pg=function(t){t.preventDefault(),t.metaKey?Pt(this,jt,Cg).call(this):t.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)},Eg=function(t){t.preventDefault(),t.metaKey?this.updateSelectedToIndex(0):t.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},md=new WeakMap;var Za,bd,_d;class kM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Za,!0);F(this,bd,N(()=>this.root._commandState.filtered.count===0&&A(this,Za)===!1||this.opts.forceMount.current));F(this,_d,N(()=>({id:this.opts.id.current,role:"presentation",[SM]:""})));this.opts=t,this.root=n,df(()=>{le(this,Za,!1)}),$t({...t,deps:()=>this.shouldRender})}get shouldRender(){return m(A(this,bd))}get props(){return m(A(this,_d))}}Za=new WeakMap,bd=new WeakMap,_d=new WeakMap;var Ja,Qa,wd,yd;class TM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Ja,vt(null));F(this,Qa,vt(""));F(this,wd,N(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));F(this,yd,N(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[yw]:""})));this.opts=t,this.root=n,this.trueValue=t.value.current??t.id.current,$t({...t,deps:()=>this.shouldRender}),ie(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),xe(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}get headingNode(){return m(A(this,Ja))}set headingNode(t){rt(A(this,Ja),dt(t))}get trueValue(){return m(A(this,Qa))}set trueValue(t){rt(A(this,Qa),dt(t))}get shouldRender(){return m(A(this,wd))}get props(){return m(A(this,yd))}}Ja=new WeakMap,Qa=new WeakMap,wd=new WeakMap,yd=new WeakMap;var xd;class IM{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,xd,N(()=>({id:this.opts.id.current,[Sw]:""})));this.opts=t,this.group=n,$t({...t,onRefChange:i=>{this.group.headingNode=i}})}get props(){return m(A(this,xd))}}xd=new WeakMap;var Sd;class OM{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,Sd,N(()=>{var t;return{id:this.opts.id.current,role:"group",[xw]:"","aria-labelledby":((t=this.group.headingNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.group=n,$t(t)}get props(){return m(A(this,Sd))}}Sd=new WeakMap;var Ad,Cd;class NM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Ad,N(()=>{var n;const t=(n=this.root.viewportNode)==null?void 0:n.querySelector(`${Cw}[${Gi}="${ww(this.root.opts.value.current)}"]`);if(t)return(t==null?void 0:t.getAttribute("id"))??void 0}));F(this,Cd,N(()=>{var t,n;return{id:this.opts.id.current,type:"text",[xM]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":ll(!0),"aria-controls":((t=this.root.viewportNode)==null?void 0:t.id)??void 0,"aria-labelledby":((n=this.root.labelNode)==null?void 0:n.id)??void 0,"aria-activedescendant":m(A(this,Ad))}}));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.inputNode=i}}),ie(()=>this.opts.ref.current,()=>{const i=this.opts.ref.current;i&&this.opts.autofocus.current&&al(10,()=>i.focus())}),ie(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}get props(){return m(A(this,Cd))}}Ad=new WeakMap,Cd=new WeakMap;var Ji,Pd,ja,Ed,kd,ro,kw,kg,Td;class RM{constructor(t,n){F(this,ro);Y(this,"opts");Y(this,"root");F(this,Ji,null);F(this,Pd,N(()=>{var t;return this.opts.forceMount.current||((t=A(this,Ji))==null?void 0:t.opts.forceMount.current)===!0}));F(this,ja,vt(""));F(this,Ed,N(()=>{if(this.opts.ref.current,m(A(this,Pd))||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;const t=this.root.commandState.filtered.items.get(this.trueValue);return t===void 0?!1:t>0}));F(this,kd,N(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));F(this,Td,N(()=>({id:this.opts.id.current,"aria-disabled":lp(this.opts.disabled.current),"aria-selected":cI(this.isSelected),"data-disabled":Zn(this.opts.disabled.current),"data-selected":hI(this.isSelected),"data-value":this.trueValue,[Aw]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick})));this.opts=t,this.root=n,le(this,Ji,hl.getOr(null)),this.trueValue=t.value.current,$t({...t,deps:()=>!!this.root.commandState.search}),ie([()=>this.trueValue,()=>{var i;return(i=A(this,Ji))==null?void 0:i.trueValue},()=>this.opts.forceMount.current],()=>{var i;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(i=A(this,Ji))==null?void 0:i.trueValue)}),ie([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{var i,s;!this.opts.value.current&&((i=this.opts.ref.current)!=null&&i.textContent)&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.root.registerValue(this.trueValue,t.keywords.current.map(a=>a.trim())),(s=this.opts.ref.current)==null||s.setAttribute(Gi,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}get trueValue(){return m(A(this,ja))}set trueValue(t){rt(A(this,ja),dt(t))}get shouldRender(){return m(A(this,Ed))}get isSelected(){return m(A(this,kd))}onpointermove(t){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Pt(this,ro,kg).call(this)}onclick(t){this.opts.disabled.current||Pt(this,ro,kw).call(this)}get props(){return m(A(this,Td))}}Ji=new WeakMap,Pd=new WeakMap,ja=new WeakMap,Ed=new WeakMap,kd=new WeakMap,ro=new WeakSet,kw=function(){var t;this.opts.disabled.current||(Pt(this,ro,kg).call(this),(t=this.opts.onSelect)==null||t.current())},kg=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},Td=new WeakMap;var Id;class MM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Id,N(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[yM]:""})));this.opts=t,this.root=n,$t(t)}get props(){return m(A(this,Id))}}Id=new WeakMap;var Od;class LM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Od,N(()=>{var t;return{id:this.opts.id.current,[AM]:"",for:(t=this.opts.for)==null?void 0:t.current,style:C0}}));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.labelNode=i}})}get props(){return m(A(this,Od))}}Od=new WeakMap;function DM(e){return so.set(new EM(e))}function FM(e){return new kM(e,so.get())}function BM(e){const t=hl.getOr(null);return new RM({...e,group:t},so.get())}function VM(e){return hl.set(new TM(e,so.get()))}function zM(e){return new IM(e,hl.get())}function WM(e){return new OM(e,hl.get())}function HM(e){return new NM(e,so.get())}function UM(e){return PM.set(new MM(e,so.get()))}function GM(e){return new LM(e,so.get())}var KM=et("<label><!></label>");function qM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children"]);const a=GM({id:B.with(()=>n()),ref:B.with(()=>i(),h=>i(h))}),l=N(()=>Wt(s,a.props));var c=KM();let d;var f=tt(c);it(f,()=>t.children??St),$(c),yt(()=>d=Lt(c,d,{...m(l)})),P(e,c),ht()}var YM=et("<!> <!>",1),XM=et("<div><!> <!></div>");function ZM(e,t){ft(t,!0);const n=q=>{qM(q,{children:(at,gt)=>{we();var W=Ce();yt(()=>De(W,g())),P(at,W)},$$slots:{default:!0}})};let i=k(t,"id",19,te),s=k(t,"ref",15,null),a=k(t,"value",15,""),l=k(t,"onValueChange",3,ne),c=k(t,"onStateChange",3,ne),d=k(t,"loop",3,!1),f=k(t,"shouldFilter",3,!0),h=k(t,"filter",3,Iw),g=k(t,"label",3,""),v=k(t,"vimBindings",3,!0),b=k(t,"disablePointerSelection",3,!1),_=xt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","children","child"]);const y=DM({id:B.with(()=>i()),ref:B.with(()=>s(),q=>s(q)),filter:B.with(()=>h()),shouldFilter:B.with(()=>f()),loop:B.with(()=>d()),value:B.with(()=>a(),q=>{a()!==q&&(a(q),l()(q))}),vimBindings:B.with(()=>v()),disablePointerSelection:B.with(()=>b()),onStateChange:B.with(()=>c())}),x=q=>y.updateSelectedToIndex(q),S=q=>y.updateSelectedByGroup(q),I=q=>y.updateSelectedByItem(q),T=()=>y.getValidItems(),O=N(()=>Wt(_,y.props));var D=X(),L=z(D);{var M=q=>{var at=YM(),gt=z(at);n(gt);var W=_t(gt,2);it(W,()=>t.child,()=>({props:m(O)})),P(q,at)},U=q=>{var at=XM();let gt;var W=tt(at);n(W);var j=_t(W,2);it(j,()=>t.children??St),$(at),yt(()=>gt=Lt(at,gt,{...m(O)})),P(q,at)};wt(L,q=>{t.child?q(M):q(U,!1)})}return P(e,D),ht({updateSelectedToIndex:x,updateSelectedByGroup:S,updateSelectedByItem:I,getValidItems:T})}var JM=et("<div><!></div>");function QM(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const l=FM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),forceMount:B.with(()=>s())}),c=N(()=>Wt(l.props,a));var d=X(),f=z(d);{var h=g=>{var v=X(),b=z(v);{var _=x=>{var S=X(),I=z(S);it(I,()=>t.child,()=>({props:m(c)})),P(x,S)},y=x=>{var S=JM();let I;var T=tt(S);it(T,()=>t.children??St),$(S),yt(()=>I=Lt(S,I,{...m(c)})),P(x,S)};wt(b,x=>{t.child?x(_):x(y,!1)})}P(g,v)};wt(f,g=>{l.shouldRender&&g(h)})}P(e,d),ht()}var jM=et("<div><!></div>");function $M(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"value",3,""),a=k(t,"forceMount",3,!1),l=xt(t,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const c=VM({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b)),forceMount:B.with(()=>a()),value:B.with(()=>s())}),d=N(()=>Wt(l,c.props));var f=X(),h=z(f);{var g=b=>{var _=X(),y=z(_);it(y,()=>t.child,()=>({props:m(d)})),P(b,_)},v=b=>{var _=jM();let y;var x=tt(_);it(x,()=>t.children??St),$(_),yt(()=>y=Lt(_,y,{...m(d)})),P(b,_)};wt(h,b=>{t.child?b(g):b(v,!1)})}P(e,f),ht()}var t3=et("<div><!></div>");function e3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=zM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=t3();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}var n3=et("<div><!></div>"),r3=et('<div style="display: contents;"><!></div>');function i3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=WM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var c=r3(),d=tt(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=n3();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}$(c),P(e,c),ht()}var o3=et("<input>");function s3(e,t){ft(t,!0);let n=k(t,"value",15,""),i=k(t,"autofocus",3,!1),s=k(t,"id",19,te),a=k(t,"ref",15,null),l=xt(t,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const c=HM({id:B.with(()=>s()),ref:B.with(()=>a(),b=>a(b)),value:B.with(()=>n(),b=>{n(b)}),autofocus:B.with(()=>i()??!1)}),d=N(()=>Wt(l,c.props));var f=X(),h=z(f);{var g=b=>{var _=X(),y=z(_);it(y,()=>t.child,()=>({props:m(d)})),P(b,_)},v=b=>{var _=o3();Iu(_);let y;yt(()=>y=Lt(_,y,{...m(d)})),h0(_,n),P(b,_)};wt(h,b=>{t.child?b(g):b(v,!1)})}P(e,f),ht()}var a3=et("<div><!></div>"),l3=et('<div style="display: contents;" data-item-wrapper=""><!></div>');function u3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"value",3,""),a=k(t,"disabled",3,!1),l=k(t,"onSelect",3,ne),c=k(t,"forceMount",3,!1),d=k(t,"keywords",19,()=>[]),f=xt(t,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const h=BM({id:B.with(()=>n()),ref:B.with(()=>i(),_=>i(_)),value:B.with(()=>s()),disabled:B.with(()=>a()),onSelect:B.with(()=>l()),forceMount:B.with(()=>c()),keywords:B.with(()=>d())}),g=N(()=>Wt(f,h.props));var v=X(),b=z(v);Ws(b,()=>h.root.key,_=>{var y=l3(),x=tt(y);{var S=I=>{var T=X(),O=z(T);{var D=M=>{var U=X(),q=z(U);it(q,()=>t.child,()=>({props:m(g)})),P(M,U)},L=M=>{var U=a3();let q;var at=tt(U);it(at,()=>t.children??St),$(U),yt(()=>q=Lt(U,q,{...m(g)})),P(M,U)};wt(O,M=>{t.child?M(D):M(L,!1)})}P(I,T)};wt(x,I=>{h.shouldRender&&I(S)})}$(y),yt(()=>ze(y,"data-value",h.trueValue)),P(_,y)}),P(e,v),ht()}var c3=et("<div><!></div>");function d3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const a=UM({id:B.with(()=>n()),ref:B.with(()=>i(),f=>i(f)),ariaLabel:B.with(()=>t["aria-label"]??"Suggestions...")}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);Ws(d,()=>a.root._commandState.search==="",f=>{var h=X(),g=z(h);{var v=_=>{var y=X(),x=z(y);it(x,()=>t.child,()=>({props:m(l)})),P(_,y)},b=_=>{var y=c3();let x;var S=tt(y);it(S,()=>t.children??St),$(y),yt(()=>x=Lt(y,x,{...m(l)})),P(_,y)};wt(g,_=>{t.child?_(v):_(b,!1)})}P(f,h)}),P(e,c),ht()}const i_=1,f3=.9,h3=.8,g3=.17,Kh=.1,qh=.999,p3=.9999,v3=.99,m3=/[\\/_+.#"@[({&]/,b3=/[\\/_+.#"@[({&]/g,_3=/[\s-]/,Tw=/[\s-]/g;function Tg(e,t,n,i,s,a,l){if(a===t.length)return s===e.length?i_:v3;const c=`${s},${a}`;if(l[c]!==void 0)return l[c];const d=i.charAt(a);let f=n.indexOf(d,s),h=0,g,v,b,_;for(;f>=0;)g=Tg(e,t,n,i,f+1,a+1,l),g>h&&(f===s?g*=i_:m3.test(e.charAt(f-1))?(g*=h3,b=e.slice(s,f-1).match(b3),b&&s>0&&(g*=qh**b.length)):_3.test(e.charAt(f-1))?(g*=f3,_=e.slice(s,f-1).match(Tw),_&&s>0&&(g*=qh**_.length)):(g*=g3,s>0&&(g*=qh**(f-s))),e.charAt(f)!==t.charAt(a)&&(g*=p3)),(g<Kh&&n.charAt(f-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(f-1)!==i.charAt(a))&&(v=Tg(e,t,n,i,f+1,a+2,l),v*Kh>g&&(g=v*Kh)),g>h&&(h=g),f=n.indexOf(d,f+1);return l[c]=h,h}function o_(e){return e.toLowerCase().replace(Tw," ")}function Iw(e,t,n){return e=n&&n.length>0?`${`${e} ${n==null?void 0:n.join(" ")}`}`:e,Tg(e,t,o_(e),o_(t),0,0,{})}var $a,tl;class w3{constructor(t){Y(this,"opts");F(this,$a,vt(null));F(this,tl,vt(null));this.opts=t}get contentNode(){return m(A(this,$a))}set contentNode(t){rt(A(this,$a),dt(t))}get triggerNode(){return m(A(this,tl))}set triggerNode(t){rt(A(this,tl),dt(t))}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}}$a=new WeakMap,tl=new WeakMap;var Nd,Ow,Rd;class y3{constructor(t,n){F(this,Nd);Y(this,"opts");Y(this,"root");F(this,Rd,N(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ll(this.root.opts.open.current),"data-state":Ni(this.root.opts.open.current),"aria-controls":Pt(this,Nd,Ow).call(this),"data-popover-trigger":"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick})));this.opts=t,this.root=n,$t({...t,onRefChange:i=>{this.root.triggerNode=i}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button===0&&this.root.toggleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Zr||t.key===Yr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return m(A(this,Rd))}}Nd=new WeakSet,Ow=function(){var t,n;if(this.root.opts.open.current&&((t=this.root.contentNode)!=null&&t.id))return(n=this.root.contentNode)==null?void 0:n.id},Rd=new WeakMap;var Md,Ld;class x3{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"onInteractOutside",t=>{this.opts.onInteractOutside.current(t),!(t.defaultPrevented||!D0(t.target)||t.target.closest("[data-popover-trigger]")===this.root.triggerNode)&&this.root.handleClose()});Y(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Y(this,"onCloseAutoFocus",t=>{var n;this.opts.onCloseAutoFocus.current(t),!t.defaultPrevented&&(t.preventDefault(),(n=this.root.triggerNode)==null||n.focus())});F(this,Md,N(()=>({open:this.root.opts.open.current})));F(this,Ld,N(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Ni(this.root.opts.open.current),"data-popover-content":"",style:{pointerEvents:"auto"}})));Y(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onCloseAutoFocus:this.onCloseAutoFocus});this.opts=t,this.root=n,$t({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i}})}get snippetProps(){return m(A(this,Md))}get props(){return m(A(this,Ld))}}Md=new WeakMap,Ld=new WeakMap;const Ap=new sn("Popover.Root");function S3(e){return Ap.set(new w3(e))}function A3(e){return new y3(e,Ap.get())}function C3(e){return new x3(e,Ap.get())}var P3=et("<div><div><!></div></div>"),E3=et("<div><div><!></div></div>");function k3(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=k(t,"forceMount",3,!1),a=k(t,"onCloseAutoFocus",3,ne),l=k(t,"onEscapeKeydown",3,ne),c=k(t,"onInteractOutside",3,ne),d=k(t,"trapFocus",3,!0),f=k(t,"preventScroll",3,!1),h=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll"]);const g=C3({id:B.with(()=>i()),ref:B.with(()=>n(),S=>n(S)),onInteractOutside:B.with(()=>c()),onEscapeKeydown:B.with(()=>l()),onCloseAutoFocus:B.with(()=>a())}),v=N(()=>Wt(h,g.props));var b=X(),_=z(b);{var y=S=>{bw(S,Rt(()=>m(v),()=>g.popperProps,{get enabled(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!0,popper:(T,O)=>{let D=()=>O==null?void 0:O().props,L=()=>O==null?void 0:O().wrapperProps;var M=X();const U=N(()=>Wt(D(),{style:e_("popover")}));var q=z(M);{var at=W=>{var j=X(),G=z(j),Z=nn(()=>({props:m(U),wrapperProps:L(),...g.snippetProps}));it(G,()=>t.child,()=>m(Z)),P(W,j)},gt=W=>{var j=P3();let G;var Z=tt(j);let Q;var ot=tt(Z);it(ot,()=>t.children??St),$(Z),$(j),yt(()=>{G=Lt(j,G,{...L()}),Q=Lt(Z,Q,{...m(U)})}),P(W,j)};wt(q,W=>{t.child?W(at):W(gt,!1)})}P(T,M)},$$slots:{popper:!0}}))},x=(S,I)=>{{var T=O=>{mw(O,Rt(()=>m(v),()=>g.popperProps,{get present(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!1,popper:(L,M)=>{let U=()=>M==null?void 0:M().props,q=()=>M==null?void 0:M().wrapperProps;var at=X();const gt=N(()=>Wt(U(),{style:e_("popover")}));var W=z(at);{var j=Z=>{var Q=X(),ot=z(Q),ut=nn(()=>({props:m(gt),wrapperProps:q(),...g.snippetProps}));it(ot,()=>t.child,()=>m(ut)),P(Z,Q)},G=Z=>{var Q=E3();let ot;var ut=tt(Q);let mt;var bt=tt(ut);it(bt,()=>t.children??St),$(ut),$(Q),yt(()=>{ot=Lt(Q,ot,{...q()}),mt=Lt(ut,mt,{...m(gt)})}),P(Z,Q)};wt(W,Z=>{t.child?Z(j):Z(G,!1)})}P(L,at)},$$slots:{popper:!0}}))};wt(S,O=>{s()||O(T)},I)}};wt(_,S=>{s()?S(y):S(x,!1)})}P(e,b),ht()}var T3=et("<button><!></button>");function I3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),a=k(t,"disabled",3,!1),l=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled"]);const c=A3({id:B.with(()=>n()),ref:B.with(()=>i(),v=>i(v)),disabled:B.with(()=>!!a())}),d=N(()=>Wt(l,c.props,{type:s()})),f=$r(),[h,g]=f;pw(e,{get id(){return n()},children:(v,b)=>{var _=X(),y=z(_);{var x=I=>{var T=X(),O=z(T);it(O,()=>t.child,()=>({props:m(d)})),P(I,T)},S=I=>{var T=T3();let O;var D=tt(T);it(D,()=>t.children??St),$(T),yt(L=>O=Lt(T,O,{...L}),[()=>g({...m(d)},[{attribute_name:"formaction"}])]),P(I,T)};wt(y,I=>{t.child?I(x):I(S,!1)})}P(v,_)},$$slots:{default:!0}}),ht()}function O3(e,t){ft(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,ne);MI({variant:B.with(()=>"dialog"),open:B.with(()=>n(),l=>{n(l),i()(l)})});var s=X(),a=z(s);it(a,()=>t.children??St),P(e,s),ht()}var N3=et("<button><!></button>");function Nw(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const l=zI({variant:B.with(()=>"close"),id:B.with(()=>n()),ref:B.with(()=>i(),y=>i(y)),disabled:B.with(()=>!!s())}),c=N(()=>Wt(a,l.props)),d=$r(),[f,h]=d;var g=X(),v=z(g);{var b=y=>{var x=X(),S=z(x);it(S,()=>t.child,()=>({props:m(c)})),P(y,x)},_=y=>{var x=N3();let S;var I=tt(x);it(I,()=>t.children??St),$(x),yt(T=>S=Lt(x,S,{...T}),[()=>h({...m(c)},[{attribute_name:"formaction"}])]),P(y,x)};wt(v,y=>{t.child?y(b):y(_,!1)})}P(e,g),ht()}var R3=et("<!> <!>",1),M3=et("<!> <div><!></div>",1);function Rw(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=k(t,"onCloseAutoFocus",3,ne),l=k(t,"onOpenAutoFocus",3,ne),c=k(t,"onEscapeKeydown",3,ne),d=k(t,"onInteractOutside",3,ne),f=k(t,"trapFocus",3,!0),h=k(t,"preventScroll",3,!0),g=k(t,"restoreScrollDelay",3,null),v=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const b=FI({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x))}),_=N(()=>Wt(v,b.props)),y=N(()=>b.root.opts.open.current||s());hf(e,Rt(()=>m(_),{get forceMount(){return s()},get present(){return m(y)},presence:S=>{const I=N(()=>LO({forceMount:s(),present:b.root.opts.open.current,trapFocus:f(),open:b.root.opts.open.current}));X0(S,{loop:!0,get trapFocus(){return m(I)},get onOpenAutoFocus(){return l()},get id(){return n()},onCloseAutoFocus:O=>{var D;a()(O),!O.defaultPrevented&&((D=b.root.triggerNode)==null||D.focus())},focusScope:(O,D)=>{let L=()=>D==null?void 0:D().props;G0(O,Rt(()=>m(_),{get enabled(){return b.root.opts.open.current},onEscapeKeydown:M=>{c()(M),!M.defaultPrevented&&b.root.handleClose()},children:(M,U)=>{U0(M,Rt(()=>m(_),{get enabled(){return b.root.opts.open.current},onInteractOutside:q=>{d()(q),!q.defaultPrevented&&b.root.handleClose()},children:(q,at)=>{J0(q,Rt(()=>m(_),{get enabled(){return b.root.opts.open.current},children:(gt,W)=>{var j=X(),G=z(j);{var Z=ot=>{var ut=R3(),mt=z(ut);{var bt=kt=>{Mu(kt,{get preventScroll(){return h()},get restoreScrollDelay(){return g()}})};wt(mt,kt=>{b.root.opts.open.current&&kt(bt)})}var st=_t(mt,2),At=nn(()=>({props:Wt(m(_),L()),...b.snippetProps}));it(st,()=>t.child,()=>m(At)),P(ot,ut)},Q=ot=>{var ut=M3(),mt=z(ut);Mu(mt,{get preventScroll(){return h()}});var bt=_t(mt,2);let st;var At=tt(bt);it(At,()=>t.children??St),$(bt),yt(kt=>st=Lt(bt,st,{...kt}),[()=>Wt(m(_),L())]),P(ot,ut)};wt(G,ot=>{t.child?ot(Z):ot(Q,!1)})}P(gt,j)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})},$$slots:{presence:!0}})),ht()}const L3="data-label-root";var Dd;class D3{constructor(t){Y(this,"opts");F(this,Dd,N(()=>({id:this.opts.id.current,[L3]:"",onmousedown:this.onmousedown})));this.opts=t,this.onmousedown=this.onmousedown.bind(this),$t(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return m(A(this,Dd))}}Dd=new WeakMap;function F3(e){return new D3(e)}var B3=et("<label><!></label>");function V3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=F3({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props,{for:t.for}));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=B3();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l),for:t.for})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}function z3(e,t){ft(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,ne);S3({open:B.with(()=>n(),s=>{n(s),i()(s)})}),uw(e,{children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}}),ht()}var W3=et("<!> <!>",1);function H3(e,t){ft(t,!0);let n=k(t,"value",15),i=k(t,"onValueChange",3,ne),s=k(t,"name",3,""),a=k(t,"disabled",3,!1),l=k(t,"open",15,!1),c=k(t,"onOpenChange",3,ne),d=k(t,"loop",3,!1),f=k(t,"scrollAlignment",3,"nearest"),h=k(t,"required",3,!1),g=k(t,"items",19,()=>[]),v=k(t,"allowDeselect",3,!1);function b(){n()===void 0&&n(t.type==="single"?"":[])}b(),ie.pre(()=>n(),()=>{b()});const _=FR({type:t.type,value:B.with(()=>n(),O=>{n(O),i()(O)}),disabled:B.with(()=>a()),required:B.with(()=>h()),open:B.with(()=>l(),O=>{l(O),c()(O)}),loop:B.with(()=>d()),scrollAlignment:B.with(()=>f()),name:B.with(()=>s()),isCombobox:!1,items:B.with(()=>g()),allowDeselect:B.with(()=>v())});var y=W3(),x=z(y);uw(x,{children:(O,D)=>{var L=X(),M=z(L);it(M,()=>t.children??St),P(O,L)},$$slots:{default:!0}});var S=_t(x,2);{var I=O=>{var D=X(),L=z(D);{var M=U=>{var q=X(),at=z(q);Ei(at,17,()=>_.opts.value.current,ff,(gt,W)=>{n_(gt,{get value(){return m(W)}})}),P(U,q)};wt(L,U=>{_.opts.value.current.length&&U(M)})}P(O,D)},T=O=>{n_(O,{get value(){return _.opts.value.current},set value(D){_.opts.value.current=D}})};wt(S,O=>{Array.isArray(_.opts.value.current)?O(I):O(T,!1)})}P(e,y),ht()}var U3=et("<button><!></button>");function G3(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),a=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const l=VR({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b))}),c=N(()=>Wt(a,l.props,{type:s()})),d=$r(),[f,h]=d;var g=X(),v=z(g);Ot(v,()=>pw,(b,_)=>{_(b,{get id(){return n()},children:(y,x)=>{var S=X(),I=z(S);{var T=D=>{var L=X(),M=z(L);it(M,()=>t.child,()=>({props:m(c)})),P(D,L)},O=D=>{var L=U3();let M;var U=tt(L);it(U,()=>t.children??St),$(L),yt(q=>M=Lt(L,M,{...q}),[()=>h({...m(c)},[{attribute_name:"formaction"}])]),P(D,L)};wt(I,D=>{t.child?D(T):D(O,!1)})}P(y,S)},$$slots:{default:!0}})}),P(e,g),ht()}function K3(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.right=`${n}%`):e==="rl"?(i.right=`${t}%`,i.left=`${n}%`):e==="bt"?(i.bottom=`${t}%`,i.top=`${n}%`):(i.top=`${t}%`,i.bottom=`${n}%`),i}function Mw(e,t){const n={position:"absolute"};return e==="lr"?(n.left=`${t}%`,n.translate="-50% 0"):e==="rl"?(n.right=`${t}%`,n.translate="50% 0"):e==="bt"?(n.bottom=`${t}%`,n.translate="0 50%"):(n.top=`${t}%`,n.translate="0 -50%"),n}function Lw(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.translate=`${n}% 0`):e==="rl"?(i.right=`${t}%`,i.translate=`${-n}% 0`):e==="bt"?(i.bottom=`${t}%`,i.translate=`0 ${-n}%`):(i.top=`${t}%`,i.translate=`0 ${n}%`),i}function Oo(e,t,n,i){const s=(e-(Number.isNaN(t)?0:t))%i;let a=Math.abs(s)*2>=i?e+Math.sign(s)*(i-Math.abs(s)):e-s;Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(n/i)*i):a<t?a=t:!Number.isNaN(n)&&a>n&&(a=t+Math.floor((n-t)/i)*i);const l=i.toString(),c=l.indexOf("."),d=c>=0?l.length-c:0;if(d>0){const f=10**d;a=Math.round(a*f)/f}return a}function Cp(e,t,n=!0){const[i,s]=e,[a,l]=t,c=(l-a)/(s-i);return d=>{const f=a+c*(d-i);return n?f>Math.max(a,l)?Math.max(a,l):f<Math.min(a,l)?Math.min(a,l):f:f}}const q3="data-slider-root",Bu="data-slider-thumb",Y3="data-slider-range",Dw="data-slider-tick";var el,Fd,Bd,Vd;class Fw{constructor(t){Y(this,"opts");F(this,el,vt(!1));F(this,Fd,N(()=>this.opts.orientation.current==="horizontal"?this.opts.dir.current==="rtl"?"rl":"lr":this.opts.dir.current==="rtl"?"tb":"bt"));F(this,Bd,N(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current==="horizontal"?"pan-y":"pan-x"}));Y(this,"getAllThumbs",()=>{const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(`[${Bu}]`)):[]});Y(this,"getThumbScale",()=>{var d,f;if(this.opts.thumbPositioning.current==="exact")return[0,100];const t=this.opts.orientation.current==="vertical",n=this.getAllThumbs()[0],i=t?n==null?void 0:n.offsetHeight:n==null?void 0:n.offsetWidth;if(i===void 0||Number.isNaN(i)||i===0)return[0,100];const s=t?(d=this.opts.ref.current)==null?void 0:d.offsetHeight:(f=this.opts.ref.current)==null?void 0:f.offsetWidth;if(s===void 0||Number.isNaN(s)||s===0)return[0,100];const a=i/2/s*100,l=a,c=100-a;return[l,c]});Y(this,"getPositionFromValue",t=>{const n=this.getThumbScale();return Cp([this.opts.min.current,this.opts.max.current],n)(t)});F(this,Vd,N(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":Zn(this.opts.disabled.current),style:{touchAction:m(A(this,Bd))},[q3]:""})));this.opts=t,$t(t)}get isActive(){return m(A(this,el))}set isActive(t){rt(A(this,el),dt(t))}get direction(){return m(A(this,Fd))}isThumbActive(t){return this.isActive}get props(){return m(A(this,Vd))}}el=new WeakMap,Fd=new WeakMap,Bd=new WeakMap,Vd=new WeakMap;var zd,Wd,Hd,Ud,Gd;class X3 extends Fw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!1);Y(this,"updateValue",n=>{this.opts.value.current=Oo(n,this.opts.min.current,this.opts.max.current,this.opts.step.current)});Y(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!i||!s)return;s.focus();const{left:a,right:l,top:c,bottom:d}=i.getBoundingClientRect();this.direction==="lr"?this.applyPosition({clientXY:n.clientX,start:a,end:l}):this.direction==="rl"?this.applyPosition({clientXY:n.clientX,start:l,end:a}):this.direction==="bt"?this.applyPosition({clientXY:n.clientY,start:d,end:c}):this.direction==="tb"&&this.applyPosition({clientXY:n.clientY,start:c,end:d})});Y(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!s||!i)return;const a=n.target;!F0(a)||!i.contains(a)||(n.preventDefault(),s.focus(),this.isActive=!0,this.handlePointerMove(n))});Y(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Rn(()=>this.opts.value.current)),this.isActive=!1)});F(this,zd,N(()=>{const n=this.opts.value.current;return Array.from({length:1},()=>{const i=n,s=this.getPositionFromValue(i),a=Mw(this.direction,s);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":lp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,tabindex:this.opts.disabled.current?-1:0,style:a,[Bu]:""}})}));F(this,Wd,N(()=>this.thumbsPropsArr.map((n,i)=>i)));F(this,Hd,N(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,a=n-i;let l=Math.ceil(a/s);a%s==0&&l++;const c=this.opts.value.current;return Array.from({length:l},(d,f)=>{const h=f*s,g=Cp([0,(l-1)*s],this.getThumbScale()),v=f===0,b=f===l-1,_=v?0:b?-100:-50,y=Lw(this.direction,g(h),_),x=i+f*s,S=x<=c;return{"data-disabled":Zn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":S?"":void 0,"data-value":x,style:y,[Dw]:""}})}));F(this,Ud,N(()=>this.ticksPropsArr.map((n,i)=>i)));F(this,Gd,N(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,ap(()=>qr(Re(document,"pointerdown",this.handlePointerDown),Re(document,"pointerup",this.handlePointerUp),Re(document,"pointermove",this.handlePointerMove),Re(document,"pointerleave",this.handlePointerUp))),ie([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const c=f=>Oo(f,s,a,i)===f,d=f=>Oo(f,s,a,i);c(l)||(this.opts.value.current=d(l))})}applyPosition({clientXY:n,start:i,end:s}){const a=this.opts.min.current,l=this.opts.max.current,d=(n-i)/(s-i)*(l-a)+a;if(d<a)this.updateValue(a);else if(d>l)this.updateValue(l);else{const f=this.opts.step.current,h=Math.floor((d-a)/f),g=a+h*f+f/2,v=a+(h+1)*f+f/2,b=d>=g&&d<v?(h+1)*f+a:h*f+a;b<=l&&this.updateValue(b)}}get thumbsPropsArr(){return m(A(this,zd))}get thumbsRenderArr(){return m(A(this,Wd))}get ticksPropsArr(){return m(A(this,Hd))}get ticksRenderArr(){return m(A(this,Ud))}get snippetProps(){return m(A(this,Gd))}}zd=new WeakMap,Wd=new WeakMap,Hd=new WeakMap,Ud=new WeakMap,Gd=new WeakMap;var nl,rl,Kd,qd,Yd,Xd,Zd,Jd;class Z3 extends Fw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!0);F(this,nl,vt(null));F(this,rl,vt(0));F(this,Kd,n=>{const i=this.getAllThumbs();if(!i.length)return;for(const c of i)c.blur();const s=i.map(c=>{if(this.opts.orientation.current==="horizontal"){const{left:d,right:f}=c.getBoundingClientRect();return Math.abs(n.clientX-(d+f)/2)}else{const{top:d,bottom:f}=c.getBoundingClientRect();return Math.abs(n.clientY-(d+f)/2)}}),a=i[s.indexOf(Math.min(...s))],l=i.indexOf(a);return{node:a,idx:l}});Y(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.activeThumb;if(!i||!s)return;s.node.focus();const{left:a,right:l,top:c,bottom:d}=i.getBoundingClientRect(),f=this.direction;f==="lr"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:a,end:l}):f==="rl"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:l,end:a}):f==="bt"?this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:d,end:c}):f==="tb"&&this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:c,end:d})});Y(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=A(this,Kd).call(this,n);if(!s||!i)return;const a=n.target;!F0(a)||!i.contains(a)||(n.preventDefault(),this.activeThumb=s,s.node.focus(),this.isActive=!0,this.handlePointerMove(n))});Y(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Rn(()=>this.opts.value.current)),this.isActive=!1)});Y(this,"getAllThumbs",()=>{const n=this.opts.ref.current;return n?Array.from(n.querySelectorAll(`[${Bu}]`)):[]});Y(this,"updateValue",(n,i)=>{const s=this.opts.value.current;if(!s.length){this.opts.value.current.push(n);return}if(s[i]===n)return;const l=[...s];if(!WO(i,l))return;const c=l[i]>n?-1:1,d=()=>{var _;const v=i+c;l[i]=l[v],l[v]=n;const b=this.getAllThumbs();b.length&&((_=b[v])==null||_.focus(),this.activeThumb={node:b[v],idx:v})};if(this.opts.autoSort.current&&(c===-1&&n<l[i-1]||c===1&&n>l[i+1])){d(),this.opts.value.current=l;return}const f=this.opts.min.current,h=this.opts.max.current,g=this.opts.step.current;l[i]=Oo(n,f,h,g),this.opts.value.current=l});F(this,qd,N(()=>{const n=this.opts.value.current;return Array.from({length:n.length||1},(i,s)=>{const a=Rn(()=>this.currentThumbIdx);a<n.length&&Rn(()=>{this.currentThumbIdx=a+1});const l=n[s],c=this.getPositionFromValue(l??0),d=Mw(this.direction,c);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":l,"aria-disabled":lp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":l,tabindex:this.opts.disabled.current?-1:0,style:d,[Bu]:""}})}));F(this,Yd,N(()=>this.thumbsPropsArr.map((n,i)=>i)));F(this,Xd,N(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,a=n-i;let l=Math.ceil(a/s);a%s==0&&l++;const c=this.opts.value.current;return Array.from({length:l},(d,f)=>{const h=f*s,g=Cp([0,(l-1)*s],this.getThumbScale()),v=f===0,b=f===l-1,_=v?0:b?-100:-50,y=Lw(this.direction,g(h),_),x=i+f*s,S=c.length===1?x<=c[0]:c[0]<=x&&x<=c[c.length-1];return{"data-disabled":Zn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":S?"":void 0,"data-value":x,style:y,[Dw]:""}})}));F(this,Zd,N(()=>this.ticksPropsArr.map((n,i)=>i)));F(this,Jd,N(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,ap(()=>qr(Re(document,"pointerdown",this.handlePointerDown),Re(document,"pointerup",this.handlePointerUp),Re(document,"pointermove",this.handlePointerMove),Re(document,"pointerleave",this.handlePointerUp))),ie([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const c=f=>Oo(f,s,a,i)===f,d=f=>Oo(f,s,a,i);l.some(f=>!c(f))&&(this.opts.value.current=l.map(d))})}get activeThumb(){return m(A(this,nl))}set activeThumb(n){rt(A(this,nl),dt(n))}get currentThumbIdx(){return m(A(this,rl))}set currentThumbIdx(n){rt(A(this,rl),dt(n))}isThumbActive(n){var i;return this.isActive&&((i=this.activeThumb)==null?void 0:i.idx)===n}applyPosition({clientXY:n,activeThumbIdx:i,start:s,end:a}){const l=this.opts.min.current,c=this.opts.max.current,f=(n-s)/(a-s)*(c-l)+l;if(f<l)this.updateValue(l,i);else if(f>c)this.updateValue(c,i);else{const h=this.opts.step.current,g=Math.floor((f-l)/h),v=l+g*h+h/2,b=l+(g+1)*h+h/2,_=f>=v&&f<b?(g+1)*h+l:g*h+l;_<=c&&this.updateValue(_,i)}}get thumbsPropsArr(){return m(A(this,qd))}get thumbsRenderArr(){return m(A(this,Yd))}get ticksPropsArr(){return m(A(this,Xd))}get ticksRenderArr(){return m(A(this,Zd))}get snippetProps(){return m(A(this,Jd))}}nl=new WeakMap,rl=new WeakMap,Kd=new WeakMap,qd=new WeakMap,Yd=new WeakMap,Xd=new WeakMap,Zd=new WeakMap,Jd=new WeakMap;const J3=[N0,R0,Kr,Ai,cl,ul];var Qd,jd;class Q3{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Qd,N(()=>{const t=Array.isArray(this.root.opts.value.current)&&this.root.opts.value.current.length>1?this.root.getPositionFromValue(Math.min(...this.root.opts.value.current)??0):0,n=Array.isArray(this.root.opts.value.current)?100-this.root.getPositionFromValue(Math.max(...this.root.opts.value.current)??0):100-this.root.getPositionFromValue(this.root.opts.value.current);return{position:"absolute",...K3(this.root.direction,t,n)}}));F(this,jd,N(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Zn(this.root.opts.disabled.current),style:this.rangeStyles,[Y3]:""})));this.opts=t,this.root=n,$t(t)}get rangeStyles(){return m(A(this,Qd))}get props(){return m(A(this,jd))}}Qd=new WeakMap,jd=new WeakMap;var $d,en,fn,tf;class j3{constructor(t,n){F(this,en);Y(this,"opts");Y(this,"root");F(this,$d,N(()=>this.root.opts.disabled.current||this.opts.disabled.current));F(this,tf,N(()=>({...this.root.thumbsPropsArr[this.opts.index.current],id:this.opts.id.current,onkeydown:this.onkeydown,"data-active":this.root.isThumbActive(this.opts.index.current)?"":void 0})));this.opts=t,this.root=n,$t(t),this.onkeydown=this.onkeydown.bind(this)}onkeydown(t){if(m(A(this,$d)))return;const n=this.opts.ref.current;if(!n)return;const i=this.root.getAllThumbs();if(!i.length)return;const s=i.indexOf(n);if(this.root.isMulti&&(this.root.currentThumbIdx=s),!J3.includes(t.key))return;t.preventDefault();const a=this.root.opts.min.current,l=this.root.opts.max.current,c=this.root.opts.value.current,d=Array.isArray(c)?c[s]:c,f=this.root.opts.orientation.current,h=this.root.direction,g=this.root.opts.step.current;switch(t.key){case cl:Pt(this,en,fn).call(this,a);break;case ul:Pt(this,en,fn).call(this,l);break;case N0:if(f!=="horizontal")break;if(t.metaKey){const v=h==="rl"?l:a;Pt(this,en,fn).call(this,v)}else h==="rl"&&d<l?Pt(this,en,fn).call(this,d+g):h==="lr"&&d>a&&Pt(this,en,fn).call(this,d-g);break;case R0:if(f!=="horizontal")break;if(t.metaKey){const v=h==="rl"?a:l;Pt(this,en,fn).call(this,v)}else h==="rl"&&d>a?Pt(this,en,fn).call(this,d-g):h==="lr"&&d<l&&Pt(this,en,fn).call(this,d+g);break;case Kr:if(t.metaKey){const v=h==="tb"?a:l;Pt(this,en,fn).call(this,v)}else h==="tb"&&d>a?Pt(this,en,fn).call(this,d-g):h!=="tb"&&d<l&&Pt(this,en,fn).call(this,d+g);break;case Ai:if(t.metaKey){const v=h==="tb"?l:a;Pt(this,en,fn).call(this,v)}else h==="tb"&&d<l?Pt(this,en,fn).call(this,d+g):h!=="tb"&&d>a&&Pt(this,en,fn).call(this,d-g);break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}get props(){return m(A(this,tf))}}$d=new WeakMap,en=new WeakSet,fn=function(t){this.root.isMulti?this.root.updateValue(t,this.opts.index.current):this.root.updateValue(t)},tf=new WeakMap;const Pp=new sn("Slider.Root");function $3(e){const{type:t,...n}=e,i=t==="single"?new X3(n):new Z3(n);return Pp.set(i)}function t5(e){return new Q3(e,Pp.get())}function e5(e){return new j3(e,Pp.get())}var n5=et("<span><!></span>");function r5(e,t){ft(t,!0);let n=k(t,"id",19,te),i=k(t,"ref",15,null),s=k(t,"value",15),a=k(t,"onValueChange",3,ne),l=k(t,"onValueCommit",3,ne),c=k(t,"disabled",3,!1),d=k(t,"min",3,0),f=k(t,"max",3,100),h=k(t,"step",3,1),g=k(t,"dir",3,"ltr"),v=k(t,"autoSort",3,!0),b=k(t,"orientation",3,"horizontal"),_=k(t,"thumbPositioning",3,"contain"),y=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","value","type","onValueChange","onValueCommit","disabled","min","max","step","dir","autoSort","orientation","thumbPositioning"]);function x(){s()===void 0&&s(t.type==="single"?0:[])}x(),ie.pre(()=>s(),()=>{x()});const S=$3({id:B.with(()=>n()),ref:B.with(()=>i(),M=>i(M)),value:B.with(()=>s(),M=>{s(M),a()(M)}),onValueCommit:B.with(()=>l()),disabled:B.with(()=>c()),min:B.with(()=>d()),max:B.with(()=>f()),step:B.with(()=>h()),dir:B.with(()=>g()),autoSort:B.with(()=>v()),orientation:B.with(()=>b()),thumbPositioning:B.with(()=>_()),type:t.type}),I=N(()=>Wt(y,S.props));var T=X(),O=z(T);{var D=M=>{var U=X(),q=z(U),at=nn(()=>({props:m(I),...S.snippetProps}));it(q,()=>t.child,()=>m(at)),P(M,U)},L=M=>{var U=n5();let q;var at=tt(U);it(at,()=>t.children??St,()=>S.snippetProps),$(U),yt(()=>q=Lt(U,q,{...m(I)})),P(M,U)};wt(O,M=>{t.child?M(D):M(L,!1)})}P(e,T),ht()}var i5=et("<span><!></span>");function o5(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const a=t5({id:B.with(()=>i()),ref:B.with(()=>n(),g=>n(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v);it(b,()=>t.child,()=>({props:m(l)})),P(g,v)},h=g=>{var v=i5();let b;var _=tt(v);it(_,()=>t.children??St),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}var s5=et("<span><!></span>");function a5(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=k(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","index","disabled"]);const l=e5({id:B.with(()=>i()),ref:B.with(()=>n(),v=>n(v)),index:B.with(()=>t.index),disabled:B.with(()=>s())}),c=N(()=>Wt(a,l.props));var d=X(),f=z(d);{var h=v=>{var b=X(),_=z(b),y=nn(()=>({active:l.root.isThumbActive(l.opts.index.current),props:m(c)}));it(_,()=>t.child,()=>m(y)),P(v,b)},g=v=>{var b=s5();let _;var y=tt(b),x=nn(()=>({active:l.root.isThumbActive(l.opts.index.current)}));it(y,()=>t.children??St,()=>m(x)),$(b),yt(()=>_=Lt(b,_,{...m(c)})),P(v,b)};wt(f,v=>{t.child?v(h):v(g,!1)})}P(e,d),ht()}const l5="data-switch-root",u5="data-switch-thumb";var il,Ig,ef,nf,rf;class c5{constructor(t){F(this,il);Y(this,"opts");F(this,ef,N(()=>({"data-disabled":Zn(this.opts.disabled.current),"data-state":uI(this.opts.checked.current),"data-required":fI(this.opts.required.current)})));F(this,nf,N(()=>({checked:this.opts.checked.current})));F(this,rf,N(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:O0(this.opts.disabled.current),"aria-checked":I0(this.opts.checked.current,!1),"aria-required":T0(this.opts.required.current),[l5]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,$t(t),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){!(t.key===Zr||t.key===Yr)||this.opts.disabled.current||(t.preventDefault(),Pt(this,il,Ig).call(this))}onclick(t){this.opts.disabled.current||Pt(this,il,Ig).call(this)}get sharedProps(){return m(A(this,ef))}get snippetProps(){return m(A(this,nf))}get props(){return m(A(this,rf))}}il=new WeakSet,Ig=function(){this.opts.checked.current=!this.opts.checked.current},ef=new WeakMap,nf=new WeakMap,rf=new WeakMap;var of,sf;class d5{constructor(t){Y(this,"root");F(this,of,N(()=>this.root.opts.name.current!==void 0));F(this,sf,N(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current})));this.root=t}get shouldRender(){return m(A(this,of))}get props(){return m(A(this,sf))}}of=new WeakMap,sf=new WeakMap;var af,lf;class f5{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,af,N(()=>({checked:this.root.opts.checked.current})));F(this,lf,N(()=>({...this.root.sharedProps,id:this.opts.id.current,[u5]:""})));this.opts=t,this.root=n,$t(t)}get snippetProps(){return m(A(this,af))}get props(){return m(A(this,lf))}}af=new WeakMap,lf=new WeakMap;const Ep=new sn("Switch.Root");function h5(e){return Ep.set(new c5(e))}function g5(){return new d5(Ep.get())}function p5(e){return new f5(e,Ep.get())}function v5(e,t){ft(t,!1);const n=g5();Qg();var i=X(),s=z(i);{var a=l=>{fp(l,Rt(()=>n.props))};wt(s,l=>{n.shouldRender&&l(a)})}P(e,i),ht()}var m5=et("<button><!></button>"),b5=et("<!> <!>",1);function _5(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=k(t,"disabled",3,!1),a=k(t,"required",3,!1),l=k(t,"checked",15,!1),c=k(t,"value",3,"on"),d=k(t,"name",3,void 0),f=k(t,"type",3,"button"),h=k(t,"onCheckedChange",3,ne),g=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const v=h5({checked:B.with(()=>l(),L=>{var M;l(L),(M=h())==null||M(L)}),disabled:B.with(()=>s()??!1),required:B.with(()=>a()),value:B.with(()=>c()),name:B.with(()=>d()),id:B.with(()=>i()),ref:B.with(()=>n(),L=>n(L))}),b=N(()=>Wt(g,v.props,{type:f()})),_=$r(),[y,x]=_;var S=b5(),I=z(S);{var T=L=>{var M=X(),U=z(M),q=nn(()=>({props:m(b),...v.snippetProps}));it(U,()=>t.child,()=>m(q)),P(L,M)},O=L=>{var M=m5();let U;var q=tt(M);it(q,()=>t.children??St,()=>v.snippetProps),$(M),yt(at=>U=Lt(M,U,{...at}),[()=>x({...m(b)},[{attribute_name:"formaction"}])]),P(L,M)};wt(I,L=>{t.child?L(T):L(O,!1)})}var D=_t(I,2);v5(D,{}),P(e,S),ht()}var w5=et("<span><!></span>");function y5(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,te),s=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const a=p5({id:B.with(()=>i()),ref:B.with(()=>n(),g=>n(g))}),l=N(()=>Wt(s,a.props));var c=X(),d=z(c);{var f=g=>{var v=X(),b=z(v),_=nn(()=>({props:m(l),...a.snippetProps}));it(b,()=>t.child,()=>m(_)),P(g,v)},h=g=>{var v=w5();let b;var _=tt(v);it(_,()=>t.children??St,()=>a.snippetProps),$(v),yt(()=>b=Lt(v,b,{...m(l)})),P(g,v)};wt(d,g=>{t.child?g(f):g(h,!1)})}P(e,c),ht()}const kp="-",x5=e=>{const t=A5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const c=l.split(kp);return c[0]===""&&c.length!==1&&c.shift(),Bw(c,t)||S5(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&i[l]?[...d,...i[l]]:d}}},Bw=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?Bw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(kp);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},s_=/^\[(.+)\]$/,S5=e=>{if(s_.test(e)){const t=s_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},A5=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return P5(Object.entries(e.classGroups),n).forEach(([a,l])=>{Og(l,i,a,t)}),i},Og=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:a_(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(C5(s)){Og(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{Og(l,a_(t,a),n,i)})})},a_=(e,t)=>{let n=e;return t.split(kp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},C5=e=>e.isThemeGetter,P5=(e,t)=>t?e.map(([n,i])=>{const s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,c])=>[t+l,c])):a);return[n,s]}):e,E5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=i.get(a))!==void 0)return s(a,l),l},set(a,l){n.has(a)?n.set(a,l):s(a,l)}}},Vw="!",k5=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],a=t.length,l=c=>{const d=[];let f=0,h=0,g;for(let x=0;x<c.length;x++){let S=c[x];if(f===0){if(S===s&&(i||c.slice(x,x+a)===t)){d.push(c.slice(h,x)),h=x+a;continue}if(S==="/"){g=x;continue}}S==="["?f++:S==="]"&&f--}const v=d.length===0?c:c.substring(h),b=v.startsWith(Vw),_=b?v.substring(1):v,y=g&&g>h?g-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:y}};return n?c=>n({className:c,parseClassName:l}):l},T5=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},I5=e=>({cache:E5(e.cacheSize),parseClassName:k5(e),...x5(e)}),O5=/\s+/,N5=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(O5);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=n(f);let _=!!b,y=i(_?v.substring(0,b):v);if(!y){if(!_){c=f+(c.length>0?" "+c:c);continue}if(y=i(v),!y){c=f+(c.length>0?" "+c:c);continue}_=!1}const x=T5(h).join(":"),S=g?x+Vw:x,I=S+y;if(a.includes(I))continue;a.push(I);const T=s(y,_);for(let O=0;O<T.length;++O){const D=T[O];a.push(S+D)}c=f+(c.length>0?" "+c:c)}return c};function R5(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zw(t))&&(i&&(i+=" "),i+=n);return i}const zw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=zw(e[i]))&&(n&&(n+=" "),n+=t);return n};function M5(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,g)=>g(h),e());return n=I5(f),i=n.cache.get,s=n.cache.set,a=c,c(d)}function c(d){const f=i(d);if(f)return f;const h=N5(d,n);return s(d,h),h}return function(){return a(R5.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ww=/^\[(?:([a-z-]+):)?(.+)\]$/i,L5=/^\d+\/\d+$/,D5=new Set(["px","full","screen"]),F5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,B5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,V5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,z5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lr=e=>No(e)||D5.has(e)||L5.test(e),di=e=>rs(e,"length",Z5),No=e=>!!e&&!Number.isNaN(Number(e)),Yh=e=>rs(e,"number",No),Ss=e=>!!e&&Number.isInteger(Number(e)),H5=e=>e.endsWith("%")&&No(e.slice(0,-1)),Zt=e=>Ww.test(e),fi=e=>F5.test(e),U5=new Set(["length","size","percentage"]),G5=e=>rs(e,U5,Hw),K5=e=>rs(e,"position",Hw),q5=new Set(["image","url"]),Y5=e=>rs(e,q5,Q5),X5=e=>rs(e,"",J5),As=()=>!0,rs=(e,t,n)=>{const i=Ww.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},Z5=e=>B5.test(e)&&!V5.test(e),Hw=()=>!1,J5=e=>z5.test(e),Q5=e=>W5.test(e),j5=()=>{const e=Oe("colors"),t=Oe("spacing"),n=Oe("blur"),i=Oe("brightness"),s=Oe("borderColor"),a=Oe("borderRadius"),l=Oe("borderSpacing"),c=Oe("borderWidth"),d=Oe("contrast"),f=Oe("grayscale"),h=Oe("hueRotate"),g=Oe("invert"),v=Oe("gap"),b=Oe("gradientColorStops"),_=Oe("gradientColorStopPositions"),y=Oe("inset"),x=Oe("margin"),S=Oe("opacity"),I=Oe("padding"),T=Oe("saturate"),O=Oe("scale"),D=Oe("sepia"),L=Oe("skew"),M=Oe("space"),U=Oe("translate"),q=()=>["auto","contain","none"],at=()=>["auto","hidden","clip","visible","scroll"],gt=()=>["auto",Zt,t],W=()=>[Zt,t],j=()=>["",Lr,di],G=()=>["auto",No,Zt],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ot=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ut=()=>["start","end","center","between","around","evenly","stretch"],mt=()=>["","0",Zt],bt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],st=()=>[No,Zt];return{cacheSize:500,separator:":",theme:{colors:[As],spacing:[Lr,di],blur:["none","",fi,Zt],brightness:st(),borderColor:[e],borderRadius:["none","","full",fi,Zt],borderSpacing:W(),borderWidth:j(),contrast:st(),grayscale:mt(),hueRotate:st(),invert:mt(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[H5,di],inset:gt(),margin:gt(),opacity:st(),padding:W(),saturate:st(),scale:st(),sepia:mt(),skew:st(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Zt]}],container:["container"],columns:[{columns:[fi]}],"break-after":[{"break-after":bt()}],"break-before":[{"break-before":bt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),Zt]}],overflow:[{overflow:at()}],"overflow-x":[{"overflow-x":at()}],"overflow-y":[{"overflow-y":at()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ss,Zt]}],basis:[{basis:gt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zt]}],grow:[{grow:mt()}],shrink:[{shrink:mt()}],order:[{order:["first","last","none",Ss,Zt]}],"grid-cols":[{"grid-cols":[As]}],"col-start-end":[{col:["auto",{span:["full",Ss,Zt]},Zt]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[As]}],"row-start-end":[{row:["auto",{span:[Ss,Zt]},Zt]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zt]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ut()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ut(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ut(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zt,t]}],"min-w":[{"min-w":[Zt,t,"min","max","fit"]}],"max-w":[{"max-w":[Zt,t,"none","full","min","max","fit","prose",{screen:[fi]},fi]}],h:[{h:[Zt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",fi,di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yh]}],"font-family":[{font:[As]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Zt]}],"line-clamp":[{"line-clamp":["none",No,Yh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Lr,Zt]}],"list-image":[{"list-image":["none",Zt]}],"list-style-type":[{list:["none","disc","decimal",Zt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Lr,di]}],"underline-offset":[{"underline-offset":["auto",Lr,Zt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),K5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",G5]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Y5]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[Lr,Zt]}],"outline-w":[{outline:[Lr,di]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Lr,di]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fi,X5]}],"shadow-color":[{shadow:[As]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ot(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ot()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",fi,Zt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zt]}],duration:[{duration:st()}],ease:[{ease:["linear","in","out","in-out",Zt]}],delay:[{delay:st()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Ss,Zt]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Lr,di,Yh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},$5=M5(j5);function se(...e){return $5(Ds(e))}function tL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","value","class"]);var a=X(),l=z(a);const c=N(()=>se("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t.class));Ot(l,()=>ZM,(d,f)=>{f(d,Rt({get class(){return m(c)}},()=>s,{get value(){return i()},set value(h){i(h)},get ref(){return n()},set ref(h){n(h)}}))}),P(e,a),ht()}function Uw(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("text-lg font-semibold leading-none tracking-tight",t.class));Ot(a,()=>HI,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}var eL=et("<div><!></div>");function nL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=eL();let a;var l=tt(s);it(l,()=>t.children??St),$(s),rr(s,c=>n(c),()=>n()),yt(c=>a=Lt(s,a,{class:c,...i}),[()=>se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)]),P(e,s),ht()}var rL=et("<div><!></div>");function Gw(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=rL();let a;var l=tt(s);it(l,()=>t.children??St),$(s),rr(s,c=>n(c),()=>n()),yt(c=>a=Lt(s,a,{class:c,...i}),[()=>se("flex flex-col space-y-1.5 text-center sm:text-left",t.class)]),P(e,s),ht()}function Kw(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("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/80",t.class));Ot(a,()=>Q0,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}function Tp(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"x"},()=>n,{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}var iL=et('<!> <span class="sr-only">Close</span>',1),oL=et("<!> <!>",1),sL=et("<!> <!>",1);function qw(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children"]);var s=X(),a=z(s);Ot(a,()=>Xw,(l,c)=>{c(l,Rt(()=>t.portalProps,{children:(d,f)=>{var h=sL(),g=z(h);Ot(g,()=>Kw,(_,y)=>{y(_,{})});var v=_t(g,2);const b=N(()=>se("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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t.class));Ot(v,()=>Rw,(_,y)=>{y(_,Rt({get class(){return m(b)}},()=>i,{get ref(){return n()},set ref(x){n(x)},children:(x,S)=>{var I=oL(),T=z(I);it(T,()=>t.children??St);var O=_t(T,2);Ot(O,()=>Nw,(D,L)=>{L(D,{class:"ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:(M,U)=>{var q=iL(),at=z(q);Tp(at,{class:"size-4"}),we(2),P(M,q)},$$slots:{default:!0}})}),P(x,I)},$$slots:{default:!0}}))}),P(d,h)},$$slots:{default:!0}}))}),P(e,s),ht()}function aL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("text-muted-foreground text-sm",t.class));Ot(a,()=>zO,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}const Yw=O3,lL=BO,Xw=dl;function uL(e,t){ft(t,!0),k(t,"ref",11,null);let n=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var i=X(),s=z(i);const a=N(()=>se("py-6 text-center text-sm",t.class));Ot(s,()=>QM,(l,c)=>{c(l,Rt({get class(){return m(a)}},()=>n))}),P(e,i),ht()}var cL=et("<!> <!>",1);function dL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var s=X(),a=z(s);const l=N(()=>se("text-foreground overflow-hidden p-1",t.class)),c=N(()=>t.value??t.heading??`----${te()}`);Ot(a,()=>$M,(d,f)=>{f(d,Rt({get class(){return m(l)},get value(){return m(c)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{var v=cL(),b=z(v);{var _=x=>{var S=X(),I=z(S);Ot(I,()=>e3,(T,O)=>{O(T,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(D,L)=>{we();var M=Ce();yt(()=>De(M,t.heading)),P(D,M)},$$slots:{default:!0}})}),P(x,S)};wt(b,x=>{t.heading&&x(_)})}var y=_t(b,2);Ot(y,()=>i3,(x,S)=>{S(x,{get children(){return t.children}})}),P(h,v)},$$slots:{default:!0}}))}),P(e,s),ht()}function fL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t.class));Ot(a,()=>u3,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}function hL(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"search"},()=>n,{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}var gL=et('<div class="flex items-center border-b px-2" data-command-input-wrapper=""><!> <!></div>');function pL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","class","value"]);var a=gL(),l=tt(a);hL(l,{class:"mr-2 size-4 shrink-0 opacity-50"});var c=_t(l,2);const d=N(()=>se("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class));Ot(c,()=>s3,(f,h)=>{h(f,Rt({get class(){return m(d)}},()=>s,{get ref(){return n()},set ref(g){n(g)},get value(){return i()},set value(g){i(g)}}))}),$(a),P(e,a),ht()}function vL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("max-h-[300px] overflow-y-auto overflow-x-hidden",t.class));Ot(a,()=>d3,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}function mL(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=k(t,"align",3,"center"),a=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);var l=X(),c=z(l);Ot(c,()=>dl,(d,f)=>{f(d,Rt(()=>t.portalProps,{children:(h,g)=>{var v=X(),b=z(v);const _=N(()=>se("bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",t.class));Ot(b,()=>k3,(y,x)=>{x(y,Rt({get sideOffset(){return i()},get align(){return s()},get class(){return m(_)}},()=>a,{get ref(){return n()},set ref(S){n(S)}}))}),P(h,v)},$$slots:{default:!0}}))}),P(e,l),ht()}const bL=z3,_L=I3;var l_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_n=e=>!e||typeof e!="object"||Object.keys(e).length===0,wL=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Zw(e,t){e.forEach(function(n){Array.isArray(n)?Zw(n,t):t.push(n)})}function Jw(e){let t=[];return Zw(e,t),t}var Qw=(...e)=>Jw(e).filter(Boolean),jw=(e,t)=>{let n={},i=Object.keys(e),s=Object.keys(t);for(let a of i)if(s.includes(a)){let l=e[a],c=t[a];Array.isArray(l)||Array.isArray(c)?n[a]=Qw(c,l):typeof l=="object"&&typeof c=="object"?n[a]=jw(l,c):n[a]=c+" "+l}else n[a]=e[a];for(let a of s)i.includes(a)||(n[a]=t[a]);return n},u_=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Ip="-",yL=e=>{const t=SL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const c=l.split(Ip);return c[0]===""&&c.length!==1&&c.shift(),$w(c,t)||xL(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&i[l]?[...d,...i[l]]:d}}},$w=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?$w(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Ip);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},c_=/^\[(.+)\]$/,xL=e=>{if(c_.test(e)){const t=c_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},SL=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return CL(Object.entries(e.classGroups),n).forEach(([a,l])=>{Ng(l,i,a,t)}),i},Ng=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:d_(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(AL(s)){Ng(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{Ng(l,d_(t,a),n,i)})})},d_=(e,t)=>{let n=e;return t.split(Ip).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},AL=e=>e.isThemeGetter,CL=(e,t)=>t?e.map(([n,i])=>{const s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,c])=>[t+l,c])):a);return[n,s]}):e,PL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=i.get(a))!==void 0)return s(a,l),l},set(a,l){n.has(a)?n.set(a,l):s(a,l)}}},ty="!",EL=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],a=t.length,l=c=>{const d=[];let f=0,h=0,g;for(let x=0;x<c.length;x++){let S=c[x];if(f===0){if(S===s&&(i||c.slice(x,x+a)===t)){d.push(c.slice(h,x)),h=x+a;continue}if(S==="/"){g=x;continue}}S==="["?f++:S==="]"&&f--}const v=d.length===0?c:c.substring(h),b=v.startsWith(ty),_=b?v.substring(1):v,y=g&&g>h?g-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:y}};return n?c=>n({className:c,parseClassName:l}):l},kL=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},TL=e=>({cache:PL(e.cacheSize),parseClassName:EL(e),...yL(e)}),IL=/\s+/,OL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(IL);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=n(f);let _=!!b,y=i(_?v.substring(0,b):v);if(!y){if(!_){c=f+(c.length>0?" "+c:c);continue}if(y=i(v),!y){c=f+(c.length>0?" "+c:c);continue}_=!1}const x=kL(h).join(":"),S=g?x+ty:x,I=S+y;if(a.includes(I))continue;a.push(I);const T=s(y,_);for(let O=0;O<T.length;++O){const D=T[O];a.push(S+D)}c=f+(c.length>0?" "+c:c)}return c};function NL(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ey(t))&&(i&&(i+=" "),i+=n);return i}const ey=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=ey(e[i]))&&(n&&(n+=" "),n+=t);return n};function Rg(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,g)=>g(h),e());return n=TL(f),i=n.cache.get,s=n.cache.set,a=c,c(d)}function c(d){const f=i(d);if(f)return f;const h=OL(d,n);return s(d,h),h}return function(){return a(NL.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ny=/^\[(?:([a-z-]+):)?(.+)\]$/i,RL=/^\d+\/\d+$/,ML=new Set(["px","full","screen"]),LL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dr=e=>Ro(e)||ML.has(e)||RL.test(e),hi=e=>is(e,"length",YL),Ro=e=>!!e&&!Number.isNaN(Number(e)),Xh=e=>is(e,"number",Ro),Cs=e=>!!e&&Number.isInteger(Number(e)),zL=e=>e.endsWith("%")&&Ro(e.slice(0,-1)),Jt=e=>ny.test(e),gi=e=>LL.test(e),WL=new Set(["length","size","percentage"]),HL=e=>is(e,WL,ry),UL=e=>is(e,"position",ry),GL=new Set(["image","url"]),KL=e=>is(e,GL,ZL),qL=e=>is(e,"",XL),Ps=()=>!0,is=(e,t,n)=>{const i=ny.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},YL=e=>DL.test(e)&&!FL.test(e),ry=()=>!1,XL=e=>BL.test(e),ZL=e=>VL.test(e),Mg=()=>{const e=Ne("colors"),t=Ne("spacing"),n=Ne("blur"),i=Ne("brightness"),s=Ne("borderColor"),a=Ne("borderRadius"),l=Ne("borderSpacing"),c=Ne("borderWidth"),d=Ne("contrast"),f=Ne("grayscale"),h=Ne("hueRotate"),g=Ne("invert"),v=Ne("gap"),b=Ne("gradientColorStops"),_=Ne("gradientColorStopPositions"),y=Ne("inset"),x=Ne("margin"),S=Ne("opacity"),I=Ne("padding"),T=Ne("saturate"),O=Ne("scale"),D=Ne("sepia"),L=Ne("skew"),M=Ne("space"),U=Ne("translate"),q=()=>["auto","contain","none"],at=()=>["auto","hidden","clip","visible","scroll"],gt=()=>["auto",Jt,t],W=()=>[Jt,t],j=()=>["",Dr,hi],G=()=>["auto",Ro,Jt],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ot=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ut=()=>["start","end","center","between","around","evenly","stretch"],mt=()=>["","0",Jt],bt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],st=()=>[Ro,Jt];return{cacheSize:500,separator:":",theme:{colors:[Ps],spacing:[Dr,hi],blur:["none","",gi,Jt],brightness:st(),borderColor:[e],borderRadius:["none","","full",gi,Jt],borderSpacing:W(),borderWidth:j(),contrast:st(),grayscale:mt(),hueRotate:st(),invert:mt(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[zL,hi],inset:gt(),margin:gt(),opacity:st(),padding:W(),saturate:st(),scale:st(),sepia:mt(),skew:st(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Jt]}],container:["container"],columns:[{columns:[gi]}],"break-after":[{"break-after":bt()}],"break-before":[{"break-before":bt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),Jt]}],overflow:[{overflow:at()}],"overflow-x":[{"overflow-x":at()}],"overflow-y":[{"overflow-y":at()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cs,Jt]}],basis:[{basis:gt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Jt]}],grow:[{grow:mt()}],shrink:[{shrink:mt()}],order:[{order:["first","last","none",Cs,Jt]}],"grid-cols":[{"grid-cols":[Ps]}],"col-start-end":[{col:["auto",{span:["full",Cs,Jt]},Jt]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Ps]}],"row-start-end":[{row:["auto",{span:[Cs,Jt]},Jt]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Jt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Jt]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ut()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ut(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ut(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Jt,t]}],"min-w":[{"min-w":[Jt,t,"min","max","fit"]}],"max-w":[{"max-w":[Jt,t,"none","full","min","max","fit","prose",{screen:[gi]},gi]}],h:[{h:[Jt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Jt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Jt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Jt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gi,hi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xh]}],"font-family":[{font:[Ps]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Jt]}],"line-clamp":[{"line-clamp":["none",Ro,Xh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dr,Jt]}],"list-image":[{"list-image":["none",Jt]}],"list-style-type":[{list:["none","disc","decimal",Jt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dr,hi]}],"underline-offset":[{"underline-offset":["auto",Dr,Jt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Jt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Jt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),UL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},KL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[Dr,Jt]}],"outline-w":[{outline:[Dr,hi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Dr,hi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gi,qL]}],"shadow-color":[{shadow:[Ps]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ot(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ot()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",gi,Jt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Jt]}],duration:[{duration:st()}],ease:[{ease:["linear","in","out","in-out",Jt]}],delay:[{delay:st()}],animate:[{animate:["none","spin","ping","pulse","bounce",Jt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Cs,Jt]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Jt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Jt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Jt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dr,hi,Xh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},JL=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:s,extend:a={},override:l={}})=>{Is(e,"cacheSize",t),Is(e,"prefix",n),Is(e,"separator",i),Is(e,"experimentalParseClassName",s);for(const c in l)QL(e[c],l[c]);for(const c in a)jL(e[c],a[c]);return e},Is=(e,t,n)=>{n!==void 0&&(e[t]=n)},QL=(e,t)=>{if(t)for(const n in t)Is(e,n,t[n])},jL=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},$L=(e,...t)=>typeof e=="function"?Rg(Mg,e,...t):Rg(()=>JL(Mg(),e),...t),tD=Rg(Mg);var eD={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},iy=e=>e||void 0,Ks=(...e)=>iy(Jw(e).filter(Boolean).join(" ")),Zh=null,Br={},Lg=!1,Es=(...e)=>t=>t.twMerge?((!Zh||Lg)&&(Lg=!1,Zh=_n(Br)?tD:$L({...Br,extend:{theme:Br.theme,classGroups:Br.classGroups,conflictingClassGroupModifiers:Br.conflictingClassGroupModifiers,conflictingClassGroups:Br.conflictingClassGroups,...Br.extend}})),iy(Zh(Ks(e)))):Ks(e),f_=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=Ks(e[n],t[n]):e[n]=t[n];return e},Op=(e,t)=>{let{extend:n=null,slots:i={},variants:s={},compoundVariants:a=[],compoundSlots:l=[],defaultVariants:c={}}=e,d={...eD,...t},f=n!=null&&n.base?Ks(n.base,e==null?void 0:e.base):e==null?void 0:e.base,h=n!=null&&n.variants&&!_n(n.variants)?jw(s,n.variants):s,g=n!=null&&n.defaultVariants&&!_n(n.defaultVariants)?{...n.defaultVariants,...c}:c;!_n(d.twMergeConfig)&&!wL(d.twMergeConfig,Br)&&(Lg=!0,Br=d.twMergeConfig);let v=_n(n==null?void 0:n.slots),b=_n(i)?{}:{base:Ks(e==null?void 0:e.base,v&&(n==null?void 0:n.base)),...i},_=v?b:f_({...n==null?void 0:n.slots},_n(b)?{base:e==null?void 0:e.base}:b),y=_n(n==null?void 0:n.compoundVariants)?a:Qw(n==null?void 0:n.compoundVariants,a),x=I=>{if(_n(h)&&_n(i)&&v)return Es(f,I==null?void 0:I.class,I==null?void 0:I.className)(d);if(y&&!Array.isArray(y))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof y}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let T=(W,j,G=[],Z)=>{let Q=G;if(typeof j=="string")Q=Q.concat(u_(j).split(" ").map(ot=>`${W}:${ot}`));else if(Array.isArray(j))Q=Q.concat(j.reduce((ot,ut)=>ot.concat(`${W}:${ut}`),[]));else if(typeof j=="object"&&typeof Z=="string"){for(let ot in j)if(j.hasOwnProperty(ot)&&ot===Z){let ut=j[ot];if(ut&&typeof ut=="string"){let mt=u_(ut);Q[Z]?Q[Z]=Q[Z].concat(mt.split(" ").map(bt=>`${W}:${bt}`)):Q[Z]=mt.split(" ").map(bt=>`${W}:${bt}`)}else Array.isArray(ut)&&ut.length>0&&(Q[Z]=ut.reduce((mt,bt)=>mt.concat(`${W}:${bt}`),[]))}}return Q},O=(W,j=h,G=null,Z=null)=>{var Q;let ot=j[W];if(!ot||_n(ot))return null;let ut=(Q=Z==null?void 0:Z[W])!=null?Q:I==null?void 0:I[W];if(ut===null)return null;let mt=l_(ut),bt=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,st=g==null?void 0:g[W],At=[];if(typeof mt=="object"&&bt)for(let[Nt,Bt]of Object.entries(mt)){let ue=ot[Bt];if(Nt==="initial"){st=Bt;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Nt)||(At=T(Nt,ue,At,G))}let kt=mt!=null&&typeof mt!="object"?mt:l_(st),Vt=ot[kt||"false"];return typeof At=="object"&&typeof G=="string"&&At[G]?f_(At,Vt):At.length>0?(At.push(Vt),G==="base"?At.join(" "):At):Vt},D=()=>h?Object.keys(h).map(W=>O(W,h)):null,L=(W,j)=>{if(!h||typeof h!="object")return null;let G=new Array;for(let Z in h){let Q=O(Z,h,W,j),ot=W==="base"&&typeof Q=="string"?Q:Q&&Q[W];ot&&(G[G.length]=ot)}return G},M={};for(let W in I)I[W]!==void 0&&(M[W]=I[W]);let U=(W,j)=>{var G;let Z=typeof(I==null?void 0:I[W])=="object"?{[W]:(G=I[W])==null?void 0:G.initial}:{};return{...g,...M,...Z,...j}},q=(W=[],j)=>{let G=[];for(let{class:Z,className:Q,...ot}of W){let ut=!0;for(let[mt,bt]of Object.entries(ot)){let st=U(mt,j)[mt];if(Array.isArray(bt)){if(!bt.includes(st)){ut=!1;break}}else{let At=kt=>kt==null||kt===!1;if(At(bt)&&At(st))continue;if(st!==bt){ut=!1;break}}}ut&&(Z&&G.push(Z),Q&&G.push(Q))}return G},at=W=>{let j=q(y,W);if(!Array.isArray(j))return j;let G={};for(let Z of j)if(typeof Z=="string"&&(G.base=Es(G.base,Z)(d)),typeof Z=="object")for(let[Q,ot]of Object.entries(Z))G[Q]=Es(G[Q],ot)(d);return G},gt=W=>{if(l.length<1)return null;let j={};for(let{slots:G=[],class:Z,className:Q,...ot}of l){if(!_n(ot)){let ut=!0;for(let mt of Object.keys(ot)){let bt=U(mt,W)[mt];if(bt===void 0||(Array.isArray(ot[mt])?!ot[mt].includes(bt):ot[mt]!==bt)){ut=!1;break}}if(!ut)continue}for(let ut of G)j[ut]=j[ut]||[],j[ut].push([Z,Q])}return j};if(!_n(i)||!v){let W={};if(typeof _=="object"&&!_n(_))for(let j of Object.keys(_))W[j]=G=>{var Z,Q;return Es(_[j],L(j,G),((Z=at(G))!=null?Z:[])[j],((Q=gt(G))!=null?Q:[])[j],G==null?void 0:G.class,G==null?void 0:G.className)(d)};return W}return Es(f,D(),q(y),I==null?void 0:I.class,I==null?void 0:I.className)(d)},S=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return x.variantKeys=S(),x.extend=n,x.base=f,x.slots=_,x.variants=h,x.defaultVariants=g,x.compoundSlots=l,x.compoundVariants=y,x};const h_=Op({base:"ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-input bg-background hover:bg-accent hover:text-accent-foreground border",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});var nD=et("<a><!></a>"),rD=et("<button><!></button>");function Yn(e,t){ft(t,!0);let n=k(t,"variant",3,"default"),i=k(t,"size",3,"default"),s=k(t,"ref",15,null),a=k(t,"href",3,void 0),l=k(t,"type",3,"button"),c=xt(t,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","children"]);const d=$r(),[f,h]=d;var g=X(),v=z(g);{var b=y=>{var x=nD();let S;var I=tt(x);it(I,()=>t.children??St),$(x),rr(x,T=>s(T),()=>s()),yt(T=>S=Lt(x,S,{...T}),[()=>h({class:se(h_({variant:n(),size:i()}),t.class),href:a(),...c},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]),P(y,x)},_=y=>{var x=rD();let S;var I=tt(x);it(I,()=>t.children??St),$(x),rr(x,T=>s(T),()=>s()),yt(T=>S=Lt(x,S,{...T}),[()=>h({class:se(h_({variant:n(),size:i()}),t.class),type:l(),...c},[{attribute_name:"formaction"}])]),P(y,x)};wt(v,y=>{a()?y(b):y(_,!1)})}P(e,g),ht()}const iD=(e,t)=>{const n=window.URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.setAttribute("download",e),document.body.appendChild(i),i.click(),i.remove(),window.URL.revokeObjectURL(n)},So=Ee({}),cu=Ee(0),oy=()=>({customLabelColorsStore:So,colorVersion:cu,getCustomColor:a=>Pe(So)[a],setCustomColor:(a,l,c=1)=>{So.update(d=>({...d,[a]:{color:l,alpha:c}})),cu.update(d=>d+1)},hasCustomColor:a=>!!Pe(So)[a],deleteCustomColor:a=>{So.update(l=>{const{[a]:c,...d}=l;return d}),cu.update(l=>l+1)},clearCustomColors:()=>{So.set({}),cu.update(a=>a+1)}}),Eo=(e,t=1)=>{t=Math.max(0,Math.min(t,1));const{getCustomColor:n,hasCustomColor:i}=oy();if(i(e)){const x=n(e);if(x)return((I,T)=>{const O=parseInt(I.slice(1,3),16),D=parseInt(I.slice(3,5),16),L=parseInt(I.slice(5,7),16);return{color:`rgba(${O}, ${D}, ${L}, ${T})`,contrastColor:`rgba(${255-O}, ${255-D}, ${255-L}, ${T})`}})(x.color,x.alpha*t)}const s=["rgba(255, 0, 0, alpha)","rgba(0, 255, 0, alpha)","rgba(0, 0, 255, alpha)","rgba(255, 255, 0, alpha)","rgba(255, 0, 255, alpha)","rgba(0, 255, 255, alpha)","rgba(128, 0, 0, alpha)","rgba(0, 128, 0, alpha)","rgba(0, 0, 128, alpha)","rgba(128, 128, 0, alpha)","rgba(128, 0, 128, alpha)","rgba(0, 128, 128, alpha)","rgba(192, 192, 192, alpha)","rgba(128, 128, 128, alpha)","rgba(255, 165, 0, alpha)","rgba(255, 20, 147, alpha)","rgba(75, 0, 130, alpha)","rgba(255, 105, 180, alpha)","rgba(0, 255, 127, alpha)","rgba(255, 215, 0, alpha)","rgba(255, 69, 0, alpha)"];let a;const l=s.length-1;if(a=Array.from(e).reduce((x,S)=>(x<<5)-x+S.charCodeAt(0),0),a=Math.abs(a)%l+1,a>=1&&a<=l)return{color:s[a-1].replace("alpha",t.toString()),contrastColor:`rgba(${255-Math.round(parseInt(s[a-1].split(",")[0].split("(")[1])*(t/255))}, ${255-Math.round(parseInt(s[a-1].split(",")[1]))}, ${255-Math.round(parseInt(s[a-1].split(",")[2]))}, ${t})`};const c=(a*30+20)%256,d=(a*60+100)%256,f=(a*90+150)%256,h=Math.max(c,d,f),g=Math.min(c,d,f);if(h-g===0)return{color:`rgba(255, 255, 255, ${t})`,contrastColor:`rgba(0, 0, 0, ${t})`};const b=255/h,_=`rgba(${Math.round(c*b)}, ${Math.round(d*b)}, ${Math.round(f*b)}, ${t})`,y=`rgba(${255-Math.round(c*b)}, ${255-Math.round(d*b)}, ${255-Math.round(f*b)}, ${t})`;return{color:_,contrastColor:y}};function oD(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"loader-circle"},()=>n,{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}var sD=et(" <!>",1),aD=et('<div class="flex items-center space-x-4"><!> <!></div>'),lD=et("<!> ",1),uD=et("<!> <!>",1),cD=et("<!> <!>",1),dD=et("<!> <!>",1);function sy(e,t){var I;ft(t,!0);let n=vt(!1),i=vt(null);function s(){rt(n,!1),Jg().then(()=>{m(i).focus()})}let a=k(t,"name",3,"items"),l=k(t,"label",3,"Select an item"),c=k(t,"inputValue",15,""),d=k(t,"placeholder",3,"Search an item..."),f=k(t,"disabled",3,!1),h=k(t,"isLoading",3,!1),g=vt(dt(((I=t.value)==null?void 0:I.value)||""));const v=N(()=>{var T;return(T=t.items.find(O=>O.value===m(g)))==null?void 0:T.label}),b=T=>{var O;rt(g,dt(T.value)),(O=t.onSelect)==null||O.call(t,T),s()},_=T=>{const O={value:T,label:T};t.items.push(O),b(O)},y=T=>{T.key==="Enter"&&c()&&(_(c()),c(""),T.preventDefault()),T.stopPropagation()};var x=X(),S=z(x);Ot(S,()=>bL,(T,O)=>{O(T,{get open(){return m(n)},set open(D){rt(n,dt(D))},children:(D,L)=>{var M=dD(),U=z(M);Ot(U,()=>_L,(at,gt)=>{gt(at,{get ref(){return m(i)},set ref(j){rt(i,dt(j))},child:(j,G)=>{let Z=()=>G==null?void 0:G().props;var Q=aD(),ot=tt(Q);Yn(ot,Rt(Z,{variant:"secondary",get disabled(){return f()},class:"w-[200px] justify-between",role:"combobox",get"aria-expanded"(){return m(n)},"data-testid":"select-list-trigger",children:(bt,st)=>{we();var At=sD(),kt=z(At),Vt=_t(kt);_T(Vt,{class:"opacity-50"}),yt(()=>De(kt,`${(m(v)||l())??""} `)),P(bt,At)},$$slots:{default:!0}}));var ut=_t(ot,2);{var mt=bt=>{oD(bt,{class:"mr-2 h-4 w-4 animate-spin"})};wt(ut,bt=>{h()&&bt(mt)})}$(Q),P(j,Q)},$$slots:{child:!0}})});var q=_t(U,2);Ot(q,()=>mL,(at,gt)=>{gt(at,{class:"w-[200px] p-0",children:(W,j)=>{var G=X(),Z=z(G);Ot(Z,()=>tL,(Q,ot)=>{ot(Q,{children:(ut,mt)=>{var bt=cD(),st=z(bt);Ot(st,()=>pL,(kt,Vt)=>{Vt(kt,{get placeholder(){return d()},onkeydown:y,"data-testid":"select-list-input",get value(){return c()},set value(Nt){c(Nt)}})});var At=_t(st,2);Ot(At,()=>vL,(kt,Vt)=>{Vt(kt,{children:(Nt,Bt)=>{var ue=uD(),Yt=z(ue);Ot(Yt,()=>uL,(Ht,ce)=>{ce(Ht,{children:(ge,Ye)=>{var Kt=X(),Ut=z(Kt);{var de=Te=>{var We=X(),Fe=z(We);it(Fe,()=>t.notFound,()=>({inputValue:c()||""})),P(Te,We)},pe=Te=>{var We=Ce("Item not found");P(Te,We)};wt(Ut,Te=>{t.notFound?Te(de):Te(pe,!1)})}P(ge,Kt)},$$slots:{default:!0}})});var It=_t(Yt,2);Ot(It,()=>dL,(Ht,ce)=>{ce(Ht,{get value(){return a()},children:(ge,Ye)=>{var Kt=X(),Ut=z(Kt);Ei(Ut,17,()=>t.items,de=>de.value,(de,pe)=>{var Te=X(),We=z(Te);Ot(We,()=>fL,(Fe,ve)=>{ve(Fe,{get value(){return m(pe).value},onSelect:()=>b(m(pe)),children:(an,Qe)=>{var me=lD(),fe=z(me);const Ke=N(()=>se(m(g)!==m(pe).value&&"text-transparent"));rp(fe,{get class(){return m(Ke)}});var je=_t(fe);yt(()=>De(je,` ${m(pe).label??""}`)),P(an,me)},$$slots:{default:!0}})}),P(de,Te)}),P(ge,Kt)},$$slots:{default:!0}})}),P(Nt,ue)},$$slots:{default:!0}})}),P(ut,bt)},$$slots:{default:!0}})}),P(W,G)},$$slots:{default:!0}})}),P(D,M)},$$slots:{default:!0}})}),P(e,x),ht()}const ay=()=>r0(i0());var fD=et('<div class="text-md m-2">New label <span class="font-semibold"> </span> will be created.</div>');function ly(e,t){ft(t,!0);var n=fD(),i=_t(tt(n)),s=tt(i);$(i),we(),$(n),yt(a=>{yn(i,a),De(s,`"${t.label??""}"`)},[()=>`color: ${Eo(t.label).color}`]),P(e,n),ht()}const uy=e=>e.map(n=>{const i=n.annotation_label_name;return{value:i,label:i}}).sort((n,i)=>n.label.localeCompare(i.label));var hD=et('<div class="flex flex-col space-y-4"><div class="text-md mb-2">You can edit labels for multiple annotations at once.</div> <!></div>'),gD=et('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-hidden dark:[color-scheme:dark]"><!></div>');function pD(e,t){ft(t,!0);const[n,i]=$o(),s=()=>Ge(a,"$result",n),a=ay(),l=N(()=>uy(s().data||[]));FD(e,{className:"h-full",children:(c,d)=>{VD(c,{className:"h-full flex flex-col",children:(f,h)=>{var g=gD(),v=tt(g);const b=N(()=>`Selected annotations: ${t.selectedAnnotations.length}`);dy(v,{get title(){return m(b)},children:(_,y)=>{var x=hD(),S=_t(tt(x),2);sy(S,{get items(){return m(l)},name:"annotation-label",placeholder:"Select a label ",label:"Select a label",get onSelect(){return t.onSelect},get isLoading(){return t.isLoading},get disabled(){return t.disabled},notFound:(T,O)=>{let D=()=>O==null?void 0:O().inputValue;ly(T,{get label(){return D()}})},$$slots:{notFound:!0}}),$(x),P(_,x)}}),$(g),P(f,g)},$$slots:{default:!0}})},$$slots:{default:!0}}),ht(),i()}const g_=new Map,vD=e=>{const t=uk(e,{position:0,filterHash:""});return{initialize:()=>{g_.get(e)||(t.set({position:0,filterHash:""}),g_.set(e,!0))},savePosition:(a,l)=>{t.set({position:a,filterHash:l})},getRestoredPosition:a=>{const l=Pe(t);return l.filterHash===a?l.position:0}}};function mD(e,t){const n=e.currentTarget.dataset.annotationId;t(n)}function bD(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.annotationId;t(n)}}var _D=et(`<div class="flex h-full flex-1 items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No annotations found</div> <div class="text-sm">This dataset doesn't contain any annotations.</div></div></div>`),wD=et('<div data-testid="annotation-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <!></div>'),yD=et('<div class="flex justify-center p-4"><!></div>'),xD=et("<!> <!>",1),SD=et('<div class="min-w-[250px] max-w-[30%] flex-1"><!></div>'),AD=et('<div class="flex h-full flex-1"><div class="viewport flex-1"><!></div> <!></div>');function f6(e,t){ft(t,!0);const[n,i]=$o(),s=()=>Ge(v,"$showAnnotationTextLabelsStore",n),a=()=>Ge(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",n),l=()=>Ge(g,"$tagsSelected",n),c=()=>Ge(m(U),"$infiniteAnnotations",n),d=()=>Ge(Z,"$pickedAnnotationIds",n),f=()=>Ge(b,"$isEditingMode",n),h=()=>Ge(m(at),"$isPending",n),{tagsSelected:g}=ak({dataset_id:t.dataset_id,kind:["annotation"]}),{showAnnotationTextLabelsStore:v}=np(),{isEditingMode:b}=to.data.globalStorage;let _=N(s);const{getDatasetVersion:y,setAnnotationsTotalCount:x}=zs();let S=vt("");const{initialize:I,savePosition:T,getRestoredPosition:O}=vD("annotations_scroll");jg(async()=>{I(),rt(S,dt(await y(t.dataset_id)))});let D=vt(null);const L=N(()=>({path:{dataset_id:t.dataset_id},query:{annotation_label_ids:a().length>0?a():void 0,tag_ids:l().size>0?Array.from(l()):void 0}})),M=N(()=>hT(m(L))),U=N(()=>m(M).annotations),q=N(()=>m(M).updateAnnotations),at=N(()=>m(M).isPending);let gt=N(()=>a().join(",")+Array.from(l()).join(","));const W=N(()=>m(gt)),j=N(()=>O(m(W)));function G(It){const Ht=It.target.scrollTop;T(Ht,m(W))}xe(()=>{m(U).subscribe(It=>{It.isSuccess&&It.data.pages.length>0&&x(It.data.pages[0].total_count)})});const{selectedSampleAnnotationCropIds:Z,toggleSampleAnnotationCropSelection:Q,clearSelectedSampleAnnotationCrops:ot}=zs(),ut=16;function mt(It){It&&Q(It)}const bt=N(()=>{var It;return((It=c().data)==null?void 0:It.pages.flatMap(Ht=>Ht.data))||[]});function st(){c().hasNextPage&&c().fetchNextPage()}function At(It){const Ht=It.currentTarget.dataset.annotationId,ce=It.currentTarget.dataset.sampleId,ge=It.currentTarget.dataset.index;vu(mu.toSampleWithAnnotation({sampleId:ce,annotationId:Ht,datasetId:t.dataset_id,annotationIndex:Number(ge)}))}const kt=N(()=>m(bt).filter(It=>d().has(It.annotation_id))),Vt=async It=>{await m(q)(m(kt).map(Ht=>({annotation_id:Ht.annotation_id,label_name:It.value,dataset_id:t.dataset_id}))),ot()};var Nt=X(),Bt=z(Nt);{var ue=It=>{var Ht=_D();P(It,Ht)},Yt=It=>{var Ht=AD(),ce=tt(Ht),ge=tt(ce);Ws(ge,()=>m(gt),Ut=>{const de=N(()=>{var ve;return(ve=m(bt))==null?void 0:ve.length}),pe=N(()=>t.itemHeight+ut),Te=N(()=>t.itemWidth+ut),We=N(()=>{var ve;return((ve=m(D))==null?void 0:ve.clientHeight)||0}),Fe=N(()=>m(bt).length>0?m(j):0);eT(Ut,{get itemCount(){return m(de)},get itemHeight(){return m(pe)},get itemWidth(){return m(Te)},get height(){return m(We)},get scrollPosition(){return m(Fe)},onscroll:G,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.itemWidth??""}px; --sample-height: ${t.itemHeight??""}px;`},item:(Qe,me)=>{let fe=()=>me==null?void 0:me().index,Ke=()=>me==null?void 0:me().style;var je=X(),gn=z(je);Ws(gn,()=>c().dataUpdatedAt,Jn=>{var zt=wD();zt.__click=[mD,mt],zt.__dblclick=At,zt.__keydown=[bD,mt];var Se=tt(zt),Me=tt(Se);const lr=N(()=>d().has(m(bt)[fe()].annotation_id));KB(Me,{onSelect:()=>{},get isSelected(){return m(lr)}}),$(Se);var Sn=_t(Se,2);const ln=N(()=>d().has(m(bt)[fe()].annotation_id));LD(Sn,{get annotation(){return m(bt)[fe()]},get width(){return t.itemWidth},get height(){return t.itemHeight},get cachedDatasetVersion(){return m(S)},get showLabel(){return m(_)},get selected(){return m(ln)}}),$(zt),yt(()=>{var Dn,qe;yn(zt,Ke()),ze(zt,"data-annotation-id",(Dn=m(bt)[fe()])==null?void 0:Dn.annotation_id),ze(zt,"data-sample-id",(qe=m(bt)[fe()])==null?void 0:qe.sample.sample_id),ze(zt,"data-index",fe()),ze(zt,"aria-label",`Edit annotation: ${m(bt)[fe()].annotation_id}`)}),P(Jn,zt)}),P(Qe,je)},footer:Qe=>{var me=xD(),fe=z(me);n4(fe,{onIntersect:st});var Ke=_t(fe,2);{var je=gn=>{var Jn=yD(),zt=tt(Jn);pT(zt,{}),$(Jn),P(gn,Jn)};wt(Ke,gn=>{c().isFetchingNextPage&&gn(je)})}P(Qe,me)},$$slots:{item:!0,footer:!0}})}),$(ce);var Ye=_t(ce,2);{var Kt=Ut=>{var de=SD(),pe=tt(de);const Te=N(()=>m(kt).length===0);pD(pe,{get selectedAnnotations(){return m(kt)},get disabled(){return m(Te)},get isLoading(){return h()},onSelect:Vt}),$(de),P(Ut,de)};wt(Ye,Ut=>{f()&&Ut(Kt)})}$(Ht),rr(Ht,Ut=>rt(D,Ut),()=>m(D)),P(It,Ht)};wt(Bt,It=>{c().isFetched&&m(bt).length===0?It(ue):It(Yt,!1)})}P(e,Nt),ht(),i()}io(["click","dblclick","keydown"]);function p_(e){return e.annotation_type==="object_detection"}function CD(e){return e.annotation_type==="instance_segmentation"}function h6(e){return e.annotation_type==="classification"}function Dg(e){if(p_(e)||CD(e)){const t={...p_(e)?e.object_detection_details:e.instance_segmentation_details};return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}else throw new Error(`Annotation type is not supported for bounding box extraction: ${e.annotation_type}`)}const PD=(e,t)=>{const n=Dg(e),i=Dg(t),s=n.height*n.width;return i.height*i.width-s},g6=e=>e.annotations===void 0?[]:e.annotations.filter(t=>t.annotation_type!=="classification").sort(PD),Jh=Ee(!0),Qh=Ee(null),Vu=Ee([]),ED=Pi(Vu,e=>{const t=new Map;return e.forEach(n=>{t.set(n.annotation_task_id,n)}),t}),kD=Pi(Vu,e=>{const t=e.some(i=>i.is_prediction),n=e.some(i=>!i.is_prediction);return t&&n});let v_=!1;const TD=()=>{const e=async()=>{if(!v_){Jh.set(!0),Qh.set(null);try{const t=await Nn.GET("/api/annotationtasks/");if("error"in t)throw new Error(JSON.stringify(t.error,null,2));if(!t.data)throw new Error("No annotation tasks found");Vu.set(t.data),v_=!0}catch(t){Qh.set(String(t))}finally{Jh.set(!1)}}};return e(),{annotationTasks:Vu,taskMap:ED,isLoading:Jh,error:Qh,refreshTasks:e,hasEnoughTasksForMetrics:kD}},m_=Ee(!1);function ID(){const{settingsStore:e}=np(),t=Pi(e,i=>i.key_hide_annotations||"v");return{isHidden:m_,handleKeyEvent:i=>{if(i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLSelectElement)return;let s;t.subscribe(l=>{s=l})(),i.key===s&&m_.set(i.type==="keydown")}}}var OD=et('<div class="annotation-label flex items-center justify-between text-sm text-white svelte-20k33o"><span class="truncate text-sm"></span></div>'),ND=sl("<svg><!></svg>"),RD=et("<div><div><!> <!></div></div>"),MD=et('<div class="crop flex items-center justify-center rounded-lg bg-black svelte-20k33o"><div class="text-xs text-gray-400">Loading...</div></div>');function LD(e,t){var kt,Vt;ft(t,!0);const[n,i]=$o(),s=()=>Ge(_,"$customLabelColorsStore",n),a=()=>Ge(G,"$taskMap",n),l=()=>Ge(b,"$isHidden",n);let c=k(t,"cachedDatasetVersion",3,""),d=k(t,"showLabel",3,!0),f=k(t,"selected",3,!1);const h=20,g=t.annotation.sample,{getDatasetVersion:v}=zs(),{isHidden:b}=ID(),{customLabelColorsStore:_}=oy();let y=vt(dt(c())),x=vt(!!c());if(jg(async()=>{!c()&&t.annotation.annotation_id&&(rt(y,dt(await v(t.annotation.annotation_id.split("-")[0]))),rt(x,!0))}),!t.annotation.object_detection_details&&!t.annotation.instance_segmentation_details)throw new Error("Unsupported annotation: Only annotations with object_detection_details or instance_segmentation_details are supported. Please check the annotation data.");const{width:S,height:I,x:T,y:O}=Dg(t.annotation),D=(Vt=(kt=t.annotation)==null?void 0:kt.instance_segmentation_details)==null?void 0:Vt.segmentation_mask,L=N(()=>Math.min(t.width/(S+h*2),t.height/(I+h*2)));function M(){return-(T-h)*m(L)+(t.width-(S+h*2)*m(L))/2}function U(){return-(O-h)*m(L)+(t.height-(I+h*2)*m(L))/2}let q=t.annotation.annotation_label.annotation_label_name;const at=N(()=>{var Nt;return((Nt=s()[q])==null?void 0:Nt.color)??Eo(q,1).color}),gt=N(()=>{var Nt;return(Nt=s()[q])==null||Nt.color,Eo(q,.4).color}),W=N(()=>{var Nt;return((Nt=s()[q])==null?void 0:Nt.alpha)??.4}),j=!!D,{taskMap:G}=TD(),Z=N(()=>t.annotation.annotation_task_id&&a().has(t.annotation.annotation_task_id)?a().get(t.annotation.annotation_task_id).is_prediction:!1),Q=N(M),ot=N(U),ut=N(()=>`${lk}/sample/${g.sample_id}${m(y)?`?v=${m(y)}`:""}`);var mt=X(),bt=z(mt);{var st=Nt=>{var Bt=RD();let ue;var Yt=tt(Bt);let It;var Ht=tt(Yt);{var ce=Kt=>{var Ut=OD(),de=tt(Ut);de.textContent=q,$(Ut),yt(pe=>yn(Ut,pe),[()=>`background-color: ${m(gt)??Eo(q,.4).color};`]),P(Kt,Ut)};wt(Ht,Kt=>{d()&&Kt(ce)})}var ge=_t(Ht,2);{var Ye=Kt=>{var Ut=ND();ze(Ut,"viewBox",`${T} ${O} ${S} ${I}`);var de=tt(Ut);HB(de,{segmentation:D,get width(){return g.width},get colorFill(){return m(gt)},get opacity(){return m(W)}}),$(Ut),P(Kt,Ut)};wt(ge,Kt=>{j&&Kt(Ye)})}$(Yt),$(Bt),yt((Kt,Ut,de)=>{ue=Xn(Bt,1,"crop rounded-lg bg-black svelte-20k33o",null,ue,Kt),yn(Bt,`
49
- width: ${t.width}px;
50
- height: ${t.height}px;
51
- background-image: url("${m(ut)}");
52
- background-position: ${m(Q)}px ${m(ot)}px;
53
- background-size: ${g.width*m(L)}px ${g.height*m(L)}px;
54
- background-repeat: no-repeat;
55
- `),It=Xn(Yt,1,"annotation-box svelte-20k33o",null,It,Ut),yn(Yt,de)},[()=>({"annotation-selected":f()}),()=>({invisible:l()}),()=>`
56
- left: ${(t.width-S*m(L))/2}px;
57
- top: ${(t.height-I*m(L))/2}px;
58
- width: ${S*m(L)}px;
59
- height: ${I*m(L)}px;
60
- border-color: ${j?"transparent":m(at)??Eo(q).color};
61
- background-color: ${j?"transparent":m(gt)??Eo(q,.4).color};
62
- border-style: ${m(Z)?"dashed":"solid"};
63
-
64
- `]),P(Nt,Bt)},At=Nt=>{var Bt=MD();yt(()=>yn(Bt,`width: ${t.width}px; height: ${t.height}px;`)),P(Nt,Bt)};wt(bt,Nt=>{m(x)?Nt(st):Nt(At,!1)})}P(e,mt),ht(),i()}var DD=et("<div><!></div>");function FD(e,t){ft(t,!0);var n=DD(),i=tt(n);it(i,()=>t.children),$(n),yt(s=>Xn(n,1,s),[()=>ki(se("rounded-lg border border-gray-800 bg-black",t.className))]),P(e,n),ht()}var BD=et("<div><!></div>");function VD(e,t){ft(t,!0);var n=BD(),i=tt(n);it(i,()=>t.children),$(n),yt(s=>Xn(n,1,s),[()=>ki(se("p-4",t.className))]),P(e,n),ht()}var zD=et(`<span class="bg-secondary relative grow overflow-hidden rounded-full data-[orientation='horizontal']:h-2 data-[orientation='vertical']:h-full data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-2"><!></span> <!>`,1);function WD(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15),s=k(t,"orientation",3,"horizontal"),a=xt(t,["$$slots","$$events","$$legacy","ref","value","orientation","class"]);var l=X(),c=z(l);const d=N(()=>se("relative flex touch-none select-none items-center data-[orientation='vertical']:h-full data-[orientation='vertical']:min-h-44 data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-auto data-[orientation='vertical']:flex-col",t.class));Ot(c,()=>r5,(f,h)=>{h(f,Rt({get orientation(){return s()},get class(){return m(d)}},()=>a,{get ref(){return n()},set ref(v){n(v)},get value(){return i()},set value(v){i(v)},children:(v,b)=>{let _=()=>b==null?void 0:b().thumbs;var y=zD(),x=z(y),S=tt(x);Ot(S,()=>o5,(T,O)=>{O(T,{class:"bg-primary absolute data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"})}),$(x);var I=_t(x,2);Ei(I,17,_,ff,(T,O)=>{var D=X(),L=z(D);Ot(L,()=>a5,(M,U)=>{U(M,{get index(){return m(O)},class:"border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})}),P(T,D)}),yt(()=>ze(x,"data-orientation",s())),P(v,y)},$$slots:{default:!0}}))}),P(e,l),ht()}const HD=pN,UD=_N,GD=mN;function Np(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"chevron-down"},()=>n,{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}const KD=e=>e;function cy(e){const t=e-1;return t*t*t+1}function b_(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function p6(e,{delay:t=0,duration:n=400,easing:i=KD}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*s}`}}function qD(e,{delay:t=0,duration:n=400,easing:i=cy,x:s=0,y:a=0,opacity:l=0}={}){const c=getComputedStyle(e),d=+c.opacity,f=c.transform==="none"?"":c.transform,h=d*(1-l),[g,v]=b_(s),[b,_]=b_(a);return{delay:t,duration:n,easing:i,css:(y,x)=>`
65
- transform: ${f} translate(${(1-y)*g}${v}, ${(1-y)*b}${_});
66
- opacity: ${d-h*x}`}}function YD(e,{delay:t=0,duration:n=400,easing:i=cy,axis:s="y"}={}){const a=getComputedStyle(e),l=+a.opacity,c=s==="y"?"height":"width",d=parseFloat(a[c]),f=s==="y"?["top","bottom"]:["left","right"],h=f.map(S=>`${S[0].toUpperCase()}${S.slice(1)}`),g=parseFloat(a[`padding${h[0]}`]),v=parseFloat(a[`padding${h[1]}`]),b=parseFloat(a[`margin${h[0]}`]),_=parseFloat(a[`margin${h[1]}`]),y=parseFloat(a[`border${h[0]}Width`]),x=parseFloat(a[`border${h[1]}Width`]);return{delay:t,duration:n,easing:i,css:S=>`overflow: hidden;opacity: ${Math.min(S*20,1)*l};${c}: ${S*d}px;padding-${f[0]}: ${S*g}px;padding-${f[1]}: ${S*v}px;margin-${f[0]}: ${S*b}px;margin-${f[1]}: ${S*_}px;border-${f[0]}-width: ${S*y}px;border-${f[1]}-width: ${S*x}px;min-${c}: 0`}}var XD=et('<h2 class="py-2 text-lg font-semibold"><div class="flex items-center justify-between"><div class="flex items-center space-x-2"><!> <span> </span></div> <div><!></div></div></h2>'),ZD=et('<div class="mt-2"><!></div>'),JD=et("<!> <!>",1);function dy(e,t){let n=vt(!0);const i=168;HD(e,{get open(){return m(n)},set open(s){rt(n,dt(s))},children:(s,a)=>{var l=JD(),c=z(l);UD(c,{class:"w-full",children:(f,h)=>{var g=XD(),v=tt(g),b=tt(v),_=tt(b);{var y=D=>{var L=X(),M=z(L);Ot(M,()=>t.icon,(U,q)=>{q(U,{})}),P(D,L)};wt(_,D=>{t.icon&&D(y)})}var x=_t(_,2),S=tt(x,!0);$(x),$(b);var I=_t(b,2),T=tt(I);const O=N(()=>`transform: ${m(n)?"rotate(-180deg)":"rotate(0deg)"}`);Np(T,{class:`transition-transform duration-${i}`,get style(){return m(O)}}),$(I),$(v),$(g),yt(()=>De(S,t.title)),P(f,g)},$$slots:{default:!0}});var d=_t(c,2);GD(d,{forceMount:!0,children:(f,h)=>{var g=X(),v=z(g);{var b=_=>{var y=ZD(),x=tt(y);it(x,()=>t.children),$(y),f0(3,y,()=>YD,()=>({duration:i})),P(_,y)};wt(v,_=>{m(n)&&_(b)})}P(f,g)},$$slots:{default:!0}}),P(s,l)},$$slots:{default:!0}})}var QD=et("<label> </label>"),jD=et("<label> </label>"),$D=et('<p class="ml-4 text-xs text-muted-foreground"> </p>'),tF=et('<div class="space-y-2"><div class="flex justify-between"><!></div> <!> <!></div>');function eF(e,t){const n="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";var i=tF(),s=tt(i),a=tt(s);{var l=g=>{var v=QD();Xn(v,1,ki(n));var b=tt(v,!0);$(v),yt(()=>{ze(v,"for",t.forComponent),De(b,t.label)}),P(g,v)},c=g=>{var v=jD();Xn(v,1,ki(n));var b=tt(v,!0);$(v),yt(()=>De(b,t.label)),P(g,v)};wt(a,g=>{t.forComponent?g(l):g(c,!1)})}$(s);var d=_t(s,2);it(d,()=>t.children);var f=_t(d,2);{var h=g=>{var v=$D(),b=tt(v,!0);$(v),yt(()=>De(b,t.description)),P(g,v)};wt(f,g=>{t.description&&g(h)})}$(i),P(e,i)}function nF(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("py-1.5 pl-8 pr-2 text-sm font-semibold",t.class));Ot(a,()=>lM,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}var rF=et('<span class="absolute left-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function Fg(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var s=X(),a=z(s);const l=N(()=>se("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class));Ot(a,()=>iM,(c,d)=>{d(c,Rt({get value(){return t.value},get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{let v=()=>g==null?void 0:g().selected,b=()=>g==null?void 0:g().highlighted;var _=rF(),y=z(_),x=tt(y);{var S=D=>{rp(D,{class:"size-4"})};wt(x,D=>{v()&&D(S)})}$(y);var I=_t(y,2);{var T=D=>{var L=X(),M=z(L);it(M,()=>t.children,()=>({selected:v(),highlighted:b()})),P(D,L)},O=D=>{var L=Ce();yt(()=>De(L,t.label||t.value)),P(D,L)};wt(I,D=>{t.children?D(T):D(O,!1)})}P(h,_)},$$slots:{default:!0}}))}),P(e,s),ht()}function iF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"chevron-up"},()=>n,{iconNode:[["path",{d:"m18 15-6-6-6 6"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function oF(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("flex cursor-default items-center justify-center py-1",t.class));Ot(a,()=>vM,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{iF(f,{class:"size-4"})},$$slots:{default:!0}}))}),P(e,s),ht()}function sF(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("flex cursor-default items-center justify-center py-1",t.class));Ot(a,()=>hM,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{Np(f,{class:"size-4"})},$$slots:{default:!0}}))}),P(e,s),ht()}var aF=et("<!> <!> <!>",1);function fy(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]);var a=X(),l=z(a);Ot(l,()=>dl,(c,d)=>{d(c,Rt(()=>t.portalProps,{children:(f,h)=>{var g=X(),v=z(g);const b=N(()=>se("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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t.class));Ot(v,()=>eM,(_,y)=>{y(_,Rt({get sideOffset(){return i()},get class(){return m(b)}},()=>s,{get ref(){return n()},set ref(x){n(x)},children:(x,S)=>{var I=aF(),T=z(I);oF(T,{});var O=_t(T,2);const D=N(()=>se("h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"));Ot(O,()=>cM,(M,U)=>{U(M,{get class(){return m(D)},children:(q,at)=>{var gt=X(),W=z(gt);it(W,()=>t.children??St),P(q,gt)},$$slots:{default:!0}})});var L=_t(O,2);sF(L,{}),P(x,I)},$$slots:{default:!0}}))}),P(f,g)},$$slots:{default:!0}}))}),P(e,a),ht()}var lF=et("<!> <!>",1);function hy(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=X(),a=z(s);const l=N(()=>se("border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t.class));Ot(a,()=>G3,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{var g=lF(),v=z(g);it(v,()=>t.children??St);var b=_t(v,2);Np(b,{class:"size-4 opacity-50"}),P(f,g)},$$slots:{default:!0}}))}),P(e,s),ht()}const gy=H3,uF=sM;function cF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"download"},()=>n,{iconNode:[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function dF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"file-input"},()=>n,{iconNode:[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M2 15h10"}],["path",{d:"m9 18 3-3-3-3"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function fF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"network"},()=>n,{iconNode:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function hF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"pencil"},()=>n,{iconNode:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function gF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"scan"},()=>n,{iconNode:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}function pF(e,t){ft(t,!0);let n=xt(t,["$$slots","$$events","$$legacy"]);Ln(e,Rt({name:"settings"},()=>n,{iconNode:[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]],children:(s,a)=>{var l=X(),c=z(l);it(c,()=>t.children??St),P(s,l)},$$slots:{default:!0}})),ht()}const vF=Op({base:"[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}});var mF=et("<div><!></div>");function v6(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"variant",3,"default"),s=xt(t,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var a=mF();let l;var c=tt(a);it(c,()=>t.children??St),$(a),rr(a,d=>n(d),()=>n()),yt(d=>l=Lt(a,l,{class:d,...s,role:"alert"}),[()=>se(vF({variant:i()}),t.class)]),P(e,a),ht()}function bF(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"class",7),s=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var a=X(),l=z(a);const c=N(()=>se("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/80",i()));return Ot(l,()=>Q0,(d,f)=>{f(d,Rt({get class(){return m(c)}},()=>s,{get ref(){return n()},set ref(h){n(h)}}))}),P(e,a),ht({get class(){return i()},set class(d){i(d)}})}const _F=Op({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}});var wF=et('<!> <span class="sr-only">Close</span>',1),yF=et("<!> <!>",1),xF=et("<!> <!>",1);function m6(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"side",3,"right"),s=xt(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var a=X(),l=z(a);Ot(l,()=>dl,(c,d)=>{d(c,Rt(()=>t.portalProps,{children:(f,h)=>{var g=xF(),v=z(g);bF(v,{});var b=_t(v,2);const _=N(()=>se(_F({side:i()}),t.class));Ot(b,()=>Rw,(y,x)=>{x(y,Rt({get class(){return m(_)}},()=>s,{get ref(){return n()},set ref(S){n(S)},children:(S,I)=>{var T=yF(),O=z(T);it(O,()=>t.children??St);var D=_t(O,2);Ot(D,()=>Nw,(L,M)=>{M(L,{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:(U,q)=>{var at=wF(),gt=z(at);Tp(gt,{class:"size-4"}),we(2),P(U,at)},$$slots:{default:!0}})}),P(S,T)},$$slots:{default:!0}}))}),P(f,g)},$$slots:{default:!0}}))}),P(e,a),ht()}var SF=et('<div class="size-3.5"></div>'),AF=et('<div class="flex size-4 items-center justify-center text-current"><!></div>');function py(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=k(t,"indeterminate",15,!1),a=xt(t,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var l=X(),c=z(l);const d=N(()=>se("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",t.class));Ot(c,()=>iN,(f,h)=>{h(f,Rt({get class(){return m(d)}},()=>a,{get ref(){return n()},set ref(v){n(v)},get checked(){return i()},set checked(v){i(v)},get indeterminate(){return s()},set indeterminate(v){s(v)},children:(v,b)=>{let _=()=>b==null?void 0:b().checked,y=()=>b==null?void 0:b().indeterminate;var x=AF(),S=tt(x);{var I=O=>{var D=X(),L=z(D);Ab(L,()=>xb(()=>import("./CsKrY2zA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),null,(M,U)=>{var q=N(()=>{var{default:j}=m(U);return{Minus:j}}),at=N(()=>m(q).Minus),gt=X(),W=z(gt);Ot(W,()=>m(at),(j,G)=>{G(j,{class:"size-3.5"})}),P(M,gt)}),P(O,D)},T=(O,D)=>{{var L=U=>{var q=X(),at=z(q);Ab(at,()=>xb(()=>Promise.resolve().then(()=>bT),void 0,import.meta.url),null,(gt,W)=>{var j=N(()=>{var{default:ot}=m(W);return{Check:ot}}),G=N(()=>m(j).Check),Z=X(),Q=z(Z);Ot(Q,()=>m(G),(ot,ut)=>{ut(ot,{class:"size-3.5"})}),P(gt,Z)}),P(U,q)},M=U=>{var q=SF();P(U,q)};wt(O,U=>{_()?U(L):U(M,!1)},D)}};wt(S,O=>{y()?O(I):O(T,!1)})}$(x),P(v,x)},$$slots:{default:!0}}))}),P(e,l),ht()}function Os(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=z(s);const l=N(()=>se("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class));Ot(a,()=>V3,(c,d)=>{d(c,Rt({get class(){return m(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),ht()}var CF=et('<div class="text-xs text-muted-foreground"> </div>'),PF=et('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function EF(e,t){const n=k(t,"isChecked",3,!1);var i=PF(),s=tt(i),a=tt(s);const l=N(()=>`${t.name}-label`);py(a,{get id(){return t.name},get"aria-labelledby"(){return m(l)},get checked(){return n()},get onCheckedChange(){return t.onCheckedChange}});var c=_t(a,2);const d=N(()=>`${t.name}-label`);Os(c,{get id(){return m(d)},get for(){return t.name},class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70","data-testid":"tags-menu-label",children:(g,v)=>{we();var b=Ce();yt(()=>De(b,t.label)),P(g,b)},$$slots:{default:!0}}),$(s);var f=_t(s,2);{var h=g=>{var v=CF(),b=tt(v,!0);$(v),yt(()=>De(b,t.helperText)),P(g,v)};wt(f,g=>{t.helperText&&g(h)})}$(i),P(e,i)}const du=Ee(!1);function kF(){return{error:Ee(null),isCreateClassifiersPanelOpen:du,openCreateClassifiersPanel:()=>du.set(!0),closeCreateClassifiersPanel:()=>{du.set(!1)},toggleCreateClassifiersPanel:()=>du.update(t=>!t)}}const fu=Ee(!1),jh=Ee(null),__=Ee(null),w_=Ee(null),y_=Ee(null);function TF(){return{isRefineClassifiersPanelOpen:fu,currentMode:jh,currentClassifierName:__,currentClassifierId:w_,currentClassifierClasses:y_,openRefineClassifiersPanel:(t,n,i,s)=>{jh.set(t),fu.set(!0),w_.set(n),__.set(i),y_.set(s)},closeRefineClassifiersPanel:()=>{jh.set(null),fu.set(!1)},toggleRefineClassifiersPanel:()=>{fu.update(t=>!t)}}}const{selectedSampleIds:IF}=zs(),$h=Ee(new Set);function OF(){const e=Ee(null),t=Ee(!1),n=async(f,h)=>{try{e.set(null);const g=await Nn.POST("/api/classifiers/{classifier_id}/save_classifier_to_file/{export_type}",{params:{path:{classifier_id:f,export_type:h}},responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},parseAs:"blob"}),v=g.response.headers.get("content-disposition"),b=v==null?void 0:v.match(/filename="(.+)"/),_=(b==null?void 0:b[1])??`classifier_${f}.pkl`;if(!g.data)return e.set(new Error("No data received from the server")),Promise.reject("No data received from the server");iD(_,g.data)}catch(g){throw e.set(g),g}},i=async f=>{var v;e.set(null);const h=f.target,g=(v=h.files)==null?void 0:v[0];if(!g){e.set(new Error("No file selected"));return}try{const b=new FormData;b.append("file",g),await Nn.POST("/api/classifiers/load_classifier_from_buffer",{body:b,headers:{Accept:"application/json"}}),h.value=""}catch(b){throw e.set(b),b}},s=async(f,h)=>{try{e.set(null),await Nn.POST("/api/classifiers/{classifier_id}/update_annotations",{params:{path:{classifier_id:f}},body:h})}catch(g){throw e.set(g),g}},a=async f=>{try{e.set(null),await Nn.POST("/api/classifiers/{classifier_id}/train_classifier",{params:{path:{classifier_id:f}}})}catch(h){throw e.set(h),h}};async function l(){const f=Pe(IF),h=Array.from(f),g=to.params.dataset_id;e.set(null);try{const v=await Nn.POST("/api/classifiers/get_negative_samples",{body:{dataset_id:g.toString(),positive_sample_ids:h}});return v.data?{positiveSampleIds:h,negativeSampleIds:v.data.negative_sample_ids}:(e.set(new Error("Failed to prepare samples")),Promise.reject("Failed to prepare samples"))}catch(v){return e.set(v),Promise.reject(v)}}return{error:e,isLoading:t,classifiersSelected:$h,saveClassifier:n,loadClassifier:i,updateAnnotations:s,trainClassifier:a,prepareSamples:l,classifierSelectionToggle:f=>{$h.update(h=>(h.has(f)?h.delete(f):h.add(f),new Set([...h])))},clearClassifiersSelected:()=>{$h.set(new Set)}}}const{classifiers:tg,selectedSampleIds:x_,classifierSamples:S_,setClassifierSamples:eg,toggleSampleSelection:A_,clearSelectedSamples:ng}=zs();function NF(){const e=OF(),t=Ee(null),n=Ee(!1),i=Ee(!1),{openRefineClassifiersPanel:s,closeRefineClassifiersPanel:a}=TF(),{toggleCreateClassifiersPanel:l,closeCreateClassifiersPanel:c}=kF(),d=()=>{Pe(n)||(t.set(null),n.set(!0),Nn.GET("/api/classifiers/get_all_classifiers").then(L=>{var M;(M=L.data)!=null&&M.classifiers?tg.set(L.data.classifiers):tg.set([])}).catch(L=>{t.set(L)}).finally(()=>{n.set(!1)}))};Pe(i)||(d(),i.set(!0));async function f(){t.set(null);const L=to.params.dataset_id;try{const M=await e.prepareSamples();eg({positiveSampleIds:M.positiveSampleIds,negativeSampleIds:M.negativeSampleIds}),l(),vu(mu.toClassifiers(L)),t.set(null)}catch(M){t.set(M)}}async function h(L){try{if(t.set(null),!L.dataset_id)throw new Error("Dataset ID is required");const M=await Nn.POST("/api/classifiers/create",{body:{name:L.name,class_list:L.class_list,dataset_id:L.dataset_id.toString()}});if(!M.data)return t.set(Error("Failed to create classifier.")),Promise.reject("Failed to create classifier.");const U=Pe(S_),q=U?[...U.positiveSampleIds,...U.negativeSampleIds]:[],at=Pe(x_),gt=Array.from(at),W=q.filter(G=>!at.has(G)),j={annotations:{positive:gt,negative:W}};return await e.updateAnnotations(M.data.classifier_id,j),await e.trainClassifier(M.data.classifier_id),await b(M.data.classifier_id,L.dataset_id.toString(),L.class_list),s("temp",M.data.classifier_id,M.data.name,L.class_list),c(),M.data}catch(M){return t.set(M),Promise.reject(M)}}const g=async()=>{try{n.set(!0),t.set(null);for(const L of Array.from(Pe(e.classifiersSelected)))await Nn.POST("/api/classifiers/{classifier_id}/run_on_dataset/{dataset_id}",{params:{path:{classifier_id:L,dataset_id:to.params.dataset_id}}});n.set(!1)}catch(L){n.set(!1),t.set(L)}},v=async(L,M)=>{try{t.set(null),await Nn.POST("/api/classifiers/{classifier_id}/commit_temp_classifier",{params:{path:{classifier_id:L}}}),d()}catch(U){t.set(U);return}ng(),a(),vu(mu.toSamples(M))},b=async(L,M,U)=>{var q;try{t.set(null);const at=await Nn.GET("/api/classifiers/{classifier_id}/samples_to_refine",{params:{path:{classifier_id:L},query:{dataset_id:M}}});if(!((q=at.data)!=null&&q.samples)){t.set(new Error("Failed to get samples for refinement."));return}const gt=at.data.samples,W=Object.keys(gt);if(W.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!U.every(G=>W.includes(G))){t.set(new Error(`Invalid class names. Expected classes: ${W.join(", ")}`));return}const j={positiveSampleIds:gt[U[0]]||[],negativeSampleIds:gt[U[1]]||[]};j.positiveSampleIds.forEach(G=>{A_(G)}),eg(j)}catch(at){return t.set(at),Promise.reject(at)}};async function _(L,M,U,q,at){try{t.set(null),await b(M,at,q),s("existing",M,U,q),vu(mu.toClassifiers(at))}catch(gt){t.set(gt)}}async function y(L,M,U){try{t.set(null);const q=Pe(S_),at=q?[...q.positiveSampleIds,...q.negativeSampleIds]:[],gt=Pe(x_),W=Array.from(gt),j=at.filter(Z=>!gt.has(Z)),G={annotations:{positive:W,negative:j}};ng(),await e.updateAnnotations(L,G),await e.trainClassifier(L),await b(L,M,U)}catch(q){t.set(q)}}async function x(L,M,U,q){var at;try{if(t.set(null),ng(),q){const W=(at=(await dk({path:{classifier_id:L}})).data)==null?void 0:at.samples;if(!W){t.set(new Error("No samples data received"));return}const j=Object.keys(W);if(j.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!U.every(Z=>j.includes(Z))){t.set(new Error(`Invalid class names. Expected classes: ${j.join(", ")}`));return}const G={positiveSampleIds:W[U[0]]||[],negativeSampleIds:W[U[1]]||[]};G.positiveSampleIds.forEach(Z=>{A_(Z)}),eg(G)}else await b(L,M,U)}catch(gt){t.set(gt)}}const S=async()=>{try{return t.set(null),await e.prepareSamples()}catch(L){throw t.set(L),L}},I=async(L,M)=>{try{t.set(null),await e.saveClassifier(L,M)}catch(U){throw t.set(U),U}},T=async L=>{try{t.set(null),await e.loadClassifier(L),d()}catch(M){throw t.set(M),M}},O=async(L,M)=>{try{t.set(null),await e.updateAnnotations(L,M)}catch(U){throw t.set(U),U}},D=async L=>{try{t.set(null),await e.trainClassifier(L)}catch(M){throw t.set(M),M}};return{classifiers:iu(tg),createClassifier:h,loadClassifiers:d,classifiersSelected:iu(e.classifiersSelected),classifierSelectionToggle:e.classifierSelectionToggle,clearClassifiersSelected:e.clearClassifiersSelected,apply:g,saveClassifier:I,updateAnnotations:O,trainClassifier:D,commitTempClassifier:v,getSamplesToRefine:b,prepareSamples:S,loadClassifier:T,startCreateClassifier:f,isLoading:iu(n),startRefinment:_,showClassifierTrainingSamples:x,refineClassifier:y,error:iu(t)}}function RF(e,t){ft(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=xt(t,["$$slots","$$events","$$legacy","ref","checked","class"]);var a=X(),l=z(a);const c=N(()=>se("focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.class));Ot(l,()=>_5,(d,f)=>{f(d,Rt({get class(){return m(c)}},()=>s,{get ref(){return n()},set ref(h){n(h)},get checked(){return i()},set checked(h){i(h)},children:(h,g)=>{var v=X(),b=z(v);const _=N(()=>se("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"));Ot(b,()=>y5,(y,x)=>{x(y,{get class(){return m(_)}})}),P(h,v)},$$slots:{default:!0}}))}),P(e,a),ht()}var MF=et("<!> <span>Settings</span>",1),LF=et("<!> <!>",1),DF=(e,t)=>{e.preventDefault(),t("hideAnnotations")},FF=et('<span class="italic opacity-70">Press a key...</span>'),BF=et("<span> </span>"),VF=(e,t)=>{e.preventDefault(),t("goBack")},zF=et('<span class="italic opacity-70">Press a key...</span>'),WF=et("<span> </span>"),HF=et("<!> <!>",1),UF=et("<!> <!>",1),GF=et("<!> <!>",1),KF=et('<form><!> <div class="grid gap-4 py-4"><div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Keyboard Shortcuts</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="hide-annotations" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="go-back" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Display Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <div class="relative"><!></div></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Annotation Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <!></div></div></div> <!></form>'),qF=et("<!> <!>",1),YF=et("<!> <!>",1);function b6(e,t){ft(t,!0);const[n,i]=$o(),s=()=>Ge(a,"$settingsStore",n),{settingsStore:a,saveSettings:l}=np();let c=vt(!1),d=vt(!1),f=vt(dt({hideAnnotations:"v",goBack:"Escape"})),h=vt("contain"),g=vt(!0),v=!1;xe(()=>{s()&&!v&&(rt(f,dt({hideAnnotations:s().key_hide_annotations||"v",goBack:s().key_go_back||"Escape"})),rt(h,dt(s().grid_view_sample_rendering||"contain")),rt(g,dt(!!(s().show_annotation_text_labels??!0))),v=!0)});let b=vt(null);function _(L){rt(c,dt(L)),rt(b,null)}function y(L){rt(h,dt(L))}function x(L){L.preventDefault(),S()}async function S(){rt(d,!0);try{await l({key_hide_annotations:m(f).hideAnnotations,key_go_back:m(f).goBack,grid_view_sample_rendering:m(h),show_annotation_text_labels:m(g)}),_(!1)}catch(L){console.error("Error saving settings:",L)}finally{rt(d,!1)}}const I=L=>{rt(b,dt(L))},T=L=>{if(!m(b))return;L.preventDefault(),L.stopPropagation();let M=L.key;M===" "?M="Space":M.length===1&&/^[a-zA-Z]$/.test(M)&&!L.getModifierState("CapsLock")&&(M=M.toLowerCase()),m(b)==="hideAnnotations"?m(f).hideAnnotations=M:m(b)==="goBack"&&(m(f).goBack=M),rt(b,null)};var O=X();yb("keydown",XE,T);var D=z(O);Ot(D,()=>Yw,(L,M)=>{M(L,{get open(){return m(c)},set open(U){rt(c,dt(U))},children:(U,q)=>{var at=YF(),gt=z(at);Ot(gt,()=>lL,(j,G)=>{G(j,{children:(Z,Q)=>{Yn(Z,{variant:"outline",class:"gap-2",children:(ot,ut)=>{var mt=MF(),bt=z(mt);pF(bt,{class:"h-4 w-4"}),we(2),P(ot,mt)},$$slots:{default:!0}})},$$slots:{default:!0}})});var W=_t(gt,2);Ot(W,()=>Xw,(j,G)=>{G(j,{children:(Z,Q)=>{var ot=qF(),ut=z(ot);Ot(ut,()=>Kw,(bt,st)=>{st(bt,{})});var mt=_t(ut,2);Ot(mt,()=>qw,(bt,st)=>{st(bt,{class:"border-border bg-background sm:max-w-[500px]",children:(At,kt)=>{var Vt=KF(),Nt=tt(Vt);Ot(Nt,()=>Gw,(zt,Se)=>{Se(zt,{children:(Me,lr)=>{var Sn=LF(),ln=z(Sn);Ot(ln,()=>Uw,(qe,ur)=>{ur(qe,{class:"text-foreground",children:(Fn,Ri)=>{we();var ti=Ce("Settings");P(Fn,ti)},$$slots:{default:!0}})});var Dn=_t(ln,2);Ot(Dn,()=>aL,(qe,ur)=>{ur(qe,{class:"text-foreground",children:(Fn,Ri)=>{we();var ti=Ce("Configure your application preferences.");P(Fn,ti)},$$slots:{default:!0}})}),P(Me,Sn)},$$slots:{default:!0}})});var Bt=_t(Nt,2),ue=tt(Bt),Yt=_t(tt(ue),2),It=tt(Yt);Os(It,{for:"hide-annotations",class:"text-right text-foreground",children:(zt,Se)=>{we();var Me=Ce("Hide Annotations");P(zt,Me)},$$slots:{default:!0}});var Ht=_t(It,2);Ht.__click=[DF,I];var ce=tt(Ht);{var ge=zt=>{var Se=FF();P(zt,Se)},Ye=zt=>{var Se=BF(),Me=tt(Se,!0);$(Se),yt(()=>De(Me,m(f).hideAnnotations)),P(zt,Se)};wt(ce,zt=>{m(b)==="hideAnnotations"?zt(ge):zt(Ye,!1)})}$(Ht),$(Yt);var Kt=_t(Yt,2),Ut=tt(Kt);Os(Ut,{for:"go-back",class:"text-right text-foreground",children:(zt,Se)=>{we();var Me=Ce("Go Back");P(zt,Me)},$$slots:{default:!0}});var de=_t(Ut,2);de.__click=[VF,I];var pe=tt(de);{var Te=zt=>{var Se=zF();P(zt,Se)},We=zt=>{var Se=WF(),Me=tt(Se,!0);$(Se),yt(()=>De(Me,m(f).goBack)),P(zt,Se)};wt(pe,zt=>{m(b)==="goBack"?zt(Te):zt(We,!1)})}$(de),$(Kt),$(ue);var Fe=_t(ue,2),ve=_t(tt(Fe),2),an=tt(ve);Os(an,{for:"grid-view-rendering",class:"text-right text-foreground",children:(zt,Se)=>{we();var Me=Ce("Grid View Rendering");P(zt,Me)},$$slots:{default:!0}});var Qe=_t(an,2),me=tt(Qe);gy(me,{type:"single",get value(){return m(h)},onValueChange:y,children:(zt,Se)=>{var Me=UF(),lr=z(Me);hy(lr,{id:"grid-view-rendering",children:(ln,Dn)=>{we();var qe=Ce();yt(()=>De(qe,m(h)==="cover"?"Cover":"Contain")),P(ln,qe)},$$slots:{default:!0}});var Sn=_t(lr,2);fy(Sn,{children:(ln,Dn)=>{var qe=HF(),ur=z(qe);Fg(ur,{value:"cover",children:(Ri,ti)=>{we();var ao=Ce("Cover");P(Ri,ao)},$$slots:{default:!0}});var Fn=_t(ur,2);Fg(Fn,{value:"contain",children:(Ri,ti)=>{we();var ao=Ce("Contain");P(Ri,ao)},$$slots:{default:!0}}),P(ln,qe)},$$slots:{default:!0}}),P(zt,Me)},$$slots:{default:!0}}),$(Qe),$(ve),$(Fe);var fe=_t(Fe,2),Ke=_t(tt(fe),2),je=tt(Ke);Os(je,{for:"show-annotation-text-labels",class:"text-right text-foreground",children:(zt,Se)=>{we();var Me=Ce("Show Annotation Text Labels");P(zt,Me)},$$slots:{default:!0}});var gn=_t(je,2);RF(gn,{id:"show-annotation-text-labels",get disabled(){return m(d)},get checked(){return m(g)},set checked(zt){rt(g,dt(zt))}}),$(Ke),$(fe),$(Bt);var Jn=_t(Bt,2);Ot(Jn,()=>nL,(zt,Se)=>{Se(zt,{children:(Me,lr)=>{var Sn=GF(),ln=z(Sn);Yn(ln,{variant:"outline",type:"button",onclick:()=>_(!1),children:(qe,ur)=>{we();var Fn=Ce("Cancel");P(qe,Fn)},$$slots:{default:!0}});var Dn=_t(ln,2);Yn(Dn,{type:"submit",get disabled(){return m(d)},children:(qe,ur)=>{we();var Fn=Ce();yt(()=>De(Fn,m(d)?"Saving...":"Save Changes")),P(qe,Fn)},$$slots:{default:!0}}),P(Me,Sn)},$$slots:{default:!0}})}),$(Vt),yb("submit",Vt,x),P(At,Vt)},$$slots:{default:!0}})}),P(Z,ot)},$$slots:{default:!0}})}),P(U,at)},$$slots:{default:!0}})}),P(e,O),ht(),i()}io(["click"]);var zu={exports:{}};/**
67
- * @license
68
- * Lodash <https://lodash.com/>
69
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
70
- * Released under MIT license <https://lodash.com/license>
71
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
72
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
73
- */zu.exports;(function(e,t){(function(){var n,i="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,v=2,b=4,_=1,y=2,x=1,S=2,I=4,T=8,O=16,D=32,L=64,M=128,U=256,q=512,at=30,gt="...",W=800,j=16,G=1,Z=2,Q=3,ot=1/0,ut=9007199254740991,mt=17976931348623157e292,bt=NaN,st=4294967295,At=st-1,kt=st>>>1,Vt=[["ary",M],["bind",x],["bindKey",S],["curry",T],["curryRight",O],["flip",q],["partial",D],["partialRight",L],["rearg",U]],Nt="[object Arguments]",Bt="[object Array]",ue="[object AsyncFunction]",Yt="[object Boolean]",It="[object Date]",Ht="[object DOMException]",ce="[object Error]",ge="[object Function]",Ye="[object GeneratorFunction]",Kt="[object Map]",Ut="[object Number]",de="[object Null]",pe="[object Object]",Te="[object Promise]",We="[object Proxy]",Fe="[object RegExp]",ve="[object Set]",an="[object String]",Qe="[object Symbol]",me="[object Undefined]",fe="[object WeakMap]",Ke="[object WeakSet]",je="[object ArrayBuffer]",gn="[object DataView]",Jn="[object Float32Array]",zt="[object Float64Array]",Se="[object Int8Array]",Me="[object Int16Array]",lr="[object Int32Array]",Sn="[object Uint8Array]",ln="[object Uint8ClampedArray]",Dn="[object Uint16Array]",qe="[object Uint32Array]",ur=/\b__p \+= '';/g,Fn=/\b(__p \+=) '' \+/g,Ri=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ti=/&(?:amp|lt|gt|quot|#39);/g,ao=/[&<>"']/g,Wy=RegExp(ti.source),Hy=RegExp(ao.source),Uy=/<%-([\s\S]+?)%>/g,Gy=/<%([\s\S]+?)%>/g,zp=/<%=([\s\S]+?)%>/g,Ky=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qy=/^\w*$/,Yy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yf=/[\\^$.*+?()[\]{}|]/g,Xy=RegExp(yf.source),xf=/^\s+/,Zy=/\s/,Jy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qy=/\{\n\/\* \[wrapped with (.+)\] \*/,jy=/,? & /,$y=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tx=/[()=,{}\[\]\/\s]/,ex=/\\(\\)?/g,nx=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wp=/\w*$/,rx=/^[-+]0x[0-9a-f]+$/i,ix=/^0b[01]+$/i,ox=/^\[object .+?Constructor\]$/,sx=/^0o[0-7]+$/i,ax=/^(?:0|[1-9]\d*)$/,lx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vl=/($^)/,ux=/['\n\r\u2028\u2029\\]/g,ml="\\ud800-\\udfff",cx="\\u0300-\\u036f",dx="\\ufe20-\\ufe2f",fx="\\u20d0-\\u20ff",Hp=cx+dx+fx,Up="\\u2700-\\u27bf",Gp="a-z\\xdf-\\xf6\\xf8-\\xff",hx="\\xac\\xb1\\xd7\\xf7",gx="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",px="\\u2000-\\u206f",vx=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Kp="A-Z\\xc0-\\xd6\\xd8-\\xde",qp="\\ufe0e\\ufe0f",Yp=hx+gx+px+vx,Sf="['’]",mx="["+ml+"]",Xp="["+Yp+"]",bl="["+Hp+"]",Zp="\\d+",bx="["+Up+"]",Jp="["+Gp+"]",Qp="[^"+ml+Yp+Zp+Up+Gp+Kp+"]",Af="\\ud83c[\\udffb-\\udfff]",_x="(?:"+bl+"|"+Af+")",jp="[^"+ml+"]",Cf="(?:\\ud83c[\\udde6-\\uddff]){2}",Pf="[\\ud800-\\udbff][\\udc00-\\udfff]",lo="["+Kp+"]",$p="\\u200d",tv="(?:"+Jp+"|"+Qp+")",wx="(?:"+lo+"|"+Qp+")",ev="(?:"+Sf+"(?:d|ll|m|re|s|t|ve))?",nv="(?:"+Sf+"(?:D|LL|M|RE|S|T|VE))?",rv=_x+"?",iv="["+qp+"]?",yx="(?:"+$p+"(?:"+[jp,Cf,Pf].join("|")+")"+iv+rv+")*",xx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ov=iv+rv+yx,Ax="(?:"+[bx,Cf,Pf].join("|")+")"+ov,Cx="(?:"+[jp+bl+"?",bl,Cf,Pf,mx].join("|")+")",Px=RegExp(Sf,"g"),Ex=RegExp(bl,"g"),Ef=RegExp(Af+"(?="+Af+")|"+Cx+ov,"g"),kx=RegExp([lo+"?"+Jp+"+"+ev+"(?="+[Xp,lo,"$"].join("|")+")",wx+"+"+nv+"(?="+[Xp,lo+tv,"$"].join("|")+")",lo+"?"+tv+"+"+ev,lo+"+"+nv,Sx,xx,Zp,Ax].join("|"),"g"),Tx=RegExp("["+$p+ml+Hp+qp+"]"),Ix=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ox=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nx=-1,Ie={};Ie[Jn]=Ie[zt]=Ie[Se]=Ie[Me]=Ie[lr]=Ie[Sn]=Ie[ln]=Ie[Dn]=Ie[qe]=!0,Ie[Nt]=Ie[Bt]=Ie[je]=Ie[Yt]=Ie[gn]=Ie[It]=Ie[ce]=Ie[ge]=Ie[Kt]=Ie[Ut]=Ie[pe]=Ie[Fe]=Ie[ve]=Ie[an]=Ie[fe]=!1;var ke={};ke[Nt]=ke[Bt]=ke[je]=ke[gn]=ke[Yt]=ke[It]=ke[Jn]=ke[zt]=ke[Se]=ke[Me]=ke[lr]=ke[Kt]=ke[Ut]=ke[pe]=ke[Fe]=ke[ve]=ke[an]=ke[Qe]=ke[Sn]=ke[ln]=ke[Dn]=ke[qe]=!0,ke[ce]=ke[ge]=ke[fe]=!1;var Rx={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Mx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Lx={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Dx={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fx=parseFloat,Bx=parseInt,sv=typeof br=="object"&&br&&br.Object===Object&&br,Vx=typeof self=="object"&&self&&self.Object===Object&&self,$e=sv||Vx||Function("return this")(),kf=t&&!t.nodeType&&t,Mi=kf&&!0&&e&&!e.nodeType&&e,av=Mi&&Mi.exports===kf,Tf=av&&sv.process,Bn=function(){try{var H=Mi&&Mi.require&&Mi.require("util").types;return H||Tf&&Tf.binding&&Tf.binding("util")}catch{}}(),lv=Bn&&Bn.isArrayBuffer,uv=Bn&&Bn.isDate,cv=Bn&&Bn.isMap,dv=Bn&&Bn.isRegExp,fv=Bn&&Bn.isSet,hv=Bn&&Bn.isTypedArray;function An(H,nt,J){switch(J.length){case 0:return H.call(nt);case 1:return H.call(nt,J[0]);case 2:return H.call(nt,J[0],J[1]);case 3:return H.call(nt,J[0],J[1],J[2])}return H.apply(nt,J)}function zx(H,nt,J,Et){for(var Gt=-1,he=H==null?0:H.length;++Gt<he;){var Xe=H[Gt];nt(Et,Xe,J(Xe),H)}return Et}function Vn(H,nt){for(var J=-1,Et=H==null?0:H.length;++J<Et&&nt(H[J],J,H)!==!1;);return H}function Wx(H,nt){for(var J=H==null?0:H.length;J--&&nt(H[J],J,H)!==!1;);return H}function gv(H,nt){for(var J=-1,Et=H==null?0:H.length;++J<Et;)if(!nt(H[J],J,H))return!1;return!0}function ei(H,nt){for(var J=-1,Et=H==null?0:H.length,Gt=0,he=[];++J<Et;){var Xe=H[J];nt(Xe,J,H)&&(he[Gt++]=Xe)}return he}function _l(H,nt){var J=H==null?0:H.length;return!!J&&uo(H,nt,0)>-1}function If(H,nt,J){for(var Et=-1,Gt=H==null?0:H.length;++Et<Gt;)if(J(nt,H[Et]))return!0;return!1}function Le(H,nt){for(var J=-1,Et=H==null?0:H.length,Gt=Array(Et);++J<Et;)Gt[J]=nt(H[J],J,H);return Gt}function ni(H,nt){for(var J=-1,Et=nt.length,Gt=H.length;++J<Et;)H[Gt+J]=nt[J];return H}function Of(H,nt,J,Et){var Gt=-1,he=H==null?0:H.length;for(Et&&he&&(J=H[++Gt]);++Gt<he;)J=nt(J,H[Gt],Gt,H);return J}function Hx(H,nt,J,Et){var Gt=H==null?0:H.length;for(Et&&Gt&&(J=H[--Gt]);Gt--;)J=nt(J,H[Gt],Gt,H);return J}function Nf(H,nt){for(var J=-1,Et=H==null?0:H.length;++J<Et;)if(nt(H[J],J,H))return!0;return!1}var Ux=Rf("length");function Gx(H){return H.split("")}function Kx(H){return H.match($y)||[]}function pv(H,nt,J){var Et;return J(H,function(Gt,he,Xe){if(nt(Gt,he,Xe))return Et=he,!1}),Et}function wl(H,nt,J,Et){for(var Gt=H.length,he=J+(Et?1:-1);Et?he--:++he<Gt;)if(nt(H[he],he,H))return he;return-1}function uo(H,nt,J){return nt===nt?r1(H,nt,J):wl(H,vv,J)}function qx(H,nt,J,Et){for(var Gt=J-1,he=H.length;++Gt<he;)if(Et(H[Gt],nt))return Gt;return-1}function vv(H){return H!==H}function mv(H,nt){var J=H==null?0:H.length;return J?Lf(H,nt)/J:bt}function Rf(H){return function(nt){return nt==null?n:nt[H]}}function Mf(H){return function(nt){return H==null?n:H[nt]}}function bv(H,nt,J,Et,Gt){return Gt(H,function(he,Xe,Ae){J=Et?(Et=!1,he):nt(J,he,Xe,Ae)}),J}function Yx(H,nt){var J=H.length;for(H.sort(nt);J--;)H[J]=H[J].value;return H}function Lf(H,nt){for(var J,Et=-1,Gt=H.length;++Et<Gt;){var he=nt(H[Et]);he!==n&&(J=J===n?he:J+he)}return J}function Df(H,nt){for(var J=-1,Et=Array(H);++J<H;)Et[J]=nt(J);return Et}function Xx(H,nt){return Le(nt,function(J){return[J,H[J]]})}function _v(H){return H&&H.slice(0,Sv(H)+1).replace(xf,"")}function Cn(H){return function(nt){return H(nt)}}function Ff(H,nt){return Le(nt,function(J){return H[J]})}function os(H,nt){return H.has(nt)}function wv(H,nt){for(var J=-1,Et=H.length;++J<Et&&uo(nt,H[J],0)>-1;);return J}function yv(H,nt){for(var J=H.length;J--&&uo(nt,H[J],0)>-1;);return J}function Zx(H,nt){for(var J=H.length,Et=0;J--;)H[J]===nt&&++Et;return Et}var Jx=Mf(Rx),Qx=Mf(Mx);function jx(H){return"\\"+Dx[H]}function $x(H,nt){return H==null?n:H[nt]}function co(H){return Tx.test(H)}function t1(H){return Ix.test(H)}function e1(H){for(var nt,J=[];!(nt=H.next()).done;)J.push(nt.value);return J}function Bf(H){var nt=-1,J=Array(H.size);return H.forEach(function(Et,Gt){J[++nt]=[Gt,Et]}),J}function xv(H,nt){return function(J){return H(nt(J))}}function ri(H,nt){for(var J=-1,Et=H.length,Gt=0,he=[];++J<Et;){var Xe=H[J];(Xe===nt||Xe===h)&&(H[J]=h,he[Gt++]=J)}return he}function yl(H){var nt=-1,J=Array(H.size);return H.forEach(function(Et){J[++nt]=Et}),J}function n1(H){var nt=-1,J=Array(H.size);return H.forEach(function(Et){J[++nt]=[Et,Et]}),J}function r1(H,nt,J){for(var Et=J-1,Gt=H.length;++Et<Gt;)if(H[Et]===nt)return Et;return-1}function i1(H,nt,J){for(var Et=J+1;Et--;)if(H[Et]===nt)return Et;return Et}function fo(H){return co(H)?s1(H):Ux(H)}function Qn(H){return co(H)?a1(H):Gx(H)}function Sv(H){for(var nt=H.length;nt--&&Zy.test(H.charAt(nt)););return nt}var o1=Mf(Lx);function s1(H){for(var nt=Ef.lastIndex=0;Ef.test(H);)++nt;return nt}function a1(H){return H.match(Ef)||[]}function l1(H){return H.match(kx)||[]}var u1=function H(nt){nt=nt==null?$e:ho.defaults($e.Object(),nt,ho.pick($e,Ox));var J=nt.Array,Et=nt.Date,Gt=nt.Error,he=nt.Function,Xe=nt.Math,Ae=nt.Object,Vf=nt.RegExp,c1=nt.String,zn=nt.TypeError,xl=J.prototype,d1=he.prototype,go=Ae.prototype,Sl=nt["__core-js_shared__"],Al=d1.toString,_e=go.hasOwnProperty,f1=0,Av=function(){var r=/[^.]+$/.exec(Sl&&Sl.keys&&Sl.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Cl=go.toString,h1=Al.call(Ae),g1=$e._,p1=Vf("^"+Al.call(_e).replace(yf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pl=av?nt.Buffer:n,ii=nt.Symbol,El=nt.Uint8Array,Cv=Pl?Pl.allocUnsafe:n,kl=xv(Ae.getPrototypeOf,Ae),Pv=Ae.create,Ev=go.propertyIsEnumerable,Tl=xl.splice,kv=ii?ii.isConcatSpreadable:n,ss=ii?ii.iterator:n,Li=ii?ii.toStringTag:n,Il=function(){try{var r=zi(Ae,"defineProperty");return r({},"",{}),r}catch{}}(),v1=nt.clearTimeout!==$e.clearTimeout&&nt.clearTimeout,m1=Et&&Et.now!==$e.Date.now&&Et.now,b1=nt.setTimeout!==$e.setTimeout&&nt.setTimeout,Ol=Xe.ceil,Nl=Xe.floor,zf=Ae.getOwnPropertySymbols,_1=Pl?Pl.isBuffer:n,Tv=nt.isFinite,w1=xl.join,y1=xv(Ae.keys,Ae),Ze=Xe.max,rn=Xe.min,x1=Et.now,S1=nt.parseInt,Iv=Xe.random,A1=xl.reverse,Wf=zi(nt,"DataView"),as=zi(nt,"Map"),Hf=zi(nt,"Promise"),po=zi(nt,"Set"),ls=zi(nt,"WeakMap"),us=zi(Ae,"create"),Rl=ls&&new ls,vo={},C1=Wi(Wf),P1=Wi(as),E1=Wi(Hf),k1=Wi(po),T1=Wi(ls),Ml=ii?ii.prototype:n,cs=Ml?Ml.valueOf:n,Ov=Ml?Ml.toString:n;function C(r){if(Ve(r)&&!qt(r)&&!(r instanceof oe)){if(r instanceof Wn)return r;if(_e.call(r,"__wrapped__"))return Nm(r)}return new Wn(r)}var mo=function(){function r(){}return function(o){if(!Be(o))return{};if(Pv)return Pv(o);r.prototype=o;var u=new r;return r.prototype=n,u}}();function Ll(){}function Wn(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=n}C.templateSettings={escape:Uy,evaluate:Gy,interpolate:zp,variable:"",imports:{_:C}},C.prototype=Ll.prototype,C.prototype.constructor=C,Wn.prototype=mo(Ll.prototype),Wn.prototype.constructor=Wn;function oe(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=st,this.__views__=[]}function I1(){var r=new oe(this.__wrapped__);return r.__actions__=pn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=pn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=pn(this.__views__),r}function O1(){if(this.__filtered__){var r=new oe(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function N1(){var r=this.__wrapped__.value(),o=this.__dir__,u=qt(r),p=o<0,w=u?r.length:0,E=GS(0,w,this.__views__),R=E.start,V=E.end,K=V-R,lt=p?V:R-1,ct=this.__iteratees__,pt=ct.length,Ct=0,Tt=rn(K,this.__takeCount__);if(!u||!p&&w==K&&Tt==K)return em(r,this.__actions__);var Dt=[];t:for(;K--&&Ct<Tt;){lt+=o;for(var Qt=-1,Ft=r[lt];++Qt<pt;){var re=ct[Qt],ae=re.iteratee,kn=re.type,dn=ae(Ft);if(kn==Z)Ft=dn;else if(!dn){if(kn==G)continue t;break t}}Dt[Ct++]=Ft}return Dt}oe.prototype=mo(Ll.prototype),oe.prototype.constructor=oe;function Di(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var p=r[o];this.set(p[0],p[1])}}function R1(){this.__data__=us?us(null):{},this.size=0}function M1(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function L1(r){var o=this.__data__;if(us){var u=o[r];return u===d?n:u}return _e.call(o,r)?o[r]:n}function D1(r){var o=this.__data__;return us?o[r]!==n:_e.call(o,r)}function F1(r,o){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=us&&o===n?d:o,this}Di.prototype.clear=R1,Di.prototype.delete=M1,Di.prototype.get=L1,Di.prototype.has=D1,Di.prototype.set=F1;function Pr(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var p=r[o];this.set(p[0],p[1])}}function B1(){this.__data__=[],this.size=0}function V1(r){var o=this.__data__,u=Dl(o,r);if(u<0)return!1;var p=o.length-1;return u==p?o.pop():Tl.call(o,u,1),--this.size,!0}function z1(r){var o=this.__data__,u=Dl(o,r);return u<0?n:o[u][1]}function W1(r){return Dl(this.__data__,r)>-1}function H1(r,o){var u=this.__data__,p=Dl(u,r);return p<0?(++this.size,u.push([r,o])):u[p][1]=o,this}Pr.prototype.clear=B1,Pr.prototype.delete=V1,Pr.prototype.get=z1,Pr.prototype.has=W1,Pr.prototype.set=H1;function Er(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var p=r[o];this.set(p[0],p[1])}}function U1(){this.size=0,this.__data__={hash:new Di,map:new(as||Pr),string:new Di}}function G1(r){var o=Xl(this,r).delete(r);return this.size-=o?1:0,o}function K1(r){return Xl(this,r).get(r)}function q1(r){return Xl(this,r).has(r)}function Y1(r,o){var u=Xl(this,r),p=u.size;return u.set(r,o),this.size+=u.size==p?0:1,this}Er.prototype.clear=U1,Er.prototype.delete=G1,Er.prototype.get=K1,Er.prototype.has=q1,Er.prototype.set=Y1;function Fi(r){var o=-1,u=r==null?0:r.length;for(this.__data__=new Er;++o<u;)this.add(r[o])}function X1(r){return this.__data__.set(r,d),this}function Z1(r){return this.__data__.has(r)}Fi.prototype.add=Fi.prototype.push=X1,Fi.prototype.has=Z1;function jn(r){var o=this.__data__=new Pr(r);this.size=o.size}function J1(){this.__data__=new Pr,this.size=0}function Q1(r){var o=this.__data__,u=o.delete(r);return this.size=o.size,u}function j1(r){return this.__data__.get(r)}function $1(r){return this.__data__.has(r)}function tS(r,o){var u=this.__data__;if(u instanceof Pr){var p=u.__data__;if(!as||p.length<s-1)return p.push([r,o]),this.size=++u.size,this;u=this.__data__=new Er(p)}return u.set(r,o),this.size=u.size,this}jn.prototype.clear=J1,jn.prototype.delete=Q1,jn.prototype.get=j1,jn.prototype.has=$1,jn.prototype.set=tS;function Nv(r,o){var u=qt(r),p=!u&&Hi(r),w=!u&&!p&&ui(r),E=!u&&!p&&!w&&yo(r),R=u||p||w||E,V=R?Df(r.length,c1):[],K=V.length;for(var lt in r)(o||_e.call(r,lt))&&!(R&&(lt=="length"||w&&(lt=="offset"||lt=="parent")||E&&(lt=="buffer"||lt=="byteLength"||lt=="byteOffset")||Or(lt,K)))&&V.push(lt);return V}function Rv(r){var o=r.length;return o?r[$f(0,o-1)]:n}function eS(r,o){return Zl(pn(r),Bi(o,0,r.length))}function nS(r){return Zl(pn(r))}function Uf(r,o,u){(u!==n&&!$n(r[o],u)||u===n&&!(o in r))&&kr(r,o,u)}function ds(r,o,u){var p=r[o];(!(_e.call(r,o)&&$n(p,u))||u===n&&!(o in r))&&kr(r,o,u)}function Dl(r,o){for(var u=r.length;u--;)if($n(r[u][0],o))return u;return-1}function rS(r,o,u,p){return oi(r,function(w,E,R){o(p,w,u(w),R)}),p}function Mv(r,o){return r&&dr(o,Je(o),r)}function iS(r,o){return r&&dr(o,mn(o),r)}function kr(r,o,u){o=="__proto__"&&Il?Il(r,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[o]=u}function Gf(r,o){for(var u=-1,p=o.length,w=J(p),E=r==null;++u<p;)w[u]=E?n:Ah(r,o[u]);return w}function Bi(r,o,u){return r===r&&(u!==n&&(r=r<=u?r:u),o!==n&&(r=r>=o?r:o)),r}function Hn(r,o,u,p,w,E){var R,V=o&g,K=o&v,lt=o&b;if(u&&(R=w?u(r,p,w,E):u(r)),R!==n)return R;if(!Be(r))return r;var ct=qt(r);if(ct){if(R=qS(r),!V)return pn(r,R)}else{var pt=on(r),Ct=pt==ge||pt==Ye;if(ui(r))return im(r,V);if(pt==pe||pt==Nt||Ct&&!w){if(R=K||Ct?{}:Sm(r),!V)return K?LS(r,iS(R,r)):MS(r,Mv(R,r))}else{if(!ke[pt])return w?r:{};R=YS(r,pt,V)}}E||(E=new jn);var Tt=E.get(r);if(Tt)return Tt;E.set(r,R),jm(r)?r.forEach(function(Ft){R.add(Hn(Ft,o,u,Ft,r,E))}):Jm(r)&&r.forEach(function(Ft,re){R.set(re,Hn(Ft,o,u,re,r,E))});var Dt=lt?K?ch:uh:K?mn:Je,Qt=ct?n:Dt(r);return Vn(Qt||r,function(Ft,re){Qt&&(re=Ft,Ft=r[re]),ds(R,re,Hn(Ft,o,u,re,r,E))}),R}function oS(r){var o=Je(r);return function(u){return Lv(u,r,o)}}function Lv(r,o,u){var p=u.length;if(r==null)return!p;for(r=Ae(r);p--;){var w=u[p],E=o[w],R=r[w];if(R===n&&!(w in r)||!E(R))return!1}return!0}function Dv(r,o,u){if(typeof r!="function")throw new zn(l);return bs(function(){r.apply(n,u)},o)}function fs(r,o,u,p){var w=-1,E=_l,R=!0,V=r.length,K=[],lt=o.length;if(!V)return K;u&&(o=Le(o,Cn(u))),p?(E=If,R=!1):o.length>=s&&(E=os,R=!1,o=new Fi(o));t:for(;++w<V;){var ct=r[w],pt=u==null?ct:u(ct);if(ct=p||ct!==0?ct:0,R&&pt===pt){for(var Ct=lt;Ct--;)if(o[Ct]===pt)continue t;K.push(ct)}else E(o,pt,p)||K.push(ct)}return K}var oi=um(cr),Fv=um(qf,!0);function sS(r,o){var u=!0;return oi(r,function(p,w,E){return u=!!o(p,w,E),u}),u}function Fl(r,o,u){for(var p=-1,w=r.length;++p<w;){var E=r[p],R=o(E);if(R!=null&&(V===n?R===R&&!En(R):u(R,V)))var V=R,K=E}return K}function aS(r,o,u,p){var w=r.length;for(u=Xt(u),u<0&&(u=-u>w?0:w+u),p=p===n||p>w?w:Xt(p),p<0&&(p+=w),p=u>p?0:tb(p);u<p;)r[u++]=o;return r}function Bv(r,o){var u=[];return oi(r,function(p,w,E){o(p,w,E)&&u.push(p)}),u}function tn(r,o,u,p,w){var E=-1,R=r.length;for(u||(u=ZS),w||(w=[]);++E<R;){var V=r[E];o>0&&u(V)?o>1?tn(V,o-1,u,p,w):ni(w,V):p||(w[w.length]=V)}return w}var Kf=cm(),Vv=cm(!0);function cr(r,o){return r&&Kf(r,o,Je)}function qf(r,o){return r&&Vv(r,o,Je)}function Bl(r,o){return ei(o,function(u){return Nr(r[u])})}function Vi(r,o){o=ai(o,r);for(var u=0,p=o.length;r!=null&&u<p;)r=r[fr(o[u++])];return u&&u==p?r:n}function zv(r,o,u){var p=o(r);return qt(r)?p:ni(p,u(r))}function un(r){return r==null?r===n?me:de:Li&&Li in Ae(r)?US(r):nA(r)}function Yf(r,o){return r>o}function lS(r,o){return r!=null&&_e.call(r,o)}function uS(r,o){return r!=null&&o in Ae(r)}function cS(r,o,u){return r>=rn(o,u)&&r<Ze(o,u)}function Xf(r,o,u){for(var p=u?If:_l,w=r[0].length,E=r.length,R=E,V=J(E),K=1/0,lt=[];R--;){var ct=r[R];R&&o&&(ct=Le(ct,Cn(o))),K=rn(ct.length,K),V[R]=!u&&(o||w>=120&&ct.length>=120)?new Fi(R&&ct):n}ct=r[0];var pt=-1,Ct=V[0];t:for(;++pt<w&&lt.length<K;){var Tt=ct[pt],Dt=o?o(Tt):Tt;if(Tt=u||Tt!==0?Tt:0,!(Ct?os(Ct,Dt):p(lt,Dt,u))){for(R=E;--R;){var Qt=V[R];if(!(Qt?os(Qt,Dt):p(r[R],Dt,u)))continue t}Ct&&Ct.push(Dt),lt.push(Tt)}}return lt}function dS(r,o,u,p){return cr(r,function(w,E,R){o(p,u(w),E,R)}),p}function hs(r,o,u){o=ai(o,r),r=Em(r,o);var p=r==null?r:r[fr(Gn(o))];return p==null?n:An(p,r,u)}function Wv(r){return Ve(r)&&un(r)==Nt}function fS(r){return Ve(r)&&un(r)==je}function hS(r){return Ve(r)&&un(r)==It}function gs(r,o,u,p,w){return r===o?!0:r==null||o==null||!Ve(r)&&!Ve(o)?r!==r&&o!==o:gS(r,o,u,p,gs,w)}function gS(r,o,u,p,w,E){var R=qt(r),V=qt(o),K=R?Bt:on(r),lt=V?Bt:on(o);K=K==Nt?pe:K,lt=lt==Nt?pe:lt;var ct=K==pe,pt=lt==pe,Ct=K==lt;if(Ct&&ui(r)){if(!ui(o))return!1;R=!0,ct=!1}if(Ct&&!ct)return E||(E=new jn),R||yo(r)?wm(r,o,u,p,w,E):WS(r,o,K,u,p,w,E);if(!(u&_)){var Tt=ct&&_e.call(r,"__wrapped__"),Dt=pt&&_e.call(o,"__wrapped__");if(Tt||Dt){var Qt=Tt?r.value():r,Ft=Dt?o.value():o;return E||(E=new jn),w(Qt,Ft,u,p,E)}}return Ct?(E||(E=new jn),HS(r,o,u,p,w,E)):!1}function pS(r){return Ve(r)&&on(r)==Kt}function Zf(r,o,u,p){var w=u.length,E=w,R=!p;if(r==null)return!E;for(r=Ae(r);w--;){var V=u[w];if(R&&V[2]?V[1]!==r[V[0]]:!(V[0]in r))return!1}for(;++w<E;){V=u[w];var K=V[0],lt=r[K],ct=V[1];if(R&&V[2]){if(lt===n&&!(K in r))return!1}else{var pt=new jn;if(p)var Ct=p(lt,ct,K,r,o,pt);if(!(Ct===n?gs(ct,lt,_|y,p,pt):Ct))return!1}}return!0}function Hv(r){if(!Be(r)||QS(r))return!1;var o=Nr(r)?p1:ox;return o.test(Wi(r))}function vS(r){return Ve(r)&&un(r)==Fe}function mS(r){return Ve(r)&&on(r)==ve}function bS(r){return Ve(r)&&eu(r.length)&&!!Ie[un(r)]}function Uv(r){return typeof r=="function"?r:r==null?bn:typeof r=="object"?qt(r)?qv(r[0],r[1]):Kv(r):db(r)}function Jf(r){if(!ms(r))return y1(r);var o=[];for(var u in Ae(r))_e.call(r,u)&&u!="constructor"&&o.push(u);return o}function _S(r){if(!Be(r))return eA(r);var o=ms(r),u=[];for(var p in r)p=="constructor"&&(o||!_e.call(r,p))||u.push(p);return u}function Qf(r,o){return r<o}function Gv(r,o){var u=-1,p=vn(r)?J(r.length):[];return oi(r,function(w,E,R){p[++u]=o(w,E,R)}),p}function Kv(r){var o=fh(r);return o.length==1&&o[0][2]?Cm(o[0][0],o[0][1]):function(u){return u===r||Zf(u,r,o)}}function qv(r,o){return gh(r)&&Am(o)?Cm(fr(r),o):function(u){var p=Ah(u,r);return p===n&&p===o?Ch(u,r):gs(o,p,_|y)}}function Vl(r,o,u,p,w){r!==o&&Kf(o,function(E,R){if(w||(w=new jn),Be(E))wS(r,o,R,u,Vl,p,w);else{var V=p?p(vh(r,R),E,R+"",r,o,w):n;V===n&&(V=E),Uf(r,R,V)}},mn)}function wS(r,o,u,p,w,E,R){var V=vh(r,u),K=vh(o,u),lt=R.get(K);if(lt){Uf(r,u,lt);return}var ct=E?E(V,K,u+"",r,o,R):n,pt=ct===n;if(pt){var Ct=qt(K),Tt=!Ct&&ui(K),Dt=!Ct&&!Tt&&yo(K);ct=K,Ct||Tt||Dt?qt(V)?ct=V:He(V)?ct=pn(V):Tt?(pt=!1,ct=im(K,!0)):Dt?(pt=!1,ct=om(K,!0)):ct=[]:_s(K)||Hi(K)?(ct=V,Hi(V)?ct=eb(V):(!Be(V)||Nr(V))&&(ct=Sm(K))):pt=!1}pt&&(R.set(K,ct),w(ct,K,p,E,R),R.delete(K)),Uf(r,u,ct)}function Yv(r,o){var u=r.length;if(u)return o+=o<0?u:0,Or(o,u)?r[o]:n}function Xv(r,o,u){o.length?o=Le(o,function(E){return qt(E)?function(R){return Vi(R,E.length===1?E[0]:E)}:E}):o=[bn];var p=-1;o=Le(o,Cn(Mt()));var w=Gv(r,function(E,R,V){var K=Le(o,function(lt){return lt(E)});return{criteria:K,index:++p,value:E}});return Yx(w,function(E,R){return RS(E,R,u)})}function yS(r,o){return Zv(r,o,function(u,p){return Ch(r,p)})}function Zv(r,o,u){for(var p=-1,w=o.length,E={};++p<w;){var R=o[p],V=Vi(r,R);u(V,R)&&ps(E,ai(R,r),V)}return E}function xS(r){return function(o){return Vi(o,r)}}function jf(r,o,u,p){var w=p?qx:uo,E=-1,R=o.length,V=r;for(r===o&&(o=pn(o)),u&&(V=Le(r,Cn(u)));++E<R;)for(var K=0,lt=o[E],ct=u?u(lt):lt;(K=w(V,ct,K,p))>-1;)V!==r&&Tl.call(V,K,1),Tl.call(r,K,1);return r}function Jv(r,o){for(var u=r?o.length:0,p=u-1;u--;){var w=o[u];if(u==p||w!==E){var E=w;Or(w)?Tl.call(r,w,1):nh(r,w)}}return r}function $f(r,o){return r+Nl(Iv()*(o-r+1))}function SS(r,o,u,p){for(var w=-1,E=Ze(Ol((o-r)/(u||1)),0),R=J(E);E--;)R[p?E:++w]=r,r+=u;return R}function th(r,o){var u="";if(!r||o<1||o>ut)return u;do o%2&&(u+=r),o=Nl(o/2),o&&(r+=r);while(o);return u}function ee(r,o){return mh(Pm(r,o,bn),r+"")}function AS(r){return Rv(xo(r))}function CS(r,o){var u=xo(r);return Zl(u,Bi(o,0,u.length))}function ps(r,o,u,p){if(!Be(r))return r;o=ai(o,r);for(var w=-1,E=o.length,R=E-1,V=r;V!=null&&++w<E;){var K=fr(o[w]),lt=u;if(K==="__proto__"||K==="constructor"||K==="prototype")return r;if(w!=R){var ct=V[K];lt=p?p(ct,K,V):n,lt===n&&(lt=Be(ct)?ct:Or(o[w+1])?[]:{})}ds(V,K,lt),V=V[K]}return r}var Qv=Rl?function(r,o){return Rl.set(r,o),r}:bn,PS=Il?function(r,o){return Il(r,"toString",{configurable:!0,enumerable:!1,value:Eh(o),writable:!0})}:bn;function ES(r){return Zl(xo(r))}function Un(r,o,u){var p=-1,w=r.length;o<0&&(o=-o>w?0:w+o),u=u>w?w:u,u<0&&(u+=w),w=o>u?0:u-o>>>0,o>>>=0;for(var E=J(w);++p<w;)E[p]=r[p+o];return E}function kS(r,o){var u;return oi(r,function(p,w,E){return u=o(p,w,E),!u}),!!u}function zl(r,o,u){var p=0,w=r==null?p:r.length;if(typeof o=="number"&&o===o&&w<=kt){for(;p<w;){var E=p+w>>>1,R=r[E];R!==null&&!En(R)&&(u?R<=o:R<o)?p=E+1:w=E}return w}return eh(r,o,bn,u)}function eh(r,o,u,p){var w=0,E=r==null?0:r.length;if(E===0)return 0;o=u(o);for(var R=o!==o,V=o===null,K=En(o),lt=o===n;w<E;){var ct=Nl((w+E)/2),pt=u(r[ct]),Ct=pt!==n,Tt=pt===null,Dt=pt===pt,Qt=En(pt);if(R)var Ft=p||Dt;else lt?Ft=Dt&&(p||Ct):V?Ft=Dt&&Ct&&(p||!Tt):K?Ft=Dt&&Ct&&!Tt&&(p||!Qt):Tt||Qt?Ft=!1:Ft=p?pt<=o:pt<o;Ft?w=ct+1:E=ct}return rn(E,At)}function jv(r,o){for(var u=-1,p=r.length,w=0,E=[];++u<p;){var R=r[u],V=o?o(R):R;if(!u||!$n(V,K)){var K=V;E[w++]=R===0?0:R}}return E}function $v(r){return typeof r=="number"?r:En(r)?bt:+r}function Pn(r){if(typeof r=="string")return r;if(qt(r))return Le(r,Pn)+"";if(En(r))return Ov?Ov.call(r):"";var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function si(r,o,u){var p=-1,w=_l,E=r.length,R=!0,V=[],K=V;if(u)R=!1,w=If;else if(E>=s){var lt=o?null:VS(r);if(lt)return yl(lt);R=!1,w=os,K=new Fi}else K=o?[]:V;t:for(;++p<E;){var ct=r[p],pt=o?o(ct):ct;if(ct=u||ct!==0?ct:0,R&&pt===pt){for(var Ct=K.length;Ct--;)if(K[Ct]===pt)continue t;o&&K.push(pt),V.push(ct)}else w(K,pt,u)||(K!==V&&K.push(pt),V.push(ct))}return V}function nh(r,o){return o=ai(o,r),r=Em(r,o),r==null||delete r[fr(Gn(o))]}function tm(r,o,u,p){return ps(r,o,u(Vi(r,o)),p)}function Wl(r,o,u,p){for(var w=r.length,E=p?w:-1;(p?E--:++E<w)&&o(r[E],E,r););return u?Un(r,p?0:E,p?E+1:w):Un(r,p?E+1:0,p?w:E)}function em(r,o){var u=r;return u instanceof oe&&(u=u.value()),Of(o,function(p,w){return w.func.apply(w.thisArg,ni([p],w.args))},u)}function rh(r,o,u){var p=r.length;if(p<2)return p?si(r[0]):[];for(var w=-1,E=J(p);++w<p;)for(var R=r[w],V=-1;++V<p;)V!=w&&(E[w]=fs(E[w]||R,r[V],o,u));return si(tn(E,1),o,u)}function nm(r,o,u){for(var p=-1,w=r.length,E=o.length,R={};++p<w;){var V=p<E?o[p]:n;u(R,r[p],V)}return R}function ih(r){return He(r)?r:[]}function oh(r){return typeof r=="function"?r:bn}function ai(r,o){return qt(r)?r:gh(r,o)?[r]:Om(be(r))}var TS=ee;function li(r,o,u){var p=r.length;return u=u===n?p:u,!o&&u>=p?r:Un(r,o,u)}var rm=v1||function(r){return $e.clearTimeout(r)};function im(r,o){if(o)return r.slice();var u=r.length,p=Cv?Cv(u):new r.constructor(u);return r.copy(p),p}function sh(r){var o=new r.constructor(r.byteLength);return new El(o).set(new El(r)),o}function IS(r,o){var u=o?sh(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function OS(r){var o=new r.constructor(r.source,Wp.exec(r));return o.lastIndex=r.lastIndex,o}function NS(r){return cs?Ae(cs.call(r)):{}}function om(r,o){var u=o?sh(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function sm(r,o){if(r!==o){var u=r!==n,p=r===null,w=r===r,E=En(r),R=o!==n,V=o===null,K=o===o,lt=En(o);if(!V&&!lt&&!E&&r>o||E&&R&&K&&!V&&!lt||p&&R&&K||!u&&K||!w)return 1;if(!p&&!E&&!lt&&r<o||lt&&u&&w&&!p&&!E||V&&u&&w||!R&&w||!K)return-1}return 0}function RS(r,o,u){for(var p=-1,w=r.criteria,E=o.criteria,R=w.length,V=u.length;++p<R;){var K=sm(w[p],E[p]);if(K){if(p>=V)return K;var lt=u[p];return K*(lt=="desc"?-1:1)}}return r.index-o.index}function am(r,o,u,p){for(var w=-1,E=r.length,R=u.length,V=-1,K=o.length,lt=Ze(E-R,0),ct=J(K+lt),pt=!p;++V<K;)ct[V]=o[V];for(;++w<R;)(pt||w<E)&&(ct[u[w]]=r[w]);for(;lt--;)ct[V++]=r[w++];return ct}function lm(r,o,u,p){for(var w=-1,E=r.length,R=-1,V=u.length,K=-1,lt=o.length,ct=Ze(E-V,0),pt=J(ct+lt),Ct=!p;++w<ct;)pt[w]=r[w];for(var Tt=w;++K<lt;)pt[Tt+K]=o[K];for(;++R<V;)(Ct||w<E)&&(pt[Tt+u[R]]=r[w++]);return pt}function pn(r,o){var u=-1,p=r.length;for(o||(o=J(p));++u<p;)o[u]=r[u];return o}function dr(r,o,u,p){var w=!u;u||(u={});for(var E=-1,R=o.length;++E<R;){var V=o[E],K=p?p(u[V],r[V],V,u,r):n;K===n&&(K=r[V]),w?kr(u,V,K):ds(u,V,K)}return u}function MS(r,o){return dr(r,hh(r),o)}function LS(r,o){return dr(r,ym(r),o)}function Hl(r,o){return function(u,p){var w=qt(u)?zx:rS,E=o?o():{};return w(u,r,Mt(p,2),E)}}function bo(r){return ee(function(o,u){var p=-1,w=u.length,E=w>1?u[w-1]:n,R=w>2?u[2]:n;for(E=r.length>3&&typeof E=="function"?(w--,E):n,R&&cn(u[0],u[1],R)&&(E=w<3?n:E,w=1),o=Ae(o);++p<w;){var V=u[p];V&&r(o,V,p,E)}return o})}function um(r,o){return function(u,p){if(u==null)return u;if(!vn(u))return r(u,p);for(var w=u.length,E=o?w:-1,R=Ae(u);(o?E--:++E<w)&&p(R[E],E,R)!==!1;);return u}}function cm(r){return function(o,u,p){for(var w=-1,E=Ae(o),R=p(o),V=R.length;V--;){var K=R[r?V:++w];if(u(E[K],K,E)===!1)break}return o}}function DS(r,o,u){var p=o&x,w=vs(r);function E(){var R=this&&this!==$e&&this instanceof E?w:r;return R.apply(p?u:this,arguments)}return E}function dm(r){return function(o){o=be(o);var u=co(o)?Qn(o):n,p=u?u[0]:o.charAt(0),w=u?li(u,1).join(""):o.slice(1);return p[r]()+w}}function _o(r){return function(o){return Of(ub(lb(o).replace(Px,"")),r,"")}}function vs(r){return function(){var o=arguments;switch(o.length){case 0:return new r;case 1:return new r(o[0]);case 2:return new r(o[0],o[1]);case 3:return new r(o[0],o[1],o[2]);case 4:return new r(o[0],o[1],o[2],o[3]);case 5:return new r(o[0],o[1],o[2],o[3],o[4]);case 6:return new r(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new r(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var u=mo(r.prototype),p=r.apply(u,o);return Be(p)?p:u}}function FS(r,o,u){var p=vs(r);function w(){for(var E=arguments.length,R=J(E),V=E,K=wo(w);V--;)R[V]=arguments[V];var lt=E<3&&R[0]!==K&&R[E-1]!==K?[]:ri(R,K);if(E-=lt.length,E<u)return vm(r,o,Ul,w.placeholder,n,R,lt,n,n,u-E);var ct=this&&this!==$e&&this instanceof w?p:r;return An(ct,this,R)}return w}function fm(r){return function(o,u,p){var w=Ae(o);if(!vn(o)){var E=Mt(u,3);o=Je(o),u=function(V){return E(w[V],V,w)}}var R=r(o,u,p);return R>-1?w[E?o[R]:R]:n}}function hm(r){return Ir(function(o){var u=o.length,p=u,w=Wn.prototype.thru;for(r&&o.reverse();p--;){var E=o[p];if(typeof E!="function")throw new zn(l);if(w&&!R&&Yl(E)=="wrapper")var R=new Wn([],!0)}for(p=R?p:u;++p<u;){E=o[p];var V=Yl(E),K=V=="wrapper"?dh(E):n;K&&ph(K[0])&&K[1]==(M|T|D|U)&&!K[4].length&&K[9]==1?R=R[Yl(K[0])].apply(R,K[3]):R=E.length==1&&ph(E)?R[V]():R.thru(E)}return function(){var lt=arguments,ct=lt[0];if(R&&lt.length==1&&qt(ct))return R.plant(ct).value();for(var pt=0,Ct=u?o[pt].apply(this,lt):ct;++pt<u;)Ct=o[pt].call(this,Ct);return Ct}})}function Ul(r,o,u,p,w,E,R,V,K,lt){var ct=o&M,pt=o&x,Ct=o&S,Tt=o&(T|O),Dt=o&q,Qt=Ct?n:vs(r);function Ft(){for(var re=arguments.length,ae=J(re),kn=re;kn--;)ae[kn]=arguments[kn];if(Tt)var dn=wo(Ft),Tn=Zx(ae,dn);if(p&&(ae=am(ae,p,w,Tt)),E&&(ae=lm(ae,E,R,Tt)),re-=Tn,Tt&&re<lt){var Ue=ri(ae,dn);return vm(r,o,Ul,Ft.placeholder,u,ae,Ue,V,K,lt-re)}var tr=pt?u:this,Mr=Ct?tr[r]:r;return re=ae.length,V?ae=rA(ae,V):Dt&&re>1&&ae.reverse(),ct&&K<re&&(ae.length=K),this&&this!==$e&&this instanceof Ft&&(Mr=Qt||vs(Mr)),Mr.apply(tr,ae)}return Ft}function gm(r,o){return function(u,p){return dS(u,r,o(p),{})}}function Gl(r,o){return function(u,p){var w;if(u===n&&p===n)return o;if(u!==n&&(w=u),p!==n){if(w===n)return p;typeof u=="string"||typeof p=="string"?(u=Pn(u),p=Pn(p)):(u=$v(u),p=$v(p)),w=r(u,p)}return w}}function ah(r){return Ir(function(o){return o=Le(o,Cn(Mt())),ee(function(u){var p=this;return r(o,function(w){return An(w,p,u)})})})}function Kl(r,o){o=o===n?" ":Pn(o);var u=o.length;if(u<2)return u?th(o,r):o;var p=th(o,Ol(r/fo(o)));return co(o)?li(Qn(p),0,r).join(""):p.slice(0,r)}function BS(r,o,u,p){var w=o&x,E=vs(r);function R(){for(var V=-1,K=arguments.length,lt=-1,ct=p.length,pt=J(ct+K),Ct=this&&this!==$e&&this instanceof R?E:r;++lt<ct;)pt[lt]=p[lt];for(;K--;)pt[lt++]=arguments[++V];return An(Ct,w?u:this,pt)}return R}function pm(r){return function(o,u,p){return p&&typeof p!="number"&&cn(o,u,p)&&(u=p=n),o=Rr(o),u===n?(u=o,o=0):u=Rr(u),p=p===n?o<u?1:-1:Rr(p),SS(o,u,p,r)}}function ql(r){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=Kn(o),u=Kn(u)),r(o,u)}}function vm(r,o,u,p,w,E,R,V,K,lt){var ct=o&T,pt=ct?R:n,Ct=ct?n:R,Tt=ct?E:n,Dt=ct?n:E;o|=ct?D:L,o&=~(ct?L:D),o&I||(o&=-4);var Qt=[r,o,w,Tt,pt,Dt,Ct,V,K,lt],Ft=u.apply(n,Qt);return ph(r)&&km(Ft,Qt),Ft.placeholder=p,Tm(Ft,r,o)}function lh(r){var o=Xe[r];return function(u,p){if(u=Kn(u),p=p==null?0:rn(Xt(p),292),p&&Tv(u)){var w=(be(u)+"e").split("e"),E=o(w[0]+"e"+(+w[1]+p));return w=(be(E)+"e").split("e"),+(w[0]+"e"+(+w[1]-p))}return o(u)}}var VS=po&&1/yl(new po([,-0]))[1]==ot?function(r){return new po(r)}:Ih;function mm(r){return function(o){var u=on(o);return u==Kt?Bf(o):u==ve?n1(o):Xx(o,r(o))}}function Tr(r,o,u,p,w,E,R,V){var K=o&S;if(!K&&typeof r!="function")throw new zn(l);var lt=p?p.length:0;if(lt||(o&=-97,p=w=n),R=R===n?R:Ze(Xt(R),0),V=V===n?V:Xt(V),lt-=w?w.length:0,o&L){var ct=p,pt=w;p=w=n}var Ct=K?n:dh(r),Tt=[r,o,u,p,w,ct,pt,E,R,V];if(Ct&&tA(Tt,Ct),r=Tt[0],o=Tt[1],u=Tt[2],p=Tt[3],w=Tt[4],V=Tt[9]=Tt[9]===n?K?0:r.length:Ze(Tt[9]-lt,0),!V&&o&(T|O)&&(o&=-25),!o||o==x)var Dt=DS(r,o,u);else o==T||o==O?Dt=FS(r,o,V):(o==D||o==(x|D))&&!w.length?Dt=BS(r,o,u,p):Dt=Ul.apply(n,Tt);var Qt=Ct?Qv:km;return Tm(Qt(Dt,Tt),r,o)}function bm(r,o,u,p){return r===n||$n(r,go[u])&&!_e.call(p,u)?o:r}function _m(r,o,u,p,w,E){return Be(r)&&Be(o)&&(E.set(o,r),Vl(r,o,n,_m,E),E.delete(o)),r}function zS(r){return _s(r)?n:r}function wm(r,o,u,p,w,E){var R=u&_,V=r.length,K=o.length;if(V!=K&&!(R&&K>V))return!1;var lt=E.get(r),ct=E.get(o);if(lt&&ct)return lt==o&&ct==r;var pt=-1,Ct=!0,Tt=u&y?new Fi:n;for(E.set(r,o),E.set(o,r);++pt<V;){var Dt=r[pt],Qt=o[pt];if(p)var Ft=R?p(Qt,Dt,pt,o,r,E):p(Dt,Qt,pt,r,o,E);if(Ft!==n){if(Ft)continue;Ct=!1;break}if(Tt){if(!Nf(o,function(re,ae){if(!os(Tt,ae)&&(Dt===re||w(Dt,re,u,p,E)))return Tt.push(ae)})){Ct=!1;break}}else if(!(Dt===Qt||w(Dt,Qt,u,p,E))){Ct=!1;break}}return E.delete(r),E.delete(o),Ct}function WS(r,o,u,p,w,E,R){switch(u){case gn:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case je:return!(r.byteLength!=o.byteLength||!E(new El(r),new El(o)));case Yt:case It:case Ut:return $n(+r,+o);case ce:return r.name==o.name&&r.message==o.message;case Fe:case an:return r==o+"";case Kt:var V=Bf;case ve:var K=p&_;if(V||(V=yl),r.size!=o.size&&!K)return!1;var lt=R.get(r);if(lt)return lt==o;p|=y,R.set(r,o);var ct=wm(V(r),V(o),p,w,E,R);return R.delete(r),ct;case Qe:if(cs)return cs.call(r)==cs.call(o)}return!1}function HS(r,o,u,p,w,E){var R=u&_,V=uh(r),K=V.length,lt=uh(o),ct=lt.length;if(K!=ct&&!R)return!1;for(var pt=K;pt--;){var Ct=V[pt];if(!(R?Ct in o:_e.call(o,Ct)))return!1}var Tt=E.get(r),Dt=E.get(o);if(Tt&&Dt)return Tt==o&&Dt==r;var Qt=!0;E.set(r,o),E.set(o,r);for(var Ft=R;++pt<K;){Ct=V[pt];var re=r[Ct],ae=o[Ct];if(p)var kn=R?p(ae,re,Ct,o,r,E):p(re,ae,Ct,r,o,E);if(!(kn===n?re===ae||w(re,ae,u,p,E):kn)){Qt=!1;break}Ft||(Ft=Ct=="constructor")}if(Qt&&!Ft){var dn=r.constructor,Tn=o.constructor;dn!=Tn&&"constructor"in r&&"constructor"in o&&!(typeof dn=="function"&&dn instanceof dn&&typeof Tn=="function"&&Tn instanceof Tn)&&(Qt=!1)}return E.delete(r),E.delete(o),Qt}function Ir(r){return mh(Pm(r,n,Lm),r+"")}function uh(r){return zv(r,Je,hh)}function ch(r){return zv(r,mn,ym)}var dh=Rl?function(r){return Rl.get(r)}:Ih;function Yl(r){for(var o=r.name+"",u=vo[o],p=_e.call(vo,o)?u.length:0;p--;){var w=u[p],E=w.func;if(E==null||E==r)return w.name}return o}function wo(r){var o=_e.call(C,"placeholder")?C:r;return o.placeholder}function Mt(){var r=C.iteratee||kh;return r=r===kh?Uv:r,arguments.length?r(arguments[0],arguments[1]):r}function Xl(r,o){var u=r.__data__;return JS(o)?u[typeof o=="string"?"string":"hash"]:u.map}function fh(r){for(var o=Je(r),u=o.length;u--;){var p=o[u],w=r[p];o[u]=[p,w,Am(w)]}return o}function zi(r,o){var u=$x(r,o);return Hv(u)?u:n}function US(r){var o=_e.call(r,Li),u=r[Li];try{r[Li]=n;var p=!0}catch{}var w=Cl.call(r);return p&&(o?r[Li]=u:delete r[Li]),w}var hh=zf?function(r){return r==null?[]:(r=Ae(r),ei(zf(r),function(o){return Ev.call(r,o)}))}:Oh,ym=zf?function(r){for(var o=[];r;)ni(o,hh(r)),r=kl(r);return o}:Oh,on=un;(Wf&&on(new Wf(new ArrayBuffer(1)))!=gn||as&&on(new as)!=Kt||Hf&&on(Hf.resolve())!=Te||po&&on(new po)!=ve||ls&&on(new ls)!=fe)&&(on=function(r){var o=un(r),u=o==pe?r.constructor:n,p=u?Wi(u):"";if(p)switch(p){case C1:return gn;case P1:return Kt;case E1:return Te;case k1:return ve;case T1:return fe}return o});function GS(r,o,u){for(var p=-1,w=u.length;++p<w;){var E=u[p],R=E.size;switch(E.type){case"drop":r+=R;break;case"dropRight":o-=R;break;case"take":o=rn(o,r+R);break;case"takeRight":r=Ze(r,o-R);break}}return{start:r,end:o}}function KS(r){var o=r.match(Qy);return o?o[1].split(jy):[]}function xm(r,o,u){o=ai(o,r);for(var p=-1,w=o.length,E=!1;++p<w;){var R=fr(o[p]);if(!(E=r!=null&&u(r,R)))break;r=r[R]}return E||++p!=w?E:(w=r==null?0:r.length,!!w&&eu(w)&&Or(R,w)&&(qt(r)||Hi(r)))}function qS(r){var o=r.length,u=new r.constructor(o);return o&&typeof r[0]=="string"&&_e.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Sm(r){return typeof r.constructor=="function"&&!ms(r)?mo(kl(r)):{}}function YS(r,o,u){var p=r.constructor;switch(o){case je:return sh(r);case Yt:case It:return new p(+r);case gn:return IS(r,u);case Jn:case zt:case Se:case Me:case lr:case Sn:case ln:case Dn:case qe:return om(r,u);case Kt:return new p;case Ut:case an:return new p(r);case Fe:return OS(r);case ve:return new p;case Qe:return NS(r)}}function XS(r,o){var u=o.length;if(!u)return r;var p=u-1;return o[p]=(u>1?"& ":"")+o[p],o=o.join(u>2?", ":" "),r.replace(Jy,`{
74
- /* [wrapped with `+o+`] */
75
- `)}function ZS(r){return qt(r)||Hi(r)||!!(kv&&r&&r[kv])}function Or(r,o){var u=typeof r;return o=o??ut,!!o&&(u=="number"||u!="symbol"&&ax.test(r))&&r>-1&&r%1==0&&r<o}function cn(r,o,u){if(!Be(u))return!1;var p=typeof o;return(p=="number"?vn(u)&&Or(o,u.length):p=="string"&&o in u)?$n(u[o],r):!1}function gh(r,o){if(qt(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||En(r)?!0:qy.test(r)||!Ky.test(r)||o!=null&&r in Ae(o)}function JS(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function ph(r){var o=Yl(r),u=C[o];if(typeof u!="function"||!(o in oe.prototype))return!1;if(r===u)return!0;var p=dh(u);return!!p&&r===p[0]}function QS(r){return!!Av&&Av in r}var jS=Sl?Nr:Nh;function ms(r){var o=r&&r.constructor,u=typeof o=="function"&&o.prototype||go;return r===u}function Am(r){return r===r&&!Be(r)}function Cm(r,o){return function(u){return u==null?!1:u[r]===o&&(o!==n||r in Ae(u))}}function $S(r){var o=$l(r,function(p){return u.size===f&&u.clear(),p}),u=o.cache;return o}function tA(r,o){var u=r[1],p=o[1],w=u|p,E=w<(x|S|M),R=p==M&&u==T||p==M&&u==U&&r[7].length<=o[8]||p==(M|U)&&o[7].length<=o[8]&&u==T;if(!(E||R))return r;p&x&&(r[2]=o[2],w|=u&x?0:I);var V=o[3];if(V){var K=r[3];r[3]=K?am(K,V,o[4]):V,r[4]=K?ri(r[3],h):o[4]}return V=o[5],V&&(K=r[5],r[5]=K?lm(K,V,o[6]):V,r[6]=K?ri(r[5],h):o[6]),V=o[7],V&&(r[7]=V),p&M&&(r[8]=r[8]==null?o[8]:rn(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=w,r}function eA(r){var o=[];if(r!=null)for(var u in Ae(r))o.push(u);return o}function nA(r){return Cl.call(r)}function Pm(r,o,u){return o=Ze(o===n?r.length-1:o,0),function(){for(var p=arguments,w=-1,E=Ze(p.length-o,0),R=J(E);++w<E;)R[w]=p[o+w];w=-1;for(var V=J(o+1);++w<o;)V[w]=p[w];return V[o]=u(R),An(r,this,V)}}function Em(r,o){return o.length<2?r:Vi(r,Un(o,0,-1))}function rA(r,o){for(var u=r.length,p=rn(o.length,u),w=pn(r);p--;){var E=o[p];r[p]=Or(E,u)?w[E]:n}return r}function vh(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var km=Im(Qv),bs=b1||function(r,o){return $e.setTimeout(r,o)},mh=Im(PS);function Tm(r,o,u){var p=o+"";return mh(r,XS(p,iA(KS(p),u)))}function Im(r){var o=0,u=0;return function(){var p=x1(),w=j-(p-u);if(u=p,w>0){if(++o>=W)return arguments[0]}else o=0;return r.apply(n,arguments)}}function Zl(r,o){var u=-1,p=r.length,w=p-1;for(o=o===n?p:o;++u<o;){var E=$f(u,w),R=r[E];r[E]=r[u],r[u]=R}return r.length=o,r}var Om=$S(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(Yy,function(u,p,w,E){o.push(w?E.replace(ex,"$1"):p||u)}),o});function fr(r){if(typeof r=="string"||En(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function Wi(r){if(r!=null){try{return Al.call(r)}catch{}try{return r+""}catch{}}return""}function iA(r,o){return Vn(Vt,function(u){var p="_."+u[0];o&u[1]&&!_l(r,p)&&r.push(p)}),r.sort()}function Nm(r){if(r instanceof oe)return r.clone();var o=new Wn(r.__wrapped__,r.__chain__);return o.__actions__=pn(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function oA(r,o,u){(u?cn(r,o,u):o===n)?o=1:o=Ze(Xt(o),0);var p=r==null?0:r.length;if(!p||o<1)return[];for(var w=0,E=0,R=J(Ol(p/o));w<p;)R[E++]=Un(r,w,w+=o);return R}function sA(r){for(var o=-1,u=r==null?0:r.length,p=0,w=[];++o<u;){var E=r[o];E&&(w[p++]=E)}return w}function aA(){var r=arguments.length;if(!r)return[];for(var o=J(r-1),u=arguments[0],p=r;p--;)o[p-1]=arguments[p];return ni(qt(u)?pn(u):[u],tn(o,1))}var lA=ee(function(r,o){return He(r)?fs(r,tn(o,1,He,!0)):[]}),uA=ee(function(r,o){var u=Gn(o);return He(u)&&(u=n),He(r)?fs(r,tn(o,1,He,!0),Mt(u,2)):[]}),cA=ee(function(r,o){var u=Gn(o);return He(u)&&(u=n),He(r)?fs(r,tn(o,1,He,!0),n,u):[]});function dA(r,o,u){var p=r==null?0:r.length;return p?(o=u||o===n?1:Xt(o),Un(r,o<0?0:o,p)):[]}function fA(r,o,u){var p=r==null?0:r.length;return p?(o=u||o===n?1:Xt(o),o=p-o,Un(r,0,o<0?0:o)):[]}function hA(r,o){return r&&r.length?Wl(r,Mt(o,3),!0,!0):[]}function gA(r,o){return r&&r.length?Wl(r,Mt(o,3),!0):[]}function pA(r,o,u,p){var w=r==null?0:r.length;return w?(u&&typeof u!="number"&&cn(r,o,u)&&(u=0,p=w),aS(r,o,u,p)):[]}function Rm(r,o,u){var p=r==null?0:r.length;if(!p)return-1;var w=u==null?0:Xt(u);return w<0&&(w=Ze(p+w,0)),wl(r,Mt(o,3),w)}function Mm(r,o,u){var p=r==null?0:r.length;if(!p)return-1;var w=p-1;return u!==n&&(w=Xt(u),w=u<0?Ze(p+w,0):rn(w,p-1)),wl(r,Mt(o,3),w,!0)}function Lm(r){var o=r==null?0:r.length;return o?tn(r,1):[]}function vA(r){var o=r==null?0:r.length;return o?tn(r,ot):[]}function mA(r,o){var u=r==null?0:r.length;return u?(o=o===n?1:Xt(o),tn(r,o)):[]}function bA(r){for(var o=-1,u=r==null?0:r.length,p={};++o<u;){var w=r[o];p[w[0]]=w[1]}return p}function Dm(r){return r&&r.length?r[0]:n}function _A(r,o,u){var p=r==null?0:r.length;if(!p)return-1;var w=u==null?0:Xt(u);return w<0&&(w=Ze(p+w,0)),uo(r,o,w)}function wA(r){var o=r==null?0:r.length;return o?Un(r,0,-1):[]}var yA=ee(function(r){var o=Le(r,ih);return o.length&&o[0]===r[0]?Xf(o):[]}),xA=ee(function(r){var o=Gn(r),u=Le(r,ih);return o===Gn(u)?o=n:u.pop(),u.length&&u[0]===r[0]?Xf(u,Mt(o,2)):[]}),SA=ee(function(r){var o=Gn(r),u=Le(r,ih);return o=typeof o=="function"?o:n,o&&u.pop(),u.length&&u[0]===r[0]?Xf(u,n,o):[]});function AA(r,o){return r==null?"":w1.call(r,o)}function Gn(r){var o=r==null?0:r.length;return o?r[o-1]:n}function CA(r,o,u){var p=r==null?0:r.length;if(!p)return-1;var w=p;return u!==n&&(w=Xt(u),w=w<0?Ze(p+w,0):rn(w,p-1)),o===o?i1(r,o,w):wl(r,vv,w,!0)}function PA(r,o){return r&&r.length?Yv(r,Xt(o)):n}var EA=ee(Fm);function Fm(r,o){return r&&r.length&&o&&o.length?jf(r,o):r}function kA(r,o,u){return r&&r.length&&o&&o.length?jf(r,o,Mt(u,2)):r}function TA(r,o,u){return r&&r.length&&o&&o.length?jf(r,o,n,u):r}var IA=Ir(function(r,o){var u=r==null?0:r.length,p=Gf(r,o);return Jv(r,Le(o,function(w){return Or(w,u)?+w:w}).sort(sm)),p});function OA(r,o){var u=[];if(!(r&&r.length))return u;var p=-1,w=[],E=r.length;for(o=Mt(o,3);++p<E;){var R=r[p];o(R,p,r)&&(u.push(R),w.push(p))}return Jv(r,w),u}function bh(r){return r==null?r:A1.call(r)}function NA(r,o,u){var p=r==null?0:r.length;return p?(u&&typeof u!="number"&&cn(r,o,u)?(o=0,u=p):(o=o==null?0:Xt(o),u=u===n?p:Xt(u)),Un(r,o,u)):[]}function RA(r,o){return zl(r,o)}function MA(r,o,u){return eh(r,o,Mt(u,2))}function LA(r,o){var u=r==null?0:r.length;if(u){var p=zl(r,o);if(p<u&&$n(r[p],o))return p}return-1}function DA(r,o){return zl(r,o,!0)}function FA(r,o,u){return eh(r,o,Mt(u,2),!0)}function BA(r,o){var u=r==null?0:r.length;if(u){var p=zl(r,o,!0)-1;if($n(r[p],o))return p}return-1}function VA(r){return r&&r.length?jv(r):[]}function zA(r,o){return r&&r.length?jv(r,Mt(o,2)):[]}function WA(r){var o=r==null?0:r.length;return o?Un(r,1,o):[]}function HA(r,o,u){return r&&r.length?(o=u||o===n?1:Xt(o),Un(r,0,o<0?0:o)):[]}function UA(r,o,u){var p=r==null?0:r.length;return p?(o=u||o===n?1:Xt(o),o=p-o,Un(r,o<0?0:o,p)):[]}function GA(r,o){return r&&r.length?Wl(r,Mt(o,3),!1,!0):[]}function KA(r,o){return r&&r.length?Wl(r,Mt(o,3)):[]}var qA=ee(function(r){return si(tn(r,1,He,!0))}),YA=ee(function(r){var o=Gn(r);return He(o)&&(o=n),si(tn(r,1,He,!0),Mt(o,2))}),XA=ee(function(r){var o=Gn(r);return o=typeof o=="function"?o:n,si(tn(r,1,He,!0),n,o)});function ZA(r){return r&&r.length?si(r):[]}function JA(r,o){return r&&r.length?si(r,Mt(o,2)):[]}function QA(r,o){return o=typeof o=="function"?o:n,r&&r.length?si(r,n,o):[]}function _h(r){if(!(r&&r.length))return[];var o=0;return r=ei(r,function(u){if(He(u))return o=Ze(u.length,o),!0}),Df(o,function(u){return Le(r,Rf(u))})}function Bm(r,o){if(!(r&&r.length))return[];var u=_h(r);return o==null?u:Le(u,function(p){return An(o,n,p)})}var jA=ee(function(r,o){return He(r)?fs(r,o):[]}),$A=ee(function(r){return rh(ei(r,He))}),tC=ee(function(r){var o=Gn(r);return He(o)&&(o=n),rh(ei(r,He),Mt(o,2))}),eC=ee(function(r){var o=Gn(r);return o=typeof o=="function"?o:n,rh(ei(r,He),n,o)}),nC=ee(_h);function rC(r,o){return nm(r||[],o||[],ds)}function iC(r,o){return nm(r||[],o||[],ps)}var oC=ee(function(r){var o=r.length,u=o>1?r[o-1]:n;return u=typeof u=="function"?(r.pop(),u):n,Bm(r,u)});function Vm(r){var o=C(r);return o.__chain__=!0,o}function sC(r,o){return o(r),r}function Jl(r,o){return o(r)}var aC=Ir(function(r){var o=r.length,u=o?r[0]:0,p=this.__wrapped__,w=function(E){return Gf(E,r)};return o>1||this.__actions__.length||!(p instanceof oe)||!Or(u)?this.thru(w):(p=p.slice(u,+u+(o?1:0)),p.__actions__.push({func:Jl,args:[w],thisArg:n}),new Wn(p,this.__chain__).thru(function(E){return o&&!E.length&&E.push(n),E}))});function lC(){return Vm(this)}function uC(){return new Wn(this.value(),this.__chain__)}function cC(){this.__values__===n&&(this.__values__=$m(this.value()));var r=this.__index__>=this.__values__.length,o=r?n:this.__values__[this.__index__++];return{done:r,value:o}}function dC(){return this}function fC(r){for(var o,u=this;u instanceof Ll;){var p=Nm(u);p.__index__=0,p.__values__=n,o?w.__wrapped__=p:o=p;var w=p;u=u.__wrapped__}return w.__wrapped__=r,o}function hC(){var r=this.__wrapped__;if(r instanceof oe){var o=r;return this.__actions__.length&&(o=new oe(this)),o=o.reverse(),o.__actions__.push({func:Jl,args:[bh],thisArg:n}),new Wn(o,this.__chain__)}return this.thru(bh)}function gC(){return em(this.__wrapped__,this.__actions__)}var pC=Hl(function(r,o,u){_e.call(r,u)?++r[u]:kr(r,u,1)});function vC(r,o,u){var p=qt(r)?gv:sS;return u&&cn(r,o,u)&&(o=n),p(r,Mt(o,3))}function mC(r,o){var u=qt(r)?ei:Bv;return u(r,Mt(o,3))}var bC=fm(Rm),_C=fm(Mm);function wC(r,o){return tn(Ql(r,o),1)}function yC(r,o){return tn(Ql(r,o),ot)}function xC(r,o,u){return u=u===n?1:Xt(u),tn(Ql(r,o),u)}function zm(r,o){var u=qt(r)?Vn:oi;return u(r,Mt(o,3))}function Wm(r,o){var u=qt(r)?Wx:Fv;return u(r,Mt(o,3))}var SC=Hl(function(r,o,u){_e.call(r,u)?r[u].push(o):kr(r,u,[o])});function AC(r,o,u,p){r=vn(r)?r:xo(r),u=u&&!p?Xt(u):0;var w=r.length;return u<0&&(u=Ze(w+u,0)),nu(r)?u<=w&&r.indexOf(o,u)>-1:!!w&&uo(r,o,u)>-1}var CC=ee(function(r,o,u){var p=-1,w=typeof o=="function",E=vn(r)?J(r.length):[];return oi(r,function(R){E[++p]=w?An(o,R,u):hs(R,o,u)}),E}),PC=Hl(function(r,o,u){kr(r,u,o)});function Ql(r,o){var u=qt(r)?Le:Gv;return u(r,Mt(o,3))}function EC(r,o,u,p){return r==null?[]:(qt(o)||(o=o==null?[]:[o]),u=p?n:u,qt(u)||(u=u==null?[]:[u]),Xv(r,o,u))}var kC=Hl(function(r,o,u){r[u?0:1].push(o)},function(){return[[],[]]});function TC(r,o,u){var p=qt(r)?Of:bv,w=arguments.length<3;return p(r,Mt(o,4),u,w,oi)}function IC(r,o,u){var p=qt(r)?Hx:bv,w=arguments.length<3;return p(r,Mt(o,4),u,w,Fv)}function OC(r,o){var u=qt(r)?ei:Bv;return u(r,tu(Mt(o,3)))}function NC(r){var o=qt(r)?Rv:AS;return o(r)}function RC(r,o,u){(u?cn(r,o,u):o===n)?o=1:o=Xt(o);var p=qt(r)?eS:CS;return p(r,o)}function MC(r){var o=qt(r)?nS:ES;return o(r)}function LC(r){if(r==null)return 0;if(vn(r))return nu(r)?fo(r):r.length;var o=on(r);return o==Kt||o==ve?r.size:Jf(r).length}function DC(r,o,u){var p=qt(r)?Nf:kS;return u&&cn(r,o,u)&&(o=n),p(r,Mt(o,3))}var FC=ee(function(r,o){if(r==null)return[];var u=o.length;return u>1&&cn(r,o[0],o[1])?o=[]:u>2&&cn(o[0],o[1],o[2])&&(o=[o[0]]),Xv(r,tn(o,1),[])}),jl=m1||function(){return $e.Date.now()};function BC(r,o){if(typeof o!="function")throw new zn(l);return r=Xt(r),function(){if(--r<1)return o.apply(this,arguments)}}function Hm(r,o,u){return o=u?n:o,o=r&&o==null?r.length:o,Tr(r,M,n,n,n,n,o)}function Um(r,o){var u;if(typeof o!="function")throw new zn(l);return r=Xt(r),function(){return--r>0&&(u=o.apply(this,arguments)),r<=1&&(o=n),u}}var wh=ee(function(r,o,u){var p=x;if(u.length){var w=ri(u,wo(wh));p|=D}return Tr(r,p,o,u,w)}),Gm=ee(function(r,o,u){var p=x|S;if(u.length){var w=ri(u,wo(Gm));p|=D}return Tr(o,p,r,u,w)});function Km(r,o,u){o=u?n:o;var p=Tr(r,T,n,n,n,n,n,o);return p.placeholder=Km.placeholder,p}function qm(r,o,u){o=u?n:o;var p=Tr(r,O,n,n,n,n,n,o);return p.placeholder=qm.placeholder,p}function Ym(r,o,u){var p,w,E,R,V,K,lt=0,ct=!1,pt=!1,Ct=!0;if(typeof r!="function")throw new zn(l);o=Kn(o)||0,Be(u)&&(ct=!!u.leading,pt="maxWait"in u,E=pt?Ze(Kn(u.maxWait)||0,o):E,Ct="trailing"in u?!!u.trailing:Ct);function Tt(Ue){var tr=p,Mr=w;return p=w=n,lt=Ue,R=r.apply(Mr,tr),R}function Dt(Ue){return lt=Ue,V=bs(re,o),ct?Tt(Ue):R}function Qt(Ue){var tr=Ue-K,Mr=Ue-lt,fb=o-tr;return pt?rn(fb,E-Mr):fb}function Ft(Ue){var tr=Ue-K,Mr=Ue-lt;return K===n||tr>=o||tr<0||pt&&Mr>=E}function re(){var Ue=jl();if(Ft(Ue))return ae(Ue);V=bs(re,Qt(Ue))}function ae(Ue){return V=n,Ct&&p?Tt(Ue):(p=w=n,R)}function kn(){V!==n&&rm(V),lt=0,p=K=w=V=n}function dn(){return V===n?R:ae(jl())}function Tn(){var Ue=jl(),tr=Ft(Ue);if(p=arguments,w=this,K=Ue,tr){if(V===n)return Dt(K);if(pt)return rm(V),V=bs(re,o),Tt(K)}return V===n&&(V=bs(re,o)),R}return Tn.cancel=kn,Tn.flush=dn,Tn}var VC=ee(function(r,o){return Dv(r,1,o)}),zC=ee(function(r,o,u){return Dv(r,Kn(o)||0,u)});function WC(r){return Tr(r,q)}function $l(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new zn(l);var u=function(){var p=arguments,w=o?o.apply(this,p):p[0],E=u.cache;if(E.has(w))return E.get(w);var R=r.apply(this,p);return u.cache=E.set(w,R)||E,R};return u.cache=new($l.Cache||Er),u}$l.Cache=Er;function tu(r){if(typeof r!="function")throw new zn(l);return function(){var o=arguments;switch(o.length){case 0:return!r.call(this);case 1:return!r.call(this,o[0]);case 2:return!r.call(this,o[0],o[1]);case 3:return!r.call(this,o[0],o[1],o[2])}return!r.apply(this,o)}}function HC(r){return Um(2,r)}var UC=TS(function(r,o){o=o.length==1&&qt(o[0])?Le(o[0],Cn(Mt())):Le(tn(o,1),Cn(Mt()));var u=o.length;return ee(function(p){for(var w=-1,E=rn(p.length,u);++w<E;)p[w]=o[w].call(this,p[w]);return An(r,this,p)})}),yh=ee(function(r,o){var u=ri(o,wo(yh));return Tr(r,D,n,o,u)}),Xm=ee(function(r,o){var u=ri(o,wo(Xm));return Tr(r,L,n,o,u)}),GC=Ir(function(r,o){return Tr(r,U,n,n,n,o)});function KC(r,o){if(typeof r!="function")throw new zn(l);return o=o===n?o:Xt(o),ee(r,o)}function qC(r,o){if(typeof r!="function")throw new zn(l);return o=o==null?0:Ze(Xt(o),0),ee(function(u){var p=u[o],w=li(u,0,o);return p&&ni(w,p),An(r,this,w)})}function YC(r,o,u){var p=!0,w=!0;if(typeof r!="function")throw new zn(l);return Be(u)&&(p="leading"in u?!!u.leading:p,w="trailing"in u?!!u.trailing:w),Ym(r,o,{leading:p,maxWait:o,trailing:w})}function XC(r){return Hm(r,1)}function ZC(r,o){return yh(oh(o),r)}function JC(){if(!arguments.length)return[];var r=arguments[0];return qt(r)?r:[r]}function QC(r){return Hn(r,b)}function jC(r,o){return o=typeof o=="function"?o:n,Hn(r,b,o)}function $C(r){return Hn(r,g|b)}function t2(r,o){return o=typeof o=="function"?o:n,Hn(r,g|b,o)}function e2(r,o){return o==null||Lv(r,o,Je(o))}function $n(r,o){return r===o||r!==r&&o!==o}var n2=ql(Yf),r2=ql(function(r,o){return r>=o}),Hi=Wv(function(){return arguments}())?Wv:function(r){return Ve(r)&&_e.call(r,"callee")&&!Ev.call(r,"callee")},qt=J.isArray,i2=lv?Cn(lv):fS;function vn(r){return r!=null&&eu(r.length)&&!Nr(r)}function He(r){return Ve(r)&&vn(r)}function o2(r){return r===!0||r===!1||Ve(r)&&un(r)==Yt}var ui=_1||Nh,s2=uv?Cn(uv):hS;function a2(r){return Ve(r)&&r.nodeType===1&&!_s(r)}function l2(r){if(r==null)return!0;if(vn(r)&&(qt(r)||typeof r=="string"||typeof r.splice=="function"||ui(r)||yo(r)||Hi(r)))return!r.length;var o=on(r);if(o==Kt||o==ve)return!r.size;if(ms(r))return!Jf(r).length;for(var u in r)if(_e.call(r,u))return!1;return!0}function u2(r,o){return gs(r,o)}function c2(r,o,u){u=typeof u=="function"?u:n;var p=u?u(r,o):n;return p===n?gs(r,o,n,u):!!p}function xh(r){if(!Ve(r))return!1;var o=un(r);return o==ce||o==Ht||typeof r.message=="string"&&typeof r.name=="string"&&!_s(r)}function d2(r){return typeof r=="number"&&Tv(r)}function Nr(r){if(!Be(r))return!1;var o=un(r);return o==ge||o==Ye||o==ue||o==We}function Zm(r){return typeof r=="number"&&r==Xt(r)}function eu(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ut}function Be(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function Ve(r){return r!=null&&typeof r=="object"}var Jm=cv?Cn(cv):pS;function f2(r,o){return r===o||Zf(r,o,fh(o))}function h2(r,o,u){return u=typeof u=="function"?u:n,Zf(r,o,fh(o),u)}function g2(r){return Qm(r)&&r!=+r}function p2(r){if(jS(r))throw new Gt(a);return Hv(r)}function v2(r){return r===null}function m2(r){return r==null}function Qm(r){return typeof r=="number"||Ve(r)&&un(r)==Ut}function _s(r){if(!Ve(r)||un(r)!=pe)return!1;var o=kl(r);if(o===null)return!0;var u=_e.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&Al.call(u)==h1}var Sh=dv?Cn(dv):vS;function b2(r){return Zm(r)&&r>=-9007199254740991&&r<=ut}var jm=fv?Cn(fv):mS;function nu(r){return typeof r=="string"||!qt(r)&&Ve(r)&&un(r)==an}function En(r){return typeof r=="symbol"||Ve(r)&&un(r)==Qe}var yo=hv?Cn(hv):bS;function _2(r){return r===n}function w2(r){return Ve(r)&&on(r)==fe}function y2(r){return Ve(r)&&un(r)==Ke}var x2=ql(Qf),S2=ql(function(r,o){return r<=o});function $m(r){if(!r)return[];if(vn(r))return nu(r)?Qn(r):pn(r);if(ss&&r[ss])return e1(r[ss]());var o=on(r),u=o==Kt?Bf:o==ve?yl:xo;return u(r)}function Rr(r){if(!r)return r===0?r:0;if(r=Kn(r),r===ot||r===-1/0){var o=r<0?-1:1;return o*mt}return r===r?r:0}function Xt(r){var o=Rr(r),u=o%1;return o===o?u?o-u:o:0}function tb(r){return r?Bi(Xt(r),0,st):0}function Kn(r){if(typeof r=="number")return r;if(En(r))return bt;if(Be(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=Be(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=_v(r);var u=ix.test(r);return u||sx.test(r)?Bx(r.slice(2),u?2:8):rx.test(r)?bt:+r}function eb(r){return dr(r,mn(r))}function A2(r){return r?Bi(Xt(r),-9007199254740991,ut):r===0?r:0}function be(r){return r==null?"":Pn(r)}var C2=bo(function(r,o){if(ms(o)||vn(o)){dr(o,Je(o),r);return}for(var u in o)_e.call(o,u)&&ds(r,u,o[u])}),nb=bo(function(r,o){dr(o,mn(o),r)}),ru=bo(function(r,o,u,p){dr(o,mn(o),r,p)}),P2=bo(function(r,o,u,p){dr(o,Je(o),r,p)}),E2=Ir(Gf);function k2(r,o){var u=mo(r);return o==null?u:Mv(u,o)}var T2=ee(function(r,o){r=Ae(r);var u=-1,p=o.length,w=p>2?o[2]:n;for(w&&cn(o[0],o[1],w)&&(p=1);++u<p;)for(var E=o[u],R=mn(E),V=-1,K=R.length;++V<K;){var lt=R[V],ct=r[lt];(ct===n||$n(ct,go[lt])&&!_e.call(r,lt))&&(r[lt]=E[lt])}return r}),I2=ee(function(r){return r.push(n,_m),An(rb,n,r)});function O2(r,o){return pv(r,Mt(o,3),cr)}function N2(r,o){return pv(r,Mt(o,3),qf)}function R2(r,o){return r==null?r:Kf(r,Mt(o,3),mn)}function M2(r,o){return r==null?r:Vv(r,Mt(o,3),mn)}function L2(r,o){return r&&cr(r,Mt(o,3))}function D2(r,o){return r&&qf(r,Mt(o,3))}function F2(r){return r==null?[]:Bl(r,Je(r))}function B2(r){return r==null?[]:Bl(r,mn(r))}function Ah(r,o,u){var p=r==null?n:Vi(r,o);return p===n?u:p}function V2(r,o){return r!=null&&xm(r,o,lS)}function Ch(r,o){return r!=null&&xm(r,o,uS)}var z2=gm(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=Cl.call(o)),r[o]=u},Eh(bn)),W2=gm(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=Cl.call(o)),_e.call(r,o)?r[o].push(u):r[o]=[u]},Mt),H2=ee(hs);function Je(r){return vn(r)?Nv(r):Jf(r)}function mn(r){return vn(r)?Nv(r,!0):_S(r)}function U2(r,o){var u={};return o=Mt(o,3),cr(r,function(p,w,E){kr(u,o(p,w,E),p)}),u}function G2(r,o){var u={};return o=Mt(o,3),cr(r,function(p,w,E){kr(u,w,o(p,w,E))}),u}var K2=bo(function(r,o,u){Vl(r,o,u)}),rb=bo(function(r,o,u,p){Vl(r,o,u,p)}),q2=Ir(function(r,o){var u={};if(r==null)return u;var p=!1;o=Le(o,function(E){return E=ai(E,r),p||(p=E.length>1),E}),dr(r,ch(r),u),p&&(u=Hn(u,g|v|b,zS));for(var w=o.length;w--;)nh(u,o[w]);return u});function Y2(r,o){return ib(r,tu(Mt(o)))}var X2=Ir(function(r,o){return r==null?{}:yS(r,o)});function ib(r,o){if(r==null)return{};var u=Le(ch(r),function(p){return[p]});return o=Mt(o),Zv(r,u,function(p,w){return o(p,w[0])})}function Z2(r,o,u){o=ai(o,r);var p=-1,w=o.length;for(w||(w=1,r=n);++p<w;){var E=r==null?n:r[fr(o[p])];E===n&&(p=w,E=u),r=Nr(E)?E.call(r):E}return r}function J2(r,o,u){return r==null?r:ps(r,o,u)}function Q2(r,o,u,p){return p=typeof p=="function"?p:n,r==null?r:ps(r,o,u,p)}var ob=mm(Je),sb=mm(mn);function j2(r,o,u){var p=qt(r),w=p||ui(r)||yo(r);if(o=Mt(o,4),u==null){var E=r&&r.constructor;w?u=p?new E:[]:Be(r)?u=Nr(E)?mo(kl(r)):{}:u={}}return(w?Vn:cr)(r,function(R,V,K){return o(u,R,V,K)}),u}function $2(r,o){return r==null?!0:nh(r,o)}function tP(r,o,u){return r==null?r:tm(r,o,oh(u))}function eP(r,o,u,p){return p=typeof p=="function"?p:n,r==null?r:tm(r,o,oh(u),p)}function xo(r){return r==null?[]:Ff(r,Je(r))}function nP(r){return r==null?[]:Ff(r,mn(r))}function rP(r,o,u){return u===n&&(u=o,o=n),u!==n&&(u=Kn(u),u=u===u?u:0),o!==n&&(o=Kn(o),o=o===o?o:0),Bi(Kn(r),o,u)}function iP(r,o,u){return o=Rr(o),u===n?(u=o,o=0):u=Rr(u),r=Kn(r),cS(r,o,u)}function oP(r,o,u){if(u&&typeof u!="boolean"&&cn(r,o,u)&&(o=u=n),u===n&&(typeof o=="boolean"?(u=o,o=n):typeof r=="boolean"&&(u=r,r=n)),r===n&&o===n?(r=0,o=1):(r=Rr(r),o===n?(o=r,r=0):o=Rr(o)),r>o){var p=r;r=o,o=p}if(u||r%1||o%1){var w=Iv();return rn(r+w*(o-r+Fx("1e-"+((w+"").length-1))),o)}return $f(r,o)}var sP=_o(function(r,o,u){return o=o.toLowerCase(),r+(u?ab(o):o)});function ab(r){return Ph(be(r).toLowerCase())}function lb(r){return r=be(r),r&&r.replace(lx,Jx).replace(Ex,"")}function aP(r,o,u){r=be(r),o=Pn(o);var p=r.length;u=u===n?p:Bi(Xt(u),0,p);var w=u;return u-=o.length,u>=0&&r.slice(u,w)==o}function lP(r){return r=be(r),r&&Hy.test(r)?r.replace(ao,Qx):r}function uP(r){return r=be(r),r&&Xy.test(r)?r.replace(yf,"\\$&"):r}var cP=_o(function(r,o,u){return r+(u?"-":"")+o.toLowerCase()}),dP=_o(function(r,o,u){return r+(u?" ":"")+o.toLowerCase()}),fP=dm("toLowerCase");function hP(r,o,u){r=be(r),o=Xt(o);var p=o?fo(r):0;if(!o||p>=o)return r;var w=(o-p)/2;return Kl(Nl(w),u)+r+Kl(Ol(w),u)}function gP(r,o,u){r=be(r),o=Xt(o);var p=o?fo(r):0;return o&&p<o?r+Kl(o-p,u):r}function pP(r,o,u){r=be(r),o=Xt(o);var p=o?fo(r):0;return o&&p<o?Kl(o-p,u)+r:r}function vP(r,o,u){return u||o==null?o=0:o&&(o=+o),S1(be(r).replace(xf,""),o||0)}function mP(r,o,u){return(u?cn(r,o,u):o===n)?o=1:o=Xt(o),th(be(r),o)}function bP(){var r=arguments,o=be(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var _P=_o(function(r,o,u){return r+(u?"_":"")+o.toLowerCase()});function wP(r,o,u){return u&&typeof u!="number"&&cn(r,o,u)&&(o=u=n),u=u===n?st:u>>>0,u?(r=be(r),r&&(typeof o=="string"||o!=null&&!Sh(o))&&(o=Pn(o),!o&&co(r))?li(Qn(r),0,u):r.split(o,u)):[]}var yP=_o(function(r,o,u){return r+(u?" ":"")+Ph(o)});function xP(r,o,u){return r=be(r),u=u==null?0:Bi(Xt(u),0,r.length),o=Pn(o),r.slice(u,u+o.length)==o}function SP(r,o,u){var p=C.templateSettings;u&&cn(r,o,u)&&(o=n),r=be(r),o=ru({},o,p,bm);var w=ru({},o.imports,p.imports,bm),E=Je(w),R=Ff(w,E),V,K,lt=0,ct=o.interpolate||vl,pt="__p += '",Ct=Vf((o.escape||vl).source+"|"+ct.source+"|"+(ct===zp?nx:vl).source+"|"+(o.evaluate||vl).source+"|$","g"),Tt="//# sourceURL="+(_e.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nx+"]")+`
76
- `;r.replace(Ct,function(Ft,re,ae,kn,dn,Tn){return ae||(ae=kn),pt+=r.slice(lt,Tn).replace(ux,jx),re&&(V=!0,pt+=`' +
77
- __e(`+re+`) +
78
- '`),dn&&(K=!0,pt+=`';
79
- `+dn+`;
80
- __p += '`),ae&&(pt+=`' +
81
- ((__t = (`+ae+`)) == null ? '' : __t) +
82
- '`),lt=Tn+Ft.length,Ft}),pt+=`';
83
- `;var Dt=_e.call(o,"variable")&&o.variable;if(!Dt)pt=`with (obj) {
84
- `+pt+`
85
- }
86
- `;else if(tx.test(Dt))throw new Gt(c);pt=(K?pt.replace(ur,""):pt).replace(Fn,"$1").replace(Ri,"$1;"),pt="function("+(Dt||"obj")+`) {
87
- `+(Dt?"":`obj || (obj = {});
88
- `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(K?`, __j = Array.prototype.join;
89
- function print() { __p += __j.call(arguments, '') }
90
- `:`;
91
- `)+pt+`return __p
92
- }`;var Qt=cb(function(){return he(E,Tt+"return "+pt).apply(n,R)});if(Qt.source=pt,xh(Qt))throw Qt;return Qt}function AP(r){return be(r).toLowerCase()}function CP(r){return be(r).toUpperCase()}function PP(r,o,u){if(r=be(r),r&&(u||o===n))return _v(r);if(!r||!(o=Pn(o)))return r;var p=Qn(r),w=Qn(o),E=wv(p,w),R=yv(p,w)+1;return li(p,E,R).join("")}function EP(r,o,u){if(r=be(r),r&&(u||o===n))return r.slice(0,Sv(r)+1);if(!r||!(o=Pn(o)))return r;var p=Qn(r),w=yv(p,Qn(o))+1;return li(p,0,w).join("")}function kP(r,o,u){if(r=be(r),r&&(u||o===n))return r.replace(xf,"");if(!r||!(o=Pn(o)))return r;var p=Qn(r),w=wv(p,Qn(o));return li(p,w).join("")}function TP(r,o){var u=at,p=gt;if(Be(o)){var w="separator"in o?o.separator:w;u="length"in o?Xt(o.length):u,p="omission"in o?Pn(o.omission):p}r=be(r);var E=r.length;if(co(r)){var R=Qn(r);E=R.length}if(u>=E)return r;var V=u-fo(p);if(V<1)return p;var K=R?li(R,0,V).join(""):r.slice(0,V);if(w===n)return K+p;if(R&&(V+=K.length-V),Sh(w)){if(r.slice(V).search(w)){var lt,ct=K;for(w.global||(w=Vf(w.source,be(Wp.exec(w))+"g")),w.lastIndex=0;lt=w.exec(ct);)var pt=lt.index;K=K.slice(0,pt===n?V:pt)}}else if(r.indexOf(Pn(w),V)!=V){var Ct=K.lastIndexOf(w);Ct>-1&&(K=K.slice(0,Ct))}return K+p}function IP(r){return r=be(r),r&&Wy.test(r)?r.replace(ti,o1):r}var OP=_o(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),Ph=dm("toUpperCase");function ub(r,o,u){return r=be(r),o=u?n:o,o===n?t1(r)?l1(r):Kx(r):r.match(o)||[]}var cb=ee(function(r,o){try{return An(r,n,o)}catch(u){return xh(u)?u:new Gt(u)}}),NP=Ir(function(r,o){return Vn(o,function(u){u=fr(u),kr(r,u,wh(r[u],r))}),r});function RP(r){var o=r==null?0:r.length,u=Mt();return r=o?Le(r,function(p){if(typeof p[1]!="function")throw new zn(l);return[u(p[0]),p[1]]}):[],ee(function(p){for(var w=-1;++w<o;){var E=r[w];if(An(E[0],this,p))return An(E[1],this,p)}})}function MP(r){return oS(Hn(r,g))}function Eh(r){return function(){return r}}function LP(r,o){return r==null||r!==r?o:r}var DP=hm(),FP=hm(!0);function bn(r){return r}function kh(r){return Uv(typeof r=="function"?r:Hn(r,g))}function BP(r){return Kv(Hn(r,g))}function VP(r,o){return qv(r,Hn(o,g))}var zP=ee(function(r,o){return function(u){return hs(u,r,o)}}),WP=ee(function(r,o){return function(u){return hs(r,u,o)}});function Th(r,o,u){var p=Je(o),w=Bl(o,p);u==null&&!(Be(o)&&(w.length||!p.length))&&(u=o,o=r,r=this,w=Bl(o,Je(o)));var E=!(Be(u)&&"chain"in u)||!!u.chain,R=Nr(r);return Vn(w,function(V){var K=o[V];r[V]=K,R&&(r.prototype[V]=function(){var lt=this.__chain__;if(E||lt){var ct=r(this.__wrapped__),pt=ct.__actions__=pn(this.__actions__);return pt.push({func:K,args:arguments,thisArg:r}),ct.__chain__=lt,ct}return K.apply(r,ni([this.value()],arguments))})}),r}function HP(){return $e._===this&&($e._=g1),this}function Ih(){}function UP(r){return r=Xt(r),ee(function(o){return Yv(o,r)})}var GP=ah(Le),KP=ah(gv),qP=ah(Nf);function db(r){return gh(r)?Rf(fr(r)):xS(r)}function YP(r){return function(o){return r==null?n:Vi(r,o)}}var XP=pm(),ZP=pm(!0);function Oh(){return[]}function Nh(){return!1}function JP(){return{}}function QP(){return""}function jP(){return!0}function $P(r,o){if(r=Xt(r),r<1||r>ut)return[];var u=st,p=rn(r,st);o=Mt(o),r-=st;for(var w=Df(p,o);++u<r;)o(u);return w}function tE(r){return qt(r)?Le(r,fr):En(r)?[r]:pn(Om(be(r)))}function eE(r){var o=++f1;return be(r)+o}var nE=Gl(function(r,o){return r+o},0),rE=lh("ceil"),iE=Gl(function(r,o){return r/o},1),oE=lh("floor");function sE(r){return r&&r.length?Fl(r,bn,Yf):n}function aE(r,o){return r&&r.length?Fl(r,Mt(o,2),Yf):n}function lE(r){return mv(r,bn)}function uE(r,o){return mv(r,Mt(o,2))}function cE(r){return r&&r.length?Fl(r,bn,Qf):n}function dE(r,o){return r&&r.length?Fl(r,Mt(o,2),Qf):n}var fE=Gl(function(r,o){return r*o},1),hE=lh("round"),gE=Gl(function(r,o){return r-o},0);function pE(r){return r&&r.length?Lf(r,bn):0}function vE(r,o){return r&&r.length?Lf(r,Mt(o,2)):0}return C.after=BC,C.ary=Hm,C.assign=C2,C.assignIn=nb,C.assignInWith=ru,C.assignWith=P2,C.at=E2,C.before=Um,C.bind=wh,C.bindAll=NP,C.bindKey=Gm,C.castArray=JC,C.chain=Vm,C.chunk=oA,C.compact=sA,C.concat=aA,C.cond=RP,C.conforms=MP,C.constant=Eh,C.countBy=pC,C.create=k2,C.curry=Km,C.curryRight=qm,C.debounce=Ym,C.defaults=T2,C.defaultsDeep=I2,C.defer=VC,C.delay=zC,C.difference=lA,C.differenceBy=uA,C.differenceWith=cA,C.drop=dA,C.dropRight=fA,C.dropRightWhile=hA,C.dropWhile=gA,C.fill=pA,C.filter=mC,C.flatMap=wC,C.flatMapDeep=yC,C.flatMapDepth=xC,C.flatten=Lm,C.flattenDeep=vA,C.flattenDepth=mA,C.flip=WC,C.flow=DP,C.flowRight=FP,C.fromPairs=bA,C.functions=F2,C.functionsIn=B2,C.groupBy=SC,C.initial=wA,C.intersection=yA,C.intersectionBy=xA,C.intersectionWith=SA,C.invert=z2,C.invertBy=W2,C.invokeMap=CC,C.iteratee=kh,C.keyBy=PC,C.keys=Je,C.keysIn=mn,C.map=Ql,C.mapKeys=U2,C.mapValues=G2,C.matches=BP,C.matchesProperty=VP,C.memoize=$l,C.merge=K2,C.mergeWith=rb,C.method=zP,C.methodOf=WP,C.mixin=Th,C.negate=tu,C.nthArg=UP,C.omit=q2,C.omitBy=Y2,C.once=HC,C.orderBy=EC,C.over=GP,C.overArgs=UC,C.overEvery=KP,C.overSome=qP,C.partial=yh,C.partialRight=Xm,C.partition=kC,C.pick=X2,C.pickBy=ib,C.property=db,C.propertyOf=YP,C.pull=EA,C.pullAll=Fm,C.pullAllBy=kA,C.pullAllWith=TA,C.pullAt=IA,C.range=XP,C.rangeRight=ZP,C.rearg=GC,C.reject=OC,C.remove=OA,C.rest=KC,C.reverse=bh,C.sampleSize=RC,C.set=J2,C.setWith=Q2,C.shuffle=MC,C.slice=NA,C.sortBy=FC,C.sortedUniq=VA,C.sortedUniqBy=zA,C.split=wP,C.spread=qC,C.tail=WA,C.take=HA,C.takeRight=UA,C.takeRightWhile=GA,C.takeWhile=KA,C.tap=sC,C.throttle=YC,C.thru=Jl,C.toArray=$m,C.toPairs=ob,C.toPairsIn=sb,C.toPath=tE,C.toPlainObject=eb,C.transform=j2,C.unary=XC,C.union=qA,C.unionBy=YA,C.unionWith=XA,C.uniq=ZA,C.uniqBy=JA,C.uniqWith=QA,C.unset=$2,C.unzip=_h,C.unzipWith=Bm,C.update=tP,C.updateWith=eP,C.values=xo,C.valuesIn=nP,C.without=jA,C.words=ub,C.wrap=ZC,C.xor=$A,C.xorBy=tC,C.xorWith=eC,C.zip=nC,C.zipObject=rC,C.zipObjectDeep=iC,C.zipWith=oC,C.entries=ob,C.entriesIn=sb,C.extend=nb,C.extendWith=ru,Th(C,C),C.add=nE,C.attempt=cb,C.camelCase=sP,C.capitalize=ab,C.ceil=rE,C.clamp=rP,C.clone=QC,C.cloneDeep=$C,C.cloneDeepWith=t2,C.cloneWith=jC,C.conformsTo=e2,C.deburr=lb,C.defaultTo=LP,C.divide=iE,C.endsWith=aP,C.eq=$n,C.escape=lP,C.escapeRegExp=uP,C.every=vC,C.find=bC,C.findIndex=Rm,C.findKey=O2,C.findLast=_C,C.findLastIndex=Mm,C.findLastKey=N2,C.floor=oE,C.forEach=zm,C.forEachRight=Wm,C.forIn=R2,C.forInRight=M2,C.forOwn=L2,C.forOwnRight=D2,C.get=Ah,C.gt=n2,C.gte=r2,C.has=V2,C.hasIn=Ch,C.head=Dm,C.identity=bn,C.includes=AC,C.indexOf=_A,C.inRange=iP,C.invoke=H2,C.isArguments=Hi,C.isArray=qt,C.isArrayBuffer=i2,C.isArrayLike=vn,C.isArrayLikeObject=He,C.isBoolean=o2,C.isBuffer=ui,C.isDate=s2,C.isElement=a2,C.isEmpty=l2,C.isEqual=u2,C.isEqualWith=c2,C.isError=xh,C.isFinite=d2,C.isFunction=Nr,C.isInteger=Zm,C.isLength=eu,C.isMap=Jm,C.isMatch=f2,C.isMatchWith=h2,C.isNaN=g2,C.isNative=p2,C.isNil=m2,C.isNull=v2,C.isNumber=Qm,C.isObject=Be,C.isObjectLike=Ve,C.isPlainObject=_s,C.isRegExp=Sh,C.isSafeInteger=b2,C.isSet=jm,C.isString=nu,C.isSymbol=En,C.isTypedArray=yo,C.isUndefined=_2,C.isWeakMap=w2,C.isWeakSet=y2,C.join=AA,C.kebabCase=cP,C.last=Gn,C.lastIndexOf=CA,C.lowerCase=dP,C.lowerFirst=fP,C.lt=x2,C.lte=S2,C.max=sE,C.maxBy=aE,C.mean=lE,C.meanBy=uE,C.min=cE,C.minBy=dE,C.stubArray=Oh,C.stubFalse=Nh,C.stubObject=JP,C.stubString=QP,C.stubTrue=jP,C.multiply=fE,C.nth=PA,C.noConflict=HP,C.noop=Ih,C.now=jl,C.pad=hP,C.padEnd=gP,C.padStart=pP,C.parseInt=vP,C.random=oP,C.reduce=TC,C.reduceRight=IC,C.repeat=mP,C.replace=bP,C.result=Z2,C.round=hE,C.runInContext=H,C.sample=NC,C.size=LC,C.snakeCase=_P,C.some=DC,C.sortedIndex=RA,C.sortedIndexBy=MA,C.sortedIndexOf=LA,C.sortedLastIndex=DA,C.sortedLastIndexBy=FA,C.sortedLastIndexOf=BA,C.startCase=yP,C.startsWith=xP,C.subtract=gE,C.sum=pE,C.sumBy=vE,C.template=SP,C.times=$P,C.toFinite=Rr,C.toInteger=Xt,C.toLength=tb,C.toLower=AP,C.toNumber=Kn,C.toSafeInteger=A2,C.toString=be,C.toUpper=CP,C.trim=PP,C.trimEnd=EP,C.trimStart=kP,C.truncate=TP,C.unescape=IP,C.uniqueId=eE,C.upperCase=OP,C.upperFirst=Ph,C.each=zm,C.eachRight=Wm,C.first=Dm,Th(C,function(){var r={};return cr(C,function(o,u){_e.call(C.prototype,u)||(r[u]=o)}),r}(),{chain:!1}),C.VERSION=i,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){C[r].placeholder=C}),Vn(["drop","take"],function(r,o){oe.prototype[r]=function(u){u=u===n?1:Ze(Xt(u),0);var p=this.__filtered__&&!o?new oe(this):this.clone();return p.__filtered__?p.__takeCount__=rn(u,p.__takeCount__):p.__views__.push({size:rn(u,st),type:r+(p.__dir__<0?"Right":"")}),p},oe.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Vn(["filter","map","takeWhile"],function(r,o){var u=o+1,p=u==G||u==Q;oe.prototype[r]=function(w){var E=this.clone();return E.__iteratees__.push({iteratee:Mt(w,3),type:u}),E.__filtered__=E.__filtered__||p,E}}),Vn(["head","last"],function(r,o){var u="take"+(o?"Right":"");oe.prototype[r]=function(){return this[u](1).value()[0]}}),Vn(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");oe.prototype[r]=function(){return this.__filtered__?new oe(this):this[u](1)}}),oe.prototype.compact=function(){return this.filter(bn)},oe.prototype.find=function(r){return this.filter(r).head()},oe.prototype.findLast=function(r){return this.reverse().find(r)},oe.prototype.invokeMap=ee(function(r,o){return typeof r=="function"?new oe(this):this.map(function(u){return hs(u,r,o)})}),oe.prototype.reject=function(r){return this.filter(tu(Mt(r)))},oe.prototype.slice=function(r,o){r=Xt(r);var u=this;return u.__filtered__&&(r>0||o<0)?new oe(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=Xt(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},oe.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},oe.prototype.toArray=function(){return this.take(st)},cr(oe.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),w=C[p?"take"+(o=="last"?"Right":""):o],E=p||/^find/.test(o);w&&(C.prototype[o]=function(){var R=this.__wrapped__,V=p?[1]:arguments,K=R instanceof oe,lt=V[0],ct=K||qt(R),pt=function(re){var ae=w.apply(C,ni([re],V));return p&&Ct?ae[0]:ae};ct&&u&&typeof lt=="function"&&lt.length!=1&&(K=ct=!1);var Ct=this.__chain__,Tt=!!this.__actions__.length,Dt=E&&!Ct,Qt=K&&!Tt;if(!E&&ct){R=Qt?R:new oe(this);var Ft=r.apply(R,V);return Ft.__actions__.push({func:Jl,args:[pt],thisArg:n}),new Wn(Ft,Ct)}return Dt&&Qt?r.apply(this,V):(Ft=this.thru(pt),Dt?p?Ft.value()[0]:Ft.value():Ft)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(r){var o=xl[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);C.prototype[r]=function(){var w=arguments;if(p&&!this.__chain__){var E=this.value();return o.apply(qt(E)?E:[],w)}return this[u](function(R){return o.apply(qt(R)?R:[],w)})}}),cr(oe.prototype,function(r,o){var u=C[o];if(u){var p=u.name+"";_e.call(vo,p)||(vo[p]=[]),vo[p].push({name:o,func:u})}}),vo[Ul(n,S).name]=[{name:"wrapper",func:n}],oe.prototype.clone=I1,oe.prototype.reverse=O1,oe.prototype.value=N1,C.prototype.at=aC,C.prototype.chain=lC,C.prototype.commit=uC,C.prototype.next=cC,C.prototype.plant=fC,C.prototype.reverse=hC,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=gC,C.prototype.first=C.prototype.head,ss&&(C.prototype[ss]=dC),C},ho=u1();Mi?((Mi.exports=ho)._=ho,kf._=ho):$e._=ho}).call(br)})(zu,zu.exports);var XF=zu.exports;const _6=x0(XF);function ZF(e,t){const n=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(n)&&rt(t,dt(n))}function C_(e){e.stopPropagation(),e.preventDefault()}function JF(e,t,n){e.stopPropagation(),e.preventDefault(),rt(t,!m(t)),m(t)&&setTimeout(n,0)}function P_(e,t){e.key==="Escape"&&t()}var QF=(e,t,n)=>t(m(n)),jF=et('<button type="button"></button>'),$F=et('<div id="color-picker-panel" tabindex="-1"><div class="flex items-center justify-between border-b px-3 py-2"><h3 class="text-sm font-medium">Color</h3> <!></div> <div class="p-3"><div class="space-y-3"><div class="relative h-28 cursor-crosshair rounded"><div class="absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md"></div></div> <div class="relative h-4 cursor-pointer rounded" style="background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"><div class="absolute top-0 h-full w-1 -translate-x-1/2 border-x border-white shadow-sm"></div></div> <div class="flex items-center gap-2"><div class="h-6 w-6 rounded border"></div> <input type="text" class="bg-background flex-1 rounded border px-2 py-1 text-xs uppercase"></div> <div class="space-y-1"><div class="flex items-center justify-between text-xs"><span>Opacity</span> <span> </span></div> <!></div> <div class="space-y-1"><div class="text-xs">Presets</div> <div class="grid grid-cols-8 gap-1"></div></div></div> <div class="mt-3 flex justify-end gap-2"><!> <!></div></div></div>'),t4=et('<div class="relative inline-block"><button type="button" class="m-0 border-0 bg-transparent p-0" tabindex="0"><!></button> <!></div>');function w6(e,t){ft(t,!0);let n=k(t,"initialColor",3,"#ff0000"),i=k(t,"initialAlpha",3,1),s=k(t,"position",3,"right"),a=vt(!1),l,c=vt(dt(n())),d=vt(dt(i()));const f=["#ff0000","#ff8000","#ffff00","#80ff00","#00ff00","#00ffff","#0080ff","#0000ff","#8000ff","#ff00ff","#ff0080","#ffffff","#cccccc","#888888","#444444","#000000"];let h,g,v=vt(0),b=vt(100),_=vt(50);xe(()=>{if(m(c).startsWith("#")){const[G,Z,Q]=y(m(c));rt(v,dt(G)),rt(b,dt(Z)),rt(_,dt(Q))}}),xe(()=>{rt(c,dt(x(m(v),m(b),m(_))))});function y(G){G=G.replace(/^#/,"");const Z=parseInt(G.slice(0,2),16)/255,Q=parseInt(G.slice(2,4),16)/255,ot=parseInt(G.slice(4,6),16)/255,ut=Math.max(Z,Q,ot),mt=Math.min(Z,Q,ot),bt=(ut+mt)/2;let st=0,At=0;if(ut!==mt){const kt=ut-mt;switch(At=bt>.5?kt/(2-ut-mt):kt/(ut+mt),ut){case Z:st=((Q-ot)/kt+(Q<ot?6:0))/6;break;case Q:st=((ot-Z)/kt+2)/6;break;case ot:st=((Z-Q)/kt+4)/6;break}}return[Math.round(st*360),Math.round(At*100),Math.round(bt*100)]}function x(G,Z,Q){G/=360,Z/=100,Q/=100;let ot,ut,mt;if(Z===0)ot=ut=mt=Q;else{const At=Q<.5?Q*(1+Z):Q+Z-Q*Z,kt=2*Q-At;ot=bt(kt,At,G+1/3),ut=bt(kt,At,G),mt=bt(kt,At,G-1/3)}function bt(At,kt,Vt){return Vt<0&&(Vt+=1),Vt>1&&(Vt-=1),Vt<1/6?At+(kt-At)*6*Vt:Vt<1/2?kt:Vt<2/3?At+(kt-At)*(2/3-Vt)*6:At}const st=At=>{const kt=Math.round(At*255).toString(16);return kt.length===1?"0"+kt:kt};return`#${st(ot)}${st(ut)}${st(mt)}`}function S(G){if(!h)return;const Z=h.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(G.clientX-Z.left)/Z.width)),ot=Math.max(0,Math.min(1,(G.clientY-Z.top)/Z.height));if(rt(b,dt(Math.round(Q*100))),rt(_,dt(Math.round((1-ot)*100))),G.buttons!==1&&G.type!=="mousedown")return;const ut=mt=>S(mt);document.addEventListener("mousemove",ut),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ut)},{once:!0})}function I(G){if(!g)return;const Z=g.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(G.clientX-Z.left)/Z.width));if(rt(v,dt(Math.round(Q*360))),G.buttons!==1&&G.type!=="mousedown")return;const ot=ut=>I(ut);document.addEventListener("mousemove",ot),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ot)},{once:!0})}function T(G){rt(c,dt(G))}function O(G){rt(d,dt(G[0]))}function D(){t.onChange&&t.onChange(m(c),m(d)),rt(a,!1)}function L(){rt(a,!1)}function M(){function G(Q){if(m(a)&&l){const ot=document.getElementById("color-picker-panel");ot&&!ot.contains(Q.target)&&!l.contains(Q.target)&&rt(a,!1)}}document.addEventListener("mousedown",G);const Z=()=>U();return window.addEventListener("resize",Z),{destroy:()=>{document.removeEventListener("mousedown",G),window.removeEventListener("resize",Z)}}}function U(){l&&requestAnimationFrame(()=>{const G=document.getElementById("color-picker-panel");if(!G)return;const Z=l.getBoundingClientRect(),Q=window.innerWidth,ot=window.innerHeight,ut=G.offsetWidth,mt=G.offsetHeight;let bt,st;switch(s()){case"top":bt=Z.left+Z.width/2-ut/2,st=Z.top-mt-8;break;case"bottom":bt=Z.left+Z.width/2-ut/2,st=Z.bottom+8;break;case"left":bt=Z.left-ut-8,st=Z.top;break;case"right":default:bt=Z.right+8,st=Z.top;break}bt<10&&(bt=10),st<10&&(st=10),bt+ut>Q-10&&(bt=Q-ut-10),st+mt>ot-10&&(st=ot-mt-10),G.style.position="fixed",G.style.left=`${bt}px`,G.style.top=`${st}px`})}e0(()=>{if(m(a))return M().destroy});var q=t4(),at=tt(q);at.__click=[JF,a,U],at.__keydown=[P_,L];var gt=tt(at);it(gt,()=>t.children),$(at),rr(at,G=>l=G,()=>l);var W=_t(at,2);{var j=G=>{var Z=X(),Q=z(Z);Ot(Q,()=>dl,(ot,ut)=>{ut(ot,{children:(mt,bt)=>{var st=$F();st.__keydown=[P_,L],st.__click=[C_],st.__mousedown=[C_];var At=tt(st),kt=_t(tt(At),2);Yn(kt,{variant:"ghost",size:"icon",class:"h-6 w-6",onclick:L,children:(me,fe)=>{Tp(me,{class:"h-4 w-4"})},$$slots:{default:!0}}),$(At);var Vt=_t(At,2),Nt=tt(Vt),Bt=tt(Nt);Bt.__mousedown=S;var ue=tt(Bt);$(Bt),rr(Bt,me=>h=me,()=>h);var Yt=_t(Bt,2);Yt.__mousedown=I;var It=tt(Yt);$(Yt),rr(Yt,me=>g=me,()=>g);var Ht=_t(Yt,2),ce=tt(Ht),ge=_t(ce,2);Iu(ge),ge.__input=[ZF,c],$(Ht);var Ye=_t(Ht,2),Kt=tt(Ye),Ut=_t(tt(Kt),2),de=tt(Ut);$(Ut),$(Kt);var pe=_t(Kt,2);const Te=N(()=>[m(d)]);WD(pe,{min:0,max:1,step:.01,get value(){return m(Te)},onValueChange:O}),$(Ye);var We=_t(Ye,2),Fe=_t(tt(We),2);Ei(Fe,21,()=>f,ff,(me,fe)=>{var Ke=jF();Ke.__click=[QF,T,fe],yt(je=>{Xn(Ke,1,je),yn(Ke,`background-color: ${m(fe)}`),ze(Ke,"title",m(fe))},[()=>ki(se("h-4 w-4 rounded-sm border",m(c)===m(fe)?"ring-primary ring-1":""))]),P(me,Ke)}),$(Fe),$(We),$(Nt);var ve=_t(Nt,2),an=tt(ve);Yn(an,{size:"sm",variant:"outline",class:"h-7 px-2 py-0 text-xs",onclick:L,children:(me,fe)=>{we();var Ke=Ce("Cancel");P(me,Ke)},$$slots:{default:!0}});var Qe=_t(an,2);Yn(Qe,{size:"sm",class:"h-7 px-2 py-0 text-xs",onclick:D,children:(me,fe)=>{we();var Ke=Ce("Apply");P(me,Ke)},$$slots:{default:!0}}),$(ve),$(Vt),$(st),yt((me,fe)=>{Xn(st,1,me),yn(Bt,`background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${m(v)}, 100%, 50%))`),yn(ue,`left: ${m(b)}%; top: ${100-m(_)}%; background-color: ${m(c)}`),yn(It,`left: ${m(v)/360*100}%`),yn(ce,`background-color: ${m(c)}`),Mk(ge,m(c)),De(de,`${fe??""}%`)},[()=>ki(se("bg-popover text-popover-foreground z-50 w-56 rounded-md border shadow-md",t.class)),()=>Math.round(m(d)*100)]),f0(3,st,()=>qD,()=>({duration:150,y:0,x:0})),P(mt,st)},$$slots:{default:!0}})}),P(G,Z)};wt(W,G=>{m(a)&&G(j)})}$(q),P(e,q),ht()}io(["click","keydown","mousedown","input"]);var e4=et("<div></div>");function n4(e,t){ft(t,!0);const n=k(t,"rootMargin",3,"200px"),i=k(t,"threshold",3,0),s=k(t,"disabled",3,!1);let a=vt(null);xe(()=>{if(!m(a)||s())return;const c=new IntersectionObserver(d=>{d[0].isIntersecting&&t.onIntersect()},{rootMargin:n(),threshold:i()});return c.observe(m(a)),()=>c.disconnect()});var l=e4();rr(l,c=>rt(a,c),()=>m(a)),P(e,l),ht()}var Bg="http://www.w3.org/1999/xhtml";const E_={svg:"http://www.w3.org/2000/svg",xhtml:Bg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bf(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),E_.hasOwnProperty(t)?{space:E_[t],local:e}:e}function r4(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Bg&&t.documentElement.namespaceURI===Bg?t.createElement(e):t.createElementNS(n,e)}}function i4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function vy(e){var t=bf(e);return(t.local?i4:r4)(t)}function o4(){}function Rp(e){return e==null?o4:function(){return this.querySelector(e)}}function s4(e){typeof e!="function"&&(e=Rp(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=i[s]=new Array(l),d,f,h=0;h<l;++h)(d=a[h])&&(f=e.call(d,d.__data__,h,a))&&("__data__"in d&&(f.__data__=d.__data__),c[h]=f);return new sr(i,this._parents)}function a4(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function l4(){return[]}function my(e){return e==null?l4:function(){return this.querySelectorAll(e)}}function u4(e){return function(){return a4(e.apply(this,arguments))}}function c4(e){typeof e=="function"?e=u4(e):e=my(e);for(var t=this._groups,n=t.length,i=[],s=[],a=0;a<n;++a)for(var l=t[a],c=l.length,d,f=0;f<c;++f)(d=l[f])&&(i.push(e.call(d,d.__data__,f,l)),s.push(d));return new sr(i,s)}function by(e){return function(){return this.matches(e)}}function _y(e){return function(t){return t.matches(e)}}var d4=Array.prototype.find;function f4(e){return function(){return d4.call(this.children,e)}}function h4(){return this.firstElementChild}function g4(e){return this.select(e==null?h4:f4(typeof e=="function"?e:_y(e)))}var p4=Array.prototype.filter;function v4(){return Array.from(this.children)}function m4(e){return function(){return p4.call(this.children,e)}}function b4(e){return this.selectAll(e==null?v4:m4(typeof e=="function"?e:_y(e)))}function _4(e){typeof e!="function"&&(e=by(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=i[s]=[],d,f=0;f<l;++f)(d=a[f])&&e.call(d,d.__data__,f,a)&&c.push(d);return new sr(i,this._parents)}function wy(e){return new Array(e.length)}function w4(){return new sr(this._enter||this._groups.map(wy),this._parents)}function Wu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wu.prototype={constructor:Wu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function y4(e){return function(){return e}}function x4(e,t,n,i,s,a){for(var l=0,c,d=t.length,f=a.length;l<f;++l)(c=t[l])?(c.__data__=a[l],i[l]=c):n[l]=new Wu(e,a[l]);for(;l<d;++l)(c=t[l])&&(s[l]=c)}function S4(e,t,n,i,s,a,l){var c,d,f=new Map,h=t.length,g=a.length,v=new Array(h),b;for(c=0;c<h;++c)(d=t[c])&&(v[c]=b=l.call(d,d.__data__,c,t)+"",f.has(b)?s[c]=d:f.set(b,d));for(c=0;c<g;++c)b=l.call(e,a[c],c,a)+"",(d=f.get(b))?(i[c]=d,d.__data__=a[c],f.delete(b)):n[c]=new Wu(e,a[c]);for(c=0;c<h;++c)(d=t[c])&&f.get(v[c])===d&&(s[c]=d)}function A4(e){return e.__data__}function C4(e,t){if(!arguments.length)return Array.from(this,A4);var n=t?S4:x4,i=this._parents,s=this._groups;typeof e!="function"&&(e=y4(e));for(var a=s.length,l=new Array(a),c=new Array(a),d=new Array(a),f=0;f<a;++f){var h=i[f],g=s[f],v=g.length,b=P4(e.call(h,h&&h.__data__,f,i)),_=b.length,y=c[f]=new Array(_),x=l[f]=new Array(_),S=d[f]=new Array(v);n(h,g,y,x,S,b,t);for(var I=0,T=0,O,D;I<_;++I)if(O=y[I]){for(I>=T&&(T=I+1);!(D=x[T])&&++T<_;);O._next=D||null}}return l=new sr(l,i),l._enter=c,l._exit=d,l}function P4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E4(){return new sr(this._exit||this._groups.map(wy),this._parents)}function k4(e,t,n){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?a.remove():n(a),i&&s?i.merge(s).order():s}function T4(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,a=i.length,l=Math.min(s,a),c=new Array(s),d=0;d<l;++d)for(var f=n[d],h=i[d],g=f.length,v=c[d]=new Array(g),b,_=0;_<g;++_)(b=f[_]||h[_])&&(v[_]=b);for(;d<s;++d)c[d]=n[d];return new sr(c,this._parents)}function I4(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,a=i[s],l;--s>=0;)(l=i[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function O4(e){e||(e=N4);function t(g,v){return g&&v?e(g.__data__,v.__data__):!g-!v}for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a){for(var l=n[a],c=l.length,d=s[a]=new Array(c),f,h=0;h<c;++h)(f=l[h])&&(d[h]=f);d.sort(t)}return new sr(s,this._parents).order()}function N4(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function R4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function M4(){return Array.from(this)}function L4(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var l=i[s];if(l)return l}return null}function D4(){let e=0;for(const t of this)++e;return e}function F4(){return!this.node()}function B4(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],a=0,l=s.length,c;a<l;++a)(c=s[a])&&e.call(c,c.__data__,a,s);return this}function V4(e){return function(){this.removeAttribute(e)}}function z4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function W4(e,t){return function(){this.setAttribute(e,t)}}function H4(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function U4(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function G4(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function K4(e,t){var n=bf(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?z4:V4:typeof t=="function"?n.local?G4:U4:n.local?H4:W4)(n,t))}function yy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function q4(e){return function(){this.style.removeProperty(e)}}function Y4(e,t,n){return function(){this.style.setProperty(e,t,n)}}function X4(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Z4(e,t,n){return arguments.length>1?this.each((t==null?q4:typeof t=="function"?X4:Y4)(e,t,n??"")):Jo(this.node(),e)}function Jo(e,t){return e.style.getPropertyValue(t)||yy(e).getComputedStyle(e,null).getPropertyValue(t)}function J4(e){return function(){delete this[e]}}function Q4(e,t){return function(){this[e]=t}}function j4(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function $4(e,t){return arguments.length>1?this.each((t==null?J4:typeof t=="function"?j4:Q4)(e,t)):this.node()[e]}function xy(e){return e.trim().split(/^|\s+/)}function Mp(e){return e.classList||new Sy(e)}function Sy(e){this._node=e,this._names=xy(e.getAttribute("class")||"")}Sy.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ay(e,t){for(var n=Mp(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function Cy(e,t){for(var n=Mp(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function tB(e){return function(){Ay(this,e)}}function eB(e){return function(){Cy(this,e)}}function nB(e,t){return function(){(t.apply(this,arguments)?Ay:Cy)(this,e)}}function rB(e,t){var n=xy(e+"");if(arguments.length<2){for(var i=Mp(this.node()),s=-1,a=n.length;++s<a;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?nB:t?tB:eB)(n,t))}function iB(){this.textContent=""}function oB(e){return function(){this.textContent=e}}function sB(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function aB(e){return arguments.length?this.each(e==null?iB:(typeof e=="function"?sB:oB)(e)):this.node().textContent}function lB(){this.innerHTML=""}function uB(e){return function(){this.innerHTML=e}}function cB(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function dB(e){return arguments.length?this.each(e==null?lB:(typeof e=="function"?cB:uB)(e)):this.node().innerHTML}function fB(){this.nextSibling&&this.parentNode.appendChild(this)}function hB(){return this.each(fB)}function gB(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pB(){return this.each(gB)}function vB(e){var t=typeof e=="function"?e:vy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function mB(){return null}function bB(e,t){var n=typeof e=="function"?e:vy(e),i=t==null?mB:typeof t=="function"?t:Rp(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function _B(){var e=this.parentNode;e&&e.removeChild(this)}function wB(){return this.each(_B)}function yB(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xB(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function SB(e){return this.select(e?xB:yB)}function AB(e){return arguments.length?this.property("__data__",e):this.node().__data__}function CB(e){return function(t){e.call(this,t,this.__data__)}}function PB(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function EB(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,a;n<s;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function kB(e,t,n){return function(){var i=this.__on,s,a=CB(t);if(i){for(var l=0,c=i.length;l<c;++l)if((s=i[l]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=n),s.value=t;return}}this.addEventListener(e.type,a,n),s={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(s):this.__on=[s]}}function TB(e,t,n){var i=PB(e+""),s,a=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var d=0,f=c.length,h;d<f;++d)for(s=0,h=c[d];s<a;++s)if((l=i[s]).type===h.type&&l.name===h.name)return h.value}return}for(c=t?kB:EB,s=0;s<a;++s)this.each(c(i[s],t,n));return this}function Py(e,t,n){var i=yy(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,n):(s=i.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function IB(e,t){return function(){return Py(this,e,t)}}function OB(e,t){return function(){return Py(this,e,t.apply(this,arguments))}}function NB(e,t){return this.each((typeof t=="function"?OB:IB)(e,t))}function*RB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,a=i.length,l;s<a;++s)(l=i[s])&&(yield l)}var MB=[null];function sr(e,t){this._groups=e,this._parents=t}function gl(){return new sr([[document.documentElement]],MB)}function LB(){return this}sr.prototype=gl.prototype={constructor:sr,select:s4,selectAll:c4,selectChild:g4,selectChildren:b4,filter:_4,data:C4,enter:w4,exit:E4,join:k4,merge:T4,selection:LB,order:I4,sort:O4,call:R4,nodes:M4,node:L4,size:D4,empty:F4,each:B4,attr:K4,style:Z4,property:$4,classed:rB,text:aB,html:dB,raise:hB,lower:pB,append:vB,insert:bB,remove:wB,clone:SB,datum:AB,on:TB,dispatch:NB,[Symbol.iterator]:RB};var DB={value:()=>{}};function Ey(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Cu(n)}function Cu(e){this._=e}function FB(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Cu.prototype=Ey.prototype={constructor:Cu,on:function(e,t){var n=this._,i=FB(e+"",n),s,a=-1,l=i.length;if(arguments.length<2){for(;++a<l;)if((s=(e=i[a]).type)&&(s=BB(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(s=(e=i[a]).type)n[s]=k_(n[s],e.name,t);else if(t==null)for(s in n)n[s]=k_(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Cu(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,a;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,n)}};function BB(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function k_(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=DB,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}function VB(e){if(typeof document>"u")return{r:0,g:0,b:0,a:255};const t=document.createElement("canvas");t.width=1,t.height=1;const n=t.getContext("2d",{willReadFrequently:!0});if(!n)return console.error("Failed to get context for color parsing, returning default black"),{r:0,g:0,b:0,a:255};n.fillStyle=e,n.fillRect(0,0,1,1);try{const i=n.getImageData(0,0,1,1).data;return{r:i[0],g:i[1],b:i[2],a:i[3]}}catch(i){return console.error("Failed to getImageData for color parsing, returning default black:",i),{r:0,g:0,b:0,a:255}}}function zB(e,t,n){const i=e.reduce((S,I)=>S+I,0),s=Math.ceil(i/t);if(t<=0||s<=0||!Number.isFinite(t)||!Number.isFinite(s))return{dataUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",height:0};if(typeof document>"u")throw new Error("Canvas API (document) not available. Ensure tests mock the DOM and Canvas.");const a=document.createElement("canvas");a.width=t,a.height=s;const l=a.getContext("2d",{willReadFrequently:!0});if(!l)throw new Error("Failed to get canvas 2D context. Check canvas support or mocks.");if(typeof l.createImageData!="function"||typeof l.putImageData!="function")throw new Error("Canvas context mock is incomplete. Missing 'createImageData' or 'putImageData'. Please update test environment mocks (e.g., jest-canvas-mock).");let c;try{c=l.createImageData(t,s)}catch(S){throw console.error(`Error calling ctx.createImageData(${t}, ${s}). Check mock implementation.`,S),S}const d=c.data,f=d.length,{r:h,g,b:v,a:b}=VB(n);let _=0,y=0;e.forEach((S,I)=>{if(S===0)return;if(I%2!==0){const O=_+S;for(;_<O;){const D=Math.floor(_/t),L=_%t;y=(D*t+L)*4,y>=0&&y<f-3&&(d[y]=h,d[y+1]=g,d[y+2]=v,d[y+3]=b),_++}}else _+=S}),l.putImageData(c,0,0);let x="";try{x=a.toDataURL()}catch(S){console.error("Error calling canvas.toDataURL(). Check mock implementation.",S),x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}return{dataUrl:x,height:s}}var WB=sl('<image x="0" y="0"></image>');function HB(e,t){ft(t,!0);const n=k(t,"colorFill",3,"rgba(255, 0, 0, 0.2)"),i=k(t,"opacity",3,.4);if(!t.segmentation)throw new Error("Segmentation data is required");const s=N(()=>{const d=n().replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*[\d.]+)?\)/,"rgb($1)");return zB(t.segmentation,t.width,d)}),a=N(()=>m(s).dataUrl),l=N(()=>m(s).height);var c=WB();yt(()=>{ze(c,"href",m(a)),ze(c,"width",t.width),ze(c,"height",m(l)),ze(c,"opacity",i())}),P(e,c),ht()}const UB=({datasetId:e,annotationId:t,onUpdate:n})=>{const i=Ck({path:{annotation_id:t,dataset_id:e}}),s=tp(),{updateAnnotations:a}=w0({datasetId:e}),l=r0(i),c=()=>{s.invalidateQueries({queryKey:i.queryKey}),s.invalidateQueries({queryKey:i0().queryKey}),s.invalidateQueries({queryKey:Pk({path:{dataset_id:e}}).queryKey})};return{updateAnnotation:async f=>{try{await a([f]),c(),Ou.success("Annotation updated successfully"),n==null||n()}catch(h){Ou.error("Failed to update annotation:"+h.message)}},annotation:l,refetch:c}};var GB=et('<button type="button"><span class="flex flex-1 flex-col gap-1"><span class="text-sm font-medium" data-testid="sample-details-pannel-annotation-name"><!></span> <span class="text-xs text-muted-foreground"> <!></span></span> <!></button>');function y6(e,t){ft(t,!0);const[n,i]=$o(),s=()=>Ge(g,"$result",n),a=()=>Ge(f,"$isEditingMode",n),l=k(t,"isSelected",3,!1),c=W=>{switch(W){case"object_detection":return"Object Detection";case"instance_segmentation":return"Instance Segmentation";case"semantic_segmentation":return"Semantic Segmentation";case"classification":return"Image Classification";default:return W}},d=W=>{const j=W.object_detection_details||W.instance_segmentation_details;if(j){const{width:G,height:Z}=j;return`${Math.round(G)}x${Math.round(Z)}px`}return""},{isEditingMode:f}=to.data.globalStorage,{datasetId:h}=to.data,g=ay(),v=N(()=>uy(s().data||[])),b=N(()=>{const W=t.annotation.annotation_label.annotation_label_name,j=m(v).find(G=>G.value===W);return j||{value:W,label:W}}),_=N(()=>t.annotation.annotation_id),y=N(()=>UB({datasetId:h,annotationId:m(_),onUpdate:t.onUpdate})),x=N(()=>m(y).updateAnnotation);var S=GB();S.__click=function(...W){var j;(j=t.onClick)==null||j.apply(this,W)};var I=tt(S),T=tt(I),O=tt(T);{var D=W=>{sy(W,{get items(){return m(v)},get value(){return m(b)},name:"annotation-label",placeholder:"Select a label",onSelect:G=>{m(x)({annotation_id:m(_),dataset_id:h,label_name:G.value})},notFound:(G,Z)=>{let Q=()=>Z==null?void 0:Z().inputValue;ly(G,{get label(){return Q()}})},$$slots:{notFound:!0}})},L=W=>{var j=Ce();yt(()=>De(j,t.annotation.annotation_label.annotation_label_name)),P(W,j)};wt(O,W=>{a()?W(D):W(L,!1)})}$(T);var M=_t(T,2),U=tt(M),q=_t(U);{var at=W=>{var j=Ce();yt(G=>De(j,`(${G??""})`),[()=>d(t.annotation)]),P(W,j)};wt(q,W=>{d(t.annotation)&&W(at)})}$(M),$(I);var gt=_t(I,2);gF(gt,{class:"size-6 transition-all hover:size-7",get onclick(){return t.onClickCenterIcon}}),$(S),yt((W,j)=>{Xn(S,1,W),De(U,`${j??""} `)},[()=>ki(se("flex w-full items-start justify-between gap-2 rounded-sm px-4 py-3 text-left align-baseline transition-colors",l()?"border border-accent-foreground/20 bg-accent":"bg-card hover:bg-accent/50")),()=>c(t.annotation.annotation_type)]),P(e,S),ht(),i()}io(["click"]);function KB(e,t){const n=k(t,"isSelected",3,!1);py(e,{get checked(){return n()},get onCheckedChange(){return t.onSelect},"data-testid":"sample-selected-box"})}var qB=et('<div class="flex items-center justify-between space-x-2 py-1"><!> <div class="flex space-x-2"><!> <!> <!></div></div>'),YB=et("<p>No classifiers loaded.</p>"),XB=et('<span class="mr-2 animate-spin">⏳</span> Running...',1),ZB=et('<div class="mb-3 w-full space-y-2"><!> <div class="flex space-x-1"><!> <div class="relative"><input title="Load Classifier" type="file" accept=".pkl" class="absolute inset-0 h-full w-full cursor-pointer opacity-0"> <!></div></div></div>'),JB=et("<!> <!>",1),QB=et("<!> <!>",1),jB=et('<!> <div class="grid gap-4 py-4"><!> <!></div>',1),$B=et("<!> <!>",1);function x6(e,t){ft(t,!1);const[n,i]=$o(),s=()=>Ge(_,"$classifiers",n),a=()=>Ge(y,"$classifiersSelected",n),l=()=>Ge(b,"$error",n),c=()=>Ge(x,"$isLoading",n),d=()=>Ge(M,"$showExportDialog",n),f=()=>Ge(L,"$exportType",n),h=()=>Ge(at,"$triggerContent",n),g=["sklearn","lightly"];let v=to.params.dataset_id;const{error:b,classifiers:_,classifiersSelected:y,isLoading:x,classifierSelectionToggle:S,apply:I,saveClassifier:T,loadClassifier:O,startRefinment:D}=NF(),L=Ee("sklearn"),M=Ee(!1),U=Ee(null),q=Pi([y,_],([Q,ot])=>Q.size>0&&ot.length>0),at=Pi(L,Q=>Q||"Select export type");function gt(Q){U.set(Q),M.set(!0)}function W(){const Q=Pe(U),ot=Pe(L);Q&&(T(Q,ot),M.set(!1),U.set(null))}Qg();var j=$B(),G=z(j);dy(G,{title:"Classifiers",icon:fF,children:(Q,ot)=>{var ut=ZB(),mt=tt(ut);Ei(mt,1,s,Nt=>Nt.classifier_id,(Nt,Bt)=>{var ue=qB(),Yt=tt(ue);const It=nn(()=>a().has(m(Bt).classifier_id));EF(Yt,{get name(){return m(Bt).classifier_id},get isChecked(){return m(It)},get label(){return m(Bt).classifier_name},onCheckedChange:()=>S(m(Bt).classifier_id)});var Ht=_t(Yt,2),ce=tt(Ht);{var ge=Ut=>{Kk(Ut,{title:"Error occured",children:(de,pe)=>{we();var Te=Ce();yt(()=>De(Te,l())),P(de,Te)}})};wt(ce,Ut=>{l()&&Ut(ge)})}var Ye=_t(ce,2);Yn(Ye,{variant:"outline",size:"sm",title:"Edit",onclick:()=>D("existing",m(Bt).classifier_id,m(Bt).classifier_name,m(Bt).class_list,v),children:(Ut,de)=>{hF(Ut,{})},$$slots:{default:!0}});var Kt=_t(Ye,2);Yn(Kt,{variant:"outline",size:"sm",title:"Download classifier",onclick:()=>gt(m(Bt).classifier_id),children:(Ut,de)=>{cF(Ut,{})},$$slots:{default:!0}}),$(Ht),$(ue),P(Nt,ue)},Nt=>{var Bt=YB();P(Nt,Bt)});var bt=_t(mt,2),st=tt(bt);Yn(st,{variant:"outline",class:"flex-1",disabled:!q,onclick:I,children:(Nt,Bt)=>{var ue=X(),Yt=z(ue);{var It=ce=>{var ge=XB();we(),P(ce,ge)},Ht=ce=>{var ge=Ce("Run Classifiers");P(ce,ge)};wt(Yt,ce=>{c()?ce(It):ce(Ht,!1)})}P(Nt,ue)},$$slots:{default:!0}});var At=_t(st,2),kt=tt(At);kt.__change=O;var Vt=_t(kt,2);Yn(Vt,{variant:"outline",size:"sm",children:(Nt,Bt)=>{dF(Nt,{})},$$slots:{default:!0}}),$(At),$(bt),$(ut),P(Q,ut)}});var Z=_t(G,2);Yw(Z,{get open(){return wb(),d()},set open(Q){_b(M,Q)},children:(Q,ot)=>{qw(Q,{children:(ut,mt)=>{var bt=jB(),st=z(bt);Gw(st,{children:(Nt,Bt)=>{Uw(Nt,{children:(ue,Yt)=>{we();var It=Ce("Export Classifier");P(ue,It)},$$slots:{default:!0}})},$$slots:{default:!0}});var At=_t(st,2),kt=tt(At);eF(kt,{label:"Select the export type for the classifier.",children:(Nt,Bt)=>{gy(Nt,{type:"single",name:"exportType",get value(){return wb(),f()},set value(ue){_b(L,ue)},children:(ue,Yt)=>{var It=QB(),Ht=z(It);hy(Ht,{class:"w-full",children:(ge,Ye)=>{we();var Kt=Ce();yt(()=>De(Kt,h())),P(ge,Kt)},$$slots:{default:!0}});var ce=_t(Ht,2);fy(ce,{children:(ge,Ye)=>{uF(ge,{children:(Kt,Ut)=>{var de=JB(),pe=z(de);nF(pe,{children:(We,Fe)=>{we();var ve=Ce("Export Types");P(We,ve)},$$slots:{default:!0}});var Te=_t(pe,2);Ei(Te,1,()=>g,We=>We,(We,Fe)=>{Fg(We,{get value(){return m(Fe)},get label(){return m(Fe)},children:(ve,an)=>{we();var Qe=Ce();yt(()=>De(Qe,m(Fe))),P(ve,Qe)},$$slots:{default:!0}})}),P(Kt,de)},$$slots:{default:!0}})},$$slots:{default:!0}}),P(ue,It)},$$slots:{default:!0},$$legacy:!0})}});var Vt=_t(kt,2);Yn(Vt,{class:"flex-1",onclick:()=>W(),children:(Nt,Bt)=>{we();var ue=Ce("Export");P(Nt,ue)},$$slots:{default:!0}}),$(At),P(ut,bt)},$$slots:{default:!0}})},$$slots:{default:!0},$$legacy:!0}),P(e,j),ht(),i()}io(["change"]);function Lp(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ky(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function pl(){}var qs=.7,Hu=1/qs,Mo="\\s*([+-]?\\d+)\\s*",Ys="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t9=/^#([0-9a-f]{3,8})$/,e9=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),n9=new RegExp(`^rgb\\(${wr},${wr},${wr}\\)$`),r9=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${Ys}\\)$`),i9=new RegExp(`^rgba\\(${wr},${wr},${wr},${Ys}\\)$`),o9=new RegExp(`^hsl\\(${Ys},${wr},${wr}\\)$`),s9=new RegExp(`^hsla\\(${Ys},${wr},${wr},${Ys}\\)$`),T_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Lp(pl,Xs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:I_,formatHex:I_,formatHex8:a9,formatHsl:l9,formatRgb:O_,toString:O_});function I_(){return this.rgb().formatHex()}function a9(){return this.rgb().formatHex8()}function l9(){return Ty(this).formatHsl()}function O_(){return this.rgb().formatRgb()}function Xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=t9.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?N_(t):n===3?new xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=e9.exec(e))?new xn(t[1],t[2],t[3],1):(t=n9.exec(e))?new xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=r9.exec(e))?hu(t[1],t[2],t[3],t[4]):(t=i9.exec(e))?hu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=o9.exec(e))?L_(t[1],t[2]/100,t[3]/100,1):(t=s9.exec(e))?L_(t[1],t[2]/100,t[3]/100,t[4]):T_.hasOwnProperty(e)?N_(T_[e]):e==="transparent"?new xn(NaN,NaN,NaN,0):null}function N_(e){return new xn(e>>16&255,e>>8&255,e&255,1)}function hu(e,t,n,i){return i<=0&&(e=t=n=NaN),new xn(e,t,n,i)}function u9(e){return e instanceof pl||(e=Xs(e)),e?(e=e.rgb(),new xn(e.r,e.g,e.b,e.opacity)):new xn}function Vg(e,t,n,i){return arguments.length===1?u9(e):new xn(e,t,n,i??1)}function xn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Lp(xn,Vg,ky(pl,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qs:Math.pow(qs,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xn($i(this.r),$i(this.g),$i(this.b),Uu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:R_,formatHex:R_,formatHex8:c9,formatRgb:M_,toString:M_}));function R_(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}`}function c9(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}${Ki((isNaN(this.opacity)?1:this.opacity)*255)}`}function M_(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${$i(this.r)}, ${$i(this.g)}, ${$i(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $i(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ki(e){return e=$i(e),(e<16?"0":"")+e.toString(16)}function L_(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new nr(e,t,n,i)}function Ty(e){if(e instanceof nr)return new nr(e.h,e.s,e.l,e.opacity);if(e instanceof pl||(e=Xs(e)),!e)return new nr;if(e instanceof nr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),a=Math.max(t,n,i),l=NaN,c=a-s,d=(a+s)/2;return c?(t===a?l=(n-i)/c+(n<i)*6:n===a?l=(i-t)/c+2:l=(t-n)/c+4,c/=d<.5?a+s:2-a-s,l*=60):c=d>0&&d<1?0:l,new nr(l,c,d,e.opacity)}function d9(e,t,n,i){return arguments.length===1?Ty(e):new nr(e,t,n,i??1)}function nr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Lp(nr,d9,ky(pl,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new nr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qs:Math.pow(qs,e),new nr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,s=2*n-i;return new xn(rg(e>=240?e-240:e+120,s,i),rg(e,s,i),rg(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new nr(D_(this.h),gu(this.s),gu(this.l),Uu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Uu(this.opacity);return`${e===1?"hsl(":"hsla("}${D_(this.h)}, ${gu(this.s)*100}%, ${gu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function D_(e){return e=(e||0)%360,e<0?e+360:e}function gu(e){return Math.max(0,Math.min(1,e||0))}function rg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Iy=e=>()=>e;function f9(e,t){return function(n){return e+n*t}}function h9(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function g9(e){return(e=+e)==1?Oy:function(t,n){return n-t?h9(t,n,e):Iy(isNaN(t)?n:t)}}function Oy(e,t){var n=t-e;return n?f9(e,n):Iy(isNaN(e)?t:e)}const F_=function e(t){var n=g9(t);function i(s,a){var l=n((s=Vg(s)).r,(a=Vg(a)).r),c=n(s.g,a.g),d=n(s.b,a.b),f=Oy(s.opacity,a.opacity);return function(h){return s.r=l(h),s.g=c(h),s.b=d(h),s.opacity=f(h),s+""}}return i.gamma=e,i}(1);function bi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var zg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ig=new RegExp(zg.source,"g");function p9(e){return function(){return e}}function v9(e){return function(t){return e(t)+""}}function m9(e,t){var n=zg.lastIndex=ig.lastIndex=0,i,s,a,l=-1,c=[],d=[];for(e=e+"",t=t+"";(i=zg.exec(e))&&(s=ig.exec(t));)(a=s.index)>n&&(a=t.slice(n,a),c[l]?c[l]+=a:c[++l]=a),(i=i[0])===(s=s[0])?c[l]?c[l]+=s:c[++l]=s:(c[++l]=null,d.push({i:l,x:bi(i,s)})),n=ig.lastIndex;return n<t.length&&(a=t.slice(n),c[l]?c[l]+=a:c[++l]=a),c.length<2?d[0]?v9(d[0].x):p9(t):(t=d.length,function(f){for(var h=0,g;h<t;++h)c[(g=d[h]).i]=g.x(f);return c.join("")})}var B_=180/Math.PI,Wg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ny(e,t,n,i,s,a){var l,c,d;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(d=e*n+t*i)&&(n-=e*d,i-=t*d),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,d/=c),e*i<t*n&&(e=-e,t=-t,d=-d,l=-l),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*B_,skewX:Math.atan(d)*B_,scaleX:l,scaleY:c}}var pu;function b9(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wg:Ny(t.a,t.b,t.c,t.d,t.e,t.f)}function _9(e){return e==null||(pu||(pu=document.createElementNS("http://www.w3.org/2000/svg","g")),pu.setAttribute("transform",e),!(e=pu.transform.baseVal.consolidate()))?Wg:(e=e.matrix,Ny(e.a,e.b,e.c,e.d,e.e,e.f))}function Ry(e,t,n,i){function s(f){return f.length?f.pop()+" ":""}function a(f,h,g,v,b,_){if(f!==g||h!==v){var y=b.push("translate(",null,t,null,n);_.push({i:y-4,x:bi(f,g)},{i:y-2,x:bi(h,v)})}else(g||v)&&b.push("translate("+g+t+v+n)}function l(f,h,g,v){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),v.push({i:g.push(s(g)+"rotate(",null,i)-2,x:bi(f,h)})):h&&g.push(s(g)+"rotate("+h+i)}function c(f,h,g,v){f!==h?v.push({i:g.push(s(g)+"skewX(",null,i)-2,x:bi(f,h)}):h&&g.push(s(g)+"skewX("+h+i)}function d(f,h,g,v,b,_){if(f!==g||h!==v){var y=b.push(s(b)+"scale(",null,",",null,")");_.push({i:y-4,x:bi(f,g)},{i:y-2,x:bi(h,v)})}else(g!==1||v!==1)&&b.push(s(b)+"scale("+g+","+v+")")}return function(f,h){var g=[],v=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,g,v),l(f.rotate,h.rotate,g,v),c(f.skewX,h.skewX,g,v),d(f.scaleX,f.scaleY,h.scaleX,h.scaleY,g,v),f=h=null,function(b){for(var _=-1,y=v.length,x;++_<y;)g[(x=v[_]).i]=x.x(b);return g.join("")}}}var w9=Ry(b9,"px, ","px)","deg)"),y9=Ry(_9,", ",")",")"),Qo=0,Ns=0,ks=0,My=1e3,Gu,Rs,Ku=0,no=0,_f=0,Zs=typeof performance=="object"&&performance.now?performance:Date,Ly=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dp(){return no||(Ly(x9),no=Zs.now()+_f)}function x9(){no=0}function qu(){this._call=this._time=this._next=null}qu.prototype=Dy.prototype={constructor:qu,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Dp():+n)+(t==null?0:+t),!this._next&&Rs!==this&&(Rs?Rs._next=this:Gu=this,Rs=this),this._call=e,this._time=n,Hg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Hg())}};function Dy(e,t,n){var i=new qu;return i.restart(e,t,n),i}function S9(){Dp(),++Qo;for(var e=Gu,t;e;)(t=no-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qo}function V_(){no=(Ku=Zs.now())+_f,Qo=Ns=0;try{S9()}finally{Qo=0,C9(),no=0}}function A9(){var e=Zs.now(),t=e-Ku;t>My&&(_f-=t,Ku=e)}function C9(){for(var e,t=Gu,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Gu=n);Rs=e,Hg(i)}function Hg(e){if(!Qo){Ns&&(Ns=clearTimeout(Ns));var t=e-no;t>24?(e<1/0&&(Ns=setTimeout(V_,e-Zs.now()-_f)),ks&&(ks=clearInterval(ks))):(ks||(Ku=Zs.now(),ks=setInterval(A9,My)),Qo=1,Ly(V_))}}function z_(e,t,n){var i=new qu;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var P9=Ey("start","end","cancel","interrupt"),E9=[],Fy=0,W_=1,Ug=2,Pu=3,H_=4,Gg=5,Eu=6;function wf(e,t,n,i,s,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;k9(e,n,{name:t,index:i,group:s,on:P9,tween:E9,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Fy})}function Fp(e,t){var n=ar(e,t);if(n.state>Fy)throw new Error("too late; already scheduled");return n}function Cr(e,t){var n=ar(e,t);if(n.state>Pu)throw new Error("too late; already running");return n}function ar(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function k9(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=Dy(a,0,n.time);function a(f){n.state=W_,n.timer.restart(l,n.delay,n.time),n.delay<=f&&l(f-n.delay)}function l(f){var h,g,v,b;if(n.state!==W_)return d();for(h in i)if(b=i[h],b.name===n.name){if(b.state===Pu)return z_(l);b.state===H_?(b.state=Eu,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[h]):+h<t&&(b.state=Eu,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[h])}if(z_(function(){n.state===Pu&&(n.state=H_,n.timer.restart(c,n.delay,n.time),c(f))}),n.state=Ug,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ug){for(n.state=Pu,s=new Array(v=n.tween.length),h=0,g=-1;h<v;++h)(b=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++g]=b);s.length=g+1}}function c(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(d),n.state=Gg,1),g=-1,v=s.length;++g<v;)s[g].call(e,h);n.state===Gg&&(n.on.call("end",e,e.__data__,n.index,n.group),d())}function d(){n.state=Eu,n.timer.stop(),delete i[t];for(var f in i)return;delete e.__transition}}function T9(e,t){var n=e.__transition,i,s,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((i=n[l]).name!==t){a=!1;continue}s=i.state>Ug&&i.state<Gg,i.state=Eu,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}a&&delete e.__transition}}function I9(e){return this.each(function(){T9(this,e)})}function O9(e,t){var n,i;return function(){var s=Cr(this,e),a=s.tween;if(a!==n){i=n=a;for(var l=0,c=i.length;l<c;++l)if(i[l].name===t){i=i.slice(),i.splice(l,1);break}}s.tween=i}}function N9(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var a=Cr(this,e),l=a.tween;if(l!==i){s=(i=l).slice();for(var c={name:t,value:n},d=0,f=s.length;d<f;++d)if(s[d].name===t){s[d]=c;break}d===f&&s.push(c)}a.tween=s}}function R9(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=ar(this.node(),n).tween,s=0,a=i.length,l;s<a;++s)if((l=i[s]).name===e)return l.value;return null}return this.each((t==null?O9:N9)(n,e,t))}function Bp(e,t,n){var i=e._id;return e.each(function(){var s=Cr(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return ar(s,i).value[t]}}function By(e,t){var n;return(typeof t=="number"?bi:t instanceof Xs?F_:(n=Xs(t))?(t=n,F_):m9)(e,t)}function M9(e){return function(){this.removeAttribute(e)}}function L9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function D9(e,t,n){var i,s=n+"",a;return function(){var l=this.getAttribute(e);return l===s?null:l===i?a:a=t(i=l,n)}}function F9(e,t,n){var i,s=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===s?null:l===i?a:a=t(i=l,n)}}function B9(e,t,n){var i,s,a;return function(){var l,c=n(this),d;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),d=c+"",l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,c)))}}function V9(e,t,n){var i,s,a;return function(){var l,c=n(this),d;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),d=c+"",l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,c)))}}function z9(e,t){var n=bf(e),i=n==="transform"?y9:By;return this.attrTween(e,typeof t=="function"?(n.local?V9:B9)(n,i,Bp(this,"attr."+e,t)):t==null?(n.local?L9:M9)(n):(n.local?F9:D9)(n,i,t))}function W9(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function H9(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function U9(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&H9(e,a)),n}return s._value=t,s}function G9(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&W9(e,a)),n}return s._value=t,s}function K9(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=bf(e);return this.tween(n,(i.local?U9:G9)(i,t))}function q9(e,t){return function(){Fp(this,e).delay=+t.apply(this,arguments)}}function Y9(e,t){return t=+t,function(){Fp(this,e).delay=t}}function X9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?q9:Y9)(t,e)):ar(this.node(),t).delay}function Z9(e,t){return function(){Cr(this,e).duration=+t.apply(this,arguments)}}function J9(e,t){return t=+t,function(){Cr(this,e).duration=t}}function Q9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Z9:J9)(t,e)):ar(this.node(),t).duration}function j9(e,t){if(typeof t!="function")throw new Error;return function(){Cr(this,e).ease=t}}function $9(e){var t=this._id;return arguments.length?this.each(j9(t,e)):ar(this.node(),t).ease}function t8(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Cr(this,e).ease=n}}function e8(e){if(typeof e!="function")throw new Error;return this.each(t8(this._id,e))}function n8(e){typeof e!="function"&&(e=by(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,c=i[s]=[],d,f=0;f<l;++f)(d=a[f])&&e.call(d,d.__data__,f,a)&&c.push(d);return new jr(i,this._parents,this._name,this._id)}function r8(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,a=Math.min(i,s),l=new Array(i),c=0;c<a;++c)for(var d=t[c],f=n[c],h=d.length,g=l[c]=new Array(h),v,b=0;b<h;++b)(v=d[b]||f[b])&&(g[b]=v);for(;c<i;++c)l[c]=t[c];return new jr(l,this._parents,this._name,this._id)}function i8(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function o8(e,t,n){var i,s,a=i8(t)?Fp:Cr;return function(){var l=a(this,e),c=l.on;c!==i&&(s=(i=c).copy()).on(t,n),l.on=s}}function s8(e,t){var n=this._id;return arguments.length<2?ar(this.node(),n).on.on(e):this.each(o8(n,e,t))}function a8(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function l8(){return this.on("end.remove",a8(this._id))}function u8(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Rp(e));for(var i=this._groups,s=i.length,a=new Array(s),l=0;l<s;++l)for(var c=i[l],d=c.length,f=a[l]=new Array(d),h,g,v=0;v<d;++v)(h=c[v])&&(g=e.call(h,h.__data__,v,c))&&("__data__"in h&&(g.__data__=h.__data__),f[v]=g,wf(f[v],t,n,v,f,ar(h,n)));return new jr(a,this._parents,t,n)}function c8(e){var t=this._name,n=this._id;typeof e!="function"&&(e=my(e));for(var i=this._groups,s=i.length,a=[],l=[],c=0;c<s;++c)for(var d=i[c],f=d.length,h,g=0;g<f;++g)if(h=d[g]){for(var v=e.call(h,h.__data__,g,d),b,_=ar(h,n),y=0,x=v.length;y<x;++y)(b=v[y])&&wf(b,t,n,y,v,_);a.push(v),l.push(h)}return new jr(a,l,t,n)}var d8=gl.prototype.constructor;function f8(){return new d8(this._groups,this._parents)}function h8(e,t){var n,i,s;return function(){var a=Jo(this,e),l=(this.style.removeProperty(e),Jo(this,e));return a===l?null:a===n&&l===i?s:s=t(n=a,i=l)}}function Vy(e){return function(){this.style.removeProperty(e)}}function g8(e,t,n){var i,s=n+"",a;return function(){var l=Jo(this,e);return l===s?null:l===i?a:a=t(i=l,n)}}function p8(e,t,n){var i,s,a;return function(){var l=Jo(this,e),c=n(this),d=c+"";return c==null&&(d=c=(this.style.removeProperty(e),Jo(this,e))),l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,c))}}function v8(e,t){var n,i,s,a="style."+t,l="end."+a,c;return function(){var d=Cr(this,e),f=d.on,h=d.value[a]==null?c||(c=Vy(t)):void 0;(f!==n||s!==h)&&(i=(n=f).copy()).on(l,s=h),d.on=i}}function m8(e,t,n){var i=(e+="")=="transform"?w9:By;return t==null?this.styleTween(e,h8(e,i)).on("end.style."+e,Vy(e)):typeof t=="function"?this.styleTween(e,p8(e,i,Bp(this,"style."+e,t))).each(v8(this._id,e)):this.styleTween(e,g8(e,i,t),n).on("end.style."+e,null)}function b8(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function _8(e,t,n){var i,s;function a(){var l=t.apply(this,arguments);return l!==s&&(i=(s=l)&&b8(e,l,n)),i}return a._value=t,a}function w8(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,_8(e,t,n??""))}function y8(e){return function(){this.textContent=e}}function x8(e){return function(){var t=e(this);this.textContent=t??""}}function S8(e){return this.tween("text",typeof e=="function"?x8(Bp(this,"text",e)):y8(e==null?"":e+""))}function A8(e){return function(t){this.textContent=e.call(this,t)}}function C8(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&A8(s)),t}return i._value=e,i}function P8(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,C8(e))}function E8(){for(var e=this._name,t=this._id,n=zy(),i=this._groups,s=i.length,a=0;a<s;++a)for(var l=i[a],c=l.length,d,f=0;f<c;++f)if(d=l[f]){var h=ar(d,t);wf(d,e,n,f,l,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new jr(i,this._parents,e,n)}function k8(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(a,l){var c={value:l},d={value:function(){--s===0&&a()}};n.each(function(){var f=Cr(this,i),h=f.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(d)),f.on=t}),s===0&&a()})}var T8=0;function jr(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function zy(){return++T8}var Fr=gl.prototype;jr.prototype={constructor:jr,select:u8,selectAll:c8,selectChild:Fr.selectChild,selectChildren:Fr.selectChildren,filter:n8,merge:r8,selection:f8,transition:E8,call:Fr.call,nodes:Fr.nodes,node:Fr.node,size:Fr.size,empty:Fr.empty,each:Fr.each,on:s8,attr:z9,attrTween:K9,style:m8,styleTween:w8,text:S8,textTween:P8,remove:l8,tween:R9,delay:X9,duration:Q9,ease:$9,easeVarying:e8,end:k8,[Symbol.iterator]:Fr[Symbol.iterator]};function I8(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var O8={time:null,delay:0,duration:250,ease:I8};function N8(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function R8(e){var t,n;e instanceof jr?(t=e._id,e=e._name):(t=zy(),(n=O8).time=Dp(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var l=i[a],c=l.length,d,f=0;f<c;++f)(d=l[f])&&wf(d,e,t,f,l,n||N8(d,t));return new jr(i,this._parents,e,t)}gl.prototype.interrupt=I9;gl.prototype.transition=R8;function ko(e,t,n){this.k=e,this.x=t,this.y=n}ko.prototype={constructor:ko,scale:function(e){return e===1?this:new ko(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ko(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var S6=new ko(1,0,0);ko.prototype;function M8(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t())}var L8=sl('<rect fill="none" stroke="hsl(var(--primary))" stroke-width="3" pointer-events="none" vector-effect="non-scaling-stroke"></rect>'),D8=sl('<g role="button" tabindex="0" data-testid="selectable-svg-group"><!><!></g>');function A6(e,t){ft(t,!0);let n=k(t,"isSelected",3,!1);const{x:i,y:s,width:a,height:l}=t.box,c=()=>{t.onSelect(t.groupId)};var d=D8();d.__click=c;let f;d.__keydown=[M8,c],yn(d,"",{},{cursor:"pointer"});var h=tt(d);it(h,()=>t.children);var g=_t(h);{var v=b=>{var _=L8();ze(_,"x",i),ze(_,"y",s),ze(_,"width",a),ze(_,"height",l),P(b,_)};wt(g,b=>{n()&&b(v)})}$(d),yt(b=>{f=Xn(d,0,"group svelte-15p83yz",null,f,b),ze(d,"data-group-id",t.groupId)},[()=>({selected:n()})]),P(e,d),ht()}io(["click","keydown"]);export{ko as $,f6 as A,dy as B,FD as C,ki as D,y6 as E,ay as F,eT as G,UB as H,Ln as I,sy as J,ly as K,n4 as L,uy as M,h6 as N,TD as O,Ws as P,Ou as Q,sr as R,KB as S,MB as T,Ey as U,HB as V,Eo as W,oy as X,a4 as Y,S6 as Z,_6 as _,dI as a,oD as a$,T9 as a0,Yn as a1,Co as a2,WD as a3,eF as a4,hy as a5,fy as a6,uF as a7,Fg as a8,gy as a9,Wk as aA,qn as aB,a6 as aC,l6 as aD,Ao as aE,Kr as aF,R0 as aG,N0 as aH,Ai as aI,ul as aJ,up as aK,cl as aL,sn as aM,Zn as aN,ie as aO,Yr as aP,Zr as aQ,O0 as aR,cI as aS,d6 as aT,hg as aU,ne as aV,iD as aW,HI as aX,Nw as aY,O3 as aZ,m6 as a_,nF as aa,Iu as ab,e6 as ac,h0 as ad,NF as ae,Kk as af,py as ag,Os as ah,w6 as ai,aT as aj,qw as ak,Gw as al,Uw as am,aL as an,EF as ao,nL as ap,Yw as aq,h_ as ar,RF as as,hL as at,x6 as au,r6 as av,i6 as aw,n6 as ax,o6 as ay,Mb as az,u6 as b,v6 as b0,f0 as b1,p6 as b2,cF as b3,qD as b4,fF as b5,b6,rp as b7,hF as b8,te as c,B as d,se as e,ID as f,c6 as g,Ei as h,ff as i,ze as j,Xn as k,sT as l,Wt as m,np as n,vD as o,$r as p,kF as q,TF as r,Lt as s,yn as t,$t as u,pT as v,VD as w,A6 as x,Dg as y,g6 as z};