lightly-studio 0.3.3__py3-none-any.whl → 0.3.4__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 (122) hide show
  1. lightly_studio/api/app.py +2 -0
  2. lightly_studio/api/routes/api/caption.py +30 -0
  3. lightly_studio/api/routes/api/embeddings2d.py +36 -4
  4. lightly_studio/api/routes/api/metadata.py +57 -1
  5. lightly_studio/core/add_samples.py +138 -0
  6. lightly_studio/core/dataset.py +143 -16
  7. lightly_studio/dataset/loader.py +2 -8
  8. lightly_studio/db_manager.py +10 -4
  9. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.B3oFNb6O.css +1 -0
  10. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/2.CkOblLn7.css +1 -0
  11. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.CIbricz7.css +1 -0
  12. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.7Ma7YdVg.css +1 -0
  13. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{useFeatureFlags.CV-KWLNP.css → _layout.CefECEWA.css} +1 -1
  14. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.2jKMtOWG.css +1 -0
  15. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/-DXuGN29.js +1 -0
  16. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Cs1XmhiF.js → B7302SU7.js} +1 -1
  17. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BeWf8-vJ.js +1 -0
  18. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bqz7dyEC.js +1 -0
  19. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C1FmrZbK.js +1 -0
  20. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BdfTHw61.js → CSCQddQS.js} +1 -1
  21. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CZGpyrcA.js +1 -0
  22. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CfQ4mGwl.js +1 -0
  23. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CiaNZCBa.js +1 -0
  24. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cqo0Vpvt.js +417 -0
  25. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cy4fgWTG.js +1 -0
  26. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D5w4xp5l.js +1 -0
  27. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DD63uD-T.js +1 -0
  28. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQ8aZ1o-.js +3 -0
  29. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{keKYsoph.js → DSxvnAMh.js} +1 -1
  30. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_JuJOO3.js +20 -0
  31. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_ynJAfY.js +2 -0
  32. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dafy4oEQ.js +1 -0
  33. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BfHVnyNT.js → Dj4O-5se.js} +1 -1
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmjAI-UV.js +1 -0
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dug7Bq1S.js +1 -0
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dv5BSBQG.js +1 -0
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DzBTnFhV.js +1 -0
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DzX_yyqb.js +1 -0
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Frwd2CjB.js +1 -0
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H4l0JFh9.js +1 -0
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H60ATh8g.js +2 -0
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{6t3IJ0vQ.js → qIv1kPyv.js} +1 -1
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/sLqs1uaK.js +20 -0
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/u-it74zV.js +96 -0
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BPc0HQPq.js +2 -0
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.SNvc2nrm.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.5jT7P06o.js +1 -0
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.Cdy-7S5q.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.C_uoESTX.js +1 -0
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.DcO8wIAc.js +1 -0
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{2.C8HLK8mj.js → 2.BIldfkxL.js} +268 -113
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.CLvg3QcJ.js → 3.BC9z_TWM.js} +1 -1
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.BQhDtXUI.js → 4.D8X_Ch5n.js} +1 -1
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.CAXhxJu6.js +39 -0
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{6.uBV1Lhat.js → 6.DRA5Ru_2.js} +1 -1
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.WVBsruHQ.js +1 -0
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BuKUrCEN.js +20 -0
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.CUIn1yCR.js +1 -0
  59. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  60. lightly_studio/dist_lightly_studio_view_app/index.html +15 -14
  61. lightly_studio/examples/example.py +4 -0
  62. lightly_studio/examples/example_coco.py +4 -0
  63. lightly_studio/examples/example_coco_caption.py +24 -0
  64. lightly_studio/examples/example_metadata.py +4 -1
  65. lightly_studio/examples/example_selection.py +4 -0
  66. lightly_studio/examples/example_split_work.py +4 -0
  67. lightly_studio/examples/example_yolo.py +4 -0
  68. lightly_studio/export/export_dataset.py +11 -3
  69. lightly_studio/metadata/compute_typicality.py +1 -1
  70. lightly_studio/models/caption.py +73 -0
  71. lightly_studio/models/dataset.py +1 -2
  72. lightly_studio/models/metadata.py +1 -1
  73. lightly_studio/models/sample.py +2 -2
  74. lightly_studio/resolvers/caption_resolver.py +80 -0
  75. lightly_studio/resolvers/dataset_resolver.py +4 -7
  76. lightly_studio/resolvers/metadata_resolver/__init__.py +2 -2
  77. lightly_studio/resolvers/metadata_resolver/sample/__init__.py +3 -3
  78. lightly_studio/resolvers/metadata_resolver/sample/bulk_update_metadata.py +46 -0
  79. lightly_studio/resolvers/samples_filter.py +18 -10
  80. lightly_studio/type_definitions.py +2 -0
  81. {lightly_studio-0.3.3.dist-info → lightly_studio-0.3.4.dist-info}/METADATA +86 -21
  82. {lightly_studio-0.3.3.dist-info → lightly_studio-0.3.4.dist-info}/RECORD +83 -77
  83. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.CA_CXIBb.css +0 -1
  84. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.DS78jgNY.css +0 -1
  85. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/index.BVs_sZj9.css +0 -1
  86. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.D487hwJk.css +0 -1
  87. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/8NsknIT2.js +0 -1
  88. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BND_-4Kp.js +0 -1
  89. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BjkP1AHA.js +0 -1
  90. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BuuNVL9G.js +0 -1
  91. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BzKGpnl4.js +0 -1
  92. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CCx7Ho51.js +0 -1
  93. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CH6P3X75.js +0 -1
  94. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CR2upx_Q.js +0 -4
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWPZrTTJ.js +0 -1
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CwPowJfP.js +0 -1
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CxFKfZ9T.js +0 -1
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cxevwdid.js +0 -1
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D4whDBUi.js +0 -1
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D6r9vr07.js +0 -1
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DA6bFLPR.js +0 -1
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DEgUu98i.js +0 -3
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DGTPl6Gk.js +0 -1
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DKGxBSlK.js +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQXoLcsF.js +0 -1
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQe_kdRt.js +0 -92
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DcY4jgG3.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H7C68rOM.js +0 -1
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/RmD8FzRo.js +0 -1
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/V-MnMC1X.js +0 -1
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BVr6DYqP.js +0 -2
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.u7zsVvqp.js +0 -1
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.Da2agmdd.js +0 -1
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.B11tVRJV.js +0 -1
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.l30Zud4h.js +0 -1
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.CgKPGcAP.js +0 -1
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.-6XqWX5G.js +0 -1
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.BXsgoQZh.js +0 -1
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BkbcnUs8.js +0 -1
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.Bkrv-Vww.js +0 -1
  121. lightly_studio/resolvers/metadata_resolver/sample/bulk_set_metadata.py +0 -48
  122. {lightly_studio-0.3.3.dist-info → lightly_studio-0.3.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,417 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D_JuJOO3.js","./CWj6FrbW.js","./Frwd2CjB.js","./DIeogL5L.js","./CiaNZCBa.js","./DzX_yyqb.js","./Dafy4oEQ.js","./-DXuGN29.js"])))=>i.map(i=>d[i]);
2
+ var IP=Object.defineProperty;var OP=Object.getPrototypeOf;var NP=Reflect.get;var Bm=e=>{throw TypeError(e)};var RP=(e,t,n)=>t in e?IP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t,n)=>RP(e,typeof t!="symbol"?t+"":t,n),uh=(e,t,n)=>t.has(e)||Bm("Cannot "+n);var _=(e,t,n)=>(uh(e,t,"read from private field"),n?n.call(e):t.get(e)),L=(e,t,n)=>t.has(e)?Bm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),me=(e,t,n,i)=>(uh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ct=(e,t,n)=>(uh(e,t,"access private method"),n);var Vm=(e,t,n)=>NP(OP(e),n,t);import"./CWj6FrbW.js";import"./69_IOA4Y.js";import{C as MP,b3 as LP,bg as FP,G as yn,H as Oh,aR as DP,F as g_,bh as zm,K as BP,L as VP,M as Nh,N as jc,U as Wm,ap as ch,an as Rh,W as Hm,x as p_,V as Dc,B as Um,A as Gm,ar as Km,d as zP,S as v_,P as m_,T as Bc,bi as WP,aL as HP,bj as UP,I as b_,bk as GP,Z as KP,O as qP,E as __,al as YP,bl as XP,bm as ZP,a4 as w_,h as fr,bn as QP,y as y_,aj as JP,n as St,bo as x_,Q as is,aM as bg,a5 as S_,bp as jP,aN as qm,m as dn,o as ys,ak as bt,be as Ym,g,Y as R,ao as os,p as ct,c as Q,s as vt,r as X,a as dt,f as D,b as I,aQ as $P,t as Ht,aa as Sn,u as we,w as Ge,au as fe,e as zd,bd as tk,aO as Xm,aP as ek,bq as nk,br as A_,q as Cc,$ as rk,ac as Zm}from"./Frwd2CjB.js";import{d as ik,e as Qm,f as ok,s as he,c as sk,m as ak,u as lk}from"./H60ATh8g.js";import{d as uk,b as Pu,a as A,c as K,f as J,t as Ce}from"./CiaNZCBa.js";import{i as _t,a as Gi,s as Be,b as Jm,m as jm}from"./-DXuGN29.js";import{j as $m,p as ck,q as dk,r as fk,g as Yr,a as Mt,e as Gn,i as ku,n as hk,d as Rn,t as $c,b as $n,o as Vc,k as go,s as Ve,u as _g,c as zi,v as gk,w as pk}from"./D_ynJAfY.js";import{o as Me,d as Ki,e as tb}from"./Dug7Bq1S.js";import{i as wg}from"./DzBTnFhV.js";import{p as mi}from"./DSxvnAMh.js";import{s as st,P as vk,c as cr}from"./DzX_yyqb.js";import{o as yg,g as zc}from"./DQ8aZ1o-.js";import{p as E,r as xt,s as Ot,b as jn,c as Tt}from"./Dafy4oEQ.js";import{a as mk,u as xs}from"./qIv1kPyv.js";import"./Bqz7dyEC.js";import{s as bk}from"./D5w4xp5l.js";import{r as Wc}from"./CfQ4mGwl.js";import{Q as _k,k as wk,u as Wd,l as yk,n as xk,m as Sk,o as Ak,h as xg,g as C_,p as Sg,q as Ck,c as Pk}from"./DD63uD-T.js";import{_ as eb}from"./C1FmrZbK.js";import{S as kk,s as Ek,x as nb,e as P_}from"./H4l0JFh9.js";import{u as Tk}from"./Cy4fgWTG.js";const Ik=[];function k_(e,t=!1,n=!1){return Hc(e,new Map,"",Ik,null,n)}function Hc(e,t,n,i,s=null,a=!1){if(typeof e=="object"&&e!==null){var l=t.get(e);if(l!==void 0)return l;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(MP(e)){var c=Array(e.length);t.set(e,c),s!==null&&t.set(s,c);for(var d=0;d<e.length;d+=1){var f=e[d];d in e&&(c[d]=Hc(f,t,n,i,null,a))}return c}if(LP(e)===FP){c={},t.set(e,c),s!==null&&t.set(s,c);for(var h in e)c[h]=Hc(e[h],t,n,i,null,a);return c}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!a)return Hc(e.toJSON(),t,n,i,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}const dh=0,Pc=1,fh=2;function rb(e,t,n,i,s){yn&&Oh();var a=e,l=DP(),c=zP,d=Wm,f,h,p,m=l?Rh(void 0):Hm(void 0,!1,!1),b=l?Rh(void 0):Hm(void 0,!1,!1),y=!1;function x(C,T){y=!0,T&&(Um(S),Gm(S),Km(c));try{C===Pc&&i&&(h?v_(h):h=m_(()=>i(a,m))),C!==dh&&f&&Bc(f,()=>f=null),C!==Pc&&h&&Bc(h,()=>h=null),C!==fh&&p&&Bc(p,()=>p=null)}finally{T&&(Km(null),Gm(null),Um(null),WP||HP())}}var S=g_(()=>{if(d===(d=t()))return;let C=yn&&zm(d)===(a.data===BP);if(C&&(a=VP(),Nh(a),jc(!1),C=!0),zm(d)){var T=d;y=!1,T.then(N=>{T===d&&(ch(m,N),x(Pc,!0))},N=>{if(T===d)throw ch(b,N),x(fh,!0),b.v}),yn||p_(()=>{y||x(dh,!0)})}else ch(m,d),x(Pc,!1);return C&&jc(!0),()=>d=Wm});yn&&(a=Dc)}function Ok(e,t,n,i,s,a){let l=yn;yn&&Oh();var c,d,f=null;yn&&Dc.nodeType===UP&&(f=Dc,Oh());var h=yn?Dc:e,p;g_(()=>{const m=t()||null;var b=GP;m!==c&&(p&&(m===null?Bc(p,()=>{p=null,d=null}):m===d?v_(p):(YP(p),Qm(!1))),m&&m!==d&&(p=m_(()=>{if(f=yn?f:document.createElementNS(b,m),uk(f,f),i){yn&&ik(m)&&f.append(document.createComment(""));var y=yn?KP(f):f.appendChild(qP());yn&&(y===null?jc(!1):Nh(y)),i(f,y)}__.nodes_end=f,h.before(f)})),c=m,c&&(d=c),Qm(!0))},b_),l&&(jc(!0),Nh(h))}const Nk=()=>performance.now(),Br={tick:e=>requestAnimationFrame(e),now:()=>Nk(),tasks:new Set};function E_(){const e=Br.now();Br.tasks.forEach(t=>{t.c(e)||(Br.tasks.delete(t),t.f())}),Br.tasks.size!==0&&Br.tick(E_)}function Rk(e){let t;return Br.tasks.size===0&&Br.tick(E_),{promise:new Promise(n=>{Br.tasks.add(t={c:e,f:n})}),abort(){Br.tasks.delete(t)}}}function kc(e,t){y_(()=>{e.dispatchEvent(new CustomEvent(t))})}function Mk(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 ib(e){const t={},n=e.split(";");for(const i of n){const[s,a]=i.split(":");if(!s||a===void 0)break;const l=Mk(s.trim());t[l]=a.trim()}return t}const Lk=e=>e;function T_(e,t,n,i){var s=(e&QP)!==0,a="both",l,c=t.inert,d=t.style.overflow,f,h;function p(){return y_(()=>l??(l=n()(t,(i==null?void 0:i())??{},{direction:a})))}var m={is_global:s,in(){t.inert=c,kc(t,"introstart"),f=Mh(t,p(),h,1,()=>{kc(t,"introend"),f==null||f.abort(),f=l=void 0,t.style.overflow=d})},out(S){t.inert=!0,kc(t,"outrostart"),h=Mh(t,p(),f,0,()=>{kc(t,"outroend"),S==null||S()})},stop:()=>{f==null||f.abort(),h==null||h.abort()}},b=__;if((b.transitions??(b.transitions=[])).push(m),ok){var y=s;if(!y){for(var x=b.parent;x&&x.f&b_;)for(;(x=x.parent)&&!(x.f&XP););y=!x||(x.f&ZP)!==0}y&&w_(()=>{fr(()=>m.in())})}}function Mh(e,t,n,i,s){var a=i===1;if(JP(t)){var l,c=!1;return p_(()=>{if(!c){var S=t({direction:a?"in":"out"});l=Mh(e,S,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:p=Lk}=t;var m=[];if(a&&n===void 0&&(h&&h(0,1),f)){var b=ib(f(0,1));m.push(b,b)}var y=()=>1-i,x=e.animate(m,{duration:d,fill:"forwards"});return x.onfinish=()=>{x.cancel();var S=(n==null?void 0:n.t())??1-i;n==null||n.abort();var C=i-S,T=t.duration*Math.abs(C),N=[];if(T>0){var B=!1;if(f)for(var W=Math.ceil(T/16.666666666666668),z=0;z<=W;z+=1){var M=S+C*p(z/W),q=ib(f(M,1-M));N.push(q),B||(B=q.overflow==="hidden")}B&&(e.style.overflow="hidden"),y=()=>{var $=x.currentTime;return S+C*p($/T)},h&&Rk(()=>{if(x.playState!=="running")return!1;var $=y();return h($,1-$),!0})}x=e.animate(N,{duration:T,fill:"forwards"}),x.onfinish=()=>{y=()=>i,h==null||h(i,1-i),s()}},{abort:()=>{x&&(x.cancel(),x.effect=null,x.onfinish=St)},deactivate:()=>{s=St},reset:()=>{i===0&&(h==null||h(1,0))},t:()=>y()}}function I_(e,t,n=t){var i=new WeakSet;x_(e,"input",async s=>{var a=s?e.defaultValue:e.value;if(a=hh(e)?gh(a):a,n(a),is!==null&&i.add(is),await bg(),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))}}),(yn&&e.defaultValue!==e.value||fr(t)==null&&e.value)&&(n(hh(e)?gh(e.value):e.value),is!==null&&i.add(is)),S_(()=>{var s=t();if(e===document.activeElement){var a=jP??is;if(i.has(a))return}hh(e)&&s===gh(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function hh(e){var t=e.type;return t==="number"||t==="range"}function gh(e){return e===""?null:+e}function a8(e,t,n=t){x_(e,"change",()=>{n(e.files)}),yn&&e.files&&n(e.files),S_(()=>{e.files=t()})}var di,wo,Os,gd,O_;const pd=class pd{constructor(t){L(this,gd);L(this,di,new WeakMap);L(this,wo);L(this,Os);me(this,Os,t)}observe(t,n){var i=_(this,di).get(t)||new Set;return i.add(n),_(this,di).set(t,i),Ct(this,gd,O_).call(this).observe(t,_(this,Os)),()=>{var s=_(this,di).get(t);s.delete(n),s.size===0&&(_(this,di).delete(t),_(this,wo).unobserve(t))}}};di=new WeakMap,wo=new WeakMap,Os=new WeakMap,gd=new WeakSet,O_=function(){return _(this,wo)??me(this,wo,new ResizeObserver(t=>{for(var n of t){pd.entries.set(n.target,n);for(var i of _(this,di).get(n.target)||[])i(n)}}))},Z(pd,"entries",new WeakMap);let Lh=pd;var Fk=new Lh({box:"border-box"});function ph(e,t,n){var i=Fk.observe(e,()=>n(e[t]));w_(()=>(fr(()=>n(e[t])),i))}var Dk=class extends _k{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:$m()},t)}getOptimisticResult(e){return e.behavior=$m(),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,x;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:a,isError:l,isRefetchError:c}=i,d=(x=(y=n.fetchMeta)==null?void 0:y.fetchMore)==null?void 0:x.direction,f=l&&d==="forward",h=s&&d==="forward",p=l&&d==="backward",m=s&&d==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:dk(t,n.data),hasPreviousPage:ck(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!f&&!p,isRefetching:a&&!h&&!m}}},fi,hi,wn,Rr,Hr,Uc,Fh,h_,Bk=(h_=class extends kk{constructor(n,i){super();L(this,Hr);L(this,fi);L(this,hi);L(this,wn);L(this,Rr);me(this,fi,n),this.setOptions(i),this.bindMethods(),Ct(this,Hr,Uc).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=_(this,fi).defaultMutationOptions(n),Ek(this.options,i)||_(this,fi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,wn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&nb(i.mutationKey)!==nb(this.options.mutationKey)?this.reset():((s=_(this,wn))==null?void 0:s.state.status)==="pending"&&_(this,wn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,wn))==null||n.removeObserver(this)}onMutationUpdate(n){Ct(this,Hr,Uc).call(this),Ct(this,Hr,Fh).call(this,n)}getCurrentResult(){return _(this,hi)}reset(){var n;(n=_(this,wn))==null||n.removeObserver(this),me(this,wn,void 0),Ct(this,Hr,Uc).call(this),Ct(this,Hr,Fh).call(this)}mutate(n,i){var s;return me(this,Rr,i),(s=_(this,wn))==null||s.removeObserver(this),me(this,wn,_(this,fi).getMutationCache().build(_(this,fi),this.options)),_(this,wn).addObserver(this),_(this,wn).execute(n)}},fi=new WeakMap,hi=new WeakMap,wn=new WeakMap,Rr=new WeakMap,Hr=new WeakSet,Uc=function(){var i;const n=((i=_(this,wn))==null?void 0:i.state)??fk();me(this,hi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Fh=function(n){P_.batch(()=>{var i,s,a,l,c,d,f,h;if(_(this,Rr)&&this.hasListeners()){const p=_(this,hi).variables,m=_(this,hi).context;(n==null?void 0:n.type)==="success"?((s=(i=_(this,Rr)).onSuccess)==null||s.call(i,n.data,p,m),(l=(a=_(this,Rr)).onSettled)==null||l.call(a,n.data,null,p,m)):(n==null?void 0:n.type)==="error"&&((d=(c=_(this,Rr)).onError)==null||d.call(c,n.error,p,m),(h=(f=_(this,Rr)).onSettled)==null||h.call(f,void 0,n.error,p,m))}this.listeners.forEach(p=>{p(_(this,hi))})})},h_);function Vk(e,t){return wk(e,Dk)}function zk(e,t){const n=Wd(),i=yk(e)?e:qm(e),s=new Bk(n,dn(i));let a;i.subscribe(d=>{a=(f,h)=>{s.mutate(f,h).catch(xk)},s.setOptions(d)});const l=qm(s.getCurrentResult(),d=>s.subscribe(P_.batchCalls(f=>d(f)))),{subscribe:c}=ys(l,d=>({...d,mutate:a,mutateAsync:d.mutate}));return{subscribe:c}}var lr,ur,Mr,vd,Jn,gs,Gc;const cp=class cp extends Map{constructor(n){super();L(this,Jn);L(this,lr,new Map);L(this,ur,bt(0));L(this,Mr,bt(0));L(this,vd,Ym||-1);if(n){for(var[i,s]of n)super.set(i,s);_(this,Mr).v=super.size}}has(n){var i=_(this,lr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=Ct(this,Jn,gs).call(this,0),i.set(n,s);else return g(_(this,ur)),!1}return g(s),!0}forEach(n,i){Ct(this,Jn,Gc).call(this),super.forEach(n,i)}get(n){var i=_(this,lr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=Ct(this,Jn,gs).call(this,0),i.set(n,s);else{g(_(this,ur));return}}return g(s),super.get(n)}set(n,i){var p;var s=_(this,lr),a=s.get(n),l=super.get(n),c=super.set(n,i),d=_(this,ur);if(a===void 0)a=Ct(this,Jn,gs).call(this,0),s.set(n,a),R(_(this,Mr),super.size),os(d);else if(l!==i){os(a);var f=d.reactions===null?null:new Set(d.reactions),h=f===null||!((p=a.reactions)!=null&&p.every(m=>f.has(m)));h&&os(d)}return c}delete(n){var i=_(this,lr),s=i.get(n),a=super.delete(n);return s!==void 0&&(i.delete(n),R(_(this,Mr),super.size),R(s,-1),os(_(this,ur))),a}clear(){if(super.size!==0){super.clear();var n=_(this,lr);R(_(this,Mr),0);for(var i of n.values())R(i,-1);os(_(this,ur)),n.clear()}}keys(){return g(_(this,ur)),super.keys()}values(){return Ct(this,Jn,Gc).call(this),super.values()}entries(){return Ct(this,Jn,Gc).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return g(_(this,Mr)),super.size}};lr=new WeakMap,ur=new WeakMap,Mr=new WeakMap,vd=new WeakMap,Jn=new WeakSet,gs=function(n){return Ym===_(this,vd)?bt(n):Rh(n)},Gc=function(){g(_(this,ur));var n=_(this,lr);if(_(this,Mr).v!==n.size){for(var i of Vm(cp.prototype,this,"keys").call(this))if(!n.has(i)){var s=Ct(this,Jn,gs).call(this,0);n.set(i,s)}}for([,s]of _(this,lr))g(s)};let Dh=cp;/**
3
+ * @license @lucide/svelte v0.482.0 - ISC
4
+ *
5
+ * ISC License
6
+ *
7
+ * 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.
8
+ *
9
+ * Permission to use, copy, modify, and/or distribute this software for any
10
+ * purpose with or without fee is hereby granted, provided that the above
11
+ * copyright notice and this permission notice appear in all copies.
12
+ *
13
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
+ *
21
+ */const Wk={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 Hk=Pu("<svg><!><!></svg>");function tn(e,t){ct(t,!0);const n=E(t,"color",3,"currentColor"),i=E(t,"size",3,24),s=E(t,"strokeWidth",3,2),a=E(t,"absoluteStrokeWidth",3,!1),l=E(t,"iconNode",19,()=>[]),c=xt(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),d=Yr(),[f,h]=d;var p=Hk();Mt(p,y=>({...Wk,...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()]);var m=Q(p);Gn(m,17,l,ku,(y,x)=>{var S=I(()=>$P(g(x),2));let C=()=>g(S)[0],T=()=>g(S)[1];var N=K(),B=D(N);Ok(B,C,!0,(W,z)=>{Mt(W,M=>({...M}),[()=>`${C()}`=="button"?h({...T()},[{attribute_name:"formaction"}]):`${C()}`=="form"?h({...T()},[{attribute_name:"action"}]):`${C()}`=="a"?h({...T()},[{attribute_name:"href",lang_attribute_name:"hreflang"}]):{...T()}])}),A(y,N)});var b=vt(m);st(b,()=>t.children??St),X(p),A(e,p),dt()}function Ag(e,t){ct(t,!0);/**
22
+ * @license @lucide/svelte v0.482.0 - ISC
23
+ *
24
+ * ISC License
25
+ *
26
+ * 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.
27
+ *
28
+ * Permission to use, copy, modify, and/or distribute this software for any
29
+ * purpose with or without fee is hereby granted, provided that the above
30
+ * copyright notice and this permission notice appear in all copies.
31
+ *
32
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
33
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
34
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
35
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
37
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
38
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
39
+ *
40
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M20 6 9 17l-5-5"}]];tn(e,Ot({name:"check"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Cg(e,t){ct(t,!0);/**
41
+ * @license @lucide/svelte v0.482.0 - ISC
42
+ *
43
+ * ISC License
44
+ *
45
+ * 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.
46
+ *
47
+ * Permission to use, copy, modify, and/or distribute this software for any
48
+ * purpose with or without fee is hereby granted, provided that the above
49
+ * copyright notice and this permission notice appear in all copies.
50
+ *
51
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
52
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
53
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
54
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
55
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
56
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
57
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58
+ *
59
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m6 9 6 6 6-6"}]];tn(e,Ot({name:"chevron-down"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Uk(e,t){ct(t,!0);/**
60
+ * @license @lucide/svelte v0.482.0 - ISC
61
+ *
62
+ * ISC License
63
+ *
64
+ * 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.
65
+ *
66
+ * Permission to use, copy, modify, and/or distribute this software for any
67
+ * purpose with or without fee is hereby granted, provided that the above
68
+ * copyright notice and this permission notice appear in all copies.
69
+ *
70
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
71
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
72
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
73
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
74
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
75
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
76
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
77
+ *
78
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m18 15-6-6-6 6"}]];tn(e,Ot({name:"chevron-up"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Gk(e,t){ct(t,!0);/**
79
+ * @license @lucide/svelte v0.482.0 - ISC
80
+ *
81
+ * ISC License
82
+ *
83
+ * 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.
84
+ *
85
+ * Permission to use, copy, modify, and/or distribute this software for any
86
+ * purpose with or without fee is hereby granted, provided that the above
87
+ * copyright notice and this permission notice appear in all copies.
88
+ *
89
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
90
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
91
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
92
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
93
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
94
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
95
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
96
+ *
97
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];tn(e,Ot({name:"chevrons-up-down"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Kk(e,t){ct(t,!0);/**
98
+ * @license @lucide/svelte v0.482.0 - ISC
99
+ *
100
+ * ISC License
101
+ *
102
+ * 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.
103
+ *
104
+ * Permission to use, copy, modify, and/or distribute this software for any
105
+ * purpose with or without fee is hereby granted, provided that the above
106
+ * copyright notice and this permission notice appear in all copies.
107
+ *
108
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
109
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
110
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
111
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
112
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
113
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
114
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
115
+ *
116
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];tn(e,Ot({name:"download"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function qk(e,t){ct(t,!0);/**
117
+ * @license @lucide/svelte v0.482.0 - ISC
118
+ *
119
+ * ISC License
120
+ *
121
+ * 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.
122
+ *
123
+ * Permission to use, copy, modify, and/or distribute this software for any
124
+ * purpose with or without fee is hereby granted, provided that the above
125
+ * copyright notice and this permission notice appear in all copies.
126
+ *
127
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
128
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
129
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
130
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
131
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
132
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
133
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
134
+ *
135
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];tn(e,Ot({name:"eye-off"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Yk(e,t){ct(t,!0);/**
136
+ * @license @lucide/svelte v0.482.0 - ISC
137
+ *
138
+ * ISC License
139
+ *
140
+ * 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.
141
+ *
142
+ * Permission to use, copy, modify, and/or distribute this software for any
143
+ * purpose with or without fee is hereby granted, provided that the above
144
+ * copyright notice and this permission notice appear in all copies.
145
+ *
146
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
147
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
148
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
149
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
150
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
151
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
152
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
153
+ *
154
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];tn(e,Ot({name:"eye"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Xk(e,t){ct(t,!0);/**
155
+ * @license @lucide/svelte v0.482.0 - ISC
156
+ *
157
+ * ISC License
158
+ *
159
+ * 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.
160
+ *
161
+ * Permission to use, copy, modify, and/or distribute this software for any
162
+ * purpose with or without fee is hereby granted, provided that the above
163
+ * copyright notice and this permission notice appear in all copies.
164
+ *
165
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
166
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
167
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
168
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
169
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
170
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
171
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
172
+ *
173
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];tn(e,Ot({name:"loader-circle"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Zk(e,t){ct(t,!0);/**
174
+ * @license @lucide/svelte v0.482.0 - ISC
175
+ *
176
+ * ISC License
177
+ *
178
+ * 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.
179
+ *
180
+ * Permission to use, copy, modify, and/or distribute this software for any
181
+ * purpose with or without fee is hereby granted, provided that the above
182
+ * copyright notice and this permission notice appear in all copies.
183
+ *
184
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
185
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
186
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
187
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
188
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
189
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
190
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
191
+ *
192
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];tn(e,Ot({name:"network"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Qk(e,t){ct(t,!0);/**
193
+ * @license @lucide/svelte v0.482.0 - ISC
194
+ *
195
+ * ISC License
196
+ *
197
+ * 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.
198
+ *
199
+ * Permission to use, copy, modify, and/or distribute this software for any
200
+ * purpose with or without fee is hereby granted, provided that the above
201
+ * copyright notice and this permission notice appear in all copies.
202
+ *
203
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
204
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
205
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
206
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
207
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
208
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
209
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
210
+ *
211
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];tn(e,Ot({name:"pencil"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Jk(e,t){ct(t,!0);/**
212
+ * @license @lucide/svelte v0.482.0 - ISC
213
+ *
214
+ * ISC License
215
+ *
216
+ * 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.
217
+ *
218
+ * Permission to use, copy, modify, and/or distribute this software for any
219
+ * purpose with or without fee is hereby granted, provided that the above
220
+ * copyright notice and this permission notice appear in all copies.
221
+ *
222
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
223
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
224
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
225
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
226
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
227
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
228
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
229
+ *
230
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];tn(e,Ot({name:"plus"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function jk(e,t){ct(t,!0);/**
231
+ * @license @lucide/svelte v0.482.0 - ISC
232
+ *
233
+ * ISC License
234
+ *
235
+ * 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.
236
+ *
237
+ * Permission to use, copy, modify, and/or distribute this software for any
238
+ * purpose with or without fee is hereby granted, provided that the above
239
+ * copyright notice and this permission notice appear in all copies.
240
+ *
241
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
242
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
243
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
244
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
245
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
246
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
247
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
248
+ *
249
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];tn(e,Ot({name:"search"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function $k(e,t){ct(t,!0);/**
250
+ * @license @lucide/svelte v0.482.0 - ISC
251
+ *
252
+ * ISC License
253
+ *
254
+ * 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.
255
+ *
256
+ * Permission to use, copy, modify, and/or distribute this software for any
257
+ * purpose with or without fee is hereby granted, provided that the above
258
+ * copyright notice and this permission notice appear in all copies.
259
+ *
260
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
261
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
262
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
263
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
264
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
265
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
266
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
267
+ *
268
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];tn(e,Ot({name:"settings"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function tE(e,t){ct(t,!0);/**
269
+ * @license @lucide/svelte v0.482.0 - ISC
270
+ *
271
+ * ISC License
272
+ *
273
+ * 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.
274
+ *
275
+ * Permission to use, copy, modify, and/or distribute this software for any
276
+ * purpose with or without fee is hereby granted, provided that the above
277
+ * copyright notice and this permission notice appear in all copies.
278
+ *
279
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
280
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
281
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
282
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
283
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
284
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
285
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
286
+ *
287
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor"}]];tn(e,Ot({name:"tags"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function eE(e,t){ct(t,!0);/**
288
+ * @license @lucide/svelte v0.482.0 - ISC
289
+ *
290
+ * ISC License
291
+ *
292
+ * 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.
293
+ *
294
+ * Permission to use, copy, modify, and/or distribute this software for any
295
+ * purpose with or without fee is hereby granted, provided that the above
296
+ * copyright notice and this permission notice appear in all copies.
297
+ *
298
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
299
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
300
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
301
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
302
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
303
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
304
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
305
+ *
306
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];tn(e,Ot({name:"trash-2"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function nE(e,t){ct(t,!0);/**
307
+ * @license @lucide/svelte v0.482.0 - ISC
308
+ *
309
+ * ISC License
310
+ *
311
+ * 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.
312
+ *
313
+ * Permission to use, copy, modify, and/or distribute this software for any
314
+ * purpose with or without fee is hereby granted, provided that the above
315
+ * copyright notice and this permission notice appear in all copies.
316
+ *
317
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
318
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
319
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
320
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
321
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
322
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
323
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
324
+ *
325
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];tn(e,Ot({name:"upload"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}function Pg(e,t){ct(t,!0);/**
326
+ * @license @lucide/svelte v0.482.0 - ISC
327
+ *
328
+ * ISC License
329
+ *
330
+ * 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.
331
+ *
332
+ * Permission to use, copy, modify, and/or distribute this software for any
333
+ * purpose with or without fee is hereby granted, provided that the above
334
+ * copyright notice and this permission notice appear in all copies.
335
+ *
336
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
337
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
338
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
339
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
340
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
341
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
342
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
343
+ *
344
+ */let n=xt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];tn(e,Ot({name:"x"},()=>n,{get iconNode(){return i},children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}})),dt()}/**
345
+ * @license @lucide/svelte v0.482.0 - ISC
346
+ *
347
+ * ISC License
348
+ *
349
+ * 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.
350
+ *
351
+ * Permission to use, copy, modify, and/or distribute this software for any
352
+ * purpose with or without fee is hereby granted, provided that the above
353
+ * copyright notice and this permission notice appear in all copies.
354
+ *
355
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
356
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
357
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
358
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
359
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
360
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
361
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
362
+ *
363
+ */const rE=Object.freeze(Object.defineProperty({__proto__:null,default:Ag},Symbol.toStringTag,{value:"Module"}));var iE=J('<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 oE(e,t){var n=iE(),i=Q(n),s=Q(i,!0);X(i);var a=vt(i,2),l=Q(a);st(l,()=>t.children),X(a),X(n),Ht(()=>he(s,t.title)),A(e,n)}function sE(e=100){let t;return n=>{clearTimeout(t),t=setTimeout(n,e)}}function aE(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 Bh={ceil:(e,t)=>Math.ceil(e/t)*t,floor:(e,t)=>~~(e/t)*t},lE=(e,t,n,i,s,a)=>{const l=[],c=Bh.floor(a/t*i,i),d=c>s?c-s:0,f=c>0&&d>=0?d:c,p=Math.min(e,Bh.ceil((a+n)/t*i,i))+s,m=p<e?p:e;for(let b=f;b<m;b++)l.push(b);return l},ob=(e,t)=>~~(e/t),uE=sE(),cE=aE();var dE=J("<div><!></div>"),fE=J("<div><!> <div></div> <!></div>");function hE(e,t){ct(t,!0);let n=E(t,"width",3,"100%"),i=E(t,"overScan",3,1),s=E(t,"marginLeft",3,0),a=E(t,"marginTop",3,0),l=E(t,"scrollPosition",15,0),c=E(t,"scrollBehavior",3,"auto"),d=E(t,"getKey",3,tt=>tt),f=xt(t,["$$slots","$$events","$$legacy","itemCount","itemHeight","itemWidth","height","width","overScan","marginLeft","marginTop","scrollPosition","scrollBehavior","getKey","columnCount","onscroll","header","item","placeholder","footer"]),h=bt(void 0),p=bt(Sn(l())),m=bt(0),b=bt(0),y=bt(0),x=bt(Sn([])),S=!1,C=!1,T=bt(!1);function N(tt,et=c()){W(ob(tt,g($))*t.itemHeight+a()+g(m),et)}function B(tt,et=c()){W(tt,et)}const W=(tt,et=c())=>{g(h)&&(S=!0,g(h).scrollTo({top:tt,behavior:et}),S=!1)},z=tt=>{g(h)&&!S&&!C&&(S=!0,g(h).scrollTo({top:tt,behavior:c()}),S=!1)},M=tt=>{const et=ob(tt,g($)),yt=tt%g($);return{rowIndex:et,columnIndex:yt,style:`position: absolute; transform: translate3d(${yt*t.itemWidth+s()}px, ${et*t.itemHeight+a()}px, 0px); height: ${t.itemHeight}px; width: ${t.itemWidth}px; will-change: transform;`}},q=tt=>{C=!0,S||(R(p,Math.max(0,tt.currentTarget.scrollTop-g(m)),!0),l(tt.currentTarget.scrollTop),g(H)(g(p))),uE(()=>{C=!1})};let $=I(()=>t.columnCount?t.columnCount:Math.max(~~((g(b)-s()-(g(b)-g(y)))/t.itemWidth),1)),rt=I(()=>Bh.ceil(t.itemCount,g($))*t.itemHeight/g($)),ht=I(()=>g($)*i());we(()=>{(g(b)||g($))&&R(x,lE(t.itemCount,t.itemHeight,t.height,g($),g(ht),g(p)),!0)}),we(()=>{g(h)&&z(l())});let H=I(()=>cE(t.height,{fast:()=>{R(T,!0)},slow:()=>{R(T,!1)}}));var it={scrollToIndex:N,scrollToPosition:B},Y=fE(),nt=tt=>{var et;q(tt),(et=t.onscroll)==null||et.call(t,tt)};Mt(Y,tt=>({onscroll:nt,...f,[hk]:tt}),[()=>({position:"relative",overflow:"auto",height:`${t.height??""}px`,width:n()})]);var ot=Q(Y);{var lt=tt=>{var et=dE(),yt=Q(et);st(yt,()=>t.header),X(et),ph(et,"offsetHeight",Et=>R(m,Et)),A(tt,et)};_t(ot,tt=>{t.header&&tt(lt)})}var ut=vt(ot,2);let pt;Gn(ut,21,()=>g(x),tt=>d()(tt),(tt,et)=>{const yt=I(()=>{const{rowIndex:Bt,columnIndex:Pt,style:Nt}=M(g(et));return{rowIndex:Bt,columnIndex:Pt,style:Nt}});var Et=K(),Dt=D(Et);{var Kt=Bt=>{var Pt=K(),Nt=D(Pt);st(Nt,()=>t.item,()=>({index:g(et),rowIndex:g(yt).rowIndex,columnIndex:g(yt).columnIndex,style:g(yt).style})),A(Bt,Pt)},ye=Bt=>{var Pt=K(),Nt=D(Pt);st(Nt,()=>t.placeholder,()=>({index:g(et),rowIndex:g(yt).rowIndex,columnIndex:g(yt).columnIndex,style:g(yt).style})),A(Bt,Pt)};_t(Dt,Bt=>{!g(T)||!t.placeholder?Bt(Kt):Bt(ye,!1)})}A(tt,Et)}),X(ut);var wt=vt(ut,2);return st(wt,()=>t.footer??St),X(Y),jn(Y,tt=>R(h,tt),()=>g(h)),Ht(tt=>pt=Rn(ut,"",pt,tt),[()=>({height:`${g(rt)??""}px`,width:"100%"})]),ph(Y,"offsetWidth",tt=>R(b,tt)),ph(Y,"clientWidth",tt=>R(y,tt)),A(e,Y),dt(it)}const N_=({datasetId:e})=>{const t=zk(Sk());return t.subscribe(()=>{}),{updateAnnotations:i=>new Promise((s,a)=>{dn(t).mutate({path:{dataset_id:e},body:i},{onSuccess:()=>{s()},onError:l=>{a(l)}})})}},gE=(...e)=>{const t=Ak(...e),n=Ge(!1),i=Vk({...t,getNextPageParam:d=>d.nextCursor||void 0}),s=Wd(),a=()=>{s.invalidateQueries({queryKey:t.queryKey}),s.invalidateQueries({queryKey:xg({path:{dataset_id:l}}).queryKey})},l=e[0].path.dataset_id,{updateAnnotations:c}=N_({datasetId:l});return{annotations:i,refresh:a,isPending:n,updateAnnotations:async d=>{try{n.set(!0),await c(d),a(),$c.success("Annotations updated successfully")}catch(f){$c.error("Failed to update annotations:"+f.message)}finally{n.set(!1)}}}};var pE=J('<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 vE(e,t){const n=E(t,"size",3,"medium"),i=E(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=pE(),c=Q(l);fe(2),X(l),Ht(()=>$n(c,0,s[n()]+" "+a[i()]+" spinner inline animate-spin text-gray-200 dark:text-gray-600","svelte-uqfq9v")),A(e,l)}function mE(e){return typeof e=="function"}function bE(e){return e!==null&&typeof e=="object"}const _E=["string","number","bigint","boolean"];function Vh(e){return e==null||_E.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Vh(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Ss=Symbol("box"),kg=Symbol("is-writable");function wE(e){return bE(e)&&Ss in e}function yE(e){return F.isBox(e)&&kg in e}function F(e){let t=bt(Sn(e));return{[Ss]:!0,[kg]:!0,get current(){return g(t)},set current(n){R(t,n,!0)}}}function xE(e,t){const n=I(e);return t?{[Ss]:!0,[kg]:!0,get current(){return g(n)},set current(i){t(i)}}:{[Ss]:!0,get current(){return e()}}}function SE(e){return F.isBox(e)?e:mE(e)?F.with(e):F(e)}function AE(e){return Object.entries(e).reduce((t,[n,i])=>F.isBox(i)?(F.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 CE(e){return F.isWritableBox(e)?{[Ss]:!0,get current(){return e.current}}:e}F.from=SE;F.with=xE;F.flatten=AE;F.readonly=CE;F.isBox=wE;F.isWritableBox=yE;function R_(...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 dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L_={},sb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,PE=/\n/g,kE=/^\s*/,EE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,TE=/^:\s*/,IE=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,OE=/^[;\s]*/,NE=/^\s+|\s+$/g,RE=`
364
+ `,ab="/",lb="*",Ni="",ME="comment",LE="declaration",FE=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(y){var x=y.match(PE);x&&(n+=x.length);var S=y.lastIndexOf(RE);i=~S?y.length-S:i+y.length}function a(){var y={line:n,column:i};return function(x){return x.position=new l(y),f(),x}}function l(y){this.start=y,this.end={line:n,column:i},this.source=t.source}l.prototype.content=e;function c(y){var x=new Error(t.source+":"+n+":"+i+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=i,x.source=e,!t.silent)throw x}function d(y){var x=y.exec(e);if(x){var S=x[0];return s(S),e=e.slice(S.length),x}}function f(){d(kE)}function h(y){var x;for(y=y||[];x=p();)x!==!1&&y.push(x);return y}function p(){var y=a();if(!(ab!=e.charAt(0)||lb!=e.charAt(1))){for(var x=2;Ni!=e.charAt(x)&&(lb!=e.charAt(x)||ab!=e.charAt(x+1));)++x;if(x+=2,Ni===e.charAt(x-1))return c("End of comment missing");var S=e.slice(2,x-2);return i+=2,s(S),e=e.slice(x),i+=2,y({type:ME,comment:S})}}function m(){var y=a(),x=d(EE);if(x){if(p(),!d(TE))return c("property missing ':'");var S=d(IE),C=y({type:LE,property:ub(x[0].replace(sb,Ni)),value:S?ub(S[0].replace(sb,Ni)):Ni});return d(OE),C}}function b(){var y=[];h(y);for(var x;x=m();)x!==!1&&(y.push(x),h(y));return y}return f(),b()};function ub(e){return e?e.replace(NE,Ni):Ni}var DE=dr&&dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L_,"__esModule",{value:!0});var cb=L_.default=VE,BE=DE(FE);function VE(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,BE.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 zE=cb.default||cb,WE=/\d/,HE=["-","_","/","."];function UE(e=""){if(!WE.test(e))return e!==e.toLowerCase()}function GE(e){const t=[];let n="",i,s;for(const a of e){const l=HE.includes(a);if(l===!0){t.push(n),n="",i=void 0;continue}const c=UE(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 F_(e){return e?GE(e).map(t=>qE(t)).join(""):""}function KE(e){return YE(F_(e||""))}function qE(e){return e?e[0].toUpperCase()+e.slice(1):""}function YE(e){return e?e[0].toLowerCase()+e.slice(1):""}function ps(e){if(!e)return{};const t={};function n(i,s){if(i.startsWith("-moz-")||i.startsWith("-webkit-")||i.startsWith("-ms-")||i.startsWith("-o-")){t[F_(i)]=s;return}if(i.startsWith("--")){t[i]=s;return}t[KE(i)]=s}return zE(e,n),t}function zr(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function XE(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 ZE=XE(/[A-Z]/,e=>`-${e.toLowerCase()}`);function QE(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=>`${ZE(t)}: ${e[t]};`).join(`
365
+ `)}function Eg(e={}){return QE(e).replace(`
366
+ `," ")}const D_={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%)"},JE=Eg(D_);function jE(e){var t;return e.length>2&&e.startsWith("on")&&e[2]===((t=e[2])==null?void 0:t.toLowerCase())}function Vt(...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&&jE(s)){const f=a,h=l;t[s]=R_(f,h)}else if(c&&d)t[s]=zr(a,l);else if(s==="class"){const f=Vh(a),h=Vh(l);f&&h?t[s]=Vc(a,l):f?t[s]=Vc(a):h&&(t[s]=Vc(l))}else if(s==="style"){const f=typeof a=="object",h=typeof l=="object",p=typeof a=="string",m=typeof l=="string";if(f&&h)t[s]={...a,...l};else if(f&&m){const b=ps(l);t[s]={...a,...b}}else if(p&&h){const b=ps(a);t[s]={...b,...l}}else if(p&&m){const b=ps(a),y=ps(l);t[s]={...b,...y}}else f?t[s]=a:h?t[s]=l:p?t[s]=a:m&&(t[s]=l)}else t[s]=l!==void 0?l:a}}return typeof t.style=="object"&&(t.style=Eg(t.style).replaceAll(`
367
+ `," ")),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}const B_=typeof window<"u"?window:void 0;function $E(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var yo,Ns;class tT{constructor(t={}){L(this,yo);L(this,Ns);const{window:n=B_,document:i=n==null?void 0:n.document}=t;n!==void 0&&(me(this,yo,i),me(this,Ns,sk(s=>{const a=Me(n,"focusin",s),l=Me(n,"focusout",s);return()=>{a(),l()}})))}get current(){var t;return(t=_(this,Ns))==null||t.call(this),_(this,yo)?$E(_(this,yo)):null}}yo=new WeakMap,Ns=new WeakMap;new tT;function eT(e){return typeof e=="function"}function nT(e,t){switch(e){case"post":we(t);break;case"pre":zd(t);break}}function V_(e,t,n,i={}){const{lazy:s=!1}=i;let a=!s,l=Array.isArray(e)?[]:void 0;nT(t,()=>{const c=Array.isArray(e)?e.map(f=>f()):e();if(!a){a=!0,l=c;return}const d=fr(()=>n(c,l));return l=c,d})}function ae(e,t,n){V_(e,"post",t,n)}function rT(e,t,n){V_(e,"pre",t,n)}ae.pre=rT;function iT(e){return eT(e)?e():e}var Lr;class oT{constructor(t,n={box:"border-box"}){L(this,Lr,bt(Sn({width:0,height:0})));var s,a;const i=n.window??B_;R(_(this,Lr),{width:((s=n.initialSize)==null?void 0:s.width)??0,height:((a=n.initialSize)==null?void 0:a.height)??0},!0),we(()=>{if(!i)return;const l=iT(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,p=Array.isArray(h)?h:[h];g(_(this,Lr)).width=p.reduce((m,b)=>Math.max(m,b.inlineSize),0),g(_(this,Lr)).height=p.reduce((m,b)=>Math.max(m,b.blockSize),0)}});return c.observe(l),()=>{c.disconnect()}})}get current(){return g(_(this,Lr))}get width(){return g(_(this,Lr)).width}get height(){return g(_(this,Lr)).height}}Lr=new WeakMap;var Rs,Ms;class z_{constructor(t){L(this,Rs,bt(void 0));L(this,Ms);we(()=>{R(_(this,Rs),_(this,Ms),!0),me(this,Ms,t())})}get current(){return g(_(this,Rs))}}Rs=new WeakMap,Ms=new WeakMap;var Ls,Fr;class on{constructor(t){L(this,Ls);L(this,Fr);me(this,Ls,t),me(this,Fr,Symbol(t))}get key(){return _(this,Fr)}exists(){return tk(_(this,Fr))}get(){const t=Xm(_(this,Fr));if(t===void 0)throw new Error(`Context "${_(this,Ls)}" not found`);return t}getOr(t){const n=Xm(_(this,Fr));return n===void 0?t:n}set(t){return ek(_(this,Fr),t)}}Ls=new WeakMap,Fr=new WeakMap;function Tg(e){we(()=>()=>{e()})}function jt({id:e,ref:t,deps:n=()=>!0,onRefChange:i,getRootNode:s}){ae([()=>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)}),Tg(()=>{t.current=null,i==null||i(null)})}function Eu(e,t){return setTimeout(t,e)}function On(e){bg().then(e)}function Ig(e){we(()=>fr(()=>e()))}function yi(e){return e?"open":"closed"}function sT(e){return e?"checked":"unchecked"}function Og(e){return e?"true":"false"}function Tu(e){return e?"true":"false"}function Kn(e){return e?"":void 0}function W_(e){return e?"true":"false"}function aT(e){return e?"true":"false"}function H_(e,t){return t?"mixed":e?"true":"false"}function u8(e){return e}function lT(e){return e?"true":void 0}function c8(e){return e}function uT(e){return e?"":void 0}function cT(e){return e?"":void 0}function d8(e){return e?!0:void 0}function U_(e){return e?!0:void 0}function dT(e){return e?!0:void 0}const vi="ArrowDown",G_="ArrowLeft",K_="ArrowRight",Vr="ArrowUp",Iu="End",Ur="Enter",fT="Escape",Ou="Home",q_="PageDown",Y_="PageUp",Wr=" ",zh="Tab",hT="p",gT="n",pT="j",vT="k",Ng=typeof document<"u",Wh=mT();function mT(){var e,t;return Ng&&((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 Hh(e){return e instanceof HTMLElement}function X_(e){return e instanceof Element}function Z_(e){return e instanceof Element||e instanceof SVGElement}function bT(e){return e!==null}function _T(e){return e instanceof HTMLInputElement&&"select"in e}function wT(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 $t(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function ie(){}function yT(e,t){const n=F(e);function i(a){return t[n.current][a]??n.current}return{state:n,dispatch:a=>{n.current=i(a)}}}function xT(e,t){let n=bt(Sn({})),i=bt("none");const s=e.current?"mounted":"unmounted";let a=bt(null);const l=new z_(()=>e.current);ae([()=>t.current,()=>e.current],([m,b])=>{!m||!b||On(()=>{R(a,document.getElementById(m),!0)})});const{state:c,dispatch:d}=yT(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ae(()=>e.current,m=>{if(g(a)||R(a,document.getElementById(t.current),!0),!g(a)||!(m!==l.current))return;const y=g(i),x=Ec(g(a));m?d("MOUNT"):x==="none"||g(n).display==="none"?d("UNMOUNT"):d(l&&y!==x?"ANIMATION_OUT":"UNMOUNT")});function f(m){if(g(a)||R(a,document.getElementById(t.current),!0),!g(a))return;const b=Ec(g(a)),y=b.includes(m.animationName)||b==="none";m.target===g(a)&&y&&d("ANIMATION_END")}function h(m){g(a)||R(a,document.getElementById(t.current),!0),g(a)&&m.target===g(a)&&R(i,Ec(g(a)),!0)}ae(()=>c.current,()=>{if(g(a)||R(a,document.getElementById(t.current),!0),!g(a))return;const m=Ec(g(a));R(i,c.current==="mounted"?m:"none",!0)}),ae(()=>g(a),m=>{if(m)return R(n,getComputedStyle(m),!0),zr(Me(m,"animationstart",h),Me(m,"animationcancel",f),Me(m,"animationend",f))});const p=I(()=>["mounted","unmountSuspended"].includes(c.current));return{get current(){return g(p)}}}function Ec(e){return e&&getComputedStyle(e).animationName||"none"}function Hd(e,t){ct(t,!0);const n=xT(F.with(()=>t.present),F.with(()=>t.id));var i=K(),s=D(i);{var a=l=>{var c=K(),d=D(c);st(d,()=>t.presence??St,()=>({present:n})),A(l,c)};_t(s,l=>{(t.forceMount||t.present||n.current)&&l(a)})}A(e,i),dt()}function ST(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 Fs,Ds,Bs,Vs,zs,Ws,Hs,Us,Gs,Ks;class AT{constructor(t){Z(this,"opts");L(this,Fs,bt(null));L(this,Ds,bt(null));L(this,Bs,bt(null));L(this,Vs,bt(void 0));L(this,zs,bt(void 0));L(this,Ws,bt(void 0));L(this,Hs,bt(void 0));L(this,Us,bt(null));L(this,Gs,I(()=>ST(this.opts.variant.current)));L(this,Ks,I(()=>({"data-state":yi(this.opts.open.current)})));this.opts=t,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return g(_(this,Fs))}set triggerNode(t){R(_(this,Fs),t,!0)}get contentNode(){return g(_(this,Ds))}set contentNode(t){R(_(this,Ds),t,!0)}get descriptionNode(){return g(_(this,Bs))}set descriptionNode(t){R(_(this,Bs),t,!0)}get contentId(){return g(_(this,Vs))}set contentId(t){R(_(this,Vs),t,!0)}get titleId(){return g(_(this,zs))}set titleId(t){R(_(this,zs),t,!0)}get triggerId(){return g(_(this,Ws))}set triggerId(t){R(_(this,Ws),t,!0)}get descriptionId(){return g(_(this,Hs))}set descriptionId(t){R(_(this,Hs),t,!0)}get cancelNode(){return g(_(this,Us))}set cancelNode(t){R(_(this,Us),t,!0)}get attrs(){return g(_(this,Gs))}set attrs(t){R(_(this,Gs),t)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return g(_(this,Ks))}set sharedProps(t){R(_(this,Ks),t)}}Fs=new WeakMap,Ds=new WeakMap,Bs=new WeakMap,Vs=new WeakMap,zs=new WeakMap,Ws=new WeakMap,Hs=new WeakMap,Us=new WeakMap,Gs=new WeakMap,Ks=new WeakMap;var qs;class CT{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,qs,I(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tu(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,jt({...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===Wr||t.key===Ur)&&(t.preventDefault(),this.root.handleOpen())}get props(){return g(_(this,qs))}set props(t){R(_(this,qs),t)}}qs=new WeakMap;var md,Ys;class PT{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,md,I(()=>this.root.attrs[this.opts.variant.current]));L(this,Ys,I(()=>({id:this.opts.id.current,[g(_(this,md))]:"",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),jt({...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===Wr||t.key===Ur)&&(t.preventDefault(),this.root.handleClose())}get props(){return g(_(this,Ys))}set props(t){R(_(this,Ys),t)}}md=new WeakMap,Ys=new WeakMap;var Xs;class kT{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Xs,I(()=>({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,jt({...t,onRefChange:i=>{this.root.titleId=i==null?void 0:i.id},deps:()=>this.root.opts.open.current})}get props(){return g(_(this,Xs))}set props(t){R(_(this,Xs),t)}}Xs=new WeakMap;var Zs;class ET{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Zs,I(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=t,this.root=n,jt({...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 g(_(this,Zs))}set props(t){R(_(this,Zs),t)}}Zs=new WeakMap;var Qs,Js;class TT{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Qs,I(()=>({open:this.root.opts.open.current})));L(this,Js,I(()=>({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,jt({...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 g(_(this,Qs))}set snippetProps(t){R(_(this,Qs),t)}get props(){return g(_(this,Js))}set props(t){R(_(this,Js),t)}}Qs=new WeakMap,Js=new WeakMap;var js,$s;class IT{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,js,I(()=>({open:this.root.opts.open.current})));L(this,$s,I(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=t,this.root=n,jt({...t,deps:()=>this.root.opts.open.current})}get snippetProps(){return g(_(this,js))}set snippetProps(t){R(_(this,js),t)}get props(){return g(_(this,$s))}set props(t){R(_(this,$s),t)}}js=new WeakMap,$s=new WeakMap;const qi=new on("Dialog.Root");function OT(e){return qi.set(new AT(e))}function NT(e){return new CT(e,qi.get())}function RT(e){return new kT(e,qi.get())}function MT(e){return new TT(e,qi.get())}function LT(e){return new IT(e,qi.get())}function FT(e){return new ET(e,qi.get())}function DT(e){return new PT(e,qi.get())}var BT=J("<div><!></div>");function VT(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"level",3,2),a=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const l=RT({id:F.with(()=>n()),level:F.with(()=>s()),ref:F.with(()=>i(),m=>i(m))}),c=I(()=>Vt(a,l.props));var d=K(),f=D(d);{var h=m=>{var b=K(),y=D(b);st(y,()=>t.child,()=>({props:g(c)})),A(m,b)},p=m=>{var b=BT();Mt(b,()=>({...g(c)}));var y=Q(b);st(y,()=>t.children??St),X(b),A(m,b)};_t(f,m=>{t.child?m(h):m(p,!1)})}A(e,d),dt()}function zT(e,t){var n=K(),i=D(n);go(i,()=>t.children,s=>{var a=K(),l=D(a);st(l,()=>t.children??St),A(s,a)}),A(e,n)}function Nu(e,t){ct(t,!0);let n=E(t,"to",3,"body");const i=nk();let s=I(a);function a(){if(!Ng||t.disabled)return null;let p=null;return typeof n()=="string"?p=document.querySelector(n()):(n()instanceof HTMLElement||n()instanceof DocumentFragment)&&(p=n()),p}let l;function c(){l&&(lk(l),l=null)}ae([()=>g(s),()=>t.disabled],([p,m])=>{if(!p||m){c();return}return l=ak(zT,{target:p,props:{children:t.children},context:i}),()=>{c()}});var d=K(),f=D(d);{var h=p=>{var m=K(),b=D(m);st(b,()=>t.children??St),A(p,m)};_t(f,p=>{t.disabled&&p(h)})}A(e,d),dt()}function Q_(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 J_{constructor(t,n={bubbles:!0,cancelable:!0}){Z(this,"eventName");Z(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 Me(t,this.eventName,s,i)}}function db(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 Rg(e,t){return e===t||e.contains(t)}function j_(e){return(e==null?void 0:e.ownerDocument)??document}function WT(e){if(!e)return null;for(const t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function HT(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 xo,Li,gi,So,Ao,pi,ta,ea,Dr,bd,Do,$_,_d,Co,wd,yd,xd,Sd,na,t0,Ad,Cd;class UT{constructor(t){L(this,Do);Z(this,"opts");L(this,xo);L(this,Li);L(this,gi,{pointerdown:!1});L(this,So,!1);L(this,Ao,!1);Z(this,"node",F(null));L(this,pi);L(this,ta);L(this,ea,bt(null));L(this,Dr,ie);L(this,bd,t=>{t.defaultPrevented||this.currNode&&On(()=>{var n,i;!this.currNode||_(this,Sd).call(this,t.target)||t.target&&!_(this,Ao)&&((i=(n=_(this,ta)).current)==null||i.call(n,t))})});L(this,_d,t=>{let n=t;n.defaultPrevented&&(n=fb(t)),_(this,xo).current(t)});L(this,Co,db(t=>{if(!this.currNode){_(this,Dr).call(this);return}const n=this.opts.isValidEvent.current(t,this.currNode)||YT(t,this.currNode);if(!_(this,So)||Ct(this,Do,t0).call(this)||!n){_(this,Dr).call(this);return}let i=t;if(i.defaultPrevented&&(i=fb(i)),_(this,Li).current!=="close"&&_(this,Li).current!=="defer-otherwise-close"){_(this,Dr).call(this);return}t.pointerType==="touch"?(_(this,Dr).call(this),me(this,Dr,Q_(_(this,pi),"click",_(this,_d),{once:!0}))):_(this,xo).current(i)},10));L(this,wd,t=>{_(this,gi)[t.type]=!0});L(this,yd,t=>{_(this,gi)[t.type]=!1});L(this,xd,()=>{this.node.current&&me(this,So,qT(this.node.current))});L(this,Sd,t=>this.node.current?Rg(this.node.current,t):!1);L(this,na,db(()=>{for(const t in _(this,gi))_(this,gi)[t]=!1;me(this,So,!1)},20));L(this,Ad,()=>{me(this,Ao,!0)});L(this,Cd,()=>{me(this,Ao,!1)});Z(this,"props",{onfocuscapture:_(this,Ad),onblurcapture:_(this,Cd)});this.opts=t,jt({id:t.id,ref:this.node,deps:()=>t.enabled.current,onRefChange:s=>{this.currNode=s}}),me(this,Li,t.interactOutsideBehavior),me(this,xo,t.onInteractOutside),me(this,ta,t.onFocusOutside),we(()=>{me(this,pi,j_(this.currNode))});let n=ie;const i=()=>{_(this,na).call(this),globalThis.bitsDismissableLayers.delete(this),_(this,Co).destroy(),n()};ae([()=>this.opts.enabled.current,()=>this.currNode],([s,a])=>{if(!(!s||!a))return Eu(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,_(this,Li)),n(),n=Ct(this,Do,$_).call(this))}),i}),Tg(()=>{_(this,na).destroy(),globalThis.bitsDismissableLayers.delete(this),_(this,Co).destroy(),_(this,Dr).call(this),n()})}get currNode(){return g(_(this,ea))}set currNode(t){R(_(this,ea),t,!0)}}xo=new WeakMap,Li=new WeakMap,gi=new WeakMap,So=new WeakMap,Ao=new WeakMap,pi=new WeakMap,ta=new WeakMap,ea=new WeakMap,Dr=new WeakMap,bd=new WeakMap,Do=new WeakSet,$_=function(){return zr(Me(_(this,pi),"pointerdown",zr(_(this,wd),_(this,xd)),{capture:!0}),Me(_(this,pi),"pointerdown",zr(_(this,yd),_(this,Co))),Me(_(this,pi),"focusin",_(this,bd)))},_d=new WeakMap,Co=new WeakMap,wd=new WeakMap,yd=new WeakMap,xd=new WeakMap,Sd=new WeakMap,na=new WeakMap,t0=function(){return Object.values(_(this,gi)).some(Boolean)},Ad=new WeakMap,Cd=new WeakMap;function GT(e){return new UT(e)}function KT(e){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function qT(e){const t=[...globalThis.bitsDismissableLayers],n=KT(t);if(n)return n[0].node.current===e;const[i]=t[0];return i.node.current===e}function YT(e,t){if("button"in e&&e.button>0)return!1;const n=e.target;return X_(n)?j_(n).documentElement.contains(n)&&!Rg(t,n)&&HT(e,t):!1}function fb(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 e0(e,t){ct(t,!0);let n=E(t,"interactOutsideBehavior",3,"close"),i=E(t,"onInteractOutside",3,ie),s=E(t,"onFocusOutside",3,ie),a=E(t,"isValidEvent",3,()=>!1);const l=GT({id:F.with(()=>t.id),interactOutsideBehavior:F.with(()=>n()),onInteractOutside:F.with(()=>i()),enabled:F.with(()=>t.enabled),onFocusOutside:F.with(()=>s()),isValidEvent:F.with(()=>a())});var c=K(),d=D(c);st(d,()=>t.children??St,()=>({props:l.props})),A(e,c),dt()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var Pd,kd;class XT{constructor(t){Z(this,"opts");L(this,Pd,()=>Me(document,"keydown",_(this,kd),{passive:!1}));L(this,kd,t=>{if(t.key!==fT||!QT(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=ie;ae(()=>t.enabled.current,i=>(i&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=_(this,Pd).call(this)),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}}Pd=new WeakMap,kd=new WeakMap;function ZT(e){return new XT(e)}function QT(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 n0(e,t){ct(t,!0);let n=E(t,"escapeKeydownBehavior",3,"close"),i=E(t,"onEscapeKeydown",3,ie);ZT({escapeKeydownBehavior:F.with(()=>n()),onEscapeKeydown:F.with(()=>i()),enabled:F.with(()=>t.enabled)});var s=K(),a=D(s);st(a,()=>t.children??St),A(e,s),dt()}const ii=F([]);function JT(){return{add(e){const t=ii.current[0];t&&e.id!==t.id&&t.pause(),ii.current=hb(ii.current,e),ii.current.unshift(e)},remove(e){var t;ii.current=hb(ii.current,e),(t=ii.current[0])==null||t.resume()},get current(){return ii.current}}}function jT(){let e=bt(!1),t=bt(!1);return{id:$t(),get paused(){return g(e)},get isHandlingFocus(){return g(t)},set isHandlingFocus(n){R(t,n,!0)},pause(){R(e,!0)},resume(){R(e,!1)}}}function hb(e,t){return[...e].filter(n=>n.id!==t.id)}function $T(e){return e.filter(t=>t.tagName!=="A")}function ui(e,{select:t=!1}={}){if(!(e&&e.focus)||document.activeElement===e)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_T(e)&&t&&e.select()}function tI(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(ui(i,{select:t}),document.activeElement!==n)return!0}function gb(e,t){for(const n of e)if(!wT(n,t))return n}function r0(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 eI(e){const t=r0(e),n=gb(t,e),i=gb(t.reverse(),e);return[n,i]}/*!
368
+ * tabbable 6.2.0
369
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
370
+ */var nI=["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])"],rI=nI.join(","),i0=typeof Element>"u",td=i0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ed=!i0&&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},iI=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},oI=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},sI=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},aI=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||oI(t))&&!sI(t)?0:t.tabIndex},o0=function(t){return t.tagName==="INPUT"},lI=function(t){return o0(t)&&t.type==="hidden"},uI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},cI=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},dI=function(t){if(!t.name)return!0;var n=t.form||ed(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=cI(s,t.form);return!a||a===t},fI=function(t){return o0(t)&&t.type==="radio"},hI=function(t){return fI(t)&&!dI(t)},gI=function(t){var n,i=t&&ed(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,p;i=ed(s),s=(f=i)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(s))}}return a},pb=function(t){var n=t.getBoundingClientRect(),i=n.width,s=n.height;return i===0&&s===0},pI=function(t,n){var i=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=td.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(td.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=ed(t);if(d&&!d.shadowRoot&&s(d)===!0)return pb(t);t.assignedSlot?t=t.assignedSlot:!d&&f!==t.ownerDocument?t=f.host:t=d}t=c}if(gI(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return pb(t);return!1},vI=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 td.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},mI=function(t,n){return!(n.disabled||iI(n)||lI(n)||pI(n,t)||uI(n)||vI(n))},bI=function(t,n){return!(hI(n)||aI(n)<0||!mI(t,n))},_I=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return td.call(t,rI)===!1?!1:bI(n,t)};const wI=new J_("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),yI=new J_("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),xI=new on("FocusScope");function SI({id:e,loop:t,enabled:n,onOpenAutoFocus:i,onCloseAutoFocus:s,forceMount:a}){const l=JT(),c=jT(),d=F(null),f=xI.getOr({ignoreCloseAutoFocus:!1});let h=null;jt({id:e,ref:d,deps:()=>n.current});function p(C){if(!(c.paused||!d.current||c.isHandlingFocus)){c.isHandlingFocus=!0;try{const T=C.target;if(!Hh(T))return;const N=d.current.contains(T);if(C.type==="focusin")if(N)h=T;else{if(f.ignoreCloseAutoFocus)return;ui(h,{select:!0})}else C.type==="focusout"&&!N&&!f.ignoreCloseAutoFocus&&ui(h,{select:!0})}finally{c.isHandlingFocus=!1}}}function m(C){if(!h||!d.current)return;let T=!1;for(const N of C){if(N.type==="childList"&&N.removedNodes.length>0)for(const B of N.removedNodes){if(B===h){T=!0;break}if(B.nodeType===Node.ELEMENT_NODE&&B.contains(h)){T=!0;break}}if(T)break}T&&d.current&&!d.current.contains(document.activeElement)&&ui(d.current)}ae([()=>d.current,()=>n.current],([C,T])=>{if(!C||!T)return;const N=zr(Me(document,"focusin",p),Me(document,"focusout",p)),B=new MutationObserver(m);return B.observe(C,{childList:!0,subtree:!0,attributes:!1}),()=>{N(),B.disconnect()}}),ae([()=>a.current,()=>d.current],([C,T])=>{if(C)return;const N=document.activeElement;return b(T,N),()=>{T&&y(N)}}),ae([()=>a.current,()=>d.current,()=>n.current],([C,T])=>{if(!C)return;const N=document.activeElement;return b(T,N),()=>{T&&y(N)}});function b(C,T){if(C||(C=document.getElementById(e.current)),!C||!n.current)return;if(l.add(c),!C.contains(T)){const B=wI.createEvent();i.current(B),B.defaultPrevented||On(()=>{if(!C)return;tI($T(r0(C)),{select:!0})||ui(C)})}}function y(C){var B;const T=yI.createEvent();(B=s.current)==null||B.call(s,T);const N=f.ignoreCloseAutoFocus;Eu(0,()=>{!T.defaultPrevented&&C&&!N&&ui(_I(C)?C:document.body,{select:!0}),l.remove(c)})}function x(C){if(!n.current||!t.current&&!n.current||c.paused)return;const T=C.key===zh&&!C.ctrlKey&&!C.altKey&&!C.metaKey,N=document.activeElement;if(!(T&&N))return;const B=d.current;if(!B)return;const[W,z]=eI(B);W&&z?!C.shiftKey&&N===z?(C.preventDefault(),t.current&&ui(W,{select:!0})):C.shiftKey&&N===W&&(C.preventDefault(),t.current&&ui(z,{select:!0})):N===B&&C.preventDefault()}const S=I(()=>({id:e.current,tabindex:-1,onkeydown:x}));return{get props(){return g(S)}}}function s0(e,t){ct(t,!0);let n=E(t,"trapFocus",3,!1),i=E(t,"loop",3,!1),s=E(t,"onCloseAutoFocus",3,ie),a=E(t,"onOpenAutoFocus",3,ie),l=E(t,"forceMount",3,!1);const c=SI({enabled:F.with(()=>n()),loop:F.with(()=>i()),onCloseAutoFocus:F.with(()=>s()),onOpenAutoFocus:F.with(()=>a()),id:F.with(()=>t.id),forceMount:F.with(()=>l())});var d=K(),f=D(d);st(f,()=>t.focusScope??St,()=>({props:c.props})),A(e,d),dt()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var Po,ra,Ed,a0,Td,ia;class AI{constructor(t){L(this,Ed);Z(this,"opts");L(this,Po,ie);L(this,ra,F(null));L(this,Td,t=>{const n=_(this,ra).current,i=t.target;!Hh(n)||!Hh(i)||!this.opts.enabled.current||!kI(this)||!Rg(n,i)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&me(this,Po,PI(n)))});L(this,ia,()=>{_(this,Po).call(this),me(this,Po,ie)});this.opts=t,jt({id:t.id,ref:_(this,ra),deps:()=>this.opts.enabled.current});let n=ie;ae(()=>this.opts.enabled.current,i=>(i&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=Ct(this,Ed,a0).call(this)),()=>{n(),_(this,ia).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}Po=new WeakMap,ra=new WeakMap,Ed=new WeakSet,a0=function(){return zr(Me(document,"pointerdown",_(this,Td)),Me(document,"pointerup",R_(_(this,ia),this.opts.onPointerUp.current)))},Td=new WeakMap,ia=new WeakMap;function CI(e){return new AI(e)}const vb=e=>e.style.userSelect||e.style.webkitUserSelect;function PI(e){const t=document.body,n=vb(t),i=vb(e);return Tc(t,"none"),Tc(e,"text"),()=>{Tc(t,n),Tc(e,i)}}function Tc(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function kI(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function l0(e,t){ct(t,!0);let n=E(t,"preventOverflowTextSelection",3,!0),i=E(t,"onPointerDown",3,ie),s=E(t,"onPointerUp",3,ie);CI({id:F.with(()=>t.id),onPointerDown:F.with(()=>i()),onPointerUp:F.with(()=>s()),enabled:F.with(()=>t.enabled&&n())});var a=K(),l=D(a);st(l,()=>t.children??St),A(e,a),dt()}function EI(e){let t=0,n=bt(void 0),i;function s(){t-=1,i&&t<=0&&(i(),R(n,void 0),i=void 0)}return(...a)=>(t+=1,g(n)===void 0&&(i=A_(()=>{R(n,e(...a),!0)})),we(()=>()=>{s()}),g(n))}const TI=EI(()=>{const e=new Dh,t=I(()=>{for(const a of e.values())if(a)return!0;return!1});let n=bt(null),i=null;function s(){Ng&&(document.body.setAttribute("style",g(n)??""),document.body.style.removeProperty("--scrollbar-width"),Wh&&(i==null||i()))}return we(()=>{const a=g(t);return fr(()=>{if(!a)return;R(n,document.body.getAttribute("style"),!0);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"),Wh&&(i=Q_(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),On(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),we(()=>()=>{i==null||i()}),{get map(){return e},resetBodyStyle:s}});function II(e,t=()=>null){const n=$t(),i=TI();if(!i)return;const s=I(t);i.map.set(n,e??!1);const a=F.with(()=>i.map.get(n)??!1,l=>i.map.set(n,l));return we(()=>()=>{i.map.delete(n),!OI(i.map)&&(g(s)===null?requestAnimationFrame(()=>i.resetBodyStyle()):Eu(g(s),()=>i.resetBodyStyle()))}),a}function OI(e){for(const[t,n]of e)if(n)return!0;return!1}function nd(e,t){ct(t,!0);let n=E(t,"preventScroll",3,!0),i=E(t,"restoreScrollDelay",3,null);II(n(),()=>i()),dt()}function NI({forceMount:e,present:t,trapFocus:n,open:i}){return e?i&&n:t&&n&&i}var RI=J("<div><!></div>");function u0(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"forceMount",3,!1),s=E(t,"ref",15,null),a=xt(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const l=LT({id:F.with(()=>n()),ref:F.with(()=>s(),d=>s(d))}),c=I(()=>Vt(a,l.props));{const d=h=>{var p=K(),m=D(p);{var b=x=>{var S=K(),C=D(S);{let T=I(()=>({props:Vt(g(c)),...l.snippetProps}));st(C,()=>t.child,()=>g(T))}A(x,S)},y=x=>{var S=RI();Mt(S,T=>({...T}),[()=>Vt(g(c))]);var C=Q(S);st(C,()=>t.children??St,()=>l.snippetProps),X(S),A(x,S)};_t(m,x=>{t.child?x(b):x(y,!1)})}A(h,p)};let f=I(()=>l.root.opts.open.current||i());Hd(e,{get id(){return n()},get present(){return g(f)},presence:d,$$slots:{presence:!0}})}dt()}var MI=J("<button><!></button>");function LI(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const l=NT({id:F.with(()=>n()),ref:F.with(()=>i(),x=>i(x)),disabled:F.with(()=>!!s())}),c=I(()=>Vt(a,l.props)),d=Yr(),[f,h]=d;var p=K(),m=D(p);{var b=x=>{var S=K(),C=D(S);st(C,()=>t.child,()=>({props:g(c)})),A(x,S)},y=x=>{var S=MI();Mt(S,T=>({...T}),[()=>h({...g(c)},[{attribute_name:"formaction"}])]);var C=Q(S);st(C,()=>t.children??St),X(S),A(x,S)};_t(m,x=>{t.child?x(b):x(y,!1)})}A(e,p),dt()}var FI=J("<div><!></div>");function DI(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=FT({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=FI();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}function BI(e,t){return e>=0&&e<t.length}function VI(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 zI(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 WI(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 HI(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 Mg(e,t,n){const i=t.toLowerCase();if(i.endsWith(" ")){const p=i.slice(0,-1);if(e.filter(x=>x.toLowerCase().startsWith(p)).length<=1)return Mg(e,p,n);const b=n==null?void 0:n.toLowerCase();if(b&&b.startsWith(p)&&b.charAt(p.length)===" "&&t.trim()===p)return n;const y=e.filter(x=>x.toLowerCase().startsWith(i));if(y.length>0){const x=n?e.indexOf(n):-1;return mb(y,Math.max(x,0)).find(T=>T!==n)||n}}const a=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=a.toLowerCase(),c=n?e.indexOf(n):-1;let d=mb(e,Math.max(c,0));a.length===1&&(d=d.filter(p=>p!==n));const h=d.find(p=>p==null?void 0:p.toLowerCase().startsWith(l));return h!==n?h:void 0}function mb(e,t){return e.map((n,i)=>e[(t+i)%e.length])}const UI="data-checkbox-root";var oa,sa,aa,la,Uh,ua,ca;class GI{constructor(t,n=null){L(this,la);Z(this,"opts");Z(this,"group");L(this,oa,I(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current));L(this,sa,I(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current));L(this,aa,I(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current));L(this,ua,I(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current})));L(this,ca,I(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":H_(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":W_(this.trueRequired),"data-disabled":Kn(this.trueDisabled),"data-state":qI(this.opts.checked.current,this.opts.indeterminate.current),[UI]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,this.group=n,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),jt(t),ae.pre([()=>{var i;return k_((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))}),ae.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 g(_(this,oa))}set trueName(t){R(_(this,oa),t)}get trueRequired(){return g(_(this,sa))}set trueRequired(t){R(_(this,sa),t)}get trueDisabled(){return g(_(this,aa))}set trueDisabled(t){R(_(this,aa),t)}onkeydown(t){this.opts.disabled.current||(t.key===Ur&&t.preventDefault(),t.key===Wr&&(t.preventDefault(),Ct(this,la,Uh).call(this)))}onclick(t){this.opts.disabled.current||Ct(this,la,Uh).call(this)}get snippetProps(){return g(_(this,ua))}set snippetProps(t){R(_(this,ua),t)}get props(){return g(_(this,ca))}set props(t){R(_(this,ca),t)}}oa=new WeakMap,sa=new WeakMap,aa=new WeakMap,la=new WeakSet,Uh=function(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current},ua=new WeakMap,ca=new WeakMap;var da,fa,ha;class KI{constructor(t){Z(this,"root");L(this,da,I(()=>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));L(this,fa,I(()=>!!this.root.trueName));L(this,ha,I(()=>({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 g(_(this,da))}set trueChecked(t){R(_(this,da),t)}get shouldRender(){return g(_(this,fa))}set shouldRender(t){R(_(this,fa),t)}get props(){return g(_(this,ha))}set props(t){R(_(this,ha),t)}}da=new WeakMap,fa=new WeakMap,ha=new WeakMap;function qI(e,t){return t?"indeterminate":e?"checked":"unchecked"}const YI=new on("Checkbox.Group"),c0=new on("Checkbox.Root");function XI(e,t){return c0.set(new GI(e,t))}function ZI(){return new KI(c0.get())}var QI=J("<input/>"),JI=J("<input/>");function Lg(e,t){ct(t,!0);let n=E(t,"value",15),i=xt(t,["$$slots","$$events","$$legacy","value"]);const s=I(()=>Vt(i,{"aria-hidden":"true",tabindex:-1,style:JE}));var a=K(),l=D(a);{var c=f=>{var h=QI();Mt(h,()=>({...g(s),value:n()}),void 0,void 0,void 0,!0),A(f,h)},d=f=>{var h=JI();Mt(h,()=>({...g(s)}),void 0,void 0,void 0,!0),I_(h,n),A(f,h)};_t(l,f=>{g(s).type==="checkbox"?f(c):f(d,!1)})}A(e,a),dt()}function jI(e,t){ct(t,!1);const n=ZI();wg();var i=K(),s=D(i);{var a=l=>{Lg(l,Ot(()=>n.props))};_t(s,l=>{n.shouldRender&&l(a)})}A(e,i),dt()}var $I=J("<button><!></button>"),tO=J("<!> <!>",1);function eO(e,t){ct(t,!0);let n=E(t,"checked",15,!1),i=E(t,"ref",15,null),s=E(t,"disabled",3,!1),a=E(t,"required",3,!1),l=E(t,"name",3,void 0),c=E(t,"value",3,"on"),d=E(t,"id",19,$t),f=E(t,"indeterminate",15,!1),h=E(t,"type",3,"button"),p=xt(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type"]);const m=YI.getOr(null);m&&c()&&(m.opts.value.current.includes(c())?n(!0):n(!1)),ae.pre(()=>c(),()=>{m&&c()&&(m.opts.value.current.includes(c())?n(!0):n(!1))});const b=XI({checked:F.with(()=>n(),M=>{var q;n(M),(q=t.onCheckedChange)==null||q.call(t,M)}),disabled:F.with(()=>s()??!1),required:F.with(()=>a()),name:F.with(()=>l()),value:F.with(()=>c()),id:F.with(()=>d()),ref:F.with(()=>i(),M=>i(M)),indeterminate:F.with(()=>f(),M=>{var q;f(M),(q=t.onIndeterminateChange)==null||q.call(t,M)}),type:F.with(()=>h())},m),y=I(()=>Vt({...p},b.props)),x=Yr(),[S,C]=x;var T=tO(),N=D(T);{var B=M=>{var q=K(),$=D(q);{let rt=I(()=>({props:g(y),...b.snippetProps}));st($,()=>t.child,()=>g(rt))}A(M,q)},W=M=>{var q=$I();Mt(q,rt=>({...rt}),[()=>C({...g(y)},[{attribute_name:"formaction"}])]);var $=Q(q);st($,()=>t.children??St,()=>b.snippetProps),X(q),A(M,q)};_t(N,M=>{t.child?M(B):M(W,!1)})}var z=vt(N,2);jI(z,{}),A(e,T),dt()}const nO="data-collapsible-root",rO="data-collapsible-content",iO="data-collapsible-trigger";var ga,pa;class oO{constructor(t){Z(this,"opts");L(this,ga,bt(null));L(this,pa,I(()=>({id:this.opts.id.current,"data-state":yi(this.opts.open.current),"data-disabled":Kn(this.opts.disabled.current),[nO]:""})));this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),jt(t)}get contentNode(){return g(_(this,ga))}set contentNode(t){R(_(this,ga),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return g(_(this,pa))}set props(t){R(_(this,pa),t)}}ga=new WeakMap,pa=new WeakMap;var ko,Eo,To,Io,va,ma,ba;class sO{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,ko);L(this,Eo,bt(!1));L(this,To,bt(0));L(this,Io,bt(0));L(this,va,I(()=>this.opts.forceMount.current||this.root.opts.open.current));L(this,ma,I(()=>({open:this.root.opts.open.current})));L(this,ba,I(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":g(_(this,Io))?`${g(_(this,Io))}px`:void 0,"--bits-collapsible-content-width":g(_(this,To))?`${g(_(this,To))}px`:void 0},"data-state":yi(this.root.opts.open.current),"data-disabled":Kn(this.root.opts.disabled.current),[rO]:""})));this.opts=t,this.root=n,R(_(this,Eo),n.opts.open.current,!0),jt({...t,deps:()=>this.present,onRefChange:i=>{this.root.contentNode=i}}),zd(()=>{const i=requestAnimationFrame(()=>{R(_(this,Eo),!1)});return()=>{cancelAnimationFrame(i)}}),ae([()=>this.opts.ref.current,()=>this.present],([i])=>{i&&On(()=>{if(!this.opts.ref.current)return;me(this,ko,_(this,ko)||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName}),i.style.transitionDuration="0s",i.style.animationName="none";const s=i.getBoundingClientRect();if(R(_(this,Io),s.height,!0),R(_(this,To),s.width,!0),!g(_(this,Eo))){const{animationName:a,transitionDuration:l}=_(this,ko);i.style.transitionDuration=l,i.style.animationName=a}})})}get present(){return g(_(this,va))}set present(t){R(_(this,va),t)}get snippetProps(){return g(_(this,ma))}set snippetProps(t){R(_(this,ma),t)}get props(){return g(_(this,ba))}set props(t){R(_(this,ba),t)}}ko=new WeakMap,Eo=new WeakMap,To=new WeakMap,Io=new WeakMap,va=new WeakMap,ma=new WeakMap,ba=new WeakMap;var Fi,_a;class aO{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Fi,I(()=>this.opts.disabled.current||this.root.opts.disabled.current));L(this,_a,I(()=>{var t;return{id:this.opts.id.current,type:"button",disabled:g(_(this,Fi)),"aria-controls":(t=this.root.contentNode)==null?void 0:t.id,"aria-expanded":Tu(this.root.opts.open.current),"data-state":yi(this.root.opts.open.current),"data-disabled":Kn(g(_(this,Fi))),[iO]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),jt(t)}onclick(t){if(!g(_(this,Fi))){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){g(_(this,Fi))||(t.key===Wr||t.key===Ur)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return g(_(this,_a))}set props(t){R(_(this,_a),t)}}Fi=new WeakMap,_a=new WeakMap;const Fg=new on("Collapsible.Root");function lO(e){return Fg.set(new oO(e))}function uO(e){return new aO(e,Fg.get())}function cO(e){return new sO(e,Fg.get())}var dO=J("<div><!></div>");function fO(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"open",15,!1),a=E(t,"disabled",3,!1),l=E(t,"onOpenChange",3,ie),c=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange"]);const d=lO({open:F.with(()=>s(),y=>{s(y),l()(y)}),disabled:F.with(()=>a()),id:F.with(()=>n()),ref:F.with(()=>i(),y=>i(y))}),f=I(()=>Vt(c,d.props));var h=K(),p=D(h);{var m=y=>{var x=K(),S=D(x);st(S,()=>t.child,()=>({props:g(f)})),A(y,x)},b=y=>{var x=dO();Mt(x,()=>({...g(f)}));var S=Q(x);st(S,()=>t.children??St),X(x),A(y,x)};_t(p,y=>{t.child?y(m):y(b,!1)})}A(e,h),dt()}var hO=J("<div><!></div>");function gO(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"forceMount",3,!1),s=E(t,"id",19,$t),a=xt(t,["$$slots","$$events","$$legacy","child","ref","forceMount","children","id"]);const l=cO({id:F.with(()=>s()),forceMount:F.with(()=>i()),ref:F.with(()=>n(),c=>n(c))});Hd(e,{forceMount:!0,get present(){return l.present},get id(){return s()},presence:(d,f)=>{let h=()=>f==null?void 0:f().present;const p=I(()=>Vt(a,l.props,{hidden:i()?void 0:!h().current}));var m=K(),b=D(m);{var y=S=>{var C=K(),T=D(C);{let N=I(()=>({...l.snippetProps,props:g(p)}));st(T,()=>t.child,()=>g(N))}A(S,C)},x=S=>{var C=hO();Mt(C,()=>({...g(p)}));var T=Q(C);st(T,()=>t.children??St),X(C),A(S,C)};_t(b,S=>{t.child?S(y):S(x,!1)})}A(d,m)},$$slots:{presence:!0}}),dt()}var pO=J("<button><!></button>");function vO(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=E(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const l=uO({id:F.with(()=>i()),ref:F.with(()=>n(),x=>n(x)),disabled:F.with(()=>s())}),c=I(()=>Vt(a,l.props)),d=Yr(),[f,h]=d;var p=K(),m=D(p);{var b=x=>{var S=K(),C=D(S);st(C,()=>t.child,()=>({props:g(c)})),A(x,S)},y=x=>{var S=pO();Mt(S,T=>({...T}),[()=>h({...g(c)},[{attribute_name:"formaction"}])]);var C=Q(S);st(C,()=>t.children??St),X(S),A(x,S)};_t(m,x=>{t.child?x(b):x(y,!1)})}A(e,p),dt()}const mO=["top","right","bottom","left"],bi=Math.min,Nn=Math.max,rd=Math.round,Ic=Math.floor,hr=e=>({x:e,y:e}),bO={left:"right",right:"left",bottom:"top",top:"bottom"},_O={start:"end",end:"start"};function Gh(e,t,n){return Nn(e,bi(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Dg(e){return e==="x"?"y":"x"}function Bg(e){return e==="y"?"height":"width"}function _i(e){return["top","bottom"].includes(Kr(e))?"y":"x"}function Vg(e){return Dg(_i(e))}function wO(e,t,n){n===void 0&&(n=!1);const i=Bo(e),s=Vg(e),a=Bg(s);let l=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=id(l)),[l,id(l)]}function yO(e){const t=id(e);return[Kh(e),t,Kh(t)]}function Kh(e){return e.replace(/start|end/g,t=>_O[t])}function xO(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 SO(e,t,n,i){const s=Bo(e);let a=xO(Kr(e),n==="start",i);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Kh)))),a}function id(e){return e.replace(/left|right|bottom|top/g,t=>bO[t])}function AO(e){return{top:0,right:0,bottom:0,left:0,...e}}function d0(e){return typeof e!="number"?AO(e):{top:e,right:e,bottom:e,left:e}}function od(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 bb(e,t,n){let{reference:i,floating:s}=e;const a=_i(t),l=Vg(t),c=Bg(l),d=Kr(t),f=a==="y",h=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,m=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:p};break;case"left":b={x:i.x-s.width,y:p};break;default:b={x:i.x,y:i.y}}switch(Bo(t)){case"start":b[l]-=m*(n&&f?-1:1);break;case"end":b[l]+=m*(n&&f?-1:1);break}return b}const CO=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:p}=bb(f,i,d),m=i,b={},y=0;for(let x=0;x<c.length;x++){const{name:S,fn:C}=c[x],{x:T,y:N,data:B,reset:W}=await C({x:h,y:p,initialPlacement:i,placement:m,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=T??h,p=N??p,b={...b,[S]:{...b[S],...B}},W&&y<=50&&(y++,typeof W=="object"&&(W.placement&&(m=W.placement),W.rects&&(f=W.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):W.rects),{x:h,y:p}=bb(f,m,d)),x=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:b}};async function As(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:p="floating",altBoundary:m=!1,padding:b=0}=Gr(t,e),y=d0(b),S=c[m?p==="floating"?"reference":"floating":p],C=od(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),T=p==="floating"?{x:i,y:s,width:l.floating.width,height:l.floating.height}:l.reference,N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),B=await(a.isElement==null?void 0:a.isElement(N))?await(a.getScale==null?void 0:a.getScale(N))||{x:1,y:1}:{x:1,y:1},W=od(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:N,strategy:d}):T);return{top:(C.top-W.top+y.top)/B.y,bottom:(W.bottom-C.bottom+y.bottom)/B.y,left:(C.left-W.left+y.left)/B.x,right:(W.right-C.right+y.right)/B.x}}const PO=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}=Gr(e,t)||{};if(f==null)return{};const p=d0(h),m={x:n,y:i},b=Vg(s),y=Bg(b),x=await l.getDimensions(f),S=b==="y",C=S?"top":"left",T=S?"bottom":"right",N=S?"clientHeight":"clientWidth",B=a.reference[y]+a.reference[b]-m[b]-a.floating[y],W=m[b]-a.reference[b],z=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=z?z[N]:0;(!M||!await(l.isElement==null?void 0:l.isElement(z)))&&(M=c.floating[N]||a.floating[y]);const q=B/2-W/2,$=M/2-x[y]/2-1,rt=bi(p[C],$),ht=bi(p[T],$),H=rt,it=M-x[y]-ht,Y=M/2-x[y]/2+q,nt=Gh(H,Y,it),ot=!d.arrow&&Bo(s)!=null&&Y!==nt&&a.reference[y]/2-(Y<H?rt:ht)-x[y]/2<0,lt=ot?Y<H?Y-H:Y-it:0;return{[b]:m[b]+lt,data:{[b]:nt,centerOffset:Y-nt-lt,...ot&&{alignmentOffset:lt}},reset:ot}}}),kO=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:p=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...S}=Gr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const C=Kr(s),T=_i(c),N=Kr(c)===c,B=await(d.isRTL==null?void 0:d.isRTL(f.floating)),W=m||(N||!x?[id(c)]:yO(c)),z=y!=="none";!m&&z&&W.push(...SO(c,x,y,B));const M=[c,...W],q=await As(t,S),$=[];let rt=((i=a.flip)==null?void 0:i.overflows)||[];if(h&&$.push(q[C]),p){const Y=wO(s,l,B);$.push(q[Y[0]],q[Y[1]])}if(rt=[...rt,{placement:s,overflows:$}],!$.every(Y=>Y<=0)){var ht,H;const Y=(((ht=a.flip)==null?void 0:ht.index)||0)+1,nt=M[Y];if(nt)return{data:{index:Y,overflows:rt},reset:{placement:nt}};let ot=(H=rt.filter(lt=>lt.overflows[0]<=0).sort((lt,ut)=>lt.overflows[1]-ut.overflows[1])[0])==null?void 0:H.placement;if(!ot)switch(b){case"bestFit":{var it;const lt=(it=rt.filter(ut=>{if(z){const pt=_i(ut.placement);return pt===T||pt==="y"}return!0}).map(ut=>[ut.placement,ut.overflows.filter(pt=>pt>0).reduce((pt,wt)=>pt+wt,0)]).sort((ut,pt)=>ut[1]-pt[1])[0])==null?void 0:it[0];lt&&(ot=lt);break}case"initialPlacement":ot=c;break}if(s!==ot)return{reset:{placement:ot}}}return{}}}};function _b(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wb(e){return mO.some(t=>e[t]>=0)}const EO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=Gr(e,t);switch(i){case"referenceHidden":{const a=await As(t,{...s,elementContext:"reference"}),l=_b(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:wb(l)}}}case"escaped":{const a=await As(t,{...s,altBoundary:!0}),l=_b(a,n.floating);return{data:{escapedOffsets:l,escaped:wb(l)}}}default:return{}}}}};async function TO(e,t){const{placement:n,platform:i,elements:s}=e,a=await(i.isRTL==null?void 0:i.isRTL(s.floating)),l=Kr(n),c=Bo(n),d=_i(n)==="y",f=["left","top"].includes(l)?-1:1,h=a&&d?-1:1,p=Gr(t,e);let{mainAxis:m,crossAxis:b,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),d?{x:b*h,y:m*f}:{x:m*f,y:b*h}}const IO=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 TO(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}}}}},OO=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:S=>{let{x:C,y:T}=S;return{x:C,y:T}}},...d}=Gr(e,t),f={x:n,y:i},h=await As(t,d),p=_i(Kr(s)),m=Dg(p);let b=f[m],y=f[p];if(a){const S=m==="y"?"top":"left",C=m==="y"?"bottom":"right",T=b+h[S],N=b-h[C];b=Gh(T,b,N)}if(l){const S=p==="y"?"top":"left",C=p==="y"?"bottom":"right",T=y+h[S],N=y-h[C];y=Gh(T,y,N)}const x=c.fn({...t,[m]:b,[p]:y});return{...x,data:{x:x.x-n,y:x.y-i,enabled:{[m]:a,[p]:l}}}}}},NO=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}=Gr(e,t),h={x:n,y:i},p=_i(s),m=Dg(p);let b=h[m],y=h[p];const x=Gr(c,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const N=m==="y"?"height":"width",B=a.reference[m]-a.floating[N]+S.mainAxis,W=a.reference[m]+a.reference[N]-S.mainAxis;b<B?b=B:b>W&&(b=W)}if(f){var C,T;const N=m==="y"?"width":"height",B=["top","left"].includes(Kr(s)),W=a.reference[p]-a.floating[N]+(B&&((C=l.offset)==null?void 0:C[p])||0)+(B?0:S.crossAxis),z=a.reference[p]+a.reference[N]+(B?0:((T=l.offset)==null?void 0:T[p])||0)-(B?S.crossAxis:0);y<W?y=W:y>z&&(y=z)}return{[m]:b,[p]:y}}}},RO=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}=Gr(e,t),h=await As(t,f),p=Kr(s),m=Bo(s),b=_i(s)==="y",{width:y,height:x}=a.floating;let S,C;p==="top"||p==="bottom"?(S=p,C=m===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(C=p,S=m==="end"?"top":"bottom");const T=x-h.top-h.bottom,N=y-h.left-h.right,B=bi(x-h[S],T),W=bi(y-h[C],N),z=!t.middlewareData.shift;let M=B,q=W;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(q=N),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=T),z&&!m){const rt=Nn(h.left,0),ht=Nn(h.right,0),H=Nn(h.top,0),it=Nn(h.bottom,0);b?q=y-2*(rt!==0||ht!==0?rt+ht:Nn(h.left,h.right)):M=x-2*(H!==0||it!==0?H+it:Nn(h.top,h.bottom))}await d({...t,availableWidth:q,availableHeight:M});const $=await l.getDimensions(c.floating);return y!==$.width||x!==$.height?{reset:{rects:!0}}:{}}}};function Ud(){return typeof window<"u"}function Vo(e){return f0(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){var t;return(t=(f0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function f0(e){return Ud()?e instanceof Node||e instanceof Mn(e).Node:!1}function tr(e){return Ud()?e instanceof Element||e instanceof Mn(e).Element:!1}function pr(e){return Ud()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function yb(e){return!Ud()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}function Ru(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=er(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function MO(e){return["table","td","th"].includes(Vo(e))}function Gd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zg(e){const t=Wg(),n=tr(e)?er(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 LO(e){let t=wi(e);for(;pr(t)&&!Ro(t);){if(zg(t))return t;if(Gd(t))return null;t=wi(t)}return null}function Wg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ro(e){return["html","body","#document"].includes(Vo(e))}function er(e){return Mn(e).getComputedStyle(e)}function Kd(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if(Vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yb(e)&&e.host||mr(e);return yb(t)?t.host:t}function h0(e){const t=wi(e);return Ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:pr(t)&&Ru(t)?t:h0(t)}function Cs(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=h0(e),a=s===((i=e.ownerDocument)==null?void 0:i.body),l=Mn(s);if(a){const c=qh(l);return t.concat(l,l.visualViewport||[],Ru(s)?s:[],c&&n?Cs(c):[])}return t.concat(s,Cs(s,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g0(e){const t=er(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=pr(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:i,c=rd(n)!==a||rd(i)!==l;return c&&(n=a,i=l),{width:n,height:i,$:c}}function Hg(e){return tr(e)?e:e.contextElement}function po(e){const t=Hg(e);if(!pr(t))return hr(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:a}=g0(t);let l=(a?rd(n.width):n.width)/i,c=(a?rd(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const FO=hr(0);function p0(e){const t=Mn(e);return!Wg()||!t.visualViewport?FO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function Wi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Hg(e);let l=hr(1);t&&(i?tr(i)&&(l=po(i)):l=po(e));const c=DO(a,n,i)?p0(a):hr(0);let d=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,p=s.height/l.y;if(a){const m=Mn(a),b=i&&tr(i)?Mn(i):i;let y=m,x=qh(y);for(;x&&i&&b!==y;){const S=po(x),C=x.getBoundingClientRect(),T=er(x),N=C.left+(x.clientLeft+parseFloat(T.paddingLeft))*S.x,B=C.top+(x.clientTop+parseFloat(T.paddingTop))*S.y;d*=S.x,f*=S.y,h*=S.x,p*=S.y,d+=N,f+=B,y=Mn(x),x=qh(y)}}return od({width:h,height:p,x:d,y:f})}function Ug(e,t){const n=Kd(e).scrollLeft;return t?t.left+n:Wi(mr(e)).left+n}function v0(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:Ug(e,i)),a=i.top+t.scrollTop;return{x:s,y:a}}function BO(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const a=s==="fixed",l=mr(i),c=t?Gd(t.floating):!1;if(i===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=hr(1);const h=hr(0),p=pr(i);if((p||!p&&!a)&&((Vo(i)!=="body"||Ru(l))&&(d=Kd(i)),pr(i))){const b=Wi(i);f=po(i),h.x=b.x+i.clientLeft,h.y=b.y+i.clientTop}const m=l&&!p&&!a?v0(l,d,!0):hr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-d.scrollTop*f.y+h.y+m.y}}function VO(e){return Array.from(e.getClientRects())}function zO(e){const t=mr(e),n=Kd(e),i=e.ownerDocument.body,s=Nn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Nn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+Ug(e);const c=-n.scrollTop;return er(i).direction==="rtl"&&(l+=Nn(t.clientWidth,i.clientWidth)-s),{width:s,height:a,x:l,y:c}}function WO(e,t){const n=Mn(e),i=mr(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=Wg();(!f||f&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:a,height:l,x:c,y:d}}function HO(e,t){const n=Wi(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,a=pr(e)?po(e):hr(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 xb(e,t,n){let i;if(t==="viewport")i=WO(e,n);else if(t==="document")i=zO(mr(e));else if(tr(t))i=HO(t,n);else{const s=p0(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return od(i)}function m0(e,t){const n=wi(e);return n===t||!tr(n)||Ro(n)?!1:er(n).position==="fixed"||m0(n,t)}function UO(e,t){const n=t.get(e);if(n)return n;let i=Cs(e,[],!1).filter(c=>tr(c)&&Vo(c)!=="body"),s=null;const a=er(e).position==="fixed";let l=a?wi(e):e;for(;tr(l)&&!Ro(l);){const c=er(l),d=zg(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ru(l)&&!d&&m0(e,l))?i=i.filter(h=>h!==l):s=c,l=wi(l)}return t.set(e,i),i}function GO(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const l=[...n==="clippingAncestors"?Gd(t)?[]:UO(t,this._c):[].concat(n),i],c=l[0],d=l.reduce((f,h)=>{const p=xb(t,h,s);return f.top=Nn(p.top,f.top),f.right=bi(p.right,f.right),f.bottom=bi(p.bottom,f.bottom),f.left=Nn(p.left,f.left),f},xb(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function KO(e){const{width:t,height:n}=g0(e);return{width:t,height:n}}function qO(e,t,n){const i=pr(t),s=mr(t),a=n==="fixed",l=Wi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=hr(0);if(i||!i&&!a)if((Vo(t)!=="body"||Ru(s))&&(c=Kd(t)),i){const m=Wi(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else s&&(d.x=Ug(s));const f=s&&!i&&!a?v0(s,c):hr(0),h=l.left+c.scrollLeft-d.x-f.x,p=l.top+c.scrollTop-d.y-f.y;return{x:h,y:p,width:l.width,height:l.height}}function vh(e){return er(e).position==="static"}function Sb(e,t){if(!pr(e)||er(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mr(e)===n&&(n=n.ownerDocument.body),n}function b0(e,t){const n=Mn(e);if(Gd(e))return n;if(!pr(e)){let s=wi(e);for(;s&&!Ro(s);){if(tr(s)&&!vh(s))return s;s=wi(s)}return n}let i=Sb(e,t);for(;i&&MO(i)&&vh(i);)i=Sb(i,t);return i&&Ro(i)&&vh(i)&&!zg(i)?n:i||LO(e)||n}const YO=async function(e){const t=this.getOffsetParent||b0,n=this.getDimensions,i=await n(e.floating);return{reference:qO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function XO(e){return er(e).direction==="rtl"}const ZO={convertOffsetParentRelativeRectToViewportRelativeRect:BO,getDocumentElement:mr,getClippingRect:GO,getOffsetParent:b0,getElementRects:YO,getClientRects:VO,getDimensions:KO,getScale:po,isElement:tr,isRTL:XO};function _0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QO(e,t){let n=null,i;const s=mr(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:p,width:m,height:b}=f;if(c||t(),!m||!b)return;const y=Ic(p),x=Ic(s.clientWidth-(h+m)),S=Ic(s.clientHeight-(p+b)),C=Ic(h),N={rootMargin:-y+"px "+-x+"px "+-S+"px "+-C+"px",threshold:Nn(0,bi(1,d))||1};let B=!0;function W(z){const M=z[0].intersectionRatio;if(M!==d){if(!B)return l();M?l(!1,M):i=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!_0(f,e.getBoundingClientRect())&&l(),B=!1}try{n=new IntersectionObserver(W,{...N,root:s.ownerDocument})}catch{n=new IntersectionObserver(W,N)}n.observe(e)}return l(!0),a}function JO(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=Hg(e),h=s||a?[...f?Cs(f):[],...Cs(t)]:[];h.forEach(C=>{s&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const p=f&&c?QO(f,n):null;let m=-1,b=null;l&&(b=new ResizeObserver(C=>{let[T]=C;T&&T.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let y,x=d?Wi(e):null;d&&S();function S(){const C=Wi(e);x&&!_0(x,C)&&n(),x=C,y=requestAnimationFrame(S)}return n(),()=>{var C;h.forEach(T=>{s&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),p==null||p(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(y)}}const jO=IO,$O=OO,tN=kO,eN=RO,nN=EO,rN=PO,iN=NO,oN=(e,t,n)=>{const i=new Map,s={platform:ZO,...n},a={...s.platform,_c:i};return CO(e,t,{...s,platform:a})};function ss(e){return typeof e=="function"?e():e}function w0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ab(e,t){const n=w0(e);return Math.round(t*n)/n}function Cb(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 sN(e){const t=e.whileElementsMounted,n=I(()=>ss(e.open)??!0),i=I(()=>ss(e.middleware)),s=I(()=>ss(e.transform)??!0),a=I(()=>ss(e.placement)??"bottom"),l=I(()=>ss(e.strategy)??"absolute"),c=e.reference;let d=bt(0),f=bt(0);const h=F(null);let p=bt(Sn(g(l))),m=bt(Sn(g(a))),b=bt(Sn({})),y=bt(!1);const x=I(()=>{const W={position:g(p),left:"0",top:"0"};if(!h.current)return W;const z=Ab(h.current,g(d)),M=Ab(h.current,g(f));return g(s)?{...W,transform:`translate(${z}px, ${M}px)`,...w0(h.current)>=1.5&&{willChange:"transform"}}:{position:g(p),left:`${z}px`,top:`${M}px`}});let S;function C(){c.current===null||h.current===null||oN(c.current,h.current,{middleware:g(i),placement:g(a),strategy:g(l)}).then(W=>{R(d,W.x,!0),R(f,W.y,!0),R(p,W.strategy,!0),R(m,W.placement,!0),R(b,W.middlewareData,!0),R(y,!0)})}function T(){typeof S=="function"&&(S(),S=void 0)}function N(){if(T(),t===void 0){C();return}c.current===null||h.current===null||(S=t(c.current,h.current,C))}function B(){g(n)||R(y,!1)}return we(C),we(N),we(B),we(()=>T),{floating:h,reference:c,get strategy(){return g(p)},get placement(){return g(m)},get middlewareData(){return g(b)},get isPositioned(){return g(y)},get floatingStyles(){return g(x)},get update(){return C}}}const aN={top:"bottom",right:"left",bottom:"top",left:"right"};class lN{constructor(){Z(this,"anchorNode",F(null));Z(this,"customAnchorNode",F(null));Z(this,"triggerNode",F(null));we(()=>{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 wa,Id,ya,Od,xa,Nd,Sa,Aa,Ca,Pa,ka,Ea,Ta,Ia,Oa,Na,Ra,Ma,La,Fa,Da,Ba,Va,za;class uN{constructor(t,n){Z(this,"opts");Z(this,"root");Z(this,"contentRef",F(null));Z(this,"wrapperRef",F(null));Z(this,"arrowRef",F(null));Z(this,"arrowId",F($t()));L(this,wa,I(()=>{if(typeof this.opts.style=="string")return ps(this.opts.style);if(!this.opts.style)return{}}));L(this,Id);L(this,ya,new oT(()=>this.arrowRef.current??void 0));L(this,Od,I(()=>{var t;return((t=_(this,ya))==null?void 0:t.width)??0}));L(this,xa,I(()=>{var t;return((t=_(this,ya))==null?void 0:t.height)??0}));L(this,Nd,I(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));L(this,Sa,I(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));L(this,Aa,I(()=>g(_(this,Sa)).length>0));L(this,Ca,I(()=>({padding:this.opts.collisionPadding.current,boundary:g(_(this,Sa)).filter(bT),altBoundary:this.hasExplicitBoundaries})));L(this,Pa,bt(void 0));L(this,ka,bt(void 0));L(this,Ea,bt(void 0));L(this,Ta,bt(void 0));L(this,Ia,I(()=>[jO({mainAxis:this.opts.sideOffset.current+g(_(this,xa)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&$O({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?iN():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&tN({...this.detectOverflowOptions}),eN({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:s,height:a}=t.reference;R(_(this,Pa),n,!0),R(_(this,ka),i,!0),R(_(this,Ea),s,!0),R(_(this,Ta),a,!0)}}),this.arrowRef.current&&rN({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),pN({arrowWidth:g(_(this,Od)),arrowHeight:g(_(this,xa))}),this.opts.hideWhenDetached.current&&nN({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));Z(this,"floating");L(this,Oa,I(()=>vN(this.floating.placement)));L(this,Na,I(()=>mN(this.floating.placement)));L(this,Ra,I(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));L(this,Ma,I(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));L(this,La,I(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));L(this,Fa,bt());L(this,Da,I(()=>aN[this.placedSide]));L(this,Ba,I(()=>{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":`${g(_(this,Pa))}px`,"--bits-floating-available-height":`${g(_(this,ka))}px`,"--bits-floating-anchor-width":`${g(_(this,Ea))}px`,"--bits-floating-anchor-height":`${g(_(this,Ta))}px`,...((i=this.floating.middlewareData.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...g(_(this,wa))},dir:this.opts.dir.current}}));L(this,Va,I(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Eg({...g(_(this,wa))})})));L(this,za,I(()=>({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),ae(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),jt({id:this.opts.wrapperId,ref:this.wrapperRef,deps:()=>this.opts.enabled.current}),jt({id:this.opts.id,ref:this.contentRef,deps:()=>this.opts.enabled.current}),this.floating=sN({strategy:()=>this.opts.strategy.current,placement:()=>g(_(this,Nd)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>{var a;return JO(...i,{animationFrame:((a=_(this,Id))==null?void 0:a.current)==="always"})},open:()=>this.opts.enabled.current}),we(()=>{var i;this.floating.isPositioned&&((i=this.opts.onPlaced)==null||i.current())}),ae(()=>this.contentRef.current,i=>{i&&(this.contentZIndex=window.getComputedStyle(i).zIndex)}),we(()=>{this.floating.floating.current=this.wrapperRef.current})}get hasExplicitBoundaries(){return g(_(this,Aa))}set hasExplicitBoundaries(t){R(_(this,Aa),t)}get detectOverflowOptions(){return g(_(this,Ca))}set detectOverflowOptions(t){R(_(this,Ca),t)}get middleware(){return g(_(this,Ia))}set middleware(t){R(_(this,Ia),t)}get placedSide(){return g(_(this,Oa))}set placedSide(t){R(_(this,Oa),t)}get placedAlign(){return g(_(this,Na))}set placedAlign(t){R(_(this,Na),t)}get arrowX(){return g(_(this,Ra))}set arrowX(t){R(_(this,Ra),t)}get arrowY(){return g(_(this,Ma))}set arrowY(t){R(_(this,Ma),t)}get cannotCenterArrow(){return g(_(this,La))}set cannotCenterArrow(t){R(_(this,La),t)}get contentZIndex(){return g(_(this,Fa))}set contentZIndex(t){R(_(this,Fa),t,!0)}get arrowBaseSide(){return g(_(this,Da))}set arrowBaseSide(t){R(_(this,Da),t)}get wrapperProps(){return g(_(this,Ba))}set wrapperProps(t){R(_(this,Ba),t)}get props(){return g(_(this,Va))}set props(t){R(_(this,Va),t)}get arrowStyle(){return g(_(this,za))}set arrowStyle(t){R(_(this,za),t)}}wa=new WeakMap,Id=new WeakMap,ya=new WeakMap,Od=new WeakMap,xa=new WeakMap,Nd=new WeakMap,Sa=new WeakMap,Aa=new WeakMap,Ca=new WeakMap,Pa=new WeakMap,ka=new WeakMap,Ea=new WeakMap,Ta=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,La=new WeakMap,Fa=new WeakMap,Da=new WeakMap,Ba=new WeakMap,Va=new WeakMap,za=new WeakMap;class cN{constructor(t,n){Z(this,"opts");Z(this,"root");Z(this,"ref",F(null));this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=F.from(t.virtualEl.current):jt({id:t.id,ref:this.ref,onRefChange:i=>{n.triggerNode.current=i}})}}const Gg=new on("Floating.Root"),dN=new on("Floating.Content");function fN(){return Gg.set(new lN)}function hN(e){return dN.set(new uN(e,Gg.get()))}function gN(e){return new cN(e,Gg.get())}function pN(e){return{name:"transformOrigin",options:e,fn(t){var S,C,T;const{placement:n,rects:i,middlewareData:s}=t,l=((S=s.arrow)==null?void 0:S.centerOffset)!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=Kg(n),p={start:"0%",center:"50%",end:"100%"}[h],m=(((C=s.arrow)==null?void 0:C.x)??0)+c/2,b=(((T=s.arrow)==null?void 0:T.y)??0)+d/2;let y="",x="";return f==="bottom"?(y=l?p:`${m}px`,x=`${-d}px`):f==="top"?(y=l?p:`${m}px`,x=`${i.floating.height+d}px`):f==="right"?(y=`${-d}px`,x=l?p:`${b}px`):f==="left"&&(y=`${i.floating.width+d}px`,x=l?p:`${b}px`),{data:{x:y,y:x}}}}}function Kg(e){const[t,n="center"]=e.split("-");return[t,n]}function vN(e){return Kg(e)[0]}function mN(e){return Kg(e)[1]}function y0(e,t){ct(t,!0),fN();var n=K(),i=D(n);st(i,()=>t.children??St),A(e,n),dt()}function x0(e,t=1e4,n=ie){let i=null,s=bt(Sn(e));function a(){return window.setTimeout(()=>{R(s,e,!0),n(e)},t)}return we(()=>()=>{i&&clearTimeout(i)}),F.with(()=>g(s),l=>{R(s,l,!0),n(l),i&&clearTimeout(i),i=a()})}function bN(e){const t=x0("",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,y;if(!c.length)return;t.current=t.current+l;const d=i(),f=((y=(b=c.find(x=>x===d))==null?void 0:b.textContent)==null?void 0:y.trim())??"",h=c.map(x=>{var S;return((S=x.textContent)==null?void 0:S.trim())??""}),p=Mg(h,t.current,f),m=c.find(x=>{var S;return((S=x.textContent)==null?void 0:S.trim())===p});return m&&n(m),m}function a(){t.current=""}return{search:t,handleTypeaheadSearch:s,resetTypeahead:a}}function _N(e){const t=x0("",1e3),n=I(()=>e.candidateValues());function i(a){if(!e.enabled||!g(n).length)return;t.current=t.current+a;const l=e.getCurrentItem(),c=g(n).find(p=>p===l)??"",d=g(n).map(p=>p??""),f=Mg(d,t.current,c),h=g(n).find(p=>p===f);return h&&e.onMatch(h),h}function s(){t.current=""}return{search:t,handleTypeaheadSearch:i,resetTypeahead:s}}const wN=[vi,Y_,Ou],yN=[Vr,q_,Iu],xN=[...wN,...yN];var Wa,Ha,Ua,Ga,Ka,qa,Ya,Xa,Za,Qa;class S0{constructor(t){Z(this,"opts");L(this,Wa,bt(!1));L(this,Ha,bt(""));L(this,Ua,bt(null));L(this,Ga,bt(null));L(this,Ka,bt(null));L(this,qa,bt(""));L(this,Ya,bt(null));L(this,Xa,I(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));L(this,Za,I(()=>{if(this.highlightedNode)return this.highlightedNode.id}));L(this,Qa,I(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));Z(this,"isUsingKeyboard",!1);Z(this,"isCombobox",!1);Z(this,"bitsAttrs");this.opts=t,this.isCombobox=t.isCombobox,this.bitsAttrs=KN(this),zd(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return g(_(this,Wa))}set touchedInput(t){R(_(this,Wa),t,!0)}get inputValue(){return g(_(this,Ha))}set inputValue(t){R(_(this,Ha),t,!0)}get inputNode(){return g(_(this,Ua))}set inputNode(t){R(_(this,Ua),t,!0)}get contentNode(){return g(_(this,Ga))}set contentNode(t){R(_(this,Ga),t,!0)}get triggerNode(){return g(_(this,Ka))}set triggerNode(t){R(_(this,Ka),t,!0)}get valueId(){return g(_(this,qa))}set valueId(t){R(_(this,qa),t,!0)}get highlightedNode(){return g(_(this,Ya))}set highlightedNode(t){R(_(this,Ya),t,!0)}get highlightedValue(){return g(_(this,Xa))}set highlightedValue(t){R(_(this,Xa),t)}get highlightedId(){return g(_(this,Za))}set highlightedId(t){R(_(this,Za),t)}get highlightedLabel(){return g(_(this,Qa))}set highlightedLabel(t){R(_(this,Qa),t)}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()}}Wa=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Za=new WeakMap,Qa=new WeakMap;var Ja,ja,$a,tl;class SN extends S0{constructor(n){super(n);Z(this,"opts");Z(this,"isMulti",!1);L(this,Ja,I(()=>this.opts.value.current!==""));L(this,ja,I(()=>{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)??"":""}));L(this,$a,I(()=>this.opts.items.current.length?this.opts.items.current.filter(i=>!i.disabled).map(i=>i.label):[]));L(this,tl,I(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=n,we(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ae(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return g(_(this,Ja))}set hasValue(n){R(_(this,Ja),n)}get currentLabel(){return g(_(this,ja))}set currentLabel(n){R(_(this,ja),n)}get candidateLabels(){return g(_(this,$a))}set candidateLabels(n){R(_(this,$a),n)}get dataTypeaheadEnabled(){return g(_(this,tl))}set dataTypeaheadEnabled(n){R(_(this,tl),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i=n){this.opts.value.current=this.includesItem(n)?"":n,this.inputValue=i}setInitialHighlightedNode(){On(()=>{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)})}}Ja=new WeakMap,ja=new WeakMap,$a=new WeakMap,tl=new WeakMap;var el;class AN extends S0{constructor(n){super(n);Z(this,"opts");Z(this,"isMulti",!0);L(this,el,I(()=>this.opts.value.current.length>0));this.opts=n,we(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ae(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return g(_(this,el))}set hasValue(n){R(_(this,el),n)}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(){On(()=>{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)})}}el=new WeakMap;var Di,Oo,vr,A0,Yh,Xh,nl;class CN{constructor(t,n){L(this,vr);Z(this,"opts");Z(this,"root");L(this,Di);L(this,Oo);L(this,nl,I(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Tu(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":yi(this.root.opts.open.current),"data-disabled":Kn(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,jt({...t,onRefChange:i=>{this.root.triggerNode=i}}),me(this,Di,bN({getCurrentItem:()=>this.root.highlightedNode,onMatch:i=>{this.root.setHighlightedNode(i)}})),me(this,Oo,_N({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===Vr||t.key===vi)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Ur||t.key===Wr||t.key===vi||t.key===Vr)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){_(this,Oo).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const l=this.root.getCandidateNodes();if(!l.length)return;if(t.key===vi){const c=l[0];this.root.setHighlightedNode(c)}else if(t.key===Vr){const c=l[l.length-1];this.root.setHighlightedNode(c)}return}if(t.key===zh){this.root.handleClose();return}if((t.key===Ur||t.key===Wr&&_(this,Di).search.current==="")&&!t.isComposing&&(t.preventDefault(),Ct(this,vr,Xh).call(this)))return;if(t.key===Vr&&t.altKey&&this.root.handleClose(),xN.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===vi?h=VI(l,d,f):t.key===Vr?h=zI(l,d,f):t.key===q_?h=WI(l,d,10,f):t.key===Y_?h=HI(l,d,10,f):t.key===Ou?h=l[0]:t.key===Iu&&(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===Wr,a=this.root.getCandidateNodes();if(t.key!==zh){if(!n&&(i||s)){!_(this,Di).handleTypeaheadSearch(t.key,a)&&s&&(t.preventDefault(),Ct(this,vr,Xh).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?Ct(this,vr,Yh).call(this,t):this.root.handleClose())}onpointerup(t){t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?Ct(this,vr,Yh).call(this,t):this.root.handleClose())}get props(){return g(_(this,nl))}set props(t){R(_(this,nl),t)}}Di=new WeakMap,Oo=new WeakMap,vr=new WeakSet,A0=function(){this.root.opts.open.current=!0,_(this,Oo).resetTypeahead(),_(this,Di).resetTypeahead()},Yh=function(t){Ct(this,vr,A0).call(this)},Xh=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)},nl=new WeakMap;var rl,il,Rd,ol,sl;class PN{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,rl,bt(null));L(this,il,bt(!1));L(this,Rd,I(()=>{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)"}}));Z(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()});Z(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Z(this,"onOpenAutoFocus",t=>{t.preventDefault()});Z(this,"onCloseAutoFocus",t=>{t.preventDefault()});L(this,ol,I(()=>({open:this.root.opts.open.current})));L(this,sl,I(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":yi(this.root.opts.open.current),[this.root.bitsAttrs.content]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...g(_(this,Rd))},onpointermove:this.onpointermove})));Z(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,jt({...t,onRefChange:i=>{this.root.contentNode=i},deps:()=>this.root.opts.open.current}),Tg(()=>{this.root.contentNode=null,this.isPositioned=!1}),ae(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}get viewportNode(){return g(_(this,rl))}set viewportNode(t){R(_(this,rl),t,!0)}get isPositioned(){return g(_(this,il))}set isPositioned(t){R(_(this,il),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get snippetProps(){return g(_(this,ol))}set snippetProps(t){R(_(this,ol),t)}get props(){return g(_(this,sl))}set props(t){R(_(this,sl),t)}}rl=new WeakMap,il=new WeakMap,Rd=new WeakMap,ol=new WeakMap,sl=new WeakMap;var al,ll,ul,cl,dl;class kN{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,al,I(()=>this.root.includesItem(this.opts.value.current)));L(this,ll,I(()=>this.root.highlightedValue===this.opts.value.current));Z(this,"prevHighlighted",new z_(()=>this.isHighlighted));L(this,ul,bt(!1));L(this,cl,I(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));L(this,dl,I(()=>({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":Kn(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,jt({...t,deps:()=>this.mounted}),ae([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),ae(()=>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 g(_(this,al))}set isSelected(t){R(_(this,al),t)}get isHighlighted(){return g(_(this,ll))}set isHighlighted(t){R(_(this,ll),t)}get mounted(){return g(_(this,ul))}set mounted(t){R(_(this,ul),t,!0)}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 g(_(this,cl))}set snippetProps(t){R(_(this,cl),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Wh){Me(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 g(_(this,dl))}set props(t){R(_(this,dl),t)}}al=new WeakMap,ll=new WeakMap,ul=new WeakMap,cl=new WeakMap,dl=new WeakMap;var fl,hl;class EN{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,fl,bt(null));L(this,hl,I(()=>{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,jt(t)}get labelNode(){return g(_(this,fl))}set labelNode(t){R(_(this,fl),t,!0)}get props(){return g(_(this,hl))}set props(t){R(_(this,hl),t)}}fl=new WeakMap,hl=new WeakMap;var gl;class TN{constructor(t,n){Z(this,"opts");Z(this,"group");L(this,gl,I(()=>({id:this.opts.id.current,[this.group.root.bitsAttrs["group-label"]]:""})));this.opts=t,this.group=n,jt({...t,onRefChange:i=>{n.labelNode=i}})}get props(){return g(_(this,gl))}set props(t){R(_(this,gl),t)}}gl=new WeakMap;var pl,vl;class IN{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,pl,I(()=>this.root.opts.name.current!==""));L(this,vl,I(()=>({disabled:U_(this.root.opts.disabled.current),required:dT(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=n,this.onfocus=this.onfocus.bind(this)}get shouldRender(){return g(_(this,pl))}set shouldRender(t){R(_(this,pl),t)}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 g(_(this,vl))}set props(t){R(_(this,vl),t)}}pl=new WeakMap,vl=new WeakMap;var ml,bl;class ON{constructor(t,n){Z(this,"opts");Z(this,"content");Z(this,"root");L(this,ml,bt(0));L(this,bl,I(()=>({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,jt({...t,onRefChange:i=>{this.content.viewportNode=i},deps:()=>this.root.opts.open.current})}get prevScrollTop(){return g(_(this,ml))}set prevScrollTop(t){R(_(this,ml),t,!0)}get props(){return g(_(this,bl))}set props(t){R(_(this,bl),t)}}ml=new WeakMap,bl=new WeakMap;var _l,wl;class C0{constructor(t,n){Z(this,"opts");Z(this,"content");Z(this,"root");Z(this,"autoScrollTimer",null);Z(this,"userScrollTimer",-1);Z(this,"isUserScrolling",!1);Z(this,"onAutoScroll",ie);L(this,_l,bt(!1));L(this,wl,I(()=>({id:this.opts.id.current,"aria-hidden":lT(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave})));this.opts=t,this.content=n,this.root=n.root,jt({...t,deps:()=>this.mounted}),ae([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),we(()=>{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 g(_(this,_l))}set mounted(t){R(_(this,_l),t,!0)}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 g(_(this,wl))}set props(t){R(_(this,wl),t)}}_l=new WeakMap,wl=new WeakMap;var yl,xl;class NN{constructor(t){Z(this,"scrollButtonState");Z(this,"content");Z(this,"root");L(this,yl,bt(!1));Z(this,"scrollIntoViewTimer",null);Z(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});Z(this,"handleAutoScroll",()=>{const t=this.content.viewportNode,n=this.root.highlightedNode;!t||!n||(t.scrollTop=t.scrollTop+n.offsetHeight)});L(this,xl,I(()=>({...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,ae([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Me(this.content.viewportNode,"scroll",()=>this.handleScroll())}),ae(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=Eu(5,()=>{const n=this.root.highlightedNode;n==null||n.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}get canScrollDown(){return g(_(this,yl))}set canScrollDown(t){R(_(this,yl),t,!0)}get props(){return g(_(this,xl))}set props(t){R(_(this,xl),t)}}yl=new WeakMap,xl=new WeakMap;var Sl,Al;class RN{constructor(t){Z(this,"scrollButtonState");Z(this,"content");Z(this,"root");L(this,Sl,bt(!1));Z(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});Z(this,"handleAutoScroll",()=>{!this.content.viewportNode||!this.root.highlightedNode||(this.content.viewportNode.scrollTop=this.content.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});L(this,Al,I(()=>({...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,ae([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Me(this.content.viewportNode,"scroll",()=>this.handleScroll())})}get canScrollUp(){return g(_(this,Sl))}set canScrollUp(t){R(_(this,Sl),t,!0)}get props(){return g(_(this,Al))}set props(t){R(_(this,Al),t)}}Sl=new WeakMap,Al=new WeakMap;const zo=new on("Select.Root | Combobox.Root"),P0=new on("Select.Group | Combobox.Group"),qd=new on("Select.Content | Combobox.Content");function MN(e){const{type:t,...n}=e,i=t==="single"?new SN(n):new AN(n);return zo.set(i)}function LN(e){return qd.set(new PN(e,zo.get()))}function FN(e){return new CN(e,zo.get())}function DN(e){return new kN(e,zo.get())}function BN(e){return new ON(e,qd.get())}function VN(e){return new RN(new C0(e,qd.get()))}function zN(e){return new NN(new C0(e,qd.get()))}function WN(e){return P0.set(new EN(e,zo.get()))}function HN(e){return new TN(e,P0.get())}function UN(e){return new IN(e,zo.get())}const GN=["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"];function KN(e){const t=e.isCombobox,n={};for(const i of GN)n[i]=t?`data-combobox-${i}`:`data-select-${i}`;return n}function Pb(e,t){ct(t,!0);let n=E(t,"value",15,"");const i=UN({value:F.with(()=>n())});var s=K(),a=D(s);{var l=c=>{Lg(c,Ot(()=>i.props,{get value(){return n()},set value(d){n(d)}}))};_t(a,c=>{i.shouldRender&&c(l)})}A(e,s),dt()}function k0(e,t){ct(t,!0),gN({id:F.with(()=>t.id),virtualEl:F.with(()=>t.virtualEl)});var n=K(),i=D(n);st(i,()=>t.children??St),A(e,n),dt()}function qN(e,t){ct(t,!0);let n=E(t,"side",3,"bottom"),i=E(t,"sideOffset",3,0),s=E(t,"align",3,"center"),a=E(t,"alignOffset",3,0),l=E(t,"arrowPadding",3,0),c=E(t,"avoidCollisions",3,!0),d=E(t,"collisionBoundary",19,()=>[]),f=E(t,"collisionPadding",3,0),h=E(t,"hideWhenDetached",3,!1),p=E(t,"onPlaced",3,()=>{}),m=E(t,"sticky",3,"partial"),b=E(t,"updatePositionStrategy",3,"optimized"),y=E(t,"strategy",3,"fixed"),x=E(t,"dir",3,"ltr"),S=E(t,"style",19,()=>({})),C=E(t,"wrapperId",19,$t),T=E(t,"customAnchor",3,null);const N=hN({side:F.with(()=>n()),sideOffset:F.with(()=>i()),align:F.with(()=>s()),alignOffset:F.with(()=>a()),id:F.with(()=>t.id),arrowPadding:F.with(()=>l()),avoidCollisions:F.with(()=>c()),collisionBoundary:F.with(()=>d()),collisionPadding:F.with(()=>f()),hideWhenDetached:F.with(()=>h()),onPlaced:F.with(()=>p()),sticky:F.with(()=>m()),updatePositionStrategy:F.with(()=>b()),strategy:F.with(()=>y()),dir:F.with(()=>x()),style:F.with(()=>S()),enabled:F.with(()=>t.enabled),wrapperId:F.with(()=>C()),customAnchor:F.with(()=>T())}),B=I(()=>Vt(N.wrapperProps,{style:{pointerEvents:"auto"}}));var W=K(),z=D(W);st(z,()=>t.content??St,()=>({props:N.props,wrapperProps:g(B)})),A(e,W),dt()}function YN(e,t){ct(t,!0),yg(()=>{var s;(s=t.onPlaced)==null||s.call(t)});var n=K(),i=D(n);st(i,()=>t.content??St,()=>({props:{},wrapperProps:{}})),A(e,n),dt()}function XN(e,t){let n=E(t,"isStatic",3,!1),i=xt(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var s=K(),a=D(s);{var l=d=>{YN(d,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=d=>{qN(d,Ot({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};_t(a,d=>{n()?d(l):d(c,!1)})}A(e,s)}var ZN=J("<!> <!>",1);function E0(e,t){ct(t,!0);let n=E(t,"interactOutsideBehavior",3,"close"),i=E(t,"trapFocus",3,!0),s=E(t,"isValidEvent",3,()=>!1),a=E(t,"customAnchor",3,null),l=E(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"]);XN(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 p=()=>h==null?void 0:h().props,m=()=>h==null?void 0:h().wrapperProps;var b=ZN(),y=D(b);{var x=T=>{nd(T,{get preventScroll(){return t.preventScroll}})},S=T=>{var N=K(),B=D(N);{var W=z=>{nd(z,{get preventScroll(){return t.preventScroll}})};_t(B,z=>{t.forceMount||z(W)},!0)}A(T,N)};_t(y,T=>{t.forceMount&&t.enabled?T(x):T(S,!1)})}var C=vt(y,2);{const T=(B,W)=>{let z=()=>W==null?void 0:W().props;n0(B,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},children:(M,q)=>{e0(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:(rt,ht)=>{let H=()=>ht==null?void 0:ht().props;l0(rt,{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:(it,Y)=>{var nt=K(),ot=D(nt);{let lt=I(()=>({props:Vt(c,p(),H(),z(),{style:{pointerEvents:"auto"}}),wrapperProps:m()}));st(ot,()=>t.popper??St,()=>g(lt))}A(it,nt)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})};let N=I(()=>t.enabled&&i());s0(C,{get id(){return t.id},get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get trapFocus(){return g(N)},get forceMount(){return t.forceMount},focusScope:T,$$slots:{focusScope:!0}})}A(f,b)},$$slots:{content:!0}}),dt()}function T0(e,t){let n=E(t,"interactOutsideBehavior",3,"close"),i=E(t,"trapFocus",3,!0),s=E(t,"isValidEvent",3,()=>!1),a=E(t,"customAnchor",3,null),l=E(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"]);Hd(e,Ot({get id(){return t.id},get present(){return t.present}},()=>c,{presence:f=>{E0(f,Ot({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 I0(e,t){let n=E(t,"interactOutsideBehavior",3,"close"),i=E(t,"trapFocus",3,!0),s=E(t,"isValidEvent",3,()=>!1),a=E(t,"customAnchor",3,null),l=E(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"]);E0(e,Ot({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 QN=J("<div><div><!></div></div>"),JN=J("<div><div><!></div></div>");function jN(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"forceMount",3,!1),a=E(t,"side",3,"bottom"),l=E(t,"onInteractOutside",3,ie),c=E(t,"onEscapeKeydown",3,ie),d=E(t,"preventScroll",3,!1),f=xt(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll"]);const h=LN({id:F.with(()=>n()),ref:F.with(()=>i(),S=>i(S)),onInteractOutside:F.with(()=>l()),onEscapeKeydown:F.with(()=>c())}),p=I(()=>Vt(f,h.props));var m=K(),b=D(m);{var y=S=>{I0(S,Ot(()=>g(p),()=>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:(T,N)=>{let B=()=>N==null?void 0:N().props,W=()=>N==null?void 0:N().wrapperProps;const z=I(()=>Vt(B(),{style:h.props.style}));var M=K(),q=D(M);{var $=ht=>{var H=K(),it=D(H);{let Y=I(()=>({props:g(z),wrapperProps:W(),...h.snippetProps}));st(it,()=>t.child,()=>g(Y))}A(ht,H)},rt=ht=>{var H=QN();Mt(H,()=>({...W()}));var it=Q(H);Mt(it,()=>({...g(z)}));var Y=Q(it);st(Y,()=>t.children??St),X(it),X(H),A(ht,H)};_t(q,ht=>{t.child?ht($):ht(rt,!1)})}A(T,M)},$$slots:{popper:!0}}))},x=S=>{var C=K(),T=D(C);{var N=B=>{T0(B,Ot(()=>g(p),()=>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:(z,M)=>{let q=()=>M==null?void 0:M().props,$=()=>M==null?void 0:M().wrapperProps;const rt=I(()=>Vt(q(),{style:h.props.style}));var ht=K(),H=D(ht);{var it=nt=>{var ot=K(),lt=D(ot);{let ut=I(()=>({props:g(rt),wrapperProps:$(),...h.snippetProps}));st(lt,()=>t.child,()=>g(ut))}A(nt,ot)},Y=nt=>{var ot=JN();Mt(ot,()=>({...$()}));var lt=Q(ot);Mt(lt,()=>({...g(rt)}));var ut=Q(lt);st(ut,()=>t.children??St),X(lt),X(ot),A(nt,ot)};_t(H,nt=>{t.child?nt(it):nt(Y,!1)})}A(z,ht)},$$slots:{popper:!0}}))};_t(T,B=>{s()||B(N)},!0)}A(S,C)};_t(b,S=>{s()?S(y):S(x,!1)})}A(e,m),dt()}function qg(e,t){ct(t,!0);let n=E(t,"mounted",15,!1),i=E(t,"onMountedChange",3,ie);Ig(()=>(n(!0),i()(!0),()=>{n(!1),i()(!1)})),dt()}var $N=J("<div><!></div>"),tR=J("<!> <!>",1);function eR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"label",19,()=>t.value),a=E(t,"disabled",3,!1),l=E(t,"onHighlight",3,ie),c=E(t,"onUnhighlight",3,ie),d=xt(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const f=DN({id:F.with(()=>n()),ref:F.with(()=>i(),S=>i(S)),value:F.with(()=>t.value),disabled:F.with(()=>a()),label:F.with(()=>s()),onHighlight:F.with(()=>l()),onUnhighlight:F.with(()=>c())}),h=I(()=>Vt(d,f.props));var p=tR(),m=D(p);{var b=S=>{var C=K(),T=D(C);{let N=I(()=>({props:g(h),...f.snippetProps}));st(T,()=>t.child,()=>g(N))}A(S,C)},y=S=>{var C=$N();Mt(C,()=>({...g(h)}));var T=Q(C);st(T,()=>t.children??St,()=>f.snippetProps),X(C),A(S,C)};_t(m,S=>{t.child?S(b):S(y,!1)})}var x=vt(m,2);qg(x,{get mounted(){return f.mounted},set mounted(S){f.mounted=S}}),A(e,p),dt()}var nR=J("<div><!></div>");function rR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=WN({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=nR();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}var iR=J("<div><!></div>");function oR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children"]);const a=HN({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=iR();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}var sR=J("<div><!></div>");function aR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=BN({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=sR();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}var lR=J("<div><!></div>"),uR=J("<!> <!>",1);function cR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"delay",3,()=>50),a=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=zN({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p)),delay:F.with(()=>s())}),c=I(()=>Vt(a,l.props));var d=K(),f=D(d);{var h=p=>{var m=uR(),b=D(m);qg(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(C){l.scrollButtonState.mounted=C}});var y=vt(b,2);{var x=C=>{var T=K(),N=D(T);st(N,()=>t.child,()=>({props:a})),A(C,T)},S=C=>{var T=lR();Mt(T,()=>({...g(c)}));var N=Q(T);st(N,()=>t.children??St),X(T),A(C,T)};_t(y,C=>{t.child?C(x):C(S,!1)})}A(p,m)};_t(f,p=>{l.canScrollDown&&p(h)})}A(e,d),dt()}var dR=J("<div><!></div>"),fR=J("<!> <!>",1);function hR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"delay",3,()=>50),a=xt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=VN({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p)),delay:F.with(()=>s())}),c=I(()=>Vt(a,l.props));var d=K(),f=D(d);{var h=p=>{var m=fR(),b=D(m);qg(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(C){l.scrollButtonState.mounted=C}});var y=vt(b,2);{var x=C=>{var T=K(),N=D(T);st(N,()=>t.child,()=>({props:a})),A(C,T)},S=C=>{var T=dR();Mt(T,()=>({...g(c)}));var N=Q(T);st(N,()=>t.children??St),X(T),A(C,T)};_t(y,C=>{t.child?C(x):C(S,!1)})}A(p,m)};_t(f,p=>{l.canScrollUp&&p(h)})}A(e,d),dt()}function gR(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function pR(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}var O0={exports:{}};/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(function(e,t){(function(n,i){e.exports=i(n)})(dr,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})})(O0);var vR=O0.exports;const N0=M_(vR),mR="data-command-root",bR="data-command-list",_R="data-command-input",wR="data-command-empty",R0="data-command-group",M0="data-command-group-items",L0="data-command-group-heading",F0="data-command-item",yR="data-command-input-label",Ri="data-value",as=`[${R0}]`,mh=`[${M0}]`,xR=`[${L0}]`,D0=`[${F0}]`,bh=`${D0}:not([aria-disabled="true"])`,Yi=new on("Command.Root"),SR=new on("Command.List"),Mu=new on("Command.Group"),kb={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var No,Cl,Pl,kl,El,Tl,Il,Jt,B0,Kc,Zh,qc,Yc,Xc,co,V0,Qh,Jh,jh,Ol;class AR{constructor(t){L(this,Jt);Z(this,"opts");L(this,No,!1);Z(this,"sortAfterTick",!1);Z(this,"sortAndFilterAfterTick",!1);Z(this,"allItems",new Set);Z(this,"allGroups",new Map);Z(this,"allIds",new Map);L(this,Cl,bt(0));L(this,Pl,bt(null));L(this,kl,bt(null));L(this,El,bt(null));L(this,Tl,bt(kb));L(this,Il,bt(Sn(kb)));L(this,Ol,I(()=>({id:this.opts.id.current,role:"application",[mR]:"",tabindex:-1,onkeydown:this.onkeydown})));this.opts=t;const n={...this._commandState,value:this.opts.value.current??""};this._commandState=n,this.commandState=n,jt(t),this.onkeydown=this.onkeydown.bind(this)}get key(){return g(_(this,Cl))}set key(t){R(_(this,Cl),t,!0)}get viewportNode(){return g(_(this,Pl))}set viewportNode(t){R(_(this,Pl),t,!0)}get inputNode(){return g(_(this,kl))}set inputNode(t){R(_(this,kl),t,!0)}get labelNode(){return g(_(this,El))}set labelNode(t){R(_(this,El),t,!0)}get commandState(){return g(_(this,Tl))}set commandState(t){R(_(this,Tl),t)}get _commandState(){return g(_(this,Il))}set _commandState(t){R(_(this,Il),t,!0)}setState(t,n,i){Object.is(this._commandState[t],n)||(this._commandState[t]=n,t==="search"?(Ct(this,Jt,Xc).call(this),Ct(this,Jt,qc).call(this)):t==="value"&&(i||Ct(this,Jt,V0).call(this)),Ct(this,Jt,Kc).call(this))}setValue(t,n){t!==this.opts.value.current&&t===""&&On(()=>{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(bh)).filter(i=>!!i):[]}updateSelectedToIndex(t){const i=this.getValidItems()[t];i&&this.setValue(i.getAttribute(Ri)??"")}updateSelectedByItem(t){const n=Ct(this,Jt,co).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(Ri)??"")}updateSelectedByGroup(t){const n=Ct(this,Jt,co).call(this);let i=n==null?void 0:n.closest(as),s;for(;i&&!s;)i=t>0?gR(i,as):pR(i,as),s=i==null?void 0:i.querySelector(bh);s?this.setValue(s.getAttribute(Ri)??""):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,Ct(this,Jt,Zh).call(this,t,n)),this.sortAfterTick||(this.sortAfterTick=!0,On(()=>{Ct(this,Jt,qc).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,On(()=>{Ct(this,Jt,Xc).call(this),Ct(this,Jt,qc).call(this),this.sortAndFilterAfterTick=!1})),Ct(this,Jt,Kc).call(this),()=>{const i=Ct(this,Jt,co).call(this);this.allIds.delete(t),this.allItems.delete(t),this.commandState.filtered.items.delete(t),Ct(this,Jt,Xc).call(this),(i==null?void 0:i.getAttribute("id"))===t&&Ct(this,Jt,Yc).call(this),Ct(this,Jt,Kc).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 gT:case pT:{this.opts.vimBindings.current&&t.ctrlKey&&Ct(this,Jt,Jh).call(this,t);break}case vi:Ct(this,Jt,Jh).call(this,t);break;case hT:case vT:{this.opts.vimBindings.current&&t.ctrlKey&&Ct(this,Jt,jh).call(this,t);break}case Vr:Ct(this,Jt,jh).call(this,t);break;case Ou:t.preventDefault(),this.updateSelectedToIndex(0);break;case Iu:t.preventDefault(),Ct(this,Jt,Qh).call(this);break;case Ur:if(!t.isComposing&&t.keyCode!==229){t.preventDefault();const n=Ct(this,Jt,co).call(this);n&&(n==null||n.click())}}}get props(){return g(_(this,Ol))}set props(t){R(_(this,Ol),t)}}No=new WeakMap,Cl=new WeakMap,Pl=new WeakMap,kl=new WeakMap,El=new WeakMap,Tl=new WeakMap,Il=new WeakMap,Jt=new WeakSet,B0=function(){return k_(this._commandState)},Kc=function(){_(this,No)||(me(this,No,!0),On(()=>{var i,s;me(this,No,!1);const t=Ct(this,Jt,B0).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))}))},Zh=function(t,n){const i=this.opts.filter.current??H0;return t?i(t,this._commandState.search,n):0},qc=function(){var l;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Ct(this,Jt,Yc).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 p=t.get(h);f=Math.max(p??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"),p=t.get(f)??0;return(t.get(h)??0)-p});for(const c of s){const d=c.closest(mh);if(d){const f=c.parentElement===d?c:c.closest(`${mh} > *`);f&&d.appendChild(f)}else{const f=c.parentElement===i?c:c.closest(`${mh} > *`);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(`${as}[${Ri}="${N0(c[0])}"]`);(l=d==null?void 0:d.parentElement)==null||l.appendChild(d)}Ct(this,Jt,Yc).call(this)},Yc=function(){On(()=>{const t=this.getValidItems().find(i=>i.getAttribute("aria-disabled")!=="true"),n=t==null?void 0:t.getAttribute(Ri);this.setValue(n||"")})},Xc=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=Ct(this,Jt,Zh).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},co=function(){const t=this.opts.ref.current;if(!t)return;const n=t.querySelector(`${bh}[data-selected]`);if(n)return n},V0=function(){On(()=>{var s,a,l,c;const t=Ct(this,Jt,co).call(this);if(!t)return;const n=(s=t.parentElement)==null?void 0:s.parentElement;if(!n)return;const i=WT(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(as))==null?void 0:c.querySelector(xR);d==null||d.scrollIntoView({block:"nearest"});return}t.scrollIntoView({block:"nearest"})})},Qh=function(){return this.updateSelectedToIndex(this.getValidItems().length-1)},Jh=function(t){t.preventDefault(),t.metaKey?Ct(this,Jt,Qh).call(this):t.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)},jh=function(t){t.preventDefault(),t.metaKey?this.updateSelectedToIndex(0):t.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},Ol=new WeakMap;var Nl,Rl,Ml;class CR{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Nl,!0);L(this,Rl,I(()=>this.root._commandState.filtered.count===0&&_(this,Nl)===!1||this.opts.forceMount.current));L(this,Ml,I(()=>({id:this.opts.id.current,role:"presentation",[wR]:""})));this.opts=t,this.root=n,zd(()=>{me(this,Nl,!1)}),jt({...t,deps:()=>this.shouldRender})}get shouldRender(){return g(_(this,Rl))}set shouldRender(t){R(_(this,Rl),t)}get props(){return g(_(this,Ml))}set props(t){R(_(this,Ml),t)}}Nl=new WeakMap,Rl=new WeakMap,Ml=new WeakMap;var Ll,Fl,Dl,Bl;class PR{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Ll,bt(null));L(this,Fl,bt(""));L(this,Dl,I(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));L(this,Bl,I(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[R0]:""})));this.opts=t,this.root=n,this.trueValue=t.value.current??t.id.current,jt({...t,deps:()=>this.shouldRender}),ae(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),we(()=>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 g(_(this,Ll))}set headingNode(t){R(_(this,Ll),t,!0)}get trueValue(){return g(_(this,Fl))}set trueValue(t){R(_(this,Fl),t,!0)}get shouldRender(){return g(_(this,Dl))}set shouldRender(t){R(_(this,Dl),t)}get props(){return g(_(this,Bl))}set props(t){R(_(this,Bl),t)}}Ll=new WeakMap,Fl=new WeakMap,Dl=new WeakMap,Bl=new WeakMap;var Vl;class kR{constructor(t,n){Z(this,"opts");Z(this,"group");L(this,Vl,I(()=>({id:this.opts.id.current,[L0]:""})));this.opts=t,this.group=n,jt({...t,onRefChange:i=>{this.group.headingNode=i}})}get props(){return g(_(this,Vl))}set props(t){R(_(this,Vl),t)}}Vl=new WeakMap;var zl;class ER{constructor(t,n){Z(this,"opts");Z(this,"group");L(this,zl,I(()=>{var t;return{id:this.opts.id.current,role:"group",[M0]:"","aria-labelledby":((t=this.group.headingNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.group=n,jt(t)}get props(){return g(_(this,zl))}set props(t){R(_(this,zl),t)}}zl=new WeakMap;var Md,Wl;class TR{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Md,I(()=>{var n;const t=(n=this.root.viewportNode)==null?void 0:n.querySelector(`${D0}[${Ri}="${N0(this.root.opts.value.current)}"]`);if(t)return(t==null?void 0:t.getAttribute("id"))??void 0}));L(this,Wl,I(()=>{var t,n;return{id:this.opts.id.current,type:"text",[_R]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":Tu(!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":g(_(this,Md))}}));this.opts=t,this.root=n,jt({...t,onRefChange:i=>{this.root.inputNode=i}}),ae(()=>this.opts.ref.current,()=>{const i=this.opts.ref.current;i&&this.opts.autofocus.current&&Eu(10,()=>i.focus())}),ae(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}get props(){return g(_(this,Wl))}set props(t){R(_(this,Wl),t)}}Md=new WeakMap,Wl=new WeakMap;var Bi,Ld,Hl,Ul,Gl,Ui,z0,$h,Kl;class IR{constructor(t,n){L(this,Ui);Z(this,"opts");Z(this,"root");L(this,Bi,null);L(this,Ld,I(()=>{var t;return this.opts.forceMount.current||((t=_(this,Bi))==null?void 0:t.opts.forceMount.current)===!0}));L(this,Hl,bt(""));L(this,Ul,I(()=>{if(this.opts.ref.current,g(_(this,Ld))||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}));L(this,Gl,I(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));L(this,Kl,I(()=>({id:this.opts.id.current,"aria-disabled":Og(this.opts.disabled.current),"aria-selected":aT(this.isSelected),"data-disabled":Kn(this.opts.disabled.current),"data-selected":cT(this.isSelected),"data-value":this.trueValue,[F0]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick})));this.opts=t,this.root=n,me(this,Bi,Mu.getOr(null)),this.trueValue=t.value.current,jt({...t,deps:()=>!!this.root.commandState.search}),ae([()=>this.trueValue,()=>{var i;return(i=_(this,Bi))==null?void 0:i.trueValue},()=>this.opts.forceMount.current],()=>{var i;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(i=_(this,Bi))==null?void 0:i.trueValue)}),ae([()=>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(Ri,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}get trueValue(){return g(_(this,Hl))}set trueValue(t){R(_(this,Hl),t,!0)}get shouldRender(){return g(_(this,Ul))}set shouldRender(t){R(_(this,Ul),t)}get isSelected(){return g(_(this,Gl))}set isSelected(t){R(_(this,Gl),t)}onpointermove(t){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Ct(this,Ui,$h).call(this)}onclick(t){this.opts.disabled.current||Ct(this,Ui,z0).call(this)}get props(){return g(_(this,Kl))}set props(t){R(_(this,Kl),t)}}Bi=new WeakMap,Ld=new WeakMap,Hl=new WeakMap,Ul=new WeakMap,Gl=new WeakMap,Ui=new WeakSet,z0=function(){var t;this.opts.disabled.current||(Ct(this,Ui,$h).call(this),(t=this.opts.onSelect)==null||t.current())},$h=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},Kl=new WeakMap;var ql;class OR{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,ql,I(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[bR]:""})));this.opts=t,this.root=n,jt(t)}get props(){return g(_(this,ql))}set props(t){R(_(this,ql),t)}}ql=new WeakMap;var Yl;class NR{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Yl,I(()=>{var t;return{id:this.opts.id.current,[yR]:"",for:(t=this.opts.for)==null?void 0:t.current,style:D_}}));this.opts=t,this.root=n,jt({...t,onRefChange:i=>{this.root.labelNode=i}})}get props(){return g(_(this,Yl))}set props(t){R(_(this,Yl),t)}}Yl=new WeakMap;function RR(e){return Yi.set(new AR(e))}function MR(e){return new CR(e,Yi.get())}function LR(e){const t=Mu.getOr(null);return new IR({...e,group:t},Yi.get())}function FR(e){return Mu.set(new PR(e,Yi.get()))}function DR(e){return new kR(e,Mu.get())}function BR(e){return new ER(e,Mu.get())}function VR(e){return new TR(e,Yi.get())}function zR(e){return SR.set(new OR(e,Yi.get()))}function WR(e){return new NR(e,Yi.get())}var HR=J("<label><!></label>");function UR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children"]);const a=WR({id:F.with(()=>n()),ref:F.with(()=>i(),f=>i(f))}),l=I(()=>Vt(s,a.props));var c=HR();Mt(c,()=>({...g(l)}));var d=Q(c);st(d,()=>t.children??St),X(c),A(e,c),dt()}var GR=J("<!> <!>",1),KR=J("<div><!> <!></div>");function qR(e,t){ct(t,!0);const n=rt=>{UR(rt,{children:(ht,H)=>{fe();var it=Ce();Ht(()=>he(it,p())),A(ht,it)},$$slots:{default:!0}})};let i=E(t,"id",19,$t),s=E(t,"ref",15,null),a=E(t,"value",15,""),l=E(t,"onValueChange",3,ie),c=E(t,"onStateChange",3,ie),d=E(t,"loop",3,!1),f=E(t,"shouldFilter",3,!0),h=E(t,"filter",3,H0),p=E(t,"label",3,""),m=E(t,"vimBindings",3,!0),b=E(t,"disablePointerSelection",3,!1),y=xt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","children","child"]);const x=RR({id:F.with(()=>i()),ref:F.with(()=>s(),rt=>s(rt)),filter:F.with(()=>h()),shouldFilter:F.with(()=>f()),loop:F.with(()=>d()),value:F.with(()=>a(),rt=>{a()!==rt&&(a(rt),l()(rt))}),vimBindings:F.with(()=>m()),disablePointerSelection:F.with(()=>b()),onStateChange:F.with(()=>c())}),S=rt=>x.updateSelectedToIndex(rt),C=rt=>x.updateSelectedByGroup(rt),T=rt=>x.updateSelectedByItem(rt),N=()=>x.getValidItems(),B=I(()=>Vt(y,x.props));var W={updateSelectedToIndex:S,updateSelectedByGroup:C,updateSelectedByItem:T,getValidItems:N},z=K(),M=D(z);{var q=rt=>{var ht=GR(),H=D(ht);n(H);var it=vt(H,2);st(it,()=>t.child,()=>({props:g(B)})),A(rt,ht)},$=rt=>{var ht=KR();Mt(ht,()=>({...g(B)}));var H=Q(ht);n(H);var it=vt(H,2);st(it,()=>t.children??St),X(ht),A(rt,ht)};_t(M,rt=>{t.child?rt(q):rt($,!1)})}return A(e,z),dt(W)}var YR=J("<div><!></div>");function XR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"forceMount",3,!1),a=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const l=MR({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p)),forceMount:F.with(()=>s())}),c=I(()=>Vt(l.props,a));var d=K(),f=D(d);{var h=p=>{var m=K(),b=D(m);{var y=S=>{var C=K(),T=D(C);st(T,()=>t.child,()=>({props:g(c)})),A(S,C)},x=S=>{var C=YR();Mt(C,()=>({...g(c)}));var T=Q(C);st(T,()=>t.children??St),X(C),A(S,C)};_t(b,S=>{t.child?S(y):S(x,!1)})}A(p,m)};_t(f,p=>{l.shouldRender&&p(h)})}A(e,d),dt()}var ZR=J("<div><!></div>");function QR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"value",3,""),a=E(t,"forceMount",3,!1),l=xt(t,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const c=FR({id:F.with(()=>n()),ref:F.with(()=>i(),b=>i(b)),forceMount:F.with(()=>a()),value:F.with(()=>s())}),d=I(()=>Vt(l,c.props));var f=K(),h=D(f);{var p=b=>{var y=K(),x=D(y);st(x,()=>t.child,()=>({props:g(d)})),A(b,y)},m=b=>{var y=ZR();Mt(y,()=>({...g(d)}));var x=Q(y);st(x,()=>t.children??St),X(y),A(b,y)};_t(h,b=>{t.child?b(p):b(m,!1)})}A(e,f),dt()}var JR=J("<div><!></div>");function jR(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=DR({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=JR();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}var $R=J("<div><!></div>"),t3=J('<div style="display: contents;"><!></div>');function e3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=BR({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props));var c=t3(),d=Q(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=$R();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}X(c),A(e,c),dt()}var n3=J("<input/>");function r3(e,t){ct(t,!0);let n=E(t,"value",15,""),i=E(t,"autofocus",3,!1),s=E(t,"id",19,$t),a=E(t,"ref",15,null),l=xt(t,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const c=VR({id:F.with(()=>s()),ref:F.with(()=>a(),b=>a(b)),value:F.with(()=>n(),b=>{n(b)}),autofocus:F.with(()=>i()??!1)}),d=I(()=>Vt(l,c.props));var f=K(),h=D(f);{var p=b=>{var y=K(),x=D(y);st(x,()=>t.child,()=>({props:g(d)})),A(b,y)},m=b=>{var y=n3();Mt(y,()=>({...g(d)}),void 0,void 0,void 0,!0),I_(y,n),A(b,y)};_t(h,b=>{t.child?b(p):b(m,!1)})}A(e,f),dt()}var i3=J("<div><!></div>"),o3=J('<div style="display: contents;" data-item-wrapper=""><!></div>');function s3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"value",3,""),a=E(t,"disabled",3,!1),l=E(t,"onSelect",3,ie),c=E(t,"forceMount",3,!1),d=E(t,"keywords",19,()=>[]),f=xt(t,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const h=LR({id:F.with(()=>n()),ref:F.with(()=>i(),y=>i(y)),value:F.with(()=>s()),disabled:F.with(()=>a()),onSelect:F.with(()=>l()),forceMount:F.with(()=>c()),keywords:F.with(()=>d())}),p=I(()=>Vt(f,h.props));var m=K(),b=D(m);go(b,()=>h.root.key,y=>{var x=o3(),S=Q(x);{var C=T=>{var N=K(),B=D(N);{var W=M=>{var q=K(),$=D(q);st($,()=>t.child,()=>({props:g(p)})),A(M,q)},z=M=>{var q=i3();Mt(q,()=>({...g(p)}));var $=Q(q);st($,()=>t.children??St),X(q),A(M,q)};_t(B,M=>{t.child?M(W):M(z,!1)})}A(T,N)};_t(S,T=>{h.shouldRender&&T(C)})}X(x),Ht(()=>Ve(x,"data-value",h.trueValue)),A(y,x)}),A(e,m),dt()}var a3=J("<div><!></div>");function l3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const a=zR({id:F.with(()=>n()),ref:F.with(()=>i(),f=>i(f)),ariaLabel:F.with(()=>t["aria-label"]??"Suggestions...")}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);go(d,()=>a.root._commandState.search==="",f=>{var h=K(),p=D(h);{var m=y=>{var x=K(),S=D(x);st(S,()=>t.child,()=>({props:g(l)})),A(y,x)},b=y=>{var x=a3();Mt(x,()=>({...g(l)}));var S=Q(x);st(S,()=>t.children??St),X(x),A(y,x)};_t(p,y=>{t.child?y(m):y(b,!1)})}A(f,h)}),A(e,c),dt()}const Eb=1,u3=.9,c3=.8,d3=.17,_h=.1,wh=.999,f3=.9999,h3=.99,g3=/[\\/_+.#"@[({&]/,p3=/[\\/_+.#"@[({&]/g,v3=/[\s-]/,W0=/[\s-]/g;function tg(e,t,n,i,s,a,l){if(a===t.length)return s===e.length?Eb:h3;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,p,m,b,y;for(;f>=0;)p=tg(e,t,n,i,f+1,a+1,l),p>h&&(f===s?p*=Eb:g3.test(e.charAt(f-1))?(p*=c3,b=e.slice(s,f-1).match(p3),b&&s>0&&(p*=wh**b.length)):v3.test(e.charAt(f-1))?(p*=u3,y=e.slice(s,f-1).match(W0),y&&s>0&&(p*=wh**y.length)):(p*=d3,s>0&&(p*=wh**(f-s))),e.charAt(f)!==t.charAt(a)&&(p*=f3)),(p<_h&&n.charAt(f-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(f-1)!==i.charAt(a))&&(m=tg(e,t,n,i,f+1,a+2,l),m*_h>p&&(p=m*_h)),p>h&&(h=p),f=n.indexOf(d,f+1);return l[c]=h,h}function Tb(e){return e.toLowerCase().replace(W0," ")}function H0(e,t,n){return e=n&&n.length>0?`${`${e} ${n==null?void 0:n.join(" ")}`}`:e,tg(e,t,Tb(e),Tb(t),0,0,{})}var Xl,Zl;class m3{constructor(t){Z(this,"opts");L(this,Xl,bt(null));L(this,Zl,bt(null));this.opts=t}get contentNode(){return g(_(this,Xl))}set contentNode(t){R(_(this,Xl),t,!0)}get triggerNode(){return g(_(this,Zl))}set triggerNode(t){R(_(this,Zl),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}}Xl=new WeakMap,Zl=new WeakMap;var Fd,U0,Ql;class b3{constructor(t,n){L(this,Fd);Z(this,"opts");Z(this,"root");L(this,Ql,I(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Tu(this.root.opts.open.current),"data-state":yi(this.root.opts.open.current),"aria-controls":Ct(this,Fd,U0).call(this),"data-popover-trigger":"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick})));this.opts=t,this.root=n,jt({...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===Ur||t.key===Wr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return g(_(this,Ql))}set props(t){R(_(this,Ql),t)}}Fd=new WeakSet,U0=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},Ql=new WeakMap;var Jl,jl;class _3{constructor(t,n){Z(this,"opts");Z(this,"root");Z(this,"onInteractOutside",t=>{this.opts.onInteractOutside.current(t),!(t.defaultPrevented||!X_(t.target)||t.target.closest("[data-popover-trigger]")===this.root.triggerNode)&&this.root.handleClose()});Z(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Z(this,"onCloseAutoFocus",t=>{var n;this.opts.onCloseAutoFocus.current(t),!t.defaultPrevented&&(t.preventDefault(),(n=this.root.triggerNode)==null||n.focus())});L(this,Jl,I(()=>({open:this.root.opts.open.current})));L(this,jl,I(()=>({id:this.opts.id.current,tabindex:-1,"data-state":yi(this.root.opts.open.current),"data-popover-content":"",style:{pointerEvents:"auto"}})));Z(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onCloseAutoFocus:this.onCloseAutoFocus});this.opts=t,this.root=n,jt({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i}})}get snippetProps(){return g(_(this,Jl))}set snippetProps(t){R(_(this,Jl),t)}get props(){return g(_(this,jl))}set props(t){R(_(this,jl),t)}}Jl=new WeakMap,jl=new WeakMap;const Yg=new on("Popover.Root");function w3(e){return Yg.set(new m3(e))}function y3(e){return new b3(e,Yg.get())}function x3(e){return new _3(e,Yg.get())}var S3=J("<div><div><!></div></div>"),A3=J("<div><div><!></div></div>");function C3(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=E(t,"forceMount",3,!1),a=E(t,"onCloseAutoFocus",3,ie),l=E(t,"onEscapeKeydown",3,ie),c=E(t,"onInteractOutside",3,ie),d=E(t,"trapFocus",3,!0),f=E(t,"preventScroll",3,!1),h=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll"]);const p=x3({id:F.with(()=>i()),ref:F.with(()=>n(),C=>n(C)),onInteractOutside:F.with(()=>c()),onEscapeKeydown:F.with(()=>l()),onCloseAutoFocus:F.with(()=>a())}),m=I(()=>Vt(h,p.props));var b=K(),y=D(b);{var x=C=>{I0(C,Ot(()=>g(m),()=>p.popperProps,{get enabled(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!0,popper:(N,B)=>{let W=()=>B==null?void 0:B().props,z=()=>B==null?void 0:B().wrapperProps;const M=I(()=>Vt(W(),{style:Cb("popover")}));var q=K(),$=D(q);{var rt=H=>{var it=K(),Y=D(it);{let nt=I(()=>({props:g(M),wrapperProps:z(),...p.snippetProps}));st(Y,()=>t.child,()=>g(nt))}A(H,it)},ht=H=>{var it=S3();Mt(it,()=>({...z()}));var Y=Q(it);Mt(Y,()=>({...g(M)}));var nt=Q(Y);st(nt,()=>t.children??St),X(Y),X(it),A(H,it)};_t($,H=>{t.child?H(rt):H(ht,!1)})}A(N,q)},$$slots:{popper:!0}}))},S=C=>{var T=K(),N=D(T);{var B=W=>{T0(W,Ot(()=>g(m),()=>p.popperProps,{get present(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!1,popper:(M,q)=>{let $=()=>q==null?void 0:q().props,rt=()=>q==null?void 0:q().wrapperProps;const ht=I(()=>Vt($(),{style:Cb("popover")}));var H=K(),it=D(H);{var Y=ot=>{var lt=K(),ut=D(lt);{let pt=I(()=>({props:g(ht),wrapperProps:rt(),...p.snippetProps}));st(ut,()=>t.child,()=>g(pt))}A(ot,lt)},nt=ot=>{var lt=A3();Mt(lt,()=>({...rt()}));var ut=Q(lt);Mt(ut,()=>({...g(ht)}));var pt=Q(ut);st(pt,()=>t.children??St),X(ut),X(lt),A(ot,lt)};_t(it,ot=>{t.child?ot(Y):ot(nt,!1)})}A(M,H)},$$slots:{popper:!0}}))};_t(N,W=>{s()||W(B)},!0)}A(C,T)};_t(y,C=>{s()?C(x):C(S,!1)})}A(e,b),dt()}var P3=J("<button><!></button>");function k3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"type",3,"button"),a=E(t,"disabled",3,!1),l=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled"]);const c=y3({id:F.with(()=>n()),ref:F.with(()=>i(),m=>i(m)),disabled:F.with(()=>!!a())}),d=I(()=>Vt(l,c.props,{type:s()})),f=Yr(),[h,p]=f;k0(e,{get id(){return n()},children:(m,b)=>{var y=K(),x=D(y);{var S=T=>{var N=K(),B=D(N);st(B,()=>t.child,()=>({props:g(d)})),A(T,N)},C=T=>{var N=P3();Mt(N,W=>({...W}),[()=>p({...g(d)},[{attribute_name:"formaction"}])]);var B=Q(N);st(B,()=>t.children??St),X(N),A(T,N)};_t(x,T=>{t.child?T(S):T(C,!1)})}A(m,y)},$$slots:{default:!0}}),dt()}function E3(e,t){ct(t,!0);let n=E(t,"open",15,!1),i=E(t,"onOpenChange",3,ie);OT({variant:F.with(()=>"dialog"),open:F.with(()=>n(),l=>{n(l),i()(l)})});var s=K(),a=D(s);st(a,()=>t.children??St),A(e,s),dt()}var T3=J("<button><!></button>");function G0(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const l=DT({variant:F.with(()=>"close"),id:F.with(()=>n()),ref:F.with(()=>i(),x=>i(x)),disabled:F.with(()=>!!s())}),c=I(()=>Vt(a,l.props)),d=Yr(),[f,h]=d;var p=K(),m=D(p);{var b=x=>{var S=K(),C=D(S);st(C,()=>t.child,()=>({props:g(c)})),A(x,S)},y=x=>{var S=T3();Mt(S,T=>({...T}),[()=>h({...g(c)},[{attribute_name:"formaction"}])]);var C=Q(S);st(C,()=>t.children??St),X(S),A(x,S)};_t(m,x=>{t.child?x(b):x(y,!1)})}A(e,p),dt()}var I3=J("<!> <!>",1),O3=J("<!> <div><!></div>",1);function K0(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"forceMount",3,!1),a=E(t,"onCloseAutoFocus",3,ie),l=E(t,"onOpenAutoFocus",3,ie),c=E(t,"onEscapeKeydown",3,ie),d=E(t,"onInteractOutside",3,ie),f=E(t,"trapFocus",3,!0),h=E(t,"preventScroll",3,!0),p=E(t,"restoreScrollDelay",3,null),m=xt(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const b=MT({id:F.with(()=>n()),ref:F.with(()=>i(),x=>i(x))}),y=I(()=>Vt(m,b.props));{const x=C=>{{const T=(B,W)=>{let z=()=>W==null?void 0:W().props;n0(B,Ot(()=>g(y),{get enabled(){return b.root.opts.open.current},onEscapeKeydown:M=>{c()(M),!M.defaultPrevented&&b.root.handleClose()},children:(M,q)=>{e0(M,Ot(()=>g(y),{get enabled(){return b.root.opts.open.current},onInteractOutside:$=>{d()($),!$.defaultPrevented&&b.root.handleClose()},children:($,rt)=>{l0($,Ot(()=>g(y),{get enabled(){return b.root.opts.open.current},children:(ht,H)=>{var it=K(),Y=D(it);{var nt=lt=>{var ut=I3(),pt=D(ut);{var wt=et=>{nd(et,{get preventScroll(){return h()},get restoreScrollDelay(){return p()}})};_t(pt,et=>{b.root.opts.open.current&&et(wt)})}var tt=vt(pt,2);{let et=I(()=>({props:Vt(g(y),z()),...b.snippetProps}));st(tt,()=>t.child,()=>g(et))}A(lt,ut)},ot=lt=>{var ut=O3(),pt=D(ut);nd(pt,{get preventScroll(){return h()}});var wt=vt(pt,2);Mt(wt,et=>({...et}),[()=>Vt(g(y),z())]);var tt=Q(wt);st(tt,()=>t.children??St),X(wt),A(lt,ut)};_t(Y,lt=>{t.child?lt(nt):lt(ot,!1)})}A(ht,it)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))};let N=I(()=>NI({forceMount:s(),present:b.root.opts.open.current,trapFocus:f(),open:b.root.opts.open.current}));s0(C,{loop:!0,get trapFocus(){return g(N)},get onOpenAutoFocus(){return l()},get id(){return n()},onCloseAutoFocus:B=>{var W;a()(B),!B.defaultPrevented&&((W=b.root.triggerNode)==null||W.focus())},focusScope:T,$$slots:{focusScope:!0}})}};let S=I(()=>b.root.opts.open.current||s());Hd(e,Ot(()=>g(y),{get forceMount(){return s()},get present(){return g(S)},presence:x,$$slots:{presence:!0}}))}dt()}const N3="data-label-root";var $l;class R3{constructor(t){Z(this,"opts");L(this,$l,I(()=>({id:this.opts.id.current,[N3]:"",onmousedown:this.onmousedown})));this.opts=t,this.onmousedown=this.onmousedown.bind(this),jt(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return g(_(this,$l))}set props(t){R(_(this,$l),t)}}$l=new WeakMap;function M3(e){return new R3(e)}var L3=J("<label><!></label>");function F3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=M3({id:F.with(()=>n()),ref:F.with(()=>i(),p=>i(p))}),l=I(()=>Vt(s,a.props,{for:t.for}));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=L3();Mt(m,()=>({...g(l),for:t.for}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}function D3(e,t){ct(t,!0);let n=E(t,"open",15,!1),i=E(t,"onOpenChange",3,ie);w3({open:F.with(()=>n(),s=>{n(s),i()(s)})}),y0(e,{children:(s,a)=>{var l=K(),c=D(l);st(c,()=>t.children??St),A(s,l)},$$slots:{default:!0}}),dt()}var B3=J("<!> <!>",1);function V3(e,t){ct(t,!0);let n=E(t,"value",15),i=E(t,"onValueChange",3,ie),s=E(t,"name",3,""),a=E(t,"disabled",3,!1),l=E(t,"open",15,!1),c=E(t,"onOpenChange",3,ie),d=E(t,"loop",3,!1),f=E(t,"scrollAlignment",3,"nearest"),h=E(t,"required",3,!1),p=E(t,"items",19,()=>[]),m=E(t,"allowDeselect",3,!1);function b(){n()===void 0&&n(t.type==="single"?"":[])}b(),ae.pre(()=>n(),()=>{b()});const y=MN({type:t.type,value:F.with(()=>n(),B=>{n(B),i()(B)}),disabled:F.with(()=>a()),required:F.with(()=>h()),open:F.with(()=>l(),B=>{l(B),c()(B)}),loop:F.with(()=>d()),scrollAlignment:F.with(()=>f()),name:F.with(()=>s()),isCombobox:!1,items:F.with(()=>p()),allowDeselect:F.with(()=>m())});var x=B3(),S=D(x);y0(S,{children:(B,W)=>{var z=K(),M=D(z);st(M,()=>t.children??St),A(B,z)},$$slots:{default:!0}});var C=vt(S,2);{var T=B=>{var W=K(),z=D(W);{var M=q=>{var $=K(),rt=D($);Gn(rt,17,()=>y.opts.value.current,ku,(ht,H)=>{Pb(ht,{get value(){return g(H)}})}),A(q,$)};_t(z,q=>{y.opts.value.current.length&&q(M)})}A(B,W)},N=B=>{Pb(B,{get value(){return y.opts.value.current},set value(W){y.opts.value.current=W}})};_t(C,B=>{Array.isArray(y.opts.value.current)?B(T):B(N,!1)})}A(e,x),dt()}var z3=J("<button><!></button>");function W3(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"type",3,"button"),a=xt(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const l=FN({id:F.with(()=>n()),ref:F.with(()=>i(),b=>i(b))}),c=I(()=>Vt(a,l.props,{type:s()})),d=Yr(),[f,h]=d;var p=K(),m=D(p);Tt(m,()=>k0,(b,y)=>{y(b,{get id(){return n()},children:(x,S)=>{var C=K(),T=D(C);{var N=W=>{var z=K(),M=D(z);st(M,()=>t.child,()=>({props:g(c)})),A(W,z)},B=W=>{var z=z3();Mt(z,q=>({...q}),[()=>h({...g(c)},[{attribute_name:"formaction"}])]);var M=Q(z);st(M,()=>t.children??St),X(z),A(W,z)};_t(T,W=>{t.child?W(N):W(B,!1)})}A(x,C)},$$slots:{default:!0}})}),A(e,p),dt()}function H3(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 q0(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 Y0(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 vo(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 Xg(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 U3="data-slider-root",sd="data-slider-thumb",G3="data-slider-range",X0="data-slider-tick";var tu,eu,Dd,nu;class Z0{constructor(t){Z(this,"opts");L(this,tu,bt(!1));L(this,eu,I(()=>this.opts.orientation.current==="horizontal"?this.opts.dir.current==="rtl"?"rl":"lr":this.opts.dir.current==="rtl"?"tb":"bt"));L(this,Dd,I(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current==="horizontal"?"pan-y":"pan-x"}));Z(this,"getAllThumbs",()=>{const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(`[${sd}]`)):[]});Z(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]});Z(this,"getPositionFromValue",t=>{const n=this.getThumbScale();return Xg([this.opts.min.current,this.opts.max.current],n)(t)});L(this,nu,I(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":Kn(this.opts.disabled.current),style:{touchAction:g(_(this,Dd))},[U3]:""})));this.opts=t,jt(t)}get isActive(){return g(_(this,tu))}set isActive(t){R(_(this,tu),t,!0)}get direction(){return g(_(this,eu))}set direction(t){R(_(this,eu),t)}isThumbActive(t){return this.isActive}get props(){return g(_(this,nu))}set props(t){R(_(this,nu),t)}}tu=new WeakMap,eu=new WeakMap,Dd=new WeakMap,nu=new WeakMap;var ru,iu,ou,su,au;class K3 extends Z0{constructor(n){super(n);Z(this,"opts");Z(this,"isMulti",!1);Z(this,"updateValue",n=>{this.opts.value.current=vo(n,this.opts.min.current,this.opts.max.current,this.opts.step.current)});Z(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})});Z(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;!Z_(a)||!i.contains(a)||(n.preventDefault(),s.focus(),this.isActive=!0,this.handlePointerMove(n))});Z(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(fr(()=>this.opts.value.current)),this.isActive=!1)});L(this,ru,I(()=>{const n=this.opts.value.current;return Array.from({length:1},()=>{const i=n,s=this.getPositionFromValue(i),a=q0(this.direction,s);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":Og(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,tabindex:this.opts.disabled.current?-1:0,style:a,[sd]:""}})}));L(this,iu,I(()=>this.thumbsPropsArr.map((n,i)=>i)));L(this,ou,I(()=>{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,p=Xg([0,(l-1)*s],this.getThumbScale()),m=f===0,b=f===l-1,y=m?0:b?-100:-50,x=Y0(this.direction,p(h),y),S=i+f*s,C=S<=c;return{"data-disabled":Kn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":C?"":void 0,"data-value":S,style:x,[X0]:""}})}));L(this,su,I(()=>this.ticksPropsArr.map((n,i)=>i)));L(this,au,I(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,Ig(()=>zr(Me(document,"pointerdown",this.handlePointerDown),Me(document,"pointerup",this.handlePointerUp),Me(document,"pointermove",this.handlePointerMove),Me(document,"pointerleave",this.handlePointerUp))),ae([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const c=f=>vo(f,s,a,i)===f,d=f=>vo(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),p=a+h*f+f/2,m=a+(h+1)*f+f/2,b=d>=p&&d<m?(h+1)*f+a:h*f+a;b<=l&&this.updateValue(b)}}get thumbsPropsArr(){return g(_(this,ru))}set thumbsPropsArr(n){R(_(this,ru),n)}get thumbsRenderArr(){return g(_(this,iu))}set thumbsRenderArr(n){R(_(this,iu),n)}get ticksPropsArr(){return g(_(this,ou))}set ticksPropsArr(n){R(_(this,ou),n)}get ticksRenderArr(){return g(_(this,su))}set ticksRenderArr(n){R(_(this,su),n)}get snippetProps(){return g(_(this,au))}set snippetProps(n){R(_(this,au),n)}}ru=new WeakMap,iu=new WeakMap,ou=new WeakMap,su=new WeakMap,au=new WeakMap;var lu,uu,Bd,cu,du,fu,hu,gu;class q3 extends Z0{constructor(n){super(n);Z(this,"opts");Z(this,"isMulti",!0);L(this,lu,bt(null));L(this,uu,bt(0));L(this,Bd,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}});Z(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})});Z(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=_(this,Bd).call(this,n);if(!s||!i)return;const a=n.target;!Z_(a)||!i.contains(a)||(n.preventDefault(),this.activeThumb=s,s.node.focus(),this.isActive=!0,this.handlePointerMove(n))});Z(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(fr(()=>this.opts.value.current)),this.isActive=!1)});Z(this,"getAllThumbs",()=>{const n=this.opts.ref.current;return n?Array.from(n.querySelectorAll(`[${sd}]`)):[]});Z(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(!BI(i,l))return;const c=l[i]>n?-1:1,d=()=>{var y;const m=i+c;l[i]=l[m],l[m]=n;const b=this.getAllThumbs();b.length&&((y=b[m])==null||y.focus(),this.activeThumb={node:b[m],idx:m})};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,p=this.opts.step.current;l[i]=vo(n,f,h,p),this.opts.value.current=l});L(this,cu,I(()=>{const n=this.opts.value.current;return Array.from({length:n.length||1},(i,s)=>{const a=fr(()=>this.currentThumbIdx);a<n.length&&fr(()=>{this.currentThumbIdx=a+1});const l=n[s],c=this.getPositionFromValue(l??0),d=q0(this.direction,c);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":l,"aria-disabled":Og(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":l,tabindex:this.opts.disabled.current?-1:0,style:d,[sd]:""}})}));L(this,du,I(()=>this.thumbsPropsArr.map((n,i)=>i)));L(this,fu,I(()=>{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,p=Xg([0,(l-1)*s],this.getThumbScale()),m=f===0,b=f===l-1,y=m?0:b?-100:-50,x=Y0(this.direction,p(h),y),S=i+f*s,C=c.length===1?S<=c[0]:c[0]<=S&&S<=c[c.length-1];return{"data-disabled":Kn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":C?"":void 0,"data-value":S,style:x,[X0]:""}})}));L(this,hu,I(()=>this.ticksPropsArr.map((n,i)=>i)));L(this,gu,I(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,Ig(()=>zr(Me(document,"pointerdown",this.handlePointerDown),Me(document,"pointerup",this.handlePointerUp),Me(document,"pointermove",this.handlePointerMove),Me(document,"pointerleave",this.handlePointerUp))),ae([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const c=f=>vo(f,s,a,i)===f,d=f=>vo(f,s,a,i);l.some(f=>!c(f))&&(this.opts.value.current=l.map(d))})}get activeThumb(){return g(_(this,lu))}set activeThumb(n){R(_(this,lu),n,!0)}get currentThumbIdx(){return g(_(this,uu))}set currentThumbIdx(n){R(_(this,uu),n,!0)}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,p=Math.floor((f-l)/h),m=l+p*h+h/2,b=l+(p+1)*h+h/2,y=f>=m&&f<b?(p+1)*h+l:p*h+l;y<=c&&this.updateValue(y,i)}}get thumbsPropsArr(){return g(_(this,cu))}set thumbsPropsArr(n){R(_(this,cu),n)}get thumbsRenderArr(){return g(_(this,du))}set thumbsRenderArr(n){R(_(this,du),n)}get ticksPropsArr(){return g(_(this,fu))}set ticksPropsArr(n){R(_(this,fu),n)}get ticksRenderArr(){return g(_(this,hu))}set ticksRenderArr(n){R(_(this,hu),n)}get snippetProps(){return g(_(this,gu))}set snippetProps(n){R(_(this,gu),n)}}lu=new WeakMap,uu=new WeakMap,Bd=new WeakMap,cu=new WeakMap,du=new WeakMap,fu=new WeakMap,hu=new WeakMap,gu=new WeakMap;const Y3=[G_,K_,Vr,vi,Ou,Iu];var pu,vu;class X3{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,pu,I(()=>{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",...H3(this.root.direction,t,n)}}));L(this,vu,I(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Kn(this.root.opts.disabled.current),style:this.rangeStyles,[G3]:""})));this.opts=t,this.root=n,jt(t)}get rangeStyles(){return g(_(this,pu))}set rangeStyles(t){R(_(this,pu),t)}get props(){return g(_(this,vu))}set props(t){R(_(this,vu),t)}}pu=new WeakMap,vu=new WeakMap;var Vd,$e,cn,mu;class Z3{constructor(t,n){L(this,$e);Z(this,"opts");Z(this,"root");L(this,Vd,I(()=>this.root.opts.disabled.current||this.opts.disabled.current));L(this,mu,I(()=>({...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,jt(t),this.onkeydown=this.onkeydown.bind(this)}onkeydown(t){if(g(_(this,Vd)))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),!Y3.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,p=this.root.opts.step.current;switch(t.key){case Ou:Ct(this,$e,cn).call(this,a);break;case Iu:Ct(this,$e,cn).call(this,l);break;case G_:if(f!=="horizontal")break;if(t.metaKey){const m=h==="rl"?l:a;Ct(this,$e,cn).call(this,m)}else h==="rl"&&d<l?Ct(this,$e,cn).call(this,d+p):h==="lr"&&d>a&&Ct(this,$e,cn).call(this,d-p);break;case K_:if(f!=="horizontal")break;if(t.metaKey){const m=h==="rl"?a:l;Ct(this,$e,cn).call(this,m)}else h==="rl"&&d>a?Ct(this,$e,cn).call(this,d-p):h==="lr"&&d<l&&Ct(this,$e,cn).call(this,d+p);break;case Vr:if(t.metaKey){const m=h==="tb"?a:l;Ct(this,$e,cn).call(this,m)}else h==="tb"&&d>a?Ct(this,$e,cn).call(this,d-p):h!=="tb"&&d<l&&Ct(this,$e,cn).call(this,d+p);break;case vi:if(t.metaKey){const m=h==="tb"?l:a;Ct(this,$e,cn).call(this,m)}else h==="tb"&&d<l?Ct(this,$e,cn).call(this,d+p):h!=="tb"&&d>a&&Ct(this,$e,cn).call(this,d-p);break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}get props(){return g(_(this,mu))}set props(t){R(_(this,mu),t)}}Vd=new WeakMap,$e=new WeakSet,cn=function(t){this.root.isMulti?this.root.updateValue(t,this.opts.index.current):this.root.updateValue(t)},mu=new WeakMap;const Zg=new on("Slider.Root");function Q3(e){const{type:t,...n}=e,i=t==="single"?new K3(n):new q3(n);return Zg.set(i)}function J3(e){return new X3(e,Zg.get())}function j3(e){return new Z3(e,Zg.get())}var $3=J("<span><!></span>");function tM(e,t){ct(t,!0);let n=E(t,"id",19,$t),i=E(t,"ref",15,null),s=E(t,"value",15),a=E(t,"onValueChange",3,ie),l=E(t,"onValueCommit",3,ie),c=E(t,"disabled",3,!1),d=E(t,"min",3,0),f=E(t,"max",3,100),h=E(t,"step",3,1),p=E(t,"dir",3,"ltr"),m=E(t,"autoSort",3,!0),b=E(t,"orientation",3,"horizontal"),y=E(t,"thumbPositioning",3,"contain"),x=xt(t,["$$slots","$$events","$$legacy","children","child","id","ref","value","type","onValueChange","onValueCommit","disabled","min","max","step","dir","autoSort","orientation","thumbPositioning"]);function S(){s()===void 0&&s(t.type==="single"?0:[])}S(),ae.pre(()=>s(),()=>{S()});const C=Q3({id:F.with(()=>n()),ref:F.with(()=>i(),M=>i(M)),value:F.with(()=>s(),M=>{s(M),a()(M)}),onValueCommit:F.with(()=>l()),disabled:F.with(()=>c()),min:F.with(()=>d()),max:F.with(()=>f()),step:F.with(()=>h()),dir:F.with(()=>p()),autoSort:F.with(()=>m()),orientation:F.with(()=>b()),thumbPositioning:F.with(()=>y()),type:t.type}),T=I(()=>Vt(x,C.props));var N=K(),B=D(N);{var W=M=>{var q=K(),$=D(q);{let rt=I(()=>({props:g(T),...C.snippetProps}));st($,()=>t.child,()=>g(rt))}A(M,q)},z=M=>{var q=$3();Mt(q,()=>({...g(T)}));var $=Q(q);st($,()=>t.children??St,()=>C.snippetProps),X(q),A(M,q)};_t(B,M=>{t.child?M(W):M(z,!1)})}A(e,N),dt()}var eM=J("<span><!></span>");function nM(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const a=J3({id:F.with(()=>i()),ref:F.with(()=>n(),p=>n(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);st(b,()=>t.child,()=>({props:g(l)})),A(p,m)},h=p=>{var m=eM();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}var rM=J("<span><!></span>");function iM(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=E(t,"disabled",3,!1),a=xt(t,["$$slots","$$events","$$legacy","children","child","ref","id","index","disabled"]);const l=j3({id:F.with(()=>i()),ref:F.with(()=>n(),m=>n(m)),index:F.with(()=>t.index),disabled:F.with(()=>s())}),c=I(()=>Vt(a,l.props));var d=K(),f=D(d);{var h=m=>{var b=K(),y=D(b);{let x=I(()=>({active:l.root.isThumbActive(l.opts.index.current),props:g(c)}));st(y,()=>t.child,()=>g(x))}A(m,b)},p=m=>{var b=rM();Mt(b,()=>({...g(c)}));var y=Q(b);{let x=I(()=>({active:l.root.isThumbActive(l.opts.index.current)}));st(y,()=>t.children??St,()=>g(x))}X(b),A(m,b)};_t(f,m=>{t.child?m(h):m(p,!1)})}A(e,d),dt()}const oM="data-switch-root",sM="data-switch-thumb";var bu,eg,_u,wu,yu;class aM{constructor(t){L(this,bu);Z(this,"opts");L(this,_u,I(()=>({"data-disabled":Kn(this.opts.disabled.current),"data-state":sT(this.opts.checked.current),"data-required":uT(this.opts.required.current)})));L(this,wu,I(()=>({checked:this.opts.checked.current})));L(this,yu,I(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:U_(this.opts.disabled.current),"aria-checked":H_(this.opts.checked.current,!1),"aria-required":W_(this.opts.required.current),[oM]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,jt(t),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){!(t.key===Ur||t.key===Wr)||this.opts.disabled.current||(t.preventDefault(),Ct(this,bu,eg).call(this))}onclick(t){this.opts.disabled.current||Ct(this,bu,eg).call(this)}get sharedProps(){return g(_(this,_u))}set sharedProps(t){R(_(this,_u),t)}get snippetProps(){return g(_(this,wu))}set snippetProps(t){R(_(this,wu),t)}get props(){return g(_(this,yu))}set props(t){R(_(this,yu),t)}}bu=new WeakSet,eg=function(){this.opts.checked.current=!this.opts.checked.current},_u=new WeakMap,wu=new WeakMap,yu=new WeakMap;var xu,Su;class lM{constructor(t){Z(this,"root");L(this,xu,I(()=>this.root.opts.name.current!==void 0));L(this,Su,I(()=>({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 g(_(this,xu))}set shouldRender(t){R(_(this,xu),t)}get props(){return g(_(this,Su))}set props(t){R(_(this,Su),t)}}xu=new WeakMap,Su=new WeakMap;var Au,Cu;class uM{constructor(t,n){Z(this,"opts");Z(this,"root");L(this,Au,I(()=>({checked:this.root.opts.checked.current})));L(this,Cu,I(()=>({...this.root.sharedProps,id:this.opts.id.current,[sM]:""})));this.opts=t,this.root=n,jt(t)}get snippetProps(){return g(_(this,Au))}set snippetProps(t){R(_(this,Au),t)}get props(){return g(_(this,Cu))}set props(t){R(_(this,Cu),t)}}Au=new WeakMap,Cu=new WeakMap;const Qg=new on("Switch.Root");function cM(e){return Qg.set(new aM(e))}function dM(){return new lM(Qg.get())}function fM(e){return new uM(e,Qg.get())}function hM(e,t){ct(t,!1);const n=dM();wg();var i=K(),s=D(i);{var a=l=>{Lg(l,Ot(()=>n.props))};_t(s,l=>{n.shouldRender&&l(a)})}A(e,i),dt()}var gM=J("<button><!></button>"),pM=J("<!> <!>",1);function vM(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=E(t,"disabled",3,!1),a=E(t,"required",3,!1),l=E(t,"checked",15,!1),c=E(t,"value",3,"on"),d=E(t,"name",3,void 0),f=E(t,"type",3,"button"),h=E(t,"onCheckedChange",3,ie),p=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const m=cM({checked:F.with(()=>l(),z=>{var M;l(z),(M=h())==null||M(z)}),disabled:F.with(()=>s()??!1),required:F.with(()=>a()),value:F.with(()=>c()),name:F.with(()=>d()),id:F.with(()=>i()),ref:F.with(()=>n(),z=>n(z))}),b=I(()=>Vt(p,m.props,{type:f()})),y=Yr(),[x,S]=y;var C=pM(),T=D(C);{var N=z=>{var M=K(),q=D(M);{let $=I(()=>({props:g(b),...m.snippetProps}));st(q,()=>t.child,()=>g($))}A(z,M)},B=z=>{var M=gM();Mt(M,$=>({...$}),[()=>S({...g(b)},[{attribute_name:"formaction"}])]);var q=Q(M);st(q,()=>t.children??St,()=>m.snippetProps),X(M),A(z,M)};_t(T,z=>{t.child?z(N):z(B,!1)})}var W=vt(T,2);hM(W,{}),A(e,C),dt()}var mM=J("<span><!></span>");function bM(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"id",19,$t),s=xt(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const a=fM({id:F.with(()=>i()),ref:F.with(()=>n(),p=>n(p))}),l=I(()=>Vt(s,a.props));var c=K(),d=D(c);{var f=p=>{var m=K(),b=D(m);{let y=I(()=>({props:g(l),...a.snippetProps}));st(b,()=>t.child,()=>g(y))}A(p,m)},h=p=>{var m=mM();Mt(m,()=>({...g(l)}));var b=Q(m);st(b,()=>t.children??St,()=>a.snippetProps),X(m),A(p,m)};_t(d,p=>{t.child?p(f):p(h,!1)})}A(e,c),dt()}const Jg="-",_M=e=>{const t=yM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const c=l.split(Jg);return c[0]===""&&c.length!==1&&c.shift(),Q0(c,t)||wM(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&i[l]?[...d,...i[l]]:d}}},Q0=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?Q0(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Jg);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},Ib=/^\[(.+)\]$/,wM=e=>{if(Ib.test(e)){const t=Ib.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yM=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return SM(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:Ob(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(xM(s)){ng(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{ng(l,Ob(t,a),n,i)})})},Ob=(e,t)=>{let n=e;return t.split(Jg).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},xM=e=>e.isThemeGetter,SM=(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,AM=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)}}},J0="!",CM=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,p;for(let S=0;S<c.length;S++){let C=c[S];if(f===0){if(C===s&&(i||c.slice(S,S+a)===t)){d.push(c.slice(h,S)),h=S+a;continue}if(C==="/"){p=S;continue}}C==="["?f++:C==="]"&&f--}const m=d.length===0?c:c.substring(h),b=m.startsWith(J0),y=b?m.substring(1):m,x=p&&p>h?p-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:x}};return n?c=>n({className:c,parseClassName:l}):l},PM=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},kM=e=>({cache:AM(e.cacheSize),parseClassName:CM(e),..._M(e)}),EM=/\s+/,TM=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(EM);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}=n(f);let y=!!b,x=i(y?m.substring(0,b):m);if(!x){if(!y){c=f+(c.length>0?" "+c:c);continue}if(x=i(m),!x){c=f+(c.length>0?" "+c:c);continue}y=!1}const S=PM(h).join(":"),C=p?S+J0:S,T=C+x;if(a.includes(T))continue;a.push(T);const N=s(x,y);for(let B=0;B<N.length;++B){const W=N[B];a.push(C+W)}c=f+(c.length>0?" "+c:c)}return c};function IM(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=j0(t))&&(i&&(i+=" "),i+=n);return i}const j0=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=j0(e[i]))&&(n&&(n+=" "),n+=t);return n};function OM(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,p)=>p(h),e());return n=kM(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=TM(d,n);return s(d,h),h}return function(){return a(IM.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$0=/^\[(?:([a-z-]+):)?(.+)\]$/i,NM=/^\d+\/\d+$/,RM=new Set(["px","full","screen"]),MM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LM=/\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$/,FM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tr=e=>mo(e)||RM.has(e)||NM.test(e),oi=e=>Wo(e,"length",qM),mo=e=>!!e&&!Number.isNaN(Number(e)),yh=e=>Wo(e,"number",mo),ls=e=>!!e&&Number.isInteger(Number(e)),VM=e=>e.endsWith("%")&&mo(e.slice(0,-1)),Xt=e=>$0.test(e),si=e=>MM.test(e),zM=new Set(["length","size","percentage"]),WM=e=>Wo(e,zM,tw),HM=e=>Wo(e,"position",tw),UM=new Set(["image","url"]),GM=e=>Wo(e,UM,XM),KM=e=>Wo(e,"",YM),us=()=>!0,Wo=(e,t,n)=>{const i=$0.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},qM=e=>LM.test(e)&&!FM.test(e),tw=()=>!1,YM=e=>DM.test(e),XM=e=>BM.test(e),ZM=()=>{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"),p=Ne("invert"),m=Ne("gap"),b=Ne("gradientColorStops"),y=Ne("gradientColorStopPositions"),x=Ne("inset"),S=Ne("margin"),C=Ne("opacity"),T=Ne("padding"),N=Ne("saturate"),B=Ne("scale"),W=Ne("sepia"),z=Ne("skew"),M=Ne("space"),q=Ne("translate"),$=()=>["auto","contain","none"],rt=()=>["auto","hidden","clip","visible","scroll"],ht=()=>["auto",Xt,t],H=()=>[Xt,t],it=()=>["",Tr,oi],Y=()=>["auto",mo,Xt],nt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ot=()=>["solid","dashed","dotted","double","none"],lt=()=>["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"],pt=()=>["","0",Xt],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],tt=()=>[mo,Xt];return{cacheSize:500,separator:":",theme:{colors:[us],spacing:[Tr,oi],blur:["none","",si,Xt],brightness:tt(),borderColor:[e],borderRadius:["none","","full",si,Xt],borderSpacing:H(),borderWidth:it(),contrast:tt(),grayscale:pt(),hueRotate:tt(),invert:pt(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[VM,oi],inset:ht(),margin:ht(),opacity:tt(),padding:H(),saturate:tt(),scale:tt(),sepia:pt(),skew:tt(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[si]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"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:[...nt(),Xt]}],overflow:[{overflow:rt()}],"overflow-x":[{"overflow-x":rt()}],"overflow-y":[{"overflow-y":rt()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ls,Xt]}],basis:[{basis:ht()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",ls,Xt]}],"grid-cols":[{"grid-cols":[us]}],"col-start-end":[{col:["auto",{span:["full",ls,Xt]},Xt]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[us]}],"row-start-end":[{row:["auto",{span:[ls,Xt]},Xt]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"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:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"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",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[si]},si]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",si,oi]}],"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:[us]}],"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",Xt]}],"line-clamp":[{"line-clamp":["none",mo,yh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Tr,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ot(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Tr,oi]}],"underline-offset":[{"underline-offset":["auto",Tr,Xt]}],"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:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],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",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...nt(),HM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"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":[C]}],"border-style":[{border:[...ot(),"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":[C]}],"divide-style":[{divide:ot()}],"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:["",...ot()]}],"outline-offset":[{"outline-offset":[Tr,Xt]}],"outline-w":[{outline:[Tr,oi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:it()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Tr,oi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",si,KM]}],"shadow-color":[{shadow:[us]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...lt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":lt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",si,Xt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[N]}],sepia:[{sepia:[W]}],"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":[p]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"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",Xt]}],duration:[{duration:tt()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:tt()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[ls,Xt]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],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",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Tr,oi,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"]}}},QM=OM(ZM);function le(...e){return QM(Vc(e))}function JM(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","value","class"]);var a=K(),l=D(a);{let c=I(()=>le("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t.class));Tt(l,()=>qR,(d,f)=>{f(d,Ot({get class(){return g(c)}},()=>s,{get value(){return i()},set value(h){i(h)},get ref(){return n()},set ref(h){n(h)}}))})}A(e,a),dt()}function ew(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("text-lg font-semibold leading-none tracking-tight",t.class));Tt(a,()=>VT,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}var jM=J("<div><!></div>");function $M(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=jM();Mt(s,l=>({class:l,...i}),[()=>le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)]);var a=Q(s);st(a,()=>t.children??St),X(s),jn(s,l=>n(l),()=>n()),A(e,s),dt()}var t5=J("<div><!></div>");function nw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=t5();Mt(s,l=>({class:l,...i}),[()=>le("flex flex-col space-y-1.5 text-center sm:text-left",t.class)]);var a=Q(s);st(a,()=>t.children??St),X(s),jn(s,l=>n(l),()=>n()),A(e,s),dt()}function rw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("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));Tt(a,()=>u0,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}var e5=J('<!> <span class="sr-only">Close</span>',1),n5=J("<!> <!>",1),r5=J("<!> <!>",1);function iw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children"]);var s=K(),a=D(s);Tt(a,()=>sw,(l,c)=>{c(l,Ot(()=>t.portalProps,{children:(d,f)=>{var h=r5(),p=D(h);Tt(p,()=>rw,(b,y)=>{y(b,{})});var m=vt(p,2);{let b=I(()=>le("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));Tt(m,()=>K0,(y,x)=>{x(y,Ot({get class(){return g(b)}},()=>i,{get ref(){return n()},set ref(S){n(S)},children:(S,C)=>{var T=n5(),N=D(T);st(N,()=>t.children??St);var B=vt(N,2);Tt(B,()=>G0,(W,z)=>{z(W,{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,q)=>{var $=e5(),rt=D($);Pg(rt,{class:"size-4"}),fe(2),A(M,$)},$$slots:{default:!0}})}),A(S,T)},$$slots:{default:!0}}))})}A(d,h)},$$slots:{default:!0}}))}),A(e,s),dt()}function i5(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("text-muted-foreground text-sm",t.class));Tt(a,()=>DI,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}const ow=E3,o5=LI,sw=Nu;function s5(e,t){ct(t,!0),E(t,"ref",11,null);let n=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var i=K(),s=D(i);{let a=I(()=>le("py-6 text-center text-sm",t.class));Tt(s,()=>XR,(l,c)=>{c(l,Ot({get class(){return g(a)}},()=>n))})}A(e,i),dt()}var a5=J("<!> <!>",1);function l5(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var s=K(),a=D(s);{let l=I(()=>le("text-foreground overflow-hidden p-1",t.class)),c=I(()=>t.value??t.heading??`----${$t()}`);Tt(a,()=>QR,(d,f)=>{f(d,Ot({get class(){return g(l)},get value(){return g(c)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,p)=>{var m=a5(),b=D(m);{var y=S=>{var C=K(),T=D(C);Tt(T,()=>jR,(N,B)=>{B(N,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(W,z)=>{fe();var M=Ce();Ht(()=>he(M,t.heading)),A(W,M)},$$slots:{default:!0}})}),A(S,C)};_t(b,S=>{t.heading&&S(y)})}var x=vt(b,2);Tt(x,()=>e3,(S,C)=>{C(S,{get children(){return t.children}})}),A(h,m)},$$slots:{default:!0}}))})}A(e,s),dt()}function u5(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("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));Tt(a,()=>s3,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}var c5=J('<div class="flex items-center border-b px-2" data-command-input-wrapper=""><!> <!></div>');function d5(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"value",15,""),s=xt(t,["$$slots","$$events","$$legacy","ref","class","value"]);var a=c5(),l=Q(a);jk(l,{class:"mr-2 size-4 shrink-0 opacity-50"});var c=vt(l,2);{let d=I(()=>le("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));Tt(c,()=>r3,(f,h)=>{h(f,Ot({get class(){return g(d)}},()=>s,{get ref(){return n()},set ref(p){n(p)},get value(){return i()},set value(p){i(p)}}))})}X(a),A(e,a),dt()}function f5(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("max-h-[300px] overflow-y-auto overflow-x-hidden",t.class));Tt(a,()=>l3,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}function aw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"sideOffset",3,4),s=E(t,"align",3,"center"),a=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);var l=K(),c=D(l);Tt(c,()=>Nu,(d,f)=>{f(d,Ot(()=>t.portalProps,{children:(h,p)=>{var m=K(),b=D(m);{let y=I(()=>le("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));Tt(b,()=>C3,(x,S)=>{S(x,Ot({get sideOffset(){return i()},get align(){return s()},get class(){return g(y)}},()=>a,{get ref(){return n()},set ref(C){n(C)}}))})}A(h,m)},$$slots:{default:!0}}))}),A(e,l),dt()}const lw=D3,uw=k3;var Nb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_n=e=>!e||typeof e!="object"||Object.keys(e).length===0,h5=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function cw(e,t){e.forEach(function(n){Array.isArray(n)?cw(n,t):t.push(n)})}function dw(e){let t=[];return cw(e,t),t}var fw=(...e)=>dw(e).filter(Boolean),hw=(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]=fw(c,l):typeof l=="object"&&typeof c=="object"?n[a]=hw(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},Rb=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const jg="-",g5=e=>{const t=v5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const c=l.split(jg);return c[0]===""&&c.length!==1&&c.shift(),gw(c,t)||p5(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&i[l]?[...d,...i[l]]:d}}},gw=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?gw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(jg);return(l=t.validators.find(({validator:c})=>c(a)))==null?void 0:l.classGroupId},Mb=/^\[(.+)\]$/,p5=e=>{if(Mb.test(e)){const t=Mb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},v5=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return b5(Object.entries(e.classGroups),n).forEach(([a,l])=>{rg(l,i,a,t)}),i},rg=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:Lb(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(m5(s)){rg(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{rg(l,Lb(t,a),n,i)})})},Lb=(e,t)=>{let n=e;return t.split(jg).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},m5=e=>e.isThemeGetter,b5=(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,_5=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)}}},pw="!",w5=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,p;for(let S=0;S<c.length;S++){let C=c[S];if(f===0){if(C===s&&(i||c.slice(S,S+a)===t)){d.push(c.slice(h,S)),h=S+a;continue}if(C==="/"){p=S;continue}}C==="["?f++:C==="]"&&f--}const m=d.length===0?c:c.substring(h),b=m.startsWith(pw),y=b?m.substring(1):m,x=p&&p>h?p-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:x}};return n?c=>n({className:c,parseClassName:l}):l},y5=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},x5=e=>({cache:_5(e.cacheSize),parseClassName:w5(e),...g5(e)}),S5=/\s+/,A5=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(S5);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}=n(f);let y=!!b,x=i(y?m.substring(0,b):m);if(!x){if(!y){c=f+(c.length>0?" "+c:c);continue}if(x=i(m),!x){c=f+(c.length>0?" "+c:c);continue}y=!1}const S=y5(h).join(":"),C=p?S+pw:S,T=C+x;if(a.includes(T))continue;a.push(T);const N=s(x,y);for(let B=0;B<N.length;++B){const W=N[B];a.push(C+W)}c=f+(c.length>0?" "+c:c)}return c};function C5(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vw(t))&&(i&&(i+=" "),i+=n);return i}const vw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=vw(e[i]))&&(n&&(n+=" "),n+=t);return n};function ig(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,p)=>p(h),e());return n=x5(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=A5(d,n);return s(d,h),h}return function(){return a(C5.apply(null,arguments))}}const Re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},mw=/^\[(?:([a-z-]+):)?(.+)\]$/i,P5=/^\d+\/\d+$/,k5=new Set(["px","full","screen"]),E5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T5=/\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$/,I5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,O5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ir=e=>bo(e)||k5.has(e)||P5.test(e),ai=e=>Ho(e,"length",z5),bo=e=>!!e&&!Number.isNaN(Number(e)),xh=e=>Ho(e,"number",bo),cs=e=>!!e&&Number.isInteger(Number(e)),R5=e=>e.endsWith("%")&&bo(e.slice(0,-1)),Zt=e=>mw.test(e),li=e=>E5.test(e),M5=new Set(["length","size","percentage"]),L5=e=>Ho(e,M5,bw),F5=e=>Ho(e,"position",bw),D5=new Set(["image","url"]),B5=e=>Ho(e,D5,H5),V5=e=>Ho(e,"",W5),ds=()=>!0,Ho=(e,t,n)=>{const i=mw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},z5=e=>T5.test(e)&&!I5.test(e),bw=()=>!1,W5=e=>O5.test(e),H5=e=>N5.test(e),og=()=>{const e=Re("colors"),t=Re("spacing"),n=Re("blur"),i=Re("brightness"),s=Re("borderColor"),a=Re("borderRadius"),l=Re("borderSpacing"),c=Re("borderWidth"),d=Re("contrast"),f=Re("grayscale"),h=Re("hueRotate"),p=Re("invert"),m=Re("gap"),b=Re("gradientColorStops"),y=Re("gradientColorStopPositions"),x=Re("inset"),S=Re("margin"),C=Re("opacity"),T=Re("padding"),N=Re("saturate"),B=Re("scale"),W=Re("sepia"),z=Re("skew"),M=Re("space"),q=Re("translate"),$=()=>["auto","contain","none"],rt=()=>["auto","hidden","clip","visible","scroll"],ht=()=>["auto",Zt,t],H=()=>[Zt,t],it=()=>["",Ir,ai],Y=()=>["auto",bo,Zt],nt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ot=()=>["solid","dashed","dotted","double","none"],lt=()=>["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"],pt=()=>["","0",Zt],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],tt=()=>[bo,Zt];return{cacheSize:500,separator:":",theme:{colors:[ds],spacing:[Ir,ai],blur:["none","",li,Zt],brightness:tt(),borderColor:[e],borderRadius:["none","","full",li,Zt],borderSpacing:H(),borderWidth:it(),contrast:tt(),grayscale:pt(),hueRotate:tt(),invert:pt(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[R5,ai],inset:ht(),margin:ht(),opacity:tt(),padding:H(),saturate:tt(),scale:tt(),sepia:pt(),skew:tt(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",Zt]}],container:["container"],columns:[{columns:[li]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"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:[...nt(),Zt]}],overflow:[{overflow:rt()}],"overflow-x":[{"overflow-x":rt()}],"overflow-y":[{"overflow-y":rt()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",cs,Zt]}],basis:[{basis:ht()}],"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:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",cs,Zt]}],"grid-cols":[{"grid-cols":[ds]}],"col-start-end":[{col:["auto",{span:["full",cs,Zt]},Zt]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[ds]}],"row-start-end":[{row:["auto",{span:[cs,Zt]},Zt]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"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:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"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:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"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:[li]},li]}],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",li,ai]}],"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:[ds]}],"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",Zt]}],"line-clamp":[{"line-clamp":["none",bo,xh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ir,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":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ot(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ir,ai]}],"underline-offset":[{"underline-offset":["auto",Ir,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:H()}],"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":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...nt(),F5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L5]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},B5]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"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":[C]}],"border-style":[{border:[...ot(),"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":[C]}],"divide-style":[{divide:ot()}],"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:["",...ot()]}],"outline-offset":[{"outline-offset":[Ir,Zt]}],"outline-w":[{outline:[Ir,ai]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:it()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Ir,ai]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",li,V5]}],"shadow-color":[{shadow:[ds]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...lt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":lt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",li,Zt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[p]}],saturate:[{saturate:[N]}],sepia:[{sepia:[W]}],"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":[p]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"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:tt()}],ease:[{ease:["linear","in","out","in-out",Zt]}],delay:[{delay:tt()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-x":[{"scale-x":[B]}],"scale-y":[{"scale-y":[B]}],rotate:[{rotate:[cs,Zt]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"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":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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:[Ir,ai,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"]}}},U5=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:s,extend:a={},override:l={}})=>{vs(e,"cacheSize",t),vs(e,"prefix",n),vs(e,"separator",i),vs(e,"experimentalParseClassName",s);for(const c in l)G5(e[c],l[c]);for(const c in a)K5(e[c],a[c]);return e},vs=(e,t,n)=>{n!==void 0&&(e[t]=n)},G5=(e,t)=>{if(t)for(const n in t)vs(e,n,t[n])},K5=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},q5=(e,...t)=>typeof e=="function"?ig(og,e,...t):ig(()=>U5(og(),e),...t),Y5=ig(og);var X5={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},_w=e=>e||void 0,Ps=(...e)=>_w(dw(e).filter(Boolean).join(" ")),Sh=null,Nr={},sg=!1,fs=(...e)=>t=>t.twMerge?((!Sh||sg)&&(sg=!1,Sh=_n(Nr)?Y5:q5({...Nr,extend:{theme:Nr.theme,classGroups:Nr.classGroups,conflictingClassGroupModifiers:Nr.conflictingClassGroupModifiers,conflictingClassGroups:Nr.conflictingClassGroups,...Nr.extend}})),_w(Sh(Ps(e)))):Ps(e),Fb=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=Ps(e[n],t[n]):e[n]=t[n];return e},$g=(e,t)=>{let{extend:n=null,slots:i={},variants:s={},compoundVariants:a=[],compoundSlots:l=[],defaultVariants:c={}}=e,d={...X5,...t},f=n!=null&&n.base?Ps(n.base,e==null?void 0:e.base):e==null?void 0:e.base,h=n!=null&&n.variants&&!_n(n.variants)?hw(s,n.variants):s,p=n!=null&&n.defaultVariants&&!_n(n.defaultVariants)?{...n.defaultVariants,...c}:c;!_n(d.twMergeConfig)&&!h5(d.twMergeConfig,Nr)&&(sg=!0,Nr=d.twMergeConfig);let m=_n(n==null?void 0:n.slots),b=_n(i)?{}:{base:Ps(e==null?void 0:e.base,m&&(n==null?void 0:n.base)),...i},y=m?b:Fb({...n==null?void 0:n.slots},_n(b)?{base:e==null?void 0:e.base}:b),x=_n(n==null?void 0:n.compoundVariants)?a:fw(n==null?void 0:n.compoundVariants,a),S=T=>{if(_n(h)&&_n(i)&&m)return fs(f,T==null?void 0:T.class,T==null?void 0:T.className)(d);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let N=(H,it,Y=[],nt)=>{let ot=Y;if(typeof it=="string")ot=ot.concat(Rb(it).split(" ").map(lt=>`${H}:${lt}`));else if(Array.isArray(it))ot=ot.concat(it.reduce((lt,ut)=>lt.concat(`${H}:${ut}`),[]));else if(typeof it=="object"&&typeof nt=="string"){for(let lt in it)if(it.hasOwnProperty(lt)&&lt===nt){let ut=it[lt];if(ut&&typeof ut=="string"){let pt=Rb(ut);ot[nt]?ot[nt]=ot[nt].concat(pt.split(" ").map(wt=>`${H}:${wt}`)):ot[nt]=pt.split(" ").map(wt=>`${H}:${wt}`)}else Array.isArray(ut)&&ut.length>0&&(ot[nt]=ut.reduce((pt,wt)=>pt.concat(`${H}:${wt}`),[]))}}return ot},B=(H,it=h,Y=null,nt=null)=>{var ot;let lt=it[H];if(!lt||_n(lt))return null;let ut=(ot=nt==null?void 0:nt[H])!=null?ot:T==null?void 0:T[H];if(ut===null)return null;let pt=Nb(ut),wt=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,tt=p==null?void 0:p[H],et=[];if(typeof pt=="object"&&wt)for(let[Dt,Kt]of Object.entries(pt)){let ye=lt[Kt];if(Dt==="initial"){tt=Kt;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Dt)||(et=N(Dt,ye,et,Y))}let yt=pt!=null&&typeof pt!="object"?pt:Nb(tt),Et=lt[yt||"false"];return typeof et=="object"&&typeof Y=="string"&&et[Y]?Fb(et,Et):et.length>0?(et.push(Et),Y==="base"?et.join(" "):et):Et},W=()=>h?Object.keys(h).map(H=>B(H,h)):null,z=(H,it)=>{if(!h||typeof h!="object")return null;let Y=new Array;for(let nt in h){let ot=B(nt,h,H,it),lt=H==="base"&&typeof ot=="string"?ot:ot&&ot[H];lt&&(Y[Y.length]=lt)}return Y},M={};for(let H in T)T[H]!==void 0&&(M[H]=T[H]);let q=(H,it)=>{var Y;let nt=typeof(T==null?void 0:T[H])=="object"?{[H]:(Y=T[H])==null?void 0:Y.initial}:{};return{...p,...M,...nt,...it}},$=(H=[],it)=>{let Y=[];for(let{class:nt,className:ot,...lt}of H){let ut=!0;for(let[pt,wt]of Object.entries(lt)){let tt=q(pt,it)[pt];if(Array.isArray(wt)){if(!wt.includes(tt)){ut=!1;break}}else{let et=yt=>yt==null||yt===!1;if(et(wt)&&et(tt))continue;if(tt!==wt){ut=!1;break}}}ut&&(nt&&Y.push(nt),ot&&Y.push(ot))}return Y},rt=H=>{let it=$(x,H);if(!Array.isArray(it))return it;let Y={};for(let nt of it)if(typeof nt=="string"&&(Y.base=fs(Y.base,nt)(d)),typeof nt=="object")for(let[ot,lt]of Object.entries(nt))Y[ot]=fs(Y[ot],lt)(d);return Y},ht=H=>{if(l.length<1)return null;let it={};for(let{slots:Y=[],class:nt,className:ot,...lt}of l){if(!_n(lt)){let ut=!0;for(let pt of Object.keys(lt)){let wt=q(pt,H)[pt];if(wt===void 0||(Array.isArray(lt[pt])?!lt[pt].includes(wt):lt[pt]!==wt)){ut=!1;break}}if(!ut)continue}for(let ut of Y)it[ut]=it[ut]||[],it[ut].push([nt,ot])}return it};if(!_n(i)||!m){let H={};if(typeof y=="object"&&!_n(y))for(let it of Object.keys(y))H[it]=Y=>{var nt,ot;return fs(y[it],z(it,Y),((nt=rt(Y))!=null?nt:[])[it],((ot=ht(Y))!=null?ot:[])[it],Y==null?void 0:Y.class,Y==null?void 0:Y.className)(d)};return H}return fs(f,W(),$(x),T==null?void 0:T.class,T==null?void 0:T.className)(d)},C=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return S.variantKeys=C(),S.extend=n,S.base=f,S.slots=y,S.variants=h,S.defaultVariants=p,S.compoundSlots=l,S.compoundVariants=x,S};const Db=$g({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 Z5=J("<a><!></a>"),Q5=J("<button><!></button>");function fn(e,t){ct(t,!0);let n=E(t,"variant",3,"default"),i=E(t,"size",3,"default"),s=E(t,"ref",15,null),a=E(t,"href",3,void 0),l=E(t,"type",3,"button"),c=xt(t,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","children"]);const d=Yr(),[f,h]=d;var p=K(),m=D(p);{var b=x=>{var S=Z5();Mt(S,T=>({...T}),[()=>h({class:le(Db({variant:n(),size:i()}),t.class),href:a(),...c},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]);var C=Q(S);st(C,()=>t.children??St),X(S),jn(S,T=>s(T),()=>s()),A(x,S)},y=x=>{var S=Q5();Mt(S,T=>({...T}),[()=>h({class:le(Db({variant:n(),size:i()}),t.class),type:l(),...c},[{attribute_name:"formaction"}])]);var C=Q(S);st(C,()=>t.children??St),X(S),jn(S,T=>s(T),()=>s()),A(x,S)};_t(m,x=>{a()?x(b):x(y,!1)})}A(e,p),dt()}const J5=(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)},uo=Ge({}),Oc=Ge(0),ww=()=>({customLabelColorsStore:uo,colorVersion:Oc,getCustomColor:a=>dn(uo)[a],setCustomColor:(a,l,c=1)=>{uo.update(d=>({...d,[a]:{color:l,alpha:c}})),Oc.update(d=>d+1)},hasCustomColor:a=>!!dn(uo)[a],deleteCustomColor:a=>{uo.update(l=>{const{[a]:c,...d}=l;return d}),Oc.update(l=>l+1)},clearCustomColors:()=>{uo.set({}),Oc.update(a=>a+1)}}),fo=(e,t=1)=>{t=Math.max(0,Math.min(t,1));const{getCustomColor:n,hasCustomColor:i}=ww();if(i(e)){const S=n(e);if(S)return((T,N)=>{const B=parseInt(T.slice(1,3),16),W=parseInt(T.slice(3,5),16),z=parseInt(T.slice(5,7),16);return{color:`rgba(${B}, ${W}, ${z}, ${N})`,contrastColor:`rgba(${255-B}, ${255-W}, ${255-z}, ${N})`}})(S.color,S.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((S,C)=>(S<<5)-S+C.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),p=Math.min(c,d,f);if(h-p===0)return{color:`rgba(255, 255, 255, ${t})`,contrastColor:`rgba(0, 0, 0, ${t})`};const b=255/h,y=`rgba(${Math.round(c*b)}, ${Math.round(d*b)}, ${Math.round(f*b)}, ${t})`,x=`rgba(${255-Math.round(c*b)}, ${255-Math.round(d*b)}, ${255-Math.round(f*b)}, ${t})`;return{color:y,contrastColor:x}},yw="en-US",ag=e=>new Intl.NumberFormat(yw,{}).format(e).toString(),j5=(e,t=3,n=0)=>new Intl.NumberFormat(yw,{maximumFractionDigits:t,minimumFractionDigits:n}).format(e).toString(),ms=e=>{if(e==null)return"null";if(typeof e=="string")return e;if(typeof e=="number")return Number.isInteger(e)?ag(e):j5(e);if(typeof e=="boolean")return e?"true":"false";if(Array.isArray(e))return e.length===0?"[]":e.length<=3&&e.every(t=>typeof t!="object"||t===null)?`[${e.map(t=>ms(t)).join(", ")}]`:`[${e.map(n=>ms(n)).join(", ")}]`;if(typeof e=="object"&&e!==null&&!Array.isArray(e)){const t=e,n=Object.keys(t);return n.length===0?"{}":n.length<=3&&n.every(s=>{const a=t[s];return typeof a!="object"||a===null||Array.isArray(a)})?`{${n.map(a=>`${a}: ${ms(t[a])}`).join(", ")}}`:`{
371
+ ${n.map(s=>{const a=ms(t[s]);return`${s}: ${a}`}).join(`
372
+ `)}
373
+ }`}return String(e)};var $5=J(" <!>",1),tL=J('<div class="flex items-center space-x-4"><!> <!></div>'),eL=J("<!> ",1),nL=J("<!> <!>",1),rL=J("<!> <!>",1),iL=J("<!> <!>",1);function tp(e,t){ct(t,!0);let n=bt(!1),i=bt(null);function s(){R(n,!1),bg().then(()=>{g(i).focus()})}let a=E(t,"name",3,"items"),l=E(t,"label",3,"Select an item"),c=E(t,"selectedItem",15,void 0),d=E(t,"placeholder",3,"Search an item..."),f=E(t,"className",3,""),h=E(t,"disabled",3,!1),p=E(t,"isLoading",3,!1),m=bt("");const b=I(()=>{var N;return(N=c())==null?void 0:N.value}),y=N=>{var B;c(N),(B=t.onSelect)==null||B.call(t,N),s()},x=N=>{const B={value:N,label:N};t.items.push(B),y(B)},S=N=>{N.key==="Enter"&&g(m)&&(x(g(m)),R(m,""),N.preventDefault()),N.stopPropagation()};var C=K(),T=D(C);Tt(T,()=>lw,(N,B)=>{B(N,{get open(){return g(n)},set open(W){R(n,W,!0)},children:(W,z)=>{var M=iL(),q=D(M);{const rt=(ht,H)=>{let it=()=>H==null?void 0:H().props;var Y=tL(),nt=Q(Y);{let ut=I(()=>le("w-[200px] justify-between",f()));fn(nt,Ot(it,{variant:"secondary",get disabled(){return h()},get class(){return g(ut)},role:"combobox",get"aria-expanded"(){return g(n)},"data-testid":"select-list-trigger",children:(pt,wt)=>{fe();var tt=$5(),et=D(tt),yt=vt(et);Gk(yt,{class:"opacity-50"}),Ht(()=>{var Et;return he(et,`${(((Et=c())==null?void 0:Et.label)||l())??""} `)}),A(pt,tt)},$$slots:{default:!0}}))}var ot=vt(nt,2);{var lt=ut=>{Xk(ut,{class:"mr-2 h-4 w-4 animate-spin"})};_t(ot,ut=>{p()&&ut(lt)})}X(Y),A(ht,Y)};Tt(q,()=>uw,(ht,H)=>{H(ht,{get ref(){return g(i)},set ref(it){R(i,it,!0)},child:rt,$$slots:{child:!0}})})}var $=vt(q,2);Tt($,()=>aw,(rt,ht)=>{ht(rt,{class:"w-[200px] p-0",children:(H,it)=>{var Y=K(),nt=D(Y);Tt(nt,()=>JM,(ot,lt)=>{lt(ot,{children:(ut,pt)=>{var wt=rL(),tt=D(wt);Tt(tt,()=>d5,(yt,Et)=>{Et(yt,{get placeholder(){return d()},onkeydown:S,"data-testid":"select-list-input",get value(){return g(m)},set value(Dt){R(m,Dt,!0)}})});var et=vt(tt,2);Tt(et,()=>f5,(yt,Et)=>{Et(yt,{children:(Dt,Kt)=>{var ye=nL(),Bt=D(ye);Tt(Bt,()=>s5,(Nt,te)=>{te(Nt,{children:(Ut,ge)=>{var re=K(),qt=D(re);{var be=xe=>{var We=K(),de=D(We);st(de,()=>t.notFound,()=>({inputValue:g(m)||""})),A(xe,We)},Gt=xe=>{var We=Ce("Item not found");A(xe,We)};_t(qt,xe=>{t.notFound?xe(be):xe(Gt,!1)})}A(Ut,re)},$$slots:{default:!0}})});var Pt=vt(Bt,2);Tt(Pt,()=>l5,(Nt,te)=>{te(Nt,{get value(){return a()},children:(Ut,ge)=>{var re=K(),qt=D(re);Gn(qt,17,()=>t.items,be=>be.value,(be,Gt)=>{var xe=K(),We=D(xe);Tt(We,()=>u5,(de,Ie)=>{Ie(de,{get value(){return g(Gt).value},onSelect:()=>y(g(Gt)),children:(Se,ee)=>{var pe=eL(),ke=D(pe);{let Xe=I(()=>le(g(b)!==g(Gt).value&&"text-transparent"));Ag(ke,{get class(){return g(Xe)}})}var en=vt(ke);Ht(()=>he(en,` ${g(Gt).label??""}`)),A(Se,pe)},$$slots:{default:!0}})}),A(be,xe)}),A(Ut,re)},$$slots:{default:!0}})}),A(Dt,ye)},$$slots:{default:!0}})}),A(ut,wt)},$$slots:{default:!0}})}),A(H,Y)},$$slots:{default:!0}})}),A(W,M)},$$slots:{default:!0}})}),A(e,C),dt()}const ep=()=>C_(Sg());var oL=J('<div class="text-md m-2">New label <span class="font-semibold"> </span> will be created.</div>');function np(e,t){ct(t,!0);var n=oL(),i=vt(Q(n)),s=Q(i);X(i),fe(),X(n),Ht(a=>{Rn(i,a),he(s,`"${t.label??""}"`)},[()=>`color: ${fo(t.label).color}`]),A(e,n),dt()}const rp=e=>e.map(n=>{const i=n.annotation_label_name;return{value:i,label:i}}).sort((n,i)=>n.label.localeCompare(i.label));var sL=J('<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>'),aL=J('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-hidden dark:[color-scheme:dark]"><!></div>');function lL(e,t){ct(t,!0);const n=()=>Be(a,"$result",i),[i,s]=Gi(),a=ep(),l=I(()=>rp(n().data||[]));xw(e,{className:"h-full",children:(c,d)=>{Sw(c,{className:"h-full flex flex-col",children:(f,h)=>{var p=aL(),m=Q(p);{let b=I(()=>`Selected annotations: ${t.selectedAnnotations.length}`);Mo(m,{get title(){return g(b)},children:(y,x)=>{var S=sL(),C=vt(Q(S),2);tp(C,{get items(){return g(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:(N,B)=>{let W=()=>B==null?void 0:B().inputValue;np(N,{get label(){return W()}})},$$slots:{notFound:!0}}),X(S),A(y,S)}})}X(p),A(f,p)},$$slots:{default:!0}})},$$slots:{default:!0}}),dt(),s()}const Bb=new Map,uL=e=>{const t=mk(e,{position:0,filterHash:""});return{initialize:()=>{Bb.get(e)||(t.set({position:0,filterHash:""}),Bb.set(e,!0))},savePosition:(a,l)=>{t.set({position:a,filterHash:l})},getRestoredPosition:a=>{const l=dn(t);return l.filterHash===a?l.position:0}}};function cL(e,t){const n=e.currentTarget.dataset.annotationId;t(n)}function dL(e,t){const n=e.currentTarget.dataset.annotationId,i=e.currentTarget.dataset.sampleId,s=e.currentTarget.dataset.index;zc(Wc.toSampleWithAnnotation({sampleId:i,annotationId:n,datasetId:t.dataset_id,annotationIndex:Number(s)}))}function fL(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.annotationId;t(n)}}var hL=J(`<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>`),gL=J('<div data-testid="annotation-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <!></div>'),pL=J('<div class="flex justify-center p-4"><!></div>'),vL=J("<!> <!>",1),mL=J('<div class="min-w-[250px] max-w-[30%] flex-1"><!></div>'),bL=J('<div class="flex h-full flex-1" data-testid="annotations-grid"><div class="viewport flex-1"><!></div> <!></div>');function f8(e,t){ct(t,!0);const n=()=>Be(m,"$showAnnotationTextLabelsStore",f),i=()=>Be(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",f),s=()=>Be(p,"$tagsSelected",f),a=()=>Be(g(q),"$infiniteAnnotations",f),l=()=>Be(nt,"$pickedAnnotationIds",f),c=()=>Be(b,"$isEditingMode",f),d=()=>Be(g(rt),"$isPending",f),[f,h]=Gi(),{tagsSelected:p}=Tk({dataset_id:t.dataset_id,kind:["annotation"]}),{showAnnotationTextLabelsStore:m}=_g(),{isEditingMode:b}=mi.data.globalStorage;let y=I(n);const{getDatasetVersion:x,setAnnotationsTotalCount:S}=xs();let C=bt("");const{initialize:T,savePosition:N,getRestoredPosition:B}=uL("annotations_scroll");yg(async()=>{T(),R(C,await x(t.dataset_id),!0)});let W=bt(null);const z=I(()=>({path:{dataset_id:t.dataset_id},query:{annotation_label_ids:i().length>0?i():void 0,tag_ids:s().size>0?Array.from(s()):void 0}})),M=I(()=>gE(g(z))),q=I(()=>g(M).annotations),$=I(()=>g(M).updateAnnotations),rt=I(()=>g(M).isPending);let ht=I(()=>i().join(",")+Array.from(s()).join(","));const H=I(()=>g(ht)),it=I(()=>B(g(H)));function Y(Pt){const Nt=Pt.target.scrollTop;N(Nt,g(H))}we(()=>{g(q).subscribe(Pt=>{Pt.isSuccess&&Pt.data.pages.length>0&&S(Pt.data.pages[0].total_count)})});const{selectedSampleAnnotationCropIds:nt,toggleSampleAnnotationCropSelection:ot,clearSelectedSampleAnnotationCrops:lt}=xs(),ut=16;function pt(Pt){Pt&&ot(Pt)}const wt=I(()=>{var Pt;return((Pt=a().data)==null?void 0:Pt.pages.flatMap(Nt=>Nt.data))||[]});function tt(){a().hasNextPage&&a().fetchNextPage()}const et=I(()=>g(wt).filter(Pt=>l().has(Pt.annotation_id))),yt=async Pt=>{await g($)(g(et).map(Nt=>({annotation_id:Nt.annotation_id,label_name:Pt.value,dataset_id:t.dataset_id}))),lt()};let Et=bt(600);we(()=>{if(!g(W))return;const Pt=new ResizeObserver(Nt=>{for(const te of Nt)R(Et,te.contentRect.height,!0)});return Pt.observe(g(W)),()=>{Pt.disconnect()}});var Dt=K(),Kt=D(Dt);{var ye=Pt=>{var Nt=hL();A(Pt,Nt)},Bt=Pt=>{var Nt=bL(),te=Q(Nt),Ut=Q(te);go(Ut,()=>g(ht),qt=>{{const be=(Se,ee)=>{let pe=()=>ee==null?void 0:ee().index,ke=()=>ee==null?void 0:ee().style;var en=K(),Xe=D(en);go(Xe,()=>a().dataUpdatedAt,hn=>{var Ke=gL();Ke.__click=[cL,pt],Ke.__dblclick=[dL,t],Ke.__keydown=[fL,pt];var oe=Q(Ke),Ee=Q(oe);{let sn=I(()=>l().has(g(wt)[pe()].annotation_id));Q4(Ee,{onSelect:()=>{},get isSelected(){return g(sn)}})}X(oe);var Le=vt(oe,2);{let sn=I(()=>l().has(g(wt)[pe()].annotation_id));PL(Le,{get annotation(){return g(wt)[pe()]},get width(){return t.itemWidth},get height(){return t.itemHeight},get cachedDatasetVersion(){return g(C)},get showLabel(){return g(y)},get selected(){return g(sn)}})}X(Ke),Ht(()=>{var sn,gn;Rn(Ke,ke()),Ve(Ke,"data-annotation-id",(sn=g(wt)[pe()])==null?void 0:sn.annotation_id),Ve(Ke,"data-sample-id",(gn=g(wt)[pe()])==null?void 0:gn.sample.sample_id),Ve(Ke,"data-index",pe()),Ve(Ke,"aria-label",`Edit annotation: ${g(wt)[pe()].annotation_id}`)}),A(hn,Ke)}),A(Se,en)},Gt=Se=>{var ee=vL(),pe=D(ee);go(pe,()=>g(wt).length,Xe=>{BF(Xe,{onIntersect:tt})});var ke=vt(pe,2);{var en=Xe=>{var hn=pL(),Ke=Q(hn);vE(Ke,{}),X(hn),A(Xe,hn)};_t(ke,Xe=>{a().isFetchingNextPage&&Xe(en)})}A(Se,ee)};let xe=I(()=>{var Se;return(Se=g(wt))==null?void 0:Se.length}),We=I(()=>t.itemHeight+ut),de=I(()=>t.itemWidth+ut),Ie=I(()=>g(wt).length>0?g(it):0);hE(qt,{get itemCount(){return g(xe)},get itemHeight(){return g(We)},get itemWidth(){return g(de)},get height(){return g(Et)},get scrollPosition(){return g(Ie)},onscroll:Y,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.itemWidth??""}px; --sample-height: ${t.itemHeight??""}px;`},item:be,footer:Gt,$$slots:{item:!0,footer:!0}})}}),X(te);var ge=vt(te,2);{var re=qt=>{var be=mL(),Gt=Q(be);{let xe=I(()=>g(et).length===0);lL(Gt,{get selectedAnnotations(){return g(et)},get disabled(){return g(xe)},get isLoading(){return d()},onSelect:yt})}X(be),A(qt,be)};_t(ge,qt=>{c()&&qt(re)})}X(Nt),jn(Nt,qt=>R(W,qt),()=>g(W)),A(Pt,Nt)};_t(Kt,Pt=>{a().isFetched&&g(wt).length===0?Pt(ye):Pt(Bt,!1)})}A(e,Dt),dt(),h()}Ki(["click","dblclick","keydown"]);function Vb(e){return e.annotation_type==="object_detection"}function _L(e){return e.annotation_type==="instance_segmentation"}function h8(e){return e.annotation_type==="classification"}function lg(e){if(Vb(e)||_L(e)){const t={...Vb(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 wL=(e,t)=>{const n=lg(e),i=lg(t),s=n.height*n.width;return i.height*i.width-s},g8=e=>e.annotations===void 0?[]:e.annotations.filter(t=>t.annotation_type!=="classification").sort(wL),zb=Ge(!1);function yL(){const{settingsStore:e}=_g(),t=ys(e,i=>i.key_hide_annotations||"v");return{isHidden:zb,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&&zb.set(i.type==="keydown")}}}var xL=J('<div class="annotation-label flex items-center justify-between text-sm text-white svelte-112wvhq"><span class="truncate text-sm"> </span></div>'),SL=Pu("<svg><!></svg>"),AL=J("<div><div><!> <!></div></div>"),CL=J('<div class="crop flex items-center justify-center rounded-lg bg-black svelte-112wvhq"><div class="text-xs text-gray-400">Loading...</div></div>');function PL(e,t){var wt,tt;ct(t,!0);const n=()=>Be(b,"$customLabelColorsStore",s),i=()=>Be(m,"$isHidden",s),[s,a]=Gi();let l=E(t,"cachedDatasetVersion",3,""),c=E(t,"showLabel",3,!0),d=E(t,"selected",3,!1);const f=20,h=t.annotation.sample,{getDatasetVersion:p}=xs(),{isHidden:m}=yL(),{customLabelColorsStore:b}=ww();let y=bt(Sn(l())),x=bt(!!l());if(yg(async()=>{!l()&&t.annotation.annotation_id&&(R(y,await p(t.annotation.annotation_id.split("-")[0]),!0),R(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:C,x:T,y:N}=lg(t.annotation),B=(tt=(wt=t.annotation)==null?void 0:wt.instance_segmentation_details)==null?void 0:tt.segmentation_mask,W=I(()=>Math.min(t.width/(S+f*2),t.height/(C+f*2)));function z(){return-(T-f)*g(W)+(t.width-(S+f*2)*g(W))/2}function M(){return-(N-f)*g(W)+(t.height-(C+f*2)*g(W))/2}let q=t.annotation.annotation_label.annotation_label_name;const $=I(()=>{var et;return((et=n()[q])==null?void 0:et.color)??fo(q,1).color}),rt=I(()=>{var et;return(et=n()[q])==null||et.color,fo(q,.4).color}),ht=I(()=>{var et;return((et=n()[q])==null?void 0:et.alpha)??.4}),H=!!B,it=I(z),Y=I(M),nt=I(()=>`${vk}/sample/${h.sample_id}${g(y)?`?v=${g(y)}`:""}`);var ot=K(),lt=D(ot);{var ut=et=>{var yt=AL();let Et;var Dt=Q(yt);let Kt;var ye=Q(Dt);{var Bt=te=>{var Ut=xL(),ge=Q(Ut),re=Q(ge,!0);X(ge),X(Ut),Ht(qt=>{Rn(Ut,qt),he(re,q)},[()=>`background-color: ${g(rt)??fo(q,.4).color};`]),A(te,Ut)};_t(ye,te=>{c()&&te(Bt)})}var Pt=vt(ye,2);{var Nt=te=>{var Ut=SL(),ge=Q(Ut);A4(ge,{get segmentation(){return B},get width(){return h.width},get colorFill(){return g(rt)},get opacity(){return g(ht)}}),X(Ut),Ht(()=>Ve(Ut,"viewBox",`${T} ${N} ${S} ${C}`)),A(te,Ut)};_t(Pt,te=>{H&&te(Nt)})}X(Dt),X(yt),Ht((te,Ut,ge)=>{Et=$n(yt,1,"crop rounded-lg bg-black svelte-112wvhq",null,Et,te),Rn(yt,`
374
+ width: ${t.width}px;
375
+ height: ${t.height}px;
376
+ background-image: url("${g(nt)}");
377
+ background-position: ${g(it)}px ${g(Y)}px;
378
+ background-size: ${h.width*g(W)}px ${h.height*g(W)}px;
379
+ background-repeat: no-repeat;
380
+ `),Kt=$n(Dt,1,"annotation-box svelte-112wvhq",null,Kt,Ut),Rn(Dt,ge)},[()=>({"annotation-selected":d()}),()=>({invisible:i()}),()=>`
381
+ left: ${(t.width-S*g(W))/2}px;
382
+ top: ${(t.height-C*g(W))/2}px;
383
+ width: ${S*g(W)}px;
384
+ height: ${C*g(W)}px;
385
+ border-color: ${H?"transparent":g($)??fo(q).color};
386
+ background-color: ${H?"transparent":g(rt)??fo(q,.4).color};
387
+ border-style: solid;
388
+
389
+ `]),A(et,yt)},pt=et=>{var yt=CL();Ht(()=>Rn(yt,`width: ${t.width}px; height: ${t.height}px;`)),A(et,yt)};_t(lt,et=>{g(x)?et(ut):et(pt,!1)})}A(e,ot),dt(),a()}var kL=J("<div><!></div>");function xw(e,t){ct(t,!0);var n=kL(),i=Q(n);st(i,()=>t.children),X(n),Ht(s=>$n(n,1,s),[()=>zi(le("rounded-lg border border-gray-800 bg-black",t.className))]),A(e,n),dt()}var EL=J("<div><!></div>");function Sw(e,t){ct(t,!0);var n=EL(),i=Q(n);st(i,()=>t.children),X(n),Ht(s=>$n(n,1,s),[()=>zi(le("p-4",t.className))]),A(e,n),dt()}var TL=J(`<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 IL(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"value",15),s=E(t,"orientation",3,"horizontal"),a=xt(t,["$$slots","$$events","$$legacy","ref","value","orientation","class"]);var l=K(),c=D(l);{const d=(h,p)=>{let m=()=>p==null?void 0:p().thumbs;var b=TL(),y=D(b),x=Q(y);Tt(x,()=>nM,(C,T)=>{T(C,{class:"bg-primary absolute data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"})}),X(y);var S=vt(y,2);Gn(S,17,m,ku,(C,T)=>{var N=K(),B=D(N);Tt(B,()=>iM,(W,z)=>{z(W,{get index(){return g(T)},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"})}),A(C,N)}),Ht(()=>Ve(y,"data-orientation",s())),A(h,b)};let f=I(()=>le("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));Tt(c,()=>tM,(h,p)=>{p(h,Ot({get orientation(){return s()},get class(){return g(f)}},()=>a,{get ref(){return n()},set ref(m){n(m)},get value(){return i()},set value(m){i(m)},children:d,$$slots:{default:!0}}))})}A(e,l),dt()}const OL=fO,NL=vO,RL=gO,ML=e=>e;function Aw(e){const t=e-1;return t*t*t+1}function Wb(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function p8(e,{delay:t=0,duration:n=400,easing:i=ML}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*s}`}}function LL(e,{delay:t=0,duration:n=400,easing:i=Aw,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),[p,m]=Wb(s),[b,y]=Wb(a);return{delay:t,duration:n,easing:i,css:(x,S)=>`
390
+ transform: ${f} translate(${(1-x)*p}${m}, ${(1-x)*b}${y});
391
+ opacity: ${d-h*S}`}}function FL(e,{delay:t=0,duration:n=400,easing:i=Aw,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(C=>`${C[0].toUpperCase()}${C.slice(1)}`),p=parseFloat(a[`padding${h[0]}`]),m=parseFloat(a[`padding${h[1]}`]),b=parseFloat(a[`margin${h[0]}`]),y=parseFloat(a[`margin${h[1]}`]),x=parseFloat(a[`border${h[0]}Width`]),S=parseFloat(a[`border${h[1]}Width`]);return{delay:t,duration:n,easing:i,css:C=>`overflow: hidden;opacity: ${Math.min(C*20,1)*l};${c}: ${C*d}px;padding-${f[0]}: ${C*p}px;padding-${f[1]}: ${C*m}px;margin-${f[0]}: ${C*b}px;margin-${f[1]}: ${C*y}px;border-${f[0]}-width: ${C*x}px;border-${f[1]}-width: ${C*S}px;min-${c}: 0`}}var DL=J('<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>'),BL=J('<div class="mt-2"><!></div>'),VL=J("<!> <!>",1);function Mo(e,t){let n=bt(!0);const i=168;OL(e,{get open(){return g(n)},set open(s){R(n,s,!0)},children:(s,a)=>{var l=VL(),c=D(l);NL(c,{class:"w-full",children:(f,h)=>{var p=DL(),m=Q(p),b=Q(m),y=Q(b);{var x=B=>{var W=K(),z=D(W);Tt(z,()=>t.icon,(M,q)=>{q(M,{})}),A(B,W)};_t(y,B=>{t.icon&&B(x)})}var S=vt(y,2),C=Q(S,!0);X(S),X(b);var T=vt(b,2),N=Q(T);{let B=I(()=>`transform: ${g(n)?"rotate(-180deg)":"rotate(0deg)"}`);Cg(N,{class:"transition-transform duration-168",get style(){return g(B)}})}X(T),X(m),X(p),Ht(()=>he(C,t.title)),A(f,p)},$$slots:{default:!0}});var d=vt(c,2);RL(d,{forceMount:!0,children:(f,h)=>{var p=K(),m=D(p);{var b=y=>{var x=BL(),S=Q(x);st(S,()=>t.children),X(x),T_(3,x,()=>FL,()=>({duration:i})),A(y,x)};_t(m,y=>{g(n)&&y(b)})}A(f,p)},$$slots:{default:!0}}),A(s,l)},$$slots:{default:!0}})}var zL=J("<label> </label>"),WL=J("<label> </label>"),HL=J('<p class="ml-4 text-xs text-muted-foreground"> </p>'),UL=J('<div class="space-y-2"><div class="flex justify-between"><!></div> <!> <!></div>');function GL(e,t){const n="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";var i=UL(),s=Q(i),a=Q(s);{var l=p=>{var m=zL();$n(m,1,zi(n));var b=Q(m,!0);X(m),Ht(()=>{Ve(m,"for",t.forComponent),he(b,t.label)}),A(p,m)},c=p=>{var m=WL();$n(m,1,zi(n));var b=Q(m,!0);X(m),Ht(()=>he(b,t.label)),A(p,m)};_t(a,p=>{t.forComponent?p(l):p(c,!1)})}X(s);var d=vt(s,2);st(d,()=>t.children);var f=vt(d,2);{var h=p=>{var m=HL(),b=Q(m,!0);X(m),Ht(()=>he(b,t.description)),A(p,m)};_t(f,p=>{t.description&&p(h)})}X(i),A(e,i)}function KL(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("py-1.5 pl-8 pr-2 text-sm font-semibold",t.class));Tt(a,()=>oR,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}var qL=J('<span class="absolute left-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function ug(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var s=K(),a=D(s);{const l=(d,f)=>{let h=()=>f==null?void 0:f().selected,p=()=>f==null?void 0:f().highlighted;var m=qL(),b=D(m),y=Q(b);{var x=N=>{Ag(N,{class:"size-4"})};_t(y,N=>{h()&&N(x)})}X(b);var S=vt(b,2);{var C=N=>{var B=K(),W=D(B);st(W,()=>t.children,()=>({selected:h(),highlighted:p()})),A(N,B)},T=N=>{var B=Ce();Ht(()=>he(B,t.label||t.value)),A(N,B)};_t(S,N=>{t.children?N(C):N(T,!1)})}A(d,m)};let c=I(()=>le("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));Tt(a,()=>eR,(d,f)=>{f(d,Ot({get value(){return t.value},get class(){return g(c)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:l,$$slots:{default:!0}}))})}A(e,s),dt()}function YL(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("flex cursor-default items-center justify-center py-1",t.class));Tt(a,()=>hR,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{Uk(f,{class:"size-4"})},$$slots:{default:!0}}))})}A(e,s),dt()}function XL(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("flex cursor-default items-center justify-center py-1",t.class));Tt(a,()=>cR,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{Cg(f,{class:"size-4"})},$$slots:{default:!0}}))})}A(e,s),dt()}var ZL=J("<!> <!> <!>",1);function Cw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"sideOffset",3,4),s=xt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]);var a=K(),l=D(a);Tt(l,()=>Nu,(c,d)=>{d(c,Ot(()=>t.portalProps,{children:(f,h)=>{var p=K(),m=D(p);{let b=I(()=>le("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));Tt(m,()=>jN,(y,x)=>{x(y,Ot({get sideOffset(){return i()},get class(){return g(b)}},()=>s,{get ref(){return n()},set ref(S){n(S)},children:(S,C)=>{var T=ZL(),N=D(T);YL(N,{});var B=vt(N,2);{let z=I(()=>le("h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"));Tt(B,()=>aR,(M,q)=>{q(M,{get class(){return g(z)},children:($,rt)=>{var ht=K(),H=D(ht);st(H,()=>t.children??St),A($,ht)},$$slots:{default:!0}})})}var W=vt(B,2);XL(W,{}),A(S,T)},$$slots:{default:!0}}))})}A(f,p)},$$slots:{default:!0}}))}),A(e,a),dt()}var QL=J("<!> <!>",1);function Pw(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=K(),a=D(s);{let l=I(()=>le("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));Tt(a,()=>W3,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{var p=QL(),m=D(p);st(m,()=>t.children??St);var b=vt(m,2);Cg(b,{class:"size-4 opacity-50"}),A(f,p)},$$slots:{default:!0}}))})}A(e,s),dt()}const kw=V3,JL=rR,jL=$g({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 $L=J("<div><!></div>");function v8(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"variant",3,"default"),s=xt(t,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var a=$L();Mt(a,c=>({class:c,...s,role:"alert"}),[()=>le(jL({variant:i()}),t.class)]);var l=Q(a);st(l,()=>t.children??St),X(a),jn(a,c=>n(c),()=>n()),A(e,a),dt()}function tF(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"class",7),s=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var a={get class(){return i()},set class(d){i(d)}},l=K(),c=D(l);{let d=I(()=>le("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()));Tt(c,()=>u0,(f,h)=>{h(f,Ot({get class(){return g(d)}},()=>s,{get ref(){return n()},set ref(p){n(p)}}))})}return A(e,l),dt(a)}const eF=$g({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 nF=J('<!> <span class="sr-only">Close</span>',1),rF=J("<!> <!>",1),iF=J("<!> <!>",1);function m8(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"side",3,"right"),s=xt(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var a=K(),l=D(a);Tt(l,()=>Nu,(c,d)=>{d(c,Ot(()=>t.portalProps,{children:(f,h)=>{var p=iF(),m=D(p);tF(m,{});var b=vt(m,2);{let y=I(()=>le(eF({side:i()}),t.class));Tt(b,()=>K0,(x,S)=>{S(x,Ot({get class(){return g(y)}},()=>s,{get ref(){return n()},set ref(C){n(C)},children:(C,T)=>{var N=rF(),B=D(N);st(B,()=>t.children??St);var W=vt(B,2);Tt(W,()=>G0,(z,M)=>{M(z,{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:(q,$)=>{var rt=nF(),ht=D(rt);Pg(ht,{class:"size-4"}),fe(2),A(q,rt)},$$slots:{default:!0}})}),A(C,N)},$$slots:{default:!0}}))})}A(f,p)},$$slots:{default:!0}}))}),A(e,a),dt()}var oF=J('<div class="size-3.5"></div>'),sF=J('<div class="flex size-4 items-center justify-center text-current"><!></div>');function Ew(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"checked",15,!1),s=E(t,"indeterminate",15,!1),a=xt(t,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var l=K(),c=D(l);{const d=(h,p)=>{let m=()=>p==null?void 0:p().checked,b=()=>p==null?void 0:p().indeterminate;var y=sF(),x=Q(y);{var S=T=>{var N=K(),B=D(N);rb(B,()=>eb(()=>import("./D_JuJOO3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),null,(W,z)=>{var M=I(()=>{var{default:ht}=g(z);return{Minus:ht}}),q=I(()=>g(M).Minus),$=K(),rt=D($);Tt(rt,()=>g(q),(ht,H)=>{H(ht,{class:"size-3.5"})}),A(W,$)}),A(T,N)},C=T=>{var N=K(),B=D(N);{var W=M=>{var q=K(),$=D(q);rb($,()=>eb(()=>Promise.resolve().then(()=>rE),void 0,import.meta.url),null,(rt,ht)=>{var H=I(()=>{var{default:ot}=g(ht);return{Check:ot}}),it=I(()=>g(H).Check),Y=K(),nt=D(Y);Tt(nt,()=>g(it),(ot,lt)=>{lt(ot,{class:"size-3.5"})}),A(rt,Y)}),A(M,q)},z=M=>{var q=oF();A(M,q)};_t(B,M=>{m()?M(W):M(z,!1)},!0)}A(T,N)};_t(x,T=>{b()?T(S):T(C,!1)})}X(y),A(h,y)};let f=I(()=>le("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));Tt(c,()=>eO,(h,p)=>{p(h,Ot({get class(){return g(f)}},()=>a,{get ref(){return n()},set ref(m){n(m)},get checked(){return i()},set checked(m){i(m)},get indeterminate(){return s()},set indeterminate(m){s(m)},children:d,$$slots:{default:!0}}))})}A(e,l),dt()}function bs(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=xt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=K(),a=D(s);{let l=I(()=>le("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class));Tt(a,()=>F3,(c,d)=>{d(c,Ot({get class(){return g(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))})}A(e,s),dt()}var aF=J('<div class="text-xs text-muted-foreground"> </div>'),lF=J('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function uF(e,t){const n=E(t,"isChecked",3,!1);var i=lF(),s=Q(i),a=Q(s);{let f=I(()=>`${t.name}-label`);Ew(a,{get id(){return t.name},get"aria-labelledby"(){return g(f)},get checked(){return n()},get onCheckedChange(){return t.onCheckedChange}})}var l=vt(a,2);{let f=I(()=>`${t.name}-label`);bs(l,{get id(){return g(f)},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:(h,p)=>{fe();var m=Ce();Ht(()=>he(m,t.label)),A(h,m)},$$slots:{default:!0}})}X(s);var c=vt(s,2);{var d=f=>{var h=aF(),p=Q(h,!0);X(h),Ht(()=>he(p,t.helperText)),A(f,h)};_t(c,f=>{t.helperText&&f(d)})}X(i),A(e,i)}const Nc=Ge(!1);function cF(){return{error:Ge(null),isCreateClassifiersPanelOpen:Nc,openCreateClassifiersPanel:()=>Nc.set(!0),closeCreateClassifiersPanel:()=>{Nc.set(!1)},toggleCreateClassifiersPanel:()=>Nc.update(t=>!t)}}const Rc=Ge(!1),Ah=Ge(null),Hb=Ge(null),Ub=Ge(null),Gb=Ge(null);function dF(){return{isRefineClassifiersPanelOpen:Rc,currentMode:Ah,currentClassifierName:Hb,currentClassifierId:Ub,currentClassifierClasses:Gb,openRefineClassifiersPanel:(t,n,i,s)=>{Ah.set(t),Rc.set(!0),Ub.set(n),Hb.set(i),Gb.set(s)},closeRefineClassifiersPanel:()=>{Ah.set(null),Rc.set(!1)},toggleRefineClassifiersPanel:()=>{Rc.update(t=>!t)}}}const{selectedSampleIds:fF}=xs(),Ch=Ge(new Set);function hF(){const e=Ge(null),t=Ge(!1),n=async(f,h)=>{try{e.set(null);const p=await cr.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"}),m=p.response.headers.get("content-disposition"),b=m==null?void 0:m.match(/filename="(.+)"/),y=(b==null?void 0:b[1])??`classifier_${f}.pkl`;if(!p.data)return e.set(new Error("No data received from the server")),Promise.reject("No data received from the server");J5(y,p.data)}catch(p){throw e.set(p),p}},i=async f=>{var m;e.set(null);const h=f.target,p=(m=h.files)==null?void 0:m[0];if(!p){e.set(new Error("No file selected"));return}try{const b=new FormData;b.append("file",p),await cr.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 cr.POST("/api/classifiers/{classifier_id}/update_annotations",{params:{path:{classifier_id:f}},body:h})}catch(p){throw e.set(p),p}},a=async f=>{try{e.set(null),await cr.POST("/api/classifiers/{classifier_id}/train_classifier",{params:{path:{classifier_id:f}}})}catch(h){throw e.set(h),h}};async function l(){const f=dn(fF),h=Array.from(f),p=mi.params.dataset_id;e.set(null);try{const m=await cr.POST("/api/classifiers/get_negative_samples",{body:{dataset_id:p.toString(),positive_sample_ids:h}});return m.data?{positiveSampleIds:h,negativeSampleIds:m.data.negative_sample_ids}:(e.set(new Error("Failed to prepare samples")),Promise.reject("Failed to prepare samples"))}catch(m){return e.set(m),Promise.reject(m)}}return{error:e,isLoading:t,classifiersSelected:Ch,saveClassifier:n,loadClassifier:i,updateAnnotations:s,trainClassifier:a,prepareSamples:l,classifierSelectionToggle:f=>{Ch.update(h=>(h.has(f)?h.delete(f):h.add(f),new Set([...h])))},clearClassifiersSelected:()=>{Ch.set(new Set)}}}const{classifiers:Ph,selectedSampleIds:Kb,classifierSamples:qb,setClassifierSamples:kh,toggleSampleSelection:Yb,clearSelectedSamples:Eh}=xs();function gF(){const e=hF(),t=Ge(null),n=Ge(!1),i=Ge(!1),{openRefineClassifiersPanel:s,closeRefineClassifiersPanel:a}=dF(),{toggleCreateClassifiersPanel:l,closeCreateClassifiersPanel:c}=cF(),d=()=>{dn(n)||(t.set(null),n.set(!0),cr.GET("/api/classifiers/get_all_classifiers").then(z=>{var M;(M=z.data)!=null&&M.classifiers?Ph.set(z.data.classifiers):Ph.set([])}).catch(z=>{t.set(z)}).finally(()=>{n.set(!1)}))};dn(i)||(d(),i.set(!0));async function f(){t.set(null);const z=mi.params.dataset_id;try{const M=await e.prepareSamples();kh({positiveSampleIds:M.positiveSampleIds,negativeSampleIds:M.negativeSampleIds}),l(),zc(Wc.toClassifiers(z)),t.set(null)}catch(M){t.set(M)}}async function h(z){try{if(t.set(null),!z.dataset_id)throw new Error("Dataset ID is required");const M=await cr.POST("/api/classifiers/create",{body:{name:z.name,class_list:z.class_list,dataset_id:z.dataset_id.toString()}});if(!M.data)return t.set(Error("Failed to create classifier.")),Promise.reject("Failed to create classifier.");const q=dn(qb),$=q?[...q.positiveSampleIds,...q.negativeSampleIds]:[],rt=dn(Kb),ht=Array.from(rt),H=$.filter(Y=>!rt.has(Y)),it={annotations:{positive:ht,negative:H}};return await e.updateAnnotations(M.data.classifier_id,it),await e.trainClassifier(M.data.classifier_id),await b(M.data.classifier_id,z.dataset_id.toString(),z.class_list),s("temp",M.data.classifier_id,M.data.name,z.class_list),c(),M.data}catch(M){return t.set(M),Promise.reject(M)}}const p=async()=>{try{n.set(!0),t.set(null);for(const z of Array.from(dn(e.classifiersSelected)))await cr.POST("/api/classifiers/{classifier_id}/run_on_dataset/{dataset_id}",{params:{path:{classifier_id:z,dataset_id:mi.params.dataset_id}}});n.set(!1)}catch(z){n.set(!1),t.set(z)}},m=async(z,M)=>{try{t.set(null),await cr.POST("/api/classifiers/{classifier_id}/commit_temp_classifier",{params:{path:{classifier_id:z}}}),d()}catch(q){t.set(q);return}Eh(),a(),zc(Wc.toSamples(M))},b=async(z,M,q)=>{var $;try{t.set(null);const rt=await cr.GET("/api/classifiers/{classifier_id}/samples_to_refine",{params:{path:{classifier_id:z},query:{dataset_id:M}}});if(!(($=rt.data)!=null&&$.samples)){t.set(new Error("Failed to get samples for refinement."));return}const ht=rt.data.samples,H=Object.keys(ht);if(H.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!q.every(Y=>H.includes(Y))){t.set(new Error(`Invalid class names. Expected classes: ${H.join(", ")}`));return}const it={positiveSampleIds:ht[q[0]]||[],negativeSampleIds:ht[q[1]]||[]};it.positiveSampleIds.forEach(Y=>{Yb(Y)}),kh(it)}catch(rt){return t.set(rt),Promise.reject(rt)}};async function y(z,M,q,$,rt){try{t.set(null),await b(M,rt,$),s("existing",M,q,$),zc(Wc.toClassifiers(rt))}catch(ht){t.set(ht)}}async function x(z,M,q){try{t.set(null);const $=dn(qb),rt=$?[...$.positiveSampleIds,...$.negativeSampleIds]:[],ht=dn(Kb),H=Array.from(ht),it=rt.filter(nt=>!ht.has(nt)),Y={annotations:{positive:H,negative:it}};Eh(),await e.updateAnnotations(z,Y),await e.trainClassifier(z),await b(z,M,q)}catch($){t.set($)}}async function S(z,M,q,$){var rt;try{if(t.set(null),Eh(),$){const H=(rt=(await bk({path:{classifier_id:z}})).data)==null?void 0:rt.samples;if(!H){t.set(new Error("No samples data received"));return}const it=Object.keys(H);if(it.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!q.every(nt=>it.includes(nt))){t.set(new Error(`Invalid class names. Expected classes: ${it.join(", ")}`));return}const Y={positiveSampleIds:H[q[0]]||[],negativeSampleIds:H[q[1]]||[]};Y.positiveSampleIds.forEach(nt=>{Yb(nt)}),kh(Y)}else await b(z,M,q)}catch(ht){t.set(ht)}}const C=async()=>{try{return t.set(null),await e.prepareSamples()}catch(z){throw t.set(z),z}},T=async(z,M)=>{try{t.set(null),await e.saveClassifier(z,M)}catch(q){throw t.set(q),q}},N=async z=>{try{t.set(null),await e.loadClassifier(z),d()}catch(M){throw t.set(M),M}},B=async(z,M)=>{try{t.set(null),await e.updateAnnotations(z,M)}catch(q){throw t.set(q),q}},W=async z=>{try{t.set(null),await e.trainClassifier(z)}catch(M){throw t.set(M),M}};return{classifiers:Cc(Ph),createClassifier:h,loadClassifiers:d,classifiersSelected:Cc(e.classifiersSelected),classifierSelectionToggle:e.classifierSelectionToggle,clearClassifiersSelected:e.clearClassifiersSelected,apply:p,saveClassifier:T,updateAnnotations:B,trainClassifier:W,commitTempClassifier:m,getSamplesToRefine:b,prepareSamples:C,loadClassifier:N,startCreateClassifier:f,isLoading:Cc(n),startRefinment:y,showClassifierTrainingSamples:S,refineClassifier:x,error:Cc(t)}}function pF(e,t){ct(t,!0);let n=E(t,"ref",15,null),i=E(t,"checked",15,!1),s=xt(t,["$$slots","$$events","$$legacy","ref","checked","class"]);var a=K(),l=D(a);{let c=I(()=>le("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));Tt(l,()=>vM,(d,f)=>{f(d,Ot({get class(){return g(c)}},()=>s,{get ref(){return n()},set ref(h){n(h)},get checked(){return i()},set checked(h){i(h)},children:(h,p)=>{var m=K(),b=D(m);{let y=I(()=>le("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"));Tt(b,()=>bM,(x,S)=>{S(x,{get class(){return g(y)}})})}A(h,m)},$$slots:{default:!0}}))})}A(e,a),dt()}var vF=J("<!> <span>Settings</span>",1),mF=J("<!> <!>",1),bF=(e,t)=>{e.preventDefault(),t("hideAnnotations")},_F=J('<span class="italic opacity-70">Press a key...</span>'),wF=J("<span> </span>"),yF=(e,t)=>{e.preventDefault(),t("goBack")},xF=J('<span class="italic opacity-70">Press a key...</span>'),SF=J("<span> </span>"),AF=J("<!> <!>",1),CF=J("<!> <!>",1),PF=J("<!> <!>",1),kF=J('<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>'),EF=J("<!> <!>",1),TF=J("<!> <!>",1);function b8(e,t){ct(t,!0);const n=()=>Be(a,"$settingsStore",i),[i,s]=Gi(),{settingsStore:a,saveSettings:l}=_g();let c=bt(!1),d=bt(!1),f=bt(Sn({hideAnnotations:"v",goBack:"Escape"})),h=bt("contain"),p=bt(!0),m=!1;we(()=>{n()&&!m&&(R(f,{hideAnnotations:n().key_hide_annotations||"v",goBack:n().key_go_back||"Escape"},!0),R(h,n().grid_view_sample_rendering||"contain",!0),R(p,!!(n().show_annotation_text_labels??!0),!0),m=!0)});let b=bt(null);function y(z){R(c,z,!0),R(b,null)}function x(z){R(h,z,!0)}function S(z){z.preventDefault(),C()}async function C(){R(d,!0);try{await l({key_hide_annotations:g(f).hideAnnotations,key_go_back:g(f).goBack,grid_view_sample_rendering:g(h),show_annotation_text_labels:g(p)}),y(!1)}catch(z){console.error("Error saving settings:",z)}finally{R(d,!1)}}const T=z=>{R(b,z,!0)},N=z=>{if(!g(b))return;z.preventDefault(),z.stopPropagation();let M=z.key;M===" "?M="Space":M.length===1&&/^[a-zA-Z]$/.test(M)&&!z.getModifierState("CapsLock")&&(M=M.toLowerCase()),g(b)==="hideAnnotations"?g(f).hideAnnotations=M:g(b)==="goBack"&&(g(f).goBack=M),R(b,null)};var B=K();tb("keydown",rk,N);var W=D(B);Tt(W,()=>ow,(z,M)=>{M(z,{get open(){return g(c)},set open(q){R(c,q,!0)},children:(q,$)=>{var rt=TF(),ht=D(rt);Tt(ht,()=>o5,(it,Y)=>{Y(it,{children:(nt,ot)=>{fn(nt,{variant:"outline",class:"gap-2",children:(lt,ut)=>{var pt=vF(),wt=D(pt);$k(wt,{class:"h-4 w-4"}),fe(2),A(lt,pt)},$$slots:{default:!0}})},$$slots:{default:!0}})});var H=vt(ht,2);Tt(H,()=>sw,(it,Y)=>{Y(it,{children:(nt,ot)=>{var lt=EF(),ut=D(lt);Tt(ut,()=>rw,(wt,tt)=>{tt(wt,{})});var pt=vt(ut,2);Tt(pt,()=>iw,(wt,tt)=>{tt(wt,{class:"border-border bg-background sm:max-w-[500px]",children:(et,yt)=>{var Et=kF(),Dt=Q(Et);Tt(Dt,()=>nw,(oe,Ee)=>{Ee(oe,{children:(Le,sn)=>{var gn=mF(),An=D(gn);Tt(An,()=>ew,(Qe,ir)=>{ir(Qe,{class:"text-foreground",children:(Ln,xi)=>{fe();var Xr=Ce("Settings");A(Ln,Xr)},$$slots:{default:!0}})});var _r=vt(An,2);Tt(_r,()=>i5,(Qe,ir)=>{ir(Qe,{class:"text-foreground",children:(Ln,xi)=>{fe();var Xr=Ce("Configure your application preferences.");A(Ln,Xr)},$$slots:{default:!0}})}),A(Le,gn)},$$slots:{default:!0}})});var Kt=vt(Dt,2),ye=Q(Kt),Bt=vt(Q(ye),2),Pt=Q(Bt);bs(Pt,{for:"hide-annotations",class:"text-right text-foreground",children:(oe,Ee)=>{fe();var Le=Ce("Hide Annotations");A(oe,Le)},$$slots:{default:!0}});var Nt=vt(Pt,2);Nt.__click=[bF,T];var te=Q(Nt);{var Ut=oe=>{var Ee=_F();A(oe,Ee)},ge=oe=>{var Ee=wF(),Le=Q(Ee,!0);X(Ee),Ht(()=>he(Le,g(f).hideAnnotations)),A(oe,Ee)};_t(te,oe=>{g(b)==="hideAnnotations"?oe(Ut):oe(ge,!1)})}X(Nt),X(Bt);var re=vt(Bt,2),qt=Q(re);bs(qt,{for:"go-back",class:"text-right text-foreground",children:(oe,Ee)=>{fe();var Le=Ce("Go Back");A(oe,Le)},$$slots:{default:!0}});var be=vt(qt,2);be.__click=[yF,T];var Gt=Q(be);{var xe=oe=>{var Ee=xF();A(oe,Ee)},We=oe=>{var Ee=SF(),Le=Q(Ee,!0);X(Ee),Ht(()=>he(Le,g(f).goBack)),A(oe,Ee)};_t(Gt,oe=>{g(b)==="goBack"?oe(xe):oe(We,!1)})}X(be),X(re),X(ye);var de=vt(ye,2),Ie=vt(Q(de),2),Se=Q(Ie);bs(Se,{for:"grid-view-rendering",class:"text-right text-foreground",children:(oe,Ee)=>{fe();var Le=Ce("Grid View Rendering");A(oe,Le)},$$slots:{default:!0}});var ee=vt(Se,2),pe=Q(ee);kw(pe,{type:"single",get value(){return g(h)},onValueChange:x,children:(oe,Ee)=>{var Le=CF(),sn=D(Le);Pw(sn,{id:"grid-view-rendering",children:(An,_r)=>{fe();var Qe=Ce();Ht(()=>he(Qe,g(h)==="cover"?"Cover":"Contain")),A(An,Qe)},$$slots:{default:!0}});var gn=vt(sn,2);Cw(gn,{children:(An,_r)=>{var Qe=AF(),ir=D(Qe);ug(ir,{value:"cover",children:(xi,Xr)=>{fe();var Xi=Ce("Cover");A(xi,Xi)},$$slots:{default:!0}});var Ln=vt(ir,2);ug(Ln,{value:"contain",children:(xi,Xr)=>{fe();var Xi=Ce("Contain");A(xi,Xi)},$$slots:{default:!0}}),A(An,Qe)},$$slots:{default:!0}}),A(oe,Le)},$$slots:{default:!0}}),X(ee),X(Ie),X(de);var ke=vt(de,2),en=vt(Q(ke),2),Xe=Q(en);bs(Xe,{for:"show-annotation-text-labels",class:"text-right text-foreground",children:(oe,Ee)=>{fe();var Le=Ce("Show Annotation Text Labels");A(oe,Le)},$$slots:{default:!0}});var hn=vt(Xe,2);pF(hn,{id:"show-annotation-text-labels",get disabled(){return g(d)},get checked(){return g(p)},set checked(oe){R(p,oe,!0)}}),X(en),X(ke),X(Kt);var Ke=vt(Kt,2);Tt(Ke,()=>$M,(oe,Ee)=>{Ee(oe,{children:(Le,sn)=>{var gn=PF(),An=D(gn);fn(An,{variant:"outline",type:"button",onclick:()=>y(!1),children:(Qe,ir)=>{fe();var Ln=Ce("Cancel");A(Qe,Ln)},$$slots:{default:!0}});var _r=vt(An,2);fn(_r,{type:"submit",get disabled(){return g(d)},children:(Qe,ir)=>{fe();var Ln=Ce();Ht(()=>he(Ln,g(d)?"Saving...":"Save Changes")),A(Qe,Ln)},$$slots:{default:!0}}),A(Le,gn)},$$slots:{default:!0}})}),X(Et),tb("submit",Et,S),A(et,Et)},$$slots:{default:!0}})}),A(nt,lt)},$$slots:{default:!0}})}),A(q,rt)},$$slots:{default:!0}})}),A(e,B),dt(),s()}Ki(["click"]);var ad={exports:{}};/**
392
+ * @license
393
+ * Lodash <https://lodash.com/>
394
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
395
+ * Released under MIT license <https://lodash.com/license>
396
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
397
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
398
+ */ad.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__",p=1,m=2,b=4,y=1,x=2,S=1,C=2,T=4,N=8,B=16,W=32,z=64,M=128,q=256,$=512,rt=30,ht="...",H=800,it=16,Y=1,nt=2,ot=3,lt=1/0,ut=9007199254740991,pt=17976931348623157e292,wt=NaN,tt=4294967295,et=tt-1,yt=tt>>>1,Et=[["ary",M],["bind",S],["bindKey",C],["curry",N],["curryRight",B],["flip",$],["partial",W],["partialRight",z],["rearg",q]],Dt="[object Arguments]",Kt="[object Array]",ye="[object AsyncFunction]",Bt="[object Boolean]",Pt="[object Date]",Nt="[object DOMException]",te="[object Error]",Ut="[object Function]",ge="[object GeneratorFunction]",re="[object Map]",qt="[object Number]",be="[object Null]",Gt="[object Object]",xe="[object Promise]",We="[object Proxy]",de="[object RegExp]",Ie="[object Set]",Se="[object String]",ee="[object Symbol]",pe="[object Undefined]",ke="[object WeakMap]",en="[object WeakSet]",Xe="[object ArrayBuffer]",hn="[object DataView]",Ke="[object Float32Array]",oe="[object Float64Array]",Ee="[object Int8Array]",Le="[object Int16Array]",sn="[object Int32Array]",gn="[object Uint8Array]",An="[object Uint8ClampedArray]",_r="[object Uint16Array]",Qe="[object Uint32Array]",ir=/\b__p \+= '';/g,Ln=/\b(__p \+=) '' \+/g,xi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xr=/&(?:amp|lt|gt|quot|#39);/g,Xi=/[&<>"']/g,ty=RegExp(Xr.source),ey=RegExp(Xi.source),ny=/<%-([\s\S]+?)%>/g,ry=/<%([\s\S]+?)%>/g,dp=/<%=([\s\S]+?)%>/g,iy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oy=/^\w*$/,sy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qd=/[\\^$.*+?()[\]{}|]/g,ay=RegExp(Qd.source),Jd=/^\s+/,ly=/\s/,uy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cy=/\{\n\/\* \[wrapped with (.+)\] \*/,dy=/,? & /,fy=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hy=/[()=,{}\[\]\/\s]/,gy=/\\(\\)?/g,py=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fp=/\w*$/,vy=/^[-+]0x[0-9a-f]+$/i,my=/^0b[01]+$/i,by=/^\[object .+?Constructor\]$/,_y=/^0o[0-7]+$/i,wy=/^(?:0|[1-9]\d*)$/,yy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Du=/($^)/,xy=/['\n\r\u2028\u2029\\]/g,Bu="\\ud800-\\udfff",Sy="\\u0300-\\u036f",Ay="\\ufe20-\\ufe2f",Cy="\\u20d0-\\u20ff",hp=Sy+Ay+Cy,gp="\\u2700-\\u27bf",pp="a-z\\xdf-\\xf6\\xf8-\\xff",Py="\\xac\\xb1\\xd7\\xf7",ky="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ey="\\u2000-\\u206f",Ty=" \\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",vp="A-Z\\xc0-\\xd6\\xd8-\\xde",mp="\\ufe0e\\ufe0f",bp=Py+ky+Ey+Ty,jd="['’]",Iy="["+Bu+"]",_p="["+bp+"]",Vu="["+hp+"]",wp="\\d+",Oy="["+gp+"]",yp="["+pp+"]",xp="[^"+Bu+bp+wp+gp+pp+vp+"]",$d="\\ud83c[\\udffb-\\udfff]",Ny="(?:"+Vu+"|"+$d+")",Sp="[^"+Bu+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",Zi="["+vp+"]",Ap="\\u200d",Cp="(?:"+yp+"|"+xp+")",Ry="(?:"+Zi+"|"+xp+")",Pp="(?:"+jd+"(?:d|ll|m|re|s|t|ve))?",kp="(?:"+jd+"(?:D|LL|M|RE|S|T|VE))?",Ep=Ny+"?",Tp="["+mp+"]?",My="(?:"+Ap+"(?:"+[Sp,tf,ef].join("|")+")"+Tp+Ep+")*",Ly="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ip=Tp+Ep+My,Dy="(?:"+[Oy,tf,ef].join("|")+")"+Ip,By="(?:"+[Sp+Vu+"?",Vu,tf,ef,Iy].join("|")+")",Vy=RegExp(jd,"g"),zy=RegExp(Vu,"g"),nf=RegExp($d+"(?="+$d+")|"+By+Ip,"g"),Wy=RegExp([Zi+"?"+yp+"+"+Pp+"(?="+[_p,Zi,"$"].join("|")+")",Ry+"+"+kp+"(?="+[_p,Zi+Cp,"$"].join("|")+")",Zi+"?"+Cp+"+"+Pp,Zi+"+"+kp,Fy,Ly,wp,Dy].join("|"),"g"),Hy=RegExp("["+Ap+Bu+hp+mp+"]"),Uy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gy=["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"],Ky=-1,Oe={};Oe[Ke]=Oe[oe]=Oe[Ee]=Oe[Le]=Oe[sn]=Oe[gn]=Oe[An]=Oe[_r]=Oe[Qe]=!0,Oe[Dt]=Oe[Kt]=Oe[Xe]=Oe[Bt]=Oe[hn]=Oe[Pt]=Oe[te]=Oe[Ut]=Oe[re]=Oe[qt]=Oe[Gt]=Oe[de]=Oe[Ie]=Oe[Se]=Oe[ke]=!1;var Te={};Te[Dt]=Te[Kt]=Te[Xe]=Te[hn]=Te[Bt]=Te[Pt]=Te[Ke]=Te[oe]=Te[Ee]=Te[Le]=Te[sn]=Te[re]=Te[qt]=Te[Gt]=Te[de]=Te[Ie]=Te[Se]=Te[ee]=Te[gn]=Te[An]=Te[_r]=Te[Qe]=!0,Te[te]=Te[Ut]=Te[ke]=!1;var qy={À:"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"},Yy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xy={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Zy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qy=parseFloat,Jy=parseInt,Op=typeof dr=="object"&&dr&&dr.Object===Object&&dr,jy=typeof self=="object"&&self&&self.Object===Object&&self,Je=Op||jy||Function("return this")(),rf=t&&!t.nodeType&&t,Si=rf&&!0&&e&&!e.nodeType&&e,Np=Si&&Si.exports===rf,of=Np&&Op.process,Fn=function(){try{var U=Si&&Si.require&&Si.require("util").types;return U||of&&of.binding&&of.binding("util")}catch{}}(),Rp=Fn&&Fn.isArrayBuffer,Mp=Fn&&Fn.isDate,Lp=Fn&&Fn.isMap,Fp=Fn&&Fn.isRegExp,Dp=Fn&&Fn.isSet,Bp=Fn&&Fn.isTypedArray;function Cn(U,at,j){switch(j.length){case 0:return U.call(at);case 1:return U.call(at,j[0]);case 2:return U.call(at,j[0],j[1]);case 3:return U.call(at,j[0],j[1],j[2])}return U.apply(at,j)}function $y(U,at,j,kt){for(var zt=-1,ve=U==null?0:U.length;++zt<ve;){var qe=U[zt];at(kt,qe,j(qe),U)}return kt}function Dn(U,at){for(var j=-1,kt=U==null?0:U.length;++j<kt&&at(U[j],j,U)!==!1;);return U}function t1(U,at){for(var j=U==null?0:U.length;j--&&at(U[j],j,U)!==!1;);return U}function Vp(U,at){for(var j=-1,kt=U==null?0:U.length;++j<kt;)if(!at(U[j],j,U))return!1;return!0}function Zr(U,at){for(var j=-1,kt=U==null?0:U.length,zt=0,ve=[];++j<kt;){var qe=U[j];at(qe,j,U)&&(ve[zt++]=qe)}return ve}function zu(U,at){var j=U==null?0:U.length;return!!j&&Qi(U,at,0)>-1}function sf(U,at,j){for(var kt=-1,zt=U==null?0:U.length;++kt<zt;)if(j(at,U[kt]))return!0;return!1}function Fe(U,at){for(var j=-1,kt=U==null?0:U.length,zt=Array(kt);++j<kt;)zt[j]=at(U[j],j,U);return zt}function Qr(U,at){for(var j=-1,kt=at.length,zt=U.length;++j<kt;)U[zt+j]=at[j];return U}function af(U,at,j,kt){var zt=-1,ve=U==null?0:U.length;for(kt&&ve&&(j=U[++zt]);++zt<ve;)j=at(j,U[zt],zt,U);return j}function e1(U,at,j,kt){var zt=U==null?0:U.length;for(kt&&zt&&(j=U[--zt]);zt--;)j=at(j,U[zt],zt,U);return j}function lf(U,at){for(var j=-1,kt=U==null?0:U.length;++j<kt;)if(at(U[j],j,U))return!0;return!1}var n1=uf("length");function r1(U){return U.split("")}function i1(U){return U.match(fy)||[]}function zp(U,at,j){var kt;return j(U,function(zt,ve,qe){if(at(zt,ve,qe))return kt=ve,!1}),kt}function Wu(U,at,j,kt){for(var zt=U.length,ve=j+(kt?1:-1);kt?ve--:++ve<zt;)if(at(U[ve],ve,U))return ve;return-1}function Qi(U,at,j){return at===at?v1(U,at,j):Wu(U,Wp,j)}function o1(U,at,j,kt){for(var zt=j-1,ve=U.length;++zt<ve;)if(kt(U[zt],at))return zt;return-1}function Wp(U){return U!==U}function Hp(U,at){var j=U==null?0:U.length;return j?df(U,at)/j:wt}function uf(U){return function(at){return at==null?n:at[U]}}function cf(U){return function(at){return U==null?n:U[at]}}function Up(U,at,j,kt,zt){return zt(U,function(ve,qe,Pe){j=kt?(kt=!1,ve):at(j,ve,qe,Pe)}),j}function s1(U,at){var j=U.length;for(U.sort(at);j--;)U[j]=U[j].value;return U}function df(U,at){for(var j,kt=-1,zt=U.length;++kt<zt;){var ve=at(U[kt]);ve!==n&&(j=j===n?ve:j+ve)}return j}function ff(U,at){for(var j=-1,kt=Array(U);++j<U;)kt[j]=at(j);return kt}function a1(U,at){return Fe(at,function(j){return[j,U[j]]})}function Gp(U){return U&&U.slice(0,Xp(U)+1).replace(Jd,"")}function Pn(U){return function(at){return U(at)}}function hf(U,at){return Fe(at,function(j){return U[j]})}function Uo(U,at){return U.has(at)}function Kp(U,at){for(var j=-1,kt=U.length;++j<kt&&Qi(at,U[j],0)>-1;);return j}function qp(U,at){for(var j=U.length;j--&&Qi(at,U[j],0)>-1;);return j}function l1(U,at){for(var j=U.length,kt=0;j--;)U[j]===at&&++kt;return kt}var u1=cf(qy),c1=cf(Yy);function d1(U){return"\\"+Zy[U]}function f1(U,at){return U==null?n:U[at]}function Ji(U){return Hy.test(U)}function h1(U){return Uy.test(U)}function g1(U){for(var at,j=[];!(at=U.next()).done;)j.push(at.value);return j}function gf(U){var at=-1,j=Array(U.size);return U.forEach(function(kt,zt){j[++at]=[zt,kt]}),j}function Yp(U,at){return function(j){return U(at(j))}}function Jr(U,at){for(var j=-1,kt=U.length,zt=0,ve=[];++j<kt;){var qe=U[j];(qe===at||qe===h)&&(U[j]=h,ve[zt++]=j)}return ve}function Hu(U){var at=-1,j=Array(U.size);return U.forEach(function(kt){j[++at]=kt}),j}function p1(U){var at=-1,j=Array(U.size);return U.forEach(function(kt){j[++at]=[kt,kt]}),j}function v1(U,at,j){for(var kt=j-1,zt=U.length;++kt<zt;)if(U[kt]===at)return kt;return-1}function m1(U,at,j){for(var kt=j+1;kt--;)if(U[kt]===at)return kt;return kt}function ji(U){return Ji(U)?_1(U):n1(U)}function qn(U){return Ji(U)?w1(U):r1(U)}function Xp(U){for(var at=U.length;at--&&ly.test(U.charAt(at)););return at}var b1=cf(Xy);function _1(U){for(var at=nf.lastIndex=0;nf.test(U);)++at;return at}function w1(U){return U.match(nf)||[]}function y1(U){return U.match(Wy)||[]}var x1=function U(at){at=at==null?Je:$i.defaults(Je.Object(),at,$i.pick(Je,Gy));var j=at.Array,kt=at.Date,zt=at.Error,ve=at.Function,qe=at.Math,Pe=at.Object,pf=at.RegExp,S1=at.String,Bn=at.TypeError,Uu=j.prototype,A1=ve.prototype,to=Pe.prototype,Gu=at["__core-js_shared__"],Ku=A1.toString,Ae=to.hasOwnProperty,C1=0,Zp=function(){var r=/[^.]+$/.exec(Gu&&Gu.keys&&Gu.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),qu=to.toString,P1=Ku.call(Pe),k1=Je._,E1=pf("^"+Ku.call(Ae).replace(Qd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yu=Np?at.Buffer:n,jr=at.Symbol,Xu=at.Uint8Array,Qp=Yu?Yu.allocUnsafe:n,Zu=Yp(Pe.getPrototypeOf,Pe),Jp=Pe.create,jp=to.propertyIsEnumerable,Qu=Uu.splice,$p=jr?jr.isConcatSpreadable:n,Go=jr?jr.iterator:n,Ai=jr?jr.toStringTag:n,Ju=function(){try{var r=Ti(Pe,"defineProperty");return r({},"",{}),r}catch{}}(),T1=at.clearTimeout!==Je.clearTimeout&&at.clearTimeout,I1=kt&&kt.now!==Je.Date.now&&kt.now,O1=at.setTimeout!==Je.setTimeout&&at.setTimeout,ju=qe.ceil,$u=qe.floor,vf=Pe.getOwnPropertySymbols,N1=Yu?Yu.isBuffer:n,tv=at.isFinite,R1=Uu.join,M1=Yp(Pe.keys,Pe),Ye=qe.max,nn=qe.min,L1=kt.now,F1=at.parseInt,ev=qe.random,D1=Uu.reverse,mf=Ti(at,"DataView"),Ko=Ti(at,"Map"),bf=Ti(at,"Promise"),eo=Ti(at,"Set"),qo=Ti(at,"WeakMap"),Yo=Ti(Pe,"create"),tc=qo&&new qo,no={},B1=Ii(mf),V1=Ii(Ko),z1=Ii(bf),W1=Ii(eo),H1=Ii(qo),ec=jr?jr.prototype:n,Xo=ec?ec.valueOf:n,nv=ec?ec.toString:n;function P(r){if(ze(r)&&!Wt(r)&&!(r instanceof ue)){if(r instanceof Vn)return r;if(Ae.call(r,"__wrapped__"))return rm(r)}return new Vn(r)}var ro=function(){function r(){}return function(o){if(!De(o))return{};if(Jp)return Jp(o);r.prototype=o;var u=new r;return r.prototype=n,u}}();function nc(){}function Vn(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=n}P.templateSettings={escape:ny,evaluate:ry,interpolate:dp,variable:"",imports:{_:P}},P.prototype=nc.prototype,P.prototype.constructor=P,Vn.prototype=ro(nc.prototype),Vn.prototype.constructor=Vn;function ue(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=tt,this.__views__=[]}function U1(){var r=new ue(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 G1(){if(this.__filtered__){var r=new ue(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function K1(){var r=this.__wrapped__.value(),o=this.__dir__,u=Wt(r),v=o<0,w=u?r.length:0,k=rS(0,w,this.__views__),O=k.start,V=k.end,G=V-O,ft=v?V:O-1,gt=this.__iteratees__,mt=gt.length,At=0,It=nn(G,this.__takeCount__);if(!u||!v&&w==G&&It==G)return Pv(r,this.__actions__);var Lt=[];t:for(;G--&&At<It;){ft+=o;for(var Qt=-1,Ft=r[ft];++Qt<mt;){var se=gt[Qt],ce=se.iteratee,Tn=se.type,un=ce(Ft);if(Tn==nt)Ft=un;else if(!un){if(Tn==Y)continue t;break t}}Lt[At++]=Ft}return Lt}ue.prototype=ro(nc.prototype),ue.prototype.constructor=ue;function Ci(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var v=r[o];this.set(v[0],v[1])}}function q1(){this.__data__=Yo?Yo(null):{},this.size=0}function Y1(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function X1(r){var o=this.__data__;if(Yo){var u=o[r];return u===d?n:u}return Ae.call(o,r)?o[r]:n}function Z1(r){var o=this.__data__;return Yo?o[r]!==n:Ae.call(o,r)}function Q1(r,o){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Yo&&o===n?d:o,this}Ci.prototype.clear=q1,Ci.prototype.delete=Y1,Ci.prototype.get=X1,Ci.prototype.has=Z1,Ci.prototype.set=Q1;function wr(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var v=r[o];this.set(v[0],v[1])}}function J1(){this.__data__=[],this.size=0}function j1(r){var o=this.__data__,u=rc(o,r);if(u<0)return!1;var v=o.length-1;return u==v?o.pop():Qu.call(o,u,1),--this.size,!0}function $1(r){var o=this.__data__,u=rc(o,r);return u<0?n:o[u][1]}function tx(r){return rc(this.__data__,r)>-1}function ex(r,o){var u=this.__data__,v=rc(u,r);return v<0?(++this.size,u.push([r,o])):u[v][1]=o,this}wr.prototype.clear=J1,wr.prototype.delete=j1,wr.prototype.get=$1,wr.prototype.has=tx,wr.prototype.set=ex;function yr(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var v=r[o];this.set(v[0],v[1])}}function nx(){this.size=0,this.__data__={hash:new Ci,map:new(Ko||wr),string:new Ci}}function rx(r){var o=pc(this,r).delete(r);return this.size-=o?1:0,o}function ix(r){return pc(this,r).get(r)}function ox(r){return pc(this,r).has(r)}function sx(r,o){var u=pc(this,r),v=u.size;return u.set(r,o),this.size+=u.size==v?0:1,this}yr.prototype.clear=nx,yr.prototype.delete=rx,yr.prototype.get=ix,yr.prototype.has=ox,yr.prototype.set=sx;function Pi(r){var o=-1,u=r==null?0:r.length;for(this.__data__=new yr;++o<u;)this.add(r[o])}function ax(r){return this.__data__.set(r,d),this}function lx(r){return this.__data__.has(r)}Pi.prototype.add=Pi.prototype.push=ax,Pi.prototype.has=lx;function Yn(r){var o=this.__data__=new wr(r);this.size=o.size}function ux(){this.__data__=new wr,this.size=0}function cx(r){var o=this.__data__,u=o.delete(r);return this.size=o.size,u}function dx(r){return this.__data__.get(r)}function fx(r){return this.__data__.has(r)}function hx(r,o){var u=this.__data__;if(u instanceof wr){var v=u.__data__;if(!Ko||v.length<s-1)return v.push([r,o]),this.size=++u.size,this;u=this.__data__=new yr(v)}return u.set(r,o),this.size=u.size,this}Yn.prototype.clear=ux,Yn.prototype.delete=cx,Yn.prototype.get=dx,Yn.prototype.has=fx,Yn.prototype.set=hx;function rv(r,o){var u=Wt(r),v=!u&&Oi(r),w=!u&&!v&&ri(r),k=!u&&!v&&!w&&ao(r),O=u||v||w||k,V=O?ff(r.length,S1):[],G=V.length;for(var ft in r)(o||Ae.call(r,ft))&&!(O&&(ft=="length"||w&&(ft=="offset"||ft=="parent")||k&&(ft=="buffer"||ft=="byteLength"||ft=="byteOffset")||Cr(ft,G)))&&V.push(ft);return V}function iv(r){var o=r.length;return o?r[Tf(0,o-1)]:n}function gx(r,o){return vc(pn(r),ki(o,0,r.length))}function px(r){return vc(pn(r))}function _f(r,o,u){(u!==n&&!Xn(r[o],u)||u===n&&!(o in r))&&xr(r,o,u)}function Zo(r,o,u){var v=r[o];(!(Ae.call(r,o)&&Xn(v,u))||u===n&&!(o in r))&&xr(r,o,u)}function rc(r,o){for(var u=r.length;u--;)if(Xn(r[u][0],o))return u;return-1}function vx(r,o,u,v){return $r(r,function(w,k,O){o(v,w,u(w),O)}),v}function ov(r,o){return r&&sr(o,Ze(o),r)}function mx(r,o){return r&&sr(o,mn(o),r)}function xr(r,o,u){o=="__proto__"&&Ju?Ju(r,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[o]=u}function wf(r,o){for(var u=-1,v=o.length,w=j(v),k=r==null;++u<v;)w[u]=k?n:th(r,o[u]);return w}function ki(r,o,u){return r===r&&(u!==n&&(r=r<=u?r:u),o!==n&&(r=r>=o?r:o)),r}function zn(r,o,u,v,w,k){var O,V=o&p,G=o&m,ft=o&b;if(u&&(O=w?u(r,v,w,k):u(r)),O!==n)return O;if(!De(r))return r;var gt=Wt(r);if(gt){if(O=oS(r),!V)return pn(r,O)}else{var mt=rn(r),At=mt==Ut||mt==ge;if(ri(r))return Tv(r,V);if(mt==Gt||mt==Dt||At&&!w){if(O=G||At?{}:Xv(r),!V)return G?Xx(r,mx(O,r)):Yx(r,ov(O,r))}else{if(!Te[mt])return w?r:{};O=sS(r,mt,V)}}k||(k=new Yn);var It=k.get(r);if(It)return It;k.set(r,O),Sm(r)?r.forEach(function(Ft){O.add(zn(Ft,o,u,Ft,r,k))}):ym(r)&&r.forEach(function(Ft,se){O.set(se,zn(Ft,o,u,se,r,k))});var Lt=ft?G?zf:Vf:G?mn:Ze,Qt=gt?n:Lt(r);return Dn(Qt||r,function(Ft,se){Qt&&(se=Ft,Ft=r[se]),Zo(O,se,zn(Ft,o,u,se,r,k))}),O}function bx(r){var o=Ze(r);return function(u){return sv(u,r,o)}}function sv(r,o,u){var v=u.length;if(r==null)return!v;for(r=Pe(r);v--;){var w=u[v],k=o[w],O=r[w];if(O===n&&!(w in r)||!k(O))return!1}return!0}function av(r,o,u){if(typeof r!="function")throw new Bn(l);return ns(function(){r.apply(n,u)},o)}function Qo(r,o,u,v){var w=-1,k=zu,O=!0,V=r.length,G=[],ft=o.length;if(!V)return G;u&&(o=Fe(o,Pn(u))),v?(k=sf,O=!1):o.length>=s&&(k=Uo,O=!1,o=new Pi(o));t:for(;++w<V;){var gt=r[w],mt=u==null?gt:u(gt);if(gt=v||gt!==0?gt:0,O&&mt===mt){for(var At=ft;At--;)if(o[At]===mt)continue t;G.push(gt)}else k(o,mt,v)||G.push(gt)}return G}var $r=Mv(or),lv=Mv(xf,!0);function _x(r,o){var u=!0;return $r(r,function(v,w,k){return u=!!o(v,w,k),u}),u}function ic(r,o,u){for(var v=-1,w=r.length;++v<w;){var k=r[v],O=o(k);if(O!=null&&(V===n?O===O&&!En(O):u(O,V)))var V=O,G=k}return G}function wx(r,o,u,v){var w=r.length;for(u=Yt(u),u<0&&(u=-u>w?0:w+u),v=v===n||v>w?w:Yt(v),v<0&&(v+=w),v=u>v?0:Cm(v);u<v;)r[u++]=o;return r}function uv(r,o){var u=[];return $r(r,function(v,w,k){o(v,w,k)&&u.push(v)}),u}function je(r,o,u,v,w){var k=-1,O=r.length;for(u||(u=lS),w||(w=[]);++k<O;){var V=r[k];o>0&&u(V)?o>1?je(V,o-1,u,v,w):Qr(w,V):v||(w[w.length]=V)}return w}var yf=Lv(),cv=Lv(!0);function or(r,o){return r&&yf(r,o,Ze)}function xf(r,o){return r&&cv(r,o,Ze)}function oc(r,o){return Zr(o,function(u){return Pr(r[u])})}function Ei(r,o){o=ei(o,r);for(var u=0,v=o.length;r!=null&&u<v;)r=r[ar(o[u++])];return u&&u==v?r:n}function dv(r,o,u){var v=o(r);return Wt(r)?v:Qr(v,u(r))}function an(r){return r==null?r===n?pe:be:Ai&&Ai in Pe(r)?nS(r):pS(r)}function Sf(r,o){return r>o}function yx(r,o){return r!=null&&Ae.call(r,o)}function xx(r,o){return r!=null&&o in Pe(r)}function Sx(r,o,u){return r>=nn(o,u)&&r<Ye(o,u)}function Af(r,o,u){for(var v=u?sf:zu,w=r[0].length,k=r.length,O=k,V=j(k),G=1/0,ft=[];O--;){var gt=r[O];O&&o&&(gt=Fe(gt,Pn(o))),G=nn(gt.length,G),V[O]=!u&&(o||w>=120&&gt.length>=120)?new Pi(O&&gt):n}gt=r[0];var mt=-1,At=V[0];t:for(;++mt<w&&ft.length<G;){var It=gt[mt],Lt=o?o(It):It;if(It=u||It!==0?It:0,!(At?Uo(At,Lt):v(ft,Lt,u))){for(O=k;--O;){var Qt=V[O];if(!(Qt?Uo(Qt,Lt):v(r[O],Lt,u)))continue t}At&&At.push(Lt),ft.push(It)}}return ft}function Ax(r,o,u,v){return or(r,function(w,k,O){o(v,u(w),k,O)}),v}function Jo(r,o,u){o=ei(o,r),r=jv(r,o);var v=r==null?r:r[ar(Hn(o))];return v==null?n:Cn(v,r,u)}function fv(r){return ze(r)&&an(r)==Dt}function Cx(r){return ze(r)&&an(r)==Xe}function Px(r){return ze(r)&&an(r)==Pt}function jo(r,o,u,v,w){return r===o?!0:r==null||o==null||!ze(r)&&!ze(o)?r!==r&&o!==o:kx(r,o,u,v,jo,w)}function kx(r,o,u,v,w,k){var O=Wt(r),V=Wt(o),G=O?Kt:rn(r),ft=V?Kt:rn(o);G=G==Dt?Gt:G,ft=ft==Dt?Gt:ft;var gt=G==Gt,mt=ft==Gt,At=G==ft;if(At&&ri(r)){if(!ri(o))return!1;O=!0,gt=!1}if(At&&!gt)return k||(k=new Yn),O||ao(r)?Kv(r,o,u,v,w,k):tS(r,o,G,u,v,w,k);if(!(u&y)){var It=gt&&Ae.call(r,"__wrapped__"),Lt=mt&&Ae.call(o,"__wrapped__");if(It||Lt){var Qt=It?r.value():r,Ft=Lt?o.value():o;return k||(k=new Yn),w(Qt,Ft,u,v,k)}}return At?(k||(k=new Yn),eS(r,o,u,v,w,k)):!1}function Ex(r){return ze(r)&&rn(r)==re}function Cf(r,o,u,v){var w=u.length,k=w,O=!v;if(r==null)return!k;for(r=Pe(r);w--;){var V=u[w];if(O&&V[2]?V[1]!==r[V[0]]:!(V[0]in r))return!1}for(;++w<k;){V=u[w];var G=V[0],ft=r[G],gt=V[1];if(O&&V[2]){if(ft===n&&!(G in r))return!1}else{var mt=new Yn;if(v)var At=v(ft,gt,G,r,o,mt);if(!(At===n?jo(gt,ft,y|x,v,mt):At))return!1}}return!0}function hv(r){if(!De(r)||cS(r))return!1;var o=Pr(r)?E1:by;return o.test(Ii(r))}function Tx(r){return ze(r)&&an(r)==de}function Ix(r){return ze(r)&&rn(r)==Ie}function Ox(r){return ze(r)&&xc(r.length)&&!!Oe[an(r)]}function gv(r){return typeof r=="function"?r:r==null?bn:typeof r=="object"?Wt(r)?mv(r[0],r[1]):vv(r):Fm(r)}function Pf(r){if(!es(r))return M1(r);var o=[];for(var u in Pe(r))Ae.call(r,u)&&u!="constructor"&&o.push(u);return o}function Nx(r){if(!De(r))return gS(r);var o=es(r),u=[];for(var v in r)v=="constructor"&&(o||!Ae.call(r,v))||u.push(v);return u}function kf(r,o){return r<o}function pv(r,o){var u=-1,v=vn(r)?j(r.length):[];return $r(r,function(w,k,O){v[++u]=o(w,k,O)}),v}function vv(r){var o=Hf(r);return o.length==1&&o[0][2]?Qv(o[0][0],o[0][1]):function(u){return u===r||Cf(u,r,o)}}function mv(r,o){return Gf(r)&&Zv(o)?Qv(ar(r),o):function(u){var v=th(u,r);return v===n&&v===o?eh(u,r):jo(o,v,y|x)}}function sc(r,o,u,v,w){r!==o&&yf(o,function(k,O){if(w||(w=new Yn),De(k))Rx(r,o,O,u,sc,v,w);else{var V=v?v(qf(r,O),k,O+"",r,o,w):n;V===n&&(V=k),_f(r,O,V)}},mn)}function Rx(r,o,u,v,w,k,O){var V=qf(r,u),G=qf(o,u),ft=O.get(G);if(ft){_f(r,u,ft);return}var gt=k?k(V,G,u+"",r,o,O):n,mt=gt===n;if(mt){var At=Wt(G),It=!At&&ri(G),Lt=!At&&!It&&ao(G);gt=G,At||It||Lt?Wt(V)?gt=V:He(V)?gt=pn(V):It?(mt=!1,gt=Tv(G,!0)):Lt?(mt=!1,gt=Iv(G,!0)):gt=[]:rs(G)||Oi(G)?(gt=V,Oi(V)?gt=Pm(V):(!De(V)||Pr(V))&&(gt=Xv(G))):mt=!1}mt&&(O.set(G,gt),w(gt,G,v,k,O),O.delete(G)),_f(r,u,gt)}function bv(r,o){var u=r.length;if(u)return o+=o<0?u:0,Cr(o,u)?r[o]:n}function _v(r,o,u){o.length?o=Fe(o,function(k){return Wt(k)?function(O){return Ei(O,k.length===1?k[0]:k)}:k}):o=[bn];var v=-1;o=Fe(o,Pn(Rt()));var w=pv(r,function(k,O,V){var G=Fe(o,function(ft){return ft(k)});return{criteria:G,index:++v,value:k}});return s1(w,function(k,O){return qx(k,O,u)})}function Mx(r,o){return wv(r,o,function(u,v){return eh(r,v)})}function wv(r,o,u){for(var v=-1,w=o.length,k={};++v<w;){var O=o[v],V=Ei(r,O);u(V,O)&&$o(k,ei(O,r),V)}return k}function Lx(r){return function(o){return Ei(o,r)}}function Ef(r,o,u,v){var w=v?o1:Qi,k=-1,O=o.length,V=r;for(r===o&&(o=pn(o)),u&&(V=Fe(r,Pn(u)));++k<O;)for(var G=0,ft=o[k],gt=u?u(ft):ft;(G=w(V,gt,G,v))>-1;)V!==r&&Qu.call(V,G,1),Qu.call(r,G,1);return r}function yv(r,o){for(var u=r?o.length:0,v=u-1;u--;){var w=o[u];if(u==v||w!==k){var k=w;Cr(w)?Qu.call(r,w,1):Nf(r,w)}}return r}function Tf(r,o){return r+$u(ev()*(o-r+1))}function Fx(r,o,u,v){for(var w=-1,k=Ye(ju((o-r)/(u||1)),0),O=j(k);k--;)O[v?k:++w]=r,r+=u;return O}function If(r,o){var u="";if(!r||o<1||o>ut)return u;do o%2&&(u+=r),o=$u(o/2),o&&(r+=r);while(o);return u}function ne(r,o){return Yf(Jv(r,o,bn),r+"")}function Dx(r){return iv(lo(r))}function Bx(r,o){var u=lo(r);return vc(u,ki(o,0,u.length))}function $o(r,o,u,v){if(!De(r))return r;o=ei(o,r);for(var w=-1,k=o.length,O=k-1,V=r;V!=null&&++w<k;){var G=ar(o[w]),ft=u;if(G==="__proto__"||G==="constructor"||G==="prototype")return r;if(w!=O){var gt=V[G];ft=v?v(gt,G,V):n,ft===n&&(ft=De(gt)?gt:Cr(o[w+1])?[]:{})}Zo(V,G,ft),V=V[G]}return r}var xv=tc?function(r,o){return tc.set(r,o),r}:bn,Vx=Ju?function(r,o){return Ju(r,"toString",{configurable:!0,enumerable:!1,value:rh(o),writable:!0})}:bn;function zx(r){return vc(lo(r))}function Wn(r,o,u){var v=-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 k=j(w);++v<w;)k[v]=r[v+o];return k}function Wx(r,o){var u;return $r(r,function(v,w,k){return u=o(v,w,k),!u}),!!u}function ac(r,o,u){var v=0,w=r==null?v:r.length;if(typeof o=="number"&&o===o&&w<=yt){for(;v<w;){var k=v+w>>>1,O=r[k];O!==null&&!En(O)&&(u?O<=o:O<o)?v=k+1:w=k}return w}return Of(r,o,bn,u)}function Of(r,o,u,v){var w=0,k=r==null?0:r.length;if(k===0)return 0;o=u(o);for(var O=o!==o,V=o===null,G=En(o),ft=o===n;w<k;){var gt=$u((w+k)/2),mt=u(r[gt]),At=mt!==n,It=mt===null,Lt=mt===mt,Qt=En(mt);if(O)var Ft=v||Lt;else ft?Ft=Lt&&(v||At):V?Ft=Lt&&At&&(v||!It):G?Ft=Lt&&At&&!It&&(v||!Qt):It||Qt?Ft=!1:Ft=v?mt<=o:mt<o;Ft?w=gt+1:k=gt}return nn(k,et)}function Sv(r,o){for(var u=-1,v=r.length,w=0,k=[];++u<v;){var O=r[u],V=o?o(O):O;if(!u||!Xn(V,G)){var G=V;k[w++]=O===0?0:O}}return k}function Av(r){return typeof r=="number"?r:En(r)?wt:+r}function kn(r){if(typeof r=="string")return r;if(Wt(r))return Fe(r,kn)+"";if(En(r))return nv?nv.call(r):"";var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function ti(r,o,u){var v=-1,w=zu,k=r.length,O=!0,V=[],G=V;if(u)O=!1,w=sf;else if(k>=s){var ft=o?null:jx(r);if(ft)return Hu(ft);O=!1,w=Uo,G=new Pi}else G=o?[]:V;t:for(;++v<k;){var gt=r[v],mt=o?o(gt):gt;if(gt=u||gt!==0?gt:0,O&&mt===mt){for(var At=G.length;At--;)if(G[At]===mt)continue t;o&&G.push(mt),V.push(gt)}else w(G,mt,u)||(G!==V&&G.push(mt),V.push(gt))}return V}function Nf(r,o){return o=ei(o,r),r=jv(r,o),r==null||delete r[ar(Hn(o))]}function Cv(r,o,u,v){return $o(r,o,u(Ei(r,o)),v)}function lc(r,o,u,v){for(var w=r.length,k=v?w:-1;(v?k--:++k<w)&&o(r[k],k,r););return u?Wn(r,v?0:k,v?k+1:w):Wn(r,v?k+1:0,v?w:k)}function Pv(r,o){var u=r;return u instanceof ue&&(u=u.value()),af(o,function(v,w){return w.func.apply(w.thisArg,Qr([v],w.args))},u)}function Rf(r,o,u){var v=r.length;if(v<2)return v?ti(r[0]):[];for(var w=-1,k=j(v);++w<v;)for(var O=r[w],V=-1;++V<v;)V!=w&&(k[w]=Qo(k[w]||O,r[V],o,u));return ti(je(k,1),o,u)}function kv(r,o,u){for(var v=-1,w=r.length,k=o.length,O={};++v<w;){var V=v<k?o[v]:n;u(O,r[v],V)}return O}function Mf(r){return He(r)?r:[]}function Lf(r){return typeof r=="function"?r:bn}function ei(r,o){return Wt(r)?r:Gf(r,o)?[r]:nm(_e(r))}var Hx=ne;function ni(r,o,u){var v=r.length;return u=u===n?v:u,!o&&u>=v?r:Wn(r,o,u)}var Ev=T1||function(r){return Je.clearTimeout(r)};function Tv(r,o){if(o)return r.slice();var u=r.length,v=Qp?Qp(u):new r.constructor(u);return r.copy(v),v}function Ff(r){var o=new r.constructor(r.byteLength);return new Xu(o).set(new Xu(r)),o}function Ux(r,o){var u=o?Ff(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function Gx(r){var o=new r.constructor(r.source,fp.exec(r));return o.lastIndex=r.lastIndex,o}function Kx(r){return Xo?Pe(Xo.call(r)):{}}function Iv(r,o){var u=o?Ff(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function Ov(r,o){if(r!==o){var u=r!==n,v=r===null,w=r===r,k=En(r),O=o!==n,V=o===null,G=o===o,ft=En(o);if(!V&&!ft&&!k&&r>o||k&&O&&G&&!V&&!ft||v&&O&&G||!u&&G||!w)return 1;if(!v&&!k&&!ft&&r<o||ft&&u&&w&&!v&&!k||V&&u&&w||!O&&w||!G)return-1}return 0}function qx(r,o,u){for(var v=-1,w=r.criteria,k=o.criteria,O=w.length,V=u.length;++v<O;){var G=Ov(w[v],k[v]);if(G){if(v>=V)return G;var ft=u[v];return G*(ft=="desc"?-1:1)}}return r.index-o.index}function Nv(r,o,u,v){for(var w=-1,k=r.length,O=u.length,V=-1,G=o.length,ft=Ye(k-O,0),gt=j(G+ft),mt=!v;++V<G;)gt[V]=o[V];for(;++w<O;)(mt||w<k)&&(gt[u[w]]=r[w]);for(;ft--;)gt[V++]=r[w++];return gt}function Rv(r,o,u,v){for(var w=-1,k=r.length,O=-1,V=u.length,G=-1,ft=o.length,gt=Ye(k-V,0),mt=j(gt+ft),At=!v;++w<gt;)mt[w]=r[w];for(var It=w;++G<ft;)mt[It+G]=o[G];for(;++O<V;)(At||w<k)&&(mt[It+u[O]]=r[w++]);return mt}function pn(r,o){var u=-1,v=r.length;for(o||(o=j(v));++u<v;)o[u]=r[u];return o}function sr(r,o,u,v){var w=!u;u||(u={});for(var k=-1,O=o.length;++k<O;){var V=o[k],G=v?v(u[V],r[V],V,u,r):n;G===n&&(G=r[V]),w?xr(u,V,G):Zo(u,V,G)}return u}function Yx(r,o){return sr(r,Uf(r),o)}function Xx(r,o){return sr(r,qv(r),o)}function uc(r,o){return function(u,v){var w=Wt(u)?$y:vx,k=o?o():{};return w(u,r,Rt(v,2),k)}}function io(r){return ne(function(o,u){var v=-1,w=u.length,k=w>1?u[w-1]:n,O=w>2?u[2]:n;for(k=r.length>3&&typeof k=="function"?(w--,k):n,O&&ln(u[0],u[1],O)&&(k=w<3?n:k,w=1),o=Pe(o);++v<w;){var V=u[v];V&&r(o,V,v,k)}return o})}function Mv(r,o){return function(u,v){if(u==null)return u;if(!vn(u))return r(u,v);for(var w=u.length,k=o?w:-1,O=Pe(u);(o?k--:++k<w)&&v(O[k],k,O)!==!1;);return u}}function Lv(r){return function(o,u,v){for(var w=-1,k=Pe(o),O=v(o),V=O.length;V--;){var G=O[r?V:++w];if(u(k[G],G,k)===!1)break}return o}}function Zx(r,o,u){var v=o&S,w=ts(r);function k(){var O=this&&this!==Je&&this instanceof k?w:r;return O.apply(v?u:this,arguments)}return k}function Fv(r){return function(o){o=_e(o);var u=Ji(o)?qn(o):n,v=u?u[0]:o.charAt(0),w=u?ni(u,1).join(""):o.slice(1);return v[r]()+w}}function oo(r){return function(o){return af(Mm(Rm(o).replace(Vy,"")),r,"")}}function ts(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=ro(r.prototype),v=r.apply(u,o);return De(v)?v:u}}function Qx(r,o,u){var v=ts(r);function w(){for(var k=arguments.length,O=j(k),V=k,G=so(w);V--;)O[V]=arguments[V];var ft=k<3&&O[0]!==G&&O[k-1]!==G?[]:Jr(O,G);if(k-=ft.length,k<u)return Wv(r,o,cc,w.placeholder,n,O,ft,n,n,u-k);var gt=this&&this!==Je&&this instanceof w?v:r;return Cn(gt,this,O)}return w}function Dv(r){return function(o,u,v){var w=Pe(o);if(!vn(o)){var k=Rt(u,3);o=Ze(o),u=function(V){return k(w[V],V,w)}}var O=r(o,u,v);return O>-1?w[k?o[O]:O]:n}}function Bv(r){return Ar(function(o){var u=o.length,v=u,w=Vn.prototype.thru;for(r&&o.reverse();v--;){var k=o[v];if(typeof k!="function")throw new Bn(l);if(w&&!O&&gc(k)=="wrapper")var O=new Vn([],!0)}for(v=O?v:u;++v<u;){k=o[v];var V=gc(k),G=V=="wrapper"?Wf(k):n;G&&Kf(G[0])&&G[1]==(M|N|W|q)&&!G[4].length&&G[9]==1?O=O[gc(G[0])].apply(O,G[3]):O=k.length==1&&Kf(k)?O[V]():O.thru(k)}return function(){var ft=arguments,gt=ft[0];if(O&&ft.length==1&&Wt(gt))return O.plant(gt).value();for(var mt=0,At=u?o[mt].apply(this,ft):gt;++mt<u;)At=o[mt].call(this,At);return At}})}function cc(r,o,u,v,w,k,O,V,G,ft){var gt=o&M,mt=o&S,At=o&C,It=o&(N|B),Lt=o&$,Qt=At?n:ts(r);function Ft(){for(var se=arguments.length,ce=j(se),Tn=se;Tn--;)ce[Tn]=arguments[Tn];if(It)var un=so(Ft),In=l1(ce,un);if(v&&(ce=Nv(ce,v,w,It)),k&&(ce=Rv(ce,k,O,It)),se-=In,It&&se<ft){var Ue=Jr(ce,un);return Wv(r,o,cc,Ft.placeholder,u,ce,Ue,V,G,ft-se)}var Zn=mt?u:this,Er=At?Zn[r]:r;return se=ce.length,V?ce=vS(ce,V):Lt&&se>1&&ce.reverse(),gt&&G<se&&(ce.length=G),this&&this!==Je&&this instanceof Ft&&(Er=Qt||ts(Er)),Er.apply(Zn,ce)}return Ft}function Vv(r,o){return function(u,v){return Ax(u,r,o(v),{})}}function dc(r,o){return function(u,v){var w;if(u===n&&v===n)return o;if(u!==n&&(w=u),v!==n){if(w===n)return v;typeof u=="string"||typeof v=="string"?(u=kn(u),v=kn(v)):(u=Av(u),v=Av(v)),w=r(u,v)}return w}}function Df(r){return Ar(function(o){return o=Fe(o,Pn(Rt())),ne(function(u){var v=this;return r(o,function(w){return Cn(w,v,u)})})})}function fc(r,o){o=o===n?" ":kn(o);var u=o.length;if(u<2)return u?If(o,r):o;var v=If(o,ju(r/ji(o)));return Ji(o)?ni(qn(v),0,r).join(""):v.slice(0,r)}function Jx(r,o,u,v){var w=o&S,k=ts(r);function O(){for(var V=-1,G=arguments.length,ft=-1,gt=v.length,mt=j(gt+G),At=this&&this!==Je&&this instanceof O?k:r;++ft<gt;)mt[ft]=v[ft];for(;G--;)mt[ft++]=arguments[++V];return Cn(At,w?u:this,mt)}return O}function zv(r){return function(o,u,v){return v&&typeof v!="number"&&ln(o,u,v)&&(u=v=n),o=kr(o),u===n?(u=o,o=0):u=kr(u),v=v===n?o<u?1:-1:kr(v),Fx(o,u,v,r)}}function hc(r){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=Un(o),u=Un(u)),r(o,u)}}function Wv(r,o,u,v,w,k,O,V,G,ft){var gt=o&N,mt=gt?O:n,At=gt?n:O,It=gt?k:n,Lt=gt?n:k;o|=gt?W:z,o&=~(gt?z:W),o&T||(o&=-4);var Qt=[r,o,w,It,mt,Lt,At,V,G,ft],Ft=u.apply(n,Qt);return Kf(r)&&$v(Ft,Qt),Ft.placeholder=v,tm(Ft,r,o)}function Bf(r){var o=qe[r];return function(u,v){if(u=Un(u),v=v==null?0:nn(Yt(v),292),v&&tv(u)){var w=(_e(u)+"e").split("e"),k=o(w[0]+"e"+(+w[1]+v));return w=(_e(k)+"e").split("e"),+(w[0]+"e"+(+w[1]-v))}return o(u)}}var jx=eo&&1/Hu(new eo([,-0]))[1]==lt?function(r){return new eo(r)}:sh;function Hv(r){return function(o){var u=rn(o);return u==re?gf(o):u==Ie?p1(o):a1(o,r(o))}}function Sr(r,o,u,v,w,k,O,V){var G=o&C;if(!G&&typeof r!="function")throw new Bn(l);var ft=v?v.length:0;if(ft||(o&=-97,v=w=n),O=O===n?O:Ye(Yt(O),0),V=V===n?V:Yt(V),ft-=w?w.length:0,o&z){var gt=v,mt=w;v=w=n}var At=G?n:Wf(r),It=[r,o,u,v,w,gt,mt,k,O,V];if(At&&hS(It,At),r=It[0],o=It[1],u=It[2],v=It[3],w=It[4],V=It[9]=It[9]===n?G?0:r.length:Ye(It[9]-ft,0),!V&&o&(N|B)&&(o&=-25),!o||o==S)var Lt=Zx(r,o,u);else o==N||o==B?Lt=Qx(r,o,V):(o==W||o==(S|W))&&!w.length?Lt=Jx(r,o,u,v):Lt=cc.apply(n,It);var Qt=At?xv:$v;return tm(Qt(Lt,It),r,o)}function Uv(r,o,u,v){return r===n||Xn(r,to[u])&&!Ae.call(v,u)?o:r}function Gv(r,o,u,v,w,k){return De(r)&&De(o)&&(k.set(o,r),sc(r,o,n,Gv,k),k.delete(o)),r}function $x(r){return rs(r)?n:r}function Kv(r,o,u,v,w,k){var O=u&y,V=r.length,G=o.length;if(V!=G&&!(O&&G>V))return!1;var ft=k.get(r),gt=k.get(o);if(ft&&gt)return ft==o&&gt==r;var mt=-1,At=!0,It=u&x?new Pi:n;for(k.set(r,o),k.set(o,r);++mt<V;){var Lt=r[mt],Qt=o[mt];if(v)var Ft=O?v(Qt,Lt,mt,o,r,k):v(Lt,Qt,mt,r,o,k);if(Ft!==n){if(Ft)continue;At=!1;break}if(It){if(!lf(o,function(se,ce){if(!Uo(It,ce)&&(Lt===se||w(Lt,se,u,v,k)))return It.push(ce)})){At=!1;break}}else if(!(Lt===Qt||w(Lt,Qt,u,v,k))){At=!1;break}}return k.delete(r),k.delete(o),At}function tS(r,o,u,v,w,k,O){switch(u){case hn:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case Xe:return!(r.byteLength!=o.byteLength||!k(new Xu(r),new Xu(o)));case Bt:case Pt:case qt:return Xn(+r,+o);case te:return r.name==o.name&&r.message==o.message;case de:case Se:return r==o+"";case re:var V=gf;case Ie:var G=v&y;if(V||(V=Hu),r.size!=o.size&&!G)return!1;var ft=O.get(r);if(ft)return ft==o;v|=x,O.set(r,o);var gt=Kv(V(r),V(o),v,w,k,O);return O.delete(r),gt;case ee:if(Xo)return Xo.call(r)==Xo.call(o)}return!1}function eS(r,o,u,v,w,k){var O=u&y,V=Vf(r),G=V.length,ft=Vf(o),gt=ft.length;if(G!=gt&&!O)return!1;for(var mt=G;mt--;){var At=V[mt];if(!(O?At in o:Ae.call(o,At)))return!1}var It=k.get(r),Lt=k.get(o);if(It&&Lt)return It==o&&Lt==r;var Qt=!0;k.set(r,o),k.set(o,r);for(var Ft=O;++mt<G;){At=V[mt];var se=r[At],ce=o[At];if(v)var Tn=O?v(ce,se,At,o,r,k):v(se,ce,At,r,o,k);if(!(Tn===n?se===ce||w(se,ce,u,v,k):Tn)){Qt=!1;break}Ft||(Ft=At=="constructor")}if(Qt&&!Ft){var un=r.constructor,In=o.constructor;un!=In&&"constructor"in r&&"constructor"in o&&!(typeof un=="function"&&un instanceof un&&typeof In=="function"&&In instanceof In)&&(Qt=!1)}return k.delete(r),k.delete(o),Qt}function Ar(r){return Yf(Jv(r,n,sm),r+"")}function Vf(r){return dv(r,Ze,Uf)}function zf(r){return dv(r,mn,qv)}var Wf=tc?function(r){return tc.get(r)}:sh;function gc(r){for(var o=r.name+"",u=no[o],v=Ae.call(no,o)?u.length:0;v--;){var w=u[v],k=w.func;if(k==null||k==r)return w.name}return o}function so(r){var o=Ae.call(P,"placeholder")?P:r;return o.placeholder}function Rt(){var r=P.iteratee||ih;return r=r===ih?gv:r,arguments.length?r(arguments[0],arguments[1]):r}function pc(r,o){var u=r.__data__;return uS(o)?u[typeof o=="string"?"string":"hash"]:u.map}function Hf(r){for(var o=Ze(r),u=o.length;u--;){var v=o[u],w=r[v];o[u]=[v,w,Zv(w)]}return o}function Ti(r,o){var u=f1(r,o);return hv(u)?u:n}function nS(r){var o=Ae.call(r,Ai),u=r[Ai];try{r[Ai]=n;var v=!0}catch{}var w=qu.call(r);return v&&(o?r[Ai]=u:delete r[Ai]),w}var Uf=vf?function(r){return r==null?[]:(r=Pe(r),Zr(vf(r),function(o){return jp.call(r,o)}))}:ah,qv=vf?function(r){for(var o=[];r;)Qr(o,Uf(r)),r=Zu(r);return o}:ah,rn=an;(mf&&rn(new mf(new ArrayBuffer(1)))!=hn||Ko&&rn(new Ko)!=re||bf&&rn(bf.resolve())!=xe||eo&&rn(new eo)!=Ie||qo&&rn(new qo)!=ke)&&(rn=function(r){var o=an(r),u=o==Gt?r.constructor:n,v=u?Ii(u):"";if(v)switch(v){case B1:return hn;case V1:return re;case z1:return xe;case W1:return Ie;case H1:return ke}return o});function rS(r,o,u){for(var v=-1,w=u.length;++v<w;){var k=u[v],O=k.size;switch(k.type){case"drop":r+=O;break;case"dropRight":o-=O;break;case"take":o=nn(o,r+O);break;case"takeRight":r=Ye(r,o-O);break}}return{start:r,end:o}}function iS(r){var o=r.match(cy);return o?o[1].split(dy):[]}function Yv(r,o,u){o=ei(o,r);for(var v=-1,w=o.length,k=!1;++v<w;){var O=ar(o[v]);if(!(k=r!=null&&u(r,O)))break;r=r[O]}return k||++v!=w?k:(w=r==null?0:r.length,!!w&&xc(w)&&Cr(O,w)&&(Wt(r)||Oi(r)))}function oS(r){var o=r.length,u=new r.constructor(o);return o&&typeof r[0]=="string"&&Ae.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Xv(r){return typeof r.constructor=="function"&&!es(r)?ro(Zu(r)):{}}function sS(r,o,u){var v=r.constructor;switch(o){case Xe:return Ff(r);case Bt:case Pt:return new v(+r);case hn:return Ux(r,u);case Ke:case oe:case Ee:case Le:case sn:case gn:case An:case _r:case Qe:return Iv(r,u);case re:return new v;case qt:case Se:return new v(r);case de:return Gx(r);case Ie:return new v;case ee:return Kx(r)}}function aS(r,o){var u=o.length;if(!u)return r;var v=u-1;return o[v]=(u>1?"& ":"")+o[v],o=o.join(u>2?", ":" "),r.replace(uy,`{
399
+ /* [wrapped with `+o+`] */
400
+ `)}function lS(r){return Wt(r)||Oi(r)||!!($p&&r&&r[$p])}function Cr(r,o){var u=typeof r;return o=o??ut,!!o&&(u=="number"||u!="symbol"&&wy.test(r))&&r>-1&&r%1==0&&r<o}function ln(r,o,u){if(!De(u))return!1;var v=typeof o;return(v=="number"?vn(u)&&Cr(o,u.length):v=="string"&&o in u)?Xn(u[o],r):!1}function Gf(r,o){if(Wt(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||En(r)?!0:oy.test(r)||!iy.test(r)||o!=null&&r in Pe(o)}function uS(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function Kf(r){var o=gc(r),u=P[o];if(typeof u!="function"||!(o in ue.prototype))return!1;if(r===u)return!0;var v=Wf(u);return!!v&&r===v[0]}function cS(r){return!!Zp&&Zp in r}var dS=Gu?Pr:lh;function es(r){var o=r&&r.constructor,u=typeof o=="function"&&o.prototype||to;return r===u}function Zv(r){return r===r&&!De(r)}function Qv(r,o){return function(u){return u==null?!1:u[r]===o&&(o!==n||r in Pe(u))}}function fS(r){var o=wc(r,function(v){return u.size===f&&u.clear(),v}),u=o.cache;return o}function hS(r,o){var u=r[1],v=o[1],w=u|v,k=w<(S|C|M),O=v==M&&u==N||v==M&&u==q&&r[7].length<=o[8]||v==(M|q)&&o[7].length<=o[8]&&u==N;if(!(k||O))return r;v&S&&(r[2]=o[2],w|=u&S?0:T);var V=o[3];if(V){var G=r[3];r[3]=G?Nv(G,V,o[4]):V,r[4]=G?Jr(r[3],h):o[4]}return V=o[5],V&&(G=r[5],r[5]=G?Rv(G,V,o[6]):V,r[6]=G?Jr(r[5],h):o[6]),V=o[7],V&&(r[7]=V),v&M&&(r[8]=r[8]==null?o[8]:nn(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=w,r}function gS(r){var o=[];if(r!=null)for(var u in Pe(r))o.push(u);return o}function pS(r){return qu.call(r)}function Jv(r,o,u){return o=Ye(o===n?r.length-1:o,0),function(){for(var v=arguments,w=-1,k=Ye(v.length-o,0),O=j(k);++w<k;)O[w]=v[o+w];w=-1;for(var V=j(o+1);++w<o;)V[w]=v[w];return V[o]=u(O),Cn(r,this,V)}}function jv(r,o){return o.length<2?r:Ei(r,Wn(o,0,-1))}function vS(r,o){for(var u=r.length,v=nn(o.length,u),w=pn(r);v--;){var k=o[v];r[v]=Cr(k,u)?w[k]:n}return r}function qf(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var $v=em(xv),ns=O1||function(r,o){return Je.setTimeout(r,o)},Yf=em(Vx);function tm(r,o,u){var v=o+"";return Yf(r,aS(v,mS(iS(v),u)))}function em(r){var o=0,u=0;return function(){var v=L1(),w=it-(v-u);if(u=v,w>0){if(++o>=H)return arguments[0]}else o=0;return r.apply(n,arguments)}}function vc(r,o){var u=-1,v=r.length,w=v-1;for(o=o===n?v:o;++u<o;){var k=Tf(u,w),O=r[k];r[k]=r[u],r[u]=O}return r.length=o,r}var nm=fS(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(sy,function(u,v,w,k){o.push(w?k.replace(gy,"$1"):v||u)}),o});function ar(r){if(typeof r=="string"||En(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function Ii(r){if(r!=null){try{return Ku.call(r)}catch{}try{return r+""}catch{}}return""}function mS(r,o){return Dn(Et,function(u){var v="_."+u[0];o&u[1]&&!zu(r,v)&&r.push(v)}),r.sort()}function rm(r){if(r instanceof ue)return r.clone();var o=new Vn(r.__wrapped__,r.__chain__);return o.__actions__=pn(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function bS(r,o,u){(u?ln(r,o,u):o===n)?o=1:o=Ye(Yt(o),0);var v=r==null?0:r.length;if(!v||o<1)return[];for(var w=0,k=0,O=j(ju(v/o));w<v;)O[k++]=Wn(r,w,w+=o);return O}function _S(r){for(var o=-1,u=r==null?0:r.length,v=0,w=[];++o<u;){var k=r[o];k&&(w[v++]=k)}return w}function wS(){var r=arguments.length;if(!r)return[];for(var o=j(r-1),u=arguments[0],v=r;v--;)o[v-1]=arguments[v];return Qr(Wt(u)?pn(u):[u],je(o,1))}var yS=ne(function(r,o){return He(r)?Qo(r,je(o,1,He,!0)):[]}),xS=ne(function(r,o){var u=Hn(o);return He(u)&&(u=n),He(r)?Qo(r,je(o,1,He,!0),Rt(u,2)):[]}),SS=ne(function(r,o){var u=Hn(o);return He(u)&&(u=n),He(r)?Qo(r,je(o,1,He,!0),n,u):[]});function AS(r,o,u){var v=r==null?0:r.length;return v?(o=u||o===n?1:Yt(o),Wn(r,o<0?0:o,v)):[]}function CS(r,o,u){var v=r==null?0:r.length;return v?(o=u||o===n?1:Yt(o),o=v-o,Wn(r,0,o<0?0:o)):[]}function PS(r,o){return r&&r.length?lc(r,Rt(o,3),!0,!0):[]}function kS(r,o){return r&&r.length?lc(r,Rt(o,3),!0):[]}function ES(r,o,u,v){var w=r==null?0:r.length;return w?(u&&typeof u!="number"&&ln(r,o,u)&&(u=0,v=w),wx(r,o,u,v)):[]}function im(r,o,u){var v=r==null?0:r.length;if(!v)return-1;var w=u==null?0:Yt(u);return w<0&&(w=Ye(v+w,0)),Wu(r,Rt(o,3),w)}function om(r,o,u){var v=r==null?0:r.length;if(!v)return-1;var w=v-1;return u!==n&&(w=Yt(u),w=u<0?Ye(v+w,0):nn(w,v-1)),Wu(r,Rt(o,3),w,!0)}function sm(r){var o=r==null?0:r.length;return o?je(r,1):[]}function TS(r){var o=r==null?0:r.length;return o?je(r,lt):[]}function IS(r,o){var u=r==null?0:r.length;return u?(o=o===n?1:Yt(o),je(r,o)):[]}function OS(r){for(var o=-1,u=r==null?0:r.length,v={};++o<u;){var w=r[o];v[w[0]]=w[1]}return v}function am(r){return r&&r.length?r[0]:n}function NS(r,o,u){var v=r==null?0:r.length;if(!v)return-1;var w=u==null?0:Yt(u);return w<0&&(w=Ye(v+w,0)),Qi(r,o,w)}function RS(r){var o=r==null?0:r.length;return o?Wn(r,0,-1):[]}var MS=ne(function(r){var o=Fe(r,Mf);return o.length&&o[0]===r[0]?Af(o):[]}),LS=ne(function(r){var o=Hn(r),u=Fe(r,Mf);return o===Hn(u)?o=n:u.pop(),u.length&&u[0]===r[0]?Af(u,Rt(o,2)):[]}),FS=ne(function(r){var o=Hn(r),u=Fe(r,Mf);return o=typeof o=="function"?o:n,o&&u.pop(),u.length&&u[0]===r[0]?Af(u,n,o):[]});function DS(r,o){return r==null?"":R1.call(r,o)}function Hn(r){var o=r==null?0:r.length;return o?r[o-1]:n}function BS(r,o,u){var v=r==null?0:r.length;if(!v)return-1;var w=v;return u!==n&&(w=Yt(u),w=w<0?Ye(v+w,0):nn(w,v-1)),o===o?m1(r,o,w):Wu(r,Wp,w,!0)}function VS(r,o){return r&&r.length?bv(r,Yt(o)):n}var zS=ne(lm);function lm(r,o){return r&&r.length&&o&&o.length?Ef(r,o):r}function WS(r,o,u){return r&&r.length&&o&&o.length?Ef(r,o,Rt(u,2)):r}function HS(r,o,u){return r&&r.length&&o&&o.length?Ef(r,o,n,u):r}var US=Ar(function(r,o){var u=r==null?0:r.length,v=wf(r,o);return yv(r,Fe(o,function(w){return Cr(w,u)?+w:w}).sort(Ov)),v});function GS(r,o){var u=[];if(!(r&&r.length))return u;var v=-1,w=[],k=r.length;for(o=Rt(o,3);++v<k;){var O=r[v];o(O,v,r)&&(u.push(O),w.push(v))}return yv(r,w),u}function Xf(r){return r==null?r:D1.call(r)}function KS(r,o,u){var v=r==null?0:r.length;return v?(u&&typeof u!="number"&&ln(r,o,u)?(o=0,u=v):(o=o==null?0:Yt(o),u=u===n?v:Yt(u)),Wn(r,o,u)):[]}function qS(r,o){return ac(r,o)}function YS(r,o,u){return Of(r,o,Rt(u,2))}function XS(r,o){var u=r==null?0:r.length;if(u){var v=ac(r,o);if(v<u&&Xn(r[v],o))return v}return-1}function ZS(r,o){return ac(r,o,!0)}function QS(r,o,u){return Of(r,o,Rt(u,2),!0)}function JS(r,o){var u=r==null?0:r.length;if(u){var v=ac(r,o,!0)-1;if(Xn(r[v],o))return v}return-1}function jS(r){return r&&r.length?Sv(r):[]}function $S(r,o){return r&&r.length?Sv(r,Rt(o,2)):[]}function tA(r){var o=r==null?0:r.length;return o?Wn(r,1,o):[]}function eA(r,o,u){return r&&r.length?(o=u||o===n?1:Yt(o),Wn(r,0,o<0?0:o)):[]}function nA(r,o,u){var v=r==null?0:r.length;return v?(o=u||o===n?1:Yt(o),o=v-o,Wn(r,o<0?0:o,v)):[]}function rA(r,o){return r&&r.length?lc(r,Rt(o,3),!1,!0):[]}function iA(r,o){return r&&r.length?lc(r,Rt(o,3)):[]}var oA=ne(function(r){return ti(je(r,1,He,!0))}),sA=ne(function(r){var o=Hn(r);return He(o)&&(o=n),ti(je(r,1,He,!0),Rt(o,2))}),aA=ne(function(r){var o=Hn(r);return o=typeof o=="function"?o:n,ti(je(r,1,He,!0),n,o)});function lA(r){return r&&r.length?ti(r):[]}function uA(r,o){return r&&r.length?ti(r,Rt(o,2)):[]}function cA(r,o){return o=typeof o=="function"?o:n,r&&r.length?ti(r,n,o):[]}function Zf(r){if(!(r&&r.length))return[];var o=0;return r=Zr(r,function(u){if(He(u))return o=Ye(u.length,o),!0}),ff(o,function(u){return Fe(r,uf(u))})}function um(r,o){if(!(r&&r.length))return[];var u=Zf(r);return o==null?u:Fe(u,function(v){return Cn(o,n,v)})}var dA=ne(function(r,o){return He(r)?Qo(r,o):[]}),fA=ne(function(r){return Rf(Zr(r,He))}),hA=ne(function(r){var o=Hn(r);return He(o)&&(o=n),Rf(Zr(r,He),Rt(o,2))}),gA=ne(function(r){var o=Hn(r);return o=typeof o=="function"?o:n,Rf(Zr(r,He),n,o)}),pA=ne(Zf);function vA(r,o){return kv(r||[],o||[],Zo)}function mA(r,o){return kv(r||[],o||[],$o)}var bA=ne(function(r){var o=r.length,u=o>1?r[o-1]:n;return u=typeof u=="function"?(r.pop(),u):n,um(r,u)});function cm(r){var o=P(r);return o.__chain__=!0,o}function _A(r,o){return o(r),r}function mc(r,o){return o(r)}var wA=Ar(function(r){var o=r.length,u=o?r[0]:0,v=this.__wrapped__,w=function(k){return wf(k,r)};return o>1||this.__actions__.length||!(v instanceof ue)||!Cr(u)?this.thru(w):(v=v.slice(u,+u+(o?1:0)),v.__actions__.push({func:mc,args:[w],thisArg:n}),new Vn(v,this.__chain__).thru(function(k){return o&&!k.length&&k.push(n),k}))});function yA(){return cm(this)}function xA(){return new Vn(this.value(),this.__chain__)}function SA(){this.__values__===n&&(this.__values__=Am(this.value()));var r=this.__index__>=this.__values__.length,o=r?n:this.__values__[this.__index__++];return{done:r,value:o}}function AA(){return this}function CA(r){for(var o,u=this;u instanceof nc;){var v=rm(u);v.__index__=0,v.__values__=n,o?w.__wrapped__=v:o=v;var w=v;u=u.__wrapped__}return w.__wrapped__=r,o}function PA(){var r=this.__wrapped__;if(r instanceof ue){var o=r;return this.__actions__.length&&(o=new ue(this)),o=o.reverse(),o.__actions__.push({func:mc,args:[Xf],thisArg:n}),new Vn(o,this.__chain__)}return this.thru(Xf)}function kA(){return Pv(this.__wrapped__,this.__actions__)}var EA=uc(function(r,o,u){Ae.call(r,u)?++r[u]:xr(r,u,1)});function TA(r,o,u){var v=Wt(r)?Vp:_x;return u&&ln(r,o,u)&&(o=n),v(r,Rt(o,3))}function IA(r,o){var u=Wt(r)?Zr:uv;return u(r,Rt(o,3))}var OA=Dv(im),NA=Dv(om);function RA(r,o){return je(bc(r,o),1)}function MA(r,o){return je(bc(r,o),lt)}function LA(r,o,u){return u=u===n?1:Yt(u),je(bc(r,o),u)}function dm(r,o){var u=Wt(r)?Dn:$r;return u(r,Rt(o,3))}function fm(r,o){var u=Wt(r)?t1:lv;return u(r,Rt(o,3))}var FA=uc(function(r,o,u){Ae.call(r,u)?r[u].push(o):xr(r,u,[o])});function DA(r,o,u,v){r=vn(r)?r:lo(r),u=u&&!v?Yt(u):0;var w=r.length;return u<0&&(u=Ye(w+u,0)),Sc(r)?u<=w&&r.indexOf(o,u)>-1:!!w&&Qi(r,o,u)>-1}var BA=ne(function(r,o,u){var v=-1,w=typeof o=="function",k=vn(r)?j(r.length):[];return $r(r,function(O){k[++v]=w?Cn(o,O,u):Jo(O,o,u)}),k}),VA=uc(function(r,o,u){xr(r,u,o)});function bc(r,o){var u=Wt(r)?Fe:pv;return u(r,Rt(o,3))}function zA(r,o,u,v){return r==null?[]:(Wt(o)||(o=o==null?[]:[o]),u=v?n:u,Wt(u)||(u=u==null?[]:[u]),_v(r,o,u))}var WA=uc(function(r,o,u){r[u?0:1].push(o)},function(){return[[],[]]});function HA(r,o,u){var v=Wt(r)?af:Up,w=arguments.length<3;return v(r,Rt(o,4),u,w,$r)}function UA(r,o,u){var v=Wt(r)?e1:Up,w=arguments.length<3;return v(r,Rt(o,4),u,w,lv)}function GA(r,o){var u=Wt(r)?Zr:uv;return u(r,yc(Rt(o,3)))}function KA(r){var o=Wt(r)?iv:Dx;return o(r)}function qA(r,o,u){(u?ln(r,o,u):o===n)?o=1:o=Yt(o);var v=Wt(r)?gx:Bx;return v(r,o)}function YA(r){var o=Wt(r)?px:zx;return o(r)}function XA(r){if(r==null)return 0;if(vn(r))return Sc(r)?ji(r):r.length;var o=rn(r);return o==re||o==Ie?r.size:Pf(r).length}function ZA(r,o,u){var v=Wt(r)?lf:Wx;return u&&ln(r,o,u)&&(o=n),v(r,Rt(o,3))}var QA=ne(function(r,o){if(r==null)return[];var u=o.length;return u>1&&ln(r,o[0],o[1])?o=[]:u>2&&ln(o[0],o[1],o[2])&&(o=[o[0]]),_v(r,je(o,1),[])}),_c=I1||function(){return Je.Date.now()};function JA(r,o){if(typeof o!="function")throw new Bn(l);return r=Yt(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,Sr(r,M,n,n,n,n,o)}function gm(r,o){var u;if(typeof o!="function")throw new Bn(l);return r=Yt(r),function(){return--r>0&&(u=o.apply(this,arguments)),r<=1&&(o=n),u}}var Qf=ne(function(r,o,u){var v=S;if(u.length){var w=Jr(u,so(Qf));v|=W}return Sr(r,v,o,u,w)}),pm=ne(function(r,o,u){var v=S|C;if(u.length){var w=Jr(u,so(pm));v|=W}return Sr(o,v,r,u,w)});function vm(r,o,u){o=u?n:o;var v=Sr(r,N,n,n,n,n,n,o);return v.placeholder=vm.placeholder,v}function mm(r,o,u){o=u?n:o;var v=Sr(r,B,n,n,n,n,n,o);return v.placeholder=mm.placeholder,v}function bm(r,o,u){var v,w,k,O,V,G,ft=0,gt=!1,mt=!1,At=!0;if(typeof r!="function")throw new Bn(l);o=Un(o)||0,De(u)&&(gt=!!u.leading,mt="maxWait"in u,k=mt?Ye(Un(u.maxWait)||0,o):k,At="trailing"in u?!!u.trailing:At);function It(Ue){var Zn=v,Er=w;return v=w=n,ft=Ue,O=r.apply(Er,Zn),O}function Lt(Ue){return ft=Ue,V=ns(se,o),gt?It(Ue):O}function Qt(Ue){var Zn=Ue-G,Er=Ue-ft,Dm=o-Zn;return mt?nn(Dm,k-Er):Dm}function Ft(Ue){var Zn=Ue-G,Er=Ue-ft;return G===n||Zn>=o||Zn<0||mt&&Er>=k}function se(){var Ue=_c();if(Ft(Ue))return ce(Ue);V=ns(se,Qt(Ue))}function ce(Ue){return V=n,At&&v?It(Ue):(v=w=n,O)}function Tn(){V!==n&&Ev(V),ft=0,v=G=w=V=n}function un(){return V===n?O:ce(_c())}function In(){var Ue=_c(),Zn=Ft(Ue);if(v=arguments,w=this,G=Ue,Zn){if(V===n)return Lt(G);if(mt)return Ev(V),V=ns(se,o),It(G)}return V===n&&(V=ns(se,o)),O}return In.cancel=Tn,In.flush=un,In}var jA=ne(function(r,o){return av(r,1,o)}),$A=ne(function(r,o,u){return av(r,Un(o)||0,u)});function t2(r){return Sr(r,$)}function wc(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new Bn(l);var u=function(){var v=arguments,w=o?o.apply(this,v):v[0],k=u.cache;if(k.has(w))return k.get(w);var O=r.apply(this,v);return u.cache=k.set(w,O)||k,O};return u.cache=new(wc.Cache||yr),u}wc.Cache=yr;function yc(r){if(typeof r!="function")throw new Bn(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 e2(r){return gm(2,r)}var n2=Hx(function(r,o){o=o.length==1&&Wt(o[0])?Fe(o[0],Pn(Rt())):Fe(je(o,1),Pn(Rt()));var u=o.length;return ne(function(v){for(var w=-1,k=nn(v.length,u);++w<k;)v[w]=o[w].call(this,v[w]);return Cn(r,this,v)})}),Jf=ne(function(r,o){var u=Jr(o,so(Jf));return Sr(r,W,n,o,u)}),_m=ne(function(r,o){var u=Jr(o,so(_m));return Sr(r,z,n,o,u)}),r2=Ar(function(r,o){return Sr(r,q,n,n,n,o)});function i2(r,o){if(typeof r!="function")throw new Bn(l);return o=o===n?o:Yt(o),ne(r,o)}function o2(r,o){if(typeof r!="function")throw new Bn(l);return o=o==null?0:Ye(Yt(o),0),ne(function(u){var v=u[o],w=ni(u,0,o);return v&&Qr(w,v),Cn(r,this,w)})}function s2(r,o,u){var v=!0,w=!0;if(typeof r!="function")throw new Bn(l);return De(u)&&(v="leading"in u?!!u.leading:v,w="trailing"in u?!!u.trailing:w),bm(r,o,{leading:v,maxWait:o,trailing:w})}function a2(r){return hm(r,1)}function l2(r,o){return Jf(Lf(o),r)}function u2(){if(!arguments.length)return[];var r=arguments[0];return Wt(r)?r:[r]}function c2(r){return zn(r,b)}function d2(r,o){return o=typeof o=="function"?o:n,zn(r,b,o)}function f2(r){return zn(r,p|b)}function h2(r,o){return o=typeof o=="function"?o:n,zn(r,p|b,o)}function g2(r,o){return o==null||sv(r,o,Ze(o))}function Xn(r,o){return r===o||r!==r&&o!==o}var p2=hc(Sf),v2=hc(function(r,o){return r>=o}),Oi=fv(function(){return arguments}())?fv:function(r){return ze(r)&&Ae.call(r,"callee")&&!jp.call(r,"callee")},Wt=j.isArray,m2=Rp?Pn(Rp):Cx;function vn(r){return r!=null&&xc(r.length)&&!Pr(r)}function He(r){return ze(r)&&vn(r)}function b2(r){return r===!0||r===!1||ze(r)&&an(r)==Bt}var ri=N1||lh,_2=Mp?Pn(Mp):Px;function w2(r){return ze(r)&&r.nodeType===1&&!rs(r)}function y2(r){if(r==null)return!0;if(vn(r)&&(Wt(r)||typeof r=="string"||typeof r.splice=="function"||ri(r)||ao(r)||Oi(r)))return!r.length;var o=rn(r);if(o==re||o==Ie)return!r.size;if(es(r))return!Pf(r).length;for(var u in r)if(Ae.call(r,u))return!1;return!0}function x2(r,o){return jo(r,o)}function S2(r,o,u){u=typeof u=="function"?u:n;var v=u?u(r,o):n;return v===n?jo(r,o,n,u):!!v}function jf(r){if(!ze(r))return!1;var o=an(r);return o==te||o==Nt||typeof r.message=="string"&&typeof r.name=="string"&&!rs(r)}function A2(r){return typeof r=="number"&&tv(r)}function Pr(r){if(!De(r))return!1;var o=an(r);return o==Ut||o==ge||o==ye||o==We}function wm(r){return typeof r=="number"&&r==Yt(r)}function xc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ut}function De(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function ze(r){return r!=null&&typeof r=="object"}var ym=Lp?Pn(Lp):Ex;function C2(r,o){return r===o||Cf(r,o,Hf(o))}function P2(r,o,u){return u=typeof u=="function"?u:n,Cf(r,o,Hf(o),u)}function k2(r){return xm(r)&&r!=+r}function E2(r){if(dS(r))throw new zt(a);return hv(r)}function T2(r){return r===null}function I2(r){return r==null}function xm(r){return typeof r=="number"||ze(r)&&an(r)==qt}function rs(r){if(!ze(r)||an(r)!=Gt)return!1;var o=Zu(r);if(o===null)return!0;var u=Ae.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&Ku.call(u)==P1}var $f=Fp?Pn(Fp):Tx;function O2(r){return wm(r)&&r>=-9007199254740991&&r<=ut}var Sm=Dp?Pn(Dp):Ix;function Sc(r){return typeof r=="string"||!Wt(r)&&ze(r)&&an(r)==Se}function En(r){return typeof r=="symbol"||ze(r)&&an(r)==ee}var ao=Bp?Pn(Bp):Ox;function N2(r){return r===n}function R2(r){return ze(r)&&rn(r)==ke}function M2(r){return ze(r)&&an(r)==en}var L2=hc(kf),F2=hc(function(r,o){return r<=o});function Am(r){if(!r)return[];if(vn(r))return Sc(r)?qn(r):pn(r);if(Go&&r[Go])return g1(r[Go]());var o=rn(r),u=o==re?gf:o==Ie?Hu:lo;return u(r)}function kr(r){if(!r)return r===0?r:0;if(r=Un(r),r===lt||r===-1/0){var o=r<0?-1:1;return o*pt}return r===r?r:0}function Yt(r){var o=kr(r),u=o%1;return o===o?u?o-u:o:0}function Cm(r){return r?ki(Yt(r),0,tt):0}function Un(r){if(typeof r=="number")return r;if(En(r))return wt;if(De(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=De(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=Gp(r);var u=my.test(r);return u||_y.test(r)?Jy(r.slice(2),u?2:8):vy.test(r)?wt:+r}function Pm(r){return sr(r,mn(r))}function D2(r){return r?ki(Yt(r),-9007199254740991,ut):r===0?r:0}function _e(r){return r==null?"":kn(r)}var B2=io(function(r,o){if(es(o)||vn(o)){sr(o,Ze(o),r);return}for(var u in o)Ae.call(o,u)&&Zo(r,u,o[u])}),km=io(function(r,o){sr(o,mn(o),r)}),Ac=io(function(r,o,u,v){sr(o,mn(o),r,v)}),V2=io(function(r,o,u,v){sr(o,Ze(o),r,v)}),z2=Ar(wf);function W2(r,o){var u=ro(r);return o==null?u:ov(u,o)}var H2=ne(function(r,o){r=Pe(r);var u=-1,v=o.length,w=v>2?o[2]:n;for(w&&ln(o[0],o[1],w)&&(v=1);++u<v;)for(var k=o[u],O=mn(k),V=-1,G=O.length;++V<G;){var ft=O[V],gt=r[ft];(gt===n||Xn(gt,to[ft])&&!Ae.call(r,ft))&&(r[ft]=k[ft])}return r}),U2=ne(function(r){return r.push(n,Gv),Cn(Em,n,r)});function G2(r,o){return zp(r,Rt(o,3),or)}function K2(r,o){return zp(r,Rt(o,3),xf)}function q2(r,o){return r==null?r:yf(r,Rt(o,3),mn)}function Y2(r,o){return r==null?r:cv(r,Rt(o,3),mn)}function X2(r,o){return r&&or(r,Rt(o,3))}function Z2(r,o){return r&&xf(r,Rt(o,3))}function Q2(r){return r==null?[]:oc(r,Ze(r))}function J2(r){return r==null?[]:oc(r,mn(r))}function th(r,o,u){var v=r==null?n:Ei(r,o);return v===n?u:v}function j2(r,o){return r!=null&&Yv(r,o,yx)}function eh(r,o){return r!=null&&Yv(r,o,xx)}var $2=Vv(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=qu.call(o)),r[o]=u},rh(bn)),tC=Vv(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=qu.call(o)),Ae.call(r,o)?r[o].push(u):r[o]=[u]},Rt),eC=ne(Jo);function Ze(r){return vn(r)?rv(r):Pf(r)}function mn(r){return vn(r)?rv(r,!0):Nx(r)}function nC(r,o){var u={};return o=Rt(o,3),or(r,function(v,w,k){xr(u,o(v,w,k),v)}),u}function rC(r,o){var u={};return o=Rt(o,3),or(r,function(v,w,k){xr(u,w,o(v,w,k))}),u}var iC=io(function(r,o,u){sc(r,o,u)}),Em=io(function(r,o,u,v){sc(r,o,u,v)}),oC=Ar(function(r,o){var u={};if(r==null)return u;var v=!1;o=Fe(o,function(k){return k=ei(k,r),v||(v=k.length>1),k}),sr(r,zf(r),u),v&&(u=zn(u,p|m|b,$x));for(var w=o.length;w--;)Nf(u,o[w]);return u});function sC(r,o){return Tm(r,yc(Rt(o)))}var aC=Ar(function(r,o){return r==null?{}:Mx(r,o)});function Tm(r,o){if(r==null)return{};var u=Fe(zf(r),function(v){return[v]});return o=Rt(o),wv(r,u,function(v,w){return o(v,w[0])})}function lC(r,o,u){o=ei(o,r);var v=-1,w=o.length;for(w||(w=1,r=n);++v<w;){var k=r==null?n:r[ar(o[v])];k===n&&(v=w,k=u),r=Pr(k)?k.call(r):k}return r}function uC(r,o,u){return r==null?r:$o(r,o,u)}function cC(r,o,u,v){return v=typeof v=="function"?v:n,r==null?r:$o(r,o,u,v)}var Im=Hv(Ze),Om=Hv(mn);function dC(r,o,u){var v=Wt(r),w=v||ri(r)||ao(r);if(o=Rt(o,4),u==null){var k=r&&r.constructor;w?u=v?new k:[]:De(r)?u=Pr(k)?ro(Zu(r)):{}:u={}}return(w?Dn:or)(r,function(O,V,G){return o(u,O,V,G)}),u}function fC(r,o){return r==null?!0:Nf(r,o)}function hC(r,o,u){return r==null?r:Cv(r,o,Lf(u))}function gC(r,o,u,v){return v=typeof v=="function"?v:n,r==null?r:Cv(r,o,Lf(u),v)}function lo(r){return r==null?[]:hf(r,Ze(r))}function pC(r){return r==null?[]:hf(r,mn(r))}function vC(r,o,u){return u===n&&(u=o,o=n),u!==n&&(u=Un(u),u=u===u?u:0),o!==n&&(o=Un(o),o=o===o?o:0),ki(Un(r),o,u)}function mC(r,o,u){return o=kr(o),u===n?(u=o,o=0):u=kr(u),r=Un(r),Sx(r,o,u)}function bC(r,o,u){if(u&&typeof u!="boolean"&&ln(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=kr(r),o===n?(o=r,r=0):o=kr(o)),r>o){var v=r;r=o,o=v}if(u||r%1||o%1){var w=ev();return nn(r+w*(o-r+Qy("1e-"+((w+"").length-1))),o)}return Tf(r,o)}var _C=oo(function(r,o,u){return o=o.toLowerCase(),r+(u?Nm(o):o)});function Nm(r){return nh(_e(r).toLowerCase())}function Rm(r){return r=_e(r),r&&r.replace(yy,u1).replace(zy,"")}function wC(r,o,u){r=_e(r),o=kn(o);var v=r.length;u=u===n?v:ki(Yt(u),0,v);var w=u;return u-=o.length,u>=0&&r.slice(u,w)==o}function yC(r){return r=_e(r),r&&ey.test(r)?r.replace(Xi,c1):r}function xC(r){return r=_e(r),r&&ay.test(r)?r.replace(Qd,"\\$&"):r}var SC=oo(function(r,o,u){return r+(u?"-":"")+o.toLowerCase()}),AC=oo(function(r,o,u){return r+(u?" ":"")+o.toLowerCase()}),CC=Fv("toLowerCase");function PC(r,o,u){r=_e(r),o=Yt(o);var v=o?ji(r):0;if(!o||v>=o)return r;var w=(o-v)/2;return fc($u(w),u)+r+fc(ju(w),u)}function kC(r,o,u){r=_e(r),o=Yt(o);var v=o?ji(r):0;return o&&v<o?r+fc(o-v,u):r}function EC(r,o,u){r=_e(r),o=Yt(o);var v=o?ji(r):0;return o&&v<o?fc(o-v,u)+r:r}function TC(r,o,u){return u||o==null?o=0:o&&(o=+o),F1(_e(r).replace(Jd,""),o||0)}function IC(r,o,u){return(u?ln(r,o,u):o===n)?o=1:o=Yt(o),If(_e(r),o)}function OC(){var r=arguments,o=_e(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var NC=oo(function(r,o,u){return r+(u?"_":"")+o.toLowerCase()});function RC(r,o,u){return u&&typeof u!="number"&&ln(r,o,u)&&(o=u=n),u=u===n?tt:u>>>0,u?(r=_e(r),r&&(typeof o=="string"||o!=null&&!$f(o))&&(o=kn(o),!o&&Ji(r))?ni(qn(r),0,u):r.split(o,u)):[]}var MC=oo(function(r,o,u){return r+(u?" ":"")+nh(o)});function LC(r,o,u){return r=_e(r),u=u==null?0:ki(Yt(u),0,r.length),o=kn(o),r.slice(u,u+o.length)==o}function FC(r,o,u){var v=P.templateSettings;u&&ln(r,o,u)&&(o=n),r=_e(r),o=Ac({},o,v,Uv);var w=Ac({},o.imports,v.imports,Uv),k=Ze(w),O=hf(w,k),V,G,ft=0,gt=o.interpolate||Du,mt="__p += '",At=pf((o.escape||Du).source+"|"+gt.source+"|"+(gt===dp?py:Du).source+"|"+(o.evaluate||Du).source+"|$","g"),It="//# sourceURL="+(Ae.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ky+"]")+`
401
+ `;r.replace(At,function(Ft,se,ce,Tn,un,In){return ce||(ce=Tn),mt+=r.slice(ft,In).replace(xy,d1),se&&(V=!0,mt+=`' +
402
+ __e(`+se+`) +
403
+ '`),un&&(G=!0,mt+=`';
404
+ `+un+`;
405
+ __p += '`),ce&&(mt+=`' +
406
+ ((__t = (`+ce+`)) == null ? '' : __t) +
407
+ '`),ft=In+Ft.length,Ft}),mt+=`';
408
+ `;var Lt=Ae.call(o,"variable")&&o.variable;if(!Lt)mt=`with (obj) {
409
+ `+mt+`
410
+ }
411
+ `;else if(hy.test(Lt))throw new zt(c);mt=(G?mt.replace(ir,""):mt).replace(Ln,"$1").replace(xi,"$1;"),mt="function("+(Lt||"obj")+`) {
412
+ `+(Lt?"":`obj || (obj = {});
413
+ `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(G?`, __j = Array.prototype.join;
414
+ function print() { __p += __j.call(arguments, '') }
415
+ `:`;
416
+ `)+mt+`return __p
417
+ }`;var Qt=Lm(function(){return ve(k,It+"return "+mt).apply(n,O)});if(Qt.source=mt,jf(Qt))throw Qt;return Qt}function DC(r){return _e(r).toLowerCase()}function BC(r){return _e(r).toUpperCase()}function VC(r,o,u){if(r=_e(r),r&&(u||o===n))return Gp(r);if(!r||!(o=kn(o)))return r;var v=qn(r),w=qn(o),k=Kp(v,w),O=qp(v,w)+1;return ni(v,k,O).join("")}function zC(r,o,u){if(r=_e(r),r&&(u||o===n))return r.slice(0,Xp(r)+1);if(!r||!(o=kn(o)))return r;var v=qn(r),w=qp(v,qn(o))+1;return ni(v,0,w).join("")}function WC(r,o,u){if(r=_e(r),r&&(u||o===n))return r.replace(Jd,"");if(!r||!(o=kn(o)))return r;var v=qn(r),w=Kp(v,qn(o));return ni(v,w).join("")}function HC(r,o){var u=rt,v=ht;if(De(o)){var w="separator"in o?o.separator:w;u="length"in o?Yt(o.length):u,v="omission"in o?kn(o.omission):v}r=_e(r);var k=r.length;if(Ji(r)){var O=qn(r);k=O.length}if(u>=k)return r;var V=u-ji(v);if(V<1)return v;var G=O?ni(O,0,V).join(""):r.slice(0,V);if(w===n)return G+v;if(O&&(V+=G.length-V),$f(w)){if(r.slice(V).search(w)){var ft,gt=G;for(w.global||(w=pf(w.source,_e(fp.exec(w))+"g")),w.lastIndex=0;ft=w.exec(gt);)var mt=ft.index;G=G.slice(0,mt===n?V:mt)}}else if(r.indexOf(kn(w),V)!=V){var At=G.lastIndexOf(w);At>-1&&(G=G.slice(0,At))}return G+v}function UC(r){return r=_e(r),r&&ty.test(r)?r.replace(Xr,b1):r}var GC=oo(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),nh=Fv("toUpperCase");function Mm(r,o,u){return r=_e(r),o=u?n:o,o===n?h1(r)?y1(r):i1(r):r.match(o)||[]}var Lm=ne(function(r,o){try{return Cn(r,n,o)}catch(u){return jf(u)?u:new zt(u)}}),KC=Ar(function(r,o){return Dn(o,function(u){u=ar(u),xr(r,u,Qf(r[u],r))}),r});function qC(r){var o=r==null?0:r.length,u=Rt();return r=o?Fe(r,function(v){if(typeof v[1]!="function")throw new Bn(l);return[u(v[0]),v[1]]}):[],ne(function(v){for(var w=-1;++w<o;){var k=r[w];if(Cn(k[0],this,v))return Cn(k[1],this,v)}})}function YC(r){return bx(zn(r,p))}function rh(r){return function(){return r}}function XC(r,o){return r==null||r!==r?o:r}var ZC=Bv(),QC=Bv(!0);function bn(r){return r}function ih(r){return gv(typeof r=="function"?r:zn(r,p))}function JC(r){return vv(zn(r,p))}function jC(r,o){return mv(r,zn(o,p))}var $C=ne(function(r,o){return function(u){return Jo(u,r,o)}}),tP=ne(function(r,o){return function(u){return Jo(r,u,o)}});function oh(r,o,u){var v=Ze(o),w=oc(o,v);u==null&&!(De(o)&&(w.length||!v.length))&&(u=o,o=r,r=this,w=oc(o,Ze(o)));var k=!(De(u)&&"chain"in u)||!!u.chain,O=Pr(r);return Dn(w,function(V){var G=o[V];r[V]=G,O&&(r.prototype[V]=function(){var ft=this.__chain__;if(k||ft){var gt=r(this.__wrapped__),mt=gt.__actions__=pn(this.__actions__);return mt.push({func:G,args:arguments,thisArg:r}),gt.__chain__=ft,gt}return G.apply(r,Qr([this.value()],arguments))})}),r}function eP(){return Je._===this&&(Je._=k1),this}function sh(){}function nP(r){return r=Yt(r),ne(function(o){return bv(o,r)})}var rP=Df(Fe),iP=Df(Vp),oP=Df(lf);function Fm(r){return Gf(r)?uf(ar(r)):Lx(r)}function sP(r){return function(o){return r==null?n:Ei(r,o)}}var aP=zv(),lP=zv(!0);function ah(){return[]}function lh(){return!1}function uP(){return{}}function cP(){return""}function dP(){return!0}function fP(r,o){if(r=Yt(r),r<1||r>ut)return[];var u=tt,v=nn(r,tt);o=Rt(o),r-=tt;for(var w=ff(v,o);++u<r;)o(u);return w}function hP(r){return Wt(r)?Fe(r,ar):En(r)?[r]:pn(nm(_e(r)))}function gP(r){var o=++C1;return _e(r)+o}var pP=dc(function(r,o){return r+o},0),vP=Bf("ceil"),mP=dc(function(r,o){return r/o},1),bP=Bf("floor");function _P(r){return r&&r.length?ic(r,bn,Sf):n}function wP(r,o){return r&&r.length?ic(r,Rt(o,2),Sf):n}function yP(r){return Hp(r,bn)}function xP(r,o){return Hp(r,Rt(o,2))}function SP(r){return r&&r.length?ic(r,bn,kf):n}function AP(r,o){return r&&r.length?ic(r,Rt(o,2),kf):n}var CP=dc(function(r,o){return r*o},1),PP=Bf("round"),kP=dc(function(r,o){return r-o},0);function EP(r){return r&&r.length?df(r,bn):0}function TP(r,o){return r&&r.length?df(r,Rt(o,2)):0}return P.after=JA,P.ary=hm,P.assign=B2,P.assignIn=km,P.assignInWith=Ac,P.assignWith=V2,P.at=z2,P.before=gm,P.bind=Qf,P.bindAll=KC,P.bindKey=pm,P.castArray=u2,P.chain=cm,P.chunk=bS,P.compact=_S,P.concat=wS,P.cond=qC,P.conforms=YC,P.constant=rh,P.countBy=EA,P.create=W2,P.curry=vm,P.curryRight=mm,P.debounce=bm,P.defaults=H2,P.defaultsDeep=U2,P.defer=jA,P.delay=$A,P.difference=yS,P.differenceBy=xS,P.differenceWith=SS,P.drop=AS,P.dropRight=CS,P.dropRightWhile=PS,P.dropWhile=kS,P.fill=ES,P.filter=IA,P.flatMap=RA,P.flatMapDeep=MA,P.flatMapDepth=LA,P.flatten=sm,P.flattenDeep=TS,P.flattenDepth=IS,P.flip=t2,P.flow=ZC,P.flowRight=QC,P.fromPairs=OS,P.functions=Q2,P.functionsIn=J2,P.groupBy=FA,P.initial=RS,P.intersection=MS,P.intersectionBy=LS,P.intersectionWith=FS,P.invert=$2,P.invertBy=tC,P.invokeMap=BA,P.iteratee=ih,P.keyBy=VA,P.keys=Ze,P.keysIn=mn,P.map=bc,P.mapKeys=nC,P.mapValues=rC,P.matches=JC,P.matchesProperty=jC,P.memoize=wc,P.merge=iC,P.mergeWith=Em,P.method=$C,P.methodOf=tP,P.mixin=oh,P.negate=yc,P.nthArg=nP,P.omit=oC,P.omitBy=sC,P.once=e2,P.orderBy=zA,P.over=rP,P.overArgs=n2,P.overEvery=iP,P.overSome=oP,P.partial=Jf,P.partialRight=_m,P.partition=WA,P.pick=aC,P.pickBy=Tm,P.property=Fm,P.propertyOf=sP,P.pull=zS,P.pullAll=lm,P.pullAllBy=WS,P.pullAllWith=HS,P.pullAt=US,P.range=aP,P.rangeRight=lP,P.rearg=r2,P.reject=GA,P.remove=GS,P.rest=i2,P.reverse=Xf,P.sampleSize=qA,P.set=uC,P.setWith=cC,P.shuffle=YA,P.slice=KS,P.sortBy=QA,P.sortedUniq=jS,P.sortedUniqBy=$S,P.split=RC,P.spread=o2,P.tail=tA,P.take=eA,P.takeRight=nA,P.takeRightWhile=rA,P.takeWhile=iA,P.tap=_A,P.throttle=s2,P.thru=mc,P.toArray=Am,P.toPairs=Im,P.toPairsIn=Om,P.toPath=hP,P.toPlainObject=Pm,P.transform=dC,P.unary=a2,P.union=oA,P.unionBy=sA,P.unionWith=aA,P.uniq=lA,P.uniqBy=uA,P.uniqWith=cA,P.unset=fC,P.unzip=Zf,P.unzipWith=um,P.update=hC,P.updateWith=gC,P.values=lo,P.valuesIn=pC,P.without=dA,P.words=Mm,P.wrap=l2,P.xor=fA,P.xorBy=hA,P.xorWith=gA,P.zip=pA,P.zipObject=vA,P.zipObjectDeep=mA,P.zipWith=bA,P.entries=Im,P.entriesIn=Om,P.extend=km,P.extendWith=Ac,oh(P,P),P.add=pP,P.attempt=Lm,P.camelCase=_C,P.capitalize=Nm,P.ceil=vP,P.clamp=vC,P.clone=c2,P.cloneDeep=f2,P.cloneDeepWith=h2,P.cloneWith=d2,P.conformsTo=g2,P.deburr=Rm,P.defaultTo=XC,P.divide=mP,P.endsWith=wC,P.eq=Xn,P.escape=yC,P.escapeRegExp=xC,P.every=TA,P.find=OA,P.findIndex=im,P.findKey=G2,P.findLast=NA,P.findLastIndex=om,P.findLastKey=K2,P.floor=bP,P.forEach=dm,P.forEachRight=fm,P.forIn=q2,P.forInRight=Y2,P.forOwn=X2,P.forOwnRight=Z2,P.get=th,P.gt=p2,P.gte=v2,P.has=j2,P.hasIn=eh,P.head=am,P.identity=bn,P.includes=DA,P.indexOf=NS,P.inRange=mC,P.invoke=eC,P.isArguments=Oi,P.isArray=Wt,P.isArrayBuffer=m2,P.isArrayLike=vn,P.isArrayLikeObject=He,P.isBoolean=b2,P.isBuffer=ri,P.isDate=_2,P.isElement=w2,P.isEmpty=y2,P.isEqual=x2,P.isEqualWith=S2,P.isError=jf,P.isFinite=A2,P.isFunction=Pr,P.isInteger=wm,P.isLength=xc,P.isMap=ym,P.isMatch=C2,P.isMatchWith=P2,P.isNaN=k2,P.isNative=E2,P.isNil=I2,P.isNull=T2,P.isNumber=xm,P.isObject=De,P.isObjectLike=ze,P.isPlainObject=rs,P.isRegExp=$f,P.isSafeInteger=O2,P.isSet=Sm,P.isString=Sc,P.isSymbol=En,P.isTypedArray=ao,P.isUndefined=N2,P.isWeakMap=R2,P.isWeakSet=M2,P.join=DS,P.kebabCase=SC,P.last=Hn,P.lastIndexOf=BS,P.lowerCase=AC,P.lowerFirst=CC,P.lt=L2,P.lte=F2,P.max=_P,P.maxBy=wP,P.mean=yP,P.meanBy=xP,P.min=SP,P.minBy=AP,P.stubArray=ah,P.stubFalse=lh,P.stubObject=uP,P.stubString=cP,P.stubTrue=dP,P.multiply=CP,P.nth=VS,P.noConflict=eP,P.noop=sh,P.now=_c,P.pad=PC,P.padEnd=kC,P.padStart=EC,P.parseInt=TC,P.random=bC,P.reduce=HA,P.reduceRight=UA,P.repeat=IC,P.replace=OC,P.result=lC,P.round=PP,P.runInContext=U,P.sample=KA,P.size=XA,P.snakeCase=NC,P.some=ZA,P.sortedIndex=qS,P.sortedIndexBy=YS,P.sortedIndexOf=XS,P.sortedLastIndex=ZS,P.sortedLastIndexBy=QS,P.sortedLastIndexOf=JS,P.startCase=MC,P.startsWith=LC,P.subtract=kP,P.sum=EP,P.sumBy=TP,P.template=FC,P.times=fP,P.toFinite=kr,P.toInteger=Yt,P.toLength=Cm,P.toLower=DC,P.toNumber=Un,P.toSafeInteger=D2,P.toString=_e,P.toUpper=BC,P.trim=VC,P.trimEnd=zC,P.trimStart=WC,P.truncate=HC,P.unescape=UC,P.uniqueId=gP,P.upperCase=GC,P.upperFirst=nh,P.each=dm,P.eachRight=fm,P.first=am,oh(P,function(){var r={};return or(P,function(o,u){Ae.call(P.prototype,u)||(r[u]=o)}),r}(),{chain:!1}),P.VERSION=i,Dn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){P[r].placeholder=P}),Dn(["drop","take"],function(r,o){ue.prototype[r]=function(u){u=u===n?1:Ye(Yt(u),0);var v=this.__filtered__&&!o?new ue(this):this.clone();return v.__filtered__?v.__takeCount__=nn(u,v.__takeCount__):v.__views__.push({size:nn(u,tt),type:r+(v.__dir__<0?"Right":"")}),v},ue.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Dn(["filter","map","takeWhile"],function(r,o){var u=o+1,v=u==Y||u==ot;ue.prototype[r]=function(w){var k=this.clone();return k.__iteratees__.push({iteratee:Rt(w,3),type:u}),k.__filtered__=k.__filtered__||v,k}}),Dn(["head","last"],function(r,o){var u="take"+(o?"Right":"");ue.prototype[r]=function(){return this[u](1).value()[0]}}),Dn(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");ue.prototype[r]=function(){return this.__filtered__?new ue(this):this[u](1)}}),ue.prototype.compact=function(){return this.filter(bn)},ue.prototype.find=function(r){return this.filter(r).head()},ue.prototype.findLast=function(r){return this.reverse().find(r)},ue.prototype.invokeMap=ne(function(r,o){return typeof r=="function"?new ue(this):this.map(function(u){return Jo(u,r,o)})}),ue.prototype.reject=function(r){return this.filter(yc(Rt(r)))},ue.prototype.slice=function(r,o){r=Yt(r);var u=this;return u.__filtered__&&(r>0||o<0)?new ue(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=Yt(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},ue.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ue.prototype.toArray=function(){return this.take(tt)},or(ue.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),v=/^(?:head|last)$/.test(o),w=P[v?"take"+(o=="last"?"Right":""):o],k=v||/^find/.test(o);w&&(P.prototype[o]=function(){var O=this.__wrapped__,V=v?[1]:arguments,G=O instanceof ue,ft=V[0],gt=G||Wt(O),mt=function(se){var ce=w.apply(P,Qr([se],V));return v&&At?ce[0]:ce};gt&&u&&typeof ft=="function"&&ft.length!=1&&(G=gt=!1);var At=this.__chain__,It=!!this.__actions__.length,Lt=k&&!At,Qt=G&&!It;if(!k&&gt){O=Qt?O:new ue(this);var Ft=r.apply(O,V);return Ft.__actions__.push({func:mc,args:[mt],thisArg:n}),new Vn(Ft,At)}return Lt&&Qt?r.apply(this,V):(Ft=this.thru(mt),Lt?v?Ft.value()[0]:Ft.value():Ft)})}),Dn(["pop","push","shift","sort","splice","unshift"],function(r){var o=Uu[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",v=/^(?:pop|shift)$/.test(r);P.prototype[r]=function(){var w=arguments;if(v&&!this.__chain__){var k=this.value();return o.apply(Wt(k)?k:[],w)}return this[u](function(O){return o.apply(Wt(O)?O:[],w)})}}),or(ue.prototype,function(r,o){var u=P[o];if(u){var v=u.name+"";Ae.call(no,v)||(no[v]=[]),no[v].push({name:o,func:u})}}),no[cc(n,C).name]=[{name:"wrapper",func:n}],ue.prototype.clone=U1,ue.prototype.reverse=G1,ue.prototype.value=K1,P.prototype.at=wA,P.prototype.chain=yA,P.prototype.commit=xA,P.prototype.next=SA,P.prototype.plant=CA,P.prototype.reverse=PA,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=kA,P.prototype.first=P.prototype.head,Go&&(P.prototype[Go]=AA),P},$i=x1();Si?((Si.exports=$i)._=$i,rf._=$i):Je._=$i}).call(dr)})(ad,ad.exports);var IF=ad.exports;const _8=M_(IF);function OF(e,t){const n=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(n)&&R(t,n,!0)}function Xb(e){e.stopPropagation(),e.preventDefault()}function NF(e,t,n){e.stopPropagation(),e.preventDefault(),R(t,!g(t)),g(t)&&setTimeout(n,0)}function Zb(e,t){e.key==="Escape"&&t()}var RF=(e,t,n)=>t(g(n)),MF=J('<button type="button"></button>'),LF=J('<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>'),FF=J('<div class="relative inline-block"><button type="button" class="m-0 border-0 bg-transparent p-0" tabindex="0"><!></button> <!></div>');function w8(e,t){ct(t,!0);let n=E(t,"initialColor",3,"#ff0000"),i=E(t,"initialAlpha",3,1),s=E(t,"position",3,"right"),a=bt(!1),l,c=bt(Sn(n())),d=bt(Sn(i()));const f=["#ff0000","#ff8000","#ffff00","#80ff00","#00ff00","#00ffff","#0080ff","#0000ff","#8000ff","#ff00ff","#ff0080","#ffffff","#cccccc","#888888","#444444","#000000"];let h,p,m=bt(0),b=bt(100),y=bt(50);we(()=>{if(g(c).startsWith("#")){const[Y,nt,ot]=x(g(c));R(m,Y,!0),R(b,nt,!0),R(y,ot,!0)}}),we(()=>{R(c,S(g(m),g(b),g(y)),!0)});function x(Y){Y=Y.replace(/^#/,"");const nt=parseInt(Y.slice(0,2),16)/255,ot=parseInt(Y.slice(2,4),16)/255,lt=parseInt(Y.slice(4,6),16)/255,ut=Math.max(nt,ot,lt),pt=Math.min(nt,ot,lt),wt=(ut+pt)/2;let tt=0,et=0;if(ut!==pt){const yt=ut-pt;switch(et=wt>.5?yt/(2-ut-pt):yt/(ut+pt),ut){case nt:tt=((ot-lt)/yt+(ot<lt?6:0))/6;break;case ot:tt=((lt-nt)/yt+2)/6;break;case lt:tt=((nt-ot)/yt+4)/6;break}}return[Math.round(tt*360),Math.round(et*100),Math.round(wt*100)]}function S(Y,nt,ot){Y/=360,nt/=100,ot/=100;let lt,ut,pt;if(nt===0)lt=ut=pt=ot;else{const et=ot<.5?ot*(1+nt):ot+nt-ot*nt,yt=2*ot-et;lt=wt(yt,et,Y+1/3),ut=wt(yt,et,Y),pt=wt(yt,et,Y-1/3)}function wt(et,yt,Et){return Et<0&&(Et+=1),Et>1&&(Et-=1),Et<1/6?et+(yt-et)*6*Et:Et<1/2?yt:Et<2/3?et+(yt-et)*(2/3-Et)*6:et}const tt=et=>{const yt=Math.round(et*255).toString(16);return yt.length===1?"0"+yt:yt};return`#${tt(lt)}${tt(ut)}${tt(pt)}`}function C(Y){if(!h)return;const nt=h.getBoundingClientRect(),ot=Math.max(0,Math.min(1,(Y.clientX-nt.left)/nt.width)),lt=Math.max(0,Math.min(1,(Y.clientY-nt.top)/nt.height));if(R(b,Math.round(ot*100),!0),R(y,Math.round((1-lt)*100),!0),Y.buttons!==1&&Y.type!=="mousedown")return;const ut=pt=>C(pt);document.addEventListener("mousemove",ut),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ut)},{once:!0})}function T(Y){if(!p)return;const nt=p.getBoundingClientRect(),ot=Math.max(0,Math.min(1,(Y.clientX-nt.left)/nt.width));if(R(m,Math.round(ot*360),!0),Y.buttons!==1&&Y.type!=="mousedown")return;const lt=ut=>T(ut);document.addEventListener("mousemove",lt),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",lt)},{once:!0})}function N(Y){R(c,Y,!0)}function B(Y){R(d,Y[0],!0)}function W(){t.onChange&&t.onChange(g(c),g(d)),R(a,!1)}function z(){R(a,!1)}function M(){function Y(ot){if(g(a)&&l){const lt=document.getElementById("color-picker-panel");lt&&!lt.contains(ot.target)&&!l.contains(ot.target)&&R(a,!1)}}document.addEventListener("mousedown",Y);const nt=()=>q();return window.addEventListener("resize",nt),{destroy:()=>{document.removeEventListener("mousedown",Y),window.removeEventListener("resize",nt)}}}function q(){l&&requestAnimationFrame(()=>{const Y=document.getElementById("color-picker-panel");if(!Y)return;const nt=l.getBoundingClientRect(),ot=window.innerWidth,lt=window.innerHeight,ut=Y.offsetWidth,pt=Y.offsetHeight;let wt,tt;switch(s()){case"top":wt=nt.left+nt.width/2-ut/2,tt=nt.top-pt-8;break;case"bottom":wt=nt.left+nt.width/2-ut/2,tt=nt.bottom+8;break;case"left":wt=nt.left-ut-8,tt=nt.top;break;case"right":default:wt=nt.right+8,tt=nt.top;break}wt<10&&(wt=10),tt<10&&(tt=10),wt+ut>ot-10&&(wt=ot-ut-10),tt+pt>lt-10&&(tt=lt-pt-10),Y.style.position="fixed",Y.style.left=`${wt}px`,Y.style.top=`${tt}px`})}A_(()=>{if(g(a))return M().destroy});var $=FF(),rt=Q($);rt.__click=[NF,a,q],rt.__keydown=[Zb,z];var ht=Q(rt);st(ht,()=>t.children),X(rt),jn(rt,Y=>l=Y,()=>l);var H=vt(rt,2);{var it=Y=>{var nt=K(),ot=D(nt);Tt(ot,()=>Nu,(lt,ut)=>{ut(lt,{children:(pt,wt)=>{var tt=LF();tt.__keydown=[Zb,z],tt.__click=[Xb],tt.__mousedown=[Xb];var et=Q(tt),yt=vt(Q(et),2);fn(yt,{variant:"ghost",size:"icon",class:"h-6 w-6",onclick:z,children:(ee,pe)=>{Pg(ee,{class:"h-4 w-4"})},$$slots:{default:!0}}),X(et);var Et=vt(et,2),Dt=Q(Et),Kt=Q(Dt);Kt.__mousedown=C;var ye=Q(Kt);X(Kt),jn(Kt,ee=>h=ee,()=>h);var Bt=vt(Kt,2);Bt.__mousedown=T;var Pt=Q(Bt);X(Bt),jn(Bt,ee=>p=ee,()=>p);var Nt=vt(Bt,2),te=Q(Nt),Ut=vt(te,2);gk(Ut),Ut.__input=[OF,c],X(Nt);var ge=vt(Nt,2),re=Q(ge),qt=vt(Q(re),2),be=Q(qt);X(qt),X(re);var Gt=vt(re,2);{let ee=I(()=>[g(d)]);IL(Gt,{min:0,max:1,step:.01,get value(){return g(ee)},onValueChange:B})}X(ge);var xe=vt(ge,2),We=vt(Q(xe),2);Gn(We,21,()=>f,ku,(ee,pe)=>{var ke=MF();ke.__click=[RF,N,pe],Ht(en=>{$n(ke,1,en),Rn(ke,`background-color: ${g(pe)}`),Ve(ke,"title",g(pe))},[()=>zi(le("h-4 w-4 rounded-sm border",g(c)===g(pe)?"ring-primary ring-1":""))]),A(ee,ke)}),X(We),X(xe),X(Dt);var de=vt(Dt,2),Ie=Q(de);fn(Ie,{size:"sm",variant:"outline",class:"h-7 px-2 py-0 text-xs",onclick:z,children:(ee,pe)=>{fe();var ke=Ce("Cancel");A(ee,ke)},$$slots:{default:!0}});var Se=vt(Ie,2);fn(Se,{size:"sm",class:"h-7 px-2 py-0 text-xs",onclick:W,children:(ee,pe)=>{fe();var ke=Ce("Apply");A(ee,ke)},$$slots:{default:!0}}),X(de),X(Et),X(tt),Ht((ee,pe)=>{$n(tt,1,ee),Rn(Kt,`background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${g(m)}, 100%, 50%))`),Rn(ye,`left: ${g(b)}%; top: ${100-g(y)}%; background-color: ${g(c)}`),Rn(Pt,`left: ${g(m)/360*100}%`),Rn(te,`background-color: ${g(c)}`),pk(Ut,g(c)),he(be,`${pe??""}%`)},[()=>zi(le("bg-popover text-popover-foreground z-50 w-56 rounded-md border shadow-md",t.class)),()=>Math.round(g(d)*100)]),T_(3,tt,()=>LL,()=>({duration:150,y:0,x:0})),A(pt,tt)},$$slots:{default:!0}})}),A(Y,nt)};_t(H,Y=>{g(a)&&Y(it)})}X($),A(e,$),dt()}Ki(["click","keydown","mousedown","input"]);var DF=J("<div></div>");function BF(e,t){ct(t,!0);const n=E(t,"rootMargin",3,"200px"),i=E(t,"threshold",3,0),s=E(t,"disabled",3,!1);let a=bt(null);we(()=>{if(!g(a)||s())return;const c=new IntersectionObserver(d=>{d[0].isIntersecting&&t.onIntersect()},{rootMargin:n(),threshold:i()});return c.observe(g(a)),()=>c.disconnect()});var l=DF();jn(l,c=>R(a,c),()=>g(a)),A(e,l),dt()}var cg="http://www.w3.org/1999/xhtml";const Qb={svg:"http://www.w3.org/2000/svg",xhtml:cg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yd(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Qb.hasOwnProperty(t)?{space:Qb[t],local:e}:e}function VF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===cg&&t.documentElement.namespaceURI===cg?t.createElement(e):t.createElementNS(n,e)}}function zF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tw(e){var t=Yd(e);return(t.local?zF:VF)(t)}function WF(){}function ip(e){return e==null?WF:function(){return this.querySelector(e)}}function HF(e){typeof e!="function"&&(e=ip(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 nr(i,this._parents)}function UF(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function GF(){return[]}function Iw(e){return e==null?GF:function(){return this.querySelectorAll(e)}}function KF(e){return function(){return UF(e.apply(this,arguments))}}function qF(e){typeof e=="function"?e=KF(e):e=Iw(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 nr(i,s)}function Ow(e){return function(){return this.matches(e)}}function Nw(e){return function(t){return t.matches(e)}}var YF=Array.prototype.find;function XF(e){return function(){return YF.call(this.children,e)}}function ZF(){return this.firstElementChild}function QF(e){return this.select(e==null?ZF:XF(typeof e=="function"?e:Nw(e)))}var JF=Array.prototype.filter;function jF(){return Array.from(this.children)}function $F(e){return function(){return JF.call(this.children,e)}}function tD(e){return this.selectAll(e==null?jF:$F(typeof e=="function"?e:Nw(e)))}function eD(e){typeof e!="function"&&(e=Ow(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 nr(i,this._parents)}function Rw(e){return new Array(e.length)}function nD(){return new nr(this._enter||this._groups.map(Rw),this._parents)}function ld(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ld.prototype={constructor:ld,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 rD(e){return function(){return e}}function iD(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 ld(e,a[l]);for(;l<d;++l)(c=t[l])&&(s[l]=c)}function oD(e,t,n,i,s,a,l){var c,d,f=new Map,h=t.length,p=a.length,m=new Array(h),b;for(c=0;c<h;++c)(d=t[c])&&(m[c]=b=l.call(d,d.__data__,c,t)+"",f.has(b)?s[c]=d:f.set(b,d));for(c=0;c<p;++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 ld(e,a[c]);for(c=0;c<h;++c)(d=t[c])&&f.get(m[c])===d&&(s[c]=d)}function sD(e){return e.__data__}function aD(e,t){if(!arguments.length)return Array.from(this,sD);var n=t?oD:iD,i=this._parents,s=this._groups;typeof e!="function"&&(e=rD(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],p=s[f],m=p.length,b=lD(e.call(h,h&&h.__data__,f,i)),y=b.length,x=c[f]=new Array(y),S=l[f]=new Array(y),C=d[f]=new Array(m);n(h,p,x,S,C,b,t);for(var T=0,N=0,B,W;T<y;++T)if(B=x[T]){for(T>=N&&(N=T+1);!(W=S[N])&&++N<y;);B._next=W||null}}return l=new nr(l,i),l._enter=c,l._exit=d,l}function lD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function uD(){return new nr(this._exit||this._groups.map(Rw),this._parents)}function cD(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 dD(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],p=f.length,m=c[d]=new Array(p),b,y=0;y<p;++y)(b=f[y]||h[y])&&(m[y]=b);for(;d<s;++d)c[d]=n[d];return new nr(c,this._parents)}function fD(){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 hD(e){e||(e=gD);function t(p,m){return p&&m?e(p.__data__,m.__data__):!p-!m}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 nr(s,this._parents).order()}function gD(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pD(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vD(){return Array.from(this)}function mD(){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 bD(){let e=0;for(const t of this)++e;return e}function _D(){return!this.node()}function wD(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 yD(e){return function(){this.removeAttribute(e)}}function xD(e){return function(){this.removeAttributeNS(e.space,e.local)}}function SD(e,t){return function(){this.setAttribute(e,t)}}function AD(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function CD(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function PD(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 kD(e,t){var n=Yd(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?xD:yD:typeof t=="function"?n.local?PD:CD:n.local?AD:SD)(n,t))}function Mw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ED(e){return function(){this.style.removeProperty(e)}}function TD(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ID(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function OD(e,t,n){return arguments.length>1?this.each((t==null?ED:typeof t=="function"?ID:TD)(e,t,n??"")):Lo(this.node(),e)}function Lo(e,t){return e.style.getPropertyValue(t)||Mw(e).getComputedStyle(e,null).getPropertyValue(t)}function ND(e){return function(){delete this[e]}}function RD(e,t){return function(){this[e]=t}}function MD(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function LD(e,t){return arguments.length>1?this.each((t==null?ND:typeof t=="function"?MD:RD)(e,t)):this.node()[e]}function Lw(e){return e.trim().split(/^|\s+/)}function op(e){return e.classList||new Fw(e)}function Fw(e){this._node=e,this._names=Lw(e.getAttribute("class")||"")}Fw.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 Dw(e,t){for(var n=op(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function Bw(e,t){for(var n=op(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function FD(e){return function(){Dw(this,e)}}function DD(e){return function(){Bw(this,e)}}function BD(e,t){return function(){(t.apply(this,arguments)?Dw:Bw)(this,e)}}function VD(e,t){var n=Lw(e+"");if(arguments.length<2){for(var i=op(this.node()),s=-1,a=n.length;++s<a;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?BD:t?FD:DD)(n,t))}function zD(){this.textContent=""}function WD(e){return function(){this.textContent=e}}function HD(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function UD(e){return arguments.length?this.each(e==null?zD:(typeof e=="function"?HD:WD)(e)):this.node().textContent}function GD(){this.innerHTML=""}function KD(e){return function(){this.innerHTML=e}}function qD(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function YD(e){return arguments.length?this.each(e==null?GD:(typeof e=="function"?qD:KD)(e)):this.node().innerHTML}function XD(){this.nextSibling&&this.parentNode.appendChild(this)}function ZD(){return this.each(XD)}function QD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function JD(){return this.each(QD)}function jD(e){var t=typeof e=="function"?e:Tw(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $D(){return null}function t4(e,t){var n=typeof e=="function"?e:Tw(e),i=t==null?$D:typeof t=="function"?t:ip(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function e4(){var e=this.parentNode;e&&e.removeChild(this)}function n4(){return this.each(e4)}function r4(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function i4(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function o4(e){return this.select(e?i4:r4)}function s4(e){return arguments.length?this.property("__data__",e):this.node().__data__}function a4(e){return function(t){e.call(this,t,this.__data__)}}function l4(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 u4(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 c4(e,t,n){return function(){var i=this.__on,s,a=a4(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 d4(e,t,n){var i=l4(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?c4:u4,s=0;s<a;++s)this.each(c(i[s],t,n));return this}function Vw(e,t,n){var i=Mw(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 f4(e,t){return function(){return Vw(this,e,t)}}function h4(e,t){return function(){return Vw(this,e,t.apply(this,arguments))}}function g4(e,t){return this.each((typeof t=="function"?h4:f4)(e,t))}function*p4(){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 v4=[null];function nr(e,t){this._groups=e,this._parents=t}function Lu(){return new nr([[document.documentElement]],v4)}function m4(){return this}nr.prototype=Lu.prototype={constructor:nr,select:HF,selectAll:qF,selectChild:QF,selectChildren:tD,filter:eD,data:aD,enter:nD,exit:uD,join:cD,merge:dD,selection:m4,order:fD,sort:hD,call:pD,nodes:vD,node:mD,size:bD,empty:_D,each:wD,attr:kD,style:OD,property:LD,classed:VD,text:UD,html:YD,raise:ZD,lower:JD,append:jD,insert:t4,remove:n4,clone:o4,datum:s4,on:d4,dispatch:g4,[Symbol.iterator]:p4};var b4={value:()=>{}};function zw(){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 Zc(n)}function Zc(e){this._=e}function _4(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}})}Zc.prototype=zw.prototype={constructor:Zc,on:function(e,t){var n=this._,i=_4(e+"",n),s,a=-1,l=i.length;if(arguments.length<2){for(;++a<l;)if((s=(e=i[a]).type)&&(s=w4(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]=Jb(n[s],e.name,t);else if(t==null)for(s in n)n[s]=Jb(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 Zc(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 w4(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function Jb(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=b4,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}function y4(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 x4(e,t,n){const i=e.reduce((C,T)=>C+T,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(C){throw console.error(`Error calling ctx.createImageData(${t}, ${s}). Check mock implementation.`,C),C}const d=c.data,f=d.length,{r:h,g:p,b:m,a:b}=y4(n);let y=0,x=0;e.forEach((C,T)=>{if(C===0)return;if(T%2!==0){const B=y+C;for(;y<B;){const W=Math.floor(y/t),z=y%t;x=(W*t+z)*4,x>=0&&x<f-3&&(d[x]=h,d[x+1]=p,d[x+2]=m,d[x+3]=b),y++}}else y+=C}),l.putImageData(c,0,0);let S="";try{S=a.toDataURL()}catch(C){console.error("Error calling canvas.toDataURL(). Check mock implementation.",C),S="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}return{dataUrl:S,height:s}}var S4=Pu('<image x="0" y="0"></image>');function A4(e,t){ct(t,!0);const n=E(t,"colorFill",3,"rgba(255, 0, 0, 0.2)"),i=E(t,"opacity",3,.4);if(!t.segmentation)throw new Error("Segmentation data is required");const s=I(()=>{const d=n().replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*[\d.]+)?\)/,"rgb($1)");return x4(t.segmentation,t.width,d)}),a=I(()=>g(s).dataUrl),l=I(()=>g(s).height);var c=S4();Ht(()=>{Ve(c,"href",g(a)),Ve(c,"width",t.width),Ve(c,"height",g(l)),Ve(c,"opacity",i())}),A(e,c),dt()}function C4(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t())}var P4=Pu('<rect fill="none" stroke="hsl(var(--primary))" stroke-width="3" pointer-events="none" vector-effect="non-scaling-stroke"></rect>'),k4=Pu('<g role="button" tabindex="0" data-testid="selectable-svg-group"><!><!></g>');function y8(e,t){ct(t,!0);let n=E(t,"isSelected",3,!1);const{x:i,y:s,width:a,height:l}=t.box,c=()=>{t.onSelect(t.groupId)};var d=k4();d.__click=c;let f;d.__keydown=[C4,c],Rn(d,"",{},{cursor:"pointer"});var h=Q(d);st(h,()=>t.children);var p=vt(h);{var m=b=>{var y=P4();Ht(()=>{Ve(y,"x",i),Ve(y,"y",s),Ve(y,"width",a),Ve(y,"height",l)}),A(b,y)};_t(p,b=>{n()&&b(m)})}X(d),Ht(b=>{f=$n(d,0,"group svelte-lseqsj",null,f,b),Ve(d,"data-group-id",t.groupId)},[()=>({selected:n()})]),A(e,d),dt()}Ki(["click","keydown"]);const E4=({datasetId:e,annotationId:t,onUpdate:n})=>{const i=Ck({path:{annotation_id:t,dataset_id:e}}),s=Wd(),{updateAnnotations:a}=N_({datasetId:e}),l=C_(i),c=()=>{s.invalidateQueries({queryKey:i.queryKey}),s.invalidateQueries({queryKey:Sg().queryKey}),s.invalidateQueries({queryKey:xg({path:{dataset_id:e}}).queryKey})};return{updateAnnotation:async f=>{try{await a([f]),c(),$c.success("Annotation updated successfully"),n==null||n()}catch(h){$c.error("Failed to update annotation:"+h.message)}},annotation:l,refetch:c}};var T4=J('<span class="text-sm"> </span> <span class="break-all text-sm"> </span>',1),I4=J('<div class="grid grid-cols-[6rem_1fr] gap-y-3 text-diffuse-foreground"></div>'),O4=J('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <pre class="min-w-[8rem] flex-1 overflow-x-auto whitespace-pre-wrap rounded bg-muted p-2 text-sm"> </pre></div>'),N4=J('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <span class="min-w-[8rem] flex-1 break-all text-sm"> </span></div>'),R4=J('<div class="space-y-3 text-diffuse-foreground"></div>'),M4=J("<!> <!>",1);function L4(e,t){ct(t,!0);const n=E(t,"showCustomMetadata",3,!0),i=I(()=>[{id:"height",label:"Height:",value:ag(t.sample.height)+"px"},{id:"width",label:"Width:",value:ag(t.sample.width)+"px"},{id:"filename",label:"Filename:",value:t.sample.file_name},{id:"filepath",label:"Filepath:",value:t.sample.file_path_abs}]),s=I(()=>{const f=[];if(t.sample.metadata_dict&&typeof t.sample.metadata_dict=="object"&&"data"in t.sample.metadata_dict){const h=t.sample.metadata_dict.data;h&&typeof h=="object"&&Object.entries(h).forEach(([p,m])=>{const b=ms(m),y=typeof m=="object"&&m!==null&&!Array.isArray(m);f.push({id:`metadata_${p}`,label:`${p}:`,value:b,isComplex:y})})}return f});var a=M4(),l=D(a);Mo(l,{title:"Sample details",children:(f,h)=>{var p=I4();Gn(p,21,()=>g(i),({label:m,value:b,id:y})=>m,(m,b)=>{let y=()=>g(b).label,x=()=>g(b).value,S=()=>g(b).id;var C=T4(),T=D(C),N=Q(T,!0);X(T);var B=vt(T,2),W=Q(B,!0);X(B),Ht(()=>{he(N,y()),Ve(B,"data-testid",`sample-metadata-${S()}`),he(W,x())}),A(m,C)}),X(p),A(f,p)}});var c=vt(l,2);{var d=f=>{Mo(f,{title:"Metadata",children:(h,p)=>{var m=R4();Gn(m,21,()=>g(s),({label:b,value:y,id:x,isComplex:S})=>b,(b,y)=>{let x=()=>g(y).label,S=()=>g(y).value,C=()=>g(y).id,T=()=>g(y).isComplex;var N=K(),B=D(N);{var W=M=>{var q=O4(),$=Q(q),rt=Q($,!0);X($);var ht=vt($,2),H=Q(ht,!0);X(ht),X(q),Ht(()=>{Ve($,"title",x()),he(rt,x()),he(H,S())}),A(M,q)},z=M=>{var q=N4(),$=Q(q),rt=Q($,!0);X($);var ht=vt($,2),H=Q(ht,!0);X(ht),X(q),Ht(()=>{Ve($,"title",x()),he(rt,x()),Ve(ht,"data-testid",`sample-metadata-${C()}`),he(H,S())}),A(M,q)};_t(B,M=>{T()?M(W):M(z,!1)})}A(b,N)}),X(m),A(h,m)}})};_t(c,f=>{n()&&g(s).length>0&&f(d)})}A(e,a),dt()}var F4=J('You are going to delete this annotation. This action cannot be undone. <div class="mt-2 flex justify-end gap-2"><!> <!></div>',1),D4=J("<!> <!>",1),B4=J('<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> <div class="flex gap-3"><!> <!></div></button>');function V4(e,t){ct(t,!0);const n=()=>Be(b,"$result",a),i=()=>Be(g(C),"$annotationResp",a),s=()=>Be(p,"$isEditingMode",a),[a,l]=Gi(),c=E(t,"isSelected",3,!1),d=E(t,"isHidden",3,!1),f=et=>{switch(et){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 et}},h=et=>{const yt=et.object_detection_details||et.instance_segmentation_details;if(yt){const{width:Et,height:Dt}=yt;return`${Math.round(Et)}x${Math.round(Dt)}px`}return""},{isEditingMode:p}=mi.data.globalStorage,{datasetId:m}=mi.data,b=ep(),y=I(()=>rp(n().data||[])),x=I(()=>t.annotation.annotation_id),S=I(()=>E4({datasetId:m,annotationId:g(x),onUpdate:t.onUpdate})),C=I(()=>g(S).annotation),T=I(()=>g(S).updateAnnotation),N=I(()=>i().data||t.annotation),B=I(()=>{const et=g(N).annotation_label.annotation_label_name,yt=g(y).find(Et=>Et.value===et);return yt||{value:et,label:et}});let W=bt(!1);var z=B4();z.__click=function(...et){var yt;(yt=t.onClick)==null||yt.apply(this,et)};var M=Q(z),q=Q(M),$=Q(q);{var rt=et=>{{const yt=(Dt,Kt)=>{let ye=()=>Kt==null?void 0:Kt().inputValue;np(Dt,{get label(){return ye()}})};let Et=I(()=>g(y).find(Dt=>{var Kt;return Dt.value===((Kt=g(B))==null?void 0:Kt.value)}));tp(et,{get items(){return g(y)},get selectedItem(){return g(Et)},name:"annotation-label",placeholder:"Select a label",onSelect:Dt=>{g(T)({annotation_id:g(x),dataset_id:m,label_name:Dt.value})},notFound:yt,$$slots:{notFound:!0}})}},ht=et=>{var yt=Ce();Ht(()=>he(yt,g(N).annotation_label.annotation_label_name)),A(et,yt)};_t($,et=>{s()?et(rt):et(ht,!1)})}X(q);var H=vt(q,2),it=Q(H),Y=vt(it);{var nt=et=>{var yt=Ce();Ht(Et=>he(yt,`(${Et??""})`),[()=>h(g(N))]),A(et,yt)};_t(Y,et=>{h(g(N))&&et(nt)})}X(H),X(M);var ot=vt(M,2),lt=Q(ot);{var ut=et=>{qk(et,{class:"size-6 text-muted-foreground",get onclick(){return t.onToggleShowAnnotation}})},pt=et=>{Yk(et,{class:"size-6",get onclick(){return t.onToggleShowAnnotation}})};_t(lt,et=>{d()?et(ut):et(pt,!1)})}var wt=vt(lt,2);{var tt=et=>{var yt=K(),Et=D(yt);Tt(Et,()=>lw,(Dt,Kt)=>{Kt(Dt,{get open(){return g(W)},set open(ye){R(W,ye,!0)},children:(ye,Bt)=>{var Pt=D4(),Nt=D(Pt);Tt(Nt,()=>uw,(Ut,ge)=>{ge(Ut,{children:(re,qt)=>{eE(re,{class:"size-6"})},$$slots:{default:!0}})});var te=vt(Nt,2);Tt(te,()=>aw,(Ut,ge)=>{ge(Ut,{children:(re,qt)=>{fe();var be=F4(),Gt=vt(D(be)),xe=Q(Gt);fn(xe,{variant:"destructive",size:"sm",onclick:de=>{de.stopPropagation(),t.onDeleteAnnotation(de),R(W,!1)},children:(de,Ie)=>{fe();var Se=Ce("Delete");A(de,Se)},$$slots:{default:!0}});var We=vt(xe,2);fn(We,{variant:"outline",size:"sm",onclick:de=>{de.stopPropagation(),R(W,!1)},children:(de,Ie)=>{fe();var Se=Ce("Cancel");A(de,Se)},$$slots:{default:!0}}),X(Gt),A(re,be)},$$slots:{default:!0}})}),A(ye,Pt)},$$slots:{default:!0}})}),A(et,yt)};_t(wt,et=>{s()&&et(tt)})}X(ot),X(z),Ht((et,yt)=>{$n(z,1,et),he(it,`${yt??""} `)},[()=>zi(le("flex w-full items-start justify-between gap-2 rounded-sm px-4 py-3 text-left align-baseline transition-colors",c()?"border border-accent-foreground/20 bg-accent":"bg-card hover:bg-accent/50")),()=>f(g(N).annotation_type)]),A(e,z),dt(),l()}Ki(["click"]);var z4=(e,t,n)=>{e.stopPropagation(),t.onRemoveTag(g(n).tag_id)},W4=J('<div class="inline-flex items-center gap-1 rounded-lg bg-card px-2 py-1 text-xs"><span> </span> <button type="button" class="flex size-4 items-center justify-center rounded-full text-muted-foreground transition hover:text-destructive focus:outline-none disabled:cursor-not-allowed disabled:opacity-50">x</button></div>'),H4=J('<div class="flex flex-wrap gap-1"></div>'),U4=J("<!> Add annotation",1),G4=J('<label class="flex w-full flex-col gap-3 text-muted-foreground"><div class="text-sm">Select a label to create new annotation.</div> <!></label>'),K4=J('<div class="items-left mb-2 flex flex-col justify-between space-y-2 bg-muted p-2"><div class="mb-2 w-full"><!></div> <!></div>'),q4=J('<div class="flex flex-col gap-3 space-y-4"><!> <div class="flex flex-col gap-2"></div></div>'),Y4=J('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-y-auto dark:[color-scheme:dark]"><!> <!> <!></div>');function x8(e,t){ct(t,!0);const n=()=>Be(p,"$annotationLabels",s),i=()=>Be(h,"$isEditingMode",s),[s,a]=Gi();let l=E(t,"addAnnotationEnabled",15,!1),c=E(t,"addAnnotationLabel",15,void 0);const d=I(()=>t.sample.tags??[]),f=I(()=>t.sample.annotations?[...t.sample.annotations].sort((b,y)=>b.annotation_label.annotation_label_name.localeCompare(y.annotation_label.annotation_label_name)):[]),{isEditingMode:h}=mi.data.globalStorage,p=ep(),m=I(()=>rp(n().data||[]));xw(e,{className:"h-full",children:(b,y)=>{Sw(b,{className:"h-full flex flex-col",children:(x,S)=>{var C=Y4(),T=Q(C);{var N=z=>{Mo(z,{title:"Tags",get icon(){return tE},children:(M,q)=>{var $=H4();Gn($,21,()=>g(d),rt=>rt.tag_id,(rt,ht)=>{var H=W4(),it=Q(H),Y=Q(it,!0);X(it);var nt=vt(it,2);nt.__click=[z4,t,ht],X(H),Ht(()=>{he(Y,g(ht).name),Ve(nt,"aria-label",`Remove tag ${g(ht).name}`)}),A(rt,H)}),X($),A(M,$)}})};_t(T,z=>{g(d).length>0&&z(N)})}var B=vt(T,2);Mo(B,{title:"Annotations",children:(z,M)=>{var q=q4(),$=Q(q);{var rt=H=>{var it=K4(),Y=Q(it),nt=Q(Y);{let ut=I(()=>l()?"default":"outline");fn(nt,{title:"Add annotation",get variant(){return g(ut)},"data-testid":"create-rectangle",class:"w-full",onclick:()=>{l(!l())},children:(pt,wt)=>{var tt=U4(),et=D(tt);Jk(et,{class:"h-4 w-4"}),fe(),A(pt,tt)},$$slots:{default:!0}})}X(Y);var ot=vt(Y,2);{var lt=ut=>{var pt=G4(),wt=vt(Q(pt),2);{const tt=(yt,Et)=>{let Dt=()=>Et==null?void 0:Et().inputValue;np(yt,{get label(){return Dt()}})};let et=I(()=>g(m).find(yt=>{var Et;return yt.value===((Et=c())==null?void 0:Et.value)}));tp(wt,{get items(){return g(m)},get selectedItem(){return g(et)},name:"annotation-label",label:"Choose a label",className:"w-full",placeholder:"Select a label",onSelect:yt=>{c(yt)},notFound:tt,$$slots:{notFound:!0}})}X(pt),A(ut,pt)};_t(ot,ut=>{l()&&ut(lt)})}X(it),A(H,it)};_t($,H=>{i()&&H(rt)})}var ht=vt($,2);Gn(ht,21,()=>g(f),ku,(H,it)=>{{let Y=I(()=>t.selectedAnnotationId===g(it).annotation_id),nt=I(()=>t.annotationsIdsToHide.has(g(it).annotation_id));V4(H,{get annotation(){return g(it)},get isSelected(){return g(Y)},onClick:()=>t.onAnnotationClick(g(it).annotation_id),onDeleteAnnotation:()=>t.onDeleteAnnotation(g(it).annotation_id),get isHidden(){return g(nt)},onToggleShowAnnotation:ot=>{ot.stopPropagation(),t.onToggleShowAnnotation(g(it).annotation_id)},get onUpdate(){return t.onUpdate}})}}),X(ht),X(q),A(z,q)}});var W=vt(B,2);L4(W,{get sample(){return t.sample}}),X(C),A(x,C)},$$slots:{default:!0}})},$$slots:{default:!0}}),dt(),a()}Ki(["click"]);const dg=Ge({}),jb=(e,t)=>{if(!(e==null&&t==null))return{min:e??void 0,max:t??void 0}},X4=e=>{if(!e)return{};const t=jb(e.min_width,e.max_width),n=jb(e.min_height,e.max_height);return{width:t,height:n}},Z4=ys(dg,e=>{var c,d,f,h;if(!(e!=null&&e.dataset_id)||!(e!=null&&e.mode)||e.mode==="classifier")return null;const t={},{width:n,height:i}=X4((c=e.filters)==null?void 0:c.dimensions);n&&(t.width=n),i&&(t.height=i);const s=(d=e.filters)==null?void 0:d.sample_ids;s&&s.length>0&&(t.sample_ids=s);const a=(f=e.filters)==null?void 0:f.annotation_label_ids;a&&a.length>0&&(t.annotation_label_ids=a);const l=(h=e.filters)==null?void 0:h.tag_ids;if(l&&l.length>0&&(t.tag_ids=l),e.metadata_values){const p=Pk(e.metadata_values);p.length>0&&(t.metadata_filters=p)}return Object.keys(t).length>0?t:null}),S8=()=>({filterParams:dg,sampleFilter:Z4,updateFilterParams:t=>{dg.set(t)}});function Q4(e,t){const n=E(t,"isSelected",3,!1);Ew(e,{get checked(){return n()},get onCheckedChange(){return t.onSelect},"data-testid":"sample-selected-box"})}var J4=J('<div class="flex items-center justify-between space-x-2 py-1"><!> <div class="flex space-x-2"><!> <!> <!></div></div>'),j4=J("<p>No classifiers loaded.</p>"),$4=J('<span class="mr-2 animate-spin">⏳</span> Running...',1),tB=J('<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>'),eB=J("<!> <!>",1),nB=J("<!> <!>",1),rB=J('<!> <div class="grid gap-4 py-4"><!> <!></div>',1),iB=J("<!> <!>",1);function A8(e,t){ct(t,!1);const n=()=>Be(x,"$classifiers",f),i=()=>Be(S,"$classifiersSelected",f),s=()=>Be(y,"$error",f),a=()=>Be(C,"$isLoading",f),l=()=>Be(q,"$showExportDialog",f),c=()=>Be(M,"$exportType",f),d=()=>Be(ht,"$triggerContent",f),[f,h]=Gi(),p=["sklearn","lightly"];let m=mi.params.dataset_id;const b=Wd(),{error:y,classifiers:x,classifiersSelected:S,isLoading:C,classifierSelectionToggle:T,apply:N,saveClassifier:B,loadClassifier:W,startRefinment:z}=gF(),M=Ge("sklearn"),q=Ge(!1),$=Ge(null),rt=ys([S,x],([pt,wt])=>pt.size>0&&wt.length>0),ht=ys(M,pt=>pt||"Select export type");function H(pt){$.set(pt),q.set(!0)}function it(){const pt=dn($),wt=dn(M);pt&&(B(pt,wt),q.set(!1),$.set(null))}function Y(){b.invalidateQueries({queryKey:Sg().queryKey}),b.invalidateQueries({queryKey:xg({path:{dataset_id:m}}).queryKey})}async function nt(){await N(),Y()}wg();var ot=iB(),lt=D(ot);Mo(lt,{title:"Classifiers",get icon(){return Zk},children:(pt,wt)=>{var tt=tB(),et=Q(tt);Gn(et,1,n,Bt=>Bt.classifier_id,(Bt,Pt)=>{var Nt=J4(),te=Q(Nt);{let Gt=Zm(()=>i().has(g(Pt).classifier_id));uF(te,{get name(){return g(Pt).classifier_id},get isChecked(){return g(Gt)},get label(){return g(Pt).classifier_name},onCheckedChange:()=>T(g(Pt).classifier_id)})}var Ut=vt(te,2),ge=Q(Ut);{var re=Gt=>{oE(Gt,{title:"Error occured",children:(xe,We)=>{fe();var de=Ce();Ht(()=>he(de,s())),A(xe,de)}})};_t(ge,Gt=>{s()&&Gt(re)})}var qt=vt(ge,2);fn(qt,{variant:"outline",size:"sm",title:"Edit",onclick:()=>z("existing",g(Pt).classifier_id,g(Pt).classifier_name,g(Pt).class_list,m),children:(Gt,xe)=>{Qk(Gt,{})},$$slots:{default:!0}});var be=vt(qt,2);fn(be,{variant:"outline",size:"sm",title:"Download classifier",onclick:()=>H(g(Pt).classifier_id),children:(Gt,xe)=>{Kk(Gt,{})},$$slots:{default:!0}}),X(Ut),X(Nt),A(Bt,Nt)},Bt=>{var Pt=j4();A(Bt,Pt)});var yt=vt(et,2),Et=Q(yt);{let Bt=Zm(()=>!rt);fn(Et,{variant:"outline",class:"flex-1",get disabled(){return g(Bt)},onclick:nt,children:(Pt,Nt)=>{var te=K(),Ut=D(te);{var ge=qt=>{var be=$4();fe(),A(qt,be)},re=qt=>{var be=Ce("Run Classifiers");A(qt,be)};_t(Ut,qt=>{a()?qt(ge):qt(re,!1)})}A(Pt,te)},$$slots:{default:!0}})}var Dt=vt(Et,2),Kt=Q(Dt);Kt.__change=W;var ye=vt(Kt,2);fn(ye,{variant:"outline",size:"sm",children:(Bt,Pt)=>{nE(Bt,{})},$$slots:{default:!0}}),X(Dt),X(yt),X(tt),A(pt,tt)}});var ut=vt(lt,2);ow(ut,{get open(){return jm(),l()},set open(pt){Jm(q,pt)},children:(pt,wt)=>{iw(pt,{children:(tt,et)=>{var yt=rB(),Et=D(yt);nw(Et,{children:(Bt,Pt)=>{ew(Bt,{children:(Nt,te)=>{fe();var Ut=Ce("Export Classifier");A(Nt,Ut)},$$slots:{default:!0}})},$$slots:{default:!0}});var Dt=vt(Et,2),Kt=Q(Dt);GL(Kt,{label:"Select the export type for the classifier.",children:(Bt,Pt)=>{kw(Bt,{type:"single",name:"exportType",get value(){return jm(),c()},set value(Nt){Jm(M,Nt)},children:(Nt,te)=>{var Ut=nB(),ge=D(Ut);Pw(ge,{class:"w-full",children:(qt,be)=>{fe();var Gt=Ce();Ht(()=>he(Gt,d())),A(qt,Gt)},$$slots:{default:!0}});var re=vt(ge,2);Cw(re,{children:(qt,be)=>{JL(qt,{children:(Gt,xe)=>{var We=eB(),de=D(We);KL(de,{children:(Se,ee)=>{fe();var pe=Ce("Export Types");A(Se,pe)},$$slots:{default:!0}});var Ie=vt(de,2);Gn(Ie,1,()=>p,Se=>Se,(Se,ee)=>{ug(Se,{get value(){return g(ee)},get label(){return g(ee)},children:(pe,ke)=>{fe();var en=Ce();Ht(()=>he(en,g(ee))),A(pe,en)},$$slots:{default:!0}})}),A(Gt,We)},$$slots:{default:!0}})},$$slots:{default:!0}}),A(Nt,Ut)},$$slots:{default:!0},$$legacy:!0})}});var ye=vt(Kt,2);fn(ye,{class:"flex-1",onclick:()=>it(),children:(Bt,Pt)=>{fe();var Nt=Ce("Export");A(Bt,Nt)},$$slots:{default:!0}}),X(Dt),A(tt,yt)},$$slots:{default:!0}})},$$slots:{default:!0},$$legacy:!0}),A(e,ot),dt(),h()}Ki(["change"]);function sp(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ww(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Fu(){}var ks=.7,ud=1/ks,_o="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oB=/^#([0-9a-f]{3,8})$/,sB=new RegExp(`^rgb\\(${_o},${_o},${_o}\\)$`),aB=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),lB=new RegExp(`^rgba\\(${_o},${_o},${_o},${Es}\\)$`),uB=new RegExp(`^rgba\\(${gr},${gr},${gr},${Es}\\)$`),cB=new RegExp(`^hsl\\(${Es},${gr},${gr}\\)$`),dB=new RegExp(`^hsla\\(${Es},${gr},${gr},${Es}\\)$`),$b={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};sp(Fu,Ts,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:t_,formatHex:t_,formatHex8:fB,formatHsl:hB,formatRgb:e_,toString:e_});function t_(){return this.rgb().formatHex()}function fB(){return this.rgb().formatHex8()}function hB(){return Hw(this).formatHsl()}function e_(){return this.rgb().formatRgb()}function Ts(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=oB.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?Mc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Mc(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=sB.exec(e))?new xn(t[1],t[2],t[3],1):(t=aB.exec(e))?new xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lB.exec(e))?Mc(t[1],t[2],t[3],t[4]):(t=uB.exec(e))?Mc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cB.exec(e))?o_(t[1],t[2]/100,t[3]/100,1):(t=dB.exec(e))?o_(t[1],t[2]/100,t[3]/100,t[4]):$b.hasOwnProperty(e)?n_($b[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 Mc(e,t,n,i){return i<=0&&(e=t=n=NaN),new xn(e,t,n,i)}function gB(e){return e instanceof Fu||(e=Ts(e)),e?(e=e.rgb(),new xn(e.r,e.g,e.b,e.opacity)):new xn}function fg(e,t,n,i){return arguments.length===1?gB(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}sp(xn,fg,Ww(Fu,{brighter(e){return e=e==null?ud:Math.pow(ud,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xn(Vi(this.r),Vi(this.g),Vi(this.b),cd(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:pB,formatRgb:i_,toString:i_}));function r_(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}`}function pB(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}${Mi((isNaN(this.opacity)?1:this.opacity)*255)}`}function i_(){const e=cd(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function cd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mi(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function o_(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qn(e,t,n,i)}function Hw(e){if(e instanceof Qn)return new Qn(e.h,e.s,e.l,e.opacity);if(e instanceof Fu||(e=Ts(e)),!e)return new Qn;if(e instanceof Qn)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 Qn(l,c,d,e.opacity)}function vB(e,t,n,i){return arguments.length===1?Hw(e):new Qn(e,t,n,i??1)}function Qn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}sp(Qn,vB,Ww(Fu,{brighter(e){return e=e==null?ud:Math.pow(ud,e),new Qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new Qn(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(Th(e>=240?e-240:e+120,s,i),Th(e,s,i),Th(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Qn(s_(this.h),Lc(this.s),Lc(this.l),cd(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=cd(this.opacity);return`${e===1?"hsl(":"hsla("}${s_(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function s_(e){return e=(e||0)%360,e<0?e+360:e}function Lc(e){return Math.max(0,Math.min(1,e||0))}function Th(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 Uw=e=>()=>e;function mB(e,t){return function(n){return e+n*t}}function bB(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 _B(e){return(e=+e)==1?Gw:function(t,n){return n-t?bB(t,n,e):Uw(isNaN(t)?n:t)}}function Gw(e,t){var n=t-e;return n?mB(e,n):Uw(isNaN(e)?t:e)}const a_=function e(t){var n=_B(t);function i(s,a){var l=n((s=fg(s)).r,(a=fg(a)).r),c=n(s.g,a.g),d=n(s.b,a.b),f=Gw(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 ci(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var hg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ih=new RegExp(hg.source,"g");function wB(e){return function(){return e}}function yB(e){return function(t){return e(t)+""}}function xB(e,t){var n=hg.lastIndex=Ih.lastIndex=0,i,s,a,l=-1,c=[],d=[];for(e=e+"",t=t+"";(i=hg.exec(e))&&(s=Ih.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:ci(i,s)})),n=Ih.lastIndex;return n<t.length&&(a=t.slice(n),c[l]?c[l]+=a:c[++l]=a),c.length<2?d[0]?yB(d[0].x):wB(t):(t=d.length,function(f){for(var h=0,p;h<t;++h)c[(p=d[h]).i]=p.x(f);return c.join("")})}var l_=180/Math.PI,gg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kw(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)*l_,skewX:Math.atan(d)*l_,scaleX:l,scaleY:c}}var Fc;function SB(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?gg:Kw(t.a,t.b,t.c,t.d,t.e,t.f)}function AB(e){return e==null||(Fc||(Fc=document.createElementNS("http://www.w3.org/2000/svg","g")),Fc.setAttribute("transform",e),!(e=Fc.transform.baseVal.consolidate()))?gg:(e=e.matrix,Kw(e.a,e.b,e.c,e.d,e.e,e.f))}function qw(e,t,n,i){function s(f){return f.length?f.pop()+" ":""}function a(f,h,p,m,b,y){if(f!==p||h!==m){var x=b.push("translate(",null,t,null,n);y.push({i:x-4,x:ci(f,p)},{i:x-2,x:ci(h,m)})}else(p||m)&&b.push("translate("+p+t+m+n)}function l(f,h,p,m){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),m.push({i:p.push(s(p)+"rotate(",null,i)-2,x:ci(f,h)})):h&&p.push(s(p)+"rotate("+h+i)}function c(f,h,p,m){f!==h?m.push({i:p.push(s(p)+"skewX(",null,i)-2,x:ci(f,h)}):h&&p.push(s(p)+"skewX("+h+i)}function d(f,h,p,m,b,y){if(f!==p||h!==m){var x=b.push(s(b)+"scale(",null,",",null,")");y.push({i:x-4,x:ci(f,p)},{i:x-2,x:ci(h,m)})}else(p!==1||m!==1)&&b.push(s(b)+"scale("+p+","+m+")")}return function(f,h){var p=[],m=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,p,m),l(f.rotate,h.rotate,p,m),c(f.skewX,h.skewX,p,m),d(f.scaleX,f.scaleY,h.scaleX,h.scaleY,p,m),f=h=null,function(b){for(var y=-1,x=m.length,S;++y<x;)p[(S=m[y]).i]=S.x(b);return p.join("")}}}var CB=qw(SB,"px, ","px)","deg)"),PB=qw(AB,", ",")",")"),Fo=0,_s=0,hs=0,Yw=1e3,dd,ws,fd=0,Hi=0,Xd=0,Is=typeof performance=="object"&&performance.now?performance:Date,Xw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ap(){return Hi||(Xw(kB),Hi=Is.now()+Xd)}function kB(){Hi=0}function hd(){this._call=this._time=this._next=null}hd.prototype=Zw.prototype={constructor:hd,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ap():+n)+(t==null?0:+t),!this._next&&ws!==this&&(ws?ws._next=this:dd=this,ws=this),this._call=e,this._time=n,pg()},stop:function(){this._call&&(this._call=null,this._time=1/0,pg())}};function Zw(e,t,n){var i=new hd;return i.restart(e,t,n),i}function EB(){ap(),++Fo;for(var e=dd,t;e;)(t=Hi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fo}function u_(){Hi=(fd=Is.now())+Xd,Fo=_s=0;try{EB()}finally{Fo=0,IB(),Hi=0}}function TB(){var e=Is.now(),t=e-fd;t>Yw&&(Xd-=t,fd=e)}function IB(){for(var e,t=dd,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:dd=n);ws=e,pg(i)}function pg(e){if(!Fo){_s&&(_s=clearTimeout(_s));var t=e-Hi;t>24?(e<1/0&&(_s=setTimeout(u_,e-Is.now()-Xd)),hs&&(hs=clearInterval(hs))):(hs||(fd=Is.now(),hs=setInterval(TB,Yw)),Fo=1,Xw(u_))}}function c_(e,t,n){var i=new hd;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var OB=zw("start","end","cancel","interrupt"),NB=[],Qw=0,d_=1,vg=2,Qc=3,f_=4,mg=5,Jc=6;function Zd(e,t,n,i,s,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;RB(e,n,{name:t,index:i,group:s,on:OB,tween:NB,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Qw})}function lp(e,t){var n=rr(e,t);if(n.state>Qw)throw new Error("too late; already scheduled");return n}function br(e,t){var n=rr(e,t);if(n.state>Qc)throw new Error("too late; already running");return n}function rr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function RB(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=Zw(a,0,n.time);function a(f){n.state=d_,n.timer.restart(l,n.delay,n.time),n.delay<=f&&l(f-n.delay)}function l(f){var h,p,m,b;if(n.state!==d_)return d();for(h in i)if(b=i[h],b.name===n.name){if(b.state===Qc)return c_(l);b.state===f_?(b.state=Jc,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[h]):+h<t&&(b.state=Jc,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[h])}if(c_(function(){n.state===Qc&&(n.state=f_,n.timer.restart(c,n.delay,n.time),c(f))}),n.state=vg,n.on.call("start",e,e.__data__,n.index,n.group),n.state===vg){for(n.state=Qc,s=new Array(m=n.tween.length),h=0,p=-1;h<m;++h)(b=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++p]=b);s.length=p+1}}function c(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(d),n.state=mg,1),p=-1,m=s.length;++p<m;)s[p].call(e,h);n.state===mg&&(n.on.call("end",e,e.__data__,n.index,n.group),d())}function d(){n.state=Jc,n.timer.stop(),delete i[t];for(var f in i)return;delete e.__transition}}function MB(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>vg&&i.state<mg,i.state=Jc,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}a&&delete e.__transition}}function LB(e){return this.each(function(){MB(this,e)})}function FB(e,t){var n,i;return function(){var s=br(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 DB(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var a=br(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 BB(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=rr(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?FB:DB)(n,e,t))}function up(e,t,n){var i=e._id;return e.each(function(){var s=br(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return rr(s,i).value[t]}}function Jw(e,t){var n;return(typeof t=="number"?ci:t instanceof Ts?a_:(n=Ts(t))?(t=n,a_):xB)(e,t)}function VB(e){return function(){this.removeAttribute(e)}}function zB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function WB(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 HB(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 UB(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 GB(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 KB(e,t){var n=Yd(e),i=n==="transform"?PB:Jw;return this.attrTween(e,typeof t=="function"?(n.local?GB:UB)(n,i,up(this,"attr."+e,t)):t==null?(n.local?zB:VB)(n):(n.local?HB:WB)(n,i,t))}function qB(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function YB(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function XB(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&YB(e,a)),n}return s._value=t,s}function ZB(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&qB(e,a)),n}return s._value=t,s}function QB(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=Yd(e);return this.tween(n,(i.local?XB:ZB)(i,t))}function JB(e,t){return function(){lp(this,e).delay=+t.apply(this,arguments)}}function jB(e,t){return t=+t,function(){lp(this,e).delay=t}}function $B(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?JB:jB)(t,e)):rr(this.node(),t).delay}function t9(e,t){return function(){br(this,e).duration=+t.apply(this,arguments)}}function e9(e,t){return t=+t,function(){br(this,e).duration=t}}function n9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?t9:e9)(t,e)):rr(this.node(),t).duration}function r9(e,t){if(typeof t!="function")throw new Error;return function(){br(this,e).ease=t}}function i9(e){var t=this._id;return arguments.length?this.each(r9(t,e)):rr(this.node(),t).ease}function o9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;br(this,e).ease=n}}function s9(e){if(typeof e!="function")throw new Error;return this.each(o9(this._id,e))}function a9(e){typeof e!="function"&&(e=Ow(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 qr(i,this._parents,this._name,this._id)}function l9(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,p=l[c]=new Array(h),m,b=0;b<h;++b)(m=d[b]||f[b])&&(p[b]=m);for(;c<i;++c)l[c]=t[c];return new qr(l,this._parents,this._name,this._id)}function u9(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 c9(e,t,n){var i,s,a=u9(t)?lp:br;return function(){var l=a(this,e),c=l.on;c!==i&&(s=(i=c).copy()).on(t,n),l.on=s}}function d9(e,t){var n=this._id;return arguments.length<2?rr(this.node(),n).on.on(e):this.each(c9(n,e,t))}function f9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function h9(){return this.on("end.remove",f9(this._id))}function g9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ip(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,p,m=0;m<d;++m)(h=c[m])&&(p=e.call(h,h.__data__,m,c))&&("__data__"in h&&(p.__data__=h.__data__),f[m]=p,Zd(f[m],t,n,m,f,rr(h,n)));return new qr(a,this._parents,t,n)}function p9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Iw(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,p=0;p<f;++p)if(h=d[p]){for(var m=e.call(h,h.__data__,p,d),b,y=rr(h,n),x=0,S=m.length;x<S;++x)(b=m[x])&&Zd(b,t,n,x,m,y);a.push(m),l.push(h)}return new qr(a,l,t,n)}var v9=Lu.prototype.constructor;function m9(){return new v9(this._groups,this._parents)}function b9(e,t){var n,i,s;return function(){var a=Lo(this,e),l=(this.style.removeProperty(e),Lo(this,e));return a===l?null:a===n&&l===i?s:s=t(n=a,i=l)}}function jw(e){return function(){this.style.removeProperty(e)}}function _9(e,t,n){var i,s=n+"",a;return function(){var l=Lo(this,e);return l===s?null:l===i?a:a=t(i=l,n)}}function w9(e,t,n){var i,s,a;return function(){var l=Lo(this,e),c=n(this),d=c+"";return c==null&&(d=c=(this.style.removeProperty(e),Lo(this,e))),l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,c))}}function y9(e,t){var n,i,s,a="style."+t,l="end."+a,c;return function(){var d=br(this,e),f=d.on,h=d.value[a]==null?c||(c=jw(t)):void 0;(f!==n||s!==h)&&(i=(n=f).copy()).on(l,s=h),d.on=i}}function x9(e,t,n){var i=(e+="")=="transform"?CB:Jw;return t==null?this.styleTween(e,b9(e,i)).on("end.style."+e,jw(e)):typeof t=="function"?this.styleTween(e,w9(e,i,up(this,"style."+e,t))).each(y9(this._id,e)):this.styleTween(e,_9(e,i,t),n).on("end.style."+e,null)}function S9(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function A9(e,t,n){var i,s;function a(){var l=t.apply(this,arguments);return l!==s&&(i=(s=l)&&S9(e,l,n)),i}return a._value=t,a}function C9(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,A9(e,t,n??""))}function P9(e){return function(){this.textContent=e}}function k9(e){return function(){var t=e(this);this.textContent=t??""}}function E9(e){return this.tween("text",typeof e=="function"?k9(up(this,"text",e)):P9(e==null?"":e+""))}function T9(e){return function(t){this.textContent=e.call(this,t)}}function I9(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&T9(s)),t}return i._value=e,i}function O9(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,I9(e))}function N9(){for(var e=this._name,t=this._id,n=$w(),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=rr(d,t);Zd(d,e,n,f,l,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new qr(i,this._parents,e,n)}function R9(){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=br(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 M9=0;function qr(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function $w(){return++M9}var Or=Lu.prototype;qr.prototype={constructor:qr,select:g9,selectAll:p9,selectChild:Or.selectChild,selectChildren:Or.selectChildren,filter:a9,merge:l9,selection:m9,transition:N9,call:Or.call,nodes:Or.nodes,node:Or.node,size:Or.size,empty:Or.empty,each:Or.each,on:d9,attr:KB,attrTween:QB,style:x9,styleTween:C9,text:E9,textTween:O9,remove:h9,tween:BB,delay:$B,duration:n9,ease:i9,easeVarying:s9,end:R9,[Symbol.iterator]:Or[Symbol.iterator]};function L9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var F9={time:null,delay:0,duration:250,ease:L9};function D9(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 B9(e){var t,n;e instanceof qr?(t=e._id,e=e._name):(t=$w(),(n=F9).time=ap(),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])&&Zd(d,e,t,f,l,n||D9(d,t));return new qr(i,this._parents,e,t)}Lu.prototype.interrupt=LB;Lu.prototype.transition=B9;function ho(e,t,n){this.k=e,this.x=t,this.y=n}ho.prototype={constructor:ho,scale:function(e){return e===1?this:new ho(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ho(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 C8=new ho(1,0,0);ho.prototype;export{Ng as $,f8 as A,rp as B,xw as C,h8 as D,ag as E,Mo as F,hE as G,L4 as H,tn as I,nr as J,v4 as K,BF as L,zw as M,A4 as N,ww as O,UF as P,C8 as Q,MB as R,Q4 as S,ho as T,fn as U,Vr as V,K_ as W,G_ as X,vi as Y,Iu as Z,_8 as _,lT as a,Ou as a0,on as a1,Kn as a2,ae as a3,Wr as a4,Ur as a5,U_ as a6,aT as a7,d8 as a8,Dh as a9,Zk as aA,b8 as aB,Ag as aC,Qk as aD,Ew as aE,bs as aF,w8 as aG,Jk as aH,iw as aI,nw as aJ,ew as aK,i5 as aL,$M as aM,ow as aN,Db as aO,tE as aP,sw as aQ,rw as aR,pF as aS,zE as aT,k_ as aU,jk as aV,A8 as aW,ie as aa,IL as ab,j5 as ac,J5 as ad,VT as ae,G0 as af,E3 as ag,m8 as ah,v8 as ai,T_ as aj,Xk as ak,p8 as al,Kk as am,GL as an,kw as ao,Pw as ap,Cw as aq,JL as ar,KL as as,uF as at,ug as au,a8 as av,I_ as aw,gF as ax,oE as ay,LL as az,u8 as b,$t as c,F as d,le as e,yL as f,c8 as g,Vk as h,S8 as i,uL as j,cF as k,dF as l,Vt as m,vE as n,lg as o,y8 as p,E4 as q,zk as r,ep as s,g8 as t,jt as u,Sw as v,fo as w,x8 as x,tp as y,np as z};