@khaos-systems/helm 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +11 -4
  2. package/dist/MtIconSelect-CfmehFw5.js +7859 -0
  3. package/dist/MtIconSelect-D3hqMI_b.cjs +46 -0
  4. package/dist/components/matter/MtButton.d.ts +2 -2
  5. package/dist/components/matter/MtDropdown.d.ts +1 -1
  6. package/dist/components/matter/MtFilter.d.ts +6 -0
  7. package/dist/components/matter/MtIcon.d.ts +3 -0
  8. package/dist/components/matter/MtIconSelect.d.ts +19 -0
  9. package/dist/components/matter/MtInput.d.ts +1 -1
  10. package/dist/components/matter/MtSearch.d.ts +1 -1
  11. package/dist/components/matter/MtSelect.d.ts +1 -1
  12. package/dist/components/matter/MtToast.d.ts +31 -0
  13. package/dist/components/matter/experimental/collection/MtCollection.d.ts +41 -1
  14. package/dist/components/matter/experimental/collection/MtCollectionContext.d.ts +26 -3
  15. package/dist/components/matter/experimental/collection/MtCollectionEntryControls.d.ts +21 -5
  16. package/dist/components/matter/experimental/collection/MtCollectionEntryUtils.d.ts +24 -0
  17. package/dist/components/matter/experimental/collection/MtCollectionSelectionToolbar.d.ts +8 -0
  18. package/dist/components/matter/experimental/collection/MtCollectionTaskListEntry.d.ts +32 -1
  19. package/dist/components/matter/experimental/collection/MtCollectionToast.d.ts +10 -0
  20. package/dist/components/matter/experimental/collection/index.d.ts +2 -1
  21. package/dist/components/matter/experimental/collection/layouts/MtCollectionBoardLayout.d.ts +33 -0
  22. package/dist/components/matter/experimental/collection/layouts/MtCollectionPlanLayout.d.ts +2 -0
  23. package/dist/components/matter/experimental/collection/layouts/useBoardDnd.d.ts +40 -0
  24. package/dist/experimental.cjs +6 -2
  25. package/dist/experimental.js +6464 -1720
  26. package/dist/lib.d.ts +4 -1
  27. package/dist/matter.cjs +2 -2
  28. package/dist/matter.js +262 -275
  29. package/dist/styles.css +1 -1
  30. package/package.json +6 -1
@@ -0,0 +1,46 @@
1
+ "use strict";const O=require("react"),eo=require("react-dom");function to(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=to(O),dt=to(eo);var Mt={exports:{}},rt={};var br;function _i(){if(br)return rt;br=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return rt.Fragment=t,rt.jsx=n,rt.jsxs=n,rt}var ot={};var Cr;function Ri(){return Cr||(Cr=1,process.env.NODE_ENV!=="production"&&(function(){function e(M){if(M==null)return null;if(typeof M=="function")return M.$$typeof===I?null:M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case x:return"Fragment";case w:return"Profiler";case y:return"StrictMode";case k:return"Suspense";case _:return"SuspenseList";case L:return"Activity"}if(typeof M=="object")switch(typeof M.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case h:return"Portal";case C:return M.displayName||"Context";case b:return(M._context.displayName||"Context")+".Consumer";case R:var V=M.render;return M=M.displayName,M||(M=V.displayName||V.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case E:return V=M.displayName||null,V!==null?V:e(M.type)||"Memo";case T:V=M._payload,M=M._init;try{return e(M(V))}catch{}}return null}function t(M){return""+M}function n(M){try{t(M);var V=!1}catch{V=!0}if(V){V=console;var K=V.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return K.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),t(M)}}function r(M){if(M===x)return"<>";if(typeof M=="object"&&M!==null&&M.$$typeof===T)return"<...>";try{var V=e(M);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function o(){var M=B.A;return M===null?null:M.getOwner()}function s(){return Error("react-stack-top-frame")}function a(M){if(H.call(M,"key")){var V=Object.getOwnPropertyDescriptor(M,"key").get;if(V&&V.isReactWarning)return!1}return M.key!==void 0}function c(M,V){function K(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}K.isReactWarning=!0,Object.defineProperty(M,"key",{get:K,configurable:!0})}function u(){var M=e(this.type);return W[M]||(W[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function f(M,V,K,z,se,ee){var N=K.ref;return M={$$typeof:g,type:M,key:V,props:K,_owner:z},(N!==void 0?N:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:u}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function p(M,V,K,z,se,ee){var N=V.children;if(N!==void 0)if(z)if(S(N)){for(z=0;z<N.length;z++)d(N[z]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(N);if(H.call(V,"key")){N=e(M);var q=Object.keys(V).filter(function(Y){return Y!=="key"});z=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",X[N+z]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,z,N,q,N),X[N+z]=!0)}if(N=null,K!==void 0&&(n(K),N=""+K),a(V)&&(n(V.key),N=""+V.key),"key"in V){K={};for(var Q in V)Q!=="key"&&(K[Q]=V[Q])}else K=V;return N&&c(K,typeof M=="function"?M.displayName||M.name||"Unknown":M),f(M,N,K,o(),se,ee)}function d(M){m(M)?M._store&&(M._store.validated=1):typeof M=="object"&&M!==null&&M.$$typeof===T&&(M._payload.status==="fulfilled"?m(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function m(M){return typeof M=="object"&&M!==null&&M.$$typeof===g}var v=O,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),B=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,S=Array.isArray,$=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(M){return M()}};var F,W={},D=v.react_stack_bottom_frame.bind(v,s)(),A=$(r(s)),X={};ot.Fragment=x,ot.jsx=function(M,V,K){var z=1e4>B.recentlyCreatedOwnerStacks++;return p(M,V,K,!1,z?Error("react-stack-top-frame"):D,z?$(r(M)):A)},ot.jsxs=function(M,V,K){var z=1e4>B.recentlyCreatedOwnerStacks++;return p(M,V,K,!0,z?Error("react-stack-top-frame"):D,z?$(r(M)):A)}})()),ot}var Mr;function ki(){return Mr||(Mr=1,process.env.NODE_ENV==="production"?Mt.exports=_i():Mt.exports=Ri()),Mt.exports}var i=ki();const no=O.forwardRef(({children:e,type:t="button",size:n="medium",variant:r="default",kind:o="default",selected:s=!1,className:a,...c},u)=>{const f={small:"mt-layout-input-medium w-fit",medium:"mt-layout-input-medium w-fit",large:"mt-layout-input-large w-fit"},p={small:"w-[18px] h-[18px] p-0.5 flex items-center justify-center",medium:"w-[24px] h-[24px] p-1 flex items-center justify-center",large:"w-[32px] h-[32px] p-1 flex items-center justify-center"},d={default:"mt-surface-input-default",accent:"mt-surface-input-accent",ghost:"mt-surface-input-ghost",panel:"mt-surface-input-panel"},m="flex items-center gap-2 rounded transition-all duration-150",v=o==="icon"?p[n]:f[n];return i.jsx("button",{ref:u,type:t,"data-selected":s?"true":void 0,className:`${m} ${v} ${d[r]} ${a||""}`,...c,children:e})});no.displayName="MtButton";const Ye=no;const ro=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Pi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ni=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Sr=e=>{const t=Ni(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ti={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ai=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ji=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...c},u)=>O.createElement("svg",{ref:u,...Ti,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ro("lucide",o),...!s&&!Ai(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,p])=>O.createElement(f,p)),...Array.isArray(s)?s:[s]]));const P=(e,t)=>{const n=O.forwardRef(({className:r,...o},s)=>O.createElement(ji,{ref:s,iconNode:t,className:ro(`lucide-${Pi(Sr(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Sr(e),n};const Oi=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ii=P("activity",Oi);const Di=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Li=P("archive",Di);const $i=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Fi=P("arrow-down",$i);const Vi=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],oo=P("arrow-up-down",Vi);const Bi=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Hi=P("arrow-up",Bi);const Wi=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Ui=P("bell",Wi);const Ki=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],zi=P("bookmark",Ki);const qi=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Gi=P("box",qi);const Yi=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],Xi=P("bug",Yi);const Zi=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ji=P("calendar",Zi);const Qi=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],so=P("check",Qi);const ec=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ao=P("chevron-down",ec);const tc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],io=P("chevron-right",tc);const nc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],co=P("circle-alert",nc);const rc=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],lo=P("circle-check-big",rc);const oc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],sc=P("circle-question-mark",oc);const ac=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Kt=P("circle",ac);const ic=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],cc=P("clipboard",ic);const lc=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],uc=P("clock",lc);const dc=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],fc=P("cloud",dc);const pc=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],hc=P("code",pc);const mc=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],vc=P("compass",mc);const xc=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],gc=P("cpu",xc);const yc=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],wc=P("database",yc);const bc=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cc=P("earth",bc);const Mc=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Sc=P("ellipsis",Mc);const Ec=[["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",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_c=P("eye",Ec);const Rc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],kc=P("file-text",Rc);const Pc=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Nc=P("flag",Pc);const Tc=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Ac=P("flame",Tc);const jc=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Oc=P("folder",jc);const Ic=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Dc=P("funnel",Ic);const Lc=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],$c=P("git-branch",Lc);const Fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Vc=P("globe",Fc);const Bc=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Hc=P("hash",Bc);const Wc=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Uc=P("heart",Wc);const Kc=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],zc=P("inbox",Kc);const qc=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Gc=P("key",qc);const Yc=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],uo=P("layers",Yc);const Xc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],Zc=P("life-buoy",Xc);const Jc=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Qc=P("link",Jc);const el=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],st=P("list-filter",el);const tl=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],nl=P("list-todo",tl);const rl=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],fo=P("list",rl);const ol=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],sl=P("lock",ol);const al=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],il=P("map",al);const cl=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],po=P("message-square",cl);const ll=[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]],ul=P("microscope",ll);const dl=[["path",{d:"M5 12h14",key:"1ays0h"}]],fl=P("minus",dl);const pl=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],hl=P("monitor",pl);const ml=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],vl=P("package",ml);const xl=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],It=P("plus",xl);const gl=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],yl=P("puzzle",gl);const wl=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],bl=P("refresh-cw",wl);const Cl=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],Ml=P("repeat",Cl);const Sl=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],El=P("rocket",Sl);const _l=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Yn=P("search",_l);const Rl=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],kl=P("server",Rl);const Pl=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Nl=P("settings-2",Pl);const Tl=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ho=P("settings",Tl);const Al=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],jl=P("shield",Al);const Ol=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],Il=P("shuffle",Ol);const Dl=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],Ll=P("sliders-vertical",Dl);const $l=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Fl=P("smartphone",$l);const Vl=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Bl=P("sparkles",Vl);const Hl=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Wl=P("square-check-big",Hl);const Ul=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Kl=P("square",Ul);const zl=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],mo=P("star",zl);const ql=[["path",{d:"m11 19-6-6",key:"s7kpr"}],["path",{d:"m5 21-2-2",key:"1kw20b"}],["path",{d:"m8 16-4 4",key:"1oqv8h"}],["path",{d:"M9.5 17.5 21 6V3h-3L6.5 14.5",key:"pkxemp"}]],Gl=P("sword",ql);const Yl=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Xl=P("table",Yl);const Zl=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],vo=P("tag",Zl);const Jl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ql=P("target",Jl);const eu=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],tu=P("terminal",eu);const nu=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],ru=P("thumbs-up",nu);const ou=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],su=P("ticket",ou);const au=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Dt=P("trash-2",au);const iu=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cu=P("trash",iu);const lu=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],uu=P("trending-up",lu);const du=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fu=P("triangle-alert",du);const pu=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],hu=P("triangle",pu);const mu=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],vu=P("trophy",mu);const xu=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],gu=P("truck",xu);const yu=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],wu=P("unlink",yu);const bu=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Cu=P("user",bu);const Mu=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],xo=P("users",Mu);const Su=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Eu=P("wifi",Su);const _u=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ru=P("wrench",_u);const ku=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pu=P("x",ku);const Nu=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Tu=P("zap",Nu);function Au({label:e,checked:t,invalid:n=!1,description:r,intermediate:o=!1,disabled:s,onChange:a,className:c,...u}){const f=o?i.jsx(fl,{className:"h-3 w-3"}):i.jsx(so,{className:"h-3 w-3"});return i.jsxs("label",{className:`inline-flex items-start gap-2.5 ${s?"cursor-not-allowed":"cursor-pointer"} ${c||""}`,children:[i.jsxs("span",{className:"relative inline-flex h-6 w-6 items-center justify-center rounded-md","aria-hidden":!0,children:[i.jsx("input",{...u,type:"checkbox",checked:t,disabled:s,onChange:a,className:"absolute inset-0 m-0 h-full w-full cursor-inherit opacity-0"}),i.jsx("span",{className:`pointer-events-none inline-flex h-[14px] w-[14px] items-center justify-center rounded-[3px] text-[10px] transition-colors ${n?"border border-red-500 bg-red-500/15 text-status-danger":t||o?"mt-surface-input-accent border border-input-accent-background-default text-white":"mt-surface-input-default text-transparent"} ${s?"opacity-45":""}`,children:(t||o)&&f})]}),(e||r)&&i.jsxs("span",{className:"flex min-w-0 flex-col",children:[e&&i.jsx("span",{className:`text-sm leading-5 ${s?"":"text-text-primary"}`,children:e}),r?i.jsx("span",{className:"text-xs text-text-muted",children:r}):null]})]})}function Er(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zt(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Er(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Er(e[o],null)}}}}function G(...e){return l.useCallback(zt(...e),e)}function $e(e){const t=ju(e),n=l.forwardRef((r,o)=>{const{children:s,...a}=r,c=l.Children.toArray(s),u=c.find(Iu);if(u){const f=u.props.children,p=c.map(d=>d===u?l.Children.count(f)>1?l.Children.only(null):l.isValidElement(f)?f.props.children:null:d);return i.jsx(t,{...a,ref:o,children:l.isValidElement(f)?l.cloneElement(f,void 0,p):null})}return i.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ju(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const a=Lu(o),c=Du(s,o.props);return o.type!==l.Fragment&&(c.ref=r?zt(r,a):a),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var go=Symbol("radix.slottable");function Ou(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=go,t}function Iu(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===go}function Du(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Lu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U=$u.reduce((e,t)=>{const n=$e(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:a,...c}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xn(e,t){e&&dt.flushSync(()=>e.dispatchEvent(t))}var yo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Fu="VisuallyHidden",qt=l.forwardRef((e,t)=>i.jsx(U.span,{...e,ref:t,style:{...yo,...e.style}}));qt.displayName=Fu;var Vu=qt;function Bu(e,t){const n=l.createContext(t),r=s=>{const{children:a,...c}=s,u=l.useMemo(()=>c,Object.values(c));return i.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(s){const a=l.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(s,a){const c=l.createContext(a),u=n.length;n=[...n,a];const f=d=>{const{scope:m,children:v,...g}=d,h=m?.[e]?.[u]||c,x=l.useMemo(()=>g,Object.values(g));return i.jsx(h.Provider,{value:x,children:v})};f.displayName=s+"Provider";function p(d,m){const v=m?.[e]?.[u]||c,g=l.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[f,p]}const o=()=>{const s=n.map(a=>l.createContext(a));return function(c){const u=c?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Hu(o,...t)]}function Hu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((c,{useScope:u,scopeName:f})=>{const d=u(s)[`__scope${f}`];return{...c,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Gt(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:x,children:y}=h,w=O.useRef(null),b=O.useRef(new Map).current;return i.jsx(o,{scope:x,itemMap:b,collectionRef:w,children:y})};a.displayName=t;const c=e+"CollectionSlot",u=$e(c),f=O.forwardRef((h,x)=>{const{scope:y,children:w}=h,b=s(c,y),C=G(x,b.collectionRef);return i.jsx(u,{ref:C,children:w})});f.displayName=c;const p=e+"CollectionItemSlot",d="data-radix-collection-item",m=$e(p),v=O.forwardRef((h,x)=>{const{scope:y,children:w,...b}=h,C=O.useRef(null),R=G(x,C),k=s(p,y);return O.useEffect(()=>(k.itemMap.set(C,{ref:C,...b}),()=>{k.itemMap.delete(C)})),i.jsx(m,{[d]:"",ref:R,children:w})});v.displayName=p;function g(h){const x=s(e+"CollectionConsumer",h);return O.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((k,_)=>b.indexOf(k.ref.current)-b.indexOf(_.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:f,ItemSlot:v},g,r]}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var te=globalThis?.document?l.useLayoutEffect:()=>{},Wu=l[" useInsertionEffect ".trim().toString()]||te;function Pe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=Uu({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const p=l.useRef(e!==void 0);l.useEffect(()=>{const d=p.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const f=l.useCallback(p=>{if(c){const d=Ku(p)?p(e):p;d!==e&&a.current?.(d)}else s(p)},[c,e,s,a]);return[u,f]}function Uu({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return Wu(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Ku(e){return typeof e=="function"}function zu(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Se=e=>{const{present:t,children:n}=e,r=qu(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=G(r.ref,Gu(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Se.displayName="Presence";function qu(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),a=e?"mounted":"unmounted",[c,u]=zu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const f=St(r.current);s.current=c==="mounted"?f:"none"},[c]),te(()=>{const f=r.current,p=o.current;if(p!==e){const m=s.current,v=St(f);e?u("MOUNT"):v==="none"||f?.display==="none"?u("UNMOUNT"):u(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),te(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,d=v=>{const h=St(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&h&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=v=>{v.target===t&&(s.current=St(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function St(e){return e?.animationName||"none"}function Gu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yu=l[" useId ".trim().toString()]||(()=>{}),Xu=0;function ge(e){const[t,n]=l.useState(Yu());return te(()=>{n(r=>r??String(Xu++))},[e]),t?`radix-${t}`:""}var Zu=l.createContext(void 0);function Zn(e){const t=l.useContext(Zu);return e||t||"ltr"}function ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ju(e,t=globalThis?.document){const n=ne(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Qu="DismissableLayer",An="dismissableLayer.update",ed="dismissableLayer.pointerDownOutside",td="dismissableLayer.focusOutside",_r,wo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Je=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,f=l.useContext(wo),[p,d]=l.useState(null),m=p?.ownerDocument??globalThis?.document,[,v]=l.useState({}),g=G(t,_=>d(_)),h=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),w=p?h.indexOf(p):-1,b=f.layersWithOutsidePointerEventsDisabled.size>0,C=w>=y,R=rd(_=>{const E=_.target,T=[...f.branches].some(L=>L.contains(E));!C||T||(o?.(_),a?.(_),_.defaultPrevented||c?.())},m),k=od(_=>{const E=_.target;[...f.branches].some(L=>L.contains(E))||(s?.(_),a?.(_),_.defaultPrevented||c?.())},m);return Ju(_=>{w===f.layers.size-1&&(r?.(_),!_.defaultPrevented&&c&&(_.preventDefault(),c()))},m),l.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(_r=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Rr(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=_r)}},[p,m,n,f]),l.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Rr())},[p,f]),l.useEffect(()=>{const _=()=>v({});return document.addEventListener(An,_),()=>document.removeEventListener(An,_)},[]),i.jsx(U.div,{...u,ref:g,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,k.onFocusCapture),onBlurCapture:j(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,R.onPointerDownCapture)})});Je.displayName=Qu;var nd="DismissableLayerBranch",bo=l.forwardRef((e,t)=>{const n=l.useContext(wo),r=l.useRef(null),o=G(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),i.jsx(U.div,{...e,ref:o})});bo.displayName=nd;function rd(e,t=globalThis?.document){const n=ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){Co(ed,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function od(e,t=globalThis?.document){const n=ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Co(td,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Rr(){const e=new CustomEvent(An);document.dispatchEvent(e)}function Co(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xn(o,s):o.dispatchEvent(s)}var sd=Je,ad=bo,gn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",kr={bubbles:!1,cancelable:!0},id="FocusScope",ft=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[c,u]=l.useState(null),f=ne(o),p=ne(s),d=l.useRef(null),m=G(t,h=>u(h)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let h=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?d.current=C:_e(d.current,{select:!0})},x=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||_e(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),w.disconnect()}}},[r,c,v.paused]),l.useEffect(()=>{if(c){Nr.add(v);const h=document.activeElement;if(!c.contains(h)){const y=new CustomEvent(gn,kr);c.addEventListener(gn,f),c.dispatchEvent(y),y.defaultPrevented||(cd(pd(Mo(c)),{select:!0}),document.activeElement===h&&_e(c))}return()=>{c.removeEventListener(gn,f),setTimeout(()=>{const y=new CustomEvent(yn,kr);c.addEventListener(yn,p),c.dispatchEvent(y),y.defaultPrevented||_e(h??document.body,{select:!0}),c.removeEventListener(yn,p),Nr.remove(v)},0)}}},[c,f,p,v]);const g=l.useCallback(h=>{if(!n&&!r||v.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const w=h.currentTarget,[b,C]=ld(w);b&&C?!h.shiftKey&&y===C?(h.preventDefault(),n&&_e(b,{select:!0})):h.shiftKey&&y===b&&(h.preventDefault(),n&&_e(C,{select:!0})):y===w&&h.preventDefault()}},[n,r,v.paused]);return i.jsx(U.div,{tabIndex:-1,...a,ref:m,onKeyDown:g})});ft.displayName=id;function cd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_e(r,{select:t}),document.activeElement!==n)return}function ld(e){const t=Mo(e),n=Pr(t,e),r=Pr(t.reverse(),e);return[n,r]}function Mo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pr(e,t){for(const n of e)if(!ud(n,{upTo:t}))return n}function ud(e,{upTo: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}function dd(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dd(e)&&t&&e.select()}}var Nr=fd();function fd(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Tr(e,t),e.unshift(t)},remove(t){e=Tr(e,t),e[0]?.resume()}}}function Tr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pd(e){return e.filter(t=>t.tagName!=="A")}var hd="Portal",Qe=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);te(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?eo.createPortal(i.jsx(U.div,{...r,ref:t}),a):null});Qe.displayName=hd;var wn=0;function Yt(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ar()),document.body.insertAdjacentElement("beforeend",e[1]??Ar()),wn++,()=>{wn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wn--}},[])}function Ar(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},me.apply(this,arguments)};function So(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function md(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var At="right-scroll-bar-position",jt="width-before-scroll-bar",vd="with-scroll-bars-hidden",xd="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gd(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var yd=typeof window<"u"?l.useLayoutEffect:l.useEffect,jr=new WeakMap;function wd(e,t){var n=gd(null,function(r){return e.forEach(function(o){return bn(o,r)})});return yd(function(){var r=jr.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(c){s.has(c)||bn(c,null)}),s.forEach(function(c){o.has(c)||bn(c,a)})}jr.set(n,e)},[e]),n}function bd(e){return e}function Cd(e,t){t===void 0&&(t=bd);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var u=function(){var p=a;a=[],p.forEach(s)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(p){a.push(p),f()},filter:function(p){return a=a.filter(p),n}}}};return o}function Md(e){e===void 0&&(e={});var t=Cd(null);return t.options=me({async:!0,ssr:!1},e),t}var Eo=function(e){var t=e.sideCar,n=So(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,me({},n))};Eo.isSideCarExport=!0;function Sd(e,t){return e.useMedium(t),Eo}var _o=Md(),Cn=function(){},Xt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),o=r[0],s=r[1],a=e.forwardProps,c=e.children,u=e.className,f=e.removeScrollBar,p=e.enabled,d=e.shards,m=e.sideCar,v=e.noRelative,g=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,C=So(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,k=wd([n,t]),_=me(me({},C),o);return l.createElement(l.Fragment,null,p&&l.createElement(R,{sideCar:_o,removeScrollBar:f,shards:d,noRelative:v,noIsolation:g,inert:h,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:b}),a?l.cloneElement(l.Children.only(c),me(me({},_),{ref:k})):l.createElement(w,me({},_,{className:u,ref:k}),c))});Xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xt.classNames={fullWidth:jt,zeroRight:At};var Ed=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _d(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ed();return t&&e.setAttribute("nonce",t),e}function Rd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_d())&&(Rd(t,n),kd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nd=function(){var e=Pd();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ro=function(){var e=Nd(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Td={left:0,top:0,right:0,gap:0},Mn=function(e){return parseInt(e||"",10)||0},Ad=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mn(n),Mn(r),Mn(o)]},jd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Td;var t=Ad(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Od=Ro(),qe="data-scroll-locked",Id=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
7
+ .`.concat(vd,` {
8
+ overflow: hidden `).concat(r,`;
9
+ padding-right: `).concat(c,"px ").concat(r,`;
10
+ }
11
+ body[`).concat(qe,`] {
12
+ overflow: hidden `).concat(r,`;
13
+ overscroll-behavior: contain;
14
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15
+ padding-left: `.concat(o,`px;
16
+ padding-top: `).concat(s,`px;
17
+ padding-right: `).concat(a,`px;
18
+ margin-left:0;
19
+ margin-top:0;
20
+ margin-right: `).concat(c,"px ").concat(r,`;
21
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
22
+ }
23
+
24
+ .`).concat(At,` {
25
+ right: `).concat(c,"px ").concat(r,`;
26
+ }
27
+
28
+ .`).concat(jt,` {
29
+ margin-right: `).concat(c,"px ").concat(r,`;
30
+ }
31
+
32
+ .`).concat(At," .").concat(At,` {
33
+ right: 0 `).concat(r,`;
34
+ }
35
+
36
+ .`).concat(jt," .").concat(jt,` {
37
+ margin-right: 0 `).concat(r,`;
38
+ }
39
+
40
+ body[`).concat(qe,`] {
41
+ `).concat(xd,": ").concat(c,`px;
42
+ }
43
+ `)},Or=function(){var e=parseInt(document.body.getAttribute(qe)||"0",10);return isFinite(e)?e:0},Dd=function(){l.useEffect(function(){return document.body.setAttribute(qe,(Or()+1).toString()),function(){var e=Or()-1;e<=0?document.body.removeAttribute(qe):document.body.setAttribute(qe,e.toString())}},[])},Ld=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Dd();var s=l.useMemo(function(){return jd(o)},[o]);return l.createElement(Od,{styles:Id(s,!t,o,n?"":"!important")})},jn=!1;if(typeof window<"u")try{var Et=Object.defineProperty({},"passive",{get:function(){return jn=!0,!0}});window.addEventListener("test",Et,Et),window.removeEventListener("test",Et,Et)}catch{jn=!1}var Ue=jn?{passive:!1}:!1,$d=function(e){return e.tagName==="TEXTAREA"},ko=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$d(e)&&n[t]==="visible")},Fd=function(e){return ko(e,"overflowY")},Vd=function(e){return ko(e,"overflowX")},Ir=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Po(e,r);if(o){var s=No(e,r),a=s[1],c=s[2];if(a>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Hd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Po=function(e,t){return e==="v"?Fd(t):Vd(t)},No=function(e,t){return e==="v"?Bd(t):Hd(t)},Wd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ud=function(e,t,n,r,o){var s=Wd(e,window.getComputedStyle(t).direction),a=s*r,c=n.target,u=t.contains(c),f=!1,p=a>0,d=0,m=0;do{if(!c)break;var v=No(e,c),g=v[0],h=v[1],x=v[2],y=h-x-s*g;(g||y)&&Po(e,c)&&(d+=y,m+=g);var w=c.parentNode;c=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(p&&Math.abs(d)<1||!p&&Math.abs(m)<1)&&(f=!0),f},_t=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dr=function(e){return[e.deltaX,e.deltaY]},Lr=function(e){return e&&"current"in e?e.current:e},Kd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zd=function(e){return`
44
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
45
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
+ `)},qd=0,Ke=[];function Gd(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(qd++)[0],s=l.useState(Ro)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=md([e.lockRef.current],(e.shards||[]).map(Lr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var y=_t(h),w=n.current,b="deltaX"in h?h.deltaX:w[0]-y[0],C="deltaY"in h?h.deltaY:w[1]-y[1],R,k=h.target,_=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in h&&_==="h"&&k.type==="range")return!1;var E=window.getSelection(),T=E&&E.anchorNode,L=T?T===k||T.contains(k):!1;if(L)return!1;var I=Ir(_,k);if(!I)return!0;if(I?R=_:(R=_==="v"?"h":"v",I=Ir(_,k)),!I)return!1;if(!r.current&&"changedTouches"in h&&(b||C)&&(r.current=R),!R)return!0;var B=r.current||R;return Ud(B,x,h,B==="h"?b:C)},[]),u=l.useCallback(function(h){var x=h;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var y="deltaY"in x?Dr(x):_t(x),w=t.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&Kd(R.delta,y)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var b=(a.current.shards||[]).map(Lr).filter(Boolean).filter(function(R){return R.contains(x.target)}),C=b.length>0?c(x,b[0]):!a.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),f=l.useCallback(function(h,x,y,w){var b={name:h,delta:x,target:y,should:w,shadowParent:Yd(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),p=l.useCallback(function(h){n.current=_t(h),r.current=void 0},[]),d=l.useCallback(function(h){f(h.type,Dr(h),h.target,c(h,e.lockRef.current))},[]),m=l.useCallback(function(h){f(h.type,_t(h),h.target,c(h,e.lockRef.current))},[]);l.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",p,Ue),function(){Ke=Ke.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",p,Ue)}},[]);var v=e.removeScrollBar,g=e.inert;return l.createElement(l.Fragment,null,g?l.createElement(s,{styles:zd(o)}):null,v?l.createElement(Ld,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xd=Sd(_o,Gd);var pt=l.forwardRef(function(e,t){return l.createElement(Xt,me({},e,{ref:t,sideCar:Xd}))});pt.classNames=Xt.classNames;var Zd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ze=new WeakMap,Rt=new WeakMap,kt={},Sn=0,To=function(e){return e&&(e.host||To(e.parentNode))},Jd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=To(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qd=function(e,t,n,r){var o=Jd(t,Array.isArray(e)?e:[e]);kt[n]||(kt[n]=new WeakMap);var s=kt[n],a=[],c=new Set,u=new Set(o),f=function(d){!d||c.has(d)||(c.add(d),f(d.parentNode))};o.forEach(f);var p=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(m){if(c.has(m))p(m);else try{var v=m.getAttribute(r),g=v!==null&&v!=="false",h=(ze.get(m)||0)+1,x=(s.get(m)||0)+1;ze.set(m,h),s.set(m,x),a.push(m),h===1&&g&&Rt.set(m,!0),x===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return p(t),c.clear(),Sn++,function(){a.forEach(function(d){var m=ze.get(d)-1,v=s.get(d)-1;ze.set(d,m),s.set(d,v),m||(Rt.has(d)||d.removeAttribute(r),Rt.delete(d)),v||d.removeAttribute(n)}),Sn--,Sn||(ze=new WeakMap,ze=new WeakMap,Rt=new WeakMap,kt={})}},Zt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qd(r,o,n,"aria-hidden")):function(){return null}};function ef(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function tf(e){const[t,n]=l.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,c;if("borderBoxSize"in s){const u=s.borderBoxSize,f=Array.isArray(u)?u[0]:u;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const nf=["top","right","bottom","left"],Ne=Math.min,ae=Math.max,Lt=Math.round,Pt=Math.floor,xe=e=>({x:e,y:e}),rf={left:"right",right:"left",bottom:"top",top:"bottom"};function On(e,t,n){return ae(e,Ne(t,n))}function Ce(e,t){return typeof e=="function"?e(t):e}function Me(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function Jn(e){return e==="x"?"y":"x"}function Qn(e){return e==="y"?"height":"width"}function ve(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function er(e){return Jn(ve(e))}function of(e,t,n){n===void 0&&(n=!1);const r=et(e),o=er(e),s=Qn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=$t(a)),[a,$t(a)]}function sf(e){const t=$t(e);return[In(e),t,In(t)]}function In(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const $r=["left","right"],Fr=["right","left"],af=["top","bottom"],cf=["bottom","top"];function lf(e,t,n){switch(e){case"top":case"bottom":return n?t?Fr:$r:t?$r:Fr;case"left":case"right":return t?af:cf;default:return[]}}function uf(e,t,n,r){const o=et(e);let s=lf(Me(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(In)))),s}function $t(e){const t=Me(e);return rf[t]+e.slice(t.length)}function df(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ao(e){return typeof e!="number"?df(e):{top:e,right:e,bottom:e,left:e}}function Ft(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Vr(e,t,n){let{reference:r,floating:o}=e;const s=ve(t),a=er(t),c=Qn(a),u=Me(t),f=s==="y",p=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let v;switch(u){case"top":v={x:p,y:r.y-o.height};break;case"bottom":v={x:p,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(et(t)){case"start":v[a]-=m*(n&&f?-1:1);break;case"end":v[a]+=m*(n&&f?-1:1);break}return v}async function ff(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:c,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=Ce(t,e),g=Ao(v),x=c[m?d==="floating"?"reference":"floating":d],y=Ft(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:u})),w=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},R=Ft(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:b,strategy:u}):w);return{top:(y.top-R.top+g.top)/C.y,bottom:(R.bottom-y.bottom+g.bottom)/C.y,left:(y.left-R.left+g.left)/C.x,right:(R.right-y.right+g.right)/C.x}}const pf=50,hf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:ff},u=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:d}=Vr(f,r,u),m=r,v=0;const g={};for(let h=0;h<s.length;h++){const x=s[h];if(!x)continue;const{name:y,fn:w}=x,{x:b,y:C,data:R,reset:k}=await w({x:p,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:f,platform:c,elements:{reference:e,floating:t}});p=b??p,d=C??d,g[y]={...g[y],...R},k&&v<pf&&(v++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(f=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:p,y:d}=Vr(f,m,u)),h=-1)}return{x:p,y:d,placement:m,strategy:o,middlewareData:g}},mf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:c,middlewareData:u}=t,{element:f,padding:p=0}=Ce(e,t)||{};if(f==null)return{};const d=Ao(p),m={x:n,y:r},v=er(o),g=Qn(v),h=await a.getDimensions(f),x=v==="y",y=x?"top":"left",w=x?"bottom":"right",b=x?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[v]-m[v]-s.floating[g],R=m[v]-s.reference[v],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let _=k?k[b]:0;(!_||!await(a.isElement==null?void 0:a.isElement(k)))&&(_=c.floating[b]||s.floating[g]);const E=C/2-R/2,T=_/2-h[g]/2-1,L=Ne(d[y],T),I=Ne(d[w],T),B=L,H=_-h[g]-I,S=_/2-h[g]/2+E,$=On(B,S,H),F=!u.arrow&&et(o)!=null&&S!==$&&s.reference[g]/2-(S<B?L:I)-h[g]/2<0,W=F?S<B?S-B:S-H:0;return{[v]:m[v]+W,data:{[v]:$,centerOffset:S-$-W,...F&&{alignmentOffset:W}},reset:F}}}),vf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:c,platform:u,elements:f}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=Ce(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Me(o),w=ve(c),b=Me(c)===c,C=await(u.isRTL==null?void 0:u.isRTL(f.floating)),R=m||(b||!h?[$t(c)]:sf(c)),k=g!=="none";!m&&k&&R.push(...uf(c,h,g,C));const _=[c,...R],E=await u.detectOverflow(t,x),T=[];let L=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&T.push(E[y]),d){const S=of(o,a,C);T.push(E[S[0]],E[S[1]])}if(L=[...L,{placement:o,overflows:T}],!T.every(S=>S<=0)){var I,B;const S=(((I=s.flip)==null?void 0:I.index)||0)+1,$=_[S];if($&&(!(d==="alignment"?w!==ve($):!1)||L.every(D=>ve(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:S,overflows:L},reset:{placement:$}};let F=(B=L.filter(W=>W.overflows[0]<=0).sort((W,D)=>W.overflows[1]-D.overflows[1])[0])==null?void 0:B.placement;if(!F)switch(v){case"bestFit":{var H;const W=(H=L.filter(D=>{if(k){const A=ve(D.placement);return A===w||A==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(A=>A>0).reduce((A,X)=>A+X,0)]).sort((D,A)=>D[1]-A[1])[0])==null?void 0:H[0];W&&(F=W);break}case"initialPlacement":F=c;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hr(e){return nf.some(t=>e[t]>=0)}const xf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=Ce(e,t);switch(o){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=Br(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Hr(c)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),c=Br(a,n.floating);return{data:{escapedOffsets:c,escaped:Hr(c)}}}default:return{}}}}},jo=new Set(["left","top"]);async function gf(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Me(n),c=et(n),u=ve(n)==="y",f=jo.has(a)?-1:1,p=s&&u?-1:1,d=Ce(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof g=="number"&&(v=c==="end"?g*-1:g),u?{x:v*p,y:m*f}:{x:m*f,y:v*p}}const yf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:c}=t,u=await gf(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},wf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:u={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...f}=Ce(e,t),p={x:n,y:r},d=await s.detectOverflow(t,f),m=ve(Me(o)),v=Jn(m);let g=p[v],h=p[m];if(a){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",b=g+d[y],C=g-d[w];g=On(b,g,C)}if(c){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=h+d[y],C=h-d[w];h=On(b,h,C)}const x=u.fn({...t,[v]:g,[m]:h});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:a,[m]:c}}}}}},bf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=Ce(e,t),p={x:n,y:r},d=ve(o),m=Jn(d);let v=p[m],g=p[d];const h=Ce(c,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const b=m==="y"?"height":"width",C=s.reference[m]-s.floating[b]+x.mainAxis,R=s.reference[m]+s.reference[b]-x.mainAxis;v<C?v=C:v>R&&(v=R)}if(f){var y,w;const b=m==="y"?"width":"height",C=jo.has(Me(o)),R=s.reference[d]-s.floating[b]+(C&&((y=a.offset)==null?void 0:y[d])||0)+(C?0:x.crossAxis),k=s.reference[d]+s.reference[b]+(C?0:((w=a.offset)==null?void 0:w[d])||0)-(C?x.crossAxis:0);g<R?g=R:g>k&&(g=k)}return{[m]:v,[d]:g}}}},Cf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:c}=t,{apply:u=()=>{},...f}=Ce(e,t),p=await a.detectOverflow(t,f),d=Me(o),m=et(o),v=ve(o)==="y",{width:g,height:h}=s.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(y=d,x=m==="end"?"top":"bottom");const w=h-p.top-p.bottom,b=g-p.left-p.right,C=Ne(h-p[x],w),R=Ne(g-p[y],b),k=!t.middlewareData.shift;let _=C,E=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=w),k&&!m){const L=ae(p.left,0),I=ae(p.right,0),B=ae(p.top,0),H=ae(p.bottom,0);v?E=g-2*(L!==0||I!==0?L+I:ae(p.left,p.right)):_=h-2*(B!==0||H!==0?B+H:ae(p.top,p.bottom))}await u({...t,availableWidth:E,availableHeight:_});const T=await a.getDimensions(c.floating);return g!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function tt(e){return Oo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(Oo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Oo(e){return Jt()?e instanceof Node||e instanceof ie(e).Node:!1}function fe(e){return Jt()?e instanceof Element||e instanceof ie(e).Element:!1}function Ee(e){return Jt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Wr(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function ht(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Mf(e){return/^(table|td|th)$/.test(tt(e))}function Qt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Sf=/transform|translate|scale|rotate|perspective|filter/,Ef=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none";let En;function tr(e){const t=fe(e)?pe(e):e;return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!nr()&&(Le(t.backdropFilter)||Le(t.filter))||Sf.test(t.willChange||"")||Ef.test(t.contain||"")}function _f(e){let t=Te(e);for(;Ee(t)&&!Xe(t);){if(tr(t))return t;if(Qt(t))return null;t=Te(t)}return null}function nr(){return En==null&&(En=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),En}function Xe(e){return/^(html|body|#document)$/.test(tt(e))}function pe(e){return ie(e).getComputedStyle(e)}function en(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wr(e)&&e.host||we(e);return Wr(t)?t.host:t}function Io(e){const t=Te(e);return Xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&ht(t)?t:Io(t)}function ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Io(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=ie(o);if(s){const c=Dn(a);return t.concat(a,a.visualViewport||[],ht(o)?o:[],c&&n?ct(c):[])}else return t.concat(o,ct(o,[],n))}function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Do(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Lt(n)!==s||Lt(r)!==a;return c&&(n=s,r=a),{width:n,height:r,$:c}}function rr(e){return fe(e)?e:e.contextElement}function Ge(e){const t=rr(e);if(!Ee(t))return xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Do(t);let a=(s?Lt(n.width):n.width)/r,c=(s?Lt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Rf=xe(0);function Lo(e){const t=ie(e);return!nr()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function Fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=rr(e);let a=xe(1);t&&(r?fe(r)&&(a=Ge(r)):a=Ge(e));const c=kf(s,n,r)?Lo(s):xe(0);let u=(o.left+c.x)/a.x,f=(o.top+c.y)/a.y,p=o.width/a.x,d=o.height/a.y;if(s){const m=ie(s),v=r&&fe(r)?ie(r):r;let g=m,h=Dn(g);for(;h&&r&&v!==g;){const x=Ge(h),y=h.getBoundingClientRect(),w=pe(h),b=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=y.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;u*=x.x,f*=x.y,p*=x.x,d*=x.y,u+=b,f+=C,g=ie(h),h=Dn(g)}}return Ft({width:p,height:d,x:u,y:f})}function tn(e,t){const n=en(e).scrollLeft;return t?t.left+n:Fe(we(e)).left+n}function $o(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-tn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Pf(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=we(r),c=t?Qt(t.floating):!1;if(r===a||c&&s)return n;let u={scrollLeft:0,scrollTop:0},f=xe(1);const p=xe(0),d=Ee(r);if((d||!d&&!s)&&((tt(r)!=="body"||ht(a))&&(u=en(r)),d)){const v=Fe(r);f=Ge(r),p.x=v.x+r.clientLeft,p.y=v.y+r.clientTop}const m=a&&!d&&!s?$o(a,u):xe(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+p.x+m.x,y:n.y*f.y-u.scrollTop*f.y+p.y+m.y}}function Nf(e){return Array.from(e.getClientRects())}function Tf(e){const t=we(e),n=en(e),r=e.ownerDocument.body,o=ae(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ae(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tn(e);const c=-n.scrollTop;return pe(r).direction==="rtl"&&(a+=ae(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:c}}const Ur=25;function Af(e,t){const n=ie(e),r=we(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,c=0,u=0;if(o){s=o.width,a=o.height;const p=nr();(!p||p&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const f=tn(r);if(f<=0){const p=r.ownerDocument,d=p.body,m=getComputedStyle(d),v=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-v);g<=Ur&&(s-=g)}else f<=Ur&&(s+=f);return{width:s,height:a,x:c,y:u}}function jf(e,t){const n=Fe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ee(e)?Ge(e):xe(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,f=r*s.y;return{width:a,height:c,x:u,y:f}}function Kr(e,t,n){let r;if(t==="viewport")r=Af(e,n);else if(t==="document")r=Tf(we(e));else if(fe(t))r=jf(t,n);else{const o=Lo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ft(r)}function Fo(e,t){const n=Te(e);return n===t||!fe(n)||Xe(n)?!1:pe(n).position==="fixed"||Fo(n,t)}function Of(e,t){const n=t.get(e);if(n)return n;let r=ct(e,[],!1).filter(c=>fe(c)&&tt(c)!=="body"),o=null;const s=pe(e).position==="fixed";let a=s?Te(e):e;for(;fe(a)&&!Xe(a);){const c=pe(a),u=tr(a);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ht(a)&&!u&&Fo(e,a))?r=r.filter(p=>p!==a):o=c,a=Te(a)}return t.set(e,r),r}function If(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Qt(t)?[]:Of(t,this._c):[].concat(n),r],c=Kr(t,a[0],o);let u=c.top,f=c.right,p=c.bottom,d=c.left;for(let m=1;m<a.length;m++){const v=Kr(t,a[m],o);u=ae(v.top,u),f=Ne(v.right,f),p=Ne(v.bottom,p),d=ae(v.left,d)}return{width:f-d,height:p-u,x:d,y:u}}function Df(e){const{width:t,height:n}=Do(e);return{width:t,height:n}}function Lf(e,t,n){const r=Ee(t),o=we(t),s=n==="fixed",a=Fe(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=xe(0);function f(){u.x=tn(o)}if(r||!r&&!s)if((tt(t)!=="body"||ht(o))&&(c=en(t)),r){const v=Fe(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&f();s&&!r&&o&&f();const p=o&&!r&&!s?$o(o,c):xe(0),d=a.left+c.scrollLeft-u.x-p.x,m=a.top+c.scrollTop-u.y-p.y;return{x:d,y:m,width:a.width,height:a.height}}function _n(e){return pe(e).position==="static"}function zr(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function Vo(e,t){const n=ie(e);if(Qt(e))return n;if(!Ee(e)){let o=Te(e);for(;o&&!Xe(o);){if(fe(o)&&!_n(o))return o;o=Te(o)}return n}let r=zr(e,t);for(;r&&Mf(r)&&_n(r);)r=zr(r,t);return r&&Xe(r)&&_n(r)&&!tr(r)?n:r||_f(e)||n}const $f=async function(e){const t=this.getOffsetParent||Vo,n=this.getDimensions,r=await n(e.floating);return{reference:Lf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ff(e){return pe(e).direction==="rtl"}const Vf={convertOffsetParentRelativeRectToViewportRelativeRect:Pf,getDocumentElement:we,getClippingRect:If,getOffsetParent:Vo,getElementRects:$f,getClientRects:Nf,getDimensions:Df,getScale:Ge,isElement:fe,isRTL:Ff};function Bo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bf(e,t){let n=null,r;const o=we(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const f=e.getBoundingClientRect(),{left:p,top:d,width:m,height:v}=f;if(c||t(),!m||!v)return;const g=Pt(d),h=Pt(o.clientWidth-(p+m)),x=Pt(o.clientHeight-(d+v)),y=Pt(p),b={rootMargin:-g+"px "+-h+"px "+-x+"px "+-y+"px",threshold:ae(0,Ne(1,u))||1};let C=!0;function R(k){const _=k[0].intersectionRatio;if(_!==u){if(!C)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!Bo(f,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(R,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,b)}n.observe(e)}return a(!0),s}function Hf(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=rr(e),p=o||s?[...f?ct(f):[],...t?ct(t):[]]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=f&&c?Bf(f,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(y=>{let[w]=y;w&&w.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),f&&!u&&v.observe(f),t&&v.observe(t));let g,h=u?Fe(e):null;u&&x();function x(){const y=Fe(e);h&&!Bo(h,y)&&n(),h=y,g=requestAnimationFrame(x)}return n(),()=>{var y;p.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d?.(),(y=v)==null||y.disconnect(),v=null,u&&cancelAnimationFrame(g)}}const Wf=yf,Uf=wf,Kf=vf,zf=Cf,qf=xf,qr=mf,Gf=bf,Yf=(e,t,n)=>{const r=new Map,o={platform:Vf,...n},s={...o.platform,_c:r};return hf(e,t,{...o,platform:s})};var Xf=typeof document<"u",Zf=function(){},Ot=Xf?O.useLayoutEffect:Zf;function Vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Vt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ho(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gr(e,t){const n=Ho(e);return Math.round(t*n)/n}function Rn(e){const t=l.useRef(e);return Ot(()=>{t.current=e}),t}function Jf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[p,d]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(r);Vt(m,r)||v(r);const[g,h]=l.useState(null),[x,y]=l.useState(null),w=l.useCallback(D=>{D!==k.current&&(k.current=D,h(D))},[]),b=l.useCallback(D=>{D!==_.current&&(_.current=D,y(D))},[]),C=s||g,R=a||x,k=l.useRef(null),_=l.useRef(null),E=l.useRef(p),T=u!=null,L=Rn(u),I=Rn(o),B=Rn(f),H=l.useCallback(()=>{if(!k.current||!_.current)return;const D={placement:t,strategy:n,middleware:m};I.current&&(D.platform=I.current),Yf(k.current,_.current,D).then(A=>{const X={...A,isPositioned:B.current!==!1};S.current&&!Vt(E.current,X)&&(E.current=X,dt.flushSync(()=>{d(X)}))})},[m,t,n,I,B]);Ot(()=>{f===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[f]);const S=l.useRef(!1);Ot(()=>(S.current=!0,()=>{S.current=!1}),[]),Ot(()=>{if(C&&(k.current=C),R&&(_.current=R),C&&R){if(L.current)return L.current(C,R,H);H()}},[C,R,H,L,T]);const $=l.useMemo(()=>({reference:k,floating:_,setReference:w,setFloating:b}),[w,b]),F=l.useMemo(()=>({reference:C,floating:R}),[C,R]),W=l.useMemo(()=>{const D={position:n,left:0,top:0};if(!F.floating)return D;const A=Gr(F.floating,p.x),X=Gr(F.floating,p.y);return c?{...D,transform:"translate("+A+"px, "+X+"px)",...Ho(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:X}},[n,c,F.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:H,refs:$,elements:F,floatingStyles:W}),[p,H,$,F,W])}const Qf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qr({element:r.current,padding:o}).fn(n):{}:r?qr({element:r,padding:o}).fn(n):{}}}},ep=(e,t)=>{const n=Wf(e);return{name:n.name,fn:n.fn,options:[e,t]}},tp=(e,t)=>{const n=Uf(e);return{name:n.name,fn:n.fn,options:[e,t]}},np=(e,t)=>({fn:Gf(e).fn,options:[e,t]}),rp=(e,t)=>{const n=Kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},op=(e,t)=>{const n=zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},sp=(e,t)=>{const n=qf(e);return{name:n.name,fn:n.fn,options:[e,t]}},ap=(e,t)=>{const n=Qf(e);return{name:n.name,fn:n.fn,options:[e,t]}};var ip="Arrow",Wo=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return i.jsx(U.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wo.displayName=ip;var cp=Wo,or="Popper",[Uo,He]=ye(or),[lp,Ko]=Uo(or),zo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return i.jsx(lp,{scope:t,anchor:r,onAnchorChange:o,children:n})};zo.displayName=or;var qo="PopperAnchor",Go=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ko(qo,n),a=l.useRef(null),c=G(t,a),u=l.useRef(null);return l.useEffect(()=>{const f=u.current;u.current=r?.current||a.current,f!==u.current&&s.onAnchorChange(u.current)}),r?null:i.jsx(U.div,{...o,ref:c})});Go.displayName=qo;var sr="PopperContent",[up,dp]=Uo(sr),Yo=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:g,...h}=e,x=Ko(sr,n),[y,w]=l.useState(null),b=G(t,N=>w(N)),[C,R]=l.useState(null),k=tf(C),_=k?.width??0,E=k?.height??0,T=r+(s!=="center"?"-"+s:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(f)?f:[f],B=I.length>0,H={padding:L,boundary:I.filter(pp),altBoundary:B},{refs:S,floatingStyles:$,placement:F,isPositioned:W,middlewareData:D}=Jf({strategy:"fixed",placement:T,whileElementsMounted:(...N)=>Hf(...N,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[ep({mainAxis:o+E,alignmentAxis:a}),u&&tp({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?np():void 0,...H}),u&&rp({...H}),op({...H,apply:({elements:N,rects:q,availableWidth:Q,availableHeight:Y})=>{const{width:Z,height:J}=q.reference,ce=N.floating.style;ce.setProperty("--radix-popper-available-width",`${Q}px`),ce.setProperty("--radix-popper-available-height",`${Y}px`),ce.setProperty("--radix-popper-anchor-width",`${Z}px`),ce.setProperty("--radix-popper-anchor-height",`${J}px`)}}),C&&ap({element:C,padding:c}),hp({arrowWidth:_,arrowHeight:E}),m&&sp({strategy:"referenceHidden",...H})]}),[A,X]=Jo(F),M=ne(g);te(()=>{W&&M?.()},[W,M]);const V=D.arrow?.x,K=D.arrow?.y,z=D.arrow?.centerOffset!==0,[se,ee]=l.useState();return te(()=>{y&&ee(window.getComputedStyle(y).zIndex)},[y]),i.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:W?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(up,{scope:n,placedSide:A,onArrowChange:R,arrowX:V,arrowY:K,shouldHideArrow:z,children:i.jsx(U.div,{"data-side":A,"data-align":X,...h,ref:b,style:{...h.style,animation:W?void 0:"none"}})})})});Yo.displayName=sr;var Xo="PopperArrow",fp={top:"bottom",right:"left",bottom:"top",left:"right"},Zo=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=dp(Xo,r),a=fp[s.placedSide];return i.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:i.jsx(cp,{...o,ref:n,style:{...o.style,display:"block"}})})});Zo.displayName=Xo;function pp(e){return e!==null}var hp=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[f,p]=Jo(n),d={start:"0%",center:"50%",end:"100%"}[p],m=(o.arrow?.x??0)+c/2,v=(o.arrow?.y??0)+u/2;let g="",h="";return f==="bottom"?(g=a?d:`${m}px`,h=`${-u}px`):f==="top"?(g=a?d:`${m}px`,h=`${r.floating.height+u}px`):f==="right"?(g=`${-u}px`,h=a?d:`${v}px`):f==="left"&&(g=`${r.floating.width+u}px`,h=a?d:`${v}px`),{data:{x:g,y:h}}}});function Jo(e){const[t,n="center"]=e.split("-");return[t,n]}var mt=zo,vt=Go,nn=Yo,rn=Zo,kn="rovingFocusGroup.onEntryFocus",mp={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[Ln,Qo,vp]=Gt(xt),[xp,es]=ye(xt,[vp]),[gp,yp]=xp(xt),ts=l.forwardRef((e,t)=>i.jsx(Ln.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Ln.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(wp,{...e,ref:t})})}));ts.displayName=xt;var wp=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...d}=e,m=l.useRef(null),v=G(t,m),g=Zn(s),[h,x]=Pe({prop:a,defaultProp:c??null,onChange:u,caller:xt}),[y,w]=l.useState(!1),b=ne(f),C=Qo(n),R=l.useRef(!1),[k,_]=l.useState(0);return l.useEffect(()=>{const E=m.current;if(E)return E.addEventListener(kn,b),()=>E.removeEventListener(kn,b)},[b]),i.jsx(gp,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:l.useCallback(E=>x(E),[x]),onItemShiftTab:l.useCallback(()=>w(!0),[]),onFocusableItemAdd:l.useCallback(()=>_(E=>E+1),[]),onFocusableItemRemove:l.useCallback(()=>_(E=>E-1),[]),children:i.jsx(U.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{R.current=!0}),onFocus:j(e.onFocus,E=>{const T=!R.current;if(E.target===E.currentTarget&&T&&!y){const L=new CustomEvent(kn,mp);if(E.currentTarget.dispatchEvent(L),!L.defaultPrevented){const I=C().filter(F=>F.focusable),B=I.find(F=>F.active),H=I.find(F=>F.id===h),$=[B,H,...I].filter(Boolean).map(F=>F.ref.current);os($,p)}}R.current=!1}),onBlur:j(e.onBlur,()=>w(!1))})})}),ns="RovingFocusGroupItem",rs=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...c}=e,u=ge(),f=s||u,p=yp(ns,n),d=p.currentTabStopId===f,m=Qo(n),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:h}=p;return l.useEffect(()=>{if(r)return v(),()=>g()},[r,v,g]),i.jsx(Ln.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:i.jsx(U.span,{tabIndex:d?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:j(e.onMouseDown,x=>{r?p.onItemFocus(f):x.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:j(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Mp(x,p.orientation,p.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=m().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const C=b.indexOf(x.currentTarget);b=p.loop?Sp(b,C+1):b.slice(C+1)}setTimeout(()=>os(b))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:h!=null}):a})})});rs.displayName=ns;var bp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mp(e,t,n){const r=Cp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return bp[r]}function os(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Sp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ep=ts,_p=rs,$n=["Enter"," "],Rp=["ArrowDown","PageUp","Home"],ss=["ArrowUp","PageDown","End"],kp=[...Rp,...ss],Pp={ltr:[...$n,"ArrowRight"],rtl:[...$n,"ArrowLeft"]},Np={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gt="Menu",[lt,Tp,Ap]=Gt(gt),[We,on]=ye(gt,[Ap,He,es]),yt=He(),as=es(),[is,Ae]=We(gt),[jp,wt]=We(gt),cs=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,c=yt(t),[u,f]=l.useState(null),p=l.useRef(!1),d=ne(s),m=Zn(o);return l.useEffect(()=>{const v=()=>{p.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>p.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(mt,{...c,children:i.jsx(is,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:f,children:i.jsx(jp,{scope:t,onClose:l.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:p,dir:m,modal:a,children:r})})})};cs.displayName=gt;var Op="MenuAnchor",ar=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return i.jsx(vt,{...o,...r,ref:t})});ar.displayName=Op;var ir="MenuPortal",[Ip,ls]=We(ir,{forceMount:void 0}),us=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ae(ir,t);return i.jsx(Ip,{scope:t,forceMount:n,children:i.jsx(Se,{present:n||s.open,children:i.jsx(Qe,{asChild:!0,container:o,children:r})})})};us.displayName=ir;var le="MenuContent",[Dp,cr]=We(le),ds=l.forwardRef((e,t)=>{const n=ls(le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ae(le,e.__scopeMenu),a=wt(le,e.__scopeMenu);return i.jsx(lt.Provider,{scope:e.__scopeMenu,children:i.jsx(Se,{present:r||s.open,children:i.jsx(lt.Slot,{scope:e.__scopeMenu,children:a.modal?i.jsx(Lp,{...o,ref:t}):i.jsx($p,{...o,ref:t})})})})}),Lp=l.forwardRef((e,t)=>{const n=Ae(le,e.__scopeMenu),r=l.useRef(null),o=G(t,r);return l.useEffect(()=>{const s=r.current;if(s)return Zt(s)},[]),i.jsx(lr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$p=l.forwardRef((e,t)=>{const n=Ae(le,e.__scopeMenu);return i.jsx(lr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fp=$e("MenuContent.ScrollLock"),lr=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=Ae(le,n),y=wt(le,n),w=yt(n),b=as(n),C=Tp(n),[R,k]=l.useState(null),_=l.useRef(null),E=G(t,_,x.onContentChange),T=l.useRef(0),L=l.useRef(""),I=l.useRef(0),B=l.useRef(null),H=l.useRef("right"),S=l.useRef(0),$=g?pt:l.Fragment,F=g?{as:Fp,allowPinchZoom:!0}:void 0,W=A=>{const X=L.current+A,M=C().filter(N=>!N.disabled),V=document.activeElement,K=M.find(N=>N.ref.current===V)?.textValue,z=M.map(N=>N.textValue),se=Zp(z,X,K),ee=M.find(N=>N.textValue===se)?.ref.current;(function N(q){L.current=q,window.clearTimeout(T.current),q!==""&&(T.current=window.setTimeout(()=>N(""),1e3))})(X),ee&&setTimeout(()=>ee.focus())};l.useEffect(()=>()=>window.clearTimeout(T.current),[]),Yt();const D=l.useCallback(A=>H.current===B.current?.side&&Qp(A,B.current?.area),[]);return i.jsx(Dp,{scope:n,searchRef:L,onItemEnter:l.useCallback(A=>{D(A)&&A.preventDefault()},[D]),onItemLeave:l.useCallback(A=>{D(A)||(_.current?.focus(),k(null))},[D]),onTriggerLeave:l.useCallback(A=>{D(A)&&A.preventDefault()},[D]),pointerGraceTimerRef:I,onPointerGraceIntentChange:l.useCallback(A=>{B.current=A},[]),children:i.jsx($,{...F,children:i.jsx(ft,{asChild:!0,trapped:o,onMountAutoFocus:j(s,A=>{A.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:i.jsx(Je,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:i.jsx(Ep,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:k,onEntryFocus:j(u,A=>{y.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(nn,{role:"menu","aria-orientation":"vertical","data-state":ks(x.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:j(h.onKeyDown,A=>{const M=A.target.closest("[data-radix-menu-content]")===A.currentTarget,V=A.ctrlKey||A.altKey||A.metaKey,K=A.key.length===1;M&&(A.key==="Tab"&&A.preventDefault(),!V&&K&&W(A.key));const z=_.current;if(A.target!==z||!kp.includes(A.key))return;A.preventDefault();const ee=C().filter(N=>!N.disabled).map(N=>N.ref.current);ss.includes(A.key)&&ee.reverse(),Yp(ee)}),onBlur:j(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(T.current),L.current="")}),onPointerMove:j(e.onPointerMove,ut(A=>{const X=A.target,M=S.current!==A.clientX;if(A.currentTarget.contains(X)&&M){const V=A.clientX>S.current?"right":"left";H.current=V,S.current=A.clientX}}))})})})})})})});ds.displayName=le;var Vp="MenuGroup",ur=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(U.div,{role:"group",...r,ref:t})});ur.displayName=Vp;var Bp="MenuLabel",fs=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(U.div,{...r,ref:t})});fs.displayName=Bp;var Bt="MenuItem",Yr="menu.itemSelect",sn=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),a=wt(Bt,e.__scopeMenu),c=cr(Bt,e.__scopeMenu),u=G(t,s),f=l.useRef(!1),p=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Yr,{bubbles:!0,cancelable:!0});d.addEventListener(Yr,v=>r?.(v),{once:!0}),Xn(d,m),m.defaultPrevented?f.current=!1:a.onClose()}};return i.jsx(ps,{...o,ref:u,disabled:n,onClick:j(e.onClick,p),onPointerDown:d=>{e.onPointerDown?.(d),f.current=!0},onPointerUp:j(e.onPointerUp,d=>{f.current||d.currentTarget?.click()}),onKeyDown:j(e.onKeyDown,d=>{const m=c.searchRef.current!=="";n||m&&d.key===" "||$n.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});sn.displayName=Bt;var ps=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=cr(Bt,n),c=as(n),u=l.useRef(null),f=G(t,u),[p,d]=l.useState(!1),[m,v]=l.useState("");return l.useEffect(()=>{const g=u.current;g&&v((g.textContent??"").trim())},[s.children]),i.jsx(lt.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:i.jsx(_p,{asChild:!0,...c,focusable:!r,children:i.jsx(U.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:f,onPointerMove:j(e.onPointerMove,ut(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,ut(g=>a.onItemLeave(g))),onFocus:j(e.onFocus,()=>d(!0)),onBlur:j(e.onBlur,()=>d(!1))})})})}),Hp="MenuCheckboxItem",hs=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(ys,{scope:e.__scopeMenu,checked:n,children:i.jsx(sn,{role:"menuitemcheckbox","aria-checked":Ht(n)?"mixed":n,...o,ref:t,"data-state":pr(n),onSelect:j(o.onSelect,()=>r?.(Ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hs.displayName=Hp;var ms="MenuRadioGroup",[Wp,Up]=We(ms,{value:void 0,onValueChange:()=>{}}),vs=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ne(r);return i.jsx(Wp,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(ur,{...o,ref:t})})});vs.displayName=ms;var xs="MenuRadioItem",gs=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Up(xs,e.__scopeMenu),s=n===o.value;return i.jsx(ys,{scope:e.__scopeMenu,checked:s,children:i.jsx(sn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":pr(s),onSelect:j(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});gs.displayName=xs;var dr="MenuItemIndicator",[ys,Kp]=We(dr,{checked:!1}),ws=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Kp(dr,n);return i.jsx(Se,{present:r||Ht(s.checked)||s.checked===!0,children:i.jsx(U.span,{...o,ref:t,"data-state":pr(s.checked)})})});ws.displayName=dr;var zp="MenuSeparator",bs=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(U.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bs.displayName=zp;var qp="MenuArrow",Cs=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yt(n);return i.jsx(rn,{...o,...r,ref:t})});Cs.displayName=qp;var fr="MenuSub",[Gp,Ms]=We(fr),Ss=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ae(fr,t),a=yt(t),[c,u]=l.useState(null),[f,p]=l.useState(null),d=ne(o);return l.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),i.jsx(mt,{...a,children:i.jsx(is,{scope:t,open:r,onOpenChange:d,content:f,onContentChange:p,children:i.jsx(Gp,{scope:t,contentId:ge(),triggerId:ge(),trigger:c,onTriggerChange:u,children:n})})})};Ss.displayName=fr;var at="MenuSubTrigger",Es=l.forwardRef((e,t)=>{const n=Ae(at,e.__scopeMenu),r=wt(at,e.__scopeMenu),o=Ms(at,e.__scopeMenu),s=cr(at,e.__scopeMenu),a=l.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,f={__scopeMenu:e.__scopeMenu},p=l.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return l.useEffect(()=>p,[p]),l.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),u(null)}},[c,u]),i.jsx(ar,{asChild:!0,...f,children:i.jsx(ps,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ks(n.open),...e,ref:zt(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,ut(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:j(e.onPointerLeave,ut(d=>{p();const m=n.content?.getBoundingClientRect();if(m){const v=n.content?.dataset.side,g=v==="right",h=g?-5:5,x=m[g?"left":"right"],y=m[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x,y:m.top},{x:y,y:m.top},{x:y,y:m.bottom},{x,y:m.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,d=>{const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||Pp[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Es.displayName=at;var _s="MenuSubContent",Rs=l.forwardRef((e,t)=>{const n=ls(le,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ae(le,e.__scopeMenu),a=wt(le,e.__scopeMenu),c=Ms(_s,e.__scopeMenu),u=l.useRef(null),f=G(t,u);return i.jsx(lt.Provider,{scope:e.__scopeMenu,children:i.jsx(Se,{present:r||s.open,children:i.jsx(lt.Slot,{scope:e.__scopeMenu,children:i.jsx(lr,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{a.isUsingKeyboardRef.current&&u.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:j(e.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:j(e.onKeyDown,p=>{const d=p.currentTarget.contains(p.target),m=Np[a.dir].includes(p.key);d&&m&&(s.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});Rs.displayName=_s;function ks(e){return e?"open":"closed"}function Ht(e){return e==="indeterminate"}function pr(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function Yp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zp(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Xp(e,Math.max(s,0));o.length===1&&(a=a.filter(f=>f!==n));const u=a.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Jp(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],u=t[a],f=c.x,p=c.y,d=u.x,m=u.y;p>r!=m>r&&n<(d-f)*(r-p)/(m-p)+f&&(o=!o)}return o}function Qp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jp(n,t)}function ut(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ps=cs,Ns=ar,Ts=us,As=ds,js=ur,Os=fs,Is=sn,Ds=hs,Ls=vs,$s=gs,Fs=ws,Vs=bs,Bs=Cs,eh=Ss,Hs=Es,Ws=Rs,hr="ContextMenu",[th]=ye(hr,[on]),re=on(),[nh,Us]=th(hr),Ks=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[a,c]=l.useState(!1),u=re(t),f=ne(r),p=l.useCallback(d=>{c(d),f(d)},[f]);return i.jsx(nh,{scope:t,open:a,onOpenChange:p,modal:s,children:i.jsx(Ps,{...u,dir:o,open:a,onOpenChange:p,modal:s,children:n})})};Ks.displayName=hr;var zs="ContextMenuTrigger",qs=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=Us(zs,n),a=re(n),c=l.useRef({x:0,y:0}),u=l.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),f=l.useRef(0),p=l.useCallback(()=>window.clearTimeout(f.current),[]),d=m=>{c.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return l.useEffect(()=>p,[p]),l.useEffect(()=>{r&&p()},[r,p]),i.jsxs(i.Fragment,{children:[i.jsx(Ns,{...a,virtualRef:u}),i.jsx(U.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,m=>{p(),d(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,Nt(m=>{p(),f.current=window.setTimeout(()=>d(m),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,Nt(p)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,Nt(p)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,Nt(p))})]})});qs.displayName=zs;var rh="ContextMenuPortal",Gs=e=>{const{__scopeContextMenu:t,...n}=e,r=re(t);return i.jsx(Ts,{...r,...n})};Gs.displayName=rh;var Ys="ContextMenuContent",Xs=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Us(Ys,n),s=re(n),a=l.useRef(!1);return i.jsx(As,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&a.current&&c.preventDefault(),a.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(a.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xs.displayName=Ys;var oh="ContextMenuGroup",sh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(js,{...o,...r,ref:t})});sh.displayName=oh;var ah="ContextMenuLabel",ih=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Os,{...o,...r,ref:t})});ih.displayName=ah;var ch="ContextMenuItem",Zs=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Is,{...o,...r,ref:t})});Zs.displayName=ch;var lh="ContextMenuCheckboxItem",uh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Ds,{...o,...r,ref:t})});uh.displayName=lh;var dh="ContextMenuRadioGroup",fh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Ls,{...o,...r,ref:t})});fh.displayName=dh;var ph="ContextMenuRadioItem",hh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx($s,{...o,...r,ref:t})});hh.displayName=ph;var mh="ContextMenuItemIndicator",vh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Fs,{...o,...r,ref:t})});vh.displayName=mh;var xh="ContextMenuSeparator",Js=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Vs,{...o,...r,ref:t})});Js.displayName=xh;var gh="ContextMenuArrow",yh=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Bs,{...o,...r,ref:t})});yh.displayName=gh;var Qs="ContextMenuSub",ea=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,a=re(t),[c,u]=Pe({prop:o,defaultProp:s??!1,onChange:r,caller:Qs});return i.jsx(eh,{...a,open:c,onOpenChange:u,children:n})};ea.displayName=Qs;var wh="ContextMenuSubTrigger",ta=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Hs,{...o,...r,ref:t})});ta.displayName=wh;var bh="ContextMenuSubContent",na=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=re(n);return i.jsx(Ws,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});na.displayName=bh;function Nt(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Ch=Ks,Mh=qs,ra=Gs,Sh=Xs,Eh=Zs,oa=Js,_h=ea,Rh=ta,kh=na,an="DropdownMenu",[Ph]=ye(an,[on]),oe=on(),[Nh,sa]=Ph(an),aa=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,u=oe(t),f=l.useRef(null),[p,d]=Pe({prop:o,defaultProp:s??!1,onChange:a,caller:an});return i.jsx(Nh,{scope:t,triggerId:ge(),triggerRef:f,contentId:ge(),open:p,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(m=>!m),[d]),modal:c,children:i.jsx(Ps,{...u,open:p,onOpenChange:d,dir:r,modal:c,children:n})})};aa.displayName=an;var ia="DropdownMenuTrigger",ca=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=sa(ia,n),a=oe(n);return i.jsx(Ns,{asChild:!0,...a,children:i.jsx(U.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:zt(t,s.triggerRef),onPointerDown:j(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:j(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ca.displayName=ia;var Th="DropdownMenuPortal",la=e=>{const{__scopeDropdownMenu:t,...n}=e,r=oe(t);return i.jsx(Ts,{...r,...n})};la.displayName=Th;var ua="DropdownMenuContent",da=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=sa(ua,n),s=oe(n),a=l.useRef(!1);return i.jsx(As,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,c=>{a.current||o.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:j(e.onInteractOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,p=u.button===2||f;(!o.modal||p)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});da.displayName=ua;var Ah="DropdownMenuGroup",jh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(js,{...o,...r,ref:t})});jh.displayName=Ah;var Oh="DropdownMenuLabel",Ih=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Os,{...o,...r,ref:t})});Ih.displayName=Oh;var Dh="DropdownMenuItem",fa=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Is,{...o,...r,ref:t})});fa.displayName=Dh;var Lh="DropdownMenuCheckboxItem",$h=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Ds,{...o,...r,ref:t})});$h.displayName=Lh;var Fh="DropdownMenuRadioGroup",Vh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Ls,{...o,...r,ref:t})});Vh.displayName=Fh;var Bh="DropdownMenuRadioItem",Hh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx($s,{...o,...r,ref:t})});Hh.displayName=Bh;var Wh="DropdownMenuItemIndicator",Uh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Fs,{...o,...r,ref:t})});Uh.displayName=Wh;var Kh="DropdownMenuSeparator",zh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Vs,{...o,...r,ref:t})});zh.displayName=Kh;var qh="DropdownMenuArrow",Gh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Bs,{...o,...r,ref:t})});Gh.displayName=qh;var Yh="DropdownMenuSubTrigger",Xh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Hs,{...o,...r,ref:t})});Xh.displayName=Yh;var Zh="DropdownMenuSubContent",Jh=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oe(n);return i.jsx(Ws,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jh.displayName=Zh;var Qh=aa,em=ca,tm=la,nm=da,rm=fa;function Xr(e,[t,n]){return Math.min(n,Math.max(t,e))}var cn="Popover",[pa]=ye(cn,[He]),bt=He(),[om,je]=pa(cn),ha=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,c=bt(t),u=l.useRef(null),[f,p]=l.useState(!1),[d,m]=Pe({prop:r,defaultProp:o??!1,onChange:s,caller:cn});return i.jsx(mt,{...c,children:i.jsx(om,{scope:t,contentId:ge(),triggerRef:u,open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(v=>!v),[m]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>p(!0),[]),onCustomAnchorRemove:l.useCallback(()=>p(!1),[]),modal:a,children:n})})};ha.displayName=cn;var ma="PopoverAnchor",sm=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=je(ma,n),s=bt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=o;return l.useEffect(()=>(a(),()=>c()),[a,c]),i.jsx(vt,{...s,...r,ref:t})});sm.displayName=ma;var va="PopoverTrigger",xa=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=je(va,n),s=bt(n),a=G(t,o.triggerRef),c=i.jsx(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ma(o.open),...r,ref:a,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:i.jsx(vt,{asChild:!0,...s,children:c})});xa.displayName=va;var mr="PopoverPortal",[am,im]=pa(mr,{forceMount:void 0}),ga=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=je(mr,t);return i.jsx(am,{scope:t,forceMount:n,children:i.jsx(Se,{present:n||s.open,children:i.jsx(Qe,{asChild:!0,container:o,children:r})})})};ga.displayName=mr;var Ze="PopoverContent",ya=l.forwardRef((e,t)=>{const n=im(Ze,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=je(Ze,e.__scopePopover);return i.jsx(Se,{present:r||s.open,children:s.modal?i.jsx(lm,{...o,ref:t}):i.jsx(um,{...o,ref:t})})});ya.displayName=Ze;var cm=$e("PopoverContent.RemoveScroll"),lm=l.forwardRef((e,t)=>{const n=je(Ze,e.__scopePopover),r=l.useRef(null),o=G(t,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return Zt(a)},[]),i.jsx(pt,{as:cm,allowPinchZoom:!0,children:i.jsx(wa,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),um=l.forwardRef((e,t)=>{const n=je(Ze,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return i.jsx(wa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),wa=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,...d}=e,m=je(Ze,n),v=bt(n);return Yt(),i.jsx(ft,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:i.jsx(Je,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>m.onOpenChange(!1),children:i.jsx(nn,{"data-state":Ma(m.open),role:"dialog",id:m.contentId,...v,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ba="PopoverClose",dm=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=je(ba,n);return i.jsx(U.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});dm.displayName=ba;var fm="PopoverArrow",Ca=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bt(n);return i.jsx(rn,{...o,...r,ref:t})});Ca.displayName=fm;function Ma(e){return e?"open":"closed"}var Sa=ha,Ea=xa,_a=ga,Ra=ya,pm=Ca,hm=[" ","Enter","ArrowUp","ArrowDown"],mm=[" ","Enter"],Ve="Select",[ln,un,vm]=Gt(Ve),[nt]=ye(Ve,[vm,He]),dn=He(),[xm,Oe]=nt(Ve),[gm,ym]=nt(Ve),ka=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:c,onValueChange:u,dir:f,name:p,autoComplete:d,disabled:m,required:v,form:g}=e,h=dn(t),[x,y]=l.useState(null),[w,b]=l.useState(null),[C,R]=l.useState(!1),k=Zn(f),[_,E]=Pe({prop:r,defaultProp:o??!1,onChange:s,caller:Ve}),[T,L]=Pe({prop:a,defaultProp:c,onChange:u,caller:Ve}),I=l.useRef(null),B=x?g||!!x.closest("form"):!0,[H,S]=l.useState(new Set),$=Array.from(H).map(F=>F.props.value).join(";");return i.jsx(mt,{...h,children:i.jsxs(xm,{required:v,scope:t,trigger:x,onTriggerChange:y,valueNode:w,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:R,contentId:ge(),value:T,onValueChange:L,open:_,onOpenChange:E,dir:k,triggerPointerDownPosRef:I,disabled:m,children:[i.jsx(ln.Provider,{scope:t,children:i.jsx(gm,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(F=>{S(W=>new Set(W).add(F))},[]),onNativeOptionRemove:l.useCallback(F=>{S(W=>{const D=new Set(W);return D.delete(F),D})},[]),children:n})}),B?i.jsxs(Xa,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:d,value:T,onChange:F=>L(F.target.value),disabled:m,form:g,children:[T===void 0?i.jsx("option",{value:""}):null,Array.from(H)]},$):null]})})};ka.displayName=Ve;var Pa="SelectTrigger",Na=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=dn(n),a=Oe(Pa,n),c=a.disabled||r,u=G(t,a.onTriggerChange),f=un(n),p=l.useRef("touch"),[d,m,v]=Ja(h=>{const x=f().filter(b=>!b.disabled),y=x.find(b=>b.value===a.value),w=Qa(x,h,y);w!==void 0&&a.onValueChange(w.value)}),g=h=>{c||(a.onOpenChange(!0),v()),h&&(a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return i.jsx(vt,{asChild:!0,...s,children:i.jsx(U.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Za(a.value)?"":void 0,...o,ref:u,onClick:j(o.onClick,h=>{h.currentTarget.focus(),p.current!=="mouse"&&g(h)}),onPointerDown:j(o.onPointerDown,h=>{p.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(g(h),h.preventDefault())}),onKeyDown:j(o.onKeyDown,h=>{const x=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(x&&h.key===" ")&&hm.includes(h.key)&&(g(),h.preventDefault())})})})});Na.displayName=Pa;var Ta="SelectValue",Aa=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...c}=e,u=Oe(Ta,n),{onValueNodeHasChildrenChange:f}=u,p=s!==void 0,d=G(t,u.onValueNodeChange);return te(()=>{f(p)},[f,p]),i.jsx(U.span,{...c,ref:d,style:{pointerEvents:"none"},children:Za(u.value)?i.jsx(i.Fragment,{children:a}):s})});Aa.displayName=Ta;var wm="SelectIcon",bm=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return i.jsx(U.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bm.displayName=wm;var Cm="SelectPortal",ja=e=>i.jsx(Qe,{asChild:!0,...e});ja.displayName=Cm;var Be="SelectContent",Oa=l.forwardRef((e,t)=>{const n=Oe(Be,e.__scopeSelect),[r,o]=l.useState();if(te(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?dt.createPortal(i.jsx(Ia,{scope:e.__scopeSelect,children:i.jsx(ln.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),s):null}return i.jsx(Da,{...e,ref:t})});Oa.displayName=Be;var ue=10,[Ia,Ie]=nt(Be),Mm="SelectContentImpl",Sm=$e("SelectContent.RemoveScroll"),Da=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:g,hideWhenDetached:h,avoidCollisions:x,...y}=e,w=Oe(Be,n),[b,C]=l.useState(null),[R,k]=l.useState(null),_=G(t,N=>C(N)),[E,T]=l.useState(null),[L,I]=l.useState(null),B=un(n),[H,S]=l.useState(!1),$=l.useRef(!1);l.useEffect(()=>{if(b)return Zt(b)},[b]),Yt();const F=l.useCallback(N=>{const[q,...Q]=B().map(J=>J.ref.current),[Y]=Q.slice(-1),Z=document.activeElement;for(const J of N)if(J===Z||(J?.scrollIntoView({block:"nearest"}),J===q&&R&&(R.scrollTop=0),J===Y&&R&&(R.scrollTop=R.scrollHeight),J?.focus(),document.activeElement!==Z))return},[B,R]),W=l.useCallback(()=>F([E,b]),[F,E,b]);l.useEffect(()=>{H&&W()},[H,W]);const{onOpenChange:D,triggerPointerDownPosRef:A}=w;l.useEffect(()=>{if(b){let N={x:0,y:0};const q=Y=>{N={x:Math.abs(Math.round(Y.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(Y.pageY)-(A.current?.y??0))}},Q=Y=>{N.x<=10&&N.y<=10?Y.preventDefault():b.contains(Y.target)||D(!1),document.removeEventListener("pointermove",q),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Q,{capture:!0})}}},[b,D,A]),l.useEffect(()=>{const N=()=>D(!1);return window.addEventListener("blur",N),window.addEventListener("resize",N),()=>{window.removeEventListener("blur",N),window.removeEventListener("resize",N)}},[D]);const[X,M]=Ja(N=>{const q=B().filter(Z=>!Z.disabled),Q=q.find(Z=>Z.ref.current===document.activeElement),Y=Qa(q,N,Q);Y&&setTimeout(()=>Y.ref.current.focus())}),V=l.useCallback((N,q,Q)=>{const Y=!$.current&&!Q;(w.value!==void 0&&w.value===q||Y)&&(T(N),Y&&($.current=!0))},[w.value]),K=l.useCallback(()=>b?.focus(),[b]),z=l.useCallback((N,q,Q)=>{const Y=!$.current&&!Q;(w.value!==void 0&&w.value===q||Y)&&I(N)},[w.value]),se=r==="popper"?Fn:La,ee=se===Fn?{side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:g,hideWhenDetached:h,avoidCollisions:x}:{};return i.jsx(Ia,{scope:n,content:b,viewport:R,onViewportChange:k,itemRefCallback:V,selectedItem:E,onItemLeave:K,itemTextRefCallback:z,focusSelectedItem:W,selectedItemText:L,position:r,isPositioned:H,searchRef:X,children:i.jsx(pt,{as:Sm,allowPinchZoom:!0,children:i.jsx(ft,{asChild:!0,trapped:w.open,onMountAutoFocus:N=>{N.preventDefault()},onUnmountAutoFocus:j(o,N=>{w.trigger?.focus({preventScroll:!0}),N.preventDefault()}),children:i.jsx(Je,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:N=>N.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:i.jsx(se,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:N=>N.preventDefault(),...y,...ee,onPlaced:()=>S(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j(y.onKeyDown,N=>{const q=N.ctrlKey||N.altKey||N.metaKey;if(N.key==="Tab"&&N.preventDefault(),!q&&N.key.length===1&&M(N.key),["ArrowUp","ArrowDown","Home","End"].includes(N.key)){let Y=B().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes(N.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(N.key)){const Z=N.target,J=Y.indexOf(Z);Y=Y.slice(J+1)}setTimeout(()=>F(Y)),N.preventDefault()}})})})})})})});Da.displayName=Mm;var Em="SelectItemAlignedPosition",La=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Oe(Be,n),a=Ie(Be,n),[c,u]=l.useState(null),[f,p]=l.useState(null),d=G(t,_=>p(_)),m=un(n),v=l.useRef(!1),g=l.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:w}=a,b=l.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&f&&h&&x&&y){const _=s.trigger.getBoundingClientRect(),E=f.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const Z=L.left-E.left,J=T.left-Z,ce=_.left-J,De=_.width+ce,mn=Math.max(De,E.width),vn=window.innerWidth-ue,xn=Xr(J,[ue,Math.max(ue,vn-mn)]);c.style.minWidth=De+"px",c.style.left=xn+"px"}else{const Z=E.right-L.right,J=window.innerWidth-T.right-Z,ce=window.innerWidth-_.right-J,De=_.width+ce,mn=Math.max(De,E.width),vn=window.innerWidth-ue,xn=Xr(J,[ue,Math.max(ue,vn-mn)]);c.style.minWidth=De+"px",c.style.right=xn+"px"}const I=m(),B=window.innerHeight-ue*2,H=h.scrollHeight,S=window.getComputedStyle(f),$=parseInt(S.borderTopWidth,10),F=parseInt(S.paddingTop,10),W=parseInt(S.borderBottomWidth,10),D=parseInt(S.paddingBottom,10),A=$+F+H+D+W,X=Math.min(x.offsetHeight*5,A),M=window.getComputedStyle(h),V=parseInt(M.paddingTop,10),K=parseInt(M.paddingBottom,10),z=_.top+_.height/2-ue,se=B-z,ee=x.offsetHeight/2,N=x.offsetTop+ee,q=$+F+N,Q=A-q;if(q<=z){const Z=I.length>0&&x===I[I.length-1].ref.current;c.style.bottom="0px";const J=f.clientHeight-h.offsetTop-h.offsetHeight,ce=Math.max(se,ee+(Z?K:0)+J+W),De=q+ce;c.style.height=De+"px"}else{const Z=I.length>0&&x===I[0].ref.current;c.style.top="0px";const ce=Math.max(z,$+h.offsetTop+(Z?V:0)+ee)+Q;c.style.height=ce+"px",h.scrollTop=q-z+h.offsetTop}c.style.margin=`${ue}px 0`,c.style.minHeight=X+"px",c.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[m,s.trigger,s.valueNode,c,f,h,x,y,s.dir,r]);te(()=>b(),[b]);const[C,R]=l.useState();te(()=>{f&&R(window.getComputedStyle(f).zIndex)},[f]);const k=l.useCallback(_=>{_&&g.current===!0&&(b(),w?.(),g.current=!1)},[b,w]);return i.jsx(Rm,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:i.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:i.jsx(U.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});La.displayName=Em;var _m="SelectPopperPosition",Fn=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ue,...s}=e,a=dn(n);return i.jsx(nn,{...a,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Fn.displayName=_m;var[Rm,vr]=nt(Be,{}),Vn="SelectViewport",$a=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ie(Vn,n),a=vr(Vn,n),c=G(t,s.onViewportChange),u=l.useRef(0);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),i.jsx(ln.Slot,{scope:n,children:i.jsx(U.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:j(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=a;if(m?.current&&d){const v=Math.abs(u.current-p.scrollTop);if(v>0){const g=window.innerHeight-ue*2,h=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),y=Math.max(h,x);if(y<g){const w=y+v,b=Math.min(g,w),C=w-b;d.style.height=b+"px",d.style.bottom==="0px"&&(p.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});$a.displayName=Vn;var Fa="SelectGroup",[km,Pm]=nt(Fa),Va=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ge();return i.jsx(km,{scope:n,id:o,children:i.jsx(U.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Va.displayName=Fa;var Ba="SelectLabel",Nm=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pm(Ba,n);return i.jsx(U.div,{id:o.id,...r,ref:t})});Nm.displayName=Ba;var Wt="SelectItem",[Tm,Ha]=nt(Wt),Wa=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,c=Oe(Wt,n),u=Ie(Wt,n),f=c.value===r,[p,d]=l.useState(s??""),[m,v]=l.useState(!1),g=G(t,w=>u.itemRefCallback?.(w,r,o)),h=ge(),x=l.useRef("touch"),y=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return i.jsx(Tm,{scope:n,value:r,disabled:o,textId:h,isSelected:f,onItemTextChange:l.useCallback(w=>{d(b=>b||(w?.textContent??"").trim())},[]),children:i.jsx(ln.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:i.jsx(U.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:g,onFocus:j(a.onFocus,()=>v(!0)),onBlur:j(a.onBlur,()=>v(!1)),onClick:j(a.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:j(a.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:j(a.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:j(a.onPointerMove,w=>{x.current=w.pointerType,o?u.onItemLeave?.():x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(a.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:j(a.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(mm.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Wa.displayName=Wt;var it="SelectItemText",Ua=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=Oe(it,n),c=Ie(it,n),u=Ha(it,n),f=ym(it,n),[p,d]=l.useState(null),m=G(t,y=>d(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),v=p?.textContent,g=l.useMemo(()=>i.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=f;return te(()=>(h(g),()=>x(g)),[h,x,g]),i.jsxs(i.Fragment,{children:[i.jsx(U.span,{id:u.textId,...s,ref:m}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?dt.createPortal(s.children,a.valueNode):null]})});Ua.displayName=it;var Ka="SelectItemIndicator",za=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ha(Ka,n).isSelected?i.jsx(U.span,{"aria-hidden":!0,...r,ref:t}):null});za.displayName=Ka;var Bn="SelectScrollUpButton",qa=l.forwardRef((e,t)=>{const n=Ie(Bn,e.__scopeSelect),r=vr(Bn,e.__scopeSelect),[o,s]=l.useState(!1),a=G(t,r.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollTop>0;s(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?i.jsx(Ya,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});qa.displayName=Bn;var Hn="SelectScrollDownButton",Ga=l.forwardRef((e,t)=>{const n=Ie(Hn,e.__scopeSelect),r=vr(Hn,e.__scopeSelect),[o,s]=l.useState(!1),a=G(t,r.onScrollButtonChange);return te(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<f;s(p)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?i.jsx(Ya,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Ga.displayName=Hn;var Ya=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ie("SelectScrollButton",n),a=l.useRef(null),c=un(n),u=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>u(),[u]),te(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),i.jsx(U.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:j(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:j(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{u()})})}),Am="SelectSeparator",jm=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(U.div,{"aria-hidden":!0,...r,ref:t})});jm.displayName=Am;var Wn="SelectArrow",Om=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dn(n),s=Oe(Wn,n),a=Ie(Wn,n);return s.open&&a.position==="popper"?i.jsx(rn,{...o,...r,ref:t}):null});Om.displayName=Wn;var Im="SelectBubbleInput",Xa=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=G(r,o),a=ef(t);return l.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&p){const d=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(d)}},[a,t]),i.jsx(U.select,{...n,style:{...yo,...n.style},ref:s,defaultValue:t})});Xa.displayName=Im;function Za(e){return e===""||e===void 0}function Ja(e){const t=ne(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const c=n.current+a;t(c),(function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Qa(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Dm(e,Math.max(s,0));o.length===1&&(a=a.filter(f=>f!==n));const u=a.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Dm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Lm=ka,$m=Na,Fm=Aa,Vm=ja,Bm=Oa,Hm=$a,Wm=Va,Um=Wa,Km=Ua,zm=za,qm=qa,Gm=Ga,xr="ToastProvider",[gr,Ym,Xm]=Gt("Toast"),[ei]=ye("Toast",[Xm]),[Zm,fn]=ei(xr),ti=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:a}=e,[c,u]=l.useState(null),[f,p]=l.useState(0),d=l.useRef(!1),m=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${xr}\`. Expected non-empty \`string\`.`),i.jsx(gr.Provider,{scope:t,children:i.jsx(Zm,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:f,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(v=>v+1),[]),onToastRemove:l.useCallback(()=>p(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m,children:a})})};ti.displayName=xr;var ni="ToastViewport",Jm=["F8"],Un="toast.viewportPause",Kn="toast.viewportResume",ri=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Jm,label:o="Notifications ({hotkey})",...s}=e,a=fn(ni,n),c=Ym(n),u=l.useRef(null),f=l.useRef(null),p=l.useRef(null),d=l.useRef(null),m=G(t,d,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=a.toastCount>0;l.useEffect(()=>{const x=y=>{r.length!==0&&r.every(b=>y[b]||y.code===b)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),l.useEffect(()=>{const x=u.current,y=d.current;if(g&&x&&y){const w=()=>{if(!a.isClosePausedRef.current){const k=new CustomEvent(Un);y.dispatchEvent(k),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const k=new CustomEvent(Kn);y.dispatchEvent(k),a.isClosePausedRef.current=!1}},C=k=>{!x.contains(k.relatedTarget)&&b()},R=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",w),x.addEventListener("focusout",C),x.addEventListener("pointermove",w),x.addEventListener("pointerleave",R),window.addEventListener("blur",w),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",w),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",w),x.removeEventListener("pointerleave",R),window.removeEventListener("blur",w),window.removeEventListener("focus",b)}}},[g,a.isClosePausedRef]);const h=l.useCallback(({tabbingDirection:x})=>{const w=c().map(b=>{const C=b.ref.current,R=[C,...pv(C)];return x==="forwards"?R:R.reverse()});return(x==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const x=d.current;if(x){const y=w=>{const b=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!b){const R=document.activeElement,k=w.shiftKey;if(w.target===x&&k){f.current?.focus();return}const T=h({tabbingDirection:k?"backwards":"forwards"}),L=T.findIndex(I=>I===R);Pn(T.slice(L+1))?w.preventDefault():k?f.current?.focus():p.current?.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[c,h]),i.jsxs(ad,{ref:u,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&i.jsx(zn,{ref:f,onFocusFromOutsideViewport:()=>{const x=h({tabbingDirection:"forwards"});Pn(x)}}),i.jsx(gr.Slot,{scope:n,children:i.jsx(U.ol,{tabIndex:-1,...s,ref:m})}),g&&i.jsx(zn,{ref:p,onFocusFromOutsideViewport:()=>{const x=h({tabbingDirection:"backwards"});Pn(x)}})]})});ri.displayName=ni;var oi="ToastFocusProxy",zn=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=fn(oi,n);return i.jsx(qt,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!s.viewport?.contains(c)&&r()}})});zn.displayName=oi;var Ct="Toast",Qm="toast.swipeStart",ev="toast.swipeMove",tv="toast.swipeCancel",nv="toast.swipeEnd",si=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...a}=e,[c,u]=Pe({prop:r,defaultProp:o??!0,onChange:s,caller:Ct});return i.jsx(Se,{present:n||c,children:i.jsx(sv,{open:c,...a,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:j(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:j(e.onSwipeMove,f=>{const{x:p,y:d}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:j(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:j(e.onSwipeEnd,f=>{const{x:p,y:d}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),u(!1)})})})});si.displayName=Ct;var[rv,ov]=ei(Ct,{onClose(){}}),sv=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:a,onEscapeKeyDown:c,onPause:u,onResume:f,onSwipeStart:p,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:v,...g}=e,h=fn(Ct,n),[x,y]=l.useState(null),w=G(t,S=>y(S)),b=l.useRef(null),C=l.useRef(null),R=o||h.duration,k=l.useRef(0),_=l.useRef(R),E=l.useRef(0),{onToastAdd:T,onToastRemove:L}=h,I=ne(()=>{x?.contains(document.activeElement)&&h.viewport?.focus(),a()}),B=l.useCallback(S=>{!S||S===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(I,S))},[I]);l.useEffect(()=>{const S=h.viewport;if(S){const $=()=>{B(_.current),f?.()},F=()=>{const W=new Date().getTime()-k.current;_.current=_.current-W,window.clearTimeout(E.current),u?.()};return S.addEventListener(Un,F),S.addEventListener(Kn,$),()=>{S.removeEventListener(Un,F),S.removeEventListener(Kn,$)}}},[h.viewport,R,u,f,B]),l.useEffect(()=>{s&&!h.isClosePausedRef.current&&B(R)},[s,R,h.isClosePausedRef,B]),l.useEffect(()=>(T(),()=>L()),[T,L]);const H=l.useMemo(()=>x?di(x):null,[x]);return h.viewport?i.jsxs(i.Fragment,{children:[H&&i.jsx(av,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:H}),i.jsx(rv,{scope:n,onClose:I,children:dt.createPortal(i.jsx(gr.ItemSlot,{scope:n,children:i.jsx(sd,{asChild:!0,onEscapeKeyDown:j(c,()=>{h.isFocusedToastEscapeKeyDownRef.current||I(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(U.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":h.swipeDirection,...g,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:j(e.onKeyDown,S=>{S.key==="Escape"&&(c?.(S.nativeEvent),S.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:j(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:j(e.onPointerMove,S=>{if(!b.current)return;const $=S.clientX-b.current.x,F=S.clientY-b.current.y,W=!!C.current,D=["left","right"].includes(h.swipeDirection),A=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,X=D?A(0,$):0,M=D?0:A(0,F),V=S.pointerType==="touch"?10:2,K={x:X,y:M},z={originalEvent:S,delta:K};W?(C.current=K,Tt(ev,d,z,{discrete:!1})):Zr(K,h.swipeDirection,V)?(C.current=K,Tt(Qm,p,z,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs($)>V||Math.abs(F)>V)&&(b.current=null)}),onPointerUp:j(e.onPointerUp,S=>{const $=C.current,F=S.target;if(F.hasPointerCapture(S.pointerId)&&F.releasePointerCapture(S.pointerId),C.current=null,b.current=null,$){const W=S.currentTarget,D={originalEvent:S,delta:$};Zr($,h.swipeDirection,h.swipeThreshold)?Tt(nv,v,D,{discrete:!0}):Tt(tv,m,D,{discrete:!0}),W.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),av=e=>{const{__scopeToast:t,children:n,...r}=e,o=fn(Ct,t),[s,a]=l.useState(!1),[c,u]=l.useState(!1);return dv(()=>a(!0)),l.useEffect(()=>{const f=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(f)},[]),c?null:i.jsx(Qe,{asChild:!0,children:i.jsx(qt,{...r,children:s&&i.jsxs(i.Fragment,{children:[o.label," ",n]})})})},iv="ToastTitle",cv=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(U.div,{...r,ref:t})});cv.displayName=iv;var lv="ToastDescription",ai=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(U.div,{...r,ref:t})});ai.displayName=lv;var ii="ToastAction",uv=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(ui,{altText:n,asChild:!0,children:i.jsx(li,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ii}\`. Expected non-empty \`string\`.`),null)});uv.displayName=ii;var ci="ToastClose",li=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=ov(ci,n);return i.jsx(ui,{asChild:!0,children:i.jsx(U.button,{type:"button",...r,ref:t,onClick:j(e.onClick,o.onClose)})})});li.displayName=ci;var ui=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return i.jsx(U.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function di(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),fv(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...di(r))}}),t}function Tt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xn(o,s):o.dispatchEvent(s)}var Zr=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function dv(e=()=>{}){const t=ne(e);te(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function fv(e){return e.nodeType===e.ELEMENT_NODE}function pv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var hv=ti,mv=ri,vv=si,xv=ai;function fi(e){return e.map((t,n)=>t.separator?i.jsx(oa,{className:"my-1 h-px bg-border-default"},`separator-${n}`):t.items?.length?i.jsxs(_h,{children:[i.jsxs(Rh,{disabled:t.disabled,className:"flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm text-text-default outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 data-highlighted:bg-surface-hover",children:[i.jsx("span",{children:t.label}),i.jsx(io,{className:"h-3.5 w-3.5 opacity-70"})]}),i.jsx(ra,{children:i.jsx(kh,{sideOffset:6,alignOffset:-4,className:"z-50 min-w-44 rounded-lg border border-border-default bg-surface-base p-1.5 shadow-2xl",children:fi(t.items)})})]},`sub-${n}`):i.jsxs(Eh,{disabled:t.disabled,onSelect:t.onSelect,className:"flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm text-text-default outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 data-highlighted:bg-surface-hover",children:[i.jsx("span",{children:t.label}),t.shortcut?i.jsx("span",{className:"ml-6 text-xs text-text-muted",children:t.shortcut}):null]},`item-${n}`))}function pi({open:e,x:t,y:n,items:r,onOpenChange:o,onClose:s,renderMenuItems:a,renderHeader:c,className:u}){const f=O.useRef(null),p=O.useRef(!1),d=O.useCallback(v=>{o?.(v),v||s?.()},[s,o]),m=O.useMemo(()=>a?a():fi(r??[]),[r,a]);return O.useEffect(()=>{if(!e){p.current=!1;return}if(p.current||!f.current)return;const v=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,button:2,clientX:t,clientY:n});f.current.dispatchEvent(v),p.current=!0},[e,t,n]),e?i.jsxs(Ch,{onOpenChange:d,children:[i.jsx(Mh,{asChild:!0,children:i.jsx("span",{ref:f,"aria-hidden":!0,className:"fixed h-0 w-0",style:{left:t,top:n}})}),i.jsx(ra,{children:i.jsxs(Sh,{onCloseAutoFocus:v=>v.preventDefault(),className:`z-50 min-w-48 rounded-lg border border-border-default bg-surface-base p-1.5 shadow-2xl ${u??""}`,children:[c?i.jsx("div",{className:"px-2.5 py-1.5 text-xs text-text-muted",children:c()}):null,c?i.jsx(oa,{className:"my-1 h-px bg-border-default"}):null,m]})})]}):null}function gv(e){if(e.clientX||e.clientY)return{x:e.clientX,y:e.clientY};const n=e.currentTarget.getBoundingClientRect();return{x:n.left+n.width/2,y:n.top+n.height/2}}function yv({children:e,getContextMenuItems:t,renderMenuItems:n,renderHeader:r}){const[o,s]=O.useState(!1),[a,c]=O.useState({x:0,y:0}),u=O.useCallback(f=>{f.preventDefault(),c(gv(f)),s(!0)},[]);return i.jsxs(i.Fragment,{children:[e({openMenu:u}),i.jsx(pi,{open:o,x:a.x,y:a.y,onOpenChange:s,onClose:()=>s(!1),items:t?.(),renderMenuItems:n,renderHeader:r})]})}function hi({children:e}){return e}function wv({children:e,className:t,...n}){return i.jsx(rm,{className:`mt-surface-input-ghost data-highlighted:bg-surface-popover flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 ${t||""}`,...n,children:e})}const bv=({title:e,children:t,className:n,kind:r="default",size:o="medium",variant:s="default",showCaret:a=!0})=>{const c=o==="large"?"[&_svg]:h-5 [&_svg]:w-5":"[&_svg]:h-4 [&_svg]:w-4",u=o==="large"?"h-4 w-4":"h-3.5 w-3.5";let f=null;const p=[];return O.Children.forEach(t,d=>{if(O.isValidElement(d)&&d.type===hi){f=d.props.children;return}p.push(d)}),i.jsxs(Qh,{children:[i.jsx(em,{asChild:!0,children:f||i.jsxs(Ye,{kind:r,size:o,variant:s,className:r==="icon"?`${c} ${n||""}`:n,children:[i.jsx("span",{className:"leading-none inline-flex items-center justify-center",children:e||"Dropdown"}),r!=="icon"&&a&&i.jsx("span",{className:"inline-flex items-center justify-center",children:i.jsx(ao,{className:`${u} opacity-70`,"aria-hidden":"true"})})]})}),i.jsx(tm,{children:i.jsx(nm,{sideOffset:5,side:"bottom",className:"mt-surface-menu z-50 min-w-48 rounded-lg border p-1.5 shadow-2xl",children:p})})]})},pn=bv;pn.Trigger=hi;const qn=O.forwardRef(({size:e,variant:t,className:n,...r},o)=>{const s=e||"medium",a={medium:"mt-layout-input-medium",large:"mt-layout-input-large"},c=t||"default",u={default:"mt-surface-input-default",ghost:"mt-surface-input-ghost",panel:"mt-surface-input-panel"};return i.jsx("input",{...r,ref:o,className:`w-fit border rounded outline-none ${a[s]} ${u[c]} ${n||""}`})}),mi=["shift","alt","meta","mod","ctrl","control"],Cv={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ke(e){return(Cv[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function vi(e){return mi.includes(e)}function Nn(e,t=","){return e.toLowerCase().split(t)}function Tn(e,t="+",n=">",r=!1,o,s){let a=[],c=!1;e=e.trim(),e.includes(n)?(c=!0,a=e.toLocaleLowerCase().split(n).map(p=>ke(p))):a=e.toLocaleLowerCase().split(t).map(p=>ke(p));const u={alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod"),useKey:r},f=a.filter(p=>!mi.includes(p));return{...u,keys:f,description:o,isSequence:c,hotkey:e,metadata:s}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&xi([ke(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&gi([ke(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{be.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{be.clear()},0)}));const be=new Set;function yr(e){return Array.isArray(e)}function Mv(e,t=","){return(yr(e)?e:e.split(t)).every(n=>be.has(n.trim().toLowerCase()))}function xi(e){const t=Array.isArray(e)?e:[e];be.has("meta")&&be.forEach(n=>{vi(n)||be.delete(n.toLowerCase())}),t.forEach(n=>{be.add(n.toLowerCase())})}function gi(e){const t=Array.isArray(e)?e:[e];e==="meta"?be.clear():t.forEach(n=>{be.delete(n.toLowerCase())})}function Sv(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Ev(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}const _v=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Rv(e){return yi(e,_v)}function yi(e,t=!1){const{target:n,composed:r}=e;let o,s;return kv(n)&&r?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,s=e.composedPath()[0]&&e.composedPath()[0].role):(o=n&&n.tagName,s=n&&n.role),yr(t)?!!(o&&t&&t.some(a=>a.toLowerCase()===o.toLowerCase()||a===s)):!!(o&&t&&t)}function kv(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Pv(e,t){return e.length===0&&t?!1:t?e.some(n=>t.includes(n))||e.includes("*"):!0}const Nv=(e,t,n=!1)=>{const{alt:r,meta:o,mod:s,shift:a,ctrl:c,keys:u,useKey:f}=t,{code:p,key:d,ctrlKey:m,metaKey:v,shiftKey:g,altKey:h}=e,x=ke(p);if(f&&u?.length===1&&u.includes(d.toLowerCase()))return!0;if(!u?.includes(x)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(x))return!1;if(!n){if(r!==h&&x!=="alt"||a!==g&&x!=="shift")return!1;if(s){if(!v&&!m)return!1}else if(o!==v&&x!=="meta"&&x!=="os"||c!==m&&x!=="ctrl"&&x!=="control")return!1}return u&&u.length===1&&u.includes(x)?!0:u&&u.length>0?u.includes(x)?Mv(u):!1:!u||u.length===0},Tv=O.createContext(void 0),Av=()=>O.useContext(Tv);function wi(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&wi(e[r],t[r]),!0):e===t}const jv=O.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Ov=()=>O.useContext(jv);function Iv(e){const t=O.useRef(void 0);return wi(t.current,e)||(t.current=e),t.current}const Jr=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Dv=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Lv(e,t,n,r){const o=O.useRef(null),s=O.useRef(!1),a=Array.isArray(n)?Array.isArray(r)?void 0:r:n,c=yr(e)?e.join(a?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,f=O.useCallback(t,u??[]),p=O.useRef(f);u?p.current=f:p.current=t;const d=Iv(a),{activeScopes:m}=Ov(),v=Av();return Dv(()=>{if(d?.enabled===!1||!Pv(m,d?.scopes))return;let g=[],h;const x=(C,R=!1)=>{if(!(Rv(C)&&!yi(C,d?.enableOnFormTags))){if(o.current!==null){const k=o.current.getRootNode();if((k instanceof Document||k instanceof ShadowRoot)&&k.activeElement!==o.current&&!o.current.contains(k.activeElement)){Jr(C);return}}C.target?.isContentEditable&&!d?.enableOnContentEditable||Nn(c,d?.delimiter).forEach(k=>{if(k.includes(d?.splitKey??"+")&&k.includes(d?.sequenceSplitKey??">")){console.warn(`Hotkey ${k} contains both ${d?.splitKey??"+"} and ${d?.sequenceSplitKey??">"} which is not supported.`);return}const _=Tn(k,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata);if(_.isSequence){h=setTimeout(()=>{g=[]},d?.sequenceTimeoutMs??1e3);const E=_.useKey?C.key:ke(C.code);if(vi(E.toLowerCase()))return;g.push(E);const T=_.keys?.[g.length-1];if(E!==T){g=[],h&&clearTimeout(h);return}g.length===_.keys?.length&&(p.current(C,_),h&&clearTimeout(h),g=[])}else if(Nv(C,_,d?.ignoreModifiers)||_.keys?.includes("*")){if(d?.ignoreEventWhen?.(C)||R&&s.current)return;if(Sv(C,_,d?.preventDefault),!Ev(C,_,d?.enabled)){Jr(C);return}p.current(C,_),R||(s.current=!0)}})}},y=C=>{C.code!==void 0&&(xi(ke(C.code)),(d?.keydown===void 0&&d?.keyup!==!0||d?.keydown)&&x(C))},w=C=>{C.code!==void 0&&(gi(ke(C.code)),s.current=!1,d?.keyup&&x(C,!0))},b=o.current||a?.document||document;return b.addEventListener("keyup",w,a?.eventListenerOptions),b.addEventListener("keydown",y,a?.eventListenerOptions),v&&Nn(c,d?.delimiter).forEach(C=>{v.addHotkey(Tn(C,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),()=>{b.removeEventListener("keyup",w,a?.eventListenerOptions),b.removeEventListener("keydown",y,a?.eventListenerOptions),v&&Nn(c,d?.delimiter).forEach(C=>{v.removeHotkey(Tn(C,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),g=[],h&&clearTimeout(h)}},[c,d,m]),o}function bi({children:e}){return e}function Ci(e,t){O.Children.forEach(e,n=>{if(O.isValidElement(n)){if(n.type===bi){t.triggerOverride=n.props.children;return}if(n.type===O.Fragment){Ci(n.props.children,t);return}t.selectItems.push(n)}})}const de=O.forwardRef(({children:e,className:t,icon:n,shortcut:r="",...o},s)=>i.jsxs(Um,{className:`mt-surface-input-ghost focus:ring-0 focus:ring-offset-0 data-highlighted:bg-surface-popover data-[state=checked]:bg-surface-popover flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 ${t||""}`,...o,ref:s,children:[i.jsxs("span",{className:"flex items-center",children:[n?i.jsx("span",{className:"mr-2",children:n}):null,i.jsx(Km,{children:e})]}),i.jsxs("span",{className:"ml-6 flex items-center gap-2 text-xs text-text-muted",children:[r?i.jsx("span",{children:r}):null,i.jsx(zm,{children:i.jsx(so,{className:"h-4 w-4 text-text-muted"})})]})]})),$v=({children:e,className:t,placeholder:n,kind:r="default",size:o="medium",options:s,variant:a="default",value:c,onValueChange:u,showCaret:f=!0,...p})=>{const d=c!==void 0&&u!==void 0,[m,v]=O.useState(c??""),g=d?c:m,[h,x]=O.useState(!1),[y,w]=O.useState(!1),b=o==="large"?"[&_svg]:h-5 [&_svg]:w-5":"[&_svg]:h-4 [&_svg]:w-4",C=o==="large"?"h-4 w-4":"h-3.5 w-3.5",{triggerOverride:R,selectItems:k}=O.useMemo(()=>{const E={triggerOverride:null,selectItems:[]};return e&&Ci(e,E),!e&&s&&(E.selectItems=s.map(T=>i.jsx(de,{value:T.value,icon:T.icon,disabled:T.disabled,children:T.label},T.value))),E},[e,s]),_=k.find(E=>O.isValidElement(E)&&E.props.value===g);return O.useEffect(()=>{!d&&c!==void 0&&c!==m&&v(c)},[d,c,m]),Lv("1,2,3,4,5,6,7,8,9",E=>{const T=Number(E.key)-1,L=k[T];L&&(d||v(L.props.value),u?.(L.props.value),x(!1))},{enabled:h||y,enableOnFormTags:!0,document:window.document}),i.jsxs(Lm,{value:g,onValueChange:E=>{d||v(E),u?.(E)},open:h,onOpenChange:x,...p,children:[i.jsx($m,{asChild:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:R||i.jsxs(Ye,{kind:r,size:o,variant:a,className:r==="icon"?`${b} ${t||""}`:t,children:[i.jsx("span",{className:"leading-none inline-flex items-center justify-center",children:r==="icon"?i.jsx("span",{className:`inline-flex h-full w-full items-center justify-center leading-none ${b}`,children:_?.props.icon??n}):i.jsx(Fm,{placeholder:n})}),r!=="icon"&&f&&i.jsx("span",{className:"inline-flex items-center justify-center",children:i.jsx(ao,{className:`${C} opacity-70`,"aria-hidden":"true"})})]})}),i.jsx(Vm,{children:i.jsxs(Bm,{sideOffset:5,position:"popper",align:"center",className:"mt-surface-menu z-50 min-w-48 rounded-lg border p-1.5 shadow-2xl",children:[i.jsx(qm,{}),i.jsx(Hm,{children:i.jsx(Wm,{className:"flex flex-col gap-0.5",children:k.map((E,T)=>O.cloneElement(E,{shortcut:(T+1).toString()}))})}),i.jsx(Gm,{})]})})]})},he=$v;he.Trigger=bi;const Ut=(e,t)=>{const n=e[0]?.value??"",r=t[0]?.value??"";return{type:"rule",field:n,operator:r,value:null}},Fv=(e,t)=>({type:"group",conjunction:"AND",children:[Ut(e,t)]}),Re=(e,t,n)=>{if(t.length===0)return n(e);const[r,...o]=t,s=e.children[r];if(!s)return e;let a=s;return o.length===0?a=n(s):s.type==="group"&&(a=Re(s,o,n)),a===s?e:{...e,children:e.children.map((c,u)=>u===r?a:c)}},Gn=(e,t)=>{if(t.length===0)return e;const[n,...r]=t;if(r.length===0)return{...e,children:e.children.filter((a,c)=>c!==n)};const o=e.children[n];if(!o||o.type!=="group")return e;const s=Gn(o,r);return{...e,children:e.children.map((a,c)=>c===n?s:a)}},Vv=(e,t,n)=>e.children.length>0?e:{...e,children:[Ut(t,n)]};function Bv({title:e="Filter",value:t,onChange:n,fields:r,operators:o,advanced:s,onAdvancedChange:a,kind:c="default",size:u="medium",variant:f="default",showCaret:p=!0}){const[d,m]=O.useState(!1),v=s??d,g=a??m,h=O.useMemo(()=>{const E=new Map;return o.forEach(T=>E.set(T.value,T)),E},[o]),x=O.useMemo(()=>{const E=new Map;return r.forEach(T=>E.set(T.value,T)),E},[r]),y=E=>n(Vv(E,r,o)),w=()=>{const E=t.children[0];return E&&E.type==="rule"?E:Ut(r,o)},b=()=>{const E=w(),L=h.get(E.operator)?.requiresValue??!0,I=x.get(E.field),B=I?.icon,H=I?.options;return i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:B||i.jsx(st,{className:"h-4 w-4"})}),i.jsx(he,{value:E.field,onValueChange:S=>{const $={...E,field:S,value:null};y({...t,conjunction:"AND",children:[$]})},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(S=>i.jsx(de,{value:S.value,icon:S.icon,children:S.label},S.value))}),i.jsx(he,{value:E.operator,onValueChange:S=>{const $={...E,operator:S,value:null};y({...t,conjunction:"AND",children:[$]})},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:o.map(S=>i.jsx(de,{value:S.value,children:S.label},S.value))}),L?H&&H.length>0?i.jsx(he,{value:E.value??"",onValueChange:S=>{const $={...E,value:S};y({...t,conjunction:"AND",children:[$]})},variant:"ghost",size:"medium",showCaret:!1,className:"flex-1 text-xs",children:H.map(S=>i.jsx(de,{value:S.value,children:S.label??S.value},S.value))}):i.jsx(qn,{className:"flex-1 w-full text-xs",placeholder:"Value",value:E.value??"",onChange:S=>{const $={...E,value:S.target.value};y({...t,conjunction:"AND",children:[$]})},variant:"ghost"}):i.jsx("span",{className:"text-xs",children:"No value"})]})},C=(E,T)=>{const I=h.get(E.operator)?.requiresValue??!0,H=x.get(E.field)?.options;return i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[i.jsx(he,{value:E.field,onValueChange:S=>{y(Re(t,T,$=>({...$,field:S,value:null})))},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(S=>i.jsx(de,{value:S.value,icon:S.icon,children:S.label},S.value))}),i.jsx(he,{value:E.operator,onValueChange:S=>{y(Re(t,T,$=>({...$,operator:S,value:null})))},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:o.map(S=>i.jsx(de,{value:S.value,children:S.label},S.value))}),I?H&&H.length>0?i.jsx(he,{value:E.value??"",onValueChange:S=>{y(Re(t,T,$=>({...$,value:S})))},variant:"ghost",size:"medium",showCaret:!1,className:"flex-1 text-xs",children:H.map(S=>i.jsx(de,{value:S.value,children:S.label??S.value},S.value))}):i.jsx(qn,{className:"flex-1 w-full text-xs",placeholder:"Value",value:E.value??"",onChange:S=>{y(Re(t,T,$=>({...$,value:S.target.value})))},variant:"ghost"}):i.jsx("span",{className:"text-xs text-text-muted",children:"No value"}),i.jsx("button",{type:"button",className:"text-text-muted hover:text-text-default",onClick:()=>y(Gn(t,T)),"aria-label":"Delete rule",children:i.jsx(Dt,{className:"h-4 w-4"})})]})},R=(E,T,L=!1)=>i.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-border-default bg-surface-subtle p-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[i.jsx("span",{className:"uppercase tracking-wide",children:L?"Where":"Group"}),i.jsx("button",{type:"button",className:"rounded-md border border-border-default bg-surface-subtle px-2 py-1 text-xs text-text-primary",onClick:()=>{y(Re(t,T,I=>({...I,conjunction:I.conjunction==="AND"?"OR":"AND"})))},children:E.conjunction}),!L&&i.jsx("button",{type:"button",className:"ml-auto text-text-muted hover:text-text-default",onClick:()=>y(Gn(t,T)),"aria-label":"Delete group",children:i.jsx(Dt,{className:"h-4 w-4"})})]}),i.jsx("div",{className:"flex flex-col gap-2",children:E.children.map((I,B)=>{const H=[...T,B];return I.type==="group"?i.jsx("div",{children:R(I,H)},`group-${B}`):i.jsx("div",{children:C(I,H)},`rule-${B}`)})}),i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx(Ye,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:()=>{y(Re(t,T,I=>({...I,children:[...I.children,Ut(r,o)]})))},children:i.jsx(It,{className:"h-4 w-4"})}),i.jsx("span",{className:"text-text-primary",children:"Add rule"}),i.jsx(Ye,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:()=>{y(Re(t,T,I=>({...I,children:[...I.children,Fv(r,o)]})))},children:i.jsx(It,{className:"h-4 w-4"})}),i.jsx("span",{className:"text-text-primary",children:"Add group"})]})]}),k=x.get(w().field)?.icon,_=v?i.jsx(st,{className:"h-4 w-4"}):k||i.jsx(st,{className:"h-4 w-4"});return i.jsx(pn,{title:c==="icon"?i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-primary",children:_}):i.jsxs("span",{className:"inline-flex items-center gap-2",children:[i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-primary",children:_}),i.jsx("span",{children:e})]}),kind:c,size:u,variant:f,showCaret:p,children:i.jsxs("div",{className:"w-130 max-w-[80vw] p-2 text-text-primary",children:[i.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[i.jsxs("span",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-text-muted",children:[v&&i.jsx(st,{className:"h-3.5 w-3.5"}),v?"Advanced":"Simple"," filter"]}),i.jsx("button",{type:"button",className:"text-text-muted hover:text-text-default",onClick:()=>g(!v),"aria-label":"Toggle filter type",children:i.jsx(Sc,{className:"h-4 w-4"})})]}),v?R(t,[],!0):b()]})})}function Hv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{"clip-path":"url(#clip0_129_4601)",children:[i.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),i.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"#7F7F7F",style:{fill:"#7F7F7F",fillOpacity:1}}),i.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"#7F7F7F",style:{fill:"#7F7F7F",fillOpacity:1}})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_129_4601",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Wv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{"clip-path":"url(#clip0_25_3437)",children:[i.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),i.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),i.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"#808080",style:{fill:"#808080",fillOpacity:1}})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3437",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Uv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{"clip-path":"url(#clip0_25_3441)",children:[i.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),i.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),i.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3441",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Kv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("g",{"clip-path":"url(#clip0_25_3445)",children:i.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"white",style:{stroke:"white",strokeOpacity:1},"stroke-width":"2","stroke-dasharray":"6 6"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3445",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function zv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("g",{"clip-path":"url(#clip0_25_3447)",children:i.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"white",style:{stroke:"white",strokeOpacity:1},"stroke-width":"2"})}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3447",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function qv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{"clip-path":"url(#clip0_25_3452)",children:[i.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"#F0BF00",style:{stroke:"#F0BF00",strokeOpacity:1},"stroke-width":"2"}),i.jsx("path",{d:"M7 10.5C8.933 10.5 10.5 8.933 10.5 7C10.5 5.067 8.933 3.5 7 3.5V10.5Z",fill:"#F0BF00",style:{fill:"#F0BF00",fillOpacity:1}})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3452",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Gv(){return i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{"clip-path":"url(#clip0_25_3458)",children:[i.jsx("circle",{cx:"7",cy:"7",r:"7",fill:"#16A34A",style:{fill:"#16A34A",fillOpacity:1}}),i.jsx("path",{d:"M3.5 7.40872L5.42979 9.26765C5.46807 9.30452 5.52852 9.30501 5.56738 9.26874L10.5 4.66675",stroke:"#1F2023",style:{stroke:"#1F2023",strokeOpacity:1},"stroke-width":"2","stroke-linecap":"round"})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_25_3458",children:i.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Yv({size:e=14}){return i.jsxs("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{clipPath:"url(#clip0_mt_subgraph)",children:[i.jsx("rect",{x:"0.5",y:"0.5",width:"5",height:"5",rx:"2.5",stroke:"currentColor"}),i.jsx("rect",{x:"8.5",y:"8.5",width:"5",height:"5",rx:"2.5",stroke:"currentColor"}),i.jsx("mask",{id:"path-3-inside-1_mt_subgraph",fill:"white",children:i.jsx("path",{d:"M2.5 5.38232H8.56281V11.5H6.5C4.29086 11.5 2.5 9.70914 2.5 7.5V5.38232Z"})}),i.jsx("path",{d:"M2.5 5.38232H8.56281H2.5M8.56281 12.5H6.5C3.73858 12.5 1.5 10.2614 1.5 7.5H3.5C3.5 9.15685 4.84315 10.5 6.5 10.5H8.56281V12.5ZM6.5 12.5C3.73858 12.5 1.5 10.2614 1.5 7.5V5.38232H3.5V7.5C3.5 9.15685 4.84315 10.5 6.5 10.5V12.5ZM6.5 10.5M8.56281 5.38232V11.5V5.38232",fill:"currentColor",mask:"url(#path-3-inside-1_mt_subgraph)"})]}),i.jsx("defs",{children:i.jsx("clipPath",{id:"clip0_mt_subgraph",children:i.jsx("rect",{width:"14",height:"14",fill:"white"})})})]})}function Mi({children:e}){return e}const Xv=({children:e,content:t,open:n,onOpenChange:r,side:o="bottom",align:s="start",sideOffset:a=6,className:c})=>{let u=null;const f=[];O.Children.forEach(e,d=>{if(O.isValidElement(d)&&d.type===Mi){u=d.props.children;return}f.push(d)});const p=u??(O.isValidElement(f[0])?f[0]:null);return p?i.jsxs(Sa,{open:n,onOpenChange:r,children:[i.jsx(Ea,{asChild:!0,children:p}),i.jsx(_a,{children:i.jsx(Ra,{side:o,align:s,sideOffset:a,className:`bg-surface-subtle border border-border-default rounded-lg p-2 shadow-2xl backdrop-blur-md z-50 ${c||""}`,children:t})})]}):i.jsx(i.Fragment,{})},wr=Xv;wr.Trigger=Mi;const Zv=e=>({property:e[0]?.value??"",direction:"asc"});function Jv({title:e="Sort",value:t,onChange:n,fields:r,kind:o="default",size:s="medium",variant:a="default",showCaret:c=!0}){const u=(m,v)=>{n(t.map((g,h)=>h===m?{...g,...v}:g))},f=m=>{n(t.filter((v,g)=>g!==m))},p=()=>{n([...t,Zv(r)])},d=()=>t.length===1?t[0].direction==="desc"?i.jsx(Fi,{className:"h-4 w-4"}):i.jsx(Hi,{className:"h-4 w-4"}):i.jsx(oo,{className:"h-4 w-4"});return i.jsx(pn,{title:o==="icon"?i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-muted",children:d()}):i.jsxs("span",{className:"inline-flex items-center gap-2",children:[i.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-muted",children:d()}),i.jsx("span",{children:e})]}),kind:o,size:s,variant:a,showCaret:c,children:i.jsxs("div",{className:"w-105 max-w-[80vw] p-2 text-text-muted",children:[i.jsxs("div",{className:"flex flex-col gap-2",children:[t.length===0&&i.jsx("div",{className:"text-xs text-text-muted",children:"No sorting rules."}),t.map((m,v)=>i.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[i.jsx(he,{value:m.property,onValueChange:g=>u(v,{property:g}),variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(g=>i.jsx(de,{value:g.value,children:g.label},g.value))}),i.jsxs(he,{value:m.direction,onValueChange:g=>u(v,{direction:g}),variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:[i.jsx(de,{value:"asc",children:"Ascending"}),i.jsx(de,{value:"desc",children:"Descending"})]}),i.jsx("button",{type:"button",className:"ml-auto text-text-muted hover:text-text-default",onClick:()=>f(v),"aria-label":"Delete sort rule",children:i.jsx(Dt,{className:"h-4 w-4"})})]},`${m.property}-${v}`))]}),i.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",children:[i.jsx(Ye,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:p,children:i.jsx(It,{className:"h-4 w-4"})}),i.jsx("span",{className:"text-text-muted",children:"Add sort"})]})]})})}function Qv({children:e,gap:t=0,row:n=!1,align:r,justify:o="start",className:s=""}){const c={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"}[r??(n?"center":"stretch")],u={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch",baseline:"justify-baseline",normal:"justify-normal"}[o];return i.jsx("div",{className:`flex flex-1 ${c} ${u} ${n?"flex-row":"flex-col"} ${s}`,style:{gap:`${t*.25}rem`},children:e})}const Si=O.createContext(null);function e1(){return O.useContext(Si)}let t1=1;function n1({children:e}){const[t,n]=O.useState([]),r=O.useCallback((s,a)=>{const c={id:t1++,message:s,variant:a?.variant??"default",durationMs:a?.durationMs??3500};n(u=>[...u,c])},[]),o=O.useCallback(s=>{n(a=>a.filter(c=>c.id!==s))},[]);return i.jsx(Si.Provider,{value:{toast:r},children:i.jsxs(hv,{swipeDirection:"down",duration:3500,children:[e,t.map(s=>i.jsx(vv,{duration:s.durationMs,onOpenChange:a=>{a||o(s.id)},className:"mt-toast-root rounded-lg border px-4 py-2.5 text-sm shadow-[0_10px_24px_rgba(0,0,0,0.45)] backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:slide-out-to-bottom-2 data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=cancel]:translate-y-0 data-[swipe=cancel]:transition-transform data-[swipe=end]:animate-out data-[swipe=end]:fade-out data-[swipe=end]:slide-out-to-bottom-2 "+(s.variant==="error"?"border-red-500/40 bg-red-950/80 text-red-200":s.variant==="success"?"border-green-500/40 bg-green-950/80 text-green-200":"border-border-default bg-surface-subtle text-text-primary"),children:i.jsx(xv,{children:s.message})},s.id)),i.jsx(mv,{className:"fixed bottom-6 left-1/2 z-[9999] flex -translate-x-1/2 flex-col items-center gap-2 outline-none"})]})})}const r1={xs:"h-[18px] w-[18px] text-[9px]",sm:"h-6 w-6 text-[10px]",md:"h-8 w-8 text-xs",lg:"h-10 w-10 text-sm"};function o1(e){const t=e?.trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length===1?n[0].slice(0,2).toUpperCase():`${n[0][0]??""}${n[n.length-1][0]??""}`.toUpperCase()}function s1({src:e,alt:t,name:n,initials:r,size:o="sm",className:s,...a}){const[c,u]=O.useState(null),f=O.useMemo(()=>o1(r??n??t),[t,r,n]),p=["inline-flex rounded-full shrink-0 select-none items-center justify-center overflow-hidden bg-surface-popover text-white",r1[o],s].filter(Boolean).join(" ");return i.jsx("div",{className:p,title:t??n,...a,children:e&&c!==e?i.jsx("img",{src:e,alt:t??n??"Avatar",className:"h-full w-full object-cover",onError:()=>u(e)}):i.jsx("span",{"aria-hidden":"true",className:"font-medium leading-none",children:f})})}const hn={activity:Ii,"alert-circle":co,"alert-triangle":fu,archive:Li,bookmark:zi,box:Gi,bug:Xi,"check-circle":lo,"check-square":Wl,clipboard:cc,cloud:fc,code:hc,compass:vc,database:wc,eye:_c,"file-text":kc,filter:Dc,flag:Nc,folder:Oc,"git-branch":$c,globe:Vc,hash:Hc,inbox:zc,layers:uo,link:Qc,"list-todo":nl,lock:sl,package:vl,rocket:El,search:Yn,server:kl,settings:ho,"settings-2":Nl,shield:jl,sparkles:Bl,star:mo,tag:vo,target:Ql,terminal:tu,"trending-up":uu,triangle:hu,users:xo,wrench:Ru,zap:Tu,circle:Kt,square:Kl,heart:Uc,"message-square":po,bell:Ui,calendar:Ji,clock:uc,cpu:gc,flame:Ac,globe2:Cc,"help-circle":sc,key:Gc,"life-buoy":Zc,list:fo,map:il,microscope:ul,monitor:hl,puzzle:yl,"refresh-cw":bl,repeat:Ml,shuffle:Il,sliders:Ll,smartphone:Fl,sword:Gl,table:Xl,"thumbs-up":ru,ticket:su,trash:cu,trophy:vu,truck:gu,unlink:wu,user:Cu,wifi:Eu},Qr=Object.keys(hn);function Ei({name:e,size:t=16,className:n,color:r}){const o=hn[e],s=o?i.jsx(o,{size:t,className:n}):i.jsx(Kt,{size:t,className:n});return r?i.jsx("span",{style:{color:r},children:s}):s}function a1({value:e,onChange:t,size:n=16,placeholder:r}){const[o,s]=O.useState(!1),[a,c]=O.useState(""),u=O.useMemo(()=>{const m=a.toLowerCase().trim();return m?Qr.filter(v=>v.includes(m)):Qr},[a]),f=m=>{t(m),s(!1),c("")},p=i.jsx("button",{type:"button",className:"flex h-7 w-7 items-center justify-center rounded border border-border-default bg-surface-default hover:bg-surface-hover text-text-primary transition-colors","aria-label":e?`Icon: ${e}`:"Select icon",children:e?i.jsx(Ei,{name:e,size:n}):r??i.jsx(Kt,{size:n})}),d=i.jsxs("div",{className:"flex flex-col gap-2",style:{width:"280px"},children:[i.jsxs("div",{className:"relative",children:[i.jsx(Yn,{size:13,className:"absolute left-2 top-1/2 -translate-y-1/2 text-text-muted pointer-events-none"}),i.jsx("input",{autoFocus:!0,type:"text",placeholder:"Search icons…",value:a,onChange:m=>c(m.target.value),className:"w-full rounded border border-border-default bg-surface-default py-1.5 pl-7 pr-2 text-xs text-text-primary placeholder:text-text-muted outline-none focus:border-border-focus"})]}),i.jsx("div",{className:"grid grid-cols-8 gap-0.5 max-h-48 overflow-y-auto",children:u.length===0?i.jsx("div",{className:"col-span-8 py-4 text-center text-xs text-text-muted",children:"No icons found"}):u.map(m=>{const v=hn[m],g=e===m;return i.jsx("button",{type:"button",title:m,onClick:()=>f(m),className:`flex items-center justify-center rounded p-1.5 transition-colors ${g?"bg-accent-primary/20 text-accent-primary":"text-text-secondary hover:bg-surface-hover hover:text-text-primary"}`,children:i.jsx(v,{size:16})},m)})}),e&&i.jsxs("div",{className:"border-t border-border-default pt-1.5 text-xs text-text-muted",children:["Selected: ",i.jsx("span",{className:"text-text-primary font-medium",children:e})]})]});return i.jsx(wr,{open:o,onOpenChange:s,content:d,side:"bottom",align:"start",children:p})}exports.Anchor=vt;exports.Arrow=rn;exports.Arrow2=pm;exports.ArrowUpDown=oo;exports.ChevronRight=io;exports.Circle=Kt;exports.CircleAlert=co;exports.CircleCheckBig=lo;exports.Content=nn;exports.Content2=Ra;exports.DismissableLayer=Je;exports.FocusScope=ft;exports.ICON_MAP=hn;exports.Layers=uo;exports.List=fo;exports.ListFilter=st;exports.MessageSquare=po;exports.MtAvatar=s1;exports.MtBacklogIcon=Kv;exports.MtButton=Ye;exports.MtCheckIcon=Gv;exports.MtCheckbox=Au;exports.MtContextMenu=pi;exports.MtDropdown=pn;exports.MtDropdownItem=wv;exports.MtFilterDropdown=Bv;exports.MtHighIcon=Uv;exports.MtIconPreview=Ei;exports.MtIconSelect=a1;exports.MtInProgressIcon=qv;exports.MtInput=qn;exports.MtLowIcon=Hv;exports.MtMediumIcon=Wv;exports.MtOpenIcon=zv;exports.MtPopover=wr;exports.MtSelect=he;exports.MtSelectItem=de;exports.MtSortDropdown=Jv;exports.MtStack=Qv;exports.MtSubgraphIcon=Yv;exports.MtToastProvider=n1;exports.Plus=It;exports.Portal=Qe;exports.Portal$1=_a;exports.Presence=Se;exports.Primitive=U;exports.ReactRemoveScroll=pt;exports.Root=Vu;exports.Root2=mt;exports.Root2$1=Sa;exports.Search=Yn;exports.Settings=ho;exports.Star=mo;exports.Tag=vo;exports.Trash2=Dt;exports.Trigger=Ea;exports.Users=xo;exports.WithContextMenu=yv;exports.X=Pu;exports.composeEventHandlers=j;exports.createContext2=Bu;exports.createContextScope=ye;exports.createLucideIcon=P;exports.createPopperScope=He;exports.createSlot=$e;exports.createSlottable=Ou;exports.hideOthers=Zt;exports.jsxRuntimeExports=i;exports.useComposedRefs=G;exports.useControllableState=Pe;exports.useFocusGuards=Yt;exports.useId=ge;exports.useMtToast=e1;
@@ -1,11 +1,11 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  import React from 'react';
3
- type MtButtonSurface = 'default' | 'accent' | 'ghost';
3
+ type MtButtonSurface = 'default' | 'accent' | 'ghost' | 'panel';
4
4
  interface MtButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  children: ReactNode;
6
6
  type?: 'button' | 'submit' | 'reset';
7
7
  kind?: 'default' | 'icon';
8
- size?: 'medium' | 'large';
8
+ size?: 'small' | 'medium' | 'large';
9
9
  variant?: MtButtonSurface;
10
10
  selected?: boolean;
11
11
  }
@@ -17,7 +17,7 @@ interface MtDropdownProps {
17
17
  className?: string;
18
18
  kind?: 'default' | 'icon';
19
19
  size?: 'medium' | 'large';
20
- variant?: 'default' | 'ghost' | 'accent';
20
+ variant?: 'default' | 'ghost' | 'accent' | 'panel';
21
21
  showCaret?: boolean;
22
22
  }
23
23
  type MtDropdownComponent = ((props: MtDropdownProps) => React.ReactElement) & {
@@ -11,10 +11,16 @@ export type MtFilterGroup = {
11
11
  children: MtFilterNode[];
12
12
  };
13
13
  export type MtFilterNode = MtFilterRule | MtFilterGroup;
14
+ export type MtFilterFieldOption = {
15
+ value: string;
16
+ label?: string;
17
+ };
14
18
  export type MtFilterField = {
15
19
  value: string;
16
20
  label: string;
17
21
  icon?: React.ReactNode;
22
+ /** When provided, the value input becomes a dropdown with these options. */
23
+ options?: MtFilterFieldOption[];
18
24
  };
19
25
  export type MtFilterOperator = {
20
26
  value: string;
@@ -5,3 +5,6 @@ export declare function MtBacklogIcon(): import("react/jsx-runtime").JSX.Element
5
5
  export declare function MtOpenIcon(): import("react/jsx-runtime").JSX.Element;
6
6
  export declare function MtInProgressIcon(): import("react/jsx-runtime").JSX.Element;
7
7
  export declare function MtCheckIcon(): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MtSubgraphIcon({ size }: {
9
+ size?: number;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export declare const ICON_MAP: Record<string, React.ComponentType<{
3
+ size?: number;
4
+ className?: string;
5
+ }>>;
6
+ export declare function MtIconPreview({ name, size, className, color, }: {
7
+ name: string;
8
+ size?: number;
9
+ className?: string;
10
+ color?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export type MtIconSelectProps = {
13
+ value?: string;
14
+ onChange: (value: string) => void;
15
+ /** Size of the icon in the trigger button */
16
+ size?: number;
17
+ placeholder?: React.ReactNode;
18
+ };
19
+ export declare function MtIconSelect({ value, onChange, size, placeholder }: MtIconSelectProps): import("react/jsx-runtime").JSX.Element;