@qodo/design-system 0.15.2 → 0.16.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.
- package/dist/design-system.css +1 -1
- package/dist/index.cjs.js +87 -77
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +71 -5
- package/dist/index.esm.js +5859 -5375
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),Sr=require("react-dom");function Ti(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=Ti(S),yn=Ti(Sr),dm={primary:{50:"#eff6ff",100:"#dbeafe",500:"#3b82f6",600:"#2563eb",900:"#1e3a8a"},secondary:{50:"#f8fafc",100:"#f1f5f9",500:"#64748b",600:"#475569",900:"#0f172a"},success:{50:"#f0fdf4",500:"#22c55e",600:"#16a34a"},error:{50:"#fef2f2",500:"#ef4444",600:"#dc2626"}},um={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},fm={sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem"},pm={fontFamily:{sans:["Inter","system-ui","sans-serif"],mono:["JetBrains Mono","monospace"]},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"}};var zr={exports:{}},sr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var ms;function mm(){if(ms)return sr;ms=1;var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,d,u){var f,p={},g=null,m=null;u!==void 0&&(g=""+u),d.key!==void 0&&(g=""+d.key),d.ref!==void 0&&(m=d.ref);for(f in d)n.call(d,f)&&!a.hasOwnProperty(f)&&(p[f]=d[f]);if(l&&l.defaultProps)for(f in d=l.defaultProps,d)p[f]===void 0&&(p[f]=d[f]);return{$$typeof:t,type:l,key:g,ref:m,props:p,_owner:o.current}}return sr.Fragment=r,sr.jsx=i,sr.jsxs=i,sr}var ir={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,184 +14,194 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+I+w}}var
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+le[
|
|
17
|
+
*/var gs;function gm(){return gs||(gs=1,process.env.NODE_ENV!=="production"&&(function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,v="@@iterator";function h(w){if(w===null||typeof w!="object")return null;var L=b&&w[b]||w[v];return typeof L=="function"?L:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(w){{for(var L=arguments.length,q=new Array(L>1?L-1:0),ne=1;ne<L;ne++)q[ne-1]=arguments[ne];C("error",w,q)}}function C(w,L,q){{var ne=y.ReactDebugCurrentFrame,ue=ne.getStackAddendum();ue!==""&&(L+="%s",q=q.concat([ue]));var fe=q.map(function(de){return String(de)});fe.unshift("Warning: "+L),Function.prototype.apply.call(console[w],console,fe)}}var E=!1,k=!1,A=!1,T=!1,P=!1,B;B=Symbol.for("react.module.reference");function U(w){return!!(typeof w=="string"||typeof w=="function"||w===n||w===a||P||w===o||w===u||w===f||T||w===m||E||k||A||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===l||w.$$typeof===d||w.$$typeof===B||w.getModuleId!==void 0))}function re(w,L,q){var ne=w.displayName;if(ne)return ne;var ue=L.displayName||L.name||"";return ue!==""?q+"("+ue+")":q}function ee(w){return w.displayName||"Context"}function J(w){if(w==null)return null;if(typeof w.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case l:var L=w;return ee(L)+".Consumer";case i:var q=w;return ee(q._context)+".Provider";case d:return re(w,w.render,"ForwardRef");case p:var ne=w.displayName||null;return ne!==null?ne:J(w.type)||"Memo";case g:{var ue=w,fe=ue._payload,de=ue._init;try{return J(de(fe))}catch{return null}}}return null}var z=Object.assign,$=0,_,D,R,M,F,X,N;function V(){}V.__reactDisabledLog=!0;function Y(){{if($===0){_=console.log,D=console.info,R=console.warn,M=console.error,F=console.group,X=console.groupCollapsed,N=console.groupEnd;var w={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}$++}}function O(){{if($--,$===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},w,{value:_}),info:z({},w,{value:D}),warn:z({},w,{value:R}),error:z({},w,{value:M}),group:z({},w,{value:F}),groupCollapsed:z({},w,{value:X}),groupEnd:z({},w,{value:N})})}$<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var W=y.ReactCurrentDispatcher,I;function Q(w,L,q){{if(I===void 0)try{throw Error()}catch(ue){var ne=ue.stack.trim().match(/\n( *(at )?)/);I=ne&&ne[1]||""}return`
|
|
18
|
+
`+I+w}}var te=!1,oe;{var ce=typeof WeakMap=="function"?WeakMap:Map;oe=new ce}function ie(w,L){if(!w||te)return"";{var q=oe.get(w);if(q!==void 0)return q}var ne;te=!0;var ue=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=W.current,W.current=null,Y();try{if(L){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(Re){ne=Re}Reflect.construct(w,[],de)}else{try{de.call()}catch(Re){ne=Re}w.call(de.prototype)}}else{try{throw Error()}catch(Re){ne=Re}w()}}catch(Re){if(Re&&ne&&typeof Re.stack=="string"){for(var le=Re.stack.split(`
|
|
19
|
+
`),Ee=ne.stack.split(`
|
|
20
|
+
`),me=le.length-1,he=Ee.length-1;me>=1&&he>=0&&le[me]!==Ee[he];)he--;for(;me>=1&&he>=0;me--,he--)if(le[me]!==Ee[he]){if(me!==1||he!==1)do if(me--,he--,he<0||le[me]!==Ee[he]){var Ae=`
|
|
21
|
+
`+le[me].replace(" at new "," at ");return w.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",w.displayName)),typeof w=="function"&&oe.set(w,Ae),Ae}while(me>=1&&he>=0);break}}}finally{te=!1,W.current=fe,O(),Error.prepareStackTrace=ue}var It=w?w.displayName||w.name:"",bt=It?Q(It):"";return typeof w=="function"&&oe.set(w,bt),bt}function Se(w,L,q){return ie(w,!1)}function Te(w){var L=w.prototype;return!!(L&&L.isReactComponent)}function Ge(w,L,q){if(w==null)return"";if(typeof w=="function")return ie(w,Te(w));if(typeof w=="string")return Q(w);switch(w){case u:return Q("Suspense");case f:return Q("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case d:return Se(w.render);case p:return Ge(w.type,L,q);case g:{var ne=w,ue=ne._payload,fe=ne._init;try{return Ge(fe(ue),L,q)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,ot={},Wr=y.ReactDebugCurrentFrame;function Ze(w){if(w){var L=w._owner,q=Ge(w.type,w._source,L?L.type:null);Wr.setExtraStackFrame(q)}else Wr.setExtraStackFrame(null)}function Gp(w,L,q,ne,ue){{var fe=Function.call.bind(Me);for(var de in w)if(fe(w,de)){var le=void 0;try{if(typeof w[de]!="function"){var Ee=Error((ne||"React class")+": "+q+" type `"+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[de]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ee.name="Invariant Violation",Ee}le=w[de](L,de,ne,q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(me){le=me}le&&!(le instanceof Error)&&(Ze(ue),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ne||"React class",q,de,typeof le),Ze(null)),le instanceof Error&&!(le.message in ot)&&(ot[le.message]=!0,Ze(ue),x("Failed %s type: %s",q,le.message),Ze(null))}}}var Wp=Array.isArray;function Zn(w){return Wp(w)}function zp(w){{var L=typeof Symbol=="function"&&Symbol.toStringTag,q=L&&w[Symbol.toStringTag]||w.constructor.name||"Object";return q}}function qp(w){try{return rs(w),!1}catch{return!0}}function rs(w){return""+w}function ns(w){if(qp(w))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zp(w)),rs(w)}var os=y.ReactCurrentOwner,Up={key:!0,ref:!0,__self:!0,__source:!0},as,ss;function Hp(w){if(Me.call(w,"ref")){var L=Object.getOwnPropertyDescriptor(w,"ref").get;if(L&&L.isReactWarning)return!1}return w.ref!==void 0}function Kp(w){if(Me.call(w,"key")){var L=Object.getOwnPropertyDescriptor(w,"key").get;if(L&&L.isReactWarning)return!1}return w.key!==void 0}function Yp(w,L){typeof w.ref=="string"&&os.current}function Xp(w,L){{var q=function(){as||(as=!0,x("%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://reactjs.org/link/special-props)",L))};q.isReactWarning=!0,Object.defineProperty(w,"key",{get:q,configurable:!0})}}function Zp(w,L){{var q=function(){ss||(ss=!0,x("%s: `ref` 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://reactjs.org/link/special-props)",L))};q.isReactWarning=!0,Object.defineProperty(w,"ref",{get:q,configurable:!0})}}var Jp=function(w,L,q,ne,ue,fe,de){var le={$$typeof:t,type:w,key:L,ref:q,props:de,_owner:fe};return le._store={},Object.defineProperty(le._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(le,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.defineProperty(le,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.freeze&&(Object.freeze(le.props),Object.freeze(le)),le};function Qp(w,L,q,ne,ue){{var fe,de={},le=null,Ee=null;q!==void 0&&(ns(q),le=""+q),Kp(L)&&(ns(L.key),le=""+L.key),Hp(L)&&(Ee=L.ref,Yp(L,ue));for(fe in L)Me.call(L,fe)&&!Up.hasOwnProperty(fe)&&(de[fe]=L[fe]);if(w&&w.defaultProps){var me=w.defaultProps;for(fe in me)de[fe]===void 0&&(de[fe]=me[fe])}if(le||Ee){var he=typeof w=="function"?w.displayName||w.name||"Unknown":w;le&&Xp(de,he),Ee&&Zp(de,he)}return Jp(w,le,Ee,ue,ne,os.current,de)}}var Jn=y.ReactCurrentOwner,is=y.ReactDebugCurrentFrame;function _t(w){if(w){var L=w._owner,q=Ge(w.type,w._source,L?L.type:null);is.setExtraStackFrame(q)}else is.setExtraStackFrame(null)}var Qn;Qn=!1;function eo(w){return typeof w=="object"&&w!==null&&w.$$typeof===t}function ls(){{if(Jn.current){var w=J(Jn.current.type);if(w)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+w+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+w+"`."}return""}}function em(w){return""}var cs={};function tm(w){{var L=ls();if(!L){var q=typeof w=="string"?w:w.displayName||w.name;q&&(L=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+q+">.")}return L}}function ds(w,L){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var q=tm(L);if(cs[q])return;cs[q]=!0;var ne="";w&&w._owner&&w._owner!==Jn.current&&(ne=" It was passed a child from "+J(w._owner.type)+"."),_t(w),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,ne),_t(null)}}function us(w,L){{if(typeof w!="object")return;if(Zn(w))for(var q=0;q<w.length;q++){var ne=w[q];eo(ne)&&ds(ne,L)}else if(eo(w))w._store&&(w._store.validated=!0);else if(w){var ue=h(w);if(typeof ue=="function"&&ue!==w.entries)for(var fe=ue.call(w),de;!(de=fe.next()).done;)eo(de.value)&&ds(de.value,L)}}}function rm(w){{var L=w.type;if(L==null||typeof L=="string")return;var q;if(typeof L=="function")q=L.propTypes;else if(typeof L=="object"&&(L.$$typeof===d||L.$$typeof===p))q=L.propTypes;else return;if(q){var ne=J(L);Gp(q,w.props,"prop",ne,w)}else if(L.PropTypes!==void 0&&!Qn){Qn=!0;var ue=J(L);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ue||"Unknown")}typeof L.getDefaultProps=="function"&&!L.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nm(w){{for(var L=Object.keys(w.props),q=0;q<L.length;q++){var ne=L[q];if(ne!=="children"&&ne!=="key"){_t(w),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ne),_t(null);break}}w.ref!==null&&(_t(w),x("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var fs={};function ps(w,L,q,ne,ue,fe){{var de=U(w);if(!de){var le="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(le+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ee=em();Ee?le+=Ee:le+=ls();var me;w===null?me="null":Zn(w)?me="array":w!==void 0&&w.$$typeof===t?(me="<"+(J(w.type)||"Unknown")+" />",le=" Did you accidentally export a JSX literal instead of a component?"):me=typeof w,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,le)}var he=Qp(w,L,q,ue,fe);if(he==null)return he;if(de){var Ae=L.children;if(Ae!==void 0)if(ne)if(Zn(Ae)){for(var It=0;It<Ae.length;It++)us(Ae[It],w);Object.freeze&&Object.freeze(Ae)}else x("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 us(Ae,w)}if(Me.call(L,"key")){var bt=J(w),Re=Object.keys(L).filter(function(cm){return cm!=="key"}),to=Re.length>0?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}";if(!fs[bt+to]){var lm=Re.length>0?"{"+Re.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Gn,vt,rp,vt),Wa[vt+Gn]=!0}}return w===n?Zf(ge):Xf(ge),ge}}function Jf(w,L,z){return za(w,L,z,!0)}function Qf(w,L,z){return za(w,L,z,!1)}var ep=Qf,tp=Jf;rr.Fragment=n,rr.jsx=ep,rr.jsxs=tp})()),rr}var Ha;function up(){return Ha||(Ha=1,process.env.NODE_ENV==="production"?Ir.exports=lp():Ir.exports=cp()),Ir.exports}var s=up();function Ks(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ks(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ys(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ks(e))&&(n&&(n+=" "),n+=t);return n}const Ka=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ya=Ys,ln=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],p=a==null?void 0:a[d];if(f===null)return null;const g=Ka(f)||Ka(p);return o[d][g]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,g]=f;return g===void 0||(d[p]=g),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(v=>{let[h,x]=v;return Array.isArray(x)?x.includes({...a,...l}[h]):{...a,...l}[h]===x})?[...d,p,g]:d},[]);return Ya(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},_o="-",dp=e=>{const t=pp(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(_o);return l[0]===""&&l.length!==1&&l.shift(),Xs(l,t)||fp(i)},getConflictingClassGroupIds:(i,l)=>{const u=r[i]||[];return l&&n[i]?[...u,...n[i]]:u}}},Xs=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Xs(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(_o);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},Xa=/^\[(.+)\]$/,fp=e=>{if(Xa.test(e)){const t=Xa.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},pp=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)lo(r[o],n,o,t);return n},lo=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Za(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(mp(o)){lo(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{lo(i,Za(t,a),r,n)})})},Za=(e,t)=>{let r=e;return t.split(_o).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},mp=e=>e.isThemeGetter,gp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},co="!",uo=":",hp=uo.length,vp=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,u=0,d;for(let v=0;v<o.length;v++){let h=o[v];if(i===0&&l===0){if(h===uo){a.push(o.slice(u,v)),u=v+hp;continue}if(h==="/"){d=v;continue}}h==="["?i++:h==="]"?i--:h==="("?l++:h===")"&&l--}const f=a.length===0?o:o.substring(u),p=xp(f),g=p!==f,m=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+uo,a=n;n=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},xp=e=>e.endsWith(co)?e.substring(0,e.length-1):e.startsWith(co)?e.substring(1):e,bp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},yp=e=>({cache:gp(e.cacheSize),parseClassName:vp(e),sortModifiers:bp(e),...dp(e)}),wp=/\s+/,Cp=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(wp);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:h}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let x=!!h,y=n(x?v.substring(0,h):v);if(!y){if(!x){u=f+(u.length>0?" "+u:u);continue}if(y=n(v),!y){u=f+(u.length>0?" "+u:u);continue}x=!1}const b=a(g).join(":"),C=m?b+co:b,R=C+y;if(i.includes(R))continue;i.push(R);const P=o(y,x);for(let j=0;j<P.length;++j){const T=P[j];i.push(C+T)}u=f+(u.length>0?" "+u:u)}return u};function Sp(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Zs(t))&&(n&&(n+=" "),n+=r);return n}const Zs=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zs(e[n]))&&(r&&(r+=" "),r+=t);return r};function Rp(e,...t){let r,n,o,a=i;function i(u){const d=t.reduce((f,p)=>p(f),e());return r=yp(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Cp(u,r);return o(u,f),f}return function(){return a(Sp.apply(null,arguments))}}const he=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Js=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ep=/^\d+\/\d+$/,kp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Np=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tt=e=>Ep.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ot=e=>!!e&&Number.isInteger(Number(e)),Wn=e=>e.endsWith("%")&&ae(e.slice(0,-1)),Ze=e=>kp.test(e),_p=()=>!0,Ap=e=>Pp.test(e)&&!Np.test(e),ei=()=>!1,Ip=e=>jp.test(e),Mp=e=>Tp.test(e),Op=e=>!H(e)&&!K(e),Dp=e=>zt(e,ni,ei),H=e=>Js.test(e),xt=e=>zt(e,oi,Ap),zn=e=>zt(e,Bp,ae),Ja=e=>zt(e,ti,ei),Lp=e=>zt(e,ri,Mp),Mr=e=>zt(e,ai,Ip),K=e=>Qs.test(e),nr=e=>qt(e,oi),$p=e=>qt(e,Gp),Qa=e=>qt(e,ti),Fp=e=>qt(e,ni),Vp=e=>qt(e,ri),Or=e=>qt(e,ai,!0),zt=(e,t,r)=>{const n=Js.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},qt=(e,t,r=!1)=>{const n=Qs.exec(e);return n?n[1]?t(n[1]):r:!1},ti=e=>e==="position"||e==="percentage",ri=e=>e==="image"||e==="url",ni=e=>e==="length"||e==="size"||e==="bg-size",oi=e=>e==="length",Bp=e=>e==="number",Gp=e=>e==="family-name",ai=e=>e==="shadow",Wp=()=>{const e=he("color"),t=he("font"),r=he("text"),n=he("font-weight"),o=he("tracking"),a=he("leading"),i=he("breakpoint"),l=he("container"),u=he("spacing"),d=he("radius"),f=he("shadow"),p=he("inset-shadow"),g=he("text-shadow"),m=he("drop-shadow"),v=he("blur"),h=he("perspective"),x=he("aspect"),y=he("ease"),b=he("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...R(),K,H],j=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],E=()=>[K,H,u],V=()=>[Tt,"full","auto",...E()],U=()=>[ot,"none","subgrid",K,H],re=()=>["auto",{span:["full",ot,K,H]},ot,K,H],te=()=>[ot,"auto",K,H],J=()=>["auto","min","max","fr",K,H],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],D=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...E()],$=()=>[Tt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,K,H],O=()=>[...R(),Qa,Ja,{position:[K,H]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Fp,Dp,{size:[K,H]}],N=()=>[Wn,nr,xt],B=()=>["","none","full",d,K,H],Y=()=>["",ae,nr,xt],M=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ae,Wn,Qa,Ja],Z=()=>["","none",v,K,H],ee=()=>["none",ae,K,H],oe=()=>["none",ae,K,H],ce=()=>[ae,K,H],ie=()=>[Tt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ze],breakpoint:[Ze],color:[_p],container:[Ze],"drop-shadow":[Ze],ease:["in","out","in-out"],font:[Op],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ze],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ze],shadow:[Ze],spacing:["px",ae],text:[Ze],"text-shadow":[Ze],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Tt,H,K,x]}],container:["container"],columns:[{columns:[ae,H,K,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[ot,"auto",K,H]}],basis:[{basis:[Tt,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Tt,"auto","initial","none",H]}],grow:[{grow:["",ae,K,H]}],shrink:[{shrink:["",ae,K,H]}],order:[{order:[ot,"first","last","none",K,H]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...D(),"normal"]}],"justify-self":[{"justify-self":["auto",...D()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...D(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...D(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...D(),"baseline"]}],"place-self":[{"place-self":["auto",...D()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,nr,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,K,zn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wn,H]}],"font-family":[{font:[$p,H,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,K,H]}],"line-clamp":[{"line-clamp":[ae,"none",K,zn]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",K,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",K,xt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[ae,"auto",K,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ot,K,H],radial:["",K,H],conic:[ot,K,H]},Vp,Lp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,K,H]}],"outline-w":[{outline:["",ae,nr,xt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",f,Or,Mr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",p,Or,Mr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[ae,xt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",g,Or,Mr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[ae,K,H]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[K,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,H]}],filter:[{filter:["","none",K,H]}],blur:[{blur:Z()}],brightness:[{brightness:[ae,K,H]}],contrast:[{contrast:[ae,K,H]}],"drop-shadow":[{"drop-shadow":["","none",m,Or,Mr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",ae,K,H]}],"hue-rotate":[{"hue-rotate":[ae,K,H]}],invert:[{invert:["",ae,K,H]}],saturate:[{saturate:[ae,K,H]}],sepia:[{sepia:["",ae,K,H]}],"backdrop-filter":[{"backdrop-filter":["","none",K,H]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[ae,K,H]}],"backdrop-contrast":[{"backdrop-contrast":[ae,K,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,K,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,K,H]}],"backdrop-invert":[{"backdrop-invert":["",ae,K,H]}],"backdrop-opacity":[{"backdrop-opacity":[ae,K,H]}],"backdrop-saturate":[{"backdrop-saturate":[ae,K,H]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,K,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",K,H]}],ease:[{ease:["linear","initial",y,K,H]}],delay:[{delay:[ae,K,H]}],animate:[{animate:["none",b,K,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,K,H]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[K,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,H]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[ae,nr,xt,zn]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zp=Rp(Wp);function _(...e){return zp(Ys(e))}function si(e,t,r){let n="";return typeof e=="object"&&(e.base&&(n+=e.base),Object.keys(t).length&&Object.keys(t).forEach(o=>{o==="className"&&t[o]?(n=n.trim(),n+=` ${t[o]}`):t[o]&&e.hasOwnProperty(o)&&(r&&console.log("styles",o,t[o],e[o]),n=n.trim(),n+=` ${e[o]}`)})),r&&console.log("final.class",n.trim()),n.trim()}const ii=ln("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Je=c.forwardRef(({className:e,variant:t,size:r,...n},o)=>s.jsx("button",{className:_(ii({variant:t,size:r,className:e})),ref:o,...n}));Je.displayName="Button";const qp=ln("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),vr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:_(qp({variant:t,className:e})),...o}));vr.displayName="Input";function es(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Up(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,u=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function ye(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),u=r.length;r=[...r,i];const d=p=>{var y;const{scope:g,children:m,...v}=p,h=((y=g==null?void 0:g[e])==null?void 0:y[u])||l,x=c.useMemo(()=>v,Object.values(v));return s.jsx(h.Provider,{value:x,children:m})};d.displayName=a+"Provider";function f(p,g){var h;const m=((h=g==null?void 0:g[e])==null?void 0:h[u])||l,v=c.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const u=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,Hp(o,...t)]}function Hp(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function ts(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qe(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ts(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ts(e[o],null)}}}}function se(...e){return c.useCallback(Qe(...e),e)}function st(e){const t=Yp(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),u=l.find(Zp);if(u){const d=u.props.children,f=l.map(p=>p===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(d)?c.cloneElement(d,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Kp=st("Slot");function Yp(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=Qp(o),l=Jp(a,o.props);return o.type!==c.Fragment&&(l.ref=n?Qe(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var li=Symbol("radix.slottable");function Xp(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=li,t}function Zp(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===li}function Jp(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Qp(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function cn(e){const t=e+"CollectionProvider",[r,n]=ye(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:x,children:y}=h,b=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:x,itemMap:C,collectionRef:b,children:y})};i.displayName=t;const l=e+"CollectionSlot",u=st(l),d=S.forwardRef((h,x)=>{const{scope:y,children:b}=h,C=a(l,y),R=se(x,C.collectionRef);return s.jsx(u,{ref:R,children:b})});d.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=st(f),m=S.forwardRef((h,x)=>{const{scope:y,children:b,...C}=h,R=S.useRef(null),P=se(x,R),j=a(f,y);return S.useEffect(()=>(j.itemMap.set(R,{ref:R,...C}),()=>void j.itemMap.delete(R))),s.jsx(g,{[p]:"",ref:P,children:b})});m.displayName=f;function v(h){const x=a(e+"CollectionConsumer",h);return S.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,T)=>C.indexOf(j.ref.current)-C.indexOf(T.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},v,n]}var em=c.createContext(void 0);function Ut(e){const t=c.useContext(em);return e||t||"ltr"}var tm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],X=tm.reduce((e,t)=>{const r=st(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,u=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ci(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}function Oe(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function rm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nm="DismissableLayer",fo="dismissableLayer.update",om="dismissableLayer.pointerDownOutside",am="dismissableLayer.focusOutside",rs,ui=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ht=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,d=c.useContext(ui),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),v=se(t,T=>p(T)),h=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),b=f?h.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,R=b>=y,P=lm(T=>{const E=T.target,V=[...d.branches].some(U=>U.contains(E));!R||V||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},g),j=cm(T=>{const E=T.target;[...d.branches].some(U=>U.contains(E))||(a==null||a(T),i==null||i(T),T.defaultPrevented||l==null||l())},g);return rm(T=>{b===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(rs=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ns(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=rs)}},[f,g,r,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ns())},[f,d]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(fo,T),()=>document.removeEventListener(fo,T)},[]),s.jsx(X.div,{...u,ref:v,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,j.onFocusCapture),onBlurCapture:F(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,P.onPointerDownCapture)})});Ht.displayName=nm;var sm="DismissableLayerBranch",im=c.forwardRef((e,t)=>{const r=c.useContext(ui),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(X.div,{...e,ref:o})});im.displayName=sm;function lm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){di(om,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function cm(e,t=globalThis==null?void 0:globalThis.document){const r=Oe(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&di(am,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ns(){const e=new CustomEvent(fo);document.dispatchEvent(e)}function di(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ci(o,a):o.dispatchEvent(a)}var qn=0;function un(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??os()),document.body.insertAdjacentElement("beforeend",e[1]??os()),qn++,()=>{qn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qn--}},[])}function os(){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 Un="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",as={bubbles:!1,cancelable:!0},um="FocusScope",xr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=c.useState(null),d=Oe(o),f=Oe(a),p=c.useRef(null),g=se(t,h=>u(h)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let h=function(C){if(m.paused||!l)return;const R=C.target;l.contains(R)?p.current=R:at(p.current,{select:!0})},x=function(C){if(m.paused||!l)return;const R=C.relatedTarget;R!==null&&(l.contains(R)||at(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const P of C)P.removedNodes.length>0&&at(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),b.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){is.add(m);const h=document.activeElement;if(!l.contains(h)){const y=new CustomEvent(Un,as);l.addEventListener(Un,d),l.dispatchEvent(y),y.defaultPrevented||(dm(hm(fi(l)),{select:!0}),document.activeElement===h&&at(l))}return()=>{l.removeEventListener(Un,d),setTimeout(()=>{const y=new CustomEvent(Hn,as);l.addEventListener(Hn,f),l.dispatchEvent(y),y.defaultPrevented||at(h??document.body,{select:!0}),l.removeEventListener(Hn,f),is.remove(m)},0)}}},[l,d,f,m]);const v=c.useCallback(h=>{if(!r&&!n||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const b=h.currentTarget,[C,R]=fm(b);C&&R?!h.shiftKey&&y===R?(h.preventDefault(),r&&at(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),r&&at(R,{select:!0})):y===b&&h.preventDefault()}},[r,n,m.paused]);return s.jsx(X.div,{tabIndex:-1,...i,ref:g,onKeyDown:v})});xr.displayName=um;function dm(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(at(n,{select:t}),document.activeElement!==r)return}function fm(e){const t=fi(e),r=ss(t,e),n=ss(t.reverse(),e);return[r,n]}function fi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ss(e,t){for(const r of e)if(!pm(r,{upTo:t}))return r}function pm(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 mm(e){return e instanceof HTMLInputElement&&"select"in e}function at(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mm(e)&&t&&e.select()}}var is=gm();function gm(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ls(e,t),e.unshift(t)},remove(t){var r;e=ls(e,t),(r=e[0])==null||r.resume()}}}function ls(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hm(e){return e.filter(t=>t.tagName!=="A")}var xe=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},vm=c[" useId ".trim().toString()]||(()=>{}),xm=0;function me(e){const[t,r]=c.useState(vm());return xe(()=>{r(n=>n??String(xm++))},[e]),t?`radix-${t}`:""}const bm=["top","right","bottom","left"],it=Math.min,Pe=Math.max,Ur=Math.round,Dr=Math.floor,Ue=e=>({x:e,y:e}),ym={left:"right",right:"left",bottom:"top",top:"bottom"},wm={start:"end",end:"start"};function po(e,t,r){return Pe(e,it(t,r))}function et(e,t){return typeof e=="function"?e(t):e}function tt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Io(e){return e==="y"?"height":"width"}const Cm=new Set(["top","bottom"]);function qe(e){return Cm.has(tt(e))?"y":"x"}function Mo(e){return Ao(qe(e))}function Sm(e,t,r){r===void 0&&(r=!1);const n=Kt(e),o=Mo(e),a=Io(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Hr(i)),[i,Hr(i)]}function Rm(e){const t=Hr(e);return[mo(e),t,mo(t)]}function mo(e){return e.replace(/start|end/g,t=>wm[t])}const cs=["left","right"],us=["right","left"],Em=["top","bottom"],km=["bottom","top"];function Pm(e,t,r){switch(e){case"top":case"bottom":return r?t?us:cs:t?cs:us;case"left":case"right":return t?Em:km;default:return[]}}function Nm(e,t,r,n){const o=Kt(e);let a=Pm(tt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(mo)))),a}function Hr(e){return e.replace(/left|right|bottom|top/g,t=>ym[t])}function jm(e){return{top:0,right:0,bottom:0,left:0,...e}}function pi(e){return typeof e!="number"?jm(e):{top:e,right:e,bottom:e,left:e}}function Kr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ds(e,t,r){let{reference:n,floating:o}=e;const a=qe(t),i=Mo(t),l=Io(i),u=tt(t),d=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(Kt(t)){case"start":m[i]-=g*(r&&d?-1:1);break;case"end":m[i]+=g*(r&&d?-1:1);break}return m}const Tm=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=ds(d,n,u),g=n,m={},v=0;for(let h=0;h<l.length;h++){const{name:x,fn:y}=l[h],{x:b,y:C,data:R,reset:P}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:d,platform:i,elements:{reference:e,floating:t}});f=b??f,p=C??p,m={...m,[x]:{...m[x],...R}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(d=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:p}=ds(d,g,u)),h=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function dr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=et(t,e),v=pi(m),x=l[g?p==="floating"?"reference":"floating":p],y=Kr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),b=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),R=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},P=Kr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:C,strategy:u}):b);return{top:(y.top-P.top+v.top)/R.y,bottom:(P.bottom-y.bottom+v.bottom)/R.y,left:(y.left-P.left+v.left)/R.x,right:(P.right-y.right+v.right)/R.x}}const _m=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=et(e,t)||{};if(d==null)return{};const p=pi(f),g={x:r,y:n},m=Mo(o),v=Io(m),h=await i.getDimensions(d),x=m==="y",y=x?"top":"left",b=x?"bottom":"right",C=x?"clientHeight":"clientWidth",R=a.reference[v]+a.reference[m]-g[m]-a.floating[v],P=g[m]-a.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=j?j[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=l.floating[C]||a.floating[v]);const E=R/2-P/2,V=T/2-h[v]/2-1,U=it(p[y],V),re=it(p[b],V),te=U,J=T-h[v]-re,q=T/2-h[v]/2+E,D=po(te,q,J),A=!u.arrow&&Kt(o)!=null&&q!==D&&a.reference[v]/2-(q<te?U:re)-h[v]/2<0,$=A?q<te?q-te:q-J:0;return{[m]:g[m]+$,data:{[m]:D,centerOffset:q-D-$,...A&&{alignmentOffset:$}},reset:A}}}),Am=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...x}=et(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=tt(o),b=qe(l),C=tt(l)===l,R=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=g||(C||!h?[Hr(l)]:Rm(l)),j=v!=="none";!g&&j&&P.push(...Nm(l,h,v,R));const T=[l,...P],E=await dr(t,x),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(E[y]),p){const q=Sm(o,i,R);V.push(E[q[0]],E[q[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(q=>q<=0)){var re,te;const q=(((re=a.flip)==null?void 0:re.index)||0)+1,D=T[q];if(D&&(!(p==="alignment"?b!==qe(D):!1)||U.every(k=>qe(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:q,overflows:U},reset:{placement:D}};let A=(te=U.filter($=>$.overflows[0]<=0).sort(($,k)=>$.overflows[1]-k.overflows[1])[0])==null?void 0:te.placement;if(!A)switch(m){case"bestFit":{var J;const $=(J=U.filter(k=>{if(j){const O=qe(k.placement);return O===b||O==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(O=>O>0).reduce((O,W)=>O+W,0)]).sort((k,O)=>k[1]-O[1])[0])==null?void 0:J[0];$&&(A=$);break}case"initialPlacement":A=l;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function fs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ps(e){return bm.some(t=>e[t]>=0)}const Im=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=et(e,t);switch(n){case"referenceHidden":{const a=await dr(t,{...o,elementContext:"reference"}),i=fs(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ps(i)}}}case"escaped":{const a=await dr(t,{...o,altBoundary:!0}),i=fs(a,r.floating);return{data:{escapedOffsets:i,escaped:ps(i)}}}default:return{}}}}},mi=new Set(["left","top"]);async function Mm(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=tt(r),l=Kt(r),u=qe(r)==="y",d=mi.has(i)?-1:1,f=a&&u?-1:1,p=et(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),u?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const Om=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,u=await Mm(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},Dm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...u}=et(e,t),d={x:r,y:n},f=await dr(t,u),p=qe(tt(o)),g=Ao(p);let m=d[g],v=d[p];if(a){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",b=m+f[x],C=m-f[y];m=po(b,m,C)}if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=v+f[x],C=v-f[y];v=po(b,v,C)}const h=l.fn({...t,[g]:m,[p]:v});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[g]:a,[p]:i}}}}}},Lm=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=et(e,t),f={x:r,y:n},p=qe(o),g=Ao(p);let m=f[g],v=f[p];const h=et(l,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=g==="y"?"height":"width",R=a.reference[g]-a.floating[C]+x.mainAxis,P=a.reference[g]+a.reference[C]-x.mainAxis;m<R?m=R:m>P&&(m=P)}if(d){var y,b;const C=g==="y"?"width":"height",R=mi.has(tt(o)),P=a.reference[p]-a.floating[C]+(R&&((y=i.offset)==null?void 0:y[p])||0)+(R?0:x.crossAxis),j=a.reference[p]+a.reference[C]+(R?0:((b=i.offset)==null?void 0:b[p])||0)-(R?x.crossAxis:0);v<P?v=P:v>j&&(v=j)}return{[g]:m,[p]:v}}}},$m=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:u=()=>{},...d}=et(e,t),f=await dr(t,d),p=tt(o),g=Kt(o),m=qe(o)==="y",{width:v,height:h}=a.floating;let x,y;p==="top"||p==="bottom"?(x=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,x=g==="end"?"top":"bottom");const b=h-f.top-f.bottom,C=v-f.left-f.right,R=it(h-f[x],b),P=it(v-f[y],C),j=!t.middlewareData.shift;let T=R,E=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=b),j&&!g){const U=Pe(f.left,0),re=Pe(f.right,0),te=Pe(f.top,0),J=Pe(f.bottom,0);m?E=v-2*(U!==0||re!==0?U+re:Pe(f.left,f.right)):T=h-2*(te!==0||J!==0?te+J:Pe(f.top,f.bottom))}await u({...t,availableWidth:E,availableHeight:T});const V=await i.getDimensions(l.floating);return v!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function dn(){return typeof window<"u"}function Yt(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gi(e){return dn()?e instanceof Node||e instanceof Ne(e).Node:!1}function De(e){return dn()?e instanceof Element||e instanceof Ne(e).Element:!1}function He(e){return dn()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function ms(e){return!dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Fm=new Set(["inline","contents"]);function br(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Fm.has(o)}const Vm=new Set(["table","td","th"]);function Bm(e){return Vm.has(Yt(e))}const Gm=[":popover-open",":modal"];function fn(e){return Gm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Wm=["transform","translate","scale","rotate","perspective"],zm=["transform","translate","scale","rotate","perspective","filter"],qm=["paint","layout","strict","content"];function Oo(e){const t=Do(),r=De(e)?Le(e):e;return Wm.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||zm.some(n=>(r.willChange||"").includes(n))||qm.some(n=>(r.contain||"").includes(n))}function Um(e){let t=lt(e);for(;He(t)&&!Bt(t);){if(Oo(t))return t;if(fn(t))return null;t=lt(t)}return null}function Do(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Hm=new Set(["html","body","#document"]);function Bt(e){return Hm.has(Yt(e))}function Le(e){return Ne(e).getComputedStyle(e)}function pn(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lt(e){if(Yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ms(e)&&e.host||Ke(e);return ms(t)?t.host:t}function hi(e){const t=lt(e);return Bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&br(t)?t:hi(t)}function fr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=hi(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ne(o);if(a){const l=go(i);return t.concat(i,i.visualViewport||[],br(o)?o:[],l&&r?fr(l):[])}return t.concat(o,fr(o,[],r))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vi(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=He(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=Ur(r)!==a||Ur(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function Lo(e){return De(e)?e:e.contextElement}function Ft(e){const t=Lo(e);if(!He(t))return Ue(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=vi(t);let i=(a?Ur(r.width):r.width)/n,l=(a?Ur(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Km=Ue(0);function xi(e){const t=Ne(e);return!Do()||!t.visualViewport?Km:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ym(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ne(e)?!1:t}function yt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Lo(e);let i=Ue(1);t&&(n?De(n)&&(i=Ft(n)):i=Ft(e));const l=Ym(a,r,n)?xi(a):Ue(0);let u=(o.left+l.x)/i.x,d=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Ne(a),m=n&&De(n)?Ne(n):n;let v=g,h=go(v);for(;h&&n&&m!==v;){const x=Ft(h),y=h.getBoundingClientRect(),b=Le(h),C=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*x.x,R=y.top+(h.clientTop+parseFloat(b.paddingTop))*x.y;u*=x.x,d*=x.y,f*=x.x,p*=x.y,u+=C,d+=R,v=Ne(h),h=go(v)}}return Kr({width:f,height:p,x:u,y:d})}function mn(e,t){const r=pn(e).scrollLeft;return t?t.left+r:yt(Ke(e)).left+r}function bi(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-mn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Xm(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ke(n),l=t?fn(t.floating):!1;if(n===i||l&&a)return r;let u={scrollLeft:0,scrollTop:0},d=Ue(1);const f=Ue(0),p=He(n);if((p||!p&&!a)&&((Yt(n)!=="body"||br(i))&&(u=pn(n)),He(n))){const m=yt(n);d=Ft(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?bi(i,u):Ue(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:r.y*d.y-u.scrollTop*d.y+f.y+g.y}}function Zm(e){return Array.from(e.getClientRects())}function Jm(e){const t=Ke(e),r=pn(e),n=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+mn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Pe(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const gs=25;function Qm(e,t){const r=Ne(e),n=Ke(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const f=Do();(!f||f&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}const d=mn(n);if(d<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(n.clientWidth-p.clientWidth-m);v<=gs&&(a-=v)}else d<=gs&&(a+=d);return{width:a,height:i,x:l,y:u}}const eg=new Set(["absolute","fixed"]);function tg(e,t){const r=yt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=He(e)?Ft(e):Ue(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,d=n*a.y;return{width:i,height:l,x:u,y:d}}function hs(e,t,r){let n;if(t==="viewport")n=Qm(e,r);else if(t==="document")n=Jm(Ke(e));else if(De(t))n=tg(t,r);else{const o=xi(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kr(n)}function yi(e,t){const r=lt(e);return r===t||!De(r)||Bt(r)?!1:Le(r).position==="fixed"||yi(r,t)}function rg(e,t){const r=t.get(e);if(r)return r;let n=fr(e,[],!1).filter(l=>De(l)&&Yt(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?lt(e):e;for(;De(i)&&!Bt(i);){const l=Le(i),u=Oo(i);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&eg.has(o.position)||br(i)&&!u&&yi(e,i))?n=n.filter(f=>f!==i):o=l,i=lt(i)}return t.set(e,n),n}function ng(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?fn(t)?[]:rg(t,this._c):[].concat(r),n],l=i[0],u=i.reduce((d,f)=>{const p=hs(t,f,o);return d.top=Pe(p.top,d.top),d.right=it(p.right,d.right),d.bottom=it(p.bottom,d.bottom),d.left=Pe(p.left,d.left),d},hs(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function og(e){const{width:t,height:r}=vi(e);return{width:t,height:r}}function ag(e,t,r){const n=He(t),o=Ke(t),a=r==="fixed",i=yt(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=Ue(0);function d(){u.x=mn(o)}if(n||!n&&!a)if((Yt(t)!=="body"||br(o))&&(l=pn(t)),n){const m=yt(t,!0,a,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&d();a&&!n&&o&&d();const f=o&&!n&&!a?bi(o,l):Ue(0),p=i.left+l.scrollLeft-u.x-f.x,g=i.top+l.scrollTop-u.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function Kn(e){return Le(e).position==="static"}function vs(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ke(e)===r&&(r=r.ownerDocument.body),r}function wi(e,t){const r=Ne(e);if(fn(e))return r;if(!He(e)){let o=lt(e);for(;o&&!Bt(o);){if(De(o)&&!Kn(o))return o;o=lt(o)}return r}let n=vs(e,t);for(;n&&Bm(n)&&Kn(n);)n=vs(n,t);return n&&Bt(n)&&Kn(n)&&!Oo(n)?r:n||Um(e)||r}const sg=async function(e){const t=this.getOffsetParent||wi,r=this.getDimensions,n=await r(e.floating);return{reference:ag(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ig(e){return Le(e).direction==="rtl"}const lg={convertOffsetParentRelativeRectToViewportRelativeRect:Xm,getDocumentElement:Ke,getClippingRect:ng,getOffsetParent:wi,getElementRects:sg,getClientRects:Zm,getDimensions:og,getScale:Ft,isElement:De,isRTL:ig};function Ci(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cg(e,t){let r=null,n;const o=Ke(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=d;if(l||t(),!g||!m)return;const v=Dr(p),h=Dr(o.clientWidth-(f+g)),x=Dr(o.clientHeight-(p+m)),y=Dr(f),C={rootMargin:-v+"px "+-h+"px "+-x+"px "+-y+"px",threshold:Pe(0,it(1,u))||1};let R=!0;function P(j){const T=j[0].intersectionRatio;if(T!==u){if(!R)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ci(d,e.getBoundingClientRect())&&i(),R=!1}try{r=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,C)}r.observe(e)}return i(!0),a}function ug(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Lo(e),f=o||a?[...d?fr(d):[],...fr(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=d&&l?cg(d,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let v,h=u?yt(e):null;u&&x();function x(){const y=yt(e);h&&!Ci(h,y)&&r(),h=y,v=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const dg=Om,fg=Dm,pg=Am,mg=$m,gg=Im,xs=_m,hg=Lm,vg=(e,t,r)=>{const n=new Map,o={platform:lg,...r},a={...o.platform,_c:n};return Tm(e,t,{...o,platform:a})};var xg=typeof document<"u",bg=function(){},Gr=xg?S.useLayoutEffect:bg;function Yr(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Yr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Yr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Si(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bs(e,t){const r=Si(e);return Math.round(t*r)/r}function Yn(e){const t=c.useRef(e);return Gr(()=>{t.current=e}),t}function yg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);Yr(g,n)||m(n);const[v,h]=c.useState(null),[x,y]=c.useState(null),b=c.useCallback(k=>{k!==j.current&&(j.current=k,h(k))},[]),C=c.useCallback(k=>{k!==T.current&&(T.current=k,y(k))},[]),R=a||v,P=i||x,j=c.useRef(null),T=c.useRef(null),E=c.useRef(f),V=u!=null,U=Yn(u),re=Yn(o),te=Yn(d),J=c.useCallback(()=>{if(!j.current||!T.current)return;const k={placement:t,strategy:r,middleware:g};re.current&&(k.platform=re.current),vg(j.current,T.current,k).then(O=>{const W={...O,isPositioned:te.current!==!1};q.current&&!Yr(E.current,W)&&(E.current=W,sn.flushSync(()=>{p(W)}))})},[g,t,r,re,te]);Gr(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[d]);const q=c.useRef(!1);Gr(()=>(q.current=!0,()=>{q.current=!1}),[]),Gr(()=>{if(R&&(j.current=R),P&&(T.current=P),R&&P){if(U.current)return U.current(R,P,J);J()}},[R,P,J,U,V]);const D=c.useMemo(()=>({reference:j,floating:T,setReference:b,setFloating:C}),[b,C]),A=c.useMemo(()=>({reference:R,floating:P}),[R,P]),$=c.useMemo(()=>{const k={position:r,left:0,top:0};if(!A.floating)return k;const O=bs(A.floating,f.x),W=bs(A.floating,f.y);return l?{...k,transform:"translate("+O+"px, "+W+"px)",...Si(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:W}},[r,l,A.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:D,elements:A,floatingStyles:$}),[f,J,D,A,$])}const wg=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xs({element:n.current,padding:o}).fn(r):{}:n?xs({element:n,padding:o}).fn(r):{}}}},Cg=(e,t)=>({...dg(e),options:[e,t]}),Sg=(e,t)=>({...fg(e),options:[e,t]}),Rg=(e,t)=>({...hg(e),options:[e,t]}),Eg=(e,t)=>({...pg(e),options:[e,t]}),kg=(e,t)=>({...mg(e),options:[e,t]}),Pg=(e,t)=>({...gg(e),options:[e,t]}),Ng=(e,t)=>({...wg(e),options:[e,t]});var jg="Arrow",Ri=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(X.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ri.displayName=jg;var Tg=Ri;function $o(e){const[t,r]=c.useState(void 0);return xe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,l=d.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fo="Popper",[Ei,ut]=ye(Fo),[_g,ki]=Ei(Fo),Pi=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(_g,{scope:t,anchor:n,onAnchorChange:o,children:r})};Pi.displayName=Fo;var Ni="PopperAnchor",ji=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ki(Ni,r),i=c.useRef(null),l=se(t,i),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=(n==null?void 0:n.current)||i.current,d!==u.current&&a.onAnchorChange(u.current)}),n?null:s.jsx(X.div,{...o,ref:l})});ji.displayName=Ni;var Vo="PopperContent",[Ag,Ig]=Ei(Vo),Ti=c.forwardRef((e,t)=>{var I,Z,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...h}=e,x=ki(Vo,r),[y,b]=c.useState(null),C=se(t,Ce=>b(Ce)),[R,P]=c.useState(null),j=$o(R),T=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(d)?d:[d],te=re.length>0,J={padding:U,boundary:re.filter(Og),altBoundary:te},{refs:q,floatingStyles:D,placement:A,isPositioned:$,middlewareData:k}=yg({strategy:"fixed",placement:V,whileElementsMounted:(...Ce)=>ug(...Ce,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Cg({mainAxis:o+E,alignmentAxis:i}),u&&Sg({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Rg():void 0,...J}),u&&Eg({...J}),kg({...J,apply:({elements:Ce,rects:je,availableWidth:Be,availableHeight:Ie})=>{const{width:nt,height:Ar}=je.reference,Xe=Ce.floating.style;Xe.setProperty("--radix-popper-available-width",`${Be}px`),Xe.setProperty("--radix-popper-available-height",`${Ie}px`),Xe.setProperty("--radix-popper-anchor-width",`${nt}px`),Xe.setProperty("--radix-popper-anchor-height",`${Ar}px`)}}),R&&Ng({element:R,padding:l}),Dg({arrowWidth:T,arrowHeight:E}),g&&Pg({strategy:"referenceHidden",...J})]}),[O,W]=Ii(A),Q=Oe(v);xe(()=>{$&&(Q==null||Q())},[$,Q]);const N=(I=k.arrow)==null?void 0:I.x,B=(Z=k.arrow)==null?void 0:Z.y,Y=((ee=k.arrow)==null?void 0:ee.centerOffset)!==0,[M,G]=c.useState();return xe(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:$?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[(oe=k.transformOrigin)==null?void 0:oe.x,(ce=k.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=k.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Ag,{scope:r,placedSide:O,onArrowChange:P,arrowX:N,arrowY:B,shouldHideArrow:Y,children:s.jsx(X.div,{"data-side":O,"data-align":W,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});Ti.displayName=Vo;var _i="PopperArrow",Mg={top:"bottom",right:"left",bottom:"top",left:"right"},Ai=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Ig(_i,n),i=Mg[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Tg,{...o,ref:r,style:{...o.style,display:"block"}})})});Ai.displayName=_i;function Og(e){return e!==null}var Dg=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:r,rects:n,middlewareData:o}=t,i=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=Ii(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let v="",h="";return d==="bottom"?(v=i?p:`${g}px`,h=`${-u}px`):d==="top"?(v=i?p:`${g}px`,h=`${n.floating.height+u}px`):d==="right"?(v=`${-u}px`,h=i?p:`${m}px`):d==="left"&&(v=`${n.floating.width+u}px`,h=i?p:`${m}px`),{data:{x:v,y:h}}}});function Ii(e){const[t,r="center"]=e.split("-");return[t,r]}var yr=Pi,wr=ji,gn=Ti,hn=Ai,Lg="Portal",Xt=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);xe(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?hr.createPortal(s.jsx(X.div,{...n,ref:t}),i):null});Xt.displayName=Lg;var $g=c[" useInsertionEffect ".trim().toString()]||xe;function be({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Fg({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,n])}const d=c.useCallback(f=>{var p;if(l){const g=Vg(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[u,d]}function Fg({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return $g(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Vg(e){return typeof e=="function"}function Bo(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Mi=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"}),Bg="VisuallyHidden",Oi=c.forwardRef((e,t)=>s.jsx(X.span,{...e,ref:t,style:{...Mi,...e.style}}));Oi.displayName=Bg;var Gg=Oi,Wg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_t=new WeakMap,Lr=new WeakMap,$r={},Xn=0,Di=function(e){return e&&(e.host||Di(e.parentNode))},zg=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Di(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},qg=function(e,t,r,n){var o=zg(t,Array.isArray(e)?e:[e]);$r[r]||($r[r]=new WeakMap);var a=$r[r],i=[],l=new Set,u=new Set(o),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};o.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),v=m!==null&&m!=="false",h=(_t.get(g)||0)+1,x=(a.get(g)||0)+1;_t.set(g,h),a.set(g,x),i.push(g),h===1&&v&&Lr.set(g,!0),x===1&&g.setAttribute(r,"true"),v||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),Xn++,function(){i.forEach(function(p){var g=_t.get(p)-1,m=a.get(p)-1;_t.set(p,g),a.set(p,m),g||(Lr.has(p)||p.removeAttribute(n),Lr.delete(p)),m||p.removeAttribute(r)}),Xn--,Xn||(_t=new WeakMap,_t=new WeakMap,Lr=new WeakMap,$r={})}},vn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Wg(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qg(n,o,r,"aria-hidden")):function(){return null}},ze=function(){return ze=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ze.apply(this,arguments)};function Li(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ug(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Wr="right-scroll-bar-position",zr="width-before-scroll-bar",Hg="with-scroll-bars-hidden",Kg="--removed-body-scroll-bar-size";function Zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yg(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Xg=typeof window<"u"?c.useLayoutEffect:c.useEffect,ys=new WeakMap;function Zg(e,t){var r=Yg(null,function(n){return e.forEach(function(o){return Zn(o,n)})});return Xg(function(){var n=ys.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||Zn(l,null)}),a.forEach(function(l){o.has(l)||Zn(l,i)})}ys.set(r,e)},[e]),r}function Jg(e){return e}function Qg(e,t){t===void 0&&(t=Jg);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),r}}}};return o}function eh(e){e===void 0&&(e={});var t=Qg(null);return t.options=ze({async:!0,ssr:!1},e),t}var $i=function(e){var t=e.sideCar,r=Li(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,ze({},r))};$i.isSideCarExport=!0;function th(e,t){return e.useMedium(t),$i}var Fi=eh(),Jn=function(){},xn=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:Jn,onWheelCapture:Jn,onTouchMoveCapture:Jn}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,v=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,C=e.gapMode,R=Li(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,j=Zg([r,t]),T=ze(ze({},R),o);return c.createElement(c.Fragment,null,f&&c.createElement(P,{sideCar:Fi,removeScrollBar:d,shards:p,noRelative:m,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),ze(ze({},T),{ref:j})):c.createElement(b,ze({},T,{className:u,ref:j}),l))});xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xn.classNames={fullWidth:zr,zeroRight:Wr};var rh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rh();return t&&e.setAttribute("nonce",t),e}function oh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ah(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sh=function(){var e=0,t=null;return{add:function(r){e==0&&(t=nh())&&(oh(t,r),ah(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ih=function(){var e=sh();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Vi=function(){var e=ih(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},lh={left:0,top:0,right:0,gap:0},Qn=function(e){return parseInt(e||"",10)||0},ch=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qn(r),Qn(n),Qn(o)]},uh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lh;var t=ch(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dh=Vi(),Vt="data-scroll-locked",fh=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
overflow: hidden `).concat(n,`;
|
|
37
|
-
overscroll-behavior: contain;
|
|
38
|
-
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
39
|
-
padding-left: `.concat(o,`px;
|
|
40
|
-
padding-top: `).concat(a,`px;
|
|
41
|
-
padding-right: `).concat(i,`px;
|
|
42
|
-
margin-left:0;
|
|
43
|
-
margin-top:0;
|
|
44
|
-
margin-right: `).concat(l,"px ").concat(n,`;
|
|
45
|
-
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.`).concat(Wr,` {
|
|
49
|
-
right: `).concat(l,"px ").concat(n,`;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.`).concat(zr,` {
|
|
53
|
-
margin-right: `).concat(l,"px ").concat(n,`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.`).concat(Wr," .").concat(Wr,` {
|
|
57
|
-
right: 0 `).concat(n,`;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.`).concat(zr," .").concat(zr,` {
|
|
61
|
-
margin-right: 0 `).concat(n,`;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
body[`).concat(Vt,`] {
|
|
65
|
-
`).concat(Kg,": ").concat(l,`px;
|
|
66
|
-
}
|
|
67
|
-
`)},ws=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},ph=function(){c.useEffect(function(){return document.body.setAttribute(Vt,(ws()+1).toString()),function(){var e=ws()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},mh=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;ph();var a=c.useMemo(function(){return uh(o)},[o]);return c.createElement(dh,{styles:fh(a,!t,o,r?"":"!important")})},ho=!1;if(typeof window<"u")try{var Fr=Object.defineProperty({},"passive",{get:function(){return ho=!0,!0}});window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{ho=!1}var At=ho?{passive:!1}:!1,gh=function(e){return e.tagName==="TEXTAREA"},Bi=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!gh(e)&&r[t]==="visible")},hh=function(e){return Bi(e,"overflowY")},vh=function(e){return Bi(e,"overflowX")},Cs=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Gi(e,n);if(o){var a=Wi(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},xh=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},bh=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Gi=function(e,t){return e==="v"?hh(t):vh(t)},Wi=function(e,t){return e==="v"?xh(t):bh(t)},yh=function(e,t){return e==="h"&&t==="rtl"?-1:1},wh=function(e,t,r,n,o){var a=yh(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,u=t.contains(l),d=!1,f=i>0,p=0,g=0;do{if(!l)break;var m=Wi(e,l),v=m[0],h=m[1],x=m[2],y=h-x-a*v;(v||y)&&Gi(e,l)&&(p+=y,g+=v);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},Vr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},Rs=function(e){return e&&"current"in e?e.current:e},Ch=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Sh=function(e){return`
|
|
68
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
69
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
70
|
-
`)},Rh=0,It=[];function Eh(e){var t=c.useRef([]),r=c.useRef([0,0]),n=c.useRef(),o=c.useState(Rh++)[0],a=c.useState(Vi)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Ug([e.lockRef.current],(e.shards||[]).map(Rs),!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 l=c.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=Vr(h),b=r.current,C="deltaX"in h?h.deltaX:b[0]-y[0],R="deltaY"in h?h.deltaY:b[1]-y[1],P,j=h.target,T=Math.abs(C)>Math.abs(R)?"h":"v";if("touches"in h&&T==="h"&&j.type==="range")return!1;var E=Cs(T,j);if(!E)return!0;if(E?P=T:(P=T==="v"?"h":"v",E=Cs(T,j)),!E)return!1;if(!n.current&&"changedTouches"in h&&(C||R)&&(n.current=P),!P)return!0;var V=n.current||P;return wh(V,x,h,V==="h"?C:R)},[]),u=c.useCallback(function(h){var x=h;if(!(!It.length||It[It.length-1]!==a)){var y="deltaY"in x?Ss(x):Vr(x),b=t.current.filter(function(P){return P.name===x.type&&(P.target===x.target||x.target===P.shadowParent)&&Ch(P.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var C=(i.current.shards||[]).map(Rs).filter(Boolean).filter(function(P){return P.contains(x.target)}),R=C.length>0?l(x,C[0]):!i.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),d=c.useCallback(function(h,x,y,b){var C={name:h,delta:x,target:y,should:b,shadowParent:kh(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(R){return R!==C})},1)},[]),f=c.useCallback(function(h){r.current=Vr(h),n.current=void 0},[]),p=c.useCallback(function(h){d(h.type,Ss(h),h.target,l(h,e.lockRef.current))},[]),g=c.useCallback(function(h){d(h.type,Vr(h),h.target,l(h,e.lockRef.current))},[]);c.useEffect(function(){return It.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,At),document.addEventListener("touchmove",u,At),document.addEventListener("touchstart",f,At),function(){It=It.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,At),document.removeEventListener("touchmove",u,At),document.removeEventListener("touchstart",f,At)}},[]);var m=e.removeScrollBar,v=e.inert;return c.createElement(c.Fragment,null,v?c.createElement(a,{styles:Sh(o)}):null,m?c.createElement(mh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ph=th(Fi,Eh);var Cr=c.forwardRef(function(e,t){return c.createElement(xn,ze({},e,{ref:t,sideCar:Ph}))});Cr.classNames=xn.classNames;var Nh=[" ","Enter","ArrowUp","ArrowDown"],jh=[" ","Enter"],wt="Select",[bn,yn,Th]=cn(wt),[Zt,Z1]=ye(wt,[Th,ut]),wn=ut(),[_h,dt]=Zt(wt),[Ah,Ih]=Zt(wt),zi=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:g,required:m,form:v}=e,h=wn(t),[x,y]=c.useState(null),[b,C]=c.useState(null),[R,P]=c.useState(!1),j=Ut(d),[T,E]=be({prop:n,defaultProp:o??!1,onChange:a,caller:wt}),[V,U]=be({prop:i,defaultProp:l,onChange:u,caller:wt}),re=c.useRef(null),te=x?v||!!x.closest("form"):!0,[J,q]=c.useState(new Set),D=Array.from(J).map(A=>A.props.value).join(";");return s.jsx(yr,{...h,children:s.jsxs(_h,{required:m,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:P,contentId:me(),value:V,onValueChange:U,open:T,onOpenChange:E,dir:j,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(bn.Provider,{scope:t,children:s.jsx(Ah,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(A=>{q($=>new Set($).add(A))},[]),onNativeOptionRemove:c.useCallback(A=>{q($=>{const k=new Set($);return k.delete(A),k})},[]),children:r})}),te?s.jsxs(gl,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:V,onChange:A=>U(A.target.value),disabled:g,form:v,children:[V===void 0?s.jsx("option",{value:""}):null,Array.from(J)]},D):null]})})};zi.displayName=wt;var qi="SelectTrigger",Ui=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=wn(r),i=dt(qi,r),l=i.disabled||n,u=se(t,i.onTriggerChange),d=yn(r),f=c.useRef("touch"),[p,g,m]=vl(h=>{const x=d().filter(C=>!C.disabled),y=x.find(C=>C.value===i.value),b=xl(x,h,y);b!==void 0&&i.onValueChange(b.value)}),v=h=>{l||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return s.jsx(wr,{asChild:!0,...a,children:s.jsx(X.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":hl(i.value)?"":void 0,...o,ref:u,onClick:F(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&v(h)}),onPointerDown:F(o.onPointerDown,h=>{f.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(v(h),h.preventDefault())}),onKeyDown:F(o.onKeyDown,h=>{const x=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(x&&h.key===" ")&&Nh.includes(h.key)&&(v(),h.preventDefault())})})})});Ui.displayName=qi;var Hi="SelectValue",Ki=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,u=dt(Hi,r),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=se(t,u.onValueNodeChange);return xe(()=>{d(f)},[d,f]),s.jsx(X.span,{...l,ref:p,style:{pointerEvents:"none"},children:hl(u.value)?s.jsx(s.Fragment,{children:i}):a})});Ki.displayName=Hi;var Mh="SelectIcon",Yi=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(X.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Yi.displayName=Mh;var Oh="SelectPortal",Xi=e=>s.jsx(Xt,{asChild:!0,...e});Xi.displayName=Oh;var Ct="SelectContent",Zi=c.forwardRef((e,t)=>{const r=dt(Ct,e.__scopeSelect),[n,o]=c.useState();if(xe(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?sn.createPortal(s.jsx(Ji,{scope:e.__scopeSelect,children:s.jsx(bn.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(Qi,{...e,ref:t})});Zi.displayName=Ct;var Me=10,[Ji,ft]=Zt(Ct),Dh="SelectContentImpl",Lh=st("SelectContent.RemoveScroll"),Qi=c.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x,...y}=e,b=dt(Ct,r),[C,R]=c.useState(null),[P,j]=c.useState(null),T=se(t,I=>R(I)),[E,V]=c.useState(null),[U,re]=c.useState(null),te=yn(r),[J,q]=c.useState(!1),D=c.useRef(!1);c.useEffect(()=>{if(C)return vn(C)},[C]),un();const A=c.useCallback(I=>{const[Z,...ee]=te().map(ie=>ie.ref.current),[oe]=ee.slice(-1),ce=document.activeElement;for(const ie of I)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Z&&P&&(P.scrollTop=0),ie===oe&&P&&(P.scrollTop=P.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[te,P]),$=c.useCallback(()=>A([E,C]),[A,E,C]);c.useEffect(()=>{J&&$()},[J,$]);const{onOpenChange:k,triggerPointerDownPosRef:O}=b;c.useEffect(()=>{if(C){let I={x:0,y:0};const Z=oe=>{var ce,ie;I={x:Math.abs(Math.round(oe.pageX)-(((ce=O.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},ee=oe=>{I.x<=10&&I.y<=10?oe.preventDefault():C.contains(oe.target)||k(!1),document.removeEventListener("pointermove",Z),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ee,{capture:!0})}}},[C,k,O]),c.useEffect(()=>{const I=()=>k(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[k]);const[W,Q]=vl(I=>{const Z=te().filter(ce=>!ce.disabled),ee=Z.find(ce=>ce.ref.current===document.activeElement),oe=xl(Z,I,ee);oe&&setTimeout(()=>oe.ref.current.focus())}),N=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&(V(I),oe&&(D.current=!0))},[b.value]),B=c.useCallback(()=>C==null?void 0:C.focus(),[C]),Y=c.useCallback((I,Z,ee)=>{const oe=!D.current&&!ee;(b.value!==void 0&&b.value===Z||oe)&&re(I)},[b.value]),M=n==="popper"?vo:el,G=M===vo?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:v,hideWhenDetached:h,avoidCollisions:x}:{};return s.jsx(Ji,{scope:r,content:C,viewport:P,onViewportChange:j,itemRefCallback:N,selectedItem:E,onItemLeave:B,itemTextRefCallback:Y,focusSelectedItem:$,selectedItemText:U,position:n,isPositioned:J,searchRef:W,children:s.jsx(Cr,{as:Lh,allowPinchZoom:!0,children:s.jsx(xr,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:F(o,I=>{var Z;(Z=b.trigger)==null||Z.focus({preventScroll:!0}),I.preventDefault()}),children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:s.jsx(M,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...G,onPlaced:()=>q(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,I=>{const Z=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Z&&I.key.length===1&&Q(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let oe=te().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(I.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ce=I.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>A(oe)),I.preventDefault()}})})})})})})});Qi.displayName=Dh;var $h="SelectItemAlignedPosition",el=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=dt(Ct,r),i=ft(Ct,r),[l,u]=c.useState(null),[d,f]=c.useState(null),p=se(t,T=>f(T)),g=yn(r),m=c.useRef(!1),v=c.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=i,C=c.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&d&&h&&x&&y){const T=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),V=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-E.left,ie=V.left-ce,Ce=T.left-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=es(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.left=nt+"px"}else{const ce=E.right-U.right,ie=window.innerWidth-V.right-ce,Ce=window.innerWidth-T.right-ie,je=T.width+Ce,Be=Math.max(je,E.width),Ie=window.innerWidth-Me,nt=es(ie,[Me,Math.max(Me,Ie-Be)]);l.style.minWidth=je+"px",l.style.right=nt+"px"}const re=g(),te=window.innerHeight-Me*2,J=h.scrollHeight,q=window.getComputedStyle(d),D=parseInt(q.borderTopWidth,10),A=parseInt(q.paddingTop,10),$=parseInt(q.borderBottomWidth,10),k=parseInt(q.paddingBottom,10),O=D+A+J+k+$,W=Math.min(x.offsetHeight*5,O),Q=window.getComputedStyle(h),N=parseInt(Q.paddingTop,10),B=parseInt(Q.paddingBottom,10),Y=T.top+T.height/2-Me,M=te-Y,G=x.offsetHeight/2,I=x.offsetTop+G,Z=D+A+I,ee=O-Z;if(Z<=Y){const ce=re.length>0&&x===re[re.length-1].ref.current;l.style.bottom="0px";const ie=d.clientHeight-h.offsetTop-h.offsetHeight,Ce=Math.max(M,G+(ce?B:0)+ie+$),je=Z+Ce;l.style.height=je+"px"}else{const ce=re.length>0&&x===re[0].ref.current;l.style.top="0px";const Ce=Math.max(Y,D+h.offsetTop+(ce?N:0)+G)+ee;l.style.height=Ce+"px",h.scrollTop=Z-Y+h.offsetTop}l.style.margin=`${Me}px 0`,l.style.minHeight=W+"px",l.style.maxHeight=te+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,d,h,x,y,a.dir,n]);xe(()=>C(),[C]);const[R,P]=c.useState();xe(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const j=c.useCallback(T=>{T&&v.current===!0&&(C(),b==null||b(),v.current=!1)},[C,b]);return s.jsx(Vh,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:s.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:s.jsx(X.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});el.displayName=$h;var Fh="SelectPopperPosition",vo=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Me,...a}=e,i=wn(r);return s.jsx(gn,{...i,...a,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});vo.displayName=Fh;var[Vh,Go]=Zt(Ct,{}),xo="SelectViewport",tl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=ft(xo,r),i=Go(xo,r),l=se(t,a.onViewportChange),u=c.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:n}),s.jsx(bn.Slot,{scope:r,children:s.jsx(X.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:F(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(u.current-f.scrollTop);if(m>0){const v=window.innerHeight-Me*2,h=parseFloat(p.style.minHeight),x=parseFloat(p.style.height),y=Math.max(h,x);if(y<v){const b=y+m,C=Math.min(v,b),R=b-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});tl.displayName=xo;var rl="SelectGroup",[Bh,Gh]=Zt(rl),nl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=me();return s.jsx(Bh,{scope:r,id:o,children:s.jsx(X.div,{role:"group","aria-labelledby":o,...n,ref:t})})});nl.displayName=rl;var ol="SelectLabel",al=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gh(ol,r);return s.jsx(X.div,{id:o.id,...n,ref:t})});al.displayName=ol;var Xr="SelectItem",[Wh,sl]=Zt(Xr),il=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=dt(Xr,r),u=ft(Xr,r),d=l.value===n,[f,p]=c.useState(a??""),[g,m]=c.useState(!1),v=se(t,b=>{var C;return(C=u.itemRefCallback)==null?void 0:C.call(u,b,n,o)}),h=me(),x=c.useRef("touch"),y=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 s.jsx(Wh,{scope:r,value:n,disabled:o,textId:h,isSelected:d,onItemTextChange:c.useCallback(b=>{p(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:s.jsx(bn.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(X.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:F(i.onFocus,()=>m(!0)),onBlur:F(i.onBlur,()=>m(!1)),onClick:F(i.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:F(i.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:F(i.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:F(i.onPointerMove,b=>{var C;x.current=b.pointerType,o?(C=u.onItemLeave)==null||C.call(u):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(i.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=u.onItemLeave)==null||C.call(u))}),onKeyDown:F(i.onKeyDown,b=>{var R;((R=u.searchRef)==null?void 0:R.current)!==""&&b.key===" "||(jh.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});il.displayName=Xr;var ar="SelectItemText",ll=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=dt(ar,r),l=ft(ar,r),u=sl(ar,r),d=Ih(ar,r),[f,p]=c.useState(null),g=se(t,y=>p(y),u.onItemTextChange,y=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,y,u.value,u.disabled)}),m=f==null?void 0:f.textContent,v=c.useMemo(()=>s.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=d;return xe(()=>(h(v),()=>x(v)),[h,x,v]),s.jsxs(s.Fragment,{children:[s.jsx(X.span,{id:u.textId,...a,ref:g}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sn.createPortal(a.children,i.valueNode):null]})});ll.displayName=ar;var cl="SelectItemIndicator",ul=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return sl(cl,r).isSelected?s.jsx(X.span,{"aria-hidden":!0,...n,ref:t}):null});ul.displayName=cl;var bo="SelectScrollUpButton",dl=c.forwardRef((e,t)=>{const r=ft(bo,e.__scopeSelect),n=Go(bo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollTop>0;a(d)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});dl.displayName=bo;var yo="SelectScrollDownButton",fl=c.forwardRef((e,t)=>{const r=ft(yo,e.__scopeSelect),n=Go(yo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return xe(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(pl,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=r;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});fl.displayName=yo;var pl=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=ft("SelectScrollButton",r),i=c.useRef(null),l=yn(r),u=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),xe(()=>{var f;const d=l().find(p=>p.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(X.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:F(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:F(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:F(o.onPointerLeave,()=>{u()})})}),zh="SelectSeparator",ml=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(X.div,{"aria-hidden":!0,...n,ref:t})});ml.displayName=zh;var wo="SelectArrow",qh=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=wn(r),a=dt(wo,r),i=ft(wo,r);return a.open&&i.position==="popper"?s.jsx(hn,{...o,...n,ref:t}):null});qh.displayName=wo;var Uh="SelectBubbleInput",gl=c.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=c.useRef(null),a=se(n,o),i=Bo(t);return c.useEffect(()=>{const l=o.current;if(!l)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(X.select,{...r,style:{...Mi,...r.style},ref:a,defaultValue:t})});gl.displayName=Uh;function hl(e){return e===""||e===void 0}function vl(e){const t=Oe(e),r=c.useRef(""),n=c.useRef(0),o=c.useCallback(i=>{const l=r.current+i;t(l),(function u(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),a=c.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function xl(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=Hh(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function Hh(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Kh=zi,bl=Ui,Yh=Ki,Xh=Yi,Zh=Xi,yl=Zi,Jh=tl,Qh=nl,wl=al,Cl=il,ev=ll,tv=ul,Sl=dl,Rl=fl,El=ml;/**
|
|
30
|
+
<%s key={someKey} {...props} />`,to,bt,lm,bt),fs[bt+to]=!0}}return w===n?nm(he):rm(he),he}}function om(w,L,q){return ps(w,L,q,!0)}function am(w,L,q){return ps(w,L,q,!1)}var sm=am,im=om;ir.Fragment=n,ir.jsx=sm,ir.jsxs=im})()),ir}var vs;function vm(){return vs||(vs=1,process.env.NODE_ENV==="production"?zr.exports=mm():zr.exports=gm()),zr.exports}var s=vm();function Ai(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ai(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function _i(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ai(e))&&(n&&(n+=" "),n+=t);return n}const hs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xs=_i,wn=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xs(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],p=a==null?void 0:a[u];if(f===null)return null;const g=hs(f)||hs(p);return o[u][g]}),l=r&&Object.entries(r).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),d=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(b=>{let[v,h]=b;return Array.isArray(h)?h.includes({...a,...l}[v]):{...a,...l}[v]===h})?[...u,p,g]:u},[]);return xs(e,i,d,r==null?void 0:r.class,r==null?void 0:r.className)},Zo="-",hm=e=>{const t=bm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(Zo);return l[0]===""&&l.length!==1&&l.shift(),Ii(l,t)||xm(i)},getConflictingClassGroupIds:(i,l)=>{const d=r[i]||[];return l&&n[i]?[...d,...n[i]]:d}}},Ii=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Ii(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Zo);return(i=t.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},bs=/^\[(.+)\]$/,xm=e=>{if(bs.test(e)){const t=bs.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},bm=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Eo(r[o],n,o,t);return n},Eo=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ys(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(ym(o)){Eo(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{Eo(i,ys(t,a),r,n)})})},ys=(e,t)=>{let r=e;return t.split(Zo).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},ym=e=>e.isThemeGetter,wm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Ro="!",Po=":",Cm=Po.length,Sm=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,l=0,d=0,u;for(let b=0;b<o.length;b++){let v=o[b];if(i===0&&l===0){if(v===Po){a.push(o.slice(d,b)),d=b+Cm;continue}if(v==="/"){u=b;continue}}v==="["?i++:v==="]"?i--:v==="("?l++:v===")"&&l--}const f=a.length===0?o:o.substring(d),p=Em(f),g=p!==f,m=u&&u>d?u-d:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const o=t+Po,a=n;n=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},Em=e=>e.endsWith(Ro)?e.substring(0,e.length-1):e.startsWith(Ro)?e.substring(1):e,Rm=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},Pm=e=>({cache:wm(e.cacheSize),parseClassName:Sm(e),sortModifiers:Rm(e),...hm(e)}),km=/\s+/,jm=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],l=e.trim().split(km);let d="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=r(f);if(p){d=f+(d.length>0?" "+d:d);continue}let h=!!v,y=n(h?b.substring(0,v):b);if(!y){if(!h){d=f+(d.length>0?" "+d:d);continue}if(y=n(b),!y){d=f+(d.length>0?" "+d:d);continue}h=!1}const x=a(g).join(":"),C=m?x+Ro:x,E=C+y;if(i.includes(E))continue;i.push(E);const k=o(y,h);for(let A=0;A<k.length;++A){const T=k[A];i.push(C+T)}d=f+(d.length>0?" "+d:d)}return d};function Nm(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Mi(t))&&(n&&(n+=" "),n+=r);return n}const Mi=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Mi(e[n]))&&(r&&(r+=" "),r+=t);return r};function Tm(e,...t){let r,n,o,a=i;function i(d){const u=t.reduce((f,p)=>p(f),e());return r=Pm(u),n=r.cache.get,o=r.cache.set,a=l,l(d)}function l(d){const u=n(d);if(u)return u;const f=jm(d,r);return o(d,f),f}return function(){return a(Nm.apply(null,arguments))}}const xe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Oi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Di=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Am=/^\d+\/\d+$/,_m=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Im=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Mm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Om=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mt=e=>Am.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),at=e=>!!e&&Number.isInteger(Number(e)),ro=e=>e.endsWith("%")&&ae(e.slice(0,-1)),Je=e=>_m.test(e),$m=()=>!0,Lm=e=>Im.test(e)&&!Mm.test(e),$i=()=>!1,Fm=e=>Om.test(e),Vm=e=>Dm.test(e),Bm=e=>!H(e)&&!K(e),Gm=e=>Yt(e,Vi,$i),H=e=>Oi.test(e),yt=e=>Yt(e,Bi,Lm),no=e=>Yt(e,Hm,ae),ws=e=>Yt(e,Li,$i),Wm=e=>Yt(e,Fi,Vm),qr=e=>Yt(e,Gi,Fm),K=e=>Di.test(e),lr=e=>Xt(e,Bi),zm=e=>Xt(e,Km),Cs=e=>Xt(e,Li),qm=e=>Xt(e,Vi),Um=e=>Xt(e,Fi),Ur=e=>Xt(e,Gi,!0),Yt=(e,t,r)=>{const n=Oi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Xt=(e,t,r=!1)=>{const n=Di.exec(e);return n?n[1]?t(n[1]):r:!1},Li=e=>e==="position"||e==="percentage",Fi=e=>e==="image"||e==="url",Vi=e=>e==="length"||e==="size"||e==="bg-size",Bi=e=>e==="length",Hm=e=>e==="number",Km=e=>e==="family-name",Gi=e=>e==="shadow",Ym=()=>{const e=xe("color"),t=xe("font"),r=xe("text"),n=xe("font-weight"),o=xe("tracking"),a=xe("leading"),i=xe("breakpoint"),l=xe("container"),d=xe("spacing"),u=xe("radius"),f=xe("shadow"),p=xe("inset-shadow"),g=xe("text-shadow"),m=xe("drop-shadow"),b=xe("blur"),v=xe("perspective"),h=xe("aspect"),y=xe("ease"),x=xe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...E(),K,H],A=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],P=()=>[K,H,d],B=()=>[Mt,"full","auto",...P()],U=()=>[at,"none","subgrid",K,H],re=()=>["auto",{span:["full",at,K,H]},at,K,H],ee=()=>[at,"auto",K,H],J=()=>["auto","min","max","fr",K,H],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...P()],D=()=>[Mt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],R=()=>[e,K,H],M=()=>[...E(),Cs,ws,{position:[K,H]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",qm,Gm,{size:[K,H]}],N=()=>[ro,lr,yt],V=()=>["","none","full",u,K,H],Y=()=>["",ae,lr,yt],O=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ae,ro,Cs,ws],Q=()=>["","none",b,K,H],te=()=>["none",ae,K,H],oe=()=>["none",ae,K,H],ce=()=>[ae,K,H],ie=()=>[Mt,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Je],breakpoint:[Je],color:[$m],container:[Je],"drop-shadow":[Je],ease:["in","out","in-out"],font:[Bm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Je],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Je],shadow:[Je],spacing:["px",ae],text:[Je],"text-shadow":[Je],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mt,H,K,h]}],container:["container"],columns:[{columns:[ae,H,K,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[at,"auto",K,H]}],basis:[{basis:[Mt,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,Mt,"auto","initial","none",H]}],grow:[{grow:["",ae,K,H]}],shrink:[{shrink:["",ae,K,H]}],order:[{order:[at,"first","last","none",K,H]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[l,"screen",...D()]}],"min-w":[{"min-w":[l,"screen","none",...D()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,lr,yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,K,no]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ro,H]}],"font-family":[{font:[zm,H,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,K,H]}],"line-clamp":[{"line-clamp":[ae,"none",K,no]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",K,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",K,yt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ae,"auto",K,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},at,K,H],radial:["",K,H],conic:[at,K,H]},Um,Wm]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ae,K,H]}],"outline-w":[{outline:["",ae,lr,yt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",f,Ur,qr]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",p,Ur,qr]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ae,yt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,Ur,qr]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ae,K,H]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[K,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,H]}],filter:[{filter:["","none",K,H]}],blur:[{blur:Q()}],brightness:[{brightness:[ae,K,H]}],contrast:[{contrast:[ae,K,H]}],"drop-shadow":[{"drop-shadow":["","none",m,Ur,qr]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ae,K,H]}],"hue-rotate":[{"hue-rotate":[ae,K,H]}],invert:[{invert:["",ae,K,H]}],saturate:[{saturate:[ae,K,H]}],sepia:[{sepia:["",ae,K,H]}],"backdrop-filter":[{"backdrop-filter":["","none",K,H]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ae,K,H]}],"backdrop-contrast":[{"backdrop-contrast":[ae,K,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,K,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,K,H]}],"backdrop-invert":[{"backdrop-invert":["",ae,K,H]}],"backdrop-opacity":[{"backdrop-opacity":[ae,K,H]}],"backdrop-saturate":[{"backdrop-saturate":[ae,K,H]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,K,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",K,H]}],ease:[{ease:["linear","initial",y,K,H]}],delay:[{delay:[ae,K,H]}],animate:[{animate:["none",x,K,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,K,H]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[K,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,H]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ae,lr,yt,no]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Xm=Tm(Ym);function j(...e){return Xm(_i(e))}function Wi(e,t,r){let n="";return typeof e=="object"&&(e.base&&(n+=e.base),Object.keys(t).length&&Object.keys(t).forEach(o=>{o==="className"&&t[o]?(n=n.trim(),n+=` ${t[o]}`):t[o]&&e.hasOwnProperty(o)&&(r&&console.log("styles",o,t[o],e[o]),n=n.trim(),n+=` ${e[o]}`)})),r&&console.log("final.class",n.trim()),n.trim()}/**
|
|
31
|
+
* @license lucide-react v0.525.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/const Zm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jm=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Ss=e=>{const t=Jm(e);return t.charAt(0).toUpperCase()+t.slice(1)},zi=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Qm=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
71
36
|
* @license lucide-react v0.525.0 - ISC
|
|
72
37
|
*
|
|
73
38
|
* This source code is licensed under the ISC license.
|
|
74
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/
|
|
40
|
+
*/var eg={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"};/**
|
|
76
41
|
* @license lucide-react v0.525.0 - ISC
|
|
77
42
|
*
|
|
78
43
|
* This source code is licensed under the ISC license.
|
|
79
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/
|
|
45
|
+
*/const tg=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},d)=>S.createElement("svg",{ref:d,...eg,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:zi("lucide",o),...!a&&!Qm(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,f])=>S.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
|
|
81
46
|
* @license lucide-react v0.525.0 - ISC
|
|
82
47
|
*
|
|
83
48
|
* This source code is licensed under the ISC license.
|
|
84
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
50
|
+
*/const ve=(e,t)=>{const r=S.forwardRef(({className:n,...o},a)=>S.createElement(tg,{ref:a,iconNode:t,className:zi(`lucide-${Zm(Ss(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Ss(e),r};/**
|
|
86
51
|
* @license lucide-react v0.525.0 - ISC
|
|
87
52
|
*
|
|
88
53
|
* This source code is licensed under the ISC license.
|
|
89
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
55
|
+
*/const rg=[["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"}]],ng=ve("arrow-up-down",rg);/**
|
|
91
56
|
* @license lucide-react v0.525.0 - ISC
|
|
92
57
|
*
|
|
93
58
|
* This source code is licensed under the ISC license.
|
|
94
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
60
|
+
*/const og=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Er=ve("check",og);/**
|
|
96
61
|
* @license lucide-react v0.525.0 - ISC
|
|
97
62
|
*
|
|
98
63
|
* This source code is licensed under the ISC license.
|
|
99
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
65
|
+
*/const ag=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Cn=ve("chevron-down",ag);/**
|
|
101
66
|
* @license lucide-react v0.525.0 - ISC
|
|
102
67
|
*
|
|
103
68
|
* This source code is licensed under the ISC license.
|
|
104
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
70
|
+
*/const sg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ig=ve("chevron-left",sg);/**
|
|
106
71
|
* @license lucide-react v0.525.0 - ISC
|
|
107
72
|
*
|
|
108
73
|
* This source code is licensed under the ISC license.
|
|
109
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
75
|
+
*/const lg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qi=ve("chevron-right",lg);/**
|
|
111
76
|
* @license lucide-react v0.525.0 - ISC
|
|
112
77
|
*
|
|
113
78
|
* This source code is licensed under the ISC license.
|
|
114
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
80
|
+
*/const cg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],dg=ve("chevron-up",cg);/**
|
|
116
81
|
* @license lucide-react v0.525.0 - ISC
|
|
117
82
|
*
|
|
118
83
|
* This source code is licensed under the ISC license.
|
|
119
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
85
|
+
*/const ug=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],fg=ve("chevrons-up-down",ug);/**
|
|
121
86
|
* @license lucide-react v0.525.0 - ISC
|
|
122
87
|
*
|
|
123
88
|
* This source code is licensed under the ISC license.
|
|
124
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
90
|
+
*/const pg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mg=ve("circle",pg);/**
|
|
126
91
|
* @license lucide-react v0.525.0 - ISC
|
|
127
92
|
*
|
|
128
93
|
* This source code is licensed under the ISC license.
|
|
129
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
95
|
+
*/const gg=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],vg=ve("corner-down-right",gg);/**
|
|
131
96
|
* @license lucide-react v0.525.0 - ISC
|
|
132
97
|
*
|
|
133
98
|
* This source code is licensed under the ISC license.
|
|
134
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const
|
|
100
|
+
*/const hg=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],xg=ve("dot",hg);/**
|
|
136
101
|
* @license lucide-react v0.525.0 - ISC
|
|
137
102
|
*
|
|
138
103
|
* This source code is licensed under the ISC license.
|
|
139
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const
|
|
105
|
+
*/const bg=[["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"}]],Ui=ve("ellipsis",bg);/**
|
|
141
106
|
* @license lucide-react v0.525.0 - ISC
|
|
142
107
|
*
|
|
143
108
|
* This source code is licensed under the ISC license.
|
|
144
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const
|
|
110
|
+
*/const yg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],wg=ve("info",yg);/**
|
|
146
111
|
* @license lucide-react v0.525.0 - ISC
|
|
147
112
|
*
|
|
148
113
|
* This source code is licensed under the ISC license.
|
|
149
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const
|
|
115
|
+
*/const Cg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Sg=ve("list-filter",Cg);/**
|
|
151
116
|
* @license lucide-react v0.525.0 - ISC
|
|
152
117
|
*
|
|
153
118
|
* This source code is licensed under the ISC license.
|
|
154
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const
|
|
120
|
+
*/const Eg=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hi=ve("loader-circle",Eg);/**
|
|
156
121
|
* @license lucide-react v0.525.0 - ISC
|
|
157
122
|
*
|
|
158
123
|
* This source code is licensed under the ISC license.
|
|
159
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const
|
|
125
|
+
*/const Rg=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Pg=ve("mail",Rg);/**
|
|
161
126
|
* @license lucide-react v0.525.0 - ISC
|
|
162
127
|
*
|
|
163
128
|
* This source code is licensed under the ISC license.
|
|
164
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const
|
|
130
|
+
*/const kg=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ki=ve("search",kg);/**
|
|
166
131
|
* @license lucide-react v0.525.0 - ISC
|
|
167
132
|
*
|
|
168
133
|
* This source code is licensed under the ISC license.
|
|
169
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const
|
|
135
|
+
*/const jg=[["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"}]],Ng=ve("tag",jg);/**
|
|
171
136
|
* @license lucide-react v0.525.0 - ISC
|
|
172
137
|
*
|
|
173
138
|
* This source code is licensed under the ISC license.
|
|
174
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const
|
|
140
|
+
*/const Tg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Ag=ve("trash-2",Tg);/**
|
|
176
141
|
* @license lucide-react v0.525.0 - ISC
|
|
177
142
|
*
|
|
178
143
|
* This source code is licensed under the ISC license.
|
|
179
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const
|
|
145
|
+
*/const _g=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Ig=ve("trash",_g);/**
|
|
181
146
|
* @license lucide-react v0.525.0 - ISC
|
|
182
147
|
*
|
|
183
148
|
* This source code is licensed under the ISC license.
|
|
184
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const $v=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",$v),Tl=Kh,Fv=Qh,_l=Yh,zo=c.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(bl,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:_(_("qodo qodo-select-trigger flex h-9 w-full min-w-0 items-center justify-between","rounded-md border bg-purple-muted-700 border-purple-muted-500","text-sm data-[placeholder]:text-muted-foreground [&:not([data-placeholder])]:text-purple-muted-300 md:text-sm selection:bg-primary selection:text-primary-foreground","px-3 py-1","shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200",e)),...n,children:[s.jsx("div",{className:"overflow-hidden whitespace-nowrap text-ellipsis",children:t}),s.jsx(Xh,{asChild:!0,children:s.jsx(Wo,{className:"h-4 w-4 text-purple-muted-300"})})]})});zo.displayName=bl.displayName;const qo=c.forwardRef(({className:e,...t},r)=>s.jsx(Sl,{ref:r,className:_("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(gv,{className:"h-4 w-4"})}));qo.displayName=Sl.displayName;const Uo=c.forwardRef(({className:e,...t},r)=>s.jsx(Rl,{ref:r,className:_("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Wo,{className:"h-4 w-4"})}));Uo.displayName=Rl.displayName;const Ho=c.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(Zh,{container:n,children:s.jsxs(yl,{ref:a,className:_("qodo qodo-select-content relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[s.jsx(qo,{}),s.jsx(Jh,{className:_("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(Uo,{})]})}));Ho.displayName=yl.displayName;const Al=c.forwardRef(({className:e,...t},r)=>s.jsx(wl,{ref:r,className:_("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Al.displayName=wl.displayName;const Ko=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Cl,{ref:n,title:r.value,className:_(_("qodo qodo-select-item relative w-full cursor-default select-none rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-purple-muted-500 focus:text-purple-100 text-purple-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","block overflow-hidden whitespace-nowrap text-ellipsis"),e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 mt-0.5",children:s.jsx(tv,{children:s.jsx(Cn,{className:"h-4 w-4"})})}),s.jsx(ev,{children:t})]}));Ko.displayName=Cl.displayName;const Il=c.forwardRef(({className:e,...t},r)=>s.jsx(El,{ref:r,className:_("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));Il.displayName=El.displayName;var ks=1,Vv=.9,Bv=.8,Gv=.17,eo=.1,to=.999,Wv=.9999,zv=.99,qv=/[\\\/_+.#"@\[\(\{&]/,Uv=/[\\\/_+.#"@\[\(\{&]/g,Hv=/[\s-]/,Ml=/[\s-]/g;function Co(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?ks:zv;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var u=n.charAt(a),d=r.indexOf(u,o),f=0,p,g,m,v;d>=0;)p=Co(e,t,r,n,d+1,a+1,i),p>f&&(d===o?p*=ks:qv.test(e.charAt(d-1))?(p*=Bv,m=e.slice(o,d-1).match(Uv),m&&o>0&&(p*=Math.pow(to,m.length))):Hv.test(e.charAt(d-1))?(p*=Vv,v=e.slice(o,d-1).match(Ml),v&&o>0&&(p*=Math.pow(to,v.length))):(p*=Gv,o>0&&(p*=Math.pow(to,d-o))),e.charAt(d)!==t.charAt(a)&&(p*=Wv)),(p<eo&&r.charAt(d-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(d-1)!==n.charAt(a))&&(g=Co(e,t,r,n,d+1,a+2,i),g*eo>p&&(p=g*eo)),p>f&&(f=p),d=r.indexOf(u,d+1);return i[l]=f,f}function Ps(e){return e.toLowerCase().replace(Ml," ")}function Kv(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Co(e,t,Ps(e),Ps(t),0,0,{})}function Yv(e,t){return c.useReducer((r,n)=>t[r][n]??r,e)}var ke=e=>{const{present:t,children:r}=e,n=Xv(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),a=se(n.ref,Zv(o));return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:a}):null};ke.displayName="Presence";function Xv(e){const[t,r]=c.useState(),n=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[l,u]=Yv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=Br(n.current);a.current=l==="mounted"?d:"none"},[l]),xe(()=>{const d=n.current,f=o.current;if(f!==e){const g=a.current,m=Br(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),xe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=Br(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=m=>{m.target===t&&(a.current=Br(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Br(e){return(e==null?void 0:e.animationName)||"none"}function Zv(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Rn="Dialog",[Ol,J1]=ye(Rn),[Jv,$e]=Ol(Rn),Dl=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=c.useRef(null),u=c.useRef(null),[d,f]=be({prop:n,defaultProp:o??!1,onChange:a,caller:Rn});return s.jsx(Jv,{scope:t,triggerRef:l,contentRef:u,contentId:me(),titleId:me(),descriptionId:me(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};Dl.displayName=Rn;var Ll="DialogTrigger",$l=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Ll,r),a=se(t,o.triggerRef);return s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zo(o.open),...n,ref:a,onClick:F(e.onClick,o.onOpenToggle)})});$l.displayName=Ll;var Yo="DialogPortal",[Qv,Fl]=Ol(Yo,{forceMount:void 0}),Vl=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=$e(Yo,t);return s.jsx(Qv,{scope:t,forceMount:r,children:c.Children.map(n,i=>s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:i})}))})};Vl.displayName=Yo;var Zr="DialogOverlay",Bl=c.forwardRef((e,t)=>{const r=Fl(Zr,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(Zr,e.__scopeDialog);return a.modal?s.jsx(ke,{present:n||a.open,children:s.jsx(tx,{...o,ref:t})}):null});Bl.displayName=Zr;var ex=st("DialogOverlay.RemoveScroll"),tx=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Zr,r);return s.jsx(Cr,{as:ex,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(X.div,{"data-state":Zo(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),St="DialogContent",Gl=c.forwardRef((e,t)=>{const r=Fl(St,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=$e(St,e.__scopeDialog);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(rx,{...o,ref:t}):s.jsx(nx,{...o,ref:t})})});Gl.displayName=St;var rx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(null),o=se(t,r.contentRef,n);return c.useEffect(()=>{const a=n.current;if(a)return vn(a)},[]),s.jsx(Wl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault())})}),nx=c.forwardRef((e,t)=>{const r=$e(St,e.__scopeDialog),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(Wl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Wl=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=$e(St,r),u=c.useRef(null),d=se(t,u);return un(),s.jsxs(s.Fragment,{children:[s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Zo(l.open),...i,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(ox,{titleId:l.titleId}),s.jsx(sx,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Xo="DialogTitle",zl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Xo,r);return s.jsx(X.h2,{id:o.titleId,...n,ref:t})});zl.displayName=Xo;var ql="DialogDescription",Ul=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(ql,r);return s.jsx(X.p,{id:o.descriptionId,...n,ref:t})});Ul.displayName=ql;var Hl="DialogClose",Kl=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=$e(Hl,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Kl.displayName=Hl;function Zo(e){return e?"open":"closed"}var Yl="DialogTitleWarning",[Q1,Xl]=Up(Yl,{contentName:St,titleName:Xo,docsSlug:"dialog"}),ox=({titleId:e})=>{const t=Xl(Yl),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
150
|
+
*/const Mg=[["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"}]],Og=ve("triangle-alert",Mg);/**
|
|
151
|
+
* @license lucide-react v0.525.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Dg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",Dg),Yi=wn("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:j(Yi({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(Hi,{className:"ml-2 w-4 h-4 animate-spin"})]}));Qe.displayName="Button";const $g=wn("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),Rr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:j($g({variant:t,className:e})),...o}));Rr.displayName="Input";function Es(e,[t,r]){return Math.min(r,Math.max(t,e))}function G(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Lg(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,d=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function we(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),d=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[d])||l,h=c.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:h,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[d])||l,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const d=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[n,Fg(o,...t)]}function Fg(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:d,scopeName:u})=>{const p=d(a)[`__scope${u}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Rs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Rs(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Rs(e[o],null)}}}}function se(...e){return c.useCallback(et(...e),e)}function it(e){const t=Bg(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),d=l.find(Wg);if(d){const u=d.props.children,f=l.map(p=>p===d?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Vg=it("Slot");function Bg(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=qg(o),l=zg(a,o.props);return o.type!==c.Fragment&&(l.ref=n?et(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xi=Symbol("radix.slottable");function Gg(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Xi,t}function Wg(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xi}function zg(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const d=a(...l);return o(...l),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function qg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function En(e){const t=e+"CollectionProvider",[r,n]=we(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:h,children:y}=v,x=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:h,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=it(l),u=S.forwardRef((v,h)=>{const{scope:y,children:x}=v,C=a(l,y),E=se(h,C.collectionRef);return s.jsx(d,{ref:E,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=it(f),m=S.forwardRef((v,h)=>{const{scope:y,children:x,...C}=v,E=S.useRef(null),k=se(h,E),A=a(f,y);return S.useEffect(()=>(A.itemMap.set(E,{ref:E,...C}),()=>void A.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:k,children:x})});m.displayName=f;function b(v){const h=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((A,T)=>C.indexOf(A.ref.current)-C.indexOf(T.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var Ug=c.createContext(void 0);function Zt(e){const t=c.useContext(Ug);return e||t||"ltr"}var Hg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Z=Hg.reduce((e,t)=>{const r=it(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zi(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Kg(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Yg="DismissableLayer",ko="dismissableLayer.update",Xg="dismissableLayer.pointerDownOutside",Zg="dismissableLayer.focusOutside",Ps,Ji=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...d}=e,u=c.useContext(Ji),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,T=>p(T)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(h),x=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,k=ev(T=>{const P=T.target,B=[...u.branches].some(U=>U.contains(P));!E||B||(o==null||o(T),i==null||i(T),T.defaultPrevented||l==null||l())},g),A=tv(T=>{const P=T.target;[...u.branches].some(U=>U.contains(P))||(a==null||a(T),i==null||i(T),T.defaultPrevented||l==null||l())},g);return Kg(T=>{x===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ps=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ks(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ps)}},[f,g,r,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ks())},[f,u]),c.useEffect(()=>{const T=()=>m({});return document.addEventListener(ko,T),()=>document.removeEventListener(ko,T)},[]),s.jsx(Z.div,{...d,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,A.onFocusCapture),onBlurCapture:G(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,k.onPointerDownCapture)})});Jt.displayName=Yg;var Jg="DismissableLayerBranch",Qg=c.forwardRef((e,t)=>{const r=c.useContext(Ji),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(Z.div,{...e,ref:o})});Qg.displayName=Jg;function ev(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){Qi(Xg,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function tv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&Qi(Zg,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ks(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function Qi(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Zi(o,a):o.dispatchEvent(a)}var oo=0;function Rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??js()),document.body.insertAdjacentElement("beforeend",e[1]??js()),oo++,()=>{oo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),oo--}},[])}function js(){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 ao="focusScope.autoFocusOnMount",so="focusScope.autoFocusOnUnmount",Ns={bubbles:!1,cancelable:!0},rv="FocusScope",Pr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,d]=c.useState(null),u=De(o),f=De(a),p=c.useRef(null),g=se(t,v=>d(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:st(p.current,{select:!0})},h=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||st(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&st(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),x.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){As.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(ao,Ns);l.addEventListener(ao,u),l.dispatchEvent(y),y.defaultPrevented||(nv(lv(el(l)),{select:!0}),document.activeElement===v&&st(l))}return()=>{l.removeEventListener(ao,u),setTimeout(()=>{const y=new CustomEvent(so,Ns);l.addEventListener(so,f),l.dispatchEvent(y),y.defaultPrevented||st(v??document.body,{select:!0}),l.removeEventListener(so,f),As.remove(m)},0)}}},[l,u,f,m]);const b=c.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(h&&y){const x=v.currentTarget,[C,E]=ov(x);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&st(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&st(E,{select:!0})):y===x&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(Z.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Pr.displayName=rv;function nv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(st(n,{select:t}),document.activeElement!==r)return}function ov(e){const t=el(e),r=Ts(t,e),n=Ts(t.reverse(),e);return[r,n]}function el(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ts(e,t){for(const r of e)if(!av(r,{upTo:t}))return r}function av(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 sv(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&sv(e)&&t&&e.select()}}var As=iv();function iv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=_s(e,t),e.unshift(t)},remove(t){var r;e=_s(e,t),(r=e[0])==null||r.resume()}}}function _s(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function lv(e){return e.filter(t=>t.tagName!=="A")}var be=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},cv=c[" useId ".trim().toString()]||(()=>{}),dv=0;function ge(e){const[t,r]=c.useState(cv());return be(()=>{r(n=>n??String(dv++))},[e]),t?`radix-${t}`:""}const uv=["top","right","bottom","left"],lt=Math.min,je=Math.max,on=Math.round,Hr=Math.floor,He=e=>({x:e,y:e}),fv={left:"right",right:"left",bottom:"top",top:"bottom"},pv={start:"end",end:"start"};function jo(e,t,r){return je(e,lt(t,r))}function tt(e,t){return typeof e=="function"?e(t):e}function rt(e){return e.split("-")[0]}function Qt(e){return e.split("-")[1]}function Jo(e){return e==="x"?"y":"x"}function Qo(e){return e==="y"?"height":"width"}const mv=new Set(["top","bottom"]);function Ue(e){return mv.has(rt(e))?"y":"x"}function ea(e){return Jo(Ue(e))}function gv(e,t,r){r===void 0&&(r=!1);const n=Qt(e),o=ea(e),a=Qo(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=an(i)),[i,an(i)]}function vv(e){const t=an(e);return[No(e),t,No(t)]}function No(e){return e.replace(/start|end/g,t=>pv[t])}const Is=["left","right"],Ms=["right","left"],hv=["top","bottom"],xv=["bottom","top"];function bv(e,t,r){switch(e){case"top":case"bottom":return r?t?Ms:Is:t?Is:Ms;case"left":case"right":return t?hv:xv;default:return[]}}function yv(e,t,r,n){const o=Qt(e);let a=bv(rt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(No)))),a}function an(e){return e.replace(/left|right|bottom|top/g,t=>fv[t])}function wv(e){return{top:0,right:0,bottom:0,left:0,...e}}function tl(e){return typeof e!="number"?wv(e):{top:e,right:e,bottom:e,left:e}}function sn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Os(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=ea(t),l=Qo(i),d=rt(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(d){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(Qt(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const Cv=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Os(u,n,d),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:h,fn:y}=l[v],{x,y:C,data:E,reset:k}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,m={...m,[h]:{...m[h],...E}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(u=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:p}=Os(u,g,d)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function xr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=tt(t,e),b=tl(m),h=l[g?p==="floating"?"reference":"floating":p],y=sn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),x=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},k=sn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:d}):x);return{top:(y.top-k.top+b.top)/E.y,bottom:(k.bottom-y.bottom+b.bottom)/E.y,left:(y.left-k.left+b.left)/E.x,right:(k.right-y.right+b.right)/E.x}}const Sv=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=tt(e,t)||{};if(u==null)return{};const p=tl(f),g={x:r,y:n},m=ea(o),b=Qo(m),v=await i.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",C=h?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],k=g[m]-a.reference[m],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=A?A[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(A)))&&(T=l.floating[C]||a.floating[b]);const P=E/2-k/2,B=T/2-v[b]/2-1,U=lt(p[y],B),re=lt(p[x],B),ee=U,J=T-v[b]-re,z=T/2-v[b]/2+P,$=jo(ee,z,J),_=!d.arrow&&Qt(o)!=null&&z!==$&&a.reference[b]/2-(z<ee?U:re)-v[b]/2<0,D=_?z<ee?z-ee:z-J:0;return{[m]:g[m]+D,data:{[m]:$,centerOffset:z-$-D,..._&&{alignmentOffset:D}},reset:_}}}),Ev=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=tt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rt(o),x=Ue(l),C=rt(l)===l,E=await(d.isRTL==null?void 0:d.isRTL(u.floating)),k=g||(C||!v?[an(l)]:vv(l)),A=b!=="none";!g&&A&&k.push(...yv(l,v,b,E));const T=[l,...k],P=await xr(t,h),B=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&B.push(P[y]),p){const z=gv(o,i,E);B.push(P[z[0]],P[z[1]])}if(U=[...U,{placement:o,overflows:B}],!B.every(z=>z<=0)){var re,ee;const z=(((re=a.flip)==null?void 0:re.index)||0)+1,$=T[z];if($&&(!(p==="alignment"?x!==Ue($):!1)||U.every(R=>Ue(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:z,overflows:U},reset:{placement:$}};let _=(ee=U.filter(D=>D.overflows[0]<=0).sort((D,R)=>D.overflows[1]-R.overflows[1])[0])==null?void 0:ee.placement;if(!_)switch(m){case"bestFit":{var J;const D=(J=U.filter(R=>{if(A){const M=Ue(R.placement);return M===x||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,F)=>M+F,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:J[0];D&&(_=D);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Ds(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $s(e){return uv.some(t=>e[t]>=0)}const Rv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=tt(e,t);switch(n){case"referenceHidden":{const a=await xr(t,{...o,elementContext:"reference"}),i=Ds(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:$s(i)}}}case"escaped":{const a=await xr(t,{...o,altBoundary:!0}),i=Ds(a,r.floating);return{data:{escapedOffsets:i,escaped:$s(i)}}}default:return{}}}}},rl=new Set(["left","top"]);async function Pv(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=rt(r),l=Qt(r),d=Ue(r)==="y",u=rl.has(i)?-1:1,f=a&&d?-1:1,p=tt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),d?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const kv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,d=await Pv(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:i}}}}},jv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...d}=tt(e,t),u={x:r,y:n},f=await xr(t,d),p=Ue(rt(o)),g=Jo(p);let m=u[g],b=u[p];if(a){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],C=m-f[y];m=jo(x,m,C)}if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],C=b-f[y];b=jo(x,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},Nv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=tt(e,t),f={x:r,y:n},p=Ue(o),g=Jo(p);let m=f[g],b=f[p];const v=tt(l,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(d){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+h.mainAxis,k=a.reference[g]+a.reference[C]-h.mainAxis;m<E?m=E:m>k&&(m=k)}if(u){var y,x;const C=g==="y"?"width":"height",E=rl.has(rt(o)),k=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:h.crossAxis),A=a.reference[p]+a.reference[C]+(E?0:((x=i.offset)==null?void 0:x[p])||0)-(E?h.crossAxis:0);b<k?b=k:b>A&&(b=A)}return{[g]:m,[p]:b}}}},Tv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:d=()=>{},...u}=tt(e,t),f=await xr(t,u),p=rt(o),g=Qt(o),m=Ue(o)==="y",{width:b,height:v}=a.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,C=b-f.left-f.right,E=lt(v-f[h],x),k=lt(b-f[y],C),A=!t.middlewareData.shift;let T=E,P=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=x),A&&!g){const U=je(f.left,0),re=je(f.right,0),ee=je(f.top,0),J=je(f.bottom,0);m?P=b-2*(U!==0||re!==0?U+re:je(f.left,f.right)):T=v-2*(ee!==0||J!==0?ee+J:je(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:T});const B=await i.getDimensions(l.floating);return b!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function Pn(){return typeof window<"u"}function er(e){return nl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(nl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nl(e){return Pn()?e instanceof Node||e instanceof Ne(e).Node:!1}function $e(e){return Pn()?e instanceof Element||e instanceof Ne(e).Element:!1}function Ke(e){return Pn()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function Ls(e){return!Pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const Av=new Set(["inline","contents"]);function kr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Av.has(o)}const _v=new Set(["table","td","th"]);function Iv(e){return _v.has(er(e))}const Mv=[":popover-open",":modal"];function kn(e){return Mv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ov=["transform","translate","scale","rotate","perspective"],Dv=["transform","translate","scale","rotate","perspective","filter"],$v=["paint","layout","strict","content"];function ta(e){const t=ra(),r=$e(e)?Le(e):e;return Ov.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Dv.some(n=>(r.willChange||"").includes(n))||$v.some(n=>(r.contain||"").includes(n))}function Lv(e){let t=ct(e);for(;Ke(t)&&!qt(t);){if(ta(t))return t;if(kn(t))return null;t=ct(t)}return null}function ra(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Fv=new Set(["html","body","#document"]);function qt(e){return Fv.has(er(e))}function Le(e){return Ne(e).getComputedStyle(e)}function jn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||Ye(e);return Ls(t)?t.host:t}function ol(e){const t=ct(e);return qt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&kr(t)?t:ol(t)}function br(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ol(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ne(o);if(a){const l=To(i);return t.concat(i,i.visualViewport||[],kr(o)?o:[],l&&r?br(l):[])}return t.concat(o,br(o,[],r))}function To(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function al(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=on(r)!==a||on(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function na(e){return $e(e)?e:e.contextElement}function Wt(e){const t=na(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=al(t);let i=(a?on(r.width):r.width)/n,l=(a?on(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Vv=He(0);function sl(e){const t=Ne(e);return!ra()||!t.visualViewport?Vv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bv(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ne(e)?!1:t}function St(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=na(e);let i=He(1);t&&(n?$e(n)&&(i=Wt(n)):i=Wt(e));const l=Bv(a,r,n)?sl(a):He(0);let d=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=Ne(a),m=n&&$e(n)?Ne(n):n;let b=g,v=To(b);for(;v&&n&&m!==b;){const h=Wt(v),y=v.getBoundingClientRect(),x=Le(v),C=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,E=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=C,u+=E,b=Ne(v),v=To(b)}}return sn({width:f,height:p,x:d,y:u})}function Nn(e,t){const r=jn(e).scrollLeft;return t?t.left+r:St(Ye(e)).left+r}function il(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Nn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Gv(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?kn(t.floating):!1;if(n===i||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((er(n)!=="body"||kr(i))&&(d=jn(n)),Ke(n))){const m=St(n);u=Wt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?il(i,d):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-d.scrollTop*u.y+f.y+g.y}}function Wv(e){return Array.from(e.getClientRects())}function zv(e){const t=Ye(e),r=jn(e),n=e.ownerDocument.body,o=je(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=je(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Nn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=je(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Fs=25;function qv(e,t){const r=Ne(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,d=0;if(o){a=o.width,i=o.height;const f=ra();(!f||f&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const u=Nn(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Fs&&(a-=b)}else u<=Fs&&(a+=u);return{width:a,height:i,x:l,y:d}}const Uv=new Set(["absolute","fixed"]);function Hv(e,t){const r=St(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?Wt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,u=n*a.y;return{width:i,height:l,x:d,y:u}}function Vs(e,t,r){let n;if(t==="viewport")n=qv(e,r);else if(t==="document")n=zv(Ye(e));else if($e(t))n=Hv(t,r);else{const o=sl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(n)}function ll(e,t){const r=ct(e);return r===t||!$e(r)||qt(r)?!1:Le(r).position==="fixed"||ll(r,t)}function Kv(e,t){const r=t.get(e);if(r)return r;let n=br(e,[],!1).filter(l=>$e(l)&&er(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ct(e):e;for(;$e(i)&&!qt(i);){const l=Le(i),d=ta(i);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&Uv.has(o.position)||kr(i)&&!d&&ll(e,i))?n=n.filter(f=>f!==i):o=l,i=ct(i)}return t.set(e,n),n}function Yv(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?kn(t)?[]:Kv(t,this._c):[].concat(r),n],l=i[0],d=i.reduce((u,f)=>{const p=Vs(t,f,o);return u.top=je(p.top,u.top),u.right=lt(p.right,u.right),u.bottom=lt(p.bottom,u.bottom),u.left=je(p.left,u.left),u},Vs(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Xv(e){const{width:t,height:r}=al(e);return{width:t,height:r}}function Zv(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=St(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=He(0);function u(){d.x=Nn(o)}if(n||!n&&!a)if((er(t)!=="body"||kr(o))&&(l=jn(t)),n){const m=St(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?il(o,l):He(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function io(e){return Le(e).position==="static"}function Bs(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function cl(e,t){const r=Ne(e);if(kn(e))return r;if(!Ke(e)){let o=ct(e);for(;o&&!qt(o);){if($e(o)&&!io(o))return o;o=ct(o)}return r}let n=Bs(e,t);for(;n&&Iv(n)&&io(n);)n=Bs(n,t);return n&&qt(n)&&io(n)&&!ta(n)?r:n||Lv(e)||r}const Jv=async function(e){const t=this.getOffsetParent||cl,r=this.getDimensions,n=await r(e.floating);return{reference:Zv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qv(e){return Le(e).direction==="rtl"}const eh={convertOffsetParentRelativeRectToViewportRelativeRect:Gv,getDocumentElement:Ye,getClippingRect:Yv,getOffsetParent:cl,getElementRects:Jv,getClientRects:Wv,getDimensions:Xv,getScale:Wt,isElement:$e,isRTL:Qv};function dl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function th(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Hr(p),v=Hr(o.clientWidth-(f+g)),h=Hr(o.clientHeight-(p+m)),y=Hr(f),C={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:je(0,lt(1,d))||1};let E=!0;function k(A){const T=A[0].intersectionRatio;if(T!==d){if(!E)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!dl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(k,C)}r.observe(e)}return i(!0),a}function rh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=na(e),f=o||a?[...u?br(u):[],...br(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?th(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!d&&m.observe(u),m.observe(t));let b,v=d?St(e):null;d&&h();function h(){const y=St(e);v&&!dl(v,y)&&r(),v=y,b=requestAnimationFrame(h)}return r(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(b)}}const nh=kv,oh=jv,ah=Ev,sh=Tv,ih=Rv,Gs=Sv,lh=Nv,ch=(e,t,r)=>{const n=new Map,o={platform:eh,...r},a={...o.platform,_c:n};return Cv(e,t,{...o,platform:a})};var dh=typeof document<"u",uh=function(){},en=dh?S.useLayoutEffect:uh;function ln(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ln(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ln(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ul(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ws(e,t){const r=ul(e);return Math.round(t*r)/r}function lo(e){const t=c.useRef(e);return en(()=>{t.current=e}),t}function fh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);ln(g,n)||m(n);const[b,v]=c.useState(null),[h,y]=c.useState(null),x=c.useCallback(R=>{R!==A.current&&(A.current=R,v(R))},[]),C=c.useCallback(R=>{R!==T.current&&(T.current=R,y(R))},[]),E=a||b,k=i||h,A=c.useRef(null),T=c.useRef(null),P=c.useRef(f),B=d!=null,U=lo(d),re=lo(o),ee=lo(u),J=c.useCallback(()=>{if(!A.current||!T.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),ch(A.current,T.current,R).then(M=>{const F={...M,isPositioned:ee.current!==!1};z.current&&!ln(P.current,F)&&(P.current=F,yn.flushSync(()=>{p(F)}))})},[g,t,r,re,ee]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const z=c.useRef(!1);en(()=>(z.current=!0,()=>{z.current=!1}),[]),en(()=>{if(E&&(A.current=E),k&&(T.current=k),E&&k){if(U.current)return U.current(E,k,J);J()}},[E,k,J,U,B]);const $=c.useMemo(()=>({reference:A,floating:T,setReference:x,setFloating:C}),[x,C]),_=c.useMemo(()=>({reference:E,floating:k}),[E,k]),D=c.useMemo(()=>{const R={position:r,left:0,top:0};if(!_.floating)return R;const M=Ws(_.floating,f.x),F=Ws(_.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+F+"px)",...ul(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:F}},[r,l,_.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:J,refs:$,elements:_,floatingStyles:D}),[f,J,$,_,D])}const ph=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Gs({element:n.current,padding:o}).fn(r):{}:n?Gs({element:n,padding:o}).fn(r):{}}}},mh=(e,t)=>({...nh(e),options:[e,t]}),gh=(e,t)=>({...oh(e),options:[e,t]}),vh=(e,t)=>({...lh(e),options:[e,t]}),hh=(e,t)=>({...ah(e),options:[e,t]}),xh=(e,t)=>({...sh(e),options:[e,t]}),bh=(e,t)=>({...ih(e),options:[e,t]}),yh=(e,t)=>({...ph(e),options:[e,t]});var wh="Arrow",fl=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(Z.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});fl.displayName=wh;var Ch=fl;function oa(e){const[t,r]=c.useState(void 0);return be(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var aa="Popper",[pl,ut]=we(aa),[Sh,ml]=pl(aa),gl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(Sh,{scope:t,anchor:n,onAnchorChange:o,children:r})};gl.displayName=aa;var vl="PopperAnchor",hl=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=ml(vl,r),i=c.useRef(null),l=se(t,i),d=c.useRef(null);return c.useEffect(()=>{const u=d.current;d.current=(n==null?void 0:n.current)||i.current,u!==d.current&&a.onAnchorChange(d.current)}),n?null:s.jsx(Z.div,{...o,ref:l})});hl.displayName=vl;var sa="PopperContent",[Eh,Rh]=pl(sa),xl=c.forwardRef((e,t)=>{var I,Q,te,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=ml(sa,r),[y,x]=c.useState(null),C=se(t,Se=>x(Se)),[E,k]=c.useState(null),A=oa(E),T=(A==null?void 0:A.width)??0,P=(A==null?void 0:A.height)??0,B=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],ee=re.length>0,J={padding:U,boundary:re.filter(kh),altBoundary:ee},{refs:z,floatingStyles:$,placement:_,isPositioned:D,middlewareData:R}=fh({strategy:"fixed",placement:B,whileElementsMounted:(...Se)=>rh(...Se,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[mh({mainAxis:o+P,alignmentAxis:i}),d&&gh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?vh():void 0,...J}),d&&hh({...J}),xh({...J,apply:({elements:Se,rects:Te,availableWidth:Ge,availableHeight:Me})=>{const{width:ot,height:Wr}=Te.reference,Ze=Se.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${ot}px`),Ze.setProperty("--radix-popper-anchor-height",`${Wr}px`)}}),E&&yh({element:E,padding:l}),jh({arrowWidth:T,arrowHeight:P}),g&&bh({strategy:"referenceHidden",...J})]}),[M,F]=wl(_),X=De(b);be(()=>{D&&(X==null||X())},[D,X]);const N=(I=R.arrow)==null?void 0:I.x,V=(Q=R.arrow)==null?void 0:Q.y,Y=((te=R.arrow)==null?void 0:te.centerOffset)!==0,[O,W]=c.useState();return be(()=>{y&&W(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:D?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:O,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Eh,{scope:r,placedSide:M,onArrowChange:k,arrowX:N,arrowY:V,shouldHideArrow:Y,children:s.jsx(Z.div,{"data-side":M,"data-align":F,...v,ref:C,style:{...v.style,animation:D?void 0:"none"}})})})});xl.displayName=sa;var bl="PopperArrow",Ph={top:"bottom",right:"left",bottom:"top",left:"right"},yl=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Rh(bl,n),i=Ph[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Ch,{...o,ref:r,style:{...o.style,display:"block"}})})});yl.displayName=bl;function kh(e){return e!==null}var jh=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:r,rects:n,middlewareData:o}=t,i=((h=o.arrow)==null?void 0:h.centerOffset)!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=wl(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+d/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-d}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+d}px`):u==="right"?(b=`${-d}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+d}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function wl(e){const[t,r="center"]=e.split("-");return[t,r]}var jr=gl,Nr=hl,Tn=xl,An=yl,Nh="Portal",tr=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);be(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Sr.createPortal(s.jsx(Z.div,{...n,ref:t}),i):null});tr.displayName=Nh;var Th=c[" useInsertionEffect ".trim().toString()]||be;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Ah({defaultProp:t,onChange:r}),l=e!==void 0,d=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,n])}const u=c.useCallback(f=>{var p;if(l){const g=_h(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[d,u]}function Ah({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return Th(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function _h(e){return typeof e=="function"}function ia(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Cl=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"}),Ih="VisuallyHidden",Sl=c.forwardRef((e,t)=>s.jsx(Z.span,{...e,ref:t,style:{...Cl,...e.style}}));Sl.displayName=Ih;var Mh=Sl,Oh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ot=new WeakMap,Kr=new WeakMap,Yr={},co=0,El=function(e){return e&&(e.host||El(e.parentNode))},Dh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=El(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},$h=function(e,t,r,n){var o=Dh(t,Array.isArray(e)?e:[e]);Yr[r]||(Yr[r]=new WeakMap);var a=Yr[r],i=[],l=new Set,d=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=(Ot.get(g)||0)+1,h=(a.get(g)||0)+1;Ot.set(g,v),a.set(g,h),i.push(g),v===1&&b&&Kr.set(g,!0),h===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),co++,function(){i.forEach(function(p){var g=Ot.get(p)-1,m=a.get(p)-1;Ot.set(p,g),a.set(p,m),g||(Kr.has(p)||p.removeAttribute(n),Kr.delete(p)),m||p.removeAttribute(r)}),co--,co||(Ot=new WeakMap,Ot=new WeakMap,Kr=new WeakMap,Yr={})}},_n=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Oh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),$h(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function Rl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Lh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var tn="right-scroll-bar-position",rn="width-before-scroll-bar",Fh="with-scroll-bars-hidden",Vh="--removed-body-scroll-bar-size";function uo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bh(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Gh=typeof window<"u"?c.useLayoutEffect:c.useEffect,zs=new WeakMap;function Wh(e,t){var r=Bh(null,function(n){return e.forEach(function(o){return uo(o,n)})});return Gh(function(){var n=zs.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||uo(l,null)}),a.forEach(function(l){o.has(l)||uo(l,i)})}zs.set(r,e)},[e]),r}function zh(e){return e}function qh(e,t){t===void 0&&(t=zh);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var d=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function Uh(e){e===void 0&&(e={});var t=qh(null);return t.options=qe({async:!0,ssr:!1},e),t}var Pl=function(e){var t=e.sideCar,r=Rl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,qe({},r))};Pl.isSideCarExport=!0;function Hh(e,t){return e.useMedium(t),Pl}var kl=Uh(),fo=function(){},In=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:fo,onWheelCapture:fo,onTouchMoveCapture:fo}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,E=Rl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=g,A=Wh([r,t]),T=qe(qe({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(k,{sideCar:kl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),qe(qe({},T),{ref:A})):c.createElement(x,qe({},T,{className:d,ref:A}),l))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:rn,zeroRight:tn};var Kh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Kh();return t&&e.setAttribute("nonce",t),e}function Xh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jh=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Yh())&&(Xh(t,r),Zh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qh=function(){var e=Jh();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},jl=function(){var e=Qh(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ex={left:0,top:0,right:0,gap:0},po=function(e){return parseInt(e||"",10)||0},tx=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[po(r),po(n),po(o)]},rx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ex;var t=tx(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},nx=jl(),zt="data-scroll-locked",ox=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
156
|
+
.`.concat(Fh,` {
|
|
157
|
+
overflow: hidden `).concat(n,`;
|
|
158
|
+
padding-right: `).concat(l,"px ").concat(n,`;
|
|
159
|
+
}
|
|
160
|
+
body[`).concat(zt,`] {
|
|
161
|
+
overflow: hidden `).concat(n,`;
|
|
162
|
+
overscroll-behavior: contain;
|
|
163
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
164
|
+
padding-left: `.concat(o,`px;
|
|
165
|
+
padding-top: `).concat(a,`px;
|
|
166
|
+
padding-right: `).concat(i,`px;
|
|
167
|
+
margin-left:0;
|
|
168
|
+
margin-top:0;
|
|
169
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
170
|
+
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.`).concat(tn,` {
|
|
174
|
+
right: `).concat(l,"px ").concat(n,`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.`).concat(rn,` {
|
|
178
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.`).concat(tn," .").concat(tn,` {
|
|
182
|
+
right: 0 `).concat(n,`;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.`).concat(rn," .").concat(rn,` {
|
|
186
|
+
margin-right: 0 `).concat(n,`;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
body[`).concat(zt,`] {
|
|
190
|
+
`).concat(Vh,": ").concat(l,`px;
|
|
191
|
+
}
|
|
192
|
+
`)},qs=function(){var e=parseInt(document.body.getAttribute(zt)||"0",10);return isFinite(e)?e:0},ax=function(){c.useEffect(function(){return document.body.setAttribute(zt,(qs()+1).toString()),function(){var e=qs()-1;e<=0?document.body.removeAttribute(zt):document.body.setAttribute(zt,e.toString())}},[])},sx=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;ax();var a=c.useMemo(function(){return rx(o)},[o]);return c.createElement(nx,{styles:ox(a,!t,o,r?"":"!important")})},Ao=!1;if(typeof window<"u")try{var Xr=Object.defineProperty({},"passive",{get:function(){return Ao=!0,!0}});window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{Ao=!1}var Dt=Ao?{passive:!1}:!1,ix=function(e){return e.tagName==="TEXTAREA"},Nl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ix(e)&&r[t]==="visible")},lx=function(e){return Nl(e,"overflowY")},cx=function(e){return Nl(e,"overflowX")},Us=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Tl(e,n);if(o){var a=Al(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dx=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ux=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Tl=function(e,t){return e==="v"?lx(t):cx(t)},Al=function(e,t){return e==="v"?dx(t):ux(t)},fx=function(e,t){return e==="h"&&t==="rtl"?-1:1},px=function(e,t,r,n,o){var a=fx(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,d=t.contains(l),u=!1,f=i>0,p=0,g=0;do{if(!l)break;var m=Al(e,l),b=m[0],v=m[1],h=m[2],y=v-h-a*b;(b||y)&&Tl(e,l)&&(p+=y,g+=b);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!d&&l!==document.body||d&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(u=!0),u},Zr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hs=function(e){return[e.deltaX,e.deltaY]},Ks=function(e){return e&&"current"in e?e.current:e},mx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gx=function(e){return`
|
|
193
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
194
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
195
|
+
`)},vx=0,$t=[];function hx(e){var t=c.useRef([]),r=c.useRef([0,0]),n=c.useRef(),o=c.useState(vx++)[0],a=c.useState(jl)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Lh([e.lockRef.current],(e.shards||[]).map(Ks),!0).filter(Boolean);return v.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=c.useCallback(function(v,h){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var y=Zr(v),x=r.current,C="deltaX"in v?v.deltaX:x[0]-y[0],E="deltaY"in v?v.deltaY:x[1]-y[1],k,A=v.target,T=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in v&&T==="h"&&A.type==="range")return!1;var P=Us(T,A);if(!P)return!0;if(P?k=T:(k=T==="v"?"h":"v",P=Us(T,A)),!P)return!1;if(!n.current&&"changedTouches"in v&&(C||E)&&(n.current=k),!k)return!0;var B=n.current||k;return px(B,h,v,B==="h"?C:E)},[]),d=c.useCallback(function(v){var h=v;if(!(!$t.length||$t[$t.length-1]!==a)){var y="deltaY"in h?Hs(h):Zr(h),x=t.current.filter(function(k){return k.name===h.type&&(k.target===h.target||h.target===k.shadowParent)&&mx(k.delta,y)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Ks).filter(Boolean).filter(function(k){return k.contains(h.target)}),E=C.length>0?l(h,C[0]):!i.current.noIsolation;E&&h.cancelable&&h.preventDefault()}}},[]),u=c.useCallback(function(v,h,y,x){var C={name:v,delta:h,target:y,should:x,shadowParent:xx(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),f=c.useCallback(function(v){r.current=Zr(v),n.current=void 0},[]),p=c.useCallback(function(v){u(v.type,Hs(v),v.target,l(v,e.lockRef.current))},[]),g=c.useCallback(function(v){u(v.type,Zr(v),v.target,l(v,e.lockRef.current))},[]);c.useEffect(function(){return $t.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Dt),document.addEventListener("touchmove",d,Dt),document.addEventListener("touchstart",f,Dt),function(){$t=$t.filter(function(v){return v!==a}),document.removeEventListener("wheel",d,Dt),document.removeEventListener("touchmove",d,Dt),document.removeEventListener("touchstart",f,Dt)}},[]);var m=e.removeScrollBar,b=e.inert;return c.createElement(c.Fragment,null,b?c.createElement(a,{styles:gx(o)}):null,m?c.createElement(sx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bx=Hh(kl,hx);var Tr=c.forwardRef(function(e,t){return c.createElement(In,qe({},e,{ref:t,sideCar:bx}))});Tr.classNames=In.classNames;var yx=[" ","Enter","ArrowUp","ArrowDown"],wx=[" ","Enter"],Et="Select",[Mn,On,Cx]=En(Et),[rr,IR]=we(Et,[Cx,ut]),Dn=ut(),[Sx,ft]=rr(Et),[Ex,Rx]=rr(Et),_l=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:d,dir:u,name:f,autoComplete:p,disabled:g,required:m,form:b}=e,v=Dn(t),[h,y]=c.useState(null),[x,C]=c.useState(null),[E,k]=c.useState(!1),A=Zt(u),[T,P]=ye({prop:n,defaultProp:o??!1,onChange:a,caller:Et}),[B,U]=ye({prop:i,defaultProp:l,onChange:d,caller:Et}),re=c.useRef(null),ee=h?b||!!h.closest("form"):!0,[J,z]=c.useState(new Set),$=Array.from(J).map(_=>_.props.value).join(";");return s.jsx(jr,{...v,children:s.jsxs(Sx,{required:m,scope:t,trigger:h,onTriggerChange:y,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:E,onValueNodeHasChildrenChange:k,contentId:ge(),value:B,onValueChange:U,open:T,onOpenChange:P,dir:A,triggerPointerDownPosRef:re,disabled:g,children:[s.jsx(Mn.Provider,{scope:t,children:s.jsx(Ex,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(_=>{z(D=>new Set(D).add(_))},[]),onNativeOptionRemove:c.useCallback(_=>{z(D=>{const R=new Set(D);return R.delete(_),R})},[]),children:r})}),ee?s.jsxs(nc,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:B,onChange:_=>U(_.target.value),disabled:g,form:b,children:[B===void 0?s.jsx("option",{value:""}):null,Array.from(J)]},$):null]})})};_l.displayName=Et;var Il="SelectTrigger",Ml=c.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=Dn(r),i=ft(Il,r),l=i.disabled||n,d=se(t,i.onTriggerChange),u=On(r),f=c.useRef("touch"),[p,g,m]=ac(v=>{const h=u().filter(C=>!C.disabled),y=h.find(C=>C.value===i.value),x=sc(h,v,y);x!==void 0&&i.onValueChange(x.value)}),b=v=>{l||(i.onOpenChange(!0),m()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return s.jsx(Nr,{asChild:!0,...a,children:s.jsx(Z.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":oc(i.value)?"":void 0,...o,ref:d,onClick:G(o.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:G(o.onPointerDown,v=>{f.current=v.pointerType;const h=v.target;h.hasPointerCapture(v.pointerId)&&h.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:G(o.onKeyDown,v=>{const h=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(h&&v.key===" ")&&yx.includes(v.key)&&(b(),v.preventDefault())})})})});Ml.displayName=Il;var Ol="SelectValue",Dl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...l}=e,d=ft(Ol,r),{onValueNodeHasChildrenChange:u}=d,f=a!==void 0,p=se(t,d.onValueNodeChange);return be(()=>{u(f)},[u,f]),s.jsx(Z.span,{...l,ref:p,style:{pointerEvents:"none"},children:oc(d.value)?s.jsx(s.Fragment,{children:i}):a})});Dl.displayName=Ol;var Px="SelectIcon",$l=c.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return s.jsx(Z.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});$l.displayName=Px;var kx="SelectPortal",Ll=e=>s.jsx(tr,{asChild:!0,...e});Ll.displayName=kx;var Rt="SelectContent",Fl=c.forwardRef((e,t)=>{const r=ft(Rt,e.__scopeSelect),[n,o]=c.useState();if(be(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?yn.createPortal(s.jsx(Vl,{scope:e.__scopeSelect,children:s.jsx(Mn.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(Bl,{...e,ref:t})});Fl.displayName=Rt;var Oe=10,[Vl,pt]=rr(Rt),jx="SelectContentImpl",Nx=it("SelectContent.RemoveScroll"),Bl=c.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h,...y}=e,x=ft(Rt,r),[C,E]=c.useState(null),[k,A]=c.useState(null),T=se(t,I=>E(I)),[P,B]=c.useState(null),[U,re]=c.useState(null),ee=On(r),[J,z]=c.useState(!1),$=c.useRef(!1);c.useEffect(()=>{if(C)return _n(C)},[C]),Rn();const _=c.useCallback(I=>{const[Q,...te]=ee().map(ie=>ie.ref.current),[oe]=te.slice(-1),ce=document.activeElement;for(const ie of I)if(ie===ce||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Q&&k&&(k.scrollTop=0),ie===oe&&k&&(k.scrollTop=k.scrollHeight),ie==null||ie.focus(),document.activeElement!==ce))return},[ee,k]),D=c.useCallback(()=>_([P,C]),[_,P,C]);c.useEffect(()=>{J&&D()},[J,D]);const{onOpenChange:R,triggerPointerDownPosRef:M}=x;c.useEffect(()=>{if(C){let I={x:0,y:0};const Q=oe=>{var ce,ie;I={x:Math.abs(Math.round(oe.pageX)-(((ce=M.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((ie=M.current)==null?void 0:ie.y)??0))}},te=oe=>{I.x<=10&&I.y<=10?oe.preventDefault():C.contains(oe.target)||R(!1),document.removeEventListener("pointermove",Q),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",te,{capture:!0})}}},[C,R,M]),c.useEffect(()=>{const I=()=>R(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[R]);const[F,X]=ac(I=>{const Q=ee().filter(ce=>!ce.disabled),te=Q.find(ce=>ce.ref.current===document.activeElement),oe=sc(Q,I,te);oe&&setTimeout(()=>oe.ref.current.focus())}),N=c.useCallback((I,Q,te)=>{const oe=!$.current&&!te;(x.value!==void 0&&x.value===Q||oe)&&(B(I),oe&&($.current=!0))},[x.value]),V=c.useCallback(()=>C==null?void 0:C.focus(),[C]),Y=c.useCallback((I,Q,te)=>{const oe=!$.current&&!te;(x.value!==void 0&&x.value===Q||oe)&&re(I)},[x.value]),O=n==="popper"?_o:Gl,W=O===_o?{side:l,sideOffset:d,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:h}:{};return s.jsx(Vl,{scope:r,content:C,viewport:k,onViewportChange:A,itemRefCallback:N,selectedItem:P,onItemLeave:V,itemTextRefCallback:Y,focusSelectedItem:D,selectedItemText:U,position:n,isPositioned:J,searchRef:F,children:s.jsx(Tr,{as:Nx,allowPinchZoom:!0,children:s.jsx(Pr,{asChild:!0,trapped:x.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:G(o,I=>{var Q;(Q=x.trigger)==null||Q.focus({preventScroll:!0}),I.preventDefault()}),children:s.jsx(Jt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:s.jsx(O,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:I=>I.preventDefault(),...y,...W,onPlaced:()=>z(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:G(y.onKeyDown,I=>{const Q=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!Q&&I.key.length===1&&X(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let oe=ee().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(I.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const ce=I.target,ie=oe.indexOf(ce);oe=oe.slice(ie+1)}setTimeout(()=>_(oe)),I.preventDefault()}})})})})})})});Bl.displayName=jx;var Tx="SelectItemAlignedPosition",Gl=c.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=ft(Rt,r),i=pt(Rt,r),[l,d]=c.useState(null),[u,f]=c.useState(null),p=se(t,T=>f(T)),g=On(r),m=c.useRef(!1),b=c.useRef(!0),{viewport:v,selectedItem:h,selectedItemText:y,focusSelectedItem:x}=i,C=c.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&h&&y){const T=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),B=a.valueNode.getBoundingClientRect(),U=y.getBoundingClientRect();if(a.dir!=="rtl"){const ce=U.left-P.left,ie=B.left-ce,Se=T.left-ie,Te=T.width+Se,Ge=Math.max(Te,P.width),Me=window.innerWidth-Oe,ot=Es(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=Te+"px",l.style.left=ot+"px"}else{const ce=P.right-U.right,ie=window.innerWidth-B.right-ce,Se=window.innerWidth-T.right-ie,Te=T.width+Se,Ge=Math.max(Te,P.width),Me=window.innerWidth-Oe,ot=Es(ie,[Oe,Math.max(Oe,Me-Ge)]);l.style.minWidth=Te+"px",l.style.right=ot+"px"}const re=g(),ee=window.innerHeight-Oe*2,J=v.scrollHeight,z=window.getComputedStyle(u),$=parseInt(z.borderTopWidth,10),_=parseInt(z.paddingTop,10),D=parseInt(z.borderBottomWidth,10),R=parseInt(z.paddingBottom,10),M=$+_+J+R+D,F=Math.min(h.offsetHeight*5,M),X=window.getComputedStyle(v),N=parseInt(X.paddingTop,10),V=parseInt(X.paddingBottom,10),Y=T.top+T.height/2-Oe,O=ee-Y,W=h.offsetHeight/2,I=h.offsetTop+W,Q=$+_+I,te=M-Q;if(Q<=Y){const ce=re.length>0&&h===re[re.length-1].ref.current;l.style.bottom="0px";const ie=u.clientHeight-v.offsetTop-v.offsetHeight,Se=Math.max(O,W+(ce?V:0)+ie+D),Te=Q+Se;l.style.height=Te+"px"}else{const ce=re.length>0&&h===re[0].ref.current;l.style.top="0px";const Se=Math.max(Y,$+v.offsetTop+(ce?N:0)+W)+te;l.style.height=Se+"px",v.scrollTop=Q-Y+v.offsetTop}l.style.margin=`${Oe}px 0`,l.style.minHeight=F+"px",l.style.maxHeight=ee+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[g,a.trigger,a.valueNode,l,u,v,h,y,a.dir,n]);be(()=>C(),[C]);const[E,k]=c.useState();be(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const A=c.useCallback(T=>{T&&b.current===!0&&(C(),x==null||x(),b.current=!1)},[C,x]);return s.jsx(_x,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:A,children:s.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:s.jsx(Z.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Gl.displayName=Tx;var Ax="SelectPopperPosition",_o=c.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Oe,...a}=e,i=Dn(r);return s.jsx(Tn,{...i,...a,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});_o.displayName=Ax;var[_x,la]=rr(Rt,{}),Io="SelectViewport",Wl=c.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=pt(Io,r),i=la(Io,r),l=se(t,a.onViewportChange),d=c.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:n}),s.jsx(Mn.Slot,{scope:r,children:s.jsx(Z.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:G(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const m=Math.abs(d.current-f.scrollTop);if(m>0){const b=window.innerHeight-Oe*2,v=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),y=Math.max(v,h);if(y<b){const x=y+m,C=Math.min(b,x),E=x-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,p.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});Wl.displayName=Io;var zl="SelectGroup",[Ix,Mx]=rr(zl),ql=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=ge();return s.jsx(Ix,{scope:r,id:o,children:s.jsx(Z.div,{role:"group","aria-labelledby":o,...n,ref:t})})});ql.displayName=zl;var Ul="SelectLabel",Hl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Mx(Ul,r);return s.jsx(Z.div,{id:o.id,...n,ref:t})});Hl.displayName=Ul;var cn="SelectItem",[Ox,Kl]=rr(cn),Yl=c.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,l=ft(cn,r),d=pt(cn,r),u=l.value===n,[f,p]=c.useState(a??""),[g,m]=c.useState(!1),b=se(t,x=>{var C;return(C=d.itemRefCallback)==null?void 0:C.call(d,x,n,o)}),v=ge(),h=c.useRef("touch"),y=()=>{o||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 s.jsx(Ox,{scope:r,value:n,disabled:o,textId:v,isSelected:u,onItemTextChange:c.useCallback(x=>{p(C=>C||((x==null?void 0:x.textContent)??"").trim())},[]),children:s.jsx(Mn.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:s.jsx(Z.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:G(i.onFocus,()=>m(!0)),onBlur:G(i.onBlur,()=>m(!1)),onClick:G(i.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:G(i.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:G(i.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:G(i.onPointerMove,x=>{var C;h.current=x.pointerType,o?(C=d.onItemLeave)==null||C.call(d):h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(i.onPointerLeave,x=>{var C;x.currentTarget===document.activeElement&&((C=d.onItemLeave)==null||C.call(d))}),onKeyDown:G(i.onKeyDown,x=>{var E;((E=d.searchRef)==null?void 0:E.current)!==""&&x.key===" "||(wx.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Yl.displayName=cn;var ur="SelectItemText",Xl=c.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=ft(ur,r),l=pt(ur,r),d=Kl(ur,r),u=Rx(ur,r),[f,p]=c.useState(null),g=se(t,y=>p(y),d.onItemTextChange,y=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,y,d.value,d.disabled)}),m=f==null?void 0:f.textContent,b=c.useMemo(()=>s.jsx("option",{value:d.value,disabled:d.disabled,children:m},d.value),[d.disabled,d.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:h}=u;return be(()=>(v(b),()=>h(b)),[v,h,b]),s.jsxs(s.Fragment,{children:[s.jsx(Z.span,{id:d.textId,...a,ref:g}),d.isSelected&&i.valueNode&&!i.valueNodeHasChildren?yn.createPortal(a.children,i.valueNode):null]})});Xl.displayName=ur;var Zl="SelectItemIndicator",Jl=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Kl(Zl,r).isSelected?s.jsx(Z.span,{"aria-hidden":!0,...n,ref:t}):null});Jl.displayName=Zl;var Mo="SelectScrollUpButton",Ql=c.forwardRef((e,t)=>{const r=pt(Mo,e.__scopeSelect),n=la(Mo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return be(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=d.scrollTop>0;a(u)};const d=r.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(tc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=r;l&&d&&(l.scrollTop=l.scrollTop-d.offsetHeight)}}):null});Ql.displayName=Mo;var Oo="SelectScrollDownButton",ec=c.forwardRef((e,t)=>{const r=pt(Oo,e.__scopeSelect),n=la(Oo,e.__scopeSelect),[o,a]=c.useState(!1),i=se(t,n.onScrollButtonChange);return be(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;a(f)};const d=r.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?s.jsx(tc,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=r;l&&d&&(l.scrollTop=l.scrollTop+d.offsetHeight)}}):null});ec.displayName=Oo;var tc=c.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=pt("SelectScrollButton",r),i=c.useRef(null),l=On(r),d=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>d(),[d]),be(()=>{var f;const u=l().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(Z.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:G(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:G(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:G(o.onPointerLeave,()=>{d()})})}),Dx="SelectSeparator",rc=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(Z.div,{"aria-hidden":!0,...n,ref:t})});rc.displayName=Dx;var Do="SelectArrow",$x=c.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Dn(r),a=ft(Do,r),i=pt(Do,r);return a.open&&i.position==="popper"?s.jsx(An,{...o,...n,ref:t}):null});$x.displayName=Do;var Lx="SelectBubbleInput",nc=c.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=c.useRef(null),a=se(n,o),i=ia(t);return c.useEffect(()=>{const l=o.current;if(!l)return;const d=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(d,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),s.jsx(Z.select,{...r,style:{...Cl,...r.style},ref:a,defaultValue:t})});nc.displayName=Lx;function oc(e){return e===""||e===void 0}function ac(e){const t=De(e),r=c.useRef(""),n=c.useRef(0),o=c.useCallback(i=>{const l=r.current+i;t(l),(function d(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>d(""),1e3))})(l)},[t]),a=c.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function sc(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=Fx(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const d=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function Fx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Vx=_l,ic=Ml,Bx=Dl,Gx=$l,Wx=Ll,lc=Fl,zx=Wl,qx=ql,cc=Hl,dc=Yl,Ux=Xl,Hx=Jl,uc=Ql,fc=ec,pc=rc;const Kx=Vx,Yx=qx,Xx=Bx,mc=c.forwardRef(({className:e,children:t,readOnly:r,...n},o)=>{const a=i=>{r&&i.preventDefault()};return s.jsxs(ic,{ref:o,"data-readonly":r||void 0,disabled:n.disabled,onPointerDown:n.disabled?n.onPointerDown:a,tabIndex:r?0:void 0,className:j(j("qodo qodo-select-trigger flex h-9 w-full min-w-0 items-center justify-between","rounded-md border bg-purple-muted-700 border-purple-muted-500","text-sm data-[placeholder]:text-muted-foreground [&:not([data-placeholder])]:text-purple-muted-300 md:text-sm selection:bg-primary selection:text-primary-foreground","px-3 py-1","shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px]","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200",e)),...n,children:[s.jsx("div",{className:"overflow-hidden whitespace-nowrap text-ellipsis",children:t}),s.jsx(Gx,{asChild:!0,children:s.jsx(Cn,{className:"h-4 w-4 text-purple-muted-300"})})]})});mc.displayName=ic.displayName;const ca=c.forwardRef(({className:e,...t},r)=>s.jsx(uc,{ref:r,className:j("qodo qodo-select-scroll-up-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(dg,{className:"h-4 w-4"})}));ca.displayName=uc.displayName;const da=c.forwardRef(({className:e,...t},r)=>s.jsx(fc,{ref:r,className:j("qodo qodo-select-scroll-down-button flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Cn,{className:"h-4 w-4"})}));da.displayName=fc.displayName;const gc=c.forwardRef(({className:e,children:t,position:r="popper",container:n=null,...o},a)=>s.jsx(Wx,{container:n,children:s.jsxs(lc,{ref:a,className:j("qodo qodo-select-content relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[s.jsx(ca,{}),s.jsx(zx,{className:j("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(da,{})]})}));gc.displayName=lc.displayName;const vc=c.forwardRef(({className:e,...t},r)=>s.jsx(cc,{ref:r,className:j("qodo qodo-select-label py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));vc.displayName=cc.displayName;const hc=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(dc,{ref:n,title:r.value,className:j(j("qodo qodo-select-item relative w-full cursor-default select-none rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-purple-muted-500 focus:text-purple-100 text-purple-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","block overflow-hidden whitespace-nowrap text-ellipsis"),e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 mt-0.5",children:s.jsx(Hx,{children:s.jsx(Er,{className:"h-4 w-4"})})}),s.jsx(Ux,{children:t})]}));hc.displayName=dc.displayName;const xc=c.forwardRef(({className:e,...t},r)=>s.jsx(pc,{ref:r,className:j("qodo qodo-select-separator -mx-1 my-1 h-px bg-muted",e),...t}));xc.displayName=pc.displayName;var Ys=1,Zx=.9,Jx=.8,Qx=.17,mo=.1,go=.999,eb=.9999,tb=.99,rb=/[\\\/_+.#"@\[\(\{&]/,nb=/[\\\/_+.#"@\[\(\{&]/g,ob=/[\s-]/,bc=/[\s-]/g;function $o(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?Ys:tb;var l=`${o},${a}`;if(i[l]!==void 0)return i[l];for(var d=n.charAt(a),u=r.indexOf(d,o),f=0,p,g,m,b;u>=0;)p=$o(e,t,r,n,u+1,a+1,i),p>f&&(u===o?p*=Ys:rb.test(e.charAt(u-1))?(p*=Jx,m=e.slice(o,u-1).match(nb),m&&o>0&&(p*=Math.pow(go,m.length))):ob.test(e.charAt(u-1))?(p*=Zx,b=e.slice(o,u-1).match(bc),b&&o>0&&(p*=Math.pow(go,b.length))):(p*=Qx,o>0&&(p*=Math.pow(go,u-o))),e.charAt(u)!==t.charAt(a)&&(p*=eb)),(p<mo&&r.charAt(u-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(u-1)!==n.charAt(a))&&(g=$o(e,t,r,n,u+1,a+2,i),g*mo>p&&(p=g*mo)),p>f&&(f=p),u=r.indexOf(d,u+1);return i[l]=f,f}function Xs(e){return e.toLowerCase().replace(bc," ")}function ab(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,$o(e,t,Xs(e),Xs(t),0,0,{})}function sb(e,t){return c.useReducer((r,n)=>t[r][n]??r,e)}var ke=e=>{const{present:t,children:r}=e,n=ib(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),a=se(n.ref,lb(o));return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:a}):null};ke.displayName="Presence";function ib(e){const[t,r]=c.useState(),n=c.useRef(null),o=c.useRef(e),a=c.useRef("none"),i=e?"mounted":"unmounted",[l,d]=sb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Jr(n.current);a.current=l==="mounted"?u:"none"},[l]),be(()=>{const u=n.current,f=o.current;if(f!==e){const g=a.current,m=Jr(u);e?d("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),be(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const v=Jr(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=m=>{m.target===t&&(a.current=Jr(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Jr(e){return(e==null?void 0:e.animationName)||"none"}function lb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $n="Dialog",[yc,MR]=we($n),[cb,Fe]=yc($n),wc=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=c.useRef(null),d=c.useRef(null),[u,f]=ye({prop:n,defaultProp:o??!1,onChange:a,caller:$n});return s.jsx(cb,{scope:t,triggerRef:l,contentRef:d,contentId:ge(),titleId:ge(),descriptionId:ge(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:r})};wc.displayName=$n;var Cc="DialogTrigger",Sc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Cc,r),a=se(t,o.triggerRef);return s.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pa(o.open),...n,ref:a,onClick:G(e.onClick,o.onOpenToggle)})});Sc.displayName=Cc;var ua="DialogPortal",[db,Ec]=yc(ua,{forceMount:void 0}),Rc=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Fe(ua,t);return s.jsx(db,{scope:t,forceMount:r,children:c.Children.map(n,i=>s.jsx(ke,{present:r||a.open,children:s.jsx(tr,{asChild:!0,container:o,children:i})}))})};Rc.displayName=ua;var dn="DialogOverlay",Pc=c.forwardRef((e,t)=>{const r=Ec(dn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(dn,e.__scopeDialog);return a.modal?s.jsx(ke,{present:n||a.open,children:s.jsx(fb,{...o,ref:t})}):null});Pc.displayName=dn;var ub=it("DialogOverlay.RemoveScroll"),fb=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(dn,r);return s.jsx(Tr,{as:ub,allowPinchZoom:!0,shards:[o.contentRef],children:s.jsx(Z.div,{"data-state":pa(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Pt="DialogContent",kc=c.forwardRef((e,t)=>{const r=Ec(Pt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Fe(Pt,e.__scopeDialog);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(pb,{...o,ref:t}):s.jsx(mb,{...o,ref:t})})});kc.displayName=Pt;var pb=c.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=c.useRef(null),o=se(t,r.contentRef,n);return c.useEffect(()=>{const a=n.current;if(a)return _n(a)},[]),s.jsx(jc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:G(e.onFocusOutside,a=>a.preventDefault())})}),mb=c.forwardRef((e,t)=>{const r=Fe(Pt,e.__scopeDialog),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(jc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),jc=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Fe(Pt,r),d=c.useRef(null),u=se(t,d);return Rn(),s.jsxs(s.Fragment,{children:[s.jsx(Pr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Jt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pa(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(gb,{titleId:l.titleId}),s.jsx(hb,{contentRef:d,descriptionId:l.descriptionId})]})]})}),fa="DialogTitle",Nc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(fa,r);return s.jsx(Z.h2,{id:o.titleId,...n,ref:t})});Nc.displayName=fa;var Tc="DialogDescription",Ac=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(Tc,r);return s.jsx(Z.p,{id:o.descriptionId,...n,ref:t})});Ac.displayName=Tc;var _c="DialogClose",Ic=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Fe(_c,r);return s.jsx(Z.button,{type:"button",...n,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});Ic.displayName=_c;function pa(e){return e?"open":"closed"}var Mc="DialogTitleWarning",[OR,Oc]=Lg(Mc,{contentName:Pt,titleName:fa,docsSlug:"dialog"}),gb=({titleId:e})=>{const t=Oc(Mc),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
186
196
|
|
|
187
197
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
188
198
|
|
|
189
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ax="DialogDescriptionWarning",sx=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Xl(ax).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Zl=Dl,ix=$l,Jl=Vl,Ql=Bl,ec=Gl,lx=zl,cx=Ul,tc=Kl,or='[cmdk-group=""]',ro='[cmdk-group-items=""]',ux='[cmdk-group-heading=""]',rc='[cmdk-item=""]',Ns=`${rc}:not([aria-disabled="true"])`,So="cmdk-item-select",Ot="data-value",dx=(e,t,r)=>Kv(e,t,r),nc=c.createContext(void 0),Sr=()=>c.useContext(nc),oc=c.createContext(void 0),Jo=()=>c.useContext(oc),ac=c.createContext(void 0),sc=c.forwardRef((e,t)=>{let r=Dt(()=>{var N,B;return{search:"",value:(B=(N=e.value)!=null?N:e.defaultValue)!=null?B:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Dt(()=>new Set),o=Dt(()=>new Map),a=Dt(()=>new Map),i=Dt(()=>new Set),l=ic(e),{label:u,children:d,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:v,disablePointerSelection:h=!1,vimBindings:x=!0,...y}=e,b=me(),C=me(),R=me(),P=c.useRef(null),j=Cx();Rt(()=>{if(f!==void 0){let N=f.trim();r.current.value=N,T.emit()}},[f]),Rt(()=>{j(6,J)},[]);let T=c.useMemo(()=>({subscribe:N=>(i.current.add(N),()=>i.current.delete(N)),snapshot:()=>r.current,setState:(N,B,Y)=>{var M,G,I,Z;if(!Object.is(r.current[N],B)){if(r.current[N]=B,N==="search")te(),U(),j(1,re);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(R);ee?ee.focus():(M=document.getElementById(b))==null||M.focus()}if(j(7,()=>{var ee;r.current.selectedItemId=(ee=q())==null?void 0:ee.id,T.emit()}),Y||j(5,J),((G=l.current)==null?void 0:G.value)!==void 0){let ee=B??"";(Z=(I=l.current).onValueChange)==null||Z.call(I,ee);return}}T.emit()}},emit:()=>{i.current.forEach(N=>N())}}),[]),E=c.useMemo(()=>({value:(N,B,Y)=>{var M;B!==((M=a.current.get(N))==null?void 0:M.value)&&(a.current.set(N,{value:B,keywords:Y}),r.current.filtered.items.set(N,V(B,Y)),j(2,()=>{U(),T.emit()}))},item:(N,B)=>(n.current.add(N),B&&(o.current.has(B)?o.current.get(B).add(N):o.current.set(B,new Set([N]))),j(3,()=>{te(),U(),r.current.value||re(),T.emit()}),()=>{a.current.delete(N),n.current.delete(N),r.current.filtered.items.delete(N);let Y=q();j(4,()=>{te(),(Y==null?void 0:Y.getAttribute("id"))===N&&re(),T.emit()})}),group:N=>(o.current.has(N)||o.current.set(N,new Set),()=>{a.current.delete(N),o.current.delete(N)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:R,labelId:C,listInnerRef:P}),[]);function V(N,B){var Y,M;let G=(M=(Y=l.current)==null?void 0:Y.filter)!=null?M:dx;return N?G(N,r.current.search,B):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let N=r.current.filtered.items,B=[];r.current.filtered.groups.forEach(M=>{let G=o.current.get(M),I=0;G.forEach(Z=>{let ee=N.get(Z);I=Math.max(ee,I)}),B.push([M,I])});let Y=P.current;D().sort((M,G)=>{var I,Z;let ee=M.getAttribute("id"),oe=G.getAttribute("id");return((I=N.get(oe))!=null?I:0)-((Z=N.get(ee))!=null?Z:0)}).forEach(M=>{let G=M.closest(ro);G?G.appendChild(M.parentElement===G?M:M.closest(`${ro} > *`)):Y.appendChild(M.parentElement===Y?M:M.closest(`${ro} > *`))}),B.sort((M,G)=>G[1]-M[1]).forEach(M=>{var G;let I=(G=P.current)==null?void 0:G.querySelector(`${or}[${Ot}="${encodeURIComponent(M[0])}"]`);I==null||I.parentElement.appendChild(I)})}function re(){let N=D().find(Y=>Y.getAttribute("aria-disabled")!=="true"),B=N==null?void 0:N.getAttribute(Ot);T.setState("value",B||void 0)}function te(){var N,B,Y,M;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let I of n.current){let Z=(B=(N=a.current.get(I))==null?void 0:N.value)!=null?B:"",ee=(M=(Y=a.current.get(I))==null?void 0:Y.keywords)!=null?M:[],oe=V(Z,ee);r.current.filtered.items.set(I,oe),oe>0&&G++}for(let[I,Z]of o.current)for(let ee of Z)if(r.current.filtered.items.get(ee)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=G}function J(){var N,B,Y;let M=q();M&&(((N=M.parentElement)==null?void 0:N.firstChild)===M&&((Y=(B=M.closest(or))==null?void 0:B.querySelector(ux))==null||Y.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function q(){var N;return(N=P.current)==null?void 0:N.querySelector(`${rc}[aria-selected="true"]`)}function D(){var N;return Array.from(((N=P.current)==null?void 0:N.querySelectorAll(Ns))||[])}function A(N){let B=D()[N];B&&T.setState("value",B.getAttribute(Ot))}function $(N){var B;let Y=q(),M=D(),G=M.findIndex(Z=>Z===Y),I=M[G+N];(B=l.current)!=null&&B.loop&&(I=G+N<0?M[M.length-1]:G+N===M.length?M[0]:M[G+N]),I&&T.setState("value",I.getAttribute(Ot))}function k(N){let B=q(),Y=B==null?void 0:B.closest(or),M;for(;Y&&!M;)Y=N>0?yx(Y,or):wx(Y,or),M=Y==null?void 0:Y.querySelector(Ns);M?T.setState("value",M.getAttribute(Ot)):$(N)}let O=()=>A(D().length-1),W=N=>{N.preventDefault(),N.metaKey?O():N.altKey?k(1):$(1)},Q=N=>{N.preventDefault(),N.metaKey?A(0):N.altKey?k(-1):$(-1)};return c.createElement(X.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:N=>{var B;(B=y.onKeyDown)==null||B.call(y,N);let Y=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||Y))switch(N.key){case"n":case"j":{x&&N.ctrlKey&&W(N);break}case"ArrowDown":{W(N);break}case"p":case"k":{x&&N.ctrlKey&&Q(N);break}case"ArrowUp":{Q(N);break}case"Home":{N.preventDefault(),A(0);break}case"End":{N.preventDefault(),O();break}case"Enter":{N.preventDefault();let M=q();if(M){let G=new Event(So);M.dispatchEvent(G)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Rx},u),En(e,N=>c.createElement(oc.Provider,{value:T},c.createElement(nc.Provider,{value:E},N))))}),fx=c.forwardRef((e,t)=>{var r,n;let o=me(),a=c.useRef(null),i=c.useContext(ac),l=Sr(),u=ic(e),d=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;Rt(()=>{if(!d)return l.item(o,i==null?void 0:i.id)},[d]);let f=lc(o,a,[e.value,e.children,a],e.keywords),p=Jo(),g=ct(j=>j.value&&j.value===f.current),m=ct(j=>d||l.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);c.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(So,v),()=>j.removeEventListener(So,v)},[m,e.onSelect,e.disabled]);function v(){var j,T;h(),(T=(j=u.current).onSelect)==null||T.call(j,f.current)}function h(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:x,value:y,onSelect:b,forceMount:C,keywords:R,...P}=e;return c.createElement(X.div,{ref:Qe(a,t),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||l.getDisablePointerSelection()?void 0:h,onClick:x?void 0:v},e.children)}),px=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=me(),l=c.useRef(null),u=c.useRef(null),d=me(),f=Sr(),p=ct(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Rt(()=>f.group(i),[]),lc(i,l,[e.value,e.heading,u]);let g=c.useMemo(()=>({id:i,forceMount:o}),[o]);return c.createElement(X.div,{ref:Qe(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&c.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),En(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},c.createElement(ac.Provider,{value:g},m))))}),mx=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=c.useRef(null),a=ct(i=>!i.search);return!r&&!a?null:c.createElement(X.div,{ref:Qe(o,t),...n,"cmdk-separator":"",role:"separator"})}),gx=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=Jo(),i=ct(d=>d.search),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement(X.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:i,onChange:d=>{o||a.setState("search",d.target.value),r==null||r(d.target.value)}})}),hx=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=c.useRef(null),i=c.useRef(null),l=ct(d=>d.selectedItemId),u=Sr();return c.useEffect(()=>{if(i.current&&a.current){let d=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=d.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),c.createElement(X.div,{ref:Qe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},En(e,d=>c.createElement("div",{ref:Qe(i,u.listInnerRef),"cmdk-list-sizer":""},d)))}),vx=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return c.createElement(Zl,{open:r,onOpenChange:n},c.createElement(Jl,{container:i},c.createElement(Ql,{"cmdk-overlay":"",className:o}),c.createElement(ec,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(sc,{ref:t,...l}))))}),xx=c.forwardRef((e,t)=>ct(r=>r.filtered.count===0)?c.createElement(X.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),bx=c.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return c.createElement(X.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},En(e,i=>c.createElement("div",{"aria-hidden":!0},i)))}),kt=Object.assign(sc,{List:hx,Item:fx,Input:gx,Group:px,Separator:mx,Dialog:vx,Empty:xx,Loading:bx});function yx(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function wx(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ic(e){let t=c.useRef(e);return Rt(()=>{t.current=e}),t}var Rt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function Dt(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function ct(e){let t=Jo(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function lc(e,t,r,n=[]){let o=c.useRef(),a=Sr();return Rt(()=>{var i;let l=(()=>{var d;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),u=n.map(d=>d.trim());a.value(e,l,u),(i=t.current)==null||i.setAttribute(Ot,l),o.current=l}),o}var Cx=()=>{let[e,t]=c.useState(),r=Dt(()=>new Map);return Rt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function Sx(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function En({asChild:e,children:t},r){return e&&c.isValidElement(t)?c.cloneElement(Sx(t),{ref:t.ref},r(t.props.children)):r(t)}var Rx={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Ex({...e}){return s.jsx(Zl,{"data-slot":"dialog",...e})}function kx({...e}){return s.jsx(ix,{"data-slot":"dialog-trigger",...e})}function cc({...e}){return s.jsx(Jl,{"data-slot":"dialog-portal",...e})}function Px({...e}){return s.jsx(tc,{"data-slot":"dialog-close",...e})}function uc({className:e,...t}){return s.jsx(Ql,{"data-slot":"dialog-overlay",className:_("qodo qodo-dialog-overlay,","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Nx({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(cc,{"data-slot":"dialog-portal",children:[s.jsx(uc,{}),s.jsxs(ec,{"data-slot":"dialog-content",className:_("qodo qodo-dialog-content bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-background dark:border-border",e),...n,children:[t,r&&s.jsxs(tc,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[s.jsx(Sn,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function jx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:_("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Tx({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:_("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function _x({className:e,...t}){return s.jsx(lx,{"data-slot":"dialog-title",className:_("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function Ax({className:e,...t}){return s.jsx(cx,{"data-slot":"dialog-description",className:_("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Ix({className:e,...t}){return s.jsx(kt,{"data-slot":"command",className:_("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Mx({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:_("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-purple-muted-400 px-3 text-purple-muted-300"),children:[s.jsx(jl,{className:"size-4 shrink-0 opacity-50"}),s.jsx(kt.Input,{"data-slot":"command-input",className:_("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Ox({className:e,...t}){return s.jsx(kt.List,{"data-slot":"command-list",className:_("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Dx({...e}){return s.jsx(kt.Empty,{"data-slot":"command-empty",className:_("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function Lx({className:e,...t}){return s.jsx(kt.Loading,{"data-slot":"command-loading",className:_("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function $x({className:e,...t}){return s.jsx(kt.Group,{"data-slot":"command-group",className:_("qodo qodo-command-group","text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Fx({className:e,...t}){return s.jsx(kt.Item,{"data-slot":"command-item",className:_("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var kn="Popover",[dc,eS]=ye(kn,[ut]),Rr=ut(),[Vx,pt]=dc(kn),fc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Rr(t),u=c.useRef(null),[d,f]=c.useState(!1),[p,g]=be({prop:n,defaultProp:o??!1,onChange:a,caller:kn});return s.jsx(yr,{...l,children:s.jsx(Vx,{scope:t,contentId:me(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:c.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:d,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:r})})};fc.displayName=kn;var pc="PopoverAnchor",Bx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(pc,r),a=Rr(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return c.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(wr,{...a,...n,ref:t})});Bx.displayName=pc;var mc="PopoverTrigger",gc=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(mc,r),a=Rr(r),i=se(t,o.triggerRef),l=s.jsx(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yc(o.open),...n,ref:i,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(wr,{asChild:!0,...a,children:l})});gc.displayName=mc;var Qo="PopoverPortal",[Gx,Wx]=dc(Qo,{forceMount:void 0}),hc=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=pt(Qo,t);return s.jsx(Gx,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};hc.displayName=Qo;var Gt="PopoverContent",vc=c.forwardRef((e,t)=>{const r=Wx(Gt,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=pt(Gt,e.__scopePopover);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(qx,{...o,ref:t}):s.jsx(Ux,{...o,ref:t})})});vc.displayName=Gt;var zx=st("PopoverContent.RemoveScroll"),qx=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(null),o=se(t,n),a=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return vn(i)},[]),s.jsx(Cr,{as:zx,allowPinchZoom:!0,children:s.jsx(xc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ux=c.forwardRef((e,t)=>{const r=pt(Gt,e.__scopePopover),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(xc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),xc=c.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,g=pt(Gt,r),m=Rr(r);return un(),s.jsx(xr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(gn,{"data-state":yc(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),bc="PopoverClose",Hx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=pt(bc,r);return s.jsx(X.button,{type:"button",...n,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Hx.displayName=bc;var Kx="PopoverArrow",Yx=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Rr(r);return s.jsx(hn,{...o,...n,ref:t})});Yx.displayName=Kx;function yc(e){return e?"open":"closed"}var Xx=fc,Zx=gc,Jx=hc,Qx=vc;function wc({...e}){return s.jsx(Xx,{"data-slot":"popover",...e})}function Cc({...e}){return s.jsx(Zx,{"data-slot":"popover-trigger",...e})}function Sc({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(Jx,{children:s.jsx(Qx,{"data-slot":"popover-content",align:t,sideOffset:r,className:_("qodo qodo-popover-content bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ea=c.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:i=!1,readOnly:l=!1,error:u=!1,className:d,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},v)=>{const[h,x]=c.useState(!1),[y,b]=c.useState(""),[C,R]=c.useState(0),P=c.useRef(null),j=e.find(E=>E.value===t),T=E=>{b(E),f==null||f(E)};return c.useEffect(()=>{P.current&&R(P.current.offsetWidth)},[]),s.jsxs(wc,{open:l?!1:h,onOpenChange:x,children:[s.jsx(Cc,{asChild:!0,children:s.jsxs(Je,{ref:E=>{typeof v=="function"?v(E):v&&(v.current=E),P.current=E},variant:"outline",role:"combobox","aria-expanded":h,"aria-invalid":u||void 0,"data-readonly":l||void 0,className:_("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!j},d),disabled:i,...m,children:[j?j.label:n,s.jsx(vv,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(Sc,{className:"p-0 border bg-purple-muted-600 border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(Ix,{className:"w-full bg-purple-muted-600",shouldFilter:!f,children:[s.jsx(Mx,{placeholder:o,...!!f&&{value:y,onValueChange:T}}),s.jsx(Ox,{children:p?s.jsx(Lx,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(Dx,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx($x,{children:e.map(E=>{const V=t===E.value;return s.jsxs(Fx,{value:E.value,keywords:[E.label],disabled:E.disabled,className:_("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":V}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),x(!1)},children:[s.jsx(Cn,{className:_("mr-2 h-4 w-4",{"opacity-100":V,"opacity-0":!V})}),E.label]},E.value)})})]})})]})})]})});ea.displayName="Combobox";const eb=ln("qodo qodo-badge inline-flex items-center dark:font-normal rounded-full border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",primary:"border-purple-700 bg-purple-800 text-purple-300",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"bg-purple-muted-700 border border-purple-muted-600 text-purple-muted-300",success:"text-green-300 bg-green-800 border-green-700",error:"text-red-300 bg-red-900 border-red-800",pending:"bg-purple-800 border-purple-700 text-purple-300",text:"bg-transparent border-transparent text-primary-foreground p-0",tag:"bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] border border-[var(--border-tag-emphasis-idle)]"},size:{xs:"text-[10px]",sm:"text-xs",md:"text-sm",lg:"py-2"}},defaultVariants:{variant:"default",size:"sm"}});function Pn({className:e,variant:t,size:r,...n}){return s.jsx("div",{className:_(eb({variant:t,size:r}),e),...n})}function tb({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:_("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function rb({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:_("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function nb({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:_("qodo qodo-card-title leading-none font-semibold",e),...t})}function ob({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:_("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function ab({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:_("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function sb({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:_("qodo qodo-card-content px-6",e),...t})}function ib({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:_("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var ta="Progress",ra=100,[lb,tS]=ye(ta),[cb,ub]=lb(ta),Rc=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=db,...i}=e;(o||o===0)&&!js(o)&&console.error(fb(`${o}`,"Progress"));const l=js(o)?o:ra;n!==null&&!Ts(n,l)&&console.error(pb(`${n}`,"Progress"));const u=Ts(n,l)?n:null,d=Jr(u)?a(u,l):void 0;return s.jsx(cb,{scope:r,value:u,max:l,children:s.jsx(X.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Jr(u)?u:void 0,"aria-valuetext":d,role:"progressbar","data-state":Pc(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})});Rc.displayName=ta;var Ec="ProgressIndicator",kc=c.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=ub(Ec,r);return s.jsx(X.div,{"data-state":Pc(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});kc.displayName=Ec;function db(e,t){return`${Math.round(e/t*100)}%`}function Pc(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Jr(e){return typeof e=="number"}function js(e){return Jr(e)&&!isNaN(e)&&e>0}function Ts(e,t){return Jr(e)&&!isNaN(e)&&e<=t&&e>=0}function fb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ra}\`.`}function pb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
199
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},vb="DialogDescriptionWarning",hb=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Oc(vb).contentName}}.`;return c.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Dc=wc,xb=Sc,$c=Rc,Lc=Pc,Fc=kc,bb=Nc,yb=Ac,Vc=Ic,cr='[cmdk-group=""]',vo='[cmdk-group-items=""]',wb='[cmdk-group-heading=""]',Bc='[cmdk-item=""]',Zs=`${Bc}:not([aria-disabled="true"])`,Lo="cmdk-item-select",Ft="data-value",Cb=(e,t,r)=>ab(e,t,r),Gc=c.createContext(void 0),Ar=()=>c.useContext(Gc),Wc=c.createContext(void 0),ma=()=>c.useContext(Wc),zc=c.createContext(void 0),qc=c.forwardRef((e,t)=>{let r=Vt(()=>{var N,V;return{search:"",value:(V=(N=e.value)!=null?N:e.defaultValue)!=null?V:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Vt(()=>new Set),o=Vt(()=>new Map),a=Vt(()=>new Map),i=Vt(()=>new Set),l=Uc(e),{label:d,children:u,value:f,onValueChange:p,filter:g,shouldFilter:m,loop:b,disablePointerSelection:v=!1,vimBindings:h=!0,...y}=e,x=ge(),C=ge(),E=ge(),k=c.useRef(null),A=Ib();kt(()=>{if(f!==void 0){let N=f.trim();r.current.value=N,T.emit()}},[f]),kt(()=>{A(6,J)},[]);let T=c.useMemo(()=>({subscribe:N=>(i.current.add(N),()=>i.current.delete(N)),snapshot:()=>r.current,setState:(N,V,Y)=>{var O,W,I,Q;if(!Object.is(r.current[N],V)){if(r.current[N]=V,N==="search")ee(),U(),A(1,re);else if(N==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(E);te?te.focus():(O=document.getElementById(x))==null||O.focus()}if(A(7,()=>{var te;r.current.selectedItemId=(te=z())==null?void 0:te.id,T.emit()}),Y||A(5,J),((W=l.current)==null?void 0:W.value)!==void 0){let te=V??"";(Q=(I=l.current).onValueChange)==null||Q.call(I,te);return}}T.emit()}},emit:()=>{i.current.forEach(N=>N())}}),[]),P=c.useMemo(()=>({value:(N,V,Y)=>{var O;V!==((O=a.current.get(N))==null?void 0:O.value)&&(a.current.set(N,{value:V,keywords:Y}),r.current.filtered.items.set(N,B(V,Y)),A(2,()=>{U(),T.emit()}))},item:(N,V)=>(n.current.add(N),V&&(o.current.has(V)?o.current.get(V).add(N):o.current.set(V,new Set([N]))),A(3,()=>{ee(),U(),r.current.value||re(),T.emit()}),()=>{a.current.delete(N),n.current.delete(N),r.current.filtered.items.delete(N);let Y=z();A(4,()=>{ee(),(Y==null?void 0:Y.getAttribute("id"))===N&&re(),T.emit()})}),group:N=>(o.current.has(N)||o.current.set(N,new Set),()=>{a.current.delete(N),o.current.delete(N)}),filter:()=>l.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:x,inputId:E,labelId:C,listInnerRef:k}),[]);function B(N,V){var Y,O;let W=(O=(Y=l.current)==null?void 0:Y.filter)!=null?O:Cb;return N?W(N,r.current.search,V):0}function U(){if(!r.current.search||l.current.shouldFilter===!1)return;let N=r.current.filtered.items,V=[];r.current.filtered.groups.forEach(O=>{let W=o.current.get(O),I=0;W.forEach(Q=>{let te=N.get(Q);I=Math.max(te,I)}),V.push([O,I])});let Y=k.current;$().sort((O,W)=>{var I,Q;let te=O.getAttribute("id"),oe=W.getAttribute("id");return((I=N.get(oe))!=null?I:0)-((Q=N.get(te))!=null?Q:0)}).forEach(O=>{let W=O.closest(vo);W?W.appendChild(O.parentElement===W?O:O.closest(`${vo} > *`)):Y.appendChild(O.parentElement===Y?O:O.closest(`${vo} > *`))}),V.sort((O,W)=>W[1]-O[1]).forEach(O=>{var W;let I=(W=k.current)==null?void 0:W.querySelector(`${cr}[${Ft}="${encodeURIComponent(O[0])}"]`);I==null||I.parentElement.appendChild(I)})}function re(){let N=$().find(Y=>Y.getAttribute("aria-disabled")!=="true"),V=N==null?void 0:N.getAttribute(Ft);T.setState("value",V||void 0)}function ee(){var N,V,Y,O;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let I of n.current){let Q=(V=(N=a.current.get(I))==null?void 0:N.value)!=null?V:"",te=(O=(Y=a.current.get(I))==null?void 0:Y.keywords)!=null?O:[],oe=B(Q,te);r.current.filtered.items.set(I,oe),oe>0&&W++}for(let[I,Q]of o.current)for(let te of Q)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(I);break}r.current.filtered.count=W}function J(){var N,V,Y;let O=z();O&&(((N=O.parentElement)==null?void 0:N.firstChild)===O&&((Y=(V=O.closest(cr))==null?void 0:V.querySelector(wb))==null||Y.scrollIntoView({block:"nearest"})),O.scrollIntoView({block:"nearest"}))}function z(){var N;return(N=k.current)==null?void 0:N.querySelector(`${Bc}[aria-selected="true"]`)}function $(){var N;return Array.from(((N=k.current)==null?void 0:N.querySelectorAll(Zs))||[])}function _(N){let V=$()[N];V&&T.setState("value",V.getAttribute(Ft))}function D(N){var V;let Y=z(),O=$(),W=O.findIndex(Q=>Q===Y),I=O[W+N];(V=l.current)!=null&&V.loop&&(I=W+N<0?O[O.length-1]:W+N===O.length?O[0]:O[W+N]),I&&T.setState("value",I.getAttribute(Ft))}function R(N){let V=z(),Y=V==null?void 0:V.closest(cr),O;for(;Y&&!O;)Y=N>0?Ab(Y,cr):_b(Y,cr),O=Y==null?void 0:Y.querySelector(Zs);O?T.setState("value",O.getAttribute(Ft)):D(N)}let M=()=>_($().length-1),F=N=>{N.preventDefault(),N.metaKey?M():N.altKey?R(1):D(1)},X=N=>{N.preventDefault(),N.metaKey?_(0):N.altKey?R(-1):D(-1)};return c.createElement(Z.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:N=>{var V;(V=y.onKeyDown)==null||V.call(y,N);let Y=N.nativeEvent.isComposing||N.keyCode===229;if(!(N.defaultPrevented||Y))switch(N.key){case"n":case"j":{h&&N.ctrlKey&&F(N);break}case"ArrowDown":{F(N);break}case"p":case"k":{h&&N.ctrlKey&&X(N);break}case"ArrowUp":{X(N);break}case"Home":{N.preventDefault(),_(0);break}case"End":{N.preventDefault(),M();break}case"Enter":{N.preventDefault();let O=z();if(O){let W=new Event(Lo);O.dispatchEvent(W)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:Ob},d),Ln(e,N=>c.createElement(Wc.Provider,{value:T},c.createElement(Gc.Provider,{value:P},N))))}),Sb=c.forwardRef((e,t)=>{var r,n;let o=ge(),a=c.useRef(null),i=c.useContext(zc),l=Ar(),d=Uc(e),u=(n=(r=d.current)==null?void 0:r.forceMount)!=null?n:i==null?void 0:i.forceMount;kt(()=>{if(!u)return l.item(o,i==null?void 0:i.id)},[u]);let f=Hc(o,a,[e.value,e.children,a],e.keywords),p=ma(),g=dt(A=>A.value&&A.value===f.current),m=dt(A=>u||l.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);c.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(Lo,b),()=>A.removeEventListener(Lo,b)},[m,e.onSelect,e.disabled]);function b(){var A,T;v(),(T=(A=d.current).onSelect)==null||T.call(A,f.current)}function v(){p.setState("value",f.current,!0)}if(!m)return null;let{disabled:h,value:y,onSelect:x,forceMount:C,keywords:E,...k}=e;return c.createElement(Z.div,{ref:et(a,t),...k,id:o,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!g,"data-disabled":!!h,"data-selected":!!g,onPointerMove:h||l.getDisablePointerSelection()?void 0:v,onClick:h?void 0:b},e.children)}),Eb=c.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=ge(),l=c.useRef(null),d=c.useRef(null),u=ge(),f=Ar(),p=dt(m=>o||f.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);kt(()=>f.group(i),[]),Hc(i,l,[e.value,e.heading,d]);let g=c.useMemo(()=>({id:i,forceMount:o}),[o]);return c.createElement(Z.div,{ref:et(l,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&c.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Ln(e,m=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},c.createElement(zc.Provider,{value:g},m))))}),Rb=c.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=c.useRef(null),a=dt(i=>!i.search);return!r&&!a?null:c.createElement(Z.div,{ref:et(o,t),...n,"cmdk-separator":"",role:"separator"})}),Pb=c.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=ma(),i=dt(u=>u.search),l=dt(u=>u.selectedItemId),d=Ar();return c.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),c.createElement(Z.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":l,id:d.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),r==null||r(u.target.value)}})}),kb=c.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=c.useRef(null),i=c.useRef(null),l=dt(u=>u.selectedItemId),d=Ar();return c.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return g.observe(u),()=>{cancelAnimationFrame(p),g.unobserve(u)}}},[]),c.createElement(Z.div,{ref:et(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:d.listId},Ln(e,u=>c.createElement("div",{ref:et(i,d.listInnerRef),"cmdk-list-sizer":""},u)))}),jb=c.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...l}=e;return c.createElement(Dc,{open:r,onOpenChange:n},c.createElement($c,{container:i},c.createElement(Lc,{"cmdk-overlay":"",className:o}),c.createElement(Fc,{"aria-label":e.label,"cmdk-dialog":"",className:a},c.createElement(qc,{ref:t,...l}))))}),Nb=c.forwardRef((e,t)=>dt(r=>r.filtered.count===0)?c.createElement(Z.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Tb=c.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return c.createElement(Z.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ln(e,i=>c.createElement("div",{"aria-hidden":!0},i)))}),Nt=Object.assign(qc,{List:kb,Item:Sb,Input:Pb,Group:Eb,Separator:Rb,Dialog:jb,Empty:Nb,Loading:Tb});function Ab(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function _b(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Uc(e){let t=c.useRef(e);return kt(()=>{t.current=e}),t}var kt=typeof window>"u"?c.useEffect:c.useLayoutEffect;function Vt(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function dt(e){let t=ma(),r=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,r,r)}function Hc(e,t,r,n=[]){let o=c.useRef(),a=Ar();return kt(()=>{var i;let l=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),d=n.map(u=>u.trim());a.value(e,l,d),(i=t.current)==null||i.setAttribute(Ft,l),o.current=l}),o}var Ib=()=>{let[e,t]=c.useState(),r=Vt(()=>new Map);return kt(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function Mb(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ln({asChild:e,children:t},r){return e&&c.isValidElement(t)?c.cloneElement(Mb(t),{ref:t.ref},r(t.props.children)):r(t)}var Ob={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Db({...e}){return s.jsx(Dc,{"data-slot":"dialog",...e})}function $b({...e}){return s.jsx(xb,{"data-slot":"dialog-trigger",...e})}function Kc({...e}){return s.jsx($c,{"data-slot":"dialog-portal",...e})}function Lb({...e}){return s.jsx(Vc,{"data-slot":"dialog-close",...e})}function Yc({className:e,...t}){return s.jsx(Lc,{"data-slot":"dialog-overlay",className:j("qodo qodo-dialog-overlay,","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Fb({className:e,children:t,showCloseButton:r=!0,...n}){return s.jsxs(Kc,{"data-slot":"dialog-portal",children:[s.jsx(Yc,{}),s.jsxs(Fc,{"data-slot":"dialog-content",className:j("qodo qodo-dialog-content bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-background dark:border-border",e),...n,children:[t,r&&s.jsxs(Vc,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[s.jsx(Sn,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Vb({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:j("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Bb({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:j("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Gb({className:e,...t}){return s.jsx(bb,{"data-slot":"dialog-title",className:j("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function Wb({className:e,...t}){return s.jsx(yb,{"data-slot":"dialog-description",className:j("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Xc({className:e,...t}){return s.jsx(Nt,{"data-slot":"command",className:j("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Zc({className:e,...t}){return s.jsxs("div",{"data-slot":"command-input-wrapper",className:j("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-[var(--border-panel-neutral)] px-3 text-purple-muted-300"),children:[s.jsx(Ki,{className:"size-4 shrink-0 text-purple-muted-300"}),s.jsx(Nt.Input,{"data-slot":"command-input",className:j("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Jc({className:e,...t}){return s.jsx(Nt.List,{"data-slot":"command-list",className:j("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Qc({...e}){return s.jsx(Nt.Empty,{"data-slot":"command-empty",className:j("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function zb({className:e,...t}){return s.jsx(Nt.Loading,{"data-slot":"command-loading",className:j("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function ed({className:e,...t}){return s.jsx(Nt.Group,{"data-slot":"command-group",className:j("qodo qodo-command-group","text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function td({className:e,...t}){return s.jsx(Nt.Item,{"data-slot":"command-item",className:j("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Fn="Popover",[rd,DR]=we(Fn,[ut]),_r=ut(),[qb,mt]=rd(Fn),nd=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=_r(t),d=c.useRef(null),[u,f]=c.useState(!1),[p,g]=ye({prop:n,defaultProp:o??!1,onChange:a,caller:Fn});return s.jsx(jr,{...l,children:s.jsx(qb,{scope:t,contentId:ge(),triggerRef:d,open:p,onOpenChange:g,onOpenToggle:c.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:r})})};nd.displayName=Fn;var od="PopoverAnchor",Ub=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=mt(od,r),a=_r(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return c.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(Nr,{...a,...n,ref:t})});Ub.displayName=od;var ad="PopoverTrigger",sd=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=mt(ad,r),a=_r(r),i=se(t,o.triggerRef),l=s.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ud(o.open),...n,ref:i,onClick:G(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:s.jsx(Nr,{asChild:!0,...a,children:l})});sd.displayName=ad;var ga="PopoverPortal",[Hb,Kb]=rd(ga,{forceMount:void 0}),id=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=mt(ga,t);return s.jsx(Hb,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(tr,{asChild:!0,container:o,children:n})})})};id.displayName=ga;var Ut="PopoverContent",ld=c.forwardRef((e,t)=>{const r=Kb(Ut,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=mt(Ut,e.__scopePopover);return s.jsx(ke,{present:n||a.open,children:a.modal?s.jsx(Xb,{...o,ref:t}):s.jsx(Zb,{...o,ref:t})})});ld.displayName=Ut;var Yb=it("PopoverContent.RemoveScroll"),Xb=c.forwardRef((e,t)=>{const r=mt(Ut,e.__scopePopover),n=c.useRef(null),o=se(t,n),a=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return _n(i)},[]),s.jsx(Tr,{as:Yb,allowPinchZoom:!0,children:s.jsx(cd,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),a.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0,u=l.button===2||d;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zb=c.forwardRef((e,t)=>{const r=mt(Ut,e.__scopePopover),n=c.useRef(!1),o=c.useRef(!1);return s.jsx(cd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),cd=c.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...p}=e,g=mt(Ut,r),m=_r(r);return Rn(),s.jsx(Pr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:s.jsx(Jt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),children:s.jsx(Tn,{"data-state":ud(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,style:{...p.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)"}})})})}),dd="PopoverClose",Jb=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=mt(dd,r);return s.jsx(Z.button,{type:"button",...n,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});Jb.displayName=dd;var Qb="PopoverArrow",ey=c.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_r(r);return s.jsx(An,{...o,...n,ref:t})});ey.displayName=Qb;function ud(e){return e?"open":"closed"}var ty=nd,ry=sd,ny=id,oy=ld;function va({...e}){return s.jsx(ty,{"data-slot":"popover",...e})}function ha({...e}){return s.jsx(ry,{"data-slot":"popover-trigger",...e})}function xa({className:e,align:t="center",sideOffset:r=4,...n}){return s.jsx(ny,{children:s.jsx(oy,{"data-slot":"popover-content",align:t,sideOffset:r,className:j("qodo qodo-popover-content bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ba=c.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:i=!1,readOnly:l=!1,error:d=!1,className:u,onSearchChange:f,isLoading:p=!1,loadingText:g="Loading...",...m},b)=>{const[v,h]=c.useState(!1),[y,x]=c.useState(""),[C,E]=c.useState(0),k=c.useRef(null),A=e.find(P=>P.value===t),T=P=>{x(P),f==null||f(P)};return c.useEffect(()=>{k.current&&E(k.current.offsetWidth)},[]),s.jsxs(va,{open:l?!1:v,onOpenChange:h,children:[s.jsx(ha,{asChild:!0,children:s.jsxs(Qe,{ref:P=>{typeof b=="function"?b(P):b&&(b.current=P),k.current=P},variant:"outline",role:"combobox","aria-expanded":v,"aria-invalid":d||void 0,"data-readonly":l||void 0,className:j("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!A},u),disabled:i,...m,children:[A?A.label:n,s.jsx(fg,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),s.jsx(xa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-purple-muted-500 text-purple-muted-300",style:{width:C>0?`${C}px`:"auto"},children:s.jsxs(Xc,{className:"w-full bg-[var(--fill-interactive-neutral-idle)]",shouldFilter:!f,children:[s.jsx(Zc,{placeholder:o,...!!f&&{value:y,onValueChange:T}}),s.jsx(Jc,{children:p?s.jsx(zb,{children:g}):s.jsxs(s.Fragment,{children:[s.jsx(Qc,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),s.jsx(ed,{children:e.map(P=>{const B=t===P.value;return s.jsxs(td,{value:P.value,keywords:[P.label],disabled:P.disabled,className:j("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":B}),onSelect:U=>{U!==t&&(r==null||r(U===t?"":U)),h(!1)},children:[s.jsx(Er,{className:j("mr-2 h-4 w-4",{"opacity-100":B,"opacity-0":!B})}),P.label]},P.value)})})]})})]})})]})});ba.displayName="Combobox";const ay=wn("qodo qodo-badge inline-flex items-center dark:font-normal border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",primary:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",outline:"border-[var(--border-tag-neutral-idle)] bg-[var(--fill-tag-neutral-idle)] text-[var(--text-tag-neutral-idle)] hover:text-[var(--text-tag-neutral-hover)] hover:bg-[var(--fill-tag-neutral-hover)] hover:border-[var(--border-tag-neutral-hover)] aria-active:text-[var(--text-tag-neutral-active)] aria-active:bg-[var(--fill-tag-neutral-active)] aria-active:border-[var(--border-tag-neutral-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-neutral-disabled)] aria-disabled:bg-[var(--fill-tag-neutral-disabled)] aria-disabled:border-[var(--border-tag-neutral-disabled)] ",success:"text-[var(--text-tag-positive-idle)] bg-[var(--fill-tag-positive-idle)] border-[var(--border-tag-positive-idle)] hover:text-[var(--text-tag-positive-hover)] hover:bg-[var(--fill-tag-positive-hover)] hover:border-[var(--border-tag-positive-hover)] aria-active:text-[var(--text-tag-positive-active)] aria-active:bg-[var(--fill-tag-positive-active)] aria-active:border-[var(--border-tag-positive-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-positive-disabled)] aria-disabled:bg-[var(--fill-tag-positive-disabled)] aria-disabled:border-[var(--border-tag-positive-disabled)] ",error:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",pending:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",warning:"border-[var(--border-tag-warning-idle)] bg-[var(--fill-tag-warning-idle)] text-[var(--text-tag-warning-idle)] hover:text-[var(--text-tag-warning-hover)] hover:bg-[var(--fill-tag-warning-hover)] hover:border-[var(--border-tag-warning-hover)] aria-active:text-[var(--text-tag-warning-active)] aria-active:bg-[var(--fill-tag-warning-active)] aria-active:border-[var(--border-tag-warning-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-warning-disabled)] aria-disabled:bg-[var(--fill-tag-warning-disabled)] aria-disabled:border-[var(--border-tag-warning-disabled)] ",text:"bg-transparent border-transparent text-primary-foreground p-0"},size:{xs:"text-[10px] px-1.5 py-0.5 rounded-sm bg-transparent hover:bg-transparent aria-disabled:bg-transparent aria-active:bg-transparent",sm:"text-xs px-2.5 py-0.5 rounded-full",md:"text-sm px-2.5 py-0.5 rounded-full",lg:"text-base px-2.5 py-2 rounded-full"}},defaultVariants:{variant:"default",size:"sm"}});function Ht({className:e,variant:t,size:r,disabled:n=!1,active:o=!1,...a}){return s.jsx("div",{"aria-disabled":n,"aria-active":o,className:j(ay({variant:t,size:r}),e),...a})}function fd({className:e,...t}){return s.jsx("div",{"data-slot":"card",className:j("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function pd({className:e,...t}){return s.jsx("div",{"data-slot":"card-header",className:j("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function md({className:e,...t}){return s.jsx("div",{"data-slot":"card-title",className:j("qodo qodo-card-title leading-none font-semibold",e),...t})}function gd({className:e,...t}){return s.jsx("div",{"data-slot":"card-description",className:j("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function sy({className:e,...t}){return s.jsx("div",{"data-slot":"card-action",className:j("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function vd({className:e,...t}){return s.jsx("div",{"data-slot":"card-content",className:j("qodo qodo-card-content px-6",e),...t})}function iy({className:e,...t}){return s.jsx("div",{"data-slot":"card-footer",className:j("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}var ya="Progress",wa=100,[ly,$R]=we(ya),[cy,dy]=ly(ya),hd=c.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=uy,...i}=e;(o||o===0)&&!Js(o)&&console.error(fy(`${o}`,"Progress"));const l=Js(o)?o:wa;n!==null&&!Qs(n,l)&&console.error(py(`${n}`,"Progress"));const d=Qs(n,l)?n:null,u=un(d)?a(d,l):void 0;return s.jsx(cy,{scope:r,value:d,max:l,children:s.jsx(Z.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":un(d)?d:void 0,"aria-valuetext":u,role:"progressbar","data-state":yd(d,l),"data-value":d??void 0,"data-max":l,...i,ref:t})})});hd.displayName=ya;var xd="ProgressIndicator",bd=c.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=dy(xd,r);return s.jsx(Z.div,{"data-state":yd(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});bd.displayName=xd;function uy(e,t){return`${Math.round(e/t*100)}%`}function yd(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function un(e){return typeof e=="number"}function Js(e){return un(e)&&!isNaN(e)&&e>0}function Qs(e,t){return un(e)&&!isNaN(e)&&e<=t&&e>=0}function fy(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${wa}\`.`}function py(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
190
200
|
- a positive number
|
|
191
|
-
- less than the value passed to \`max\` (or ${
|
|
201
|
+
- less than the value passed to \`max\` (or ${wa} if no \`max\` prop is set)
|
|
192
202
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
193
203
|
|
|
194
|
-
Defaulting to \`null\`.`}var mb=Rc,gb=kc;function hb({className:e,value:t,...r}){return s.jsx(mb,{"data-slot":"progress",className:_("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(gb,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Nc({className:e,...t}){return s.jsx("div",{className:_("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Nn="Switch",[vb,rS]=ye(Nn),[xb,bb]=vb(Nn),jc=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:d,form:f,...p}=e,[g,m]=c.useState(null),v=se(t,C=>m(C)),h=c.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,b]=be({prop:o,defaultProp:a??!1,onChange:d,caller:Nn});return s.jsxs(xb,{scope:r,checked:y,disabled:l,children:[s.jsx(X.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Ic(y),"data-disabled":l?"":void 0,disabled:l,value:u,...p,ref:v,onClick:F(e.onClick,C=>{b(R=>!R),x&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),x&&s.jsx(Ac,{control:g,bubbles:!h.current,name:n,value:u,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});jc.displayName=Nn;var Tc="SwitchThumb",_c=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=bb(Tc,r);return s.jsx(X.span,{"data-state":Ic(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});_c.displayName=Tc;var yb="SwitchBubbleInput",Ac=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Bo(r),d=$o(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ac.displayName=yb;function Ic(e){return e?"checked":"unchecked"}var wb=jc,Cb=_c;function Sb({className:e,...t}){return s.jsx(wb,{"data-slot":"switch",className:_("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Cb,{"data-slot":"switch-thumb",className:_("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Mc="Toggle",na=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=be({prop:r,onChange:o,defaultProp:n??!1,caller:Mc});return s.jsx(X.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});na.displayName=Mc;var Rb=na;const Oc=ln("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Eb({className:e,variant:t,size:r,...n}){return s.jsx(Rb,{"data-slot":"toggle",className:_(Oc({variant:t,size:r,className:e})),...n})}var no="rovingFocusGroup.onEntryFocus",kb={bubbles:!1,cancelable:!0},Er="RovingFocusGroup",[Ro,Dc,Pb]=cn(Er),[Nb,Jt]=ye(Er,[Pb]),[jb,Tb]=Nb(Er),Lc=c.forwardRef((e,t)=>s.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(_b,{...e,ref:t})})}));Lc.displayName=Er;var _b=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),v=Ut(a),[h,x]=be({prop:i,defaultProp:l??null,onChange:u,caller:Er}),[y,b]=c.useState(!1),C=Oe(d),R=Dc(r),P=c.useRef(!1),[j,T]=c.useState(0);return c.useEffect(()=>{const E=g.current;if(E)return E.addEventListener(no,C),()=>E.removeEventListener(no,C)},[C]),s.jsx(jb,{scope:r,orientation:n,dir:v,loop:o,currentTabStopId:h,onItemFocus:c.useCallback(E=>x(E),[x]),onItemShiftTab:c.useCallback(()=>b(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(E=>E+1),[]),onFocusableItemRemove:c.useCallback(()=>T(E=>E-1),[]),children:s.jsx(X.div,{tabIndex:y||j===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{P.current=!0}),onFocus:F(e.onFocus,E=>{const V=!P.current;if(E.target===E.currentTarget&&V&&!y){const U=new CustomEvent(no,kb);if(E.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=R().filter(A=>A.focusable),te=re.find(A=>A.active),J=re.find(A=>A.id===h),D=[te,J,...re].filter(Boolean).map(A=>A.ref.current);Vc(D,f)}}P.current=!1}),onBlur:F(e.onBlur,()=>b(!1))})})}),$c="RovingFocusGroupItem",Fc=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,u=me(),d=a||u,f=Tb($c,r),p=f.currentTabStopId===d,g=Dc(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:h}=f;return c.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),s.jsx(Ro.ItemSlot,{scope:r,id:d,focusable:n,active:o,children:s.jsx(X.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,x=>{n?f.onItemFocus(d):x.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:F(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Mb(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const R=C.indexOf(x.currentTarget);C=f.loop?Ob(C,R+1):C.slice(R+1)}setTimeout(()=>Vc(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:h!=null}):i})})});Fc.displayName=$c;var Ab={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ib(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mb(e,t,r){const n=Ib(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ab[n]}function Vc(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ob(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var oa=Lc,aa=Fc,mt="ToggleGroup",[Bc,nS]=ye(mt,[Jt]),Gc=Jt(),sa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Db,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(Lb,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${mt}\``)});sa.displayName=mt;var[Wc,zc]=Bc(mt),Db=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??"",onChange:o,caller:mt});return s.jsx(Wc,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(qc,{...a,ref:t})})}),Lb=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:mt}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Wc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:s.jsx(qc,{...a,ref:t})})});sa.displayName=mt;var[$b,Fb]=Bc(mt),qc=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...u}=e,d=Gc(r),f=Ut(i),p={role:"group",dir:f,...u};return s.jsx($b,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(oa,{asChild:!0,...d,orientation:a,dir:f,loop:l,children:s.jsx(X.div,{...p,ref:t})}):s.jsx(X.div,{...p,ref:t})})}),Qr="ToggleGroupItem",Uc=S.forwardRef((e,t)=>{const r=zc(Qr,e.__scopeToggleGroup),n=Fb(Qr,e.__scopeToggleGroup),o=Gc(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},u=S.useRef(null);return n.rovingFocus?s.jsx(aa,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:s.jsx(_s,{...l,ref:t})}):s.jsx(_s,{...l,ref:t})});Uc.displayName=Qr;var _s=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=zc(Qr,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(na,{...l,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Vb=sa,Bb=Uc;const Hc=c.createContext({size:"default",variant:"default"});function Gb({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Vb,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:_("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Hc.Provider,{value:{variant:t,size:r},children:n})})}function Wb({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Hc);return s.jsx(Bb,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:_(Oc({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var jn="Collapsible",[zb,Kc]=ye(jn),[qb,ia]=zb(jn),Yc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u,d]=be({prop:n,defaultProp:o??!1,onChange:i,caller:jn});return s.jsx(qb,{scope:r,disabled:a,contentId:me(),open:u,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),children:s.jsx(X.div,{"data-state":ca(u),"data-disabled":a?"":void 0,...l,ref:t})})});Yc.displayName=jn;var Xc="CollapsibleTrigger",Zc=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=ia(Xc,r);return s.jsx(X.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ca(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});Zc.displayName=Xc;var la="CollapsibleContent",Jc=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ia(la,e.__scopeCollapsible);return s.jsx(ke,{present:r||o.open,children:({present:a})=>s.jsx(Ub,{...n,ref:t,present:a})})});Jc.displayName=la;var Ub=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ia(la,r),[l,u]=c.useState(n),d=c.useRef(null),f=se(t,d),p=c.useRef(0),g=p.current,m=c.useRef(0),v=m.current,h=i.open||l,x=c.useRef(h),y=c.useRef(void 0);return c.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),xe(()=>{const b=d.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const C=b.getBoundingClientRect();p.current=C.height,m.current=C.width,x.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),u(n)}},[i.open,n]),s.jsx(X.div,{"data-state":ca(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function ca(e){return e?"open":"closed"}var Hb=Yc,Kb=Zc,Yb=Jc,Fe="Accordion",Xb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ua,Zb,Jb]=cn(Fe),[Tn,oS]=ye(Fe,[Jb,Kc]),da=Kc(),Qc=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(ua.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(ry,{...a,ref:t}):s.jsx(ty,{...o,ref:t})})});Qc.displayName=Fe;var[eu,Qb]=Tn(Fe),[tu,ey]=Tn(Fe,{collapsible:!1}),ty=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,u]=be({prop:r,defaultProp:n??"",onChange:o,caller:Fe});return s.jsx(eu,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:u,onItemClose:S.useCallback(()=>a&&u(""),[a,u]),children:s.jsx(tu,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(ru,{...i,ref:t})})})}),ry=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=be({prop:r,defaultProp:n??[],onChange:o,caller:Fe}),u=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),d=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(eu,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:d,children:s.jsx(tu,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(ru,{...a,ref:t})})})}),[ny,_n]=Tn(Fe),ru=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),u=se(l,t),d=Zb(r),p=Ut(o)==="ltr",g=F(e.onKeyDown,m=>{var E;if(!Xb.includes(m.key))return;const v=m.target,h=d().filter(V=>{var U;return!((U=V.ref.current)!=null&&U.disabled)}),x=h.findIndex(V=>V.ref.current===v),y=h.length;if(x===-1)return;m.preventDefault();let b=x;const C=0,R=y-1,P=()=>{b=x+1,b>R&&(b=C)},j=()=>{b=x-1,b<C&&(b=R)};switch(m.key){case"Home":b=C;break;case"End":b=R;break;case"ArrowRight":a==="horizontal"&&(p?P():j());break;case"ArrowDown":a==="vertical"&&P();break;case"ArrowLeft":a==="horizontal"&&(p?j():P());break;case"ArrowUp":a==="vertical"&&j();break}const T=b%y;(E=h[T].ref.current)==null||E.focus()});return s.jsx(ny,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(ua.Slot,{scope:r,children:s.jsx(X.div,{...i,"data-orientation":a,ref:u,onKeyDown:n?void 0:g})})})}),en="AccordionItem",[oy,fa]=Tn(en),nu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=_n(en,r),i=Qb(en,r),l=da(r),u=me(),d=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(oy,{scope:r,open:d,disabled:f,triggerId:u,children:s.jsx(Hb,{"data-orientation":a.orientation,"data-state":cu(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});nu.displayName=en;var ou="AccordionHeader",au=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(ou,r);return s.jsx(X.h3,{"data-orientation":o.orientation,"data-state":cu(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});au.displayName=ou;var Eo="AccordionTrigger",su=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(Eo,r),i=ey(Eo,r),l=da(r);return s.jsx(ua.ItemSlot,{scope:r,children:s.jsx(Kb,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});su.displayName=Eo;var iu="AccordionContent",lu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=_n(Fe,r),a=fa(iu,r),i=da(r);return s.jsx(Yb,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});lu.displayName=iu;function cu(e){return e?"open":"closed"}var ay=Qc,sy=nu,iy=au,ly=su,cy=lu;function uy({...e}){return s.jsx(ay,{"data-slot":"accordion",...e})}function dy({className:e,...t}){return s.jsx(sy,{"data-slot":"accordion-item",className:_("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function fy({className:e,children:t,...r}){return s.jsx(iy,{className:"flex",children:s.jsxs(ly,{"data-slot":"accordion-trigger",className:_("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Wo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function py({className:e,children:t,...r}){return s.jsx(cy,{"data-slot":"accordion-content",className:_("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:_("pt-0 pb-4",e),children:t})})}var my=e=>e.type==="checkbox",sr=e=>e instanceof Date,pa=e=>e==null;const uu=e=>typeof e=="object";var Et=e=>!pa(e)&&!Array.isArray(e)&&uu(e)&&!sr(e),gy=e=>Et(e)&&e.target?my(e.target)?e.target.checked:e.target.value:e,hy=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vy=(e,t)=>e.has(hy(t)),xy=e=>{const t=e.constructor&&e.constructor.prototype;return Et(t)&&t.hasOwnProperty("isPrototypeOf")},by=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function du(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(by&&(e instanceof Blob||n))&&(r||Et(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!xy(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=du(e[o]));else return e;return t}var fu=e=>/^\w*$/.test(e),ko=e=>e===void 0,yy=e=>Array.isArray(e)?e.filter(Boolean):[],pu=e=>yy(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ee=(e,t,r)=>{if(!t||!Et(e))return r;const n=(fu(t)?[t]:pu(t)).reduce((o,a)=>pa(o)?o:o[a],e);return ko(n)||n===e?ko(e[t])?r:e[t]:n},oo=e=>typeof e=="boolean",As=(e,t,r)=>{let n=-1;const o=fu(t)?[t]:pu(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let u=r;if(n!==i){const d=e[l];u=Et(d)||Array.isArray(d)?d:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=u,e=e[l]}};const Is={BLUR:"blur",CHANGE:"change"},Ms={all:"all"},ma=S.createContext(null);ma.displayName="HookFormContext";const Qt=()=>S.useContext(ma),wy=e=>{const{children:t,...r}=e;return S.createElement(ma.Provider,{value:r},t)};var Cy=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==Ms.all&&(t._proxyFormState[i]=!n||Ms.all),r&&(r[i]=!0),e[i]}});return o};const mu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function gu(e){const t=Qt(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),u=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return mu(()=>r._subscribe({name:o,formState:u.current,exact:a,callback:d=>{!n&&l({...r._formState,...d})}}),[o,n,a]),S.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>Cy(i,r,u.current,!1),[i,r])}var Sy=e=>typeof e=="string",Ry=(e,t,r,n,o)=>Sy(e)?Ee(r,e,o):Array.isArray(e)?e.map(a=>Ee(r,a)):r,Os=e=>pa(e)||!uu(e);function hu(e,t,r=new WeakSet){if(Os(e)||Os(t))return e===t;if(sr(e)&&sr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(sr(i)&&sr(l)||Et(i)&&Et(l)||Array.isArray(i)&&Array.isArray(l)?!hu(i,l,r):i!==l)return!1}}return!0}function Ey(e){const t=Qt(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},u=S.useRef(o),d=S.useRef(l),f=S.useRef(void 0);d.current=l;const p=S.useMemo(()=>r._getWatch(n,u.current),[r,n]),[g,m]=S.useState(d.current?d.current(p):p);return mu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:v=>{if(!a){const h=Ry(n,r._names,v.values||r._formValues,!1,u.current);if(d.current){const x=d.current(h);hu(x,f.current)||(m(x),f.current=x)}else m(h)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function ky(e){const t=Qt(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=vy(o._names.array,r),u=S.useMemo(()=>Ee(o._formValues,r,Ee(o._defaultValues,r,i)),[o,r,i]),d=Ey({control:o,name:r,defaultValue:u,exact:!0}),f=gu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:d,...oo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ee(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Ee(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Ee(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Ee(f.validatingFields,r)},error:{enumerable:!0,get:()=>Ee(f.errors,r)}}),[f,r]),v=S.useCallback(b=>g.current.onChange({target:{value:gy(b),name:r},type:Is.CHANGE}),[r]),h=S.useCallback(()=>g.current.onBlur({target:{value:Ee(o._formValues,r),name:r},type:Is.BLUR}),[r,o._formValues]),x=S.useCallback(b=>{const C=Ee(o._fields,r);C&&b&&(C._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:R=>b.setCustomValidity(R),reportValidity:()=>b.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:d,...oo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:v,onBlur:h,ref:x}),[r,n,f.disabled,v,h,x,d]);return S.useEffect(()=>{const b=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...oo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(R,P)=>{const j=Ee(o._fields,R);j&&j._f&&(j._f.mount=P)};if(C(r,!0),b){const R=du(Ee(o._options.defaultValues,r));As(o._defaultValues,r,R),ko(Ee(o._formValues,r))&&As(o._formValues,r,R)}return!l&&o.register(r),()=>{(l?b&&!o._state.action:b)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const vu=e=>e.render(ky(e)),xu=S.createContext(void 0),bu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(xu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(wy,{...t,children:o})})},yu=()=>{const e=S.useContext(xu),t=Qt();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Py=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Je,{type:e,variant:r(),...t})};var wu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ds=S.createContext&&S.createContext(wu),Ny=["attr","size","title"];function jy(e,t){if(e==null)return{};var r=Ty(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ty(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tn.apply(this,arguments)}function Ls(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ls(Object(r),!0).forEach(function(n){_y(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ls(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _y(e,t,r){return t=Ay(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ay(e){var t=Iy(e,"string");return typeof t=="symbol"?t:t+""}function Iy(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cu(e){return e&&e.map((t,r)=>S.createElement(t.tag,rn({key:r},t.attr),Cu(t.child)))}function Su(e){return t=>S.createElement(My,tn({attr:rn({},e.attr)},t),Cu(e.child))}function My(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=jy(e,Ny),l=o||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),S.createElement("svg",tn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:u,style:rn(rn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return Ds!==void 0?S.createElement(Ds.Consumer,null,r=>t(r)):t(wu)}function Oy(e){return Su({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Dy="Label",Ru=c.forwardRef((e,t)=>s.jsx(X.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ru.displayName=Dy;var Ly=Ru;function Eu({className:e,...t}){return s.jsx(Ly,{"data-slot":"label",className:_("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const ku=c.createContext({}),$y=({...e})=>s.jsx(ku.Provider,{value:{name:e.name},children:s.jsx(vu,{...e})}),An=()=>{const e=c.useContext(ku),t=c.useContext(Pu),{getFieldState:r}=Qt(),n=gu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Pu=c.createContext({});function Fy({className:e,...t}){const r=c.useId();return s.jsx(Pu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:_("qodo qodo-form-item grid gap-2",e),...t})})}function Vy({className:e,...t}){const{formItemId:r}=An();return s.jsx(Eu,{"data-slot":"form-label",className:_("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function By({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=An();return s.jsx(Kp,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Gy({className:e,...t}){const{formDescriptionId:r}=An();return s.jsx("p",{"data-slot":"form-description",id:r,className:_("text-purple-muted-300 text-sm",e),...t})}function Wy({className:e,...t}){const{error:r,formMessageId:n}=An(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:_("text-destructive text-sm",e),...t,children:o}):null}var[In,aS]=ye("Tooltip",[ut]),Mn=ut(),Nu="TooltipProvider",zy=700,Po="tooltip.open",[qy,ga]=In(Nu),ju=e=>{const{__scopeTooltip:t,delayDuration:r=zy,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),s.jsx(qy,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};ju.displayName=Nu;var pr="Tooltip",[Uy,kr]=In(pr),Tu=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=ga(pr,e.__scopeTooltip),d=Mn(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),v=i??u.disableHoverableContent,h=l??u.delayDuration,x=c.useRef(!1),[y,b]=be({prop:n,defaultProp:o??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(Po))):u.onClose(),a==null||a(T)},caller:pr}),C=c.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),R=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,b(!0)},[b]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),j=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,b(!0),m.current=0},h)},[h,b]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(yr,{...d,children:s.jsx(Uy,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?j():R()},[u.isOpenDelayedRef,j,R]),onTriggerLeave:c.useCallback(()=>{v?P():(window.clearTimeout(m.current),m.current=0)},[P,v]),onOpen:R,onClose:P,disableHoverableContent:v,children:r})})};Tu.displayName=pr;var No="TooltipTrigger",_u=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=kr(No,r),a=ga(No,r),i=Mn(r),l=c.useRef(null),u=se(t,l,o.onTriggerChange),d=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(wr,{asChild:!0,...i,children:s.jsx(X.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});_u.displayName=No;var ha="TooltipPortal",[Hy,Ky]=In(ha,{forceMount:void 0}),Au=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=kr(ha,t);return s.jsx(Hy,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Au.displayName=ha;var Wt="TooltipContent",Iu=c.forwardRef((e,t)=>{const r=Ky(Wt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=kr(Wt,e.__scopeTooltip);return s.jsx(ke,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Mu,{side:o,...a,ref:t}):s.jsx(Yy,{side:o,...a,ref:t})})}),Yy=c.forwardRef((e,t)=>{const r=kr(Wt,e.__scopeTooltip),n=ga(Wt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((v,h)=>{const x=v.currentTarget,y={x:v.clientX,y:v.clientY},b=Qy(y,x.getBoundingClientRect()),C=ew(y,b),R=tw(h.getBoundingClientRect()),P=nw([...C,...R]);l(P),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(u&&f){const v=x=>m(x,f),h=x=>m(x,u);return u.addEventListener("pointerleave",v),f.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",h)}}},[u,f,m,g]),c.useEffect(()=>{if(i){const v=h=>{const x=h.target,y={x:h.clientX,y:h.clientY},b=(u==null?void 0:u.contains(x))||(f==null?void 0:f.contains(x)),C=!rw(y,i);b?g():C&&(g(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,f,i,d,g]),s.jsx(Mu,{...e,ref:a})}),[Xy,Zy]=In(pr,{isInside:!1}),Jy=Xp("TooltipContent"),Mu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=kr(Wt,r),d=Mn(r),{onClose:f}=u;return c.useEffect(()=>(document.addEventListener(Po,f),()=>document.removeEventListener(Po,f)),[f]),c.useEffect(()=>{if(u.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(gn,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Jy,{children:n}),s.jsx(Xy,{scope:r,isInside:!0,children:s.jsx(Gg,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Iu.displayName=Wt;var Ou="TooltipArrow",Du=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mn(r);return Zy(Ou,r).isInside?null:s.jsx(hn,{...o,...n,ref:t})});Du.displayName=Ou;function Qy(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function ew(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function tw(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function rw(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function nw(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),ow(t)}function ow(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var aw=ju,sw=Tu,iw=_u,lw=Au,cw=Iu,uw=Du;function Lu({delayDuration:e=0,...t}){return s.jsx(aw,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $u({...e}){return s.jsx(Lu,{children:s.jsx(sw,{"data-slot":"tooltip",...e})})}function Fu({...e}){return s.jsx(iw,{"data-slot":"tooltip-trigger",...e})}function Vu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(lw,{children:s.jsxs(cw,{"data-slot":"tooltip-content",sideOffset:t,className:_("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(uw,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const er=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:u,disabled:d,readOnly:f}=yu(),p=()=>a?s.jsxs($u,{children:[s.jsx(Fu,{asChild:!0,children:s.jsx("span",{children:s.jsx(Oy,{size:16})})}),s.jsx(Vu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(Gy,{children:o}):s.jsx(s.Fragment,{});return s.jsx($y,{control:u,name:r,render:({field:m,fieldState:v})=>s.jsxs(Fy,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(Vy,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(By,{children:s.jsx(e,{...m,disabled:d,...l,readOnly:f,error:!!v.error})}),!!o&&g(),s.jsx(Wy,{})]})})},dw=S.forwardRef((e,t)=>s.jsx(vr,{...e,ref:t})),fw=S.forwardRef((e,t)=>er(dw)({...e,ref:t})),Bu=S.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o,readOnly:a,error:i},l)=>{var m;const[u,d]=S.useState(!1),f=v=>{a||n&&n({target:{value:v}})},p=v=>{a||d(v)},g=v=>s.jsx(Ko,{value:v.value,disabled:v.disabled,children:s.jsxs("div",{className:"flex flex-col",children:[v.label,v.subLabel&&s.jsx("span",{className:"text-xs text-muted-foreground",style:{overflowWrap:"anywhere"},children:v.subLabel})]})},v.value);return s.jsxs(Tl,{value:r,open:u,disabled:o,onValueChange:f,onOpenChange:p,children:[s.jsx(zo,{ref:l,readOnly:a,"aria-invalid":i||void 0,children:s.jsx(_l,{placeholder:t,children:r&&((m=e.find(v=>v.value===r))==null?void 0:m.label)})}),s.jsx(Ho,{children:e.map(g)})]})});Bu.displayName="BaseSelectComponent";const pw=er(Bu),mw=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=u=>{n({target:{value:u}})};return s.jsx(ea,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),gw=er(mw);var va="Radio",[hw,Gu]=ye(va),[vw,xw]=hw(va),Wu=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,form:d,...f}=e,[p,g]=c.useState(null),m=se(t,x=>g(x)),v=c.useRef(!1),h=p?d||!!p.closest("form"):!0;return s.jsxs(vw,{scope:r,checked:o,disabled:i,children:[s.jsx(X.button,{type:"button",role:"radio","aria-checked":o,"data-state":Hu(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,x=>{o||u==null||u(),h&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),h&&s.jsx(Uu,{control:p,bubbles:!v.current,name:n,value:l,checked:o,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});Wu.displayName=va;var zu="RadioIndicator",qu=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=xw(zu,r);return s.jsx(ke,{present:n||a.checked,children:s.jsx(X.span,{"data-state":Hu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});qu.displayName=zu;var bw="RadioBubbleInput",Uu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),u=Bo(r),d=$o(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==r&&m){const v=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(v)}},[u,r,n]),s.jsx(X.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Uu.displayName=bw;function Hu(e){return e?"checked":"unchecked"}var yw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],On="RadioGroup",[ww,sS]=ye(On,[Jt,Gu]),Ku=Jt(),Yu=Gu(),[Cw,Sw]=ww(On),Xu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:d,loop:f=!0,onValueChange:p,...g}=e,m=Ku(r),v=Ut(d),[h,x]=be({prop:a,defaultProp:o??null,onChange:p,caller:On});return s.jsx(Cw,{scope:r,name:n,required:i,disabled:l,value:h,onValueChange:x,children:s.jsx(oa,{asChild:!0,...m,orientation:u,dir:v,loop:f,children:s.jsx(X.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v,...g,ref:t})})})});Xu.displayName=On;var Zu="RadioGroupItem",Ju=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=Sw(Zu,r),i=a.disabled||n,l=Ku(r),u=Yu(r),d=c.useRef(null),f=se(t,d),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=h=>{yw.includes(h.key)&&(g.current=!0)},v=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),s.jsx(aa,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(Wu,{disabled:i,required:a.required,checked:p,...u,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=d.current)==null||m.click())})})})});Ju.displayName=Zu;var Rw="RadioGroupIndicator",Qu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Yu(r);return s.jsx(qu,{...o,...n,ref:t})});Qu.displayName=Rw;var Ew=Xu,kw=Ju,Pw=Qu;function Nw({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(Ew,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:_("qodo qodo-radio-group grid gap-3 group",e),...n})}function jw({className:e,...t}){return s.jsx(kw,{"data-slot":"radio-group-item",className:_("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(Pw,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(bv,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const xa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:u="horizontal",dir:d="ltr",name:f,onChange:p,...g}=e,m=h=>{i||(p==null||p({target:{value:h}}),o==null||o(h))},v=_("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":u==="horizontal","flex-col gap-3":u==="vertical"},l);return s.jsx(Nw,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:v,dir:d,...g})});xa.displayName="BaseRadioGroupComponent";const ba=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(Eu,{htmlFor:i,className:_("flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(jw,{value:e,id:i,disabled:t||r}),o]},e)};ba.displayName="RadioGroupItemComponent";const Tw=er(xa),_w=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),Aw=({children:e,description:t,className:r})=>s.jsxs("div",{className:_("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),ed=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=_("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});ed.displayName="FormGroup";function Iw({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:_("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const Mw=S.forwardRef((e,t)=>er(Iw)({...e,ref:t})),td=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="tag"})=>s.jsxs(Pn,{variant:a,className:_("flex items-center gap-1 px-2 py-0.5","rounded-full text-xs font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Je,{type:"button",variant:"ghost",size:"icon",className:"hover:text-destructive p-0 w-[10px] h-[10px]",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Sn,{className:"w-[10px] h-[10px] text-[var(--icon-tag-emphasis-idle)] hover:text-[var(--icon-tag-emphasis-hover)]"})})]}),Ow=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:_("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(td,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Je,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:u=>u.preventDefault(),onClick:u=>{u.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(Iv,{className:"h-4 w-4"})})]})}),ao={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},Dw=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},rd=({value:e=[],variant:t="tag",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:u,suggestionWrapperClassName:d,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:v,normalizeTags:h=Dw,onChange:x=()=>{},onAddTag:y=()=>{},onRemoveTag:b=()=>{},onResetTags:C=()=>{}})=>{const[R,P]=S.useState(""),[j,T]=S.useState(!1),E=S.useRef(null),V=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const J=e.length>=i,q=M=>{if(J||e.some(I=>I.id===M.id))return;const G=[...e,M];x(G),y(M)},D=M=>{const G=e.filter(I=>I.id!==M);x(G),b(M)},A=()=>{x==null||x([]),C()},$=M=>{const G=M.target.value;P(G),T(!0)},k=()=>{const M=R.trim().toLowerCase();if(!M)return[];const G=new Set(e.map(I=>I.id));return o.filter(I=>I.label.toLowerCase().includes(M)&&!G.has(I.id))},O=M=>h?h(M):M,W=()=>{const M=R.trim();if(!M)return;const G=O(M);if(!G)return;if(e.some(Z=>Z.id===G)){P(""),T(!1);return}const I=o.find(Z=>Z.id===G||O(Z.label)===G);I?q(I):a&&q({id:G,label:G}),P(""),T(!1)},Q=M=>{const G=M.key===ao.BACKSPACE&&!R&&e.length>0,I=M.key===ao.ENTER&&R,Z=M.key===ao.ESCAPE;I?(M.preventDefault(),W(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):G?D(e[e.length-1].id):Z&&T(!1)},N=()=>{if(R&&k().length>0)return s.jsx(Sc,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:M=>M.preventDefault(),onCloseAutoFocus:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault(),children:s.jsx("div",{className:_("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",d),children:k().map(M=>s.jsx(Ow,{label:M.label,id:M.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var G;q(M),P(""),T(!1),(G=E.current)==null||G.focus()}},M.id))})})},B=()=>g||s.jsx(_v,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Y=()=>e.map(M=>s.jsx(td,{label:M.label,id:M.id,onRemoveTag:D,disabled:l,className:p,variant:t},M.id));return s.jsx("div",{className:_("w-full",u),children:s.jsxs(wc,{open:j&&!l,onOpenChange:T,modal:!1,children:[s.jsx(Cc,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:_("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-background py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:M=>{var G;M.stopPropagation(),T(!0),(G=E.current)==null||G.focus()},children:[B(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Y(),s.jsx(vr,{ref:E,value:R,onChange:$,onClick:M=>M.stopPropagation(),onFocus:()=>T(!0),onBlur:v,onKeyDown:Q,placeholder:r,disabled:l||J,className:_("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),s.jsx(Sn,{className:"h-4 w-4 hover:cursor-pointer text-[var(--icon-input-neutral-idle)] hover:text-[var(--icon-input-neutral-hover)]",onClick:A})]})}),N()]})})};function Lw(e){const{control:t}=Qt();return s.jsx(vu,{name:e.name,control:t,render:({field:r})=>s.jsx(rd,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const $w=er(Lw),Ae=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,u=_("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(bu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:u,onSubmit:l(a),...i})})};Ae.Button=Py;Ae.Input=fw;Ae.Select=pw;Ae.Combobox=gw;Ae.RadioGroup=Tw;Ae.RadioGroupItem=ba;Ae.Group=ed;Ae.Textarea=Mw;Ae.Divider=_w;Ae.Title=Aw;Ae.TagsInput=$w;function Fw(e){return e==null?[]:Array.isArray(e)?e:[e]}var Vw=e=>Array.from(Array(e).keys()),$s=e=>(e==null?void 0:e.constructor.name)==="Array",Bw=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ya(e[r],t[r]))return!1;return!0},ya=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if($s(e)&&$s(t))return Bw(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!ya(e[a],t[a]))return!1}return!0},Gw=e=>e!=null&&typeof e=="object",qr=e=>typeof e=="string",ir=e=>typeof e=="function",Ww=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),zw=e=>Object.prototype.toString.call(e),nd=Function.prototype.toString,qw=nd.call(Object),Uw=e=>{if(!Gw(e)||zw(e)!="[object Object]"||Yw(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ww(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nd.call(r)==qw},Hw=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Kw=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Yw=e=>Hw(e)||Kw(e),Xw=e=>e(),Zw=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Jw=e=>Number.isNaN(e),Qw=e=>Jw(e)?0:e,e0=(e,t,r)=>{const n=Qw(e),o=n>=t,a=r==null||n<=r;return o&&a};function od(e){if(!Uw(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=od(o))}return r}function Fs(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function t0(e,t){if(e==null)throw new Error(t())}var ad=e=>typeof e=="object"&&e!==null,Ge=e=>e?"":void 0,r0=9,n0=e=>ad(e)&&e.nodeType===r0,o0=e=>ad(e)&&e===e.window;function a0(e){if(!e)return!1;const t=e.getRootNode();return sd(t)===e}function s0(e){return n0(e)?e:o0(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function sd(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var i0=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),l0=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Vs=e=>{const t={};let r;for(;r=l0.exec(e);)t[r[1]]=r[2];return t},c0=(e,t)=>{if(qr(e)){if(qr(t))return`${e};${t}`;e=Vs(e)}else qr(t)&&(t=Vs(t));return Object.assign({},e??{},t??{})};function Ve(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Zw(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=i0(t[o],r[o]);continue}if(o==="style"){t[o]=c0(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function u0(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((u,d)=>!ya(n[d],u)))&&(n=i,o=t(i,a)),o}}var Lt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Lt||{}),so="__init__";function d0(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>s0(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>sd(t()),isActiveElement:a0,getById:i=>t().getElementById(i)}}function f0(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var p0=()=>e=>Array.from(new Set(e)),id=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function nn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const u=S.useRef(l.current);id(()=>{u.current=l.current},[o,e().value]);const d=p=>{var v,h;const g=u.current,m=ir(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(h=(v=e()).onChange)==null||h.call(v,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?hr.flushSync:Xw)(()=>d(p))},invoke(p,g){var m,v;(v=(m=e()).onChange)==null||v.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}nn.cleanup=e=>{S.useEffect(()=>e,[])};nn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function m0(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var g0=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function h0(e,t={}){var re,te,J,q;const r=S.useMemo(()=>{const{id:D,ids:A,getRootNode:$}=t;return d0({id:D,ids:A,getRootNode:$})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:od(t),scope:r}))??t,a=v0(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:nn,scope:r,flush:Bs,getContext(){return u},getComputed(){return P},getRefs(){return h},getEvent(){return m()}}),l=ld(i),u={get(D){var A;return(A=l.current)==null?void 0:A[D].ref.current},set(D,A){var $;($=l.current)==null||$[D].set(A)},initial(D){var A;return(A=l.current)==null?void 0:A[D].initial},hash(D){var $,k;const A=($=l.current)==null?void 0:$[D].get();return(k=l.current)==null?void 0:k[D].hash(A)}},d=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),v=()=>({...j,matches(...D){return D.includes(j.ref.current)},hasTag(D){var A,$;return!!(($=(A=e.states[j.ref.current])==null?void 0:A.tags)!=null&&$.includes(D))}}),h=m0(((J=e.refs)==null?void 0:J.call(e,{prop:a,context:u}))??{}),x=()=>({state:v(),context:u,event:m(),prop:a,send:U,action:y,guard:b,track:g0,refs:h,computed:P,flush:Bs,scope:r,choose:R}),y=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(k=>{var W,Q;const O=(Q=(W=e.implementations)==null?void 0:W.actions)==null?void 0:Q[k];return O||Fs(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),O});for(const k of $)k==null||k(x())},b=D=>{var A,$;return ir(D)?D(x()):($=(A=e.implementations)==null?void 0:A.guards)==null?void 0:$[D](x())},C=D=>{const A=ir(D)?D(x()):D;if(!A)return;const $=A.map(O=>{var Q,N;const W=(N=(Q=e.implementations)==null?void 0:Q.effects)==null?void 0:N[O];return W||Fs(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),W}),k=[];for(const O of $){const W=O==null?void 0:O(x());W&&k.push(W)}return()=>k.forEach(O=>O==null?void 0:O())},R=D=>Fw(D).find(A=>{let $=!A.guard;return qr(A.guard)?$=!!b(A.guard):ir(A.guard)&&($=A.guard(x())),$}),P=D=>{t0(e.computed,()=>"[zag-js] No computed object found on machine");const A=e.computed[D];return A({context:u,event:m(),prop:a,refs:h,scope:r,computed:P})},j=nn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,A){var k,O,W,Q;if(A){const N=d.current.get(A);N==null||N(),d.current.delete(A)}A&&y((k=e.states[A])==null?void 0:k.exit),y((O=f.current)==null?void 0:O.actions);const $=C((W=e.states[D])==null?void 0:W.effects);if($&&d.current.set(D,$),A===so){y(e.entry);const N=C(e.effects);N&&d.current.set(so,N)}y((Q=e.states[D])==null?void 0:Q.entry)}})),T=S.useRef(void 0),E=S.useRef(Lt.NotStarted);id(()=>{queueMicrotask(()=>{const $=E.current===Lt.Started;E.current=Lt.Started,n($?"rehydrating...":"initializing...");const k=T.current??j.initial;j.invoke(k,$?j.get():so)});const D=d.current,A=j.ref.current;return()=>{n("unmounting..."),T.current=A,E.current=Lt.Stopped,D.forEach($=>$==null?void 0:$()),d.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in j?j.ref.current:j.get(),U=D=>{queueMicrotask(()=>{var Q,N;if(E.current!==Lt.Started)return;p.current=g.current,g.current=D;let A=V();const $=((Q=e.states[A].on)==null?void 0:Q[D.type])??((N=e.on)==null?void 0:N[D.type]),k=R($);if(!k)return;f.current=k;const O=k.target??A;n("transition",D.type,k.target||A,`(${k.actions})`);const W=O!==A;W?hr.flushSync(()=>j.set(O)):k.reenter&&!W?j.invoke(A,A):y(k.actions??[])})};return(q=e.watch)==null||q.call(e,x()),{state:v(),send:U,context:u,prop:a,scope:r,refs:h,computed:P,event:m(),getStatus:()=>E.current}}function ld(e){const t=S.useRef(e);return t.current=e,t}function v0(e){const t=ld(e);return function(n){return t.current[n]}}function Bs(e){queueMicrotask(()=>{hr.flushSync(()=>e())})}var x0=f0(e=>e);function b0(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function y0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const io=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),u=y0(l);return S.cloneElement(l,{...Ve(i,l.props),ref:n?b0(n,u):u})}));return t.displayName=e.displayName||e.name,t},w0=()=>{const e=new Map;return new Proxy(io,{apply(t,r,n){return io(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,io(n)),e.get(n)}})},Ye=w0();function C0(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Pr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function u(){var f;const d=S.useContext(l);if(!d&&r){const p=new Error(a??C0(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,u),p}return d}return[l.Provider,u,l]}const[S0,rt]=Pr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),cd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getContentProps({index:r.count}),e);return s.jsx(Ye.div,{...n,ref:t})});cd.displayName="StepsCompletedContent";const wa=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),ud=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getContentProps(r),n);return s.jsx(Ye.div,{...a,ref:t})});ud.displayName="StepsContent";const[R0,Ca]=Pr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),dd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getIndicatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});dd.displayName="StepsIndicator";const[E0,iS]=Pr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),fd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["index"]),o=rt(),a=Ve(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(R0,{value:r,children:s.jsx(E0,{value:i,children:s.jsx(Ye.div,{...a,ref:t})})})});fd.displayName="StepsItem";const pd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getListProps(),e);return s.jsx(Ye.div,{...n,ref:t})});pd.displayName="StepsList";const md=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getNextTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});md.displayName="StepsNextTrigger";const gd=S.forwardRef((e,t)=>{const r=rt(),n=Ve(r.getPrevTriggerProps(),e);return s.jsx(Ye.button,{...n,ref:t})});gd.displayName="StepsPrevTrigger";var lr=(e,t=[])=>({parts:(...r)=>{if(k0(t))return lr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>lr(e,[...t,...r]),omit:(...r)=>lr(e,t.filter(n=>!r.includes(n))),rename:r=>lr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`,`& [data-scope="${Mt(e)}"][data-part="${Mt(n)}"]`].join(", "),attrs:{"data-scope":Mt(e),"data-part":Mt(n)}}}),{})}),Mt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),k0=e=>e.length===0,P0=lr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),We=P0.build(),N0=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},j0=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Gs=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},T0=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function _0(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),u=a("count"),d=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Gs(i,y.index),contentId:T0(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===u-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},v=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},h=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:u,percent:d,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:v,resetStep:h,getItemState:g,setStep:x,getRootProps(){return t.element({...We.root.attrs,id:N0(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${d}%`}})},getListProps(){const b=Vw(u).map((C,R)=>Gs(i,R));return t.element({...We.list.attrs,dir:a("dir"),id:j0(i),role:"tablist","aria-owns":b.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const b=g(y);return t.element({...We.item.attrs,dir:a("dir"),"aria-current":b.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const b=g(y);return t.button({...We.trigger.attrs,id:b.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||b.current?0:-1,"aria-selected":b.current,"aria-controls":b.contentId,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const b=g(y);return t.element({...We.content.attrs,dir:a("dir"),id:b.contentId,role:"tabpanel",tabIndex:0,hidden:!b.current,"data-state":b.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":b.triggerId})},getIndicatorProps(y){const b=g(y);return t.element({...We.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getSeparatorProps(y){const b=g(y);return t.element({...We.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":Ge(b.completed),"data-current":Ge(b.current),"data-incomplete":Ge(b.incomplete)})},getNextTriggerProps(){return t.button({...We.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...We.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||v()}})},getProgressProps(){return t.element({dir:a("dir"),...We.progress.attrs,role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${d}% complete`,"data-complete":Ge(d===100)})}}}var A0={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:u0(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){I0(t("count"),e.get("step"))}}}},I0=(e,t)=>{if(!e0(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};p0()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[lS,M0]=Pr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[cS,O0]=Pr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function D0(e){const t=S.useId(),{getRootNode:r}=M0(),{dir:n}=O0(),o={id:t,dir:n,getRootNode:r,...e},a=h0(A0,o);return _0(a,x0)}const hd=S.forwardRef((e,t)=>{const[r,n]=wa()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=D0(r),a=Ve(o.getRootProps(),n);return s.jsx(S0,{value:o,children:s.jsx(Ye.div,{...a,ref:t})})});hd.displayName="StepsRoot";const vd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getSeparatorProps(n),e);return s.jsx(Ye.div,{...o,ref:t})});vd.displayName="StepsSeparator";const xd=S.forwardRef((e,t)=>{const r=rt(),n=Ca(),o=Ve(r.getTriggerProps(n),e);return s.jsx(Ye.button,{...o,ref:t})});xd.displayName="StepsTrigger";function L0(e){return Su({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const bd=S.createContext(void 0),$0=({children:e,step:t})=>s.jsx(bd.Provider,{value:{step:t},children:e}),yd=()=>{const e=S.useContext(bd);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},F0=({className:e,step:t,...r})=>{const n=_("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx($0,{step:t??0,children:s.jsx(hd,{className:n,step:t,...r})})},V0=({className:e,...t})=>{const r=_("flex flex-row gap-4",e);return s.jsx(pd,{className:r,...t})},B0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4",e);return s.jsx(fd,{className:r,...t})},G0=({className:e,...t})=>{const r=_("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(xd,{className:r,...t})},W0=({index:e,className:t,...r})=>{const{step:n}=yd(),o=e===n,a=e<n,i=_("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=_({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(dd,{className:i,...r,children:a?s.jsx(L0,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},z0=({index:e,className:t,...r})=>{const{step:n}=yd(),o=e<n,a=_("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(vd,{className:a,...r})},q0=({className:e,...t})=>{const r=_(e);return s.jsx(ud,{className:r,...t})},U0=({className:e,...t})=>{const r=_(e);return s.jsx(cd,{className:r,...t})},H0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(gd,{className:r,...t})},K0=({className:e,...t})=>{const r=_("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(md,{className:r,...t})},Y0={Root:F0,List:V0,Item:B0,Trigger:G0,Indicator:W0,Separator:z0,Content:q0,CompletedContent:U0,PrevTrigger:H0,NextTrigger:K0},Nr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Lu,{...r,children:s.jsxs($u,{children:[s.jsx(Fu,{...n,children:e}),t&&s.jsx(Vu,{...o,children:t})]})});/**
|
|
204
|
+
Defaulting to \`null\`.`}var my=hd,gy=bd;function vy({className:e,value:t,...r}){return s.jsx(my,{"data-slot":"progress",className:j("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(gy,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function wd({className:e,...t}){return s.jsx("div",{className:j("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Vn="Switch",[hy,LR]=we(Vn),[xy,by]=hy(Vn),Cd=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:d="on",onCheckedChange:u,form:f,...p}=e,[g,m]=c.useState(null),b=se(t,C=>m(C)),v=c.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,x]=ye({prop:o,defaultProp:a??!1,onChange:u,caller:Vn});return s.jsxs(xy,{scope:r,checked:y,disabled:l,children:[s.jsx(Z.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Pd(y),"data-disabled":l?"":void 0,disabled:l,value:d,...p,ref:b,onClick:G(e.onClick,C=>{x(E=>!E),h&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),h&&s.jsx(Rd,{control:g,bubbles:!v.current,name:n,value:d,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Cd.displayName=Vn;var Sd="SwitchThumb",Ed=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=by(Sd,r);return s.jsx(Z.span,{"data-state":Pd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Ed.displayName=Sd;var yy="SwitchBubbleInput",Rd=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=ia(r),u=oa(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Rd.displayName=yy;function Pd(e){return e?"checked":"unchecked"}var wy=Cd,Cy=Ed;function Sy({className:e,...t}){return s.jsx(wy,{"data-slot":"switch",className:j("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Cy,{"data-slot":"switch-thumb",className:j("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var kd="Toggle",Ca=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=ye({prop:r,onChange:o,defaultProp:n??!1,caller:kd});return s.jsx(Z.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:G(e.onClick,()=>{e.disabled||l(!i)})})});Ca.displayName=kd;var Ey=Ca;const jd=wn("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ry({className:e,variant:t,size:r,...n}){return s.jsx(Ey,{"data-slot":"toggle",className:j(jd({variant:t,size:r,className:e})),...n})}var ho="rovingFocusGroup.onEntryFocus",Py={bubbles:!1,cancelable:!0},Ir="RovingFocusGroup",[Fo,Nd,ky]=En(Ir),[jy,nr]=we(Ir,[ky]),[Ny,Ty]=jy(Ir),Td=c.forwardRef((e,t)=>s.jsx(Fo.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Fo.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ay,{...e,ref:t})})}));Td.displayName=Ir;var Ay=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),b=Zt(a),[v,h]=ye({prop:i,defaultProp:l??null,onChange:d,caller:Ir}),[y,x]=c.useState(!1),C=De(u),E=Nd(r),k=c.useRef(!1),[A,T]=c.useState(0);return c.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(ho,C),()=>P.removeEventListener(ho,C)},[C]),s.jsx(Ny,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(P=>h(P),[h]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:c.useCallback(()=>T(P=>P-1),[]),children:s.jsx(Z.div,{tabIndex:y||A===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{k.current=!0}),onFocus:G(e.onFocus,P=>{const B=!k.current;if(P.target===P.currentTarget&&B&&!y){const U=new CustomEvent(ho,Py);if(P.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=E().filter(_=>_.focusable),ee=re.find(_=>_.active),J=re.find(_=>_.id===v),$=[ee,J,...re].filter(Boolean).map(_=>_.ref.current);Id($,f)}}k.current=!1}),onBlur:G(e.onBlur,()=>x(!1))})})}),Ad="RovingFocusGroupItem",_d=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,d=ge(),u=a||d,f=Ty(Ad,r),p=f.currentTabStopId===u,g=Nd(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return c.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Fo.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(Z.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:G(e.onMouseDown,h=>{n?f.onItemFocus(u):h.preventDefault()}),onFocus:G(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:G(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=My(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let C=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(h.currentTarget);C=f.loop?Oy(C,E+1):C.slice(E+1)}setTimeout(()=>Id(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});_d.displayName=Ad;var _y={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Iy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function My(e,t,r){const n=Iy(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return _y[n]}function Id(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Oy(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Sa=Td,Ea=_d,gt="ToggleGroup",[Md,FR]=we(gt,[nr]),Od=nr(),Ra=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Dy,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx($y,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${gt}\``)});Ra.displayName=gt;var[Dd,$d]=Md(gt),Dy=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??"",onChange:o,caller:gt});return s.jsx(Dd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Ld,{...a,ref:t})})}),$y=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:gt}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Dd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:d,onItemDeactivate:u,children:s.jsx(Ld,{...a,ref:t})})});Ra.displayName=gt;var[Ly,Fy]=Md(gt),Ld=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...d}=e,u=Od(r),f=Zt(i),p={role:"group",dir:f,...d};return s.jsx(Ly,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(Sa,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(Z.div,{...p,ref:t})}):s.jsx(Z.div,{...p,ref:t})})}),fn="ToggleGroupItem",Fd=S.forwardRef((e,t)=>{const r=$d(fn,e.__scopeToggleGroup),n=Fy(fn,e.__scopeToggleGroup),o=Od(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},d=S.useRef(null);return n.rovingFocus?s.jsx(Ea,{asChild:!0,...o,focusable:!i,active:a,ref:d,children:s.jsx(ei,{...l,ref:t})}):s.jsx(ei,{...l,ref:t})});Fd.displayName=fn;var ei=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=$d(fn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(Ca,{...l,...o,ref:t,onPressedChange:d=>{d?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Vy=Ra,By=Fd;const Vd=c.createContext({size:"default",variant:"default"});function Gy({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Vy,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:j("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:s.jsx(Vd.Provider,{value:{variant:t,size:r},children:n})})}function Wy({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Vd);return s.jsx(By,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:j(jd({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var Bn="Collapsible",[zy,Bd]=we(Bn),[qy,Pa]=zy(Bn),Gd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[d,u]=ye({prop:n,defaultProp:o??!1,onChange:i,caller:Bn});return s.jsx(qy,{scope:r,disabled:a,contentId:ge(),open:d,onOpenToggle:c.useCallback(()=>u(f=>!f),[u]),children:s.jsx(Z.div,{"data-state":ja(d),"data-disabled":a?"":void 0,...l,ref:t})})});Gd.displayName=Bn;var Wd="CollapsibleTrigger",zd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Pa(Wd,r);return s.jsx(Z.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ja(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:G(e.onClick,o.onOpenToggle)})});zd.displayName=Wd;var ka="CollapsibleContent",qd=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Pa(ka,e.__scopeCollapsible);return s.jsx(ke,{present:r||o.open,children:({present:a})=>s.jsx(Uy,{...n,ref:t,present:a})})});qd.displayName=ka;var Uy=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=Pa(ka,r),[l,d]=c.useState(n),u=c.useRef(null),f=se(t,u),p=c.useRef(0),g=p.current,m=c.useRef(0),b=m.current,v=i.open||l,h=c.useRef(v),y=c.useRef(void 0);return c.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),be(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const C=x.getBoundingClientRect();p.current=C.height,m.current=C.width,h.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),d(n)}},[i.open,n]),s.jsx(Z.div,{"data-state":ja(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function ja(e){return e?"open":"closed"}var Hy=Gd,Ky=zd,Yy=qd,Ve="Accordion",Xy=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Na,Zy,Jy]=En(Ve),[Gn,VR]=we(Ve,[Jy,Bd]),Ta=Bd(),Ud=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Na.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(rw,{...a,ref:t}):s.jsx(tw,{...o,ref:t})})});Ud.displayName=Ve;var[Hd,Qy]=Gn(Ve),[Kd,ew]=Gn(Ve,{collapsible:!1}),tw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,d]=ye({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(Hd,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:d,onItemClose:S.useCallback(()=>a&&d(""),[a,d]),children:s.jsx(Kd,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(Yd,{...i,ref:t})})})}),rw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Hd,{scope:e.__scopeAccordion,value:i,onItemOpen:d,onItemClose:u,children:s.jsx(Kd,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(Yd,{...a,ref:t})})})}),[nw,Wn]=Gn(Ve),Yd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),d=se(l,t),u=Zy(r),p=Zt(o)==="ltr",g=G(e.onKeyDown,m=>{var P;if(!Xy.includes(m.key))return;const b=m.target,v=u().filter(B=>{var U;return!((U=B.ref.current)!=null&&U.disabled)}),h=v.findIndex(B=>B.ref.current===b),y=v.length;if(h===-1)return;m.preventDefault();let x=h;const C=0,E=y-1,k=()=>{x=h+1,x>E&&(x=C)},A=()=>{x=h-1,x<C&&(x=E)};switch(m.key){case"Home":x=C;break;case"End":x=E;break;case"ArrowRight":a==="horizontal"&&(p?k():A());break;case"ArrowDown":a==="vertical"&&k();break;case"ArrowLeft":a==="horizontal"&&(p?A():k());break;case"ArrowUp":a==="vertical"&&A();break}const T=x%y;(P=v[T].ref.current)==null||P.focus()});return s.jsx(nw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Na.Slot,{scope:r,children:s.jsx(Z.div,{...i,"data-orientation":a,ref:d,onKeyDown:n?void 0:g})})})}),pn="AccordionItem",[ow,Aa]=Gn(pn),Xd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Wn(pn,r),i=Qy(pn,r),l=Ta(r),d=ge(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(ow,{scope:r,open:u,disabled:f,triggerId:d,children:s.jsx(Hy,{"data-orientation":a.orientation,"data-state":ru(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});Xd.displayName=pn;var Zd="AccordionHeader",Jd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Wn(Ve,r),a=Aa(Zd,r);return s.jsx(Z.h3,{"data-orientation":o.orientation,"data-state":ru(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Jd.displayName=Zd;var Vo="AccordionTrigger",Qd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Wn(Ve,r),a=Aa(Vo,r),i=ew(Vo,r),l=Ta(r);return s.jsx(Na.ItemSlot,{scope:r,children:s.jsx(Ky,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});Qd.displayName=Vo;var eu="AccordionContent",tu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Wn(Ve,r),a=Aa(eu,r),i=Ta(r);return s.jsx(Yy,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});tu.displayName=eu;function ru(e){return e?"open":"closed"}var aw=Ud,sw=Xd,iw=Jd,lw=Qd,cw=tu;function dw({...e}){return s.jsx(aw,{"data-slot":"accordion",...e})}function uw({className:e,...t}){return s.jsx(sw,{"data-slot":"accordion-item",className:j("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function fw({className:e,children:t,...r}){return s.jsx(iw,{className:"flex",children:s.jsxs(lw,{"data-slot":"accordion-trigger",className:j("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Cn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function pw({className:e,children:t,...r}){return s.jsx(cw,{"data-slot":"accordion-content",className:j("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:j("pt-0 pb-4",e),children:t})})}var mw=e=>e.type==="checkbox",fr=e=>e instanceof Date,_a=e=>e==null;const nu=e=>typeof e=="object";var jt=e=>!_a(e)&&!Array.isArray(e)&&nu(e)&&!fr(e),gw=e=>jt(e)&&e.target?mw(e.target)?e.target.checked:e.target.value:e,vw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,hw=(e,t)=>e.has(vw(t)),xw=e=>{const t=e.constructor&&e.constructor.prototype;return jt(t)&&t.hasOwnProperty("isPrototypeOf")},bw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ou(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(bw&&(e instanceof Blob||n))&&(r||jt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!xw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ou(e[o]));else return e;return t}var au=e=>/^\w*$/.test(e),Bo=e=>e===void 0,yw=e=>Array.isArray(e)?e.filter(Boolean):[],su=e=>yw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pe=(e,t,r)=>{if(!t||!jt(e))return r;const n=(au(t)?[t]:su(t)).reduce((o,a)=>_a(o)?o:o[a],e);return Bo(n)||n===e?Bo(e[t])?r:e[t]:n},xo=e=>typeof e=="boolean",ti=(e,t,r)=>{let n=-1;const o=au(t)?[t]:su(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let d=r;if(n!==i){const u=e[l];d=jt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const ri={BLUR:"blur",CHANGE:"change"},ni={all:"all"},Ia=S.createContext(null);Ia.displayName="HookFormContext";const or=()=>S.useContext(Ia),ww=e=>{const{children:t,...r}=e;return S.createElement(Ia.Provider,{value:r},t)};var Cw=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==ni.all&&(t._proxyFormState[i]=!n||ni.all),r&&(r[i]=!0),e[i]}});return o};const iu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function lu(e){const t=or(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),d=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return iu(()=>r._subscribe({name:o,formState:d.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{d.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>Cw(i,r,d.current,!1),[i,r])}var Sw=e=>typeof e=="string",Ew=(e,t,r,n,o)=>Sw(e)?Pe(r,e,o):Array.isArray(e)?e.map(a=>Pe(r,a)):r,oi=e=>_a(e)||!nu(e);function cu(e,t,r=new WeakSet){if(oi(e)||oi(t))return e===t;if(fr(e)&&fr(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(fr(i)&&fr(l)||jt(i)&&jt(l)||Array.isArray(i)&&Array.isArray(l)?!cu(i,l,r):i!==l)return!1}}return!0}function Rw(e){const t=or(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},d=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,d.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return iu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=Ew(n,r._names,b.values||r._formValues,!1,d.current);if(u.current){const h=u.current(v);cu(h,f.current)||(m(h),f.current=h)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function Pw(e){const t=or(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=hw(o._names.array,r),d=S.useMemo(()=>Pe(o._formValues,r,Pe(o._defaultValues,r,i)),[o,r,i]),u=Rw({control:o,name:r,defaultValue:d,exact:!0}),f=lu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...xo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Pe(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!Pe(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Pe(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Pe(f.validatingFields,r)},error:{enumerable:!0,get:()=>Pe(f.errors,r)}}),[f,r]),b=S.useCallback(x=>g.current.onChange({target:{value:gw(x),name:r},type:ri.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:Pe(o._formValues,r),name:r},type:ri.BLUR}),[r,o._formValues]),h=S.useCallback(x=>{const C=Pe(o._fields,r);C&&x&&(C._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:E=>x.setCustomValidity(E),reportValidity:()=>x.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...xo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:h}),[r,n,f.disabled,b,v,h,u]);return S.useEffect(()=>{const x=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...xo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,k)=>{const A=Pe(o._fields,E);A&&A._f&&(A._f.mount=k)};if(C(r,!0),x){const E=ou(Pe(o._options.defaultValues,r));ti(o._defaultValues,r,E),Bo(Pe(o._formValues,r))&&ti(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?x&&!o._state.action:x)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const du=e=>e.render(Pw(e)),uu=S.createContext(void 0),fu=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(uu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(ww,{...t,children:o})})},pu=()=>{const e=S.useContext(uu),t=or();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},kw=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Qe,{type:e,variant:r(),...t})};var mu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ai=S.createContext&&S.createContext(mu),jw=["attr","size","title"];function Nw(e,t){if(e==null)return{};var r=Tw(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tw(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mn.apply(this,arguments)}function si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?si(Object(r),!0).forEach(function(n){Aw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Aw(e,t,r){return t=_w(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _w(e){var t=Iw(e,"string");return typeof t=="symbol"?t:t+""}function Iw(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gu(e){return e&&e.map((t,r)=>S.createElement(t.tag,gn({key:r},t.attr),gu(t.child)))}function vu(e){return t=>S.createElement(Mw,mn({attr:gn({},e.attr)},t),gu(e.child))}function Mw(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=Nw(e,jw),l=o||r.size||"1em",d;return r.className&&(d=r.className),e.className&&(d=(d?d+" ":"")+e.className),S.createElement("svg",mn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:d,style:gn(gn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return ai!==void 0?S.createElement(ai.Consumer,null,r=>t(r)):t(mu)}function Ow(e){return vu({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Dw="Label",hu=c.forwardRef((e,t)=>s.jsx(Z.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));hu.displayName=Dw;var $w=hu;function xu({className:e,...t}){return s.jsx($w,{"data-slot":"label",className:j("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const bu=c.createContext({}),Lw=({...e})=>s.jsx(bu.Provider,{value:{name:e.name},children:s.jsx(du,{...e})}),zn=()=>{const e=c.useContext(bu),t=c.useContext(yu),{getFieldState:r}=or(),n=lu({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},yu=c.createContext({});function Fw({className:e,...t}){const r=c.useId();return s.jsx(yu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:j("qodo qodo-form-item grid gap-2",e),...t})})}function Vw({className:e,...t}){const{formItemId:r}=zn();return s.jsx(xu,{"data-slot":"form-label",className:j("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function Bw({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=zn();return s.jsx(Vg,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Gw({className:e,...t}){const{formDescriptionId:r}=zn();return s.jsx("p",{"data-slot":"form-description",id:r,className:j("text-purple-muted-300 text-sm",e),...t})}function Ww({className:e,...t}){const{error:r,formMessageId:n}=zn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:j("text-destructive text-sm",e),...t,children:o}):null}var[qn,BR]=we("Tooltip",[ut]),Un=ut(),wu="TooltipProvider",zw=700,Go="tooltip.open",[qw,Ma]=qn(wu),Cu=e=>{const{__scopeTooltip:t,delayDuration:r=zw,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),s.jsx(qw,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Cu.displayName=wu;var yr="Tooltip",[Uw,Mr]=qn(yr),Su=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,d=Ma(yr,e.__scopeTooltip),u=Un(t),[f,p]=c.useState(null),g=ge(),m=c.useRef(0),b=i??d.disableHoverableContent,v=l??d.delayDuration,h=c.useRef(!1),[y,x]=ye({prop:n,defaultProp:o??!1,onChange:T=>{T?(d.onOpen(),document.dispatchEvent(new CustomEvent(Go))):d.onClose(),a==null||a(T)},caller:yr}),C=c.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),k=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),A=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},v)},[v,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(jr,{...u,children:s.jsx(Uw,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{d.isOpenDelayedRef.current?A():E()},[d.isOpenDelayedRef,A,E]),onTriggerLeave:c.useCallback(()=>{b?k():(window.clearTimeout(m.current),m.current=0)},[k,b]),onOpen:E,onClose:k,disableHoverableContent:b,children:r})})};Su.displayName=yr;var Wo="TooltipTrigger",Eu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mr(Wo,r),a=Ma(Wo,r),i=Un(r),l=c.useRef(null),d=se(t,l,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(Nr,{asChild:!0,...i,children:s.jsx(Z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:d,onPointerMove:G(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:G(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:G(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:G(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:G(e.onBlur,o.onClose),onClick:G(e.onClick,o.onClose)})})});Eu.displayName=Wo;var Oa="TooltipPortal",[Hw,Kw]=qn(Oa,{forceMount:void 0}),Ru=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Mr(Oa,t);return s.jsx(Hw,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(tr,{asChild:!0,container:o,children:n})})})};Ru.displayName=Oa;var Kt="TooltipContent",Pu=c.forwardRef((e,t)=>{const r=Kw(Kt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Mr(Kt,e.__scopeTooltip);return s.jsx(ke,{present:n||i.open,children:i.disableHoverableContent?s.jsx(ku,{side:o,...a,ref:t}):s.jsx(Yw,{side:o,...a,ref:t})})}),Yw=c.forwardRef((e,t)=>{const r=Mr(Kt,e.__scopeTooltip),n=Ma(Kt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:d,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((b,v)=>{const h=b.currentTarget,y={x:b.clientX,y:b.clientY},x=Qw(y,h.getBoundingClientRect()),C=e0(y,x),E=t0(v.getBoundingClientRect()),k=n0([...C,...E]);l(k),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(d&&f){const b=h=>m(h,f),v=h=>m(h,d);return d.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{d.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[d,f,m,g]),c.useEffect(()=>{if(i){const b=v=>{const h=v.target,y={x:v.clientX,y:v.clientY},x=(d==null?void 0:d.contains(h))||(f==null?void 0:f.contains(h)),C=!r0(y,i);x?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,f,i,u,g]),s.jsx(ku,{...e,ref:a})}),[Xw,Zw]=qn(yr,{isInside:!1}),Jw=Gg("TooltipContent"),ku=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,d=Mr(Kt,r),u=Un(r),{onClose:f}=d;return c.useEffect(()=>(document.addEventListener(Go,f),()=>document.removeEventListener(Go,f)),[f]),c.useEffect(()=>{if(d.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),s.jsx(Jt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(Tn,{"data-state":d.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Jw,{children:n}),s.jsx(Xw,{scope:r,isInside:!0,children:s.jsx(Mh,{id:d.contentId,role:"tooltip",children:o||n})})]})})});Pu.displayName=Kt;var ju="TooltipArrow",Nu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Un(r);return Zw(ju,r).isInside?null:s.jsx(An,{...o,...n,ref:t})});Nu.displayName=ju;function Qw(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function e0(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function t0(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function r0(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function n0(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),o0(t)}function o0(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var a0=Cu,s0=Su,i0=Eu,l0=Ru,c0=Pu,d0=Nu;function Tu({delayDuration:e=0,...t}){return s.jsx(a0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Au({...e}){return s.jsx(Tu,{children:s.jsx(s0,{"data-slot":"tooltip",...e})})}function _u({...e}){return s.jsx(i0,{"data-slot":"tooltip-trigger",...e})}function Iu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(l0,{children:s.jsxs(c0,{"data-slot":"tooltip-content",sideOffset:t,className:j("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&s.jsx(d0,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const ar=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:d,disabled:u,readOnly:f}=pu(),p=()=>a?s.jsxs(Au,{children:[s.jsx(_u,{asChild:!0,children:s.jsx("span",{children:s.jsx(Ow,{size:16})})}),s.jsx(Iu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(Gw,{children:o}):s.jsx(s.Fragment,{});return s.jsx(Lw,{control:d,name:r,render:({field:m,fieldState:b})=>s.jsxs(Fw,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(Vw,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(Bw,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(Ww,{})]})})},u0=S.forwardRef((e,t)=>s.jsx(Rr,{...e,ref:t})),f0=S.forwardRef((e,t)=>ar(u0)({...e,ref:t})),p0=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=d=>{n({target:{value:d}})};return s.jsx(ba,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),m0=ar(p0);var Da="Radio",[g0,Mu]=we(Da),[v0,h0]=g0(Da),Ou=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:d,form:u,...f}=e,[p,g]=c.useState(null),m=se(t,h=>g(h)),b=c.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(v0,{scope:r,checked:o,disabled:i,children:[s.jsx(Z.button,{type:"button",role:"radio","aria-checked":o,"data-state":Fu(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:G(e.onClick,h=>{o||d==null||d(),v&&(b.current=h.isPropagationStopped(),b.current||h.stopPropagation())})}),v&&s.jsx(Lu,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Ou.displayName=Da;var Du="RadioIndicator",$u=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=h0(Du,r);return s.jsx(ke,{present:n||a.checked,children:s.jsx(Z.span,{"data-state":Fu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});$u.displayName=Du;var x0="RadioBubbleInput",Lu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=ia(r),u=oa(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx(Z.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Lu.displayName=x0;function Fu(e){return e?"checked":"unchecked"}var b0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Hn="RadioGroup",[y0,GR]=we(Hn,[nr,Mu]),Vu=nr(),Bu=Mu(),[w0,C0]=y0(Hn),Gu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:d,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=Vu(r),b=Zt(u),[v,h]=ye({prop:a,defaultProp:o??null,onChange:p,caller:Hn});return s.jsx(w0,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:h,children:s.jsx(Sa,{asChild:!0,...m,orientation:d,dir:b,loop:f,children:s.jsx(Z.div,{role:"radiogroup","aria-required":i,"aria-orientation":d,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});Gu.displayName=Hn;var Wu="RadioGroupItem",zu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=C0(Wu,r),i=a.disabled||n,l=Vu(r),d=Bu(r),u=c.useRef(null),f=se(t,u),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=v=>{b0.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(Ea,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(Ou,{disabled:i,required:a.required,checked:p,...d,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:G(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:G(o.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});zu.displayName=Wu;var S0="RadioGroupIndicator",qu=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Bu(r);return s.jsx($u,{...o,...n,ref:t})});qu.displayName=S0;var E0=Gu,R0=zu,P0=qu;function k0({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(E0,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:j("qodo qodo-radio-group grid gap-3 group",e),...n})}function j0({className:e,...t}){return s.jsx(R0,{"data-slot":"radio-group-item",className:j("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(P0,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(mg,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const $a=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:d="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=j("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":d==="horizontal","flex-col gap-3":d==="vertical"},l);return s.jsx(k0,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});$a.displayName="BaseRadioGroupComponent";const La=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(xu,{htmlFor:i,className:j("flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(j0,{value:e,id:i,disabled:t||r}),o]},e)};La.displayName="RadioGroupItemComponent";const N0=ar($a),T0=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),A0=({children:e,description:t,className:r})=>s.jsxs("div",{className:j("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),Uu=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=j("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});Uu.displayName="FormGroup";function _0({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:j("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const I0=S.forwardRef((e,t)=>ar(_0)({...e,ref:t})),Hu=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Ht,{variant:a,disabled:n,size:"sm",className:j("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Sn,{className:"w-[10px] h-[10px]"})})]}),M0=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:j("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(Hu,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Qe,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:d=>d.preventDefault(),onClick:d=>{d.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(Ag,{className:"h-4 w-4"})})]})}),bo={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},O0=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},Ku=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:d,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=O0,onChange:h=()=>{},onAddTag:y=()=>{},onRemoveTag:x=()=>{},onResetTags:C=()=>{}})=>{const[E,k]=S.useState(""),[A,T]=S.useState(!1),P=S.useRef(null),B=S.useRef(null),U=S.useRef(null),[re,ee]=S.useState();S.useEffect(()=>{B.current&&ee(B.current.offsetWidth)},[]);const J=e.length>=i,z=O=>{if(J||e.some(I=>I.id===O.id))return;const W=[...e,O];h(W),y(O)},$=O=>{const W=e.filter(I=>I.id!==O);h(W),x(O)},_=()=>{h==null||h([]),C()},D=O=>{const W=O.target.value;k(W),T(!0)},R=()=>{const O=E.trim().toLowerCase();if(!O)return[];const W=new Set(e.map(I=>I.id));return o.filter(I=>I.label.toLowerCase().includes(O)&&!W.has(I.id))},M=O=>v?v(O):O,F=()=>{const O=E.trim();if(!O)return;const W=M(O);if(!W)return;if(e.some(Q=>Q.id===W)){k(""),T(!1);return}const I=o.find(Q=>Q.id===W||M(Q.label)===W);I?z(I):a&&z({id:W,label:W}),k(""),T(!1)},X=O=>{const W=O.key===bo.BACKSPACE&&!E&&e.length>0,I=O.key===bo.ENTER&&E,Q=O.key===bo.ESCAPE;I?(O.preventDefault(),F(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):W?$(e[e.length-1].id):Q&&T(!1)},N=()=>{if(E&&R().length>0)return s.jsx(xa,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:O=>O.preventDefault(),onCloseAutoFocus:O=>O.preventDefault(),onMouseDown:O=>O.preventDefault(),children:s.jsx("div",{className:j("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(O=>s.jsx(M0,{label:O.label,id:O.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var W;z(O),k(""),T(!1),(W=P.current)==null||W.focus()}},O.id))})})},V=()=>g||s.jsx(Ng,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Y=()=>e.map(O=>s.jsx(Hu,{label:O.label,id:O.id,onRemoveTag:$,disabled:l,className:p,variant:t},O.id));return s.jsx("div",{className:j("w-full",d),children:s.jsxs(va,{open:A&&!l,onOpenChange:T,modal:!1,children:[s.jsx(ha,{className:"w-full",children:s.jsxs("div",{ref:B,tabIndex:-1,className:j("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":l}),onClick:O=>{var W;O.stopPropagation(),T(!0),(W=P.current)==null||W.focus()},children:[V(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Y(),s.jsx(Rr,{ref:P,value:E,onChange:D,onClick:O=>O.stopPropagation(),onFocus:()=>T(!0),onBlur:b,onKeyDown:X,placeholder:r,disabled:l||J,className:j("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),s.jsx(Sn,{className:"h-4 w-4 hover:cursor-pointer text-[var(--icon-input-neutral-idle)] hover:text-[var(--icon-input-neutral-hover)]",onClick:_})]})}),N()]})})};function D0(e){const{control:t}=or();return s.jsx(du,{name:e.name,control:t,render:({field:r})=>s.jsx(Ku,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const $0=ar(D0),L0=12,ii={SINGLE:"single",MULTIPLE:"multiple"},li={LTR:"ltr"};var Yu=typeof global=="object"&&global&&global.Object===Object&&global,F0=typeof self=="object"&&self&&self.Object===Object&&self,vt=Yu||F0||Function("return this")(),vn=vt.Symbol,Xu=Object.prototype,V0=Xu.hasOwnProperty,B0=Xu.toString,dr=vn?vn.toStringTag:void 0;function G0(e){var t=V0.call(e,dr),r=e[dr];try{e[dr]=void 0;var n=!0}catch{}var o=B0.call(e);return n&&(t?e[dr]=r:delete e[dr]),o}var W0=Object.prototype,z0=W0.toString;function q0(e){return z0.call(e)}var U0="[object Null]",H0="[object Undefined]",ci=vn?vn.toStringTag:void 0;function Or(e){return e==null?e===void 0?H0:U0:ci&&ci in Object(e)?G0(e):q0(e)}function Fa(e){return e!=null&&typeof e=="object"}var K0=Array.isArray;function Zu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Y0="[object AsyncFunction]",X0="[object Function]",Z0="[object GeneratorFunction]",J0="[object Proxy]";function Ju(e){if(!Zu(e))return!1;var t=Or(e);return t==X0||t==Z0||t==Y0||t==J0}var yo=vt["__core-js_shared__"],di=(function(){var e=/[^.]+$/.exec(yo&&yo.keys&&yo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Q0(e){return!!di&&di in e}var eC=Function.prototype,tC=eC.toString;function Tt(e){if(e!=null){try{return tC.call(e)}catch{}try{return e+""}catch{}}return""}var rC=/[\\^$.*+?()[\]{}|]/g,nC=/^\[object .+?Constructor\]$/,oC=Function.prototype,aC=Object.prototype,sC=oC.toString,iC=aC.hasOwnProperty,lC=RegExp("^"+sC.call(iC).replace(rC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cC(e){if(!Zu(e)||Q0(e))return!1;var t=Ju(e)?lC:nC;return t.test(Tt(e))}function dC(e,t){return e==null?void 0:e[t]}function Dr(e,t){var r=dC(e,t);return cC(r)?r:void 0}var zo=Dr(vt,"WeakMap"),uC=9007199254740991;function Qu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=uC}function fC(e){return e!=null&&Qu(e.length)&&!Ju(e)}var pC=Object.prototype;function ef(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||pC;return e===r}var mC="[object Arguments]";function ui(e){return Fa(e)&&Or(e)==mC}var tf=Object.prototype,gC=tf.hasOwnProperty,vC=tf.propertyIsEnumerable,hC=ui((function(){return arguments})())?ui:function(e){return Fa(e)&&gC.call(e,"callee")&&!vC.call(e,"callee")};function xC(){return!1}var rf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fi=rf&&typeof module=="object"&&module&&!module.nodeType&&module,bC=fi&&fi.exports===rf,pi=bC?vt.Buffer:void 0,yC=pi?pi.isBuffer:void 0,wC=yC||xC,CC="[object Arguments]",SC="[object Array]",EC="[object Boolean]",RC="[object Date]",PC="[object Error]",kC="[object Function]",jC="[object Map]",NC="[object Number]",TC="[object Object]",AC="[object RegExp]",_C="[object Set]",IC="[object String]",MC="[object WeakMap]",OC="[object ArrayBuffer]",DC="[object DataView]",$C="[object Float32Array]",LC="[object Float64Array]",FC="[object Int8Array]",VC="[object Int16Array]",BC="[object Int32Array]",GC="[object Uint8Array]",WC="[object Uint8ClampedArray]",zC="[object Uint16Array]",qC="[object Uint32Array]",pe={};pe[$C]=pe[LC]=pe[FC]=pe[VC]=pe[BC]=pe[GC]=pe[WC]=pe[zC]=pe[qC]=!0;pe[CC]=pe[SC]=pe[OC]=pe[EC]=pe[DC]=pe[RC]=pe[PC]=pe[kC]=pe[jC]=pe[NC]=pe[TC]=pe[AC]=pe[_C]=pe[IC]=pe[MC]=!1;function UC(e){return Fa(e)&&Qu(e.length)&&!!pe[Or(e)]}function HC(e){return function(t){return e(t)}}var nf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hr=nf&&typeof module=="object"&&module&&!module.nodeType&&module,KC=hr&&hr.exports===nf,wo=KC&&Yu.process,mi=(function(){try{var e=hr&&hr.require&&hr.require("util").types;return e||wo&&wo.binding&&wo.binding("util")}catch{}})(),gi=mi&&mi.isTypedArray,YC=gi?HC(gi):UC;function XC(e,t){return function(r){return e(t(r))}}var ZC=XC(Object.keys,Object),JC=Object.prototype,QC=JC.hasOwnProperty;function e1(e){if(!ef(e))return ZC(e);var t=[];for(var r in Object(e))QC.call(e,r)&&r!="constructor"&&t.push(r);return t}var qo=Dr(vt,"Map"),Uo=Dr(vt,"DataView"),Ho=Dr(vt,"Promise"),Ko=Dr(vt,"Set"),vi="[object Map]",t1="[object Object]",hi="[object Promise]",xi="[object Set]",bi="[object WeakMap]",yi="[object DataView]",r1=Tt(Uo),n1=Tt(qo),o1=Tt(Ho),a1=Tt(Ko),s1=Tt(zo),wt=Or;(Uo&&wt(new Uo(new ArrayBuffer(1)))!=yi||qo&&wt(new qo)!=vi||Ho&&wt(Ho.resolve())!=hi||Ko&&wt(new Ko)!=xi||zo&&wt(new zo)!=bi)&&(wt=function(e){var t=Or(e),r=t==t1?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case r1:return yi;case n1:return vi;case o1:return hi;case a1:return xi;case s1:return bi}return t});var i1="[object Map]",l1="[object Set]",c1=Object.prototype,d1=c1.hasOwnProperty;function $r(e){if(e==null)return!0;if(fC(e)&&(K0(e)||typeof e=="string"||typeof e.splice=="function"||wC(e)||YC(e)||hC(e)))return!e.length;var t=wt(e);if(t==i1||t==l1)return!e.size;if(ef(e))return!e1(e).length;for(var r in e)if(d1.call(e,r))return!1;return!0}function Kn(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>Kn(t))}function Va(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Va(r))}),t}function Ba(e,t){return $r(e.children)?!1:Kn(e).every(n=>t.has(n))}function u1(e,t){return $r(e.children)?!1:Kn(e).some(n=>t.has(n))}function of(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=of(r.children,t);if(n)return n}}return null}function Ga(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Ga(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function af(e,t){e.forEach(r=>{$r(r.children)||(Ba(r,t)?t.add(r.value):t.delete(r.value),r.children&&af(r.children,t))})}const f1=e=>e?Array.isArray(e)?e:[e]:[],p1=e=>Ga(e,t=>[t.value,t.label]),m1=e=>Ga(e,t=>t.icon?[t.value,t.icon]:null);function g1(e,t){Va(e).forEach(n=>t.delete(n))}function v1(e,t){Va(e).forEach(n=>t.add(n))}function sf(e,t){const r=new Set(t);return e.flatMap(n=>!$r(n.children)&&n.children?Ba(n,r)?[n.value]:sf(n.children,t):r.has(n.value)?[n.value]:[])}function h1(e){return e&&e>1?e*L0:0}function lf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=li.LTR}){const i=!$r(e.children),l=t.has(e.value),d=`${h1(n)}px`,u=Ba(e,t),p=u1(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(vg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(xg,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(Er,{className:j("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),h=()=>{if(i)return e.children.map(x=>s.jsx(lf,{option:x,selected:t,onSelect:r,nestLevel:n+1,dir:a},x.value))},y=()=>s.jsxs("div",{className:j("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===li.LTR}),style:{paddingLeft:d},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(td,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:j("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),h()]})}function x1({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=ii.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:d,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(Cn,{}),dir:b="ltr",...v}){const[h,y]=S.useState(0),[x,C]=S.useState(!1),E=S.useRef(null),k=o===ii.MULTIPLE,[A,T]=S.useState(e!==void 0?e:k?[]:""),P=f1(A),B=new Set(P);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[A]);const U=p1(t),re=m1(t);S.useEffect(()=>{e!==void 0&&T(k?e||[]:e||"")},[e,k]);function ee(D,R){if(!k){T(D),r==null||r(D),C(!1);return}T(M=>{const F=Array.isArray(M)?M:[],X=new Set(F),N=of(t,D);if(!N)return F;R?J(N,X):z(D,X);const V=Array.from(X);return r==null||r(V),V})}function J(D,R){Kn(D).every(X=>R.has(X))?g1(D,R):v1(D,R)}function z(D,R){R.has(D)?R.delete(D):R.add(D),af(t,R)}const $=()=>{const D=sf(t,P);return D.length===0?s.jsx(Ht,{variant:p,size:"md",className:j("text-purple-muted-300",f),children:a}):D.map(M=>{const F=re.get(M),X=U.get(M)||M;return s.jsx(Ht,{variant:p,size:"md",className:j("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[F&&s.jsx("div",{className:"flex-shrink-0",children:F}),s.jsx("span",{children:X})]})},M)})},_=()=>{if(g)return s.jsx(Zc,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(va,{open:x,onOpenChange:n?void 0:C,children:[s.jsx(ha,{asChild:!0,disabled:n,children:s.jsxs("div",{className:j("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:j("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",d),children:$()}),s.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:m})]})}),s.jsx(xa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:h??"auto"},children:s.jsxs(Xc,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[_(),s.jsxs(Jc,{children:[s.jsx(Qc,{children:l}),s.jsx(ed,{children:t.map(D=>s.jsx(lf,{disabled:n,option:D,selected:B,onSelect:ee,dir:b},D.value))})]})]})})]})}const cf=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,d=u=>{n||r&&r({target:{value:u}})};return s.jsx(x1,{options:t,value:o,disabled:a,...l,onSelect:d,mode:i})});cf.displayName="BaseSelectComponent";const b1=ar(cf),Ie=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,d=j("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(fu,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:d,onSubmit:l(a),...i})})};Ie.Button=kw;Ie.Input=f0;Ie.Select=b1;Ie.Combobox=m0;Ie.RadioGroup=N0;Ie.RadioGroupItem=La;Ie.Group=Uu;Ie.Textarea=I0;Ie.Divider=T0;Ie.Title=A0;Ie.TagsInput=$0;function y1(e){return e==null?[]:Array.isArray(e)?e:[e]}var w1=e=>Array.from(Array(e).keys()),wi=e=>(e==null?void 0:e.constructor.name)==="Array",C1=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Wa(e[r],t[r]))return!1;return!0},Wa=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(wi(e)&&wi(t))return C1(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!Wa(e[a],t[a]))return!1}return!0},S1=e=>e!=null&&typeof e=="object",nn=e=>typeof e=="string",pr=e=>typeof e=="function",E1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),R1=e=>Object.prototype.toString.call(e),df=Function.prototype.toString,P1=df.call(Object),k1=e=>{if(!S1(e)||R1(e)!="[object Object]"||T1(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=E1(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&df.call(r)==P1},j1=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,N1=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,T1=e=>j1(e)||N1(e),A1=e=>e(),_1=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},I1=e=>Number.isNaN(e),M1=e=>I1(e)?0:e,O1=(e,t,r)=>{const n=M1(e),o=n>=t,a=r==null||n<=r;return o&&a};function uf(e){if(!k1(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=uf(o))}return r}function Ci(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function D1(e,t){if(e==null)throw new Error(t())}var ff=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,$1=9,L1=e=>ff(e)&&e.nodeType===$1,F1=e=>ff(e)&&e===e.window;function V1(e){if(!e)return!1;const t=e.getRootNode();return pf(t)===e}function B1(e){return L1(e)?e:F1(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function pf(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var G1=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),W1=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Si=e=>{const t={};let r;for(;r=W1.exec(e);)t[r[1]]=r[2];return t},z1=(e,t)=>{if(nn(e)){if(nn(t))return`${e};${t}`;e=Si(e)}else nn(t)&&(t=Si(t));return Object.assign({},e??{},t??{})};function Be(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=_1(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=G1(t[o],r[o]);continue}if(o==="style"){t[o]=z1(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function q1(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((d,u)=>!Wa(n[u],d)))&&(n=i,o=t(i,a)),o}}var Bt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Bt||{}),Co="__init__";function U1(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>B1(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>pf(t()),isActiveElement:V1,getById:i=>t().getElementById(i)}}function H1(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var K1=()=>e=>Array.from(new Set(e)),mf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function hn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const d=S.useRef(l.current);mf(()=>{d.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=d.current,m=pr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?Sr.flushSync:A1)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}hn.cleanup=e=>{S.useEffect(()=>e,[])};hn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function Y1(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var X1=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function Z1(e,t={}){var re,ee,J,z;const r=S.useMemo(()=>{const{id:$,ids:_,getRootNode:D}=t;return U1({id:$,ids:_,getRootNode:D})},[t]),n=(...$)=>{e.debug&&console.log(...$)},o=((re=e.props)==null?void 0:re.call(e,{props:uf(t),scope:r}))??t,a=J1(o),i=(ee=e.context)==null?void 0:ee.call(e,{prop:a,bindable:hn,scope:r,flush:Ei,getContext(){return d},getComputed(){return k},getRefs(){return v},getEvent(){return m()}}),l=gf(i),d={get($){var _;return(_=l.current)==null?void 0:_[$].ref.current},set($,_){var D;(D=l.current)==null||D[$].set(_)},initial($){var _;return(_=l.current)==null?void 0:_[$].initial},hash($){var D,R;const _=(D=l.current)==null?void 0:D[$].get();return(R=l.current)==null?void 0:R[$].hash(_)}},u=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),b=()=>({...A,matches(...$){return $.includes(A.ref.current)},hasTag($){var _,D;return!!((D=(_=e.states[A.ref.current])==null?void 0:_.tags)!=null&&D.includes($))}}),v=Y1(((J=e.refs)==null?void 0:J.call(e,{prop:a,context:d}))??{}),h=()=>({state:b(),context:d,event:m(),prop:a,send:U,action:y,guard:x,track:X1,refs:v,computed:k,flush:Ei,scope:r,choose:E}),y=$=>{const _=pr($)?$(h()):$;if(!_)return;const D=_.map(R=>{var F,X;const M=(X=(F=e.implementations)==null?void 0:F.actions)==null?void 0:X[R];return M||Ci(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of D)R==null||R(h())},x=$=>{var _,D;return pr($)?$(h()):(D=(_=e.implementations)==null?void 0:_.guards)==null?void 0:D[$](h())},C=$=>{const _=pr($)?$(h()):$;if(!_)return;const D=_.map(M=>{var X,N;const F=(N=(X=e.implementations)==null?void 0:X.effects)==null?void 0:N[M];return F||Ci(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),F}),R=[];for(const M of D){const F=M==null?void 0:M(h());F&&R.push(F)}return()=>R.forEach(M=>M==null?void 0:M())},E=$=>y1($).find(_=>{let D=!_.guard;return nn(_.guard)?D=!!x(_.guard):pr(_.guard)&&(D=_.guard(h())),D}),k=$=>{D1(e.computed,()=>"[zag-js] No computed object found on machine");const _=e.computed[$];return _({context:d,event:m(),prop:a,refs:v,scope:r,computed:k})},A=hn(()=>({defaultValue:e.initialState({prop:a}),onChange($,_){var R,M,F,X;if(_){const N=u.current.get(_);N==null||N(),u.current.delete(_)}_&&y((R=e.states[_])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const D=C((F=e.states[$])==null?void 0:F.effects);if(D&&u.current.set($,D),_===Co){y(e.entry);const N=C(e.effects);N&&u.current.set(Co,N)}y((X=e.states[$])==null?void 0:X.entry)}})),T=S.useRef(void 0),P=S.useRef(Bt.NotStarted);mf(()=>{queueMicrotask(()=>{const D=P.current===Bt.Started;P.current=Bt.Started,n(D?"rehydrating...":"initializing...");const R=T.current??A.initial;A.invoke(R,D?A.get():Co)});const $=u.current,_=A.ref.current;return()=>{n("unmounting..."),T.current=_,P.current=Bt.Stopped,$.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const B=()=>"ref"in A?A.ref.current:A.get(),U=$=>{queueMicrotask(()=>{var X,N;if(P.current!==Bt.Started)return;p.current=g.current,g.current=$;let _=B();const D=((X=e.states[_].on)==null?void 0:X[$.type])??((N=e.on)==null?void 0:N[$.type]),R=E(D);if(!R)return;f.current=R;const M=R.target??_;n("transition",$.type,R.target||_,`(${R.actions})`);const F=M!==_;F?Sr.flushSync(()=>A.set(M)):R.reenter&&!F?A.invoke(_,_):y(R.actions??[])})};return(z=e.watch)==null||z.call(e,h()),{state:b(),send:U,context:d,prop:a,scope:r,refs:v,computed:k,event:m(),getStatus:()=>P.current}}function gf(e){const t=S.useRef(e);return t.current=e,t}function J1(e){const t=gf(e);return function(n){return t.current[n]}}function Ei(e){queueMicrotask(()=>{Sr.flushSync(()=>e())})}var Q1=H1(e=>e);function eS(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function tS(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const So=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),d=tS(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?eS(n,d):d})}));return t.displayName=e.displayName||e.name,t},rS=()=>{const e=new Map;return new Proxy(So,{apply(t,r,n){return So(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,So(n)),e.get(n)}})},Xe=rS();function nS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Lr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function d(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??nS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,d),p}return u}return[l.Provider,d,l]}const[oS,nt]=Lr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),vf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});vf.displayName="StepsCompletedContent";const za=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),hf=S.forwardRef((e,t)=>{const[r,n]=za()(e,["index"]),o=nt(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});hf.displayName="StepsContent";const[aS,qa]=Lr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),xf=S.forwardRef((e,t)=>{const r=nt(),n=qa(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});xf.displayName="StepsIndicator";const[sS,WR]=Lr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),bf=S.forwardRef((e,t)=>{const[r,n]=za()(e,["index"]),o=nt(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(aS,{value:r,children:s.jsx(sS,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});bf.displayName="StepsItem";const yf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});yf.displayName="StepsList";const wf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});wf.displayName="StepsNextTrigger";const Cf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Cf.displayName="StepsPrevTrigger";var mr=(e,t=[])=>({parts:(...r)=>{if(iS(t))return mr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>mr(e,[...t,...r]),omit:(...r)=>mr(e,t.filter(n=>!r.includes(n))),rename:r=>mr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Lt(e)}"][data-part="${Lt(n)}"]`,`& [data-scope="${Lt(e)}"][data-part="${Lt(n)}"]`].join(", "),attrs:{"data-scope":Lt(e),"data-part":Lt(n)}}}),{})}),Lt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),iS=e=>e.length===0,lS=mr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=lS.build(),cS=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},dS=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Ri=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},uS=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function fS(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),d=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Ri(i,y.index),contentId:uS(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===d-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},h=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:d,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:h,getRootProps(){return t.element({...ze.root.attrs,id:cS(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const x=w1(d).map((C,E)=>Ri(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:dS(i),role:"tablist","aria-owns":x.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const x=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":x.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const x=g(y);return t.button({...ze.trigger.attrs,id:x.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||x.current?0:-1,"aria-selected":x.current,"aria-controls":x.contentId,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const x=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:x.contentId,role:"tabpanel",tabIndex:0,hidden:!x.current,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":x.triggerId})},getIndicatorProps(y){const x=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getSeparatorProps(y){const x=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},getProgressProps(){return t.element({dir:a("dir"),...ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":We(u===100)})}}}var pS={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:q1(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){mS(t("count"),e.get("step"))}}}},mS=(e,t)=>{if(!O1(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};K1()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[zR,gS]=Lr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[qR,vS]=Lr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function hS(e){const t=S.useId(),{getRootNode:r}=gS(),{dir:n}=vS(),o={id:t,dir:n,getRootNode:r,...e},a=Z1(pS,o);return fS(a,Q1)}const Sf=S.forwardRef((e,t)=>{const[r,n]=za()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=hS(r),a=Be(o.getRootProps(),n);return s.jsx(oS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Sf.displayName="StepsRoot";const Ef=S.forwardRef((e,t)=>{const r=nt(),n=qa(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Ef.displayName="StepsSeparator";const Rf=S.forwardRef((e,t)=>{const r=nt(),n=qa(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});Rf.displayName="StepsTrigger";function xS(e){return vu({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const Pf=S.createContext(void 0),bS=({children:e,step:t})=>s.jsx(Pf.Provider,{value:{step:t},children:e}),kf=()=>{const e=S.useContext(Pf);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},yS=({className:e,step:t,...r})=>{const n=j("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(bS,{step:t??0,children:s.jsx(Sf,{className:n,step:t,...r})})},wS=({className:e,...t})=>{const r=j("flex flex-row gap-4",e);return s.jsx(yf,{className:r,...t})},CS=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4",e);return s.jsx(bf,{className:r,...t})},SS=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(Rf,{className:r,...t})},ES=({index:e,className:t,...r})=>{const{step:n}=kf(),o=e===n,a=e<n,i=j("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),l=j({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(xf,{className:i,...r,children:a?s.jsx(xS,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},RS=({index:e,className:t,...r})=>{const{step:n}=kf(),o=e<n,a=j("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx(Ef,{className:a,...r})},PS=({className:e,...t})=>{const r=j(e);return s.jsx(hf,{className:r,...t})},kS=({className:e,...t})=>{const r=j(e);return s.jsx(vf,{className:r,...t})},jS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Cf,{className:r,...t})},NS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(wf,{className:r,...t})},TS={Root:yS,List:wS,Item:CS,Trigger:SS,Indicator:ES,Separator:RS,Content:PS,CompletedContent:kS,PrevTrigger:jS,NextTrigger:NS},Fr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Tu,{...r,children:s.jsxs(Au,{children:[s.jsx(_u,{...n,children:e}),t&&s.jsx(Iu,{...o,children:t})]})});/**
|
|
195
205
|
* react-table
|
|
196
206
|
*
|
|
197
207
|
* Copyright (c) TanStack
|
|
@@ -200,5 +210,5 @@ Defaulting to \`null\`.`}var mb=Rc,gb=kc;function hb({className:e,value:t,...r})
|
|
|
200
210
|
* LICENSE.md file in the root directory of this source tree.
|
|
201
211
|
*
|
|
202
212
|
* @license MIT
|
|
203
|
-
*/function Ws(e,t){return e?X0(e)?c.createElement(e,t):e:null}function X0(e){return Z0(e)||typeof e=="function"||J0(e)}function Z0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function J0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const wd=c.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{className:_("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:_("w-full caption-bottom text-sm",e),...r})}));wd.displayName="Table";const Cd=c.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:_("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));Cd.displayName="TableHeader";const Sd=c.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:_("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));Sd.displayName="TableBody";const Q0=c.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:_("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Q0.displayName="TableFooter";const bt=c.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:_("border-b border-purple-muted-600 transition-colors hover:bg-muted/50 data-[state=selected]:bg-purple-muted-600/30",e,{"cursor-pointer hover:bg-purple-muted-600/20":!!t.onClick}),...t}));bt.displayName="TableRow";const Rd=c.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:_("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Rd.displayName="TableHead";const $t=c.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:_("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));$t.displayName="TableCell";const eC=c.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:_("mt-4 text-sm text-muted-foreground",e),...t}));eC.displayName="TableCaption";const tC=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),rC=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(bt,{children:Array.from({length:e}).map((o,a)=>s.jsx($t,{children:s.jsx(Nc,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),nC=e=>s.jsxs("svg",{width:"280",height:"195",viewBox:"0 0 280 195",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_65_2990)",children:[s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",fill:"white"}),s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",fill:"black"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",fill:"white"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763L201.748 52.7432Z",fill:"white"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",fill:"white"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M89.0353 182.686C75.1053 138.51 106.825 68.8089 143.315 34.4425C185.995 -5.7651 243.385 -13.4257 278.755 68.5323L270.145 71.5115C270.365 71.6285 238.435 46.4974 222.705 46.4974C217.675 46.4974 214.215 50.2532 210.675 54.6687C192.345 77.5336 173.815 147.99 131.485 147.905C131.485 147.905 132.205 179.43 99.6853 183.92C99.6853 183.92 124.525 182.282 124.525 193.315H83.9453C84.2153 192.709 83.5353 185.016 89.0453 182.686H89.0353Z",fill:"white",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M130.318 157.438C130.318 157.438 133.678 142.638 127.758 131.765",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M216.647 40.9229L202.547 62.1066",stroke:"black",strokeWidth:"3",strokeLinejoin:"round"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",fill:"white"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",fill:"white"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",fill:"white"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M275.767 61.9785L263.938 66.8728L270.147 71.5118L278.568 68.3517L275.767 61.9785Z",fill:"#7A68FA",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 40.4968C231.289 40.4968 236.267 35.1997 236.267 28.6654C236.267 22.1311 231.289 16.834 225.147 16.834C219.006 16.834 214.027 22.1311 214.027 28.6654C214.027 35.1997 219.006 40.4968 225.147 40.4968Z",fill:"white",stroke:"black",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 32.9536C227.373 32.9536 229.177 31.0338 229.177 28.6657C229.177 26.2976 227.373 24.3779 225.147 24.3779C222.921 24.3779 221.117 26.2976 221.117 28.6657C221.117 31.0338 222.921 32.9536 225.147 32.9536Z",fill:"black"}),s.jsx("path",{d:"M244.89 26.0693L240.93 29.623L245.78 32.6128",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M220.18 55.8399C220.18 55.8399 223.26 53.4567 227.08 54.9675",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M223.938 59.5836C223.938 59.5836 227.918 58.2004 230.658 60.4986",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_65_2990",children:s.jsx("rect",{width:"279",height:"195",fill:"white",transform:"translate(0.5)"})})})]}),zs=({title:e="There's nothing to show",description:t="No items to display"})=>s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-14",children:[s.jsx(nC,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),Ed=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:_("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});Ed.displayName="Pagination";const kd=c.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:_("flex flex-row items-center gap-1",e),...t}));kd.displayName="PaginationContent";const cr=c.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:_("",e),...t}));cr.displayName="PaginationItem";const Pd=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:_(ii({variant:t?"outline":"ghost",size:r}),e),...n});Pd.displayName="PaginationLink";const Nd=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:_("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(Nl,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});Nd.displayName="PaginationEllipsis";const oC=({table:e,isLoading:t=!1})=>{const r=e.getPageCount(),n=e.getState().pagination.pageIndex+1,[o,a]=S.useState(r);S.useEffect(()=>{r>=1&&a(r)},[r]);const i=S.useMemo(()=>{const m="text-purple-muted-300 dark:text-purple-muted-300",v="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",h="bg-purple-muted-600 text-purple-muted-300 dark:bg-purple-muted-600 dark:text-purple-muted-300",x="border-none flex items-center justify-center w-8 h-8",y="pointer-events-none opacity-50 cursor-not-allowed";return{previous:_(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),next:_(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",x,m,t&&y),link:b=>_(x,t?"cursor-not-allowed":"cursor-pointer",m,!t&&v,b&&h,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const v=m-1;e.setPagination(h=>({...h,pageIndex:v}))},[e,t]),u=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),d=S.useCallback(()=>{t||r<=1||n>=r||l(n+1)},[r,n,l,t]),f=S.useCallback(m=>{if(m<=1)return[];if(m<=7)return Array.from({length:m},(h,x)=>x+1);const v=[];return n<=4?v.push(1,2,3,4,5,"ellipsis",m):n>=m-3?v.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):v.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),v},[n]),p=S.useMemo(()=>{if(r<=1){const m=Math.max(r,o);return f(m)}return f(r)},[r,o,f]),g=S.useCallback((m,v)=>m==="ellipsis"?s.jsx(cr,{children:s.jsx(Nd,{})},`ellipsis-${v}`):s.jsx(cr,{className:"flex items-center justify-center",children:s.jsx(Pd,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${v}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(Ed,{className:"dark:bg-transparent",children:s.jsxs(kd,{children:[s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.previous,onClick:u,children:s.jsx(fv,{})})}),p.map(g),s.jsx(cr,{children:s.jsx(Je,{variant:"ghost",size:"icon",className:i.next,onClick:d,children:s.jsx(Pl,{onClick:d})})})]})})},aC=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:u="No items to display",noResultsTitle:d="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g})=>{const m=e.getVisibleFlatColumns().length,v=e.options.manualPagination&&e.options.onPaginationChange,h=e.getRowModel().rows.length===0,x=e.getCoreRowModel().rows.length===0&&!o,y=!o&&(a||x||h),b="hover:bg-transparent cursor-default",C=()=>e.getHeaderGroups().map(P=>s.jsx(bt,{children:P.headers.map(j=>s.jsx(Rd,{className:"text-[#A1A1AA]",children:j.isPlaceholder?void 0:Ws(j.column.columnDef.header,j.getContext())},j.id))},P.id)),R=()=>o?s.jsx(rC,{rowsCount:p,columnsCount:m}):a?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(n==null?void 0:n())||s.jsx(zs,{title:l,description:u})})}):x?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(t==null?void 0:t())||s.jsx(zs,{title:l,description:u})})}):h?s.jsx(bt,{className:b,children:s.jsx($t,{colSpan:m,children:(r==null?void 0:r())||s.jsx(tC,{title:d})})}):e.getRowModel().rows.map(P=>{var E;const j=(E=P.original)==null?void 0:E.id,T=P.getIsSelected()||!!g&&g===j;return s.jsx(bt,{"data-state":T?"selected":void 0,onClick:()=>i==null?void 0:i(P.original),children:P.getVisibleCells().map(V=>s.jsx($t,{className:"text-[#FAFAFA] whitespace-nowrap",children:Ws(V.column.columnDef.cell,V.getContext())},V.id))},P.id)});return s.jsxs("div",{className:_("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{className:"flex-1 min-h-0",children:s.jsxs(wd,{wrapperClassName:f,className:_({"h-[100%]":y}),children:[s.jsx(Cd,{children:C()}),s.jsx(Sd,{children:R()})]})}),v&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(oC,{table:e,isLoading:o})})]})},jo=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},sC=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Pn,{...e,children:n})},iC=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(jo,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(jo,{...r,children:o})},lC=({column:e,children:t,tooltipContent:r})=>{const[n,o]=S.useState(!1),a=e.getCanSort();let i=t;return r&&(i=s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{children:t}),s.jsx(Nr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(Cv,{className:"h-4 w-4"})})]})),a?s.jsxs("span",{className:"flex gap-1 items-center cursor-pointer",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),role:"button",children:[i,s.jsx(lv,{className:_("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var To=["Enter"," "],cC=["ArrowDown","PageUp","Home"],jd=["ArrowUp","PageDown","End"],uC=[...cC,...jd],dC={ltr:[...To,"ArrowRight"],rtl:[...To,"ArrowLeft"]},fC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jr="Menu",[mr,pC,mC]=cn(jr),[Pt,Td]=ye(jr,[mC,ut,Jt]),Tr=ut(),_d=Jt(),[Ad,gt]=Pt(jr),[gC,_r]=Pt(jr),Id=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=Tr(t),[u,d]=c.useState(null),f=c.useRef(!1),p=Oe(a),g=Ut(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(yr,{...l,children:s.jsx(Ad,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:s.jsx(gC,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};Id.displayName=jr;var hC="MenuAnchor",Sa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(wr,{...o,...n,ref:t})});Sa.displayName=hC;var Ra="MenuPortal",[vC,Md]=Pt(Ra,{forceMount:void 0}),Od=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=gt(Ra,t);return s.jsx(vC,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(Xt,{asChild:!0,container:o,children:n})})})};Od.displayName=Ra;var _e="MenuContent",[xC,Ea]=Pt(_e),Dd=c.forwardRef((e,t)=>{const r=Md(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(bC,{...o,ref:t}):s.jsx(yC,{...o,ref:t})})})})}),bC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return vn(a)},[]),s.jsx(ka,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),yC=c.forwardRef((e,t)=>{const r=gt(_e,e.__scopeMenu);return s.jsx(ka,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),wC=st("MenuContent.ScrollLock"),ka=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...h}=e,x=gt(_e,r),y=_r(_e,r),b=Tr(r),C=_d(r),R=pC(r),[P,j]=c.useState(null),T=c.useRef(null),E=se(t,T,x.onContentChange),V=c.useRef(0),U=c.useRef(""),re=c.useRef(0),te=c.useRef(null),J=c.useRef("right"),q=c.useRef(0),D=v?Cr:c.Fragment,A=v?{as:wC,allowPinchZoom:!0}:void 0,$=O=>{var I,Z;const W=U.current+O,Q=R().filter(ee=>!ee.disabled),N=document.activeElement,B=(I=Q.find(ee=>ee.ref.current===N))==null?void 0:I.textValue,Y=Q.map(ee=>ee.textValue),M=IC(Y,W,B),G=(Z=Q.find(ee=>ee.textValue===M))==null?void 0:Z.ref.current;(function ee(oe){U.current=oe,window.clearTimeout(V.current),oe!==""&&(V.current=window.setTimeout(()=>ee(""),1e3))})(W),G&&setTimeout(()=>G.focus())};c.useEffect(()=>()=>window.clearTimeout(V.current),[]),un();const k=c.useCallback(O=>{var Q,N;return J.current===((Q=te.current)==null?void 0:Q.side)&&OC(O,(N=te.current)==null?void 0:N.area)},[]);return s.jsx(xC,{scope:r,searchRef:U,onItemEnter:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),onItemLeave:c.useCallback(O=>{var W;k(O)||((W=T.current)==null||W.focus(),j(null))},[k]),onTriggerLeave:c.useCallback(O=>{k(O)&&O.preventDefault()},[k]),pointerGraceTimerRef:re,onPointerGraceIntentChange:c.useCallback(O=>{te.current=O},[]),children:s.jsx(D,{...A,children:s.jsx(xr,{asChild:!0,trapped:o,onMountAutoFocus:F(a,O=>{var W;O.preventDefault(),(W=T.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(oa,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:j,onEntryFocus:F(u,O=>{y.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(gn,{role:"menu","aria-orientation":"vertical","data-state":Qd(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:F(h.onKeyDown,O=>{const Q=O.target.closest("[data-radix-menu-content]")===O.currentTarget,N=O.ctrlKey||O.altKey||O.metaKey,B=O.key.length===1;Q&&(O.key==="Tab"&&O.preventDefault(),!N&&B&&$(O.key));const Y=T.current;if(O.target!==Y||!uC.includes(O.key))return;O.preventDefault();const G=R().filter(I=>!I.disabled).map(I=>I.ref.current);jd.includes(O.key)&&G.reverse(),_C(G)}),onBlur:F(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(V.current),U.current="")}),onPointerMove:F(e.onPointerMove,gr(O=>{const W=O.target,Q=q.current!==O.clientX;if(O.currentTarget.contains(W)&&Q){const N=O.clientX>q.current?"right":"left";J.current=N,q.current=O.clientX}}))})})})})})})});Dd.displayName=_e;var CC="MenuGroup",Pa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"group",...n,ref:t})});Pa.displayName=CC;var SC="MenuLabel",Ld=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{...n,ref:t})});Ld.displayName=SC;var on="MenuItem",qs="menu.itemSelect",Dn=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=c.useRef(null),i=_r(on,e.__scopeMenu),l=Ea(on,e.__scopeMenu),u=se(t,a),d=c.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(qs,{bubbles:!0,cancelable:!0});p.addEventListener(qs,m=>n==null?void 0:n(m),{once:!0}),ci(p,g),g.defaultPrevented?d.current=!1:i.onClose()}};return s.jsx($d,{...o,ref:u,disabled:r,onClick:F(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:F(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:F(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||To.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Dn.displayName=on;var $d=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Ea(on,r),l=_d(r),u=c.useRef(null),d=se(t,u),[f,p]=c.useState(!1),[g,m]=c.useState("");return c.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[a.children]),s.jsx(mr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(aa,{asChild:!0,...l,focusable:!n,children:s.jsx(X.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:d,onPointerMove:F(e.onPointerMove,gr(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,gr(v=>i.onItemLeave(v))),onFocus:F(e.onFocus,()=>p(!0)),onBlur:F(e.onBlur,()=>p(!1))})})})}),RC="MenuCheckboxItem",Fd=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(zd,{scope:e.__scopeMenu,checked:r,children:s.jsx(Dn,{role:"menuitemcheckbox","aria-checked":an(r)?"mixed":r,...o,ref:t,"data-state":Ta(r),onSelect:F(o.onSelect,()=>n==null?void 0:n(an(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Fd.displayName=RC;var Vd="MenuRadioGroup",[EC,kC]=Pt(Vd,{value:void 0,onValueChange:()=>{}}),Bd=c.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=Oe(n);return s.jsx(EC,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(Pa,{...o,ref:t})})});Bd.displayName=Vd;var Gd="MenuRadioItem",Wd=c.forwardRef((e,t)=>{const{value:r,...n}=e,o=kC(Gd,e.__scopeMenu),a=r===o.value;return s.jsx(zd,{scope:e.__scopeMenu,checked:a,children:s.jsx(Dn,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Ta(a),onSelect:F(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});Wd.displayName=Gd;var Na="MenuItemIndicator",[zd,PC]=Pt(Na,{checked:!1}),qd=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=PC(Na,r);return s.jsx(ke,{present:n||an(a.checked)||a.checked===!0,children:s.jsx(X.span,{...o,ref:t,"data-state":Ta(a.checked)})})});qd.displayName=Na;var NC="MenuSeparator",Ud=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(X.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ud.displayName=NC;var jC="MenuArrow",Hd=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Tr(r);return s.jsx(hn,{...o,...n,ref:t})});Hd.displayName=jC;var ja="MenuSub",[TC,Kd]=Pt(ja),Yd=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=gt(ja,t),i=Tr(t),[l,u]=c.useState(null),[d,f]=c.useState(null),p=Oe(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(yr,{...i,children:s.jsx(Ad,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:s.jsx(TC,{scope:t,contentId:me(),triggerId:me(),trigger:l,onTriggerChange:u,children:r})})})};Yd.displayName=ja;var ur="MenuSubTrigger",Xd=c.forwardRef((e,t)=>{const r=gt(ur,e.__scopeMenu),n=_r(ur,e.__scopeMenu),o=Kd(ur,e.__scopeMenu),a=Ea(ur,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),s.jsx(Sa,{asChild:!0,...d,children:s.jsx($d,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Qd(r.open),...e,ref:Qe(t,o.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,gr(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:F(e.onPointerLeave,gr(p=>{var m,v;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const h=(v=r.content)==null?void 0:v.dataset.side,x=h==="right",y=x?-5:5,b=g[x?"left":"right"],C=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x:b,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:b,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,p=>{var m;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||dC[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});Xd.displayName=ur;var Zd="MenuSubContent",Jd=c.forwardRef((e,t)=>{const r=Md(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=gt(_e,e.__scopeMenu),i=_r(_e,e.__scopeMenu),l=Kd(Zd,e.__scopeMenu),u=c.useRef(null),d=se(t,u);return s.jsx(mr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(mr.Slot,{scope:e.__scopeMenu,children:s.jsx(ka,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:F(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:F(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=fC[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Jd.displayName=Zd;function Qd(e){return e?"open":"closed"}function an(e){return e==="indeterminate"}function Ta(e){return an(e)?"indeterminate":e?"checked":"unchecked"}function _C(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function AC(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function IC(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=AC(e,Math.max(a,0));o.length===1&&(i=i.filter(d=>d!==r));const u=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return u!==r?u:void 0}function MC(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],u=t[i],d=l.x,f=l.y,p=u.x,g=u.y;f>n!=g>n&&r<(p-d)*(n-f)/(g-f)+d&&(o=!o)}return o}function OC(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return MC(r,t)}function gr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DC=Id,LC=Sa,$C=Od,FC=Dd,VC=Pa,BC=Ld,GC=Dn,WC=Fd,zC=Bd,qC=Wd,UC=qd,HC=Ud,KC=Hd,YC=Yd,XC=Xd,ZC=Jd,Ln="DropdownMenu",[JC,uS]=ye(Ln,[Td]),we=Td(),[QC,ef]=JC(Ln),tf=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=we(t),d=c.useRef(null),[f,p]=be({prop:o,defaultProp:a??!1,onChange:i,caller:Ln});return s.jsx(QC,{scope:t,triggerId:me(),triggerRef:d,contentId:me(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(DC,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};tf.displayName=Ln;var rf="DropdownMenuTrigger",nf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=ef(rf,r),i=we(r);return s.jsx(LC,{asChild:!0,...i,children:s.jsx(X.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:Qe(t,a.triggerRef),onPointerDown:F(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:F(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});nf.displayName=rf;var e1="DropdownMenuPortal",of=e=>{const{__scopeDropdownMenu:t,...r}=e,n=we(t);return s.jsx($C,{...n,...r})};of.displayName=e1;var af="DropdownMenuContent",sf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=ef(af,r),a=we(r),i=c.useRef(!1);return s.jsx(FC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var u;i.current||(u=o.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!o.modal||f)&&(i.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)"}})});sf.displayName=af;var t1="DropdownMenuGroup",lf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(VC,{...o,...n,ref:t})});lf.displayName=t1;var r1="DropdownMenuLabel",cf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(BC,{...o,...n,ref:t})});cf.displayName=r1;var n1="DropdownMenuItem",uf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(GC,{...o,...n,ref:t})});uf.displayName=n1;var o1="DropdownMenuCheckboxItem",df=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(WC,{...o,...n,ref:t})});df.displayName=o1;var a1="DropdownMenuRadioGroup",ff=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(zC,{...o,...n,ref:t})});ff.displayName=a1;var s1="DropdownMenuRadioItem",pf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(qC,{...o,...n,ref:t})});pf.displayName=s1;var i1="DropdownMenuItemIndicator",mf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(UC,{...o,...n,ref:t})});mf.displayName=i1;var l1="DropdownMenuSeparator",gf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(HC,{...o,...n,ref:t})});gf.displayName=l1;var c1="DropdownMenuArrow",u1=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(KC,{...o,...n,ref:t})});u1.displayName=c1;var d1=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=we(t),[l,u]=be({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(YC,{...i,open:l,onOpenChange:u,children:r})},f1="DropdownMenuSubTrigger",hf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(XC,{...o,...n,ref:t})});hf.displayName=f1;var p1="DropdownMenuSubContent",vf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=we(r);return s.jsx(ZC,{...o,...n,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)"}})});vf.displayName=p1;var m1=tf,g1=nf,xf=of,bf=sf,h1=lf,yf=cf,wf=uf,Cf=df,v1=ff,Sf=pf,Rf=mf,Ef=gf,x1=d1,kf=hf,Pf=vf;const b1=m1,y1=g1,w1=h1,C1=xf,S1=x1,R1=v1,Nf=c.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(kf,{ref:o,className:_("qodo qodo-dropdown-menu-sub-trigger flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800",t&&"pl-8",e),...n,children:[r,s.jsx(Pl,{className:"ml-auto"})]}));Nf.displayName=kf.displayName;const jf=c.forwardRef(({className:e,...t},r)=>s.jsx(Pf,{ref:r,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-purple-muted-600 dark:text-neutral-50",e),...t}));jf.displayName=Pf.displayName;const Tf=c.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(xf,{children:s.jsx(bf,{ref:n,sideOffset:t,className:_("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-purple-muted-600 background dark:text-neutral-50","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Tf.displayName=bf.displayName;const _a=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(wf,{ref:n,className:_("qodo qodo-dropdown-menu-item relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));_a.displayName=wf.displayName;const _f=c.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(Cf,{ref:o,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),checked:r,...n,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rf,{children:s.jsx(Cn,{className:"h-4 w-4"})})}),t]}));_f.displayName=Cf.displayName;const Af=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Sf,{ref:n,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),...r,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Rf,{children:s.jsx(Cn,{className:"h-[18px] w-[18px] stroke-current stroke-purple-300"})})}),t]}));Af.displayName=Sf.displayName;const Aa=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(yf,{ref:n,className:_("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Aa.displayName=yf.displayName;const ht=c.forwardRef(({className:e,...t},r)=>s.jsx(Ef,{ref:r,className:_("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));ht.displayName=Ef.displayName;const If=({className:e,...t})=>s.jsx("span",{className:_("ml-auto text-xs tracking-widest [&>svg]:size-4",e),...t});If.displayName="DropdownMenuEndAndornment";const E1=({radioItem:e})=>s.jsxs(Af,{className:"m-0 rounded-none gap-2 text-white focus:text-purple-muted-100 focus:bg-zinc-800 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),k1=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(R1,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(E1,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),P1=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Nr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(_a,{className:"m-0 rounded-none py-1.5 px-3 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2",children:[e.loading&&s.jsx(kv,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(If,{children:e.endAndornment})]})})}),e.separator&&s.jsx(ht,{})]}),N1=({checkboxItem:e})=>s.jsxs(_f,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-purple-300 [&_svg]:size-[18px] [&_svg]:stroke-[3px]",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),j1=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(w1,{children:e.checkboxes.map((t,r)=>s.jsx(N1,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(ht,{})]}),T1=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(S1,{children:[s.jsxs(Nf,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1 data-[state=open]:bg-zinc-800 data-[state=open]:text-purple-muted-100 text-white focus:text-purple-muted-100 hover:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-1 [&_svg]:stroke-white [&_svg]:stroke-1.5 [&_svg]:size-4",children:[e.icon,e.label]}),s.jsx(C1,{children:s.jsx(jf,{className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5",children:e.subItems.map((t,r)=>Mf(t,r))})})]}),e.separator&&s.jsx(ht,{})]}),_1=({menuItem:e})=>s.jsx(Aa,{className:"text-[#7968FA] px-3 font-normal",children:e.label}),A1=()=>s.jsx(ht,{}),Mf=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(P1,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(j1,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(k1,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(T1,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(_1,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(A1,{},`item-${t}`);default:return null}},I1={s:"min-w-[140px]",l:"min-w-[257px]"},M1=({header:e})=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-purple-muted-300",children:e.title}),s.jsx("span",{children:e.label})]}),O1=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(Aa,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(M1,{header:e})}),s.jsx(ht,{className:"bg-purple-muted-500"})]}):null,D1=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(ht,{className:"bg-purple-muted-500"}),s.jsxs(_a,{onClick:e.action,disabled:e.disabled,className:"cursor-pointer m-0 rounded-none py-1.5 px-3 text-purple-300 focus:text-purple-300 focus:bg-transparent",children:[e.icon,e.label]})]}):null,Of=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:u=!1})=>{const d=si(I1,{[o]:o,className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5"},!1);return s.jsx("div",{className:_("qodo qodo-dropdown"),children:s.jsxs(b1,{modal:l,children:[s.jsx(y1,{asChild:a,className:"select-none outline-none flex items-center",disabled:u,children:n}),s.jsxs(Tf,{side:i,align:"end",className:d,children:[s.jsx(O1,{header:t}),e.filter(f=>!f.isHidden).map((f,p)=>Mf(f,p)),s.jsx(D1,{footer:r})]})]})})},L1=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(Je,{variant:"ghost",size:"icon","aria-label":e,className:_("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(Nl,{className:"h-4 w-4"})}),$1=({menuItems:e=[],triggerElement:t=L1,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:u=>u.stopPropagation(),children:s.jsx(Of,{triggerElement:s.jsx(t,{className:_("flex items-center justify-center",r==null?void 0:r.className),...r}),menuItems:e,size:o,asChild:a,side:i,modal:l,disabled:r==null?void 0:r.disabled})}),F1={"data-lpignore":"true","data-1p-ignore":"true","data-bitwarden-watching":"false","data-form-type":"other","data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",spellCheck:!1,autoComplete:"off"},Us={SMALL:"small",LARGE:"large"},V1=({containerClassName:e,className:t,searchSize:r=Us.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Us.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=_("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),u=_("text-purple-muted-200 dark:border-purple-muted-600 dark:text-purple-muted-200 dark:bg-[#1C1C1C] dark:placeholder:text-purple-muted-400 pl-9",{"pr-9":!o});return s.jsxs("div",{className:_("qodo qodo-search-input","relative",e),children:[s.jsx(jl,{className:_(l,"left-3")}),s.jsx(vr,{className:_(i,u,t),disabled:n,...a,...F1}),!o&&s.jsx(Rv,{className:_(l,"right-3")})]})},B1=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,G1=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),W1=(e,t)=>{var n;if(!(t!=null&&t.length))return!0;const r=(n=e.split("@")[1])==null?void 0:n.toLowerCase();return t.some(o=>r===o.toLowerCase())},z1=(e,t)=>e.map(r=>{const n=B1.test(r),o=n?W1(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),q1=(e,t,r)=>{const n=z1(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},U1=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(d=>{e(d)},[e]),a=S.useCallback(d=>{n(d),o(d)},[o]),i=S.useCallback(d=>{const f=G1(d);if(f.length===0)return;const p=q1(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),u=S.useCallback(d=>{const f=r.filter(p=>p.email!==d);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:u,clearAll:l,notify:o}},H1=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:u,notify:d}=e;return f=>{if((f.key==="a"||f.key==="A")&&(f.metaKey||f.ctrlKey)){f.preventDefault(),a(!0);return}if(o&&(f.key==="Backspace"||f.key==="Delete")){f.preventDefault(),a(!1),i(),r("");return}if(o&&f.key==="Escape"){f.preventDefault(),a(!1);return}if(o&&f.key.length===1&&!f.metaKey&&!f.ctrlKey&&!f.altKey&&(a(!1),i()),f.key==="Backspace"&&t.length===0&&l.length>0){f.preventDefault();const p=l[l.length-1],g=l.slice(0,-1);u(g),r(p.email),d(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},K1=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Pn,{className:"px-2 group whitespace-nowrap flex-shrink-0",variant:t?"success":"error",size:"sm",children:[s.jsx("span",{className:"max-w-[200px] truncate",children:e}),s.jsx("button",{onClick:n,className:"ml-1 opacity-70 hover:opacity-100 transition-opacity flex-shrink-0",type:"button",children:s.jsx(Sn,{size:12})})]})},Y1=({hasContent:e,onClearAll:t,emails:r,invalidEmailError:n,invalidDomainError:o})=>{const{formatErrors:a,domainErrors:i,totalInvalidCount:l}=S.useMemo(()=>{const m=r.filter(x=>!x.isValid),v=m.filter(x=>!x.email.includes("@")||x.isDomainValid===void 0),h=m.filter(x=>x.isDomainValid===!1);return{formatErrors:v,domainErrors:h,totalInvalidCount:m.length}},[r]),u=m=>{m.preventDefault(),m.stopPropagation()},d=m=>{u(m),t()},f=m=>{u(m)},p=m=>{m.stopPropagation()},g=(m,v)=>v.length===0?s.jsx(s.Fragment,{}):s.jsxs("div",{className:"space-y-1 text-purple-muted-200",children:[s.jsxs("span",{className:"font-medium border-b border-purple-muted-200",children:[m,":"]}),v.map((h,x)=>s.jsx("p",{className:"break-all",children:h.email},`${m}-${x}-${h.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:d,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(Ov,{className:"h-4 w-4"})}),l>0&&s.jsx("div",{className:"absolute flex center align-center right-[34px] top-1/2 -translate-y-1/2 [&>button]:h-4",children:s.jsx(Nr,{triggerProps:{asChild:!0},content:s.jsx("div",{onClick:f,onWheel:p,className:"max-w-[min(90vw,32rem)] max-h-[min(60vh,20rem)] p-3 rounded-md border dark:border-red-800 shadow-lg dark:bg-purple-muted-800 dark:text-purple-muted-100",children:s.jsxs("div",{className:"flex flex-col gap-1 text-xs max-h-64 overflow-y-auto pr-1 no-scrollbar",children:[g(n,a),g(o,i)]})}),providerProps:{delayDuration:200},contentProps:{side:"bottom",align:"end",className:"border-0 bg-transparent p-0 m-0",disableArrow:!0},children:s.jsx("button",{type:"button","aria-label":`${l} invalid emails`,className:"text-red-400 hover:text-red-300",children:s.jsx(Lv,{className:"size-[18px]"})})})})]})},X1=({onChange:e,disabled:t=!1,inviteMembersPlaceholder:r=({domain:f})=>`Enter email addresses (e.g., user@${f})`,inviteMembersDisabledTooltip:n="You don't have permission to modify email addresses",organization:o,inputClassName:a,chipClassName:i,wrapperClassName:l,invalidEmailError:u="Invalid email",invalidDomainError:d="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[v,h]=S.useState(!1),{emails:x,setEmails:y,addTokens:b,removeToken:C,clearAll:R,notify:P}=U1({onChange:e}),j=H1({draft:g,setDraft:m,addTokens:b,allSelected:v,setAllSelected:h,clearAll:R,emails:x,setEmails:y,notify:P}),T=()=>{var Q;const W=((Q=o==null?void 0:o.domains)==null?void 0:Q[0])||"example.com";return r({domain:W})},E=S.useCallback(W=>{m(W.target.value)},[]),V=S.useCallback(()=>{g.trim()&&(b(g),m("")),h(!1)},[g,b]),U=S.useCallback(W=>{const Q=W.clipboardData.getData("text");Q&&(W.preventDefault(),b(Q),m(""))},[b]),re=S.useCallback(()=>{var W;(W=p.current)==null||W.focus()},[p]),te=S.useCallback(()=>{h(!1)},[]),J=S.useCallback(W=>{var N;const Q=W.relatedTarget;Q&&((N=f.current)!=null&&N.contains(Q))||g.trim()&&(b(g),m(""))},[g,b]),q=x.length>0,D=!q&&g.length===0,A=q||g.length>0,$=_("bg-transparent text-sm outline-none border-0 p-0 h-6 shadow-none focus-visible:ring-0 whitespace-nowrap text-purple-muted-200 placeholder:text-purple-muted-400",q?"flex-none shrink-0 overflow-x-auto overflow-y-hidden no-scrollbar":"flex-1 !min-w-full overflow-hidden",{"opacity-50 cursor-not-allowed":t},a),k=_("inline-flex items-center gap-1 no-scrollbar",q?"w-max":"w-full",i),O=_("qodo qodo-email-chips-input","relative w-full max-w-full min-w-0 overflow-hidden rounded-md border pl-9 pr-14 py-2 pl-9 pr-14 py-2 focus-within:ring-1 border-purple-muted-500 dark:bg-purple-muted-800 focus-within:ring-purple-muted-400",l);return s.jsx(Nr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:O,onClick:re,onFocus:te,onBlur:J,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(Nv,{className:"w-4 h-4"})}),s.jsx("div",{className:"w-full text-start max-w-full min-w-0 overflow-x-auto overflow-y-hidden no-scrollbar",children:s.jsxs("div",{className:k,children:[x.map((W,Q)=>s.jsx(K1,{email:W.email,isValid:W.isValid,onRemove:C},`email-${Q}-${W.email}`)),s.jsx("input",{ref:p,value:g,onChange:E,onKeyDown:j,onBlur:V,onPaste:U,className:$,placeholder:D?T():"",disabled:t})]})}),s.jsx(Y1,{hasContent:A,onClearAll:R,emails:x,invalidEmailError:u,invalidDomainError:d})]})})};exports.Accordion=uy;exports.AccordionContent=py;exports.AccordionItem=dy;exports.AccordionTrigger=fy;exports.ActionsCell=$1;exports.Badge=Pn;exports.BadgeCell=sC;exports.BaseCell=jo;exports.Button=Je;exports.Card=tb;exports.CardAction=ab;exports.CardContent=sb;exports.CardDescription=ob;exports.CardFooter=ib;exports.CardHeader=rb;exports.CardTitle=nb;exports.ClassHelper=si;exports.Combobox=ea;exports.Dialog=Ex;exports.DialogClose=Px;exports.DialogContent=Nx;exports.DialogDescription=Ax;exports.DialogFooter=Tx;exports.DialogHeader=jx;exports.DialogOverlay=uc;exports.DialogPortal=cc;exports.DialogTitle=_x;exports.DialogTrigger=kx;exports.Dropdown=Of;exports.EmailChipsInput=X1;exports.Form=Ae;exports.FormProvider=bu;exports.Input=vr;exports.NumberCell=iC;exports.Progress=hb;exports.RadioGroup=xa;exports.RadioGroupItem=ba;exports.SearchInput=V1;exports.Select=Tl;exports.SelectContent=Ho;exports.SelectGroup=Fv;exports.SelectItem=Ko;exports.SelectLabel=Al;exports.SelectScrollDownButton=Uo;exports.SelectScrollUpButton=qo;exports.SelectSeparator=Il;exports.SelectTrigger=zo;exports.SelectValue=_l;exports.Skeleton=Nc;exports.SortableHeaderCell=lC;exports.Steps=Y0;exports.Switch=Sb;exports.Table=aC;exports.TagsInput=rd;exports.Toggle=Eb;exports.ToggleGroup=Gb;exports.ToggleGroupItem=Wb;exports.Tooltip=Nr;exports.borderRadius=sp;exports.cn=_;exports.colors=op;exports.spacing=ap;exports.typography=ip;exports.useFormContext=yu;
|
|
213
|
+
*/function Pi(e,t){return e?AS(e)?c.createElement(e,t):e:null}function AS(e){return _S(e)||typeof e=="function"||IS(e)}function _S(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function IS(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const jf=c.forwardRef(({className:e,wrapperClassName:t,...r},n)=>s.jsx("div",{className:j("max-h-[100%] min-h-0 overflow-auto rounded-lg border border-purple-muted-600",t),children:s.jsx("table",{ref:n,className:j("w-full caption-bottom text-sm",e),...r})}));jf.displayName="Table";const Nf=c.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:j("sticky top-0 z-10 b-0 [&>tr]:hover:bg-transparent",e),...t}));Nf.displayName="TableHeader";const Tf=c.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:j("[&_tr:last-child]:border-0 [&_tr:first-child]:border-top-0",e),...t}));Tf.displayName="TableBody";const MS=c.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:j("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));MS.displayName="TableFooter";const Ct=c.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:j("border-b border-purple-muted-600 transition-colors hover:bg-muted/50 data-[state=selected]:bg-purple-muted-600/30",e,{"cursor-pointer hover:bg-purple-muted-600/20":!!t.onClick}),...t}));Ct.displayName="TableRow";const Af=c.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:j("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Af.displayName="TableHead";const Gt=c.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:j("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Gt.displayName="TableCell";const OS=c.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:j("mt-4 text-sm text-muted-foreground",e),...t}));OS.displayName="TableCaption";const DS=({title:e="No results"})=>s.jsx("div",{className:"grid place-items-center text-foreground h-full w-full p-14",children:e}),$S=({columnsCount:e,rowsCount:t=8})=>s.jsx(s.Fragment,{children:Array.from({length:t}).map((r,n)=>s.jsx(Ct,{children:Array.from({length:e}).map((o,a)=>s.jsx(Gt,{children:s.jsx(wd,{className:"h-5.5 w-full"})},`loading-cell-${a}`))},`loading-row-${n}`))}),LS=e=>s.jsxs("svg",{width:"280",height:"195",viewBox:"0 0 280 195",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_65_2990)",children:[s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",fill:"white"}),s.jsx("path",{d:"M228.918 10.4603L230.958 3.72536C230.958 3.72536 232.388 0.863297 235.828 2.69334C238.748 4.24674 237.388 7.1514 237.388 7.1514L233.008 13.2586",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",fill:"black"}),s.jsx("path",{d:"M101.487 163.737L94.1771 171.823L88.0371 163.237L78.7071 173.664L73.6671 165.003L63.3071 174.856L60.1271 165.886L48.9371 176.473L45.0671 167.067L33.8771 177.952L30.2871 168.983L19.0971 179.718L14.7971 170.217L3.80712 180.654C-12.9029 120.029 66.1271 113.464 81.2071 111.017C96.2871 108.57 99.7371 98.9092 99.7371 98.9092",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",fill:"white"}),s.jsx("path",{d:"M184.735 116.039L184.055 126.562L179.015 117.805L177.675 127.434L172.555 118.933",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763L201.748 52.7432Z",fill:"white"}),s.jsx("path",{d:"M201.748 52.7432C212.638 77.3529 211.728 113.549 173.418 118.763",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",fill:"white"}),s.jsx("path",{d:"M169.278 124.402C172.948 139.926 177.038 167.153 156.118 183.549C156.118 183.549 179.558 182.261 179.558 193.316H139.768C139.768 193.316 139.898 186.251 144.708 183.666C144.708 183.666 130.798 176.484 130.168 154.715L130.468 141.394",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M89.0353 182.686C75.1053 138.51 106.825 68.8089 143.315 34.4425C185.995 -5.7651 243.385 -13.4257 278.755 68.5323L270.145 71.5115C270.365 71.6285 238.435 46.4974 222.705 46.4974C217.675 46.4974 214.215 50.2532 210.675 54.6687C192.345 77.5336 173.815 147.99 131.485 147.905C131.485 147.905 132.205 179.43 99.6853 183.92C99.6853 183.92 124.525 182.282 124.525 193.315H83.9453C84.2153 192.709 83.5353 185.016 89.0453 182.686H89.0353Z",fill:"white",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M130.318 157.438C130.318 157.438 133.678 142.638 127.758 131.765",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M216.647 40.9229L202.547 62.1066",stroke:"black",strokeWidth:"3",strokeLinejoin:"round"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",fill:"white"}),s.jsx("path",{d:"M206.769 13.823L204.079 6.74764C204.079 6.74764 201.969 2.55554 206.769 1.45965C211.259 0.427586 211.509 4.64092 211.509 4.64092L211.529 12.8974",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",fill:"white"}),s.jsx("path",{d:"M200.648 56.6694L209.918 53.4668L205.068 60.2018L211.528 59.0633L206.258 64.6492L211.688 64.6917L204.468 70.6181",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",fill:"white"}),s.jsx("path",{d:"M152.234 77.7571C159.214 84.7474 169.364 89.9397 178.244 89.9397C193.344 89.9397 208.224 73.6821 204.564 59.1163C204.074 57.1692 202.094 56.1158 200.334 56.8393L182.354 64.1808C181.694 64.4468 180.974 64.4894 180.304 64.2659C177.674 63.4147 170.604 60.5952 163.084 53.1367",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M275.767 61.9785L263.938 66.8728L270.147 71.5118L278.568 68.3517L275.767 61.9785Z",fill:"#7A68FA",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 40.4968C231.289 40.4968 236.267 35.1997 236.267 28.6654C236.267 22.1311 231.289 16.834 225.147 16.834C219.006 16.834 214.027 22.1311 214.027 28.6654C214.027 35.1997 219.006 40.4968 225.147 40.4968Z",fill:"white",stroke:"black",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M225.147 32.9536C227.373 32.9536 229.177 31.0338 229.177 28.6657C229.177 26.2976 227.373 24.3779 225.147 24.3779C222.921 24.3779 221.117 26.2976 221.117 28.6657C221.117 31.0338 222.921 32.9536 225.147 32.9536Z",fill:"black"}),s.jsx("path",{d:"M244.89 26.0693L240.93 29.623L245.78 32.6128",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M220.18 55.8399C220.18 55.8399 223.26 53.4567 227.08 54.9675",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M223.938 59.5836C223.938 59.5836 227.918 58.2004 230.658 60.4986",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_65_2990",children:s.jsx("rect",{width:"279",height:"195",fill:"white",transform:"translate(0.5)"})})})]}),ki=({title:e="There's nothing to show",description:t="No items to display"})=>s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-14",children:[s.jsx(LS,{className:"mb-6"}),s.jsx("h4",{className:"mb-1 text-foreground",children:e}),s.jsx("p",{className:"text-purple-muted-300",children:t})]}),_f=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:j("qodo qodo-pagination mx-auto flex w-full justify-center",e),...t});_f.displayName="Pagination";const If=c.forwardRef(({className:e,...t},r)=>s.jsx("ul",{ref:r,className:j("flex flex-row items-center gap-1",e),...t}));If.displayName="PaginationContent";const gr=c.forwardRef(({className:e,...t},r)=>s.jsx("li",{ref:r,className:j("",e),...t}));gr.displayName="PaginationItem";const Mf=({className:e,isActive:t,size:r="icon",...n})=>s.jsx("a",{"aria-current":t?"page":void 0,className:j(Yi({variant:t?"outline":"ghost",size:r}),e),...n});Mf.displayName="PaginationLink";const Of=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:j("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(Ui,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});Of.displayName="PaginationEllipsis";const FS=({table:e,isLoading:t=!1})=>{const r=e.getPageCount(),n=e.getState().pagination.pageIndex+1,[o,a]=S.useState(r);S.useEffect(()=>{r>=1&&a(r)},[r]);const i=S.useMemo(()=>{const m="text-purple-muted-300 dark:text-purple-muted-300",b="hover:bg-purple-muted-600 hover:text-purple-muted-300 dark:hover:bg-purple-muted-600 dark:hover:text-purple-muted-300",v="bg-purple-muted-600 text-purple-muted-300 dark:bg-purple-muted-600 dark:text-purple-muted-300",h="border-none flex items-center justify-center w-8 h-8",y="pointer-events-none opacity-50 cursor-not-allowed";return{previous:j(n===1||t?"pointer-events-none opacity-50":"cursor-pointer",h,m,t&&y),next:j(n===r||t?"pointer-events-none opacity-50":"cursor-pointer",h,m,t&&y),link:x=>j(h,t?"cursor-not-allowed":"cursor-pointer",m,!t&&b,x&&v,t&&y)}},[n,r,t]),l=S.useCallback(m=>{if(t)return;const b=m-1;e.setPagination(v=>({...v,pageIndex:b}))},[e,t]),d=S.useCallback(()=>{t||n<=1||l(n-1)},[n,l,t]),u=S.useCallback(()=>{t||r<=1||n>=r||l(n+1)},[r,n,l,t]),f=S.useCallback(m=>{if(m<=1)return[];if(m<=7)return Array.from({length:m},(v,h)=>h+1);const b=[];return n<=4?b.push(1,2,3,4,5,"ellipsis",m):n>=m-3?b.push(1,"ellipsis",m-4,m-3,m-2,m-1,m):b.push(1,"ellipsis",n-1,n,n+1,"ellipsis",m),b},[n]),p=S.useMemo(()=>{if(r<=1){const m=Math.max(r,o);return f(m)}return f(r)},[r,o,f]),g=S.useCallback((m,b)=>m==="ellipsis"?s.jsx(gr,{children:s.jsx(Of,{})},`ellipsis-${b}`):s.jsx(gr,{className:"flex items-center justify-center",children:s.jsx(Mf,{onClick:()=>l(m),isActive:m===n,className:i.link(m===n),children:m})},`${m}-${b}-pagination-item`),[l,n,i]);return r<2&&o<2?s.jsx(s.Fragment,{}):s.jsx(_f,{className:"dark:bg-transparent",children:s.jsxs(If,{children:[s.jsx(gr,{children:s.jsx(Qe,{variant:"ghost",size:"icon",className:i.previous,onClick:d,children:s.jsx(ig,{})})}),p.map(g),s.jsx(gr,{children:s.jsx(Qe,{variant:"ghost",size:"icon",className:i.next,onClick:u,children:s.jsx(qi,{onClick:u})})})]})})},VS=({table:e,emptyStateComponent:t,noResultsComponent:r,errorComponent:n,isLoading:o=!1,isError:a=!1,onRowClick:i,emptyStateTitle:l="There's nothing to show",emptyStateDescription:d="No items to display",noResultsTitle:u="No results",wrapperClassName:f,loadingRowsCount:p=8,activeRowId:g})=>{const m=e.getVisibleFlatColumns().length,b=e.options.manualPagination&&e.options.onPaginationChange,v=e.getRowModel().rows.length===0,h=e.getCoreRowModel().rows.length===0&&!o,y=!o&&(a||h||v),x="hover:bg-transparent cursor-default",C=()=>e.getHeaderGroups().map(k=>s.jsx(Ct,{children:k.headers.map(A=>s.jsx(Af,{className:"text-[#A1A1AA]",children:A.isPlaceholder?void 0:Pi(A.column.columnDef.header,A.getContext())},A.id))},k.id)),E=()=>o?s.jsx($S,{rowsCount:p,columnsCount:m}):a?s.jsx(Ct,{className:x,children:s.jsx(Gt,{colSpan:m,children:(n==null?void 0:n())||s.jsx(ki,{title:l,description:d})})}):h?s.jsx(Ct,{className:x,children:s.jsx(Gt,{colSpan:m,children:(t==null?void 0:t())||s.jsx(ki,{title:l,description:d})})}):v?s.jsx(Ct,{className:x,children:s.jsx(Gt,{colSpan:m,children:(r==null?void 0:r())||s.jsx(DS,{title:u})})}):e.getRowModel().rows.map(k=>{var P;const A=(P=k.original)==null?void 0:P.id,T=k.getIsSelected()||!!g&&g===A;return s.jsx(Ct,{"data-state":T?"selected":void 0,onClick:()=>i==null?void 0:i(k.original),children:k.getVisibleCells().map(B=>s.jsx(Gt,{className:"text-[#FAFAFA] whitespace-nowrap",children:Pi(B.column.columnDef.cell,B.getContext())},B.id))},k.id)});return s.jsxs("div",{className:j("qodo qodo-table","flex flex-col h-full w-full"),children:[s.jsx("div",{className:"flex-1 min-h-0",children:s.jsxs(jf,{wrapperClassName:f,className:j({"h-[100%]":y}),children:[s.jsx(Nf,{children:C()}),s.jsx(Tf,{children:E()})]})}),b&&s.jsx("footer",{className:"pt-4 pb-2 border-t border-purple-muted-600/20 flex-shrink-0",children:s.jsx(FS,{table:e,isLoading:o})})]})},Yo=e=>{const{children:t,...r}=e,n=t&&t!==0?t:"-";return s.jsx("div",{...r,children:n})},BS=e=>{const{variant:t,children:r}=e,n=r||t;return s.jsx(Ht,{...e,children:n})},GS=e=>{const{children:t,...r}=e;if(typeof t!="number")return console.error("NumberCell must be a number"),s.jsx(Yo,{...r,children:"-"});const n=t>1e5?"compact":"standard",o=new Intl.NumberFormat("en-US",{notation:n}).format(t);return s.jsx(Yo,{...r,children:o})},WS=({column:e,children:t,tooltipContent:r})=>{const[n,o]=S.useState(!1),a=e.getCanSort();let i=t;return r&&(i=s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{children:t}),s.jsx(Fr,{contentProps:{className:"max-w-[200px]"},content:r,children:s.jsx(wg,{className:"h-4 w-4"})})]})),a?s.jsxs("span",{className:"flex gap-1 items-center cursor-pointer",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),role:"button",children:[i,s.jsx(ng,{className:j("ml-2 h-4 w-4",{invisible:!n})})]}):s.jsx("span",{children:i})};var Xo=["Enter"," "],zS=["ArrowDown","PageUp","Home"],Df=["ArrowUp","PageDown","End"],qS=[...zS,...Df],US={ltr:[...Xo,"ArrowRight"],rtl:[...Xo,"ArrowLeft"]},HS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Vr="Menu",[wr,KS,YS]=En(Vr),[At,$f]=we(Vr,[YS,ut,nr]),Br=ut(),Lf=nr(),[Ff,ht]=At(Vr),[XS,Gr]=At(Vr),Vf=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,l=Br(t),[d,u]=c.useState(null),f=c.useRef(!1),p=De(a),g=Zt(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),s.jsx(jr,{...l,children:s.jsx(Ff,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:u,children:s.jsx(XS,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:n})})})};Vf.displayName=Vr;var ZS="MenuAnchor",Ua=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Br(r);return s.jsx(Nr,{...o,...n,ref:t})});Ua.displayName=ZS;var Ha="MenuPortal",[JS,Bf]=At(Ha,{forceMount:void 0}),Gf=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=ht(Ha,t);return s.jsx(JS,{scope:t,forceMount:r,children:s.jsx(ke,{present:r||a.open,children:s.jsx(tr,{asChild:!0,container:o,children:n})})})};Gf.displayName=Ha;var _e="MenuContent",[QS,Ka]=At(_e),Wf=c.forwardRef((e,t)=>{const r=Bf(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=ht(_e,e.__scopeMenu),i=Gr(_e,e.__scopeMenu);return s.jsx(wr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(wr.Slot,{scope:e.__scopeMenu,children:i.modal?s.jsx(eE,{...o,ref:t}):s.jsx(tE,{...o,ref:t})})})})}),eE=c.forwardRef((e,t)=>{const r=ht(_e,e.__scopeMenu),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return _n(a)},[]),s.jsx(Ya,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),tE=c.forwardRef((e,t)=>{const r=ht(_e,e.__scopeMenu);return s.jsx(Ya,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),rE=it("MenuContent.ScrollLock"),Ya=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:b,...v}=e,h=ht(_e,r),y=Gr(_e,r),x=Br(r),C=Lf(r),E=KS(r),[k,A]=c.useState(null),T=c.useRef(null),P=se(t,T,h.onContentChange),B=c.useRef(0),U=c.useRef(""),re=c.useRef(0),ee=c.useRef(null),J=c.useRef("right"),z=c.useRef(0),$=b?Tr:c.Fragment,_=b?{as:rE,allowPinchZoom:!0}:void 0,D=M=>{var I,Q;const F=U.current+M,X=E().filter(te=>!te.disabled),N=document.activeElement,V=(I=X.find(te=>te.ref.current===N))==null?void 0:I.textValue,Y=X.map(te=>te.textValue),O=mE(Y,F,V),W=(Q=X.find(te=>te.textValue===O))==null?void 0:Q.ref.current;(function te(oe){U.current=oe,window.clearTimeout(B.current),oe!==""&&(B.current=window.setTimeout(()=>te(""),1e3))})(F),W&&setTimeout(()=>W.focus())};c.useEffect(()=>()=>window.clearTimeout(B.current),[]),Rn();const R=c.useCallback(M=>{var X,N;return J.current===((X=ee.current)==null?void 0:X.side)&&vE(M,(N=ee.current)==null?void 0:N.area)},[]);return s.jsx(QS,{scope:r,searchRef:U,onItemEnter:c.useCallback(M=>{R(M)&&M.preventDefault()},[R]),onItemLeave:c.useCallback(M=>{var F;R(M)||((F=T.current)==null||F.focus(),A(null))},[R]),onTriggerLeave:c.useCallback(M=>{R(M)&&M.preventDefault()},[R]),pointerGraceTimerRef:re,onPointerGraceIntentChange:c.useCallback(M=>{ee.current=M},[]),children:s.jsx($,{..._,children:s.jsx(Pr,{asChild:!0,trapped:o,onMountAutoFocus:G(a,M=>{var F;M.preventDefault(),(F=T.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:s.jsx(Jt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:s.jsx(Sa,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:A,onEntryFocus:G(d,M=>{y.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Tn,{role:"menu","aria-orientation":"vertical","data-state":sp(h.open),"data-radix-menu-content":"",dir:y.dir,...x,...v,ref:P,style:{outline:"none",...v.style},onKeyDown:G(v.onKeyDown,M=>{const X=M.target.closest("[data-radix-menu-content]")===M.currentTarget,N=M.ctrlKey||M.altKey||M.metaKey,V=M.key.length===1;X&&(M.key==="Tab"&&M.preventDefault(),!N&&V&&D(M.key));const Y=T.current;if(M.target!==Y||!qS.includes(M.key))return;M.preventDefault();const W=E().filter(I=>!I.disabled).map(I=>I.ref.current);Df.includes(M.key)&&W.reverse(),fE(W)}),onBlur:G(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(B.current),U.current="")}),onPointerMove:G(e.onPointerMove,Cr(M=>{const F=M.target,X=z.current!==M.clientX;if(M.currentTarget.contains(F)&&X){const N=M.clientX>z.current?"right":"left";J.current=N,z.current=M.clientX}}))})})})})})})});Wf.displayName=_e;var nE="MenuGroup",Xa=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Z.div,{role:"group",...n,ref:t})});Xa.displayName=nE;var oE="MenuLabel",zf=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Z.div,{...n,ref:t})});zf.displayName=oE;var xn="MenuItem",ji="menu.itemSelect",Yn=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,a=c.useRef(null),i=Gr(xn,e.__scopeMenu),l=Ka(xn,e.__scopeMenu),d=se(t,a),u=c.useRef(!1),f=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(ji,{bubbles:!0,cancelable:!0});p.addEventListener(ji,m=>n==null?void 0:n(m),{once:!0}),Zi(p,g),g.defaultPrevented?u.current=!1:i.onClose()}};return s.jsx(qf,{...o,ref:d,disabled:r,onClick:G(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),u.current=!0},onPointerUp:G(e.onPointerUp,p=>{var g;u.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:G(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||Xo.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Yn.displayName=xn;var qf=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Ka(xn,r),l=Lf(r),d=c.useRef(null),u=se(t,d),[f,p]=c.useState(!1),[g,m]=c.useState("");return c.useEffect(()=>{const b=d.current;b&&m((b.textContent??"").trim())},[a.children]),s.jsx(wr.ItemSlot,{scope:r,disabled:n,textValue:o??g,children:s.jsx(Ea,{asChild:!0,...l,focusable:!n,children:s.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:G(e.onPointerMove,Cr(b=>{n?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,Cr(b=>i.onItemLeave(b))),onFocus:G(e.onFocus,()=>p(!0)),onBlur:G(e.onBlur,()=>p(!1))})})})}),aE="MenuCheckboxItem",Uf=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return s.jsx(Zf,{scope:e.__scopeMenu,checked:r,children:s.jsx(Yn,{role:"menuitemcheckbox","aria-checked":bn(r)?"mixed":r,...o,ref:t,"data-state":Qa(r),onSelect:G(o.onSelect,()=>n==null?void 0:n(bn(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Uf.displayName=aE;var Hf="MenuRadioGroup",[sE,iE]=At(Hf,{value:void 0,onValueChange:()=>{}}),Kf=c.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,a=De(n);return s.jsx(sE,{scope:e.__scopeMenu,value:r,onValueChange:a,children:s.jsx(Xa,{...o,ref:t})})});Kf.displayName=Hf;var Yf="MenuRadioItem",Xf=c.forwardRef((e,t)=>{const{value:r,...n}=e,o=iE(Yf,e.__scopeMenu),a=r===o.value;return s.jsx(Zf,{scope:e.__scopeMenu,checked:a,children:s.jsx(Yn,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Qa(a),onSelect:G(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});Xf.displayName=Yf;var Za="MenuItemIndicator",[Zf,lE]=At(Za,{checked:!1}),Jf=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,a=lE(Za,r);return s.jsx(ke,{present:n||bn(a.checked)||a.checked===!0,children:s.jsx(Z.span,{...o,ref:t,"data-state":Qa(a.checked)})})});Jf.displayName=Za;var cE="MenuSeparator",Qf=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Qf.displayName=cE;var dE="MenuArrow",ep=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Br(r);return s.jsx(An,{...o,...n,ref:t})});ep.displayName=dE;var Ja="MenuSub",[uE,tp]=At(Ja),rp=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=ht(Ja,t),i=Br(t),[l,d]=c.useState(null),[u,f]=c.useState(null),p=De(o);return c.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),s.jsx(jr,{...i,children:s.jsx(Ff,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:f,children:s.jsx(uE,{scope:t,contentId:ge(),triggerId:ge(),trigger:l,onTriggerChange:d,children:r})})})};rp.displayName=Ja;var vr="MenuSubTrigger",np=c.forwardRef((e,t)=>{const r=ht(vr,e.__scopeMenu),n=Gr(vr,e.__scopeMenu),o=tp(vr,e.__scopeMenu),a=Ka(vr,e.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:d}=a,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),d(null)}},[l,d]),s.jsx(Ua,{asChild:!0,...u,children:s.jsx(qf,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":sp(r.open),...e,ref:et(t,o.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,Cr(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:G(e.onPointerLeave,Cr(p=>{var m,b;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const v=(b=r.content)==null?void 0:b.dataset.side,h=v==="right",y=h?-5:5,x=g[h?"left":"right"],C=g[h?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+y,y:p.clientY},{x,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x,y:g.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,p=>{var m;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||US[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});np.displayName=vr;var op="MenuSubContent",ap=c.forwardRef((e,t)=>{const r=Bf(_e,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=ht(_e,e.__scopeMenu),i=Gr(_e,e.__scopeMenu),l=tp(op,e.__scopeMenu),d=c.useRef(null),u=se(t,d);return s.jsx(wr.Provider,{scope:e.__scopeMenu,children:s.jsx(ke,{present:n||a.open,children:s.jsx(wr.Slot,{scope:e.__scopeMenu,children:s.jsx(Ya,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;i.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:G(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:G(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=HS[i.dir].includes(f.key);p&&g&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});ap.displayName=op;function sp(e){return e?"open":"closed"}function bn(e){return e==="indeterminate"}function Qa(e){return bn(e)?"indeterminate":e?"checked":"unchecked"}function fE(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function pE(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function mE(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=pE(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==r));const d=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function gE(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function vE(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return gE(r,t)}function Cr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hE=Vf,xE=Ua,bE=Gf,yE=Wf,wE=Xa,CE=zf,SE=Yn,EE=Uf,RE=Kf,PE=Xf,kE=Jf,jE=Qf,NE=ep,TE=rp,AE=np,_E=ap,Xn="DropdownMenu",[IE,UR]=we(Xn,[$f]),Ce=$f(),[ME,ip]=IE(Xn),lp=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,d=Ce(t),u=c.useRef(null),[f,p]=ye({prop:o,defaultProp:a??!1,onChange:i,caller:Xn});return s.jsx(ME,{scope:t,triggerId:ge(),triggerRef:u,contentId:ge(),open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(g=>!g),[p]),modal:l,children:s.jsx(hE,{...d,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};lp.displayName=Xn;var cp="DropdownMenuTrigger",dp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=ip(cp,r),i=Ce(r);return s.jsx(xE,{asChild:!0,...i,children:s.jsx(Z.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:et(t,a.triggerRef),onPointerDown:G(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:G(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});dp.displayName=cp;var OE="DropdownMenuPortal",up=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ce(t);return s.jsx(bE,{...n,...r})};up.displayName=OE;var fp="DropdownMenuContent",pp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=ip(fp,r),a=Ce(r),i=c.useRef(!1);return s.jsx(yE,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,l=>{var d;i.current||(d=o.triggerRef.current)==null||d.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:G(e.onInteractOutside,l=>{const d=l.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0,f=d.button===2||u;(!o.modal||f)&&(i.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)"}})});pp.displayName=fp;var DE="DropdownMenuGroup",mp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(wE,{...o,...n,ref:t})});mp.displayName=DE;var $E="DropdownMenuLabel",gp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(CE,{...o,...n,ref:t})});gp.displayName=$E;var LE="DropdownMenuItem",vp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(SE,{...o,...n,ref:t})});vp.displayName=LE;var FE="DropdownMenuCheckboxItem",hp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(EE,{...o,...n,ref:t})});hp.displayName=FE;var VE="DropdownMenuRadioGroup",xp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(RE,{...o,...n,ref:t})});xp.displayName=VE;var BE="DropdownMenuRadioItem",bp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(PE,{...o,...n,ref:t})});bp.displayName=BE;var GE="DropdownMenuItemIndicator",yp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(kE,{...o,...n,ref:t})});yp.displayName=GE;var WE="DropdownMenuSeparator",wp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(jE,{...o,...n,ref:t})});wp.displayName=WE;var zE="DropdownMenuArrow",qE=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(NE,{...o,...n,ref:t})});qE.displayName=zE;var UE=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:o,defaultOpen:a}=e,i=Ce(t),[l,d]=ye({prop:n,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return s.jsx(TE,{...i,open:l,onOpenChange:d,children:r})},HE="DropdownMenuSubTrigger",Cp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(AE,{...o,...n,ref:t})});Cp.displayName=HE;var KE="DropdownMenuSubContent",Sp=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ce(r);return s.jsx(_E,{...o,...n,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)"}})});Sp.displayName=KE;var YE=lp,XE=dp,Ep=up,Rp=pp,ZE=mp,Pp=gp,kp=vp,jp=hp,JE=xp,Np=bp,Tp=yp,Ap=wp,QE=UE,_p=Cp,Ip=Sp;const eR=YE,tR=XE,rR=ZE,nR=Ep,oR=QE,aR=JE,Mp=c.forwardRef(({className:e,inset:t,children:r,...n},o)=>s.jsxs(_p,{ref:o,className:j("qodo qodo-dropdown-menu-sub-trigger flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800",t&&"pl-8",e),...n,children:[r,s.jsx(qi,{className:"ml-auto"})]}));Mp.displayName=_p.displayName;const Op=c.forwardRef(({className:e,...t},r)=>s.jsx(Ip,{ref:r,className:j("z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-purple-muted-600 dark:text-neutral-50",e),...t}));Op.displayName=Ip.displayName;const Dp=c.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(Ep,{children:s.jsx(Rp,{ref:n,sideOffset:t,className:j("qodo qodo-dropdown-menu-content z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-purple-muted-600 background dark:text-neutral-50","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Dp.displayName=Rp.displayName;const es=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(kp,{ref:n,className:j("qodo qodo-dropdown-menu-item relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",t&&"pl-8",e),...r}));es.displayName=kp.displayName;const $p=c.forwardRef(({className:e,children:t,checked:r,...n},o)=>s.jsxs(jp,{ref:o,className:j("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),checked:r,...n,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Tp,{children:s.jsx(Er,{className:"h-4 w-4"})})}),t]}));$p.displayName=jp.displayName;const Lp=c.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(Np,{ref:n,className:j("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 cursor-pointer data-[disabled]:cursor-default",e),...r,children:[s.jsx("span",{className:"absolute right-3 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Tp,{children:s.jsx(Er,{className:"h-[18px] w-[18px] stroke-current stroke-purple-300"})})}),t]}));Lp.displayName=Np.displayName;const ts=c.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(Pp,{ref:n,className:j("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));ts.displayName=Pp.displayName;const xt=c.forwardRef(({className:e,...t},r)=>s.jsx(Ap,{ref:r,className:j("-mx-1 my-1 h-px bg-purple-muted-500",e),...t}));xt.displayName=Ap.displayName;const Fp=({className:e,...t})=>s.jsx("span",{className:j("ml-auto text-xs tracking-widest [&>svg]:size-4",e),...t});Fp.displayName="DropdownMenuEndAndornment";const sR=({radioItem:e})=>s.jsxs(Lp,{className:"m-0 rounded-none gap-2 text-white focus:text-purple-muted-100 focus:bg-zinc-800 pl-3 pr-9 py-1.5",value:e.value,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),iR=({radioGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(aR,{value:e.value,onValueChange:e.onValueChange,children:e.radioItems.map((t,r)=>s.jsx(sR,{radioItem:t},`item-${r}`))}),e.separator&&s.jsx(xt,{})]}),lR=({actionItem:e})=>s.jsxs("div",{className:"w-full [&>button]:w-full",children:[s.jsx(Fr,{content:e.tooltip,providerProps:{delayDuration:200},children:s.jsx(es,{className:"m-0 rounded-none py-1.5 px-3 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800",disabled:e.disabled||e.loading,onClick:e.onClick,onSelect:e.onSelect,children:s.jsxs("div",{className:"flex items-center gap-2",children:[e.loading&&s.jsx(Hi,{className:"h-4 w-4 motion-preset-spin motion-duration-1000"}),!e.loading&&e.icon,e.label,e.endAndornment&&s.jsx(Fp,{children:e.endAndornment})]})})}),e.separator&&s.jsx(xt,{})]}),cR=({checkboxItem:e})=>s.jsxs($p,{className:"gap-2 m-0 rounded-none py-1.5 pl-3 pr-9 outline-none text-white focus:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-purple-300 [&_svg]:size-[18px] [&_svg]:stroke-[3px]",checked:e.checked,onCheckedChange:e.onSelect,disabled:e.disabled,onSelect:t=>t.preventDefault(),children:[e.icon,e.label]}),dR=({checkboxGroupItem:e})=>s.jsxs(s.Fragment,{children:[s.jsx(rR,{children:e.checkboxes.map((t,r)=>s.jsx(cR,{checkboxItem:t},`item-${r}`))}),e.separator&&s.jsx(xt,{})]}),uR=({subMenuItem:e})=>s.jsxs(s.Fragment,{children:[s.jsxs(oR,{children:[s.jsxs(Mp,{disabled:e.disabled,className:"m-0 rounded-none py-1.5 pl-3 pr-1 data-[state=open]:bg-zinc-800 data-[state=open]:text-purple-muted-100 text-white focus:text-purple-muted-100 hover:text-purple-muted-100 focus:bg-zinc-800 [&_svg]:stroke-1 [&_svg]:stroke-white [&_svg]:stroke-1.5 [&_svg]:size-4",children:[e.icon,e.label]}),s.jsx(nR,{children:s.jsx(Op,{className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5",children:e.subItems.map((t,r)=>Vp(t,r))})})]}),e.separator&&s.jsx(xt,{})]}),fR=({menuItem:e})=>s.jsx(ts,{className:"text-[#7968FA] px-3 font-normal",children:e.label}),pR=()=>s.jsx(xt,{}),Vp=(e,t)=>{switch(e.type){case"ActionMenuItem":return s.jsx(lR,{actionItem:e},`item-${t}`);case"CheckboxGroup":return s.jsx(dR,{checkboxGroupItem:e},`item-${t}`);case"RadioGroup":return s.jsx(iR,{radioGroupItem:e},`item-${t}`);case"SubMenuItem":return s.jsx(uR,{subMenuItem:e},`item-${t}`);case"MenuLabel":return s.jsx(fR,{menuItem:e},`item-${t}`);case"Separator":return s.jsx(pR,{},`item-${t}`);default:return null}},mR={s:"min-w-[140px]",l:"min-w-[257px]"},gR=({header:e})=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-purple-muted-300",children:e.title}),s.jsx("span",{children:e.label})]}),vR=({header:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(ts,{className:"text-purple-100 font-normal px-3",children:e.type==="MenuTitleHeader"&&s.jsx(gR,{header:e})}),s.jsx(xt,{className:"bg-purple-muted-500"})]}):null,hR=({footer:e})=>e?s.jsxs(s.Fragment,{children:[s.jsx(xt,{className:"bg-purple-muted-500"}),s.jsxs(es,{onClick:e.action,disabled:e.disabled,className:"cursor-pointer m-0 rounded-none py-1.5 px-3 text-purple-300 focus:text-purple-300 focus:bg-transparent",children:[e.icon,e.label]})]}):null,Bp=({menuItems:e,header:t,footer:r,triggerElement:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1,disabled:d=!1})=>{const u=Wi(mR,{[o]:o,className:"rounded-md text-body dark:bg-purple-muted-700 border-purple-muted-500 px-0 py-1.5"},!1);return s.jsx("div",{className:j("qodo qodo-dropdown"),children:s.jsxs(eR,{modal:l,children:[s.jsx(tR,{asChild:a,className:"select-none outline-none flex items-center",disabled:d,children:n}),s.jsxs(Dp,{side:i,align:"end",className:u,children:[s.jsx(vR,{header:t}),e.filter(f=>!f.isHidden).map((f,p)=>Vp(f,p)),s.jsx(hR,{footer:r})]})]})})},xR=({triggerAriaLabel:e="Open actions menu",className:t,...r})=>s.jsx(Qe,{variant:"ghost",size:"icon","aria-label":e,className:j("flex items-center justify-center h-4 w-4",t),...r,children:s.jsx(Ui,{className:"h-4 w-4"})}),bR=({menuItems:e=[],triggerElement:t=xR,triggerProps:r={},className:n,size:o="s",asChild:a=!1,side:i="bottom",modal:l=!1})=>s.jsx("div",{className:n,onClick:d=>d.stopPropagation(),children:s.jsx(Bp,{triggerElement:s.jsx(t,{className:j("flex items-center justify-center",r==null?void 0:r.className),...r}),menuItems:e,size:o,asChild:a,side:i,modal:l,disabled:r==null?void 0:r.disabled})}),yR={"data-lpignore":"true","data-1p-ignore":"true","data-bitwarden-watching":"false","data-form-type":"other","data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false",spellCheck:!1,autoComplete:"off"},Ni={SMALL:"small",LARGE:"large"},wR=({containerClassName:e,className:t,searchSize:r=Ni.SMALL,disabled:n=!1,disableFilterIcon:o=!0,...a})=>{const i=r===Ni.LARGE?"pl-12 py-3 pr-4 h-[45px]":"pl-9 py-1.5 pr-2 h-[33px]",l=j("absolute top-1/2 h-4 w-4 -translate-y-1/2",n?"text-purple-muted-600":"text-purple-muted-400"),d=j("text-purple-muted-200 dark:border-purple-muted-600 dark:text-purple-muted-200 dark:bg-[#1C1C1C] dark:placeholder:text-purple-muted-400 pl-9",{"pr-9":!o});return s.jsxs("div",{className:j("qodo qodo-search-input","relative",e),children:[s.jsx(Ki,{className:j(l,"left-3")}),s.jsx(Rr,{className:j(i,d,t),disabled:n,...a,...yR}),!o&&s.jsx(Sg,{className:j(l,"right-3")})]})},CR=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,SR=e=>e.split(/[,\s]+/).map(t=>t.trim()).filter(Boolean),ER=(e,t)=>{var n;if(!(t!=null&&t.length))return!0;const r=(n=e.split("@")[1])==null?void 0:n.toLowerCase();return t.some(o=>r===o.toLowerCase())},RR=(e,t)=>e.map(r=>{const n=CR.test(r),o=n?ER(r,t==null?void 0:t.domains):void 0;return{email:r,isValid:n&&o!==!1,isDomainValid:o}}),PR=(e,t,r)=>{const n=RR(e,r),o=[...t];for(const a of n)o.some(l=>l.email===a.email)||o.push(a);return o},kR=({onChange:e=()=>{},organization:t})=>{const[r,n]=S.useState([]),o=S.useCallback(u=>{e(u)},[e]),a=S.useCallback(u=>{n(u),o(u)},[o]),i=S.useCallback(u=>{const f=SR(u);if(f.length===0)return;const p=PR(f,r,t);a(p)},[r,a,t]),l=S.useCallback(()=>{a([])},[a]),d=S.useCallback(u=>{const f=r.filter(p=>p.email!==u);a(f)},[r,a]);return{emails:r,setEmails:a,addTokens:i,removeToken:d,clearAll:l,notify:o}},jR=e=>{const{draft:t,setDraft:r,addTokens:n,allSelected:o,setAllSelected:a,clearAll:i,emails:l,setEmails:d,notify:u}=e;return f=>{if((f.key==="a"||f.key==="A")&&(f.metaKey||f.ctrlKey)){f.preventDefault(),a(!0);return}if(o&&(f.key==="Backspace"||f.key==="Delete")){f.preventDefault(),a(!1),i(),r("");return}if(o&&f.key==="Escape"){f.preventDefault(),a(!1);return}if(o&&f.key.length===1&&!f.metaKey&&!f.ctrlKey&&!f.altKey&&(a(!1),i()),f.key==="Backspace"&&t.length===0&&l.length>0){f.preventDefault();const p=l[l.length-1],g=l.slice(0,-1);d(g),r(p.email),u(g);return}if(f.key==="Enter"){f.preventDefault(),t.trim()&&(n(t),r(""));return}[",",";"," "].includes(f.key)&&(f.preventDefault(),t.trim()&&(n(t),r("")))}},NR=({email:e,isValid:t,onRemove:r})=>{const n=o=>{o.stopPropagation(),r(e)};return s.jsxs(Ht,{className:"px-2 group whitespace-nowrap flex-shrink-0",variant:t?"success":"error",size:"sm",children:[s.jsx("span",{className:"max-w-[200px] truncate",children:e}),s.jsx("button",{onClick:n,className:"ml-1 opacity-70 hover:opacity-100 transition-opacity flex-shrink-0",type:"button",children:s.jsx(Sn,{size:12})})]})},TR=({hasContent:e,onClearAll:t,emails:r,invalidEmailError:n,invalidDomainError:o})=>{const{formatErrors:a,domainErrors:i,totalInvalidCount:l}=S.useMemo(()=>{const m=r.filter(h=>!h.isValid),b=m.filter(h=>!h.email.includes("@")||h.isDomainValid===void 0),v=m.filter(h=>h.isDomainValid===!1);return{formatErrors:b,domainErrors:v,totalInvalidCount:m.length}},[r]),d=m=>{m.preventDefault(),m.stopPropagation()},u=m=>{d(m),t()},f=m=>{d(m)},p=m=>{m.stopPropagation()},g=(m,b)=>b.length===0?s.jsx(s.Fragment,{}):s.jsxs("div",{className:"space-y-1 text-purple-muted-200",children:[s.jsxs("span",{className:"font-medium border-b border-purple-muted-200",children:[m,":"]}),b.map((v,h)=>s.jsx("p",{className:"break-all",children:v.email},`${m}-${h}-${v.email}`))]});return s.jsxs(s.Fragment,{children:[e&&s.jsx("button",{type:"button",onClick:u,className:"absolute right-3 top-1/2 -translate-y-1/2 hover:text-purple-muted-100",children:s.jsx(Ig,{className:"h-4 w-4"})}),l>0&&s.jsx("div",{className:"absolute flex center align-center right-[34px] top-1/2 -translate-y-1/2 [&>button]:h-4",children:s.jsx(Fr,{triggerProps:{asChild:!0},content:s.jsx("div",{onClick:f,onWheel:p,className:"max-w-[min(90vw,32rem)] max-h-[min(60vh,20rem)] p-3 rounded-md border dark:border-red-800 shadow-lg dark:bg-purple-muted-800 dark:text-purple-muted-100",children:s.jsxs("div",{className:"flex flex-col gap-1 text-xs max-h-64 overflow-y-auto pr-1 no-scrollbar",children:[g(n,a),g(o,i)]})}),providerProps:{delayDuration:200},contentProps:{side:"bottom",align:"end",className:"border-0 bg-transparent p-0 m-0",disableArrow:!0},children:s.jsx("button",{type:"button","aria-label":`${l} invalid emails`,className:"text-red-400 hover:text-red-300",children:s.jsx(Og,{className:"size-[18px]"})})})})]})},AR=({onChange:e,disabled:t=!1,inviteMembersPlaceholder:r=({domain:f})=>`Enter email addresses (e.g., user@${f})`,inviteMembersDisabledTooltip:n="You don't have permission to modify email addresses",organization:o,inputClassName:a,chipClassName:i,wrapperClassName:l,invalidEmailError:d="Invalid email",invalidDomainError:u="Email domain is not allowed"})=>{const f=S.useRef(null),p=S.useRef(null),[g,m]=S.useState(""),[b,v]=S.useState(!1),{emails:h,setEmails:y,addTokens:x,removeToken:C,clearAll:E,notify:k}=kR({onChange:e}),A=jR({draft:g,setDraft:m,addTokens:x,allSelected:b,setAllSelected:v,clearAll:E,emails:h,setEmails:y,notify:k}),T=()=>{var X;const F=((X=o==null?void 0:o.domains)==null?void 0:X[0])||"example.com";return r({domain:F})},P=S.useCallback(F=>{m(F.target.value)},[]),B=S.useCallback(()=>{g.trim()&&(x(g),m("")),v(!1)},[g,x]),U=S.useCallback(F=>{const X=F.clipboardData.getData("text");X&&(F.preventDefault(),x(X),m(""))},[x]),re=S.useCallback(()=>{var F;(F=p.current)==null||F.focus()},[p]),ee=S.useCallback(()=>{v(!1)},[]),J=S.useCallback(F=>{var N;const X=F.relatedTarget;X&&((N=f.current)!=null&&N.contains(X))||g.trim()&&(x(g),m(""))},[g,x]),z=h.length>0,$=!z&&g.length===0,_=z||g.length>0,D=j("bg-transparent text-sm outline-none border-0 p-0 h-6 shadow-none focus-visible:ring-0 whitespace-nowrap text-purple-muted-200 placeholder:text-purple-muted-400",z?"flex-none shrink-0 overflow-x-auto overflow-y-hidden no-scrollbar":"flex-1 !min-w-full overflow-hidden",{"opacity-50 cursor-not-allowed":t},a),R=j("inline-flex items-center gap-1 no-scrollbar",z?"w-max":"w-full",i),M=j("qodo qodo-email-chips-input","relative w-full max-w-full min-w-0 overflow-hidden rounded-md border pl-9 pr-14 py-2 pl-9 pr-14 py-2 focus-within:ring-1 border-purple-muted-500 dark:bg-purple-muted-800 focus-within:ring-purple-muted-400",l);return s.jsx(Fr,{triggerProps:{asChild:!0},content:t?n:void 0,children:s.jsxs("div",{ref:f,className:M,onClick:re,onFocus:ee,onBlur:J,children:[s.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-purple-muted-400",children:s.jsx(Pg,{className:"w-4 h-4"})}),s.jsx("div",{className:"w-full text-start max-w-full min-w-0 overflow-x-auto overflow-y-hidden no-scrollbar",children:s.jsxs("div",{className:R,children:[h.map((F,X)=>s.jsx(NR,{email:F.email,isValid:F.isValid,onRemove:C},`email-${X}-${F.email}`)),s.jsx("input",{ref:p,value:g,onChange:P,onKeyDown:A,onBlur:B,onPaste:U,className:D,placeholder:$?T():"",disabled:t})]})}),s.jsx(TR,{hasContent:_,onClearAll:E,emails:h,invalidEmailError:d,invalidDomainError:u})]})})},Qr={DEFAULT:"default",PRIMARY:"primary",ACTIVE:"active"};function _R({title:e,description:t,caption:r,additionalContent:n,titleClassName:o,descriptionClassName:a,variant:i=Qr.DEFAULT,className:l}){const d=j("px-6 py-4 gap-1","border-[var(--border-panel-neutral)] rounded-md dark:bg-transparent",l),u=j("p-0 m-0 text-xs tracking-[0.12px]","text-[var(--color-text-bg-neutral-mild)] dark:text-[var(--color-text-bg-neutral-mild)] font-normal",o),f=j("text-xl font-medium p-0 m-0",{"text-muted-foreground dark:text-white":i===Qr.DEFAULT,"text-purple-300 dark:text-purple-300":i===Qr.PRIMARY,"text-[var(--color-text-tag-positive-idle)] dark:text-[var(--color-text-tag-positive-idle)]":i===Qr.ACTIVE},a);return s.jsxs(fd,{className:d,children:[s.jsx(pd,{className:"m-0 p-0 gap-0",children:s.jsx(md,{className:u,children:e})}),s.jsxs(vd,{className:"m-0 p-0 flex flex-col gap-1",children:[t&&s.jsx(gd,{className:f,children:t}),r&&s.jsx("span",{className:"text-xs text-foreground dark:text-foreground tracking-[0.12px]",children:r}),n]})]})}exports.Accordion=dw;exports.AccordionContent=pw;exports.AccordionItem=uw;exports.AccordionTrigger=fw;exports.ActionsCell=bR;exports.Badge=Ht;exports.BadgeCell=BS;exports.BaseCell=Yo;exports.Button=Qe;exports.Card=fd;exports.CardAction=sy;exports.CardContent=vd;exports.CardDescription=gd;exports.CardFooter=iy;exports.CardHeader=pd;exports.CardTitle=md;exports.ClassHelper=Wi;exports.Combobox=ba;exports.Dialog=Db;exports.DialogClose=Lb;exports.DialogContent=Fb;exports.DialogDescription=Wb;exports.DialogFooter=Bb;exports.DialogHeader=Vb;exports.DialogOverlay=Yc;exports.DialogPortal=Kc;exports.DialogTitle=Gb;exports.DialogTrigger=$b;exports.Dropdown=Bp;exports.EmailChipsInput=AR;exports.Form=Ie;exports.FormProvider=fu;exports.Input=Rr;exports.InsightCard=_R;exports.NumberCell=GS;exports.Progress=vy;exports.RadioGroup=$a;exports.RadioGroupItem=La;exports.SearchInput=wR;exports.Select=Kx;exports.SelectContent=gc;exports.SelectGroup=Yx;exports.SelectItem=hc;exports.SelectLabel=vc;exports.SelectScrollDownButton=da;exports.SelectScrollUpButton=ca;exports.SelectSeparator=xc;exports.SelectTrigger=mc;exports.SelectValue=Xx;exports.Skeleton=wd;exports.SortableHeaderCell=WS;exports.Steps=TS;exports.Switch=Sy;exports.Table=VS;exports.TagsInput=Ku;exports.Toggle=Ry;exports.ToggleGroup=Gy;exports.ToggleGroupItem=Wy;exports.Tooltip=Fr;exports.borderRadius=fm;exports.cn=j;exports.colors=dm;exports.spacing=um;exports.typography=pm;exports.useFormContext=pu;
|
|
204
214
|
//# sourceMappingURL=index.cjs.js.map
|